From b519ecbe64455ccf4bf8c455c72e27db8eb2d046 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Thu, 25 Jun 2026 20:56:13 -0400 Subject: [PATCH] =?UTF-8?q?docs(workflow):=20add=20Tier=201=20Rule=20?= =?UTF-8?q?=C2=A70=20(Python=20Type=20Promotion=20Mandate)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conductor/workflow.md | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/conductor/workflow.md b/conductor/workflow.md index dcb882a0..ff9f4258 100644 --- a/conductor/workflow.md +++ b/conductor/workflow.md @@ -549,13 +549,24 @@ The recommended execution order is the topological sort of the `blocked_by` grap --- -## Tier 1 Track Initialization Rules (Added 2026-06-16) +## Tier 1 Track Initialization Rules (Added 2026-06-16; updated 2026-06-25 with §"The Python Type Promotion Mandate") These are the rules a Tier 1 Orchestrator follows when initializing a new track. They exist because Tier 1 noise (day estimates, day-of-week -schedules, etc.) propagates into the Tier 2's plans, the user's -expectations, and the historical record — and most of that noise is -just wrong. +schedules, opaque-type promotion, etc.) propagates into the Tier 2's +plans, the user's expectations, and the historical record — and most +of that noise is just wrong. + +### 0. The Python Type Promotion Mandate (Added 2026-06-25) + +Every track spec/plan MUST respect the C11/Odin/Jai-in-Python mandate: +- **No `dict[str, Any]` outside the wire boundary.** The boundary is 2-3 functions per file (TOML/JSON parse). +- **No `Any` parameter, return, or field type.** +- **No `Optional[T]` returns.** Use `Result[T]` + `NIL_T` sentinels per `conductor/code_styleguides/error_handling.md`. +- **No `hasattr()` for entity type dispatch.** The boundary is typed Union dispatch or per-entity function overloads. +- **Direct field access on typed `@dataclass(frozen=True, slots=True)` instances.** + +When a track's spec proposes lifting entities into `dict[str, Any]` or `Any`, Tier 1 MUST reject and rewrite. See `conductor/code_styleguides/data_oriented_design.md` §8.5 and `conductor/code_styleguides/python.md` §17 for the canonical mandate. ### 1. NO day / hour / minute estimates in track artifacts