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.

difficultyBeginner
categoryEngineering
sourcePaul-created

Cadence

Before major agent work

Verification

Repo has agent instructions, documented commands, architecture notes, risk areas, and a docs/loops scaffold.

Structured loop spec

FieldValue
NameClaude Code Repo Readiness
CategoryEngineering
TriggerBefore major agent work
ObjectiveMake the repo legible to agents before asking them to do real work.
Allowed inputsRelevant files, source notes, logs, tests, screenshots, metrics, or task state for this loop
Allowed actionsInventory 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.
VerificationRepo has agent instructions, documented commands, architecture notes, risk areas, and a docs/loops scaffold.
Stop conditionStop when the verifier passes, the budget is exhausted, no progress is made, a blocker appears, or approval is required.
BudgetSet a time, turn, token, retry, file, or dollar cap before running the loop.
Approval boundaryHuman approval required before public, destructive, financial, legal, account, or production-impacting actions.
Safe outputPull request, patch, report, or evidence log
Works withClaude Code, OpenAI Codex, Cursor, Gemini CLI, any tool-using coding agent

Steps

  1. Inventory current README, AGENTS.md or CLAUDE.md, scripts, tests, and architecture docs.
  2. Add missing install, dev, test, lint, typecheck, build, and e2e commands.
  3. Document product goal, architecture, standards, protected areas, and review rules.
  4. 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.

Get the MCP server + agent pack

Tags

Claude Coderepo setupdocsagent harness

Related loops

Browse all 68 loops