For the reader who wants to know why
Companion to the overview. Why each layer exists and how they fit together.
The whole architecture rests on one principle:
Everything below is an expansion of that sentence.
Most “AI in our workflow” setups collapse automation, judgement, and procedure into one undifferentiated pile of prompts. Keeping them distinct is what makes the system legible and maintainable.
Deterministic shell scripts the harness fires automatically at points in the session lifecycle (start, end, prompt-submit). Their defining constraint: they surface information; they never decide.
Why shell, not the agent? Because these jobs must happen every time, identically, with zero judgement. Determinism belongs in scripts. The moment a task needs judgement, it stops being a hook.
Plain-language markdown rules, each with a trigger and a procedure. Crucially, they’re loaded only when their trigger fires — not dumped into context on every session. This keeps the working context lean while still applying consistent judgement exactly when it’s needed.
Packaged, repeatable, multi-step workflows invoked on demand. The input may be messy; the output is always the same disciplined shape.
/interview-to-brief — raw research → structured problem brief (cited)./feature-critique — a feature description → a structural critique./strategy-sync-audit — flag where the roadmap has drifted from strategy.Skills compound: every use adds to a shared pattern library instead of being re-improvised.
| Hooks | Policies | Skills | |
|---|---|---|---|
| Form | shell script | markdown rule | packaged workflow |
| Runs | automatically | when triggered | on demand |
| Job | observe & surface | judge | execute |
| Decides? | never | guides | carries out |
Two documents — the target user and the core job — that sit above everything. Every brief, every roadmap change, every feature idea is checked against them. They’re the answer to “is this drift?” Without anchors, a backlog slowly fills with things that serve someone, just not the someone you’re building for.
Four structures that make sure nothing learned is lost:
This is the difference between memory and a filing cabinet: the memory is re-loaded into context automatically, so each session stands on the last.
The layer that makes the system durable. The rule: any new primitive must update every registry that names it — including the visual self-portrait — or the change fails its own audit.
Concretely, adding a skill forces:
The payoff: six months later, the map is still the territory. A newcomer can trust the system’s description of itself, because the system can’t let that description go stale.
Governance also includes ownership (who can merge what, where) and a maintenance cadence (a recurring pass to prune the learnings log, retire orphaned folders, refresh stale specs). Unglamorous, and exactly the kind of rigor that separates a system that lasts from a clever one-off.
None of these primitives are novel on their own — teams have had scripts, checklists, and templates forever. What changes when an AI coding agent reads the same context: