How it works
The discipline is automatic.
DevArch hooks into Claude Code's lifecycle. You never invoke the gates or agents — they fire on their own, and nothing is lost between sessions. Two loops do the work: the session lifecycle and the project lifecycle.
The session lifecycle
What happens automatically in every session — from start to ship.
Session Start
Every session opens with the SessionStart hook creating session state and surfacing the previous session. DevArch presents a recap of where you left off, runs a pre-session audit for blockers and stale artifacts, and refreshes the project profile when it has gone stale.
Planning
State a non-trivial goal and the session-planner decomposes it into session-sized phases — first consulting your recorded decisions (ADRs, the project profile, DDD notation). plan-review then adversarially checks each phase against those references before you approve, and a gate blocks edits until you do.
Implementation
As you write code, hooks fire: boundary-check prompts for a Boundary Statement on cross-boundary state, the budget tracker warns at 70/90/100% of the phase budget, and mutation-verification confirms your tests assert on real state changes. A session checkpoint catches scope drift; decisions worth keeping become ADRs.
Finalize
On ship, the work-summary-writer records what changed, the status, and any blockers; capability-sniffer suggests when to activate deeper capabilities; and the PreCompact hook preserves the work log before context is wiped. Then it's committed and pushed — and the next session picks up exactly where this one ended.
The project lifecycle
Sessions are the inner loop. Skills, artifacts, and decision records connect them into a coherent project.
Model the domain your way — up front in conversation, or extracted from an existing codebase, then confirmed by your domain experts; review the architecture periodically; snapshot project health on demand. Every session leaves a summary, every significant decision becomes an ADR, and every plan is archived. Start a new session tomorrow and the audit agent tells you exactly where you left off — the project accumulates discipline instead of eroding it.