Engineering
Claude Code Repo Readiness
Make the repo legible to agents before asking them to do real work.
Use when
You are about to let a coding agent do meaningful work in a repo and want fewer dumb mistakes.
Cadence
Before major agent work
Verification
Repo has agent instructions, documented commands, architecture notes, risk areas, and a docs/loops scaffold.
Structured loop spec
| Field | Value |
|---|---|
| Name | Claude Code Repo Readiness |
| Category | Engineering |
| Trigger | Before major agent work |
| Objective | Make the repo legible to agents before asking them to do real work. |
| Allowed inputs | Relevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop |
| Allowed actions | Inventory current README, AGENTS.md or CLAUDE.md, scripts, tests, and architecture docs.; Add missing install, dev, test, lint, typecheck, build, and e2e commands.; Document product goal, architecture, standards, protected areas, and review rules.; Create docs/loops/ for state, progress, and done contracts. |
| Verification | Repo has agent instructions, documented commands, architecture notes, risk areas, and a docs/loops scaffold. |
| Stop condition | Stop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required. |
| Budget | Set a time, turn, token, retry, file, or dollar cap before running the loop. |
| Approval boundary | Human approval required before public, destructive, financial, legal, account, or production-impacting actions. |
| Safe output | Pull request, patch, report, or evidence log |
| Works with | Claude Code, OpenAI Codex, Cursor, Gemini CLI, any tool-using coding agent |
Steps
- Inventory current README, AGENTS.md or CLAUDE.md, scripts, tests, and architecture docs.
- Add missing install, dev, test, lint, typecheck, build, and e2e commands.
- Document product goal, architecture, standards, protected areas, and review rules.
- Create docs/loops/ for state, progress, and done contracts.
Prompt
Prepare this repository for agentic coding work. Add or update repo instructions, command references, architecture overview, risk areas, PR/review standards, and a docs/loops scaffold. Verify commands where practical and return the patch with readiness evidence.Run in Claude Code
Paste this into Claude Code (or any tool-using agent) to run the loop bounded: one change per round, the same verification every round, durable state files, and explicit stop conditions.
Run the "Claude Code Repo Readiness" loop from AI Loop Library (https://ailooplibrary.com/loops/claude-code-repo-readiness/) as a bounded loop.
Goal: Make the repo legible to agents before asking them to do real work.
Rules: one change per round; run the same verification every round (Repo has agent instructions, documented commands, architecture notes, risk areas, and a docs/loops scaffold.); append each round to docs/loops/claude-code-repo-readiness/progress.md and update docs/loops/claude-code-repo-readiness/state.json; stop on verifier pass, 8 rounds, 3 consecutive failed verifications, no progress, a blocker, or anything needing human approval (money, production, outbound, deletion). Finish with a proof report: rounds used, changes made, verification output, remaining risk, and the next human decision.