From 4d2179c38f04d60a073f6d92320c0001e4591100 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Fri, 3 Jul 2026 09:45:50 -0400 Subject: [PATCH] feat(directives): add rule-statement header to 57-63 of 66 v1.md files --- conductor/directives/test_sandbox/v1.md | 2 ++ conductor/directives/type_hints_required/v1.md | 2 ++ conductor/directives/typed_dataclass_fields/v1.md | 2 ++ conductor/directives/ui_delegation_for_hot_reload/v1.md | 2 ++ conductor/directives/undo_redo_100_snapshot_capacity/v1.md | 2 ++ conductor/directives/verbose_commit_message_ban/v1.md | 2 ++ conductor/directives/verify_before_editing/v1.md | 2 ++ 7 files changed, 14 insertions(+) diff --git a/conductor/directives/test_sandbox/v1.md b/conductor/directives/test_sandbox/v1.md index 3719fa79..3ac13b28 100644 --- a/conductor/directives/test_sandbox/v1.md +++ b/conductor/directives/test_sandbox/v1.md @@ -1,3 +1,5 @@ +# The test sandbox is enforced via four-layer rules (FR1-FR4) — see the styleguide + ## The 4-Layer Model | Layer | Mechanism | Where | Default-on? | diff --git a/conductor/directives/type_hints_required/v1.md b/conductor/directives/type_hints_required/v1.md index 83aa4473..f79e9bc0 100644 --- a/conductor/directives/type_hints_required/v1.md +++ b/conductor/directives/type_hints_required/v1.md @@ -1,3 +1,5 @@ +# All functions, methods, parameters, and class-level variables must have type hints + ## 2. Type Annotations - **All functions and methods** must have return type annotations. diff --git a/conductor/directives/typed_dataclass_fields/v1.md b/conductor/directives/typed_dataclass_fields/v1.md index e2d60332..96f3c613 100644 --- a/conductor/directives/typed_dataclass_fields/v1.md +++ b/conductor/directives/typed_dataclass_fields/v1.md @@ -1,3 +1,5 @@ +# Data classes use explicit typed fields via `@dataclass(frozen=True, slots=True)` — no dict[str, Any] + ### 8.5 The Python Type Promotion Mandate (added 2026-06-25) **C11/Odin/Jai semantics in a Python runtime.** This codebase is written in Python because of practical constraints (time, dependencies, LLM codegen ability), but the convention is to make Python behave as close to a statically-typed value-typed language as the runtime allows. **LLMs default to opaque types (`dict[str, Any]`, `Any`, `Optional[T]`, `hasattr()` polymorphism) because that's what idiomatic Python training data looks like. That defaults to mediocrity; this rule overrides it.** diff --git a/conductor/directives/ui_delegation_for_hot_reload/v1.md b/conductor/directives/ui_delegation_for_hot_reload/v1.md index 189955b5..4fbdfb17 100644 --- a/conductor/directives/ui_delegation_for_hot_reload/v1.md +++ b/conductor/directives/ui_delegation_for_hot_reload/v1.md @@ -1,2 +1,4 @@ +# Complex ImGui rendering lives in module-level render_xxx(app) functions, not App class methods + From `conductor/product-guidelines.md` §"Code Standards & Architecture": - **UI Delegation for Hot-Reload:** All complex ImGui rendering logic must be extracted from the `App` class into module-level functions named `render_xxx(app: App)`. The `App` class should only contain thin delegation wrappers (`def _render_xxx(self): render_xxx(self)`). This architecture is mandatory for supporting state-preserving hot-reloads of the UI logic. \ No newline at end of file diff --git a/conductor/directives/undo_redo_100_snapshot_capacity/v1.md b/conductor/directives/undo_redo_100_snapshot_capacity/v1.md index 07eed9b4..15636e7a 100644 --- a/conductor/directives/undo_redo_100_snapshot_capacity/v1.md +++ b/conductor/directives/undo_redo_100_snapshot_capacity/v1.md @@ -1,3 +1,5 @@ +# The history undo/redo stack has 100-snapshot capacity with debounced change detection + ## HistoryManager — the 100-snapshot undo/redo stack `src/history.py:71 HistoryManager` is a 100-snapshot capacity stack with the following API: diff --git a/conductor/directives/verbose_commit_message_ban/v1.md b/conductor/directives/verbose_commit_message_ban/v1.md index d7af3665..98c65f17 100644 --- a/conductor/directives/verbose_commit_message_ban/v1.md +++ b/conductor/directives/verbose_commit_message_ban/v1.md @@ -1,3 +1,5 @@ +# Commit messages must be 1-3 sentences — longer than 15 lines is a confession, not a commit + ### 7. The Verbose-Commit-Message Pattern (kill it) **Symptom:** Your commit message is 50 lines. It contains the root cause analysis, the alternatives you considered, the side effects you considered, the cross-references, the "what this doesn't fix", the "what to verify", and a personal essay. The commit message is longer than the diff it describes. diff --git a/conductor/directives/verify_before_editing/v1.md b/conductor/directives/verify_before_editing/v1.md index cc81d8ac..9ce86dd3 100644 --- a/conductor/directives/verify_before_editing/v1.md +++ b/conductor/directives/verify_before_editing/v1.md @@ -1,3 +1,5 @@ +# Before any edit on a file you haven't touched recently: py_check_syntax, get_file_slice, check the contract + ### Rule 2. Verify Before Editing Before ANY edit to a function you haven't touched recently: