Without Intelligent Guardrails, Claude Code Is Pure Chaos

ChicagoDave1 pts0 comments

DevArch — AI-Assisted Development, Disciplined

| _ \ _____ __/ \ _ __ ___| |__<br>| | | |/ _ \ \ / / _ \ | '__/ __| '_ \<br>| |_| | __/\ V / ___ \| | | (__| | | |<br>|____/ \___| \_/_/ \_\_| \___|_| |_|<br>v4.0.0

Validated for Claude Opus 4.8 &rarr;

Why DevArch

AI makes a lone developer fast. DevArch makes them disciplined — the expert presence in the room that keeps architecture coherent and quality compounding, so a small team delivers like a big one.

An architect in the room

Domain-driven design shouldn't live in one person's head. DevArch helps you find the bounded contexts, name the ubiquitous language, and hold the boundaries — so the system has a shape before you write a line of code.

From BUILD: FAILED to all green

Behavioral tests, mutation checks, and quality gates turn a red build into a passing one — with the tests that prove it. You direct the work; DevArch keeps the discipline, so quality compounds instead of eroding.

The Session Lifecycle

DevArch hooks into Claude Code's lifecycle. Every session follows this discipline automatically.

Every hook fires automatically. The developer never invokes them. Session context is preserved across conversations — start a new session tomorrow and the audit agent tells you exactly where you left off.

The Project Lifecycle

Sessions are the inner loop. Skills, artifacts, and decision records connect them into a coherent project.

Brainstorm before you build. Review the architecture periodically. Every session produces a summary. Every significant decision becomes an ADR. Nothing is lost between sessions.

Developer Claude Code DevArch Hooks DevArch Agents<br>| | | |<br>| start session | | |<br>|---------------------->| | |<br>| | SessionStart hook | |<br>| |---------------------->| |<br>| | | create session file |<br>| | | find previous session|<br>| | | report plan state |<br>| | | set quality gate |<br>| |pre-session-audit | |<br>| |---------------------------------------------->|<br>| | | read last 5 sessions<br>| | | surface blockers |<br>| | | flag recurring bugs|<br>| audit briefing || | |<br>| | session-planner | |<br>| |---------------------------------------------->|<br>| | | decompose into phases<br>| review plan || | |<br>| | | |<br>| | plan-gate-exit | |<br>| |---------------------->| gate = clear |<br>| | | archive plan |<br>| | | |<br>: (implementation) : : :<br>| | | |<br>| | PostToolUse hook | (on every tool call) |<br>| |---------------------->| |<br>| | | log to work-log.txt |<br>| | | track budget usage |<br>| | | report at 70/90/100% |<br>| | | |<br>| | mutation-verification| |<br>| |---------------------------------------------->|<br>| | | check tests assert |<br>| | | on real state change<br>| | | |<br>| "ship it" | | |<br>|---------------------->| | |<br>| | work-summary-writer | |<br>| |---------------------------------------------->|<br>| | | summarize session |<br>| | | status + blockers |<br>| | PreCompact hook | |<br>| |---------------------->| append work log |<br>| | | finalize session |<br>| | | |<br>| | commit + push | |<br>| done |

What's Inside

Directives, agents, and skills that enforce engineering discipline automatically.

Session Continuity

Session start hooks restore context. Work summaries capture state. Pre-session audits surface blockers. You never lose track of where you are.

Coding Discipline

Invariants and variants identified before writing code. Cohesive modularity enforced. Clear boundaries between domain logic and infrastructure. Not suggestions — rules.

Boundary Statements

Before editing files that own cross-boundary state — stores, reducers, projections, domain modules — the agent declares OWNER, SHARED?, PROMISE, and ALTERNATIVES. Per-consumer state can't quietly migrate into a shared module without an explicit conversation.

Behavior Statements

Every side-effect function gets a structured statement — DOES, WHEN, BECAUSE, REJECTS WHEN — before any test is written. If you can't state what the code does, it's not ready.

Test Grading

Tests derived from behavior statements are graded RED/YELLOW/GREEN. Tautological assertions, mock-only checks, and return-value-only tests are caught and rejected.

Mutation Verification

An agent runs after every side-effect function to verify tests assert on actual state changes — not just return values, not just "didn't throw."

Integration Reality

Phases named after an integration must have a test that drives the real subprocess, runtime, or migration. A stub of an owned dependency can't be the acceptance gate for the integration with that dependency. "Carve-out" is never a valid modifier of "complete."

Architecture Decision Records

When a decision constrains future sessions, the agent asks "ADR-worthy?" Approved decisions are promoted to permanent record with context, rationale, and consequences.

Planning Gates

Non-trivial goals are decomposed into phases before implementation starts. Budget tracking warns at 70%, 90%, and 100% of tool-call budget per phase.

Domain-Driven Design

Activate when complexity demands it. Bounded contexts, domain events, aggregates, value objects, ubiquitous language —...

session devarch state code before tests

Related Articles