From cf8eab9f798d3a10d178f611e1b9d5e5fbb3adfc Mon Sep 17 00:00:00 2001 From: Ed_ Date: Fri, 3 Jul 2026 09:45:45 -0400 Subject: [PATCH] feat(directives): add rule-statement header to 1-8 of 66 v1.md files --- conductor/directives/ast_parse_insufficient/v1.md | 2 ++ conductor/directives/ast_verify_class_methods_after_edit/v1.md | 2 ++ conductor/directives/atomic_per_task_commits/v1.md | 2 ++ conductor/directives/ban_any_type/v1.md | 2 ++ conductor/directives/ban_arbitrary_core_mocking/v1.md | 2 ++ conductor/directives/ban_day_estimates/v1.md | 2 ++ conductor/directives/ban_dict_any/v1.md | 2 ++ conductor/directives/ban_dict_get_on_known_fields/v1.md | 2 ++ 8 files changed, 16 insertions(+) diff --git a/conductor/directives/ast_parse_insufficient/v1.md b/conductor/directives/ast_parse_insufficient/v1.md index 4e7e9176..b0121fdb 100644 --- a/conductor/directives/ast_parse_insufficient/v1.md +++ b/conductor/directives/ast_parse_insufficient/v1.md @@ -1,3 +1,5 @@ +# Only ast.parse() is not enough — verify semantic correctness by importing and instantiating + ### Rule 7. ast.parse() Is Not Enough `py_check_syntax` only confirms `ast.parse()` succeeds. Semantic errors (wrong decorator targets, wrong base class, wrong attribute, missing `self`) are NOT caught. After any multi-line edit, ALWAYS: diff --git a/conductor/directives/ast_verify_class_methods_after_edit/v1.md b/conductor/directives/ast_verify_class_methods_after_edit/v1.md index 3eb19a86..11f50b8c 100644 --- a/conductor/directives/ast_verify_class_methods_after_edit/v1.md +++ b/conductor/directives/ast_verify_class_methods_after_edit/v1.md @@ -1,3 +1,5 @@ +# After every edit, verify by importing and instantiating the new method + ## Pattern: Indentation-Driven Method Visibility **The bug:** A class method defined with the right intent (2-space indent) may be parsed as nested inside a previous function if indentation is off by even one space. The file passes syntactically (imports OK) but the method is **not** on the class — `hasattr(App, 'method_name')` returns `False`. Any production code that calls `app.method_name` falls through to `__getattr__`, which delegates to the controller (which also doesn't have the method), and a cryptic `AttributeError` is raised at runtime. diff --git a/conductor/directives/atomic_per_task_commits/v1.md b/conductor/directives/atomic_per_task_commits/v1.md index 98913084..fcc6039a 100644 --- a/conductor/directives/atomic_per_task_commits/v1.md +++ b/conductor/directives/atomic_per_task_commits/v1.md @@ -1,3 +1,5 @@ +# Commits must be atomic — one task = one commit + From `conductor/workflow.md` §"Standard Task Workflow" step 9: - **CRITICAL - ATOMIC PER-TASK COMMITS**: You MUST commit your changes immediately after completing and verifying a single task. Do NOT move on to the next task in the plan without committing the current one. This ensures precise tracking and safe rollback points. - Stage all code changes related to the task. diff --git a/conductor/directives/ban_any_type/v1.md b/conductor/directives/ban_any_type/v1.md index cca1376a..f10af589 100644 --- a/conductor/directives/ban_any_type/v1.md +++ b/conductor/directives/ban_any_type/v1.md @@ -1,3 +1,5 @@ +# The Any type is banned; use typed field declarations + ### 17.2 Banned: `Any` ```python diff --git a/conductor/directives/ban_arbitrary_core_mocking/v1.md b/conductor/directives/ban_arbitrary_core_mocking/v1.md index 6f025a08..5354d07b 100644 --- a/conductor/directives/ban_arbitrary_core_mocking/v1.md +++ b/conductor/directives/ban_arbitrary_core_mocking/v1.md @@ -1,3 +1,5 @@ +# Arbitrary mocking of core infrastructure with unittest.mock.patch is banned + From `conductor/workflow.md` §"Structural Testing Contract": 1. **Ban on Arbitrary Core Mocking:** Tier 3 workers are strictly forbidden from using `unittest.mock.patch` to bypass or stub core infrastructure (e.g., event queues, `ai_client` internals, threading primitives) unless explicitly authorized by the Tier 2 Tech Lead for a specific boundary test. 2. **`live_gui` Standard:** All integration and end-to-end testing must utilize the `live_gui` fixture to interact with a real instance of the application via the Hook API. Bypassing the hook server to directly mutate GUI state in tests is prohibited. diff --git a/conductor/directives/ban_day_estimates/v1.md b/conductor/directives/ban_day_estimates/v1.md index c1c31bd3..b6edab57 100644 --- a/conductor/directives/ban_day_estimates/v1.md +++ b/conductor/directives/ban_day_estimates/v1.md @@ -1,3 +1,5 @@ +# Day, hour, or minute estimates are banned in track artifacts + From `AGENTS.md` "Critical Anti-Patterns": - **HARD BAN: Day estimates in track artifacts (Tier 1).** Do NOT include day / hour / minute estimates in spec.md, plan.md, metadata.json, or any other track artifact. Day estimates are inaccurate noise; Tier 2 capacity is bounded by attention, not time. Measure effort by **scope** (N files, M sites, N tasks). The user / Tier 2 agent decides the actual pacing. See `conductor/workflow.md` §"Tier 1 Track Initialization Rules" for the full rule, replacement patterns, and rationale. (Added 2026-06-16 per user feedback: "Day estimates are inaccurate. Tier-2s can only do so much in a single track and there is no way in hell its going to be 'DAYS'.") diff --git a/conductor/directives/ban_dict_any/v1.md b/conductor/directives/ban_dict_any/v1.md index 0b1b89bb..197e4a07 100644 --- a/conductor/directives/ban_dict_any/v1.md +++ b/conductor/directives/ban_dict_any/v1.md @@ -1,3 +1,5 @@ +# The type alias dict[str, Any] is banned in non-boundary code + ### 17.1 Banned: `dict[str, Any]` ```python diff --git a/conductor/directives/ban_dict_get_on_known_fields/v1.md b/conductor/directives/ban_dict_get_on_known_fields/v1.md index 1af00919..05e39e1f 100644 --- a/conductor/directives/ban_dict_get_on_known_fields/v1.md +++ b/conductor/directives/ban_dict_get_on_known_fields/v1.md @@ -1,3 +1,5 @@ +# Calling .get('field', default) on dict[str, Any] for known fields is banned + ### 17.6 Banned: `.get('field', default)` on a `dict[str, Any]` ```python