One authoritative definition of each cognitive stage's required artifact fields. Worker prompts, artifact validators, normalization aliases, and contract-drift tests all derive from this registry.
SYNTHESIS data_flow promoted to required (contract-drift test caught it)
8 contract-drift tests: all stages have contracts, disposition in ADVERSARIAL contract, conclusion in INNOVATION, route in APPLICABILITY, validator-vs-contract drift, aliases bounded, prompt derives from contract
First direct application of Process Learning: fix the mechanism that caused the class of failure (duplicate stage-contract authority between templates and inline prompts), not just the observed output.
8 tests; full suite 1179 passed; ruff clean.
## TASK D: single-source stage contracts (epic #284)
One authoritative definition of each cognitive stage's required artifact fields. Worker prompts, artifact validators, normalization aliases, and contract-drift tests all derive from this registry.
- scripts/stage_contracts.py: STAGE_CONTRACTS dict (required_fields + optional_fields per stage), COMPATIBILITY_ALIASES (bounded, versioned), get_prompt_field_description(), get_aliases()
- INWARD contract added (claims)
- SYNTHESIS data_flow promoted to required (contract-drift test caught it)
- 8 contract-drift tests: all stages have contracts, disposition in ADVERSARIAL contract, conclusion in INNOVATION, route in APPLICABILITY, validator-vs-contract drift, aliases bounded, prompt derives from contract
**First direct application of Process Learning:** fix the mechanism that caused the class of failure (duplicate stage-contract authority between templates and inline prompts), not just the observed output.
8 tests; full suite 1179 passed; ruff clean.
scripts/stage_contracts.py:
- STAGE_CONTRACTS: one authoritative definition per cognitive stage
(INWARD/OUTWARD/APPLICABILITY/ADVERSARIAL/INNOVATION/SYNTHESIS/QUALIFY)
- Each contract: required_fields (name/type/description/enum) + optional_fields
- COMPATIBILITY_ALIASES: documented field-name mappings (bounded, not open-ended)
- get_prompt_field_description(): prompt text derives from the contract
- get_aliases(): normalization aliases derive from the contract
Contract-drift tests (test_stage_contracts.py):
- All cognitive stages have contracts
- ADVERSARIAL disposition in contract (the #164 root cause: template had it, inline prompt didn't)
- INNOVATION conclusion in contract
- APPLICABILITY route in contract
- Contract-drift: validator-checked fields must be in the contract (required + optional)
- Compatibility aliases must target known fields
- Prompt derives from contract
SYNTHESIS contract promoted data_flow to required (the drift test caught it).
8 tests; full suite 1171 passed; ruff clean.
🤖Headless spec gate (non-blocking, #204 first slice)
Spec-gate agent produced no text output — check runner logs.
Deterministic floors still govern the merge
This comment is advisory. Required checks (lint, tests, canaries, type-check, coverage, dependency lock, impact gate) remain the merge authority per docs/adversarial-review.md proportionality.
🤖 **Headless spec gate (non-blocking, #204 first slice)**
Spec-gate agent produced no text output — check runner logs.
<details><summary>Deterministic floors still govern the merge</summary>
This comment is advisory. Required checks (lint, tests, canaries, type-check, coverage, dependency lock, impact gate) remain the merge authority per docs/adversarial-review.md proportionality.</details>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
TASK D: single-source stage contracts (epic #284)
One authoritative definition of each cognitive stage's required artifact fields. Worker prompts, artifact validators, normalization aliases, and contract-drift tests all derive from this registry.
First direct application of Process Learning: fix the mechanism that caused the class of failure (duplicate stage-contract authority between templates and inline prompts), not just the observed output.
8 tests; full suite 1179 passed; ruff clean.
🤖 Headless spec gate (non-blocking, #204 first slice)
Spec-gate agent produced no text output — check runner logs.
Deterministic floors still govern the merge
This comment is advisory. Required checks (lint, tests, canaries, type-check, coverage, dependency lock, impact gate) remain the merge authority per docs/adversarial-review.md proportionality.