harden-repo-for-coding-agents
Harden Repo for Coding Agents
Core principle: make the repository legible to a stateless, context-bound LLM that
must rediscover the project every session. Four named moves recur across every surface: progressive
disclosure — on-demand beats on-trigger beats always-loaded, because token budget is
the dominant scarcity (W6); hard gates beat soft prose — a hook holds at 100%, an
instruction sentence at ~70% (W3); hand-curate, never /init — autogenerated
instruction files drop task success ~3% and inflate cost >20% (W9); and
defense-in-depth — harness hook, CI branch protection, and sandbox compose; none
alone suffices (W10). W2–W10 live in references/empirical-warnings.md.
Run to completion from the request and the repo, stating assumptions in the output. Ask only on genuine blockers — chiefly, which harnesses the team uses when neither the request nor the repo says and the work emits per-harness output.
Out of scope (capabilities, not files): promoting observed agent failures into durable rules from a failure log, and designing or operating an LLM product's eval loops.