ADR 0004: Add `validate.py` as the type checker for the prose contract

decision

ADR 0004: Add `validate.py` as the type checker for the prose contract

About this note
Field Value
Status accepted
Date 260725
Deciders chamin
On this pageContextDecisionAlternatives consideredConsequences

Context#

Brain is a convention, not an application (prd.md §0): the pipeline, the corroboration gate and the file schema live as English in AGENTS.md, and the agent is the runtime. The upside is that new capabilities ship as paragraphs - ADR-0002 and ADR-0003 both added real behaviour without a line of code. The structural weakness is the mirror of that: prose has no compiler. Nothing enforces the rules but the agent's willingness to follow them, and drift does not fail loudly - it accumulates.

prd.md §10 already anticipates volume pressure (grep slowing down at a few hundred sources, answered by a vector index). It does not anticipate consistency pressure, which arrives far earlier. Evidence from a single working day at two sources:

Every one of those is a form error a machine can catch.

Decision#

Add validate.py at the repo root, run before the git diff at the end of any compound, research or close-the-loop pass, and in CI on every push and PR.

Constraints that shaped it:

Alternatives considered#

Consequences#