Canonical Projections
Canonical Projections
Section titled “Canonical Projections”ContextBrew’s typed models are the canon — but not everyone who works in
your repo speaks DDD/USM/SCM. ctxbrew project renders the canon into
four plain markdown files at the project root, so any AI coding agent —
Claude Code, Cursor, Windsurf, a bare CLI — can read project state in
one glance:
| File | Question it answers | Lifespan |
|---|---|---|
GOAL.md |
What do I do now? | Until the models change |
CONTEXT.md |
What is this project? | Until the models change |
ROADMAP.md |
Where am I in the big picture? | Until the models change |
CHECKPOINT.md |
Where did the last session leave off? | Until the next brew |
The difference: generated truth, not convention
Section titled “The difference: generated truth, not convention”Markdown goal files are only as good as their last manual update — a
stale GOAL.md asserts “what you should do now” with the same
confidence as a fresh one. ContextBrew’s projections are generated
from the typed model canon: the next moves in GOAL.md are derived
deterministically from your actual models (parse errors, unassigned
aggregates, requirements without tests, unresolved references), and
every file carries a provenance address — projection:goal:<hash8> —
that pins it to the exact canon slice it was rendered from. ctxbrew why resolves it.
ctxbrew project # write all four at the project rootctxbrew project --check # CI drift gate: exit 1 when any file is staleSafety
Section titled “Safety”- Guard. A target file without a
ctxbrew:generatedstamp is presumed hand-written and refused — your ownGOAL.mdis never clobbered.--forceoverwrites deliberately. - Determinism. Same models, same bytes: the files are regenerated
and diffed under
--check, never guessed. - Watch integration. Under
ctxbrew watch, every brew cycle refreshes the projections — withCHECKPOINT.mdsurfacing the agent’s last recorded Step N/M from the orchestration heartbeat.
What they are not
Section titled “What they are not”The projections are an export surface, not the source of truth.
Edit the models under .contextbrew/ (or through Context Studio); the
files regenerate. Editing a projection by hand just gets overwritten on
the next cycle.
