Running autonomous coding agents on a real repo fails in a specific way: gray failures. The session reports success while a queue silently stalls, a deploy goes green without running its migration, or an edit touches a file it shouldn't. Diff review can't catch these — the damage is in what the agent didn't do. The fix isn't a better prompt; it's machinery around the agent.
| Layer | Component | What it does |
|---|---|---|
| Lifecycle | session-start.mjs | Session opens informed: dirty tree, stale locks, open obligations, incident index |
| PreToolUse | agent-guard.mjs · file-guard.mjs | Deterministic regex guards block dangerous shell commands and writes to secret/migration/runtime files — sub-50ms, zero model calls |
| PostToolUse | agent-ledger.mjs | Every tool call appended to action-log.jsonl (secrets redacted) — the session is auditable as a trace |
| UserPromptSubmit | prompt-guard.mjs | External-knowledge questions get a mandatory source-verification instruction injected |
| Stop | claim-guard.mjs | Files changed but no test ran → loud "unverified" advisory instead of silent green |
| Review | gate.mjs → dep-audit.mjs → jev-gate.mjs | Deterministic secret/suppression scan → npm supply-chain audit → typed LLM judgment (14 constraints) with persistent state |
| Orchestration | ops/dispatch/ | Dispatch contract + rules for delegating work to autonomous sessions |
| Knowledge | .devin/skills/ · docs/ · templates/ | 11 domain skills, ~30 pattern docs, AGENTS/ADR/incident templates |
git clone https://github.com/signalgap9-del/devin-harness
node setup.mjs /path/to/your/repo
Full teardown with reasoning: /writing/agents.html