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