Claude Code plans, CodeAF builds
Claude Code plans and reviews, and CodeAF's crew writes the implementation.
Plan in one place, build with a crew, review before you keep it.
- an aging report by brief
- a migration handed to the crew
- a refactor reviewed after landing
Claude Code reads a codebase and writes a brief that leaves nothing open. CodeAF runs a crew that writes the code and reports in JSON. One rule in a CLAUDE.md file joins them: Claude Code plans, reviews and fixes by brief, never editing a code file itself.
Steps
Put this CLAUDE.md in the repository root:
You are the architect here. Plan the change, then hand the implementation to CodeAF:
codeaf do "<a precise brief: what to build, which files, what done means>" --json
Read `.ok`, `.answer` and `.files` from the JSON. Treat any exit code but 0 as not done.
Then review the diff yourself and run `python3 -m unittest`. If something is wrong, send
CodeAF one more brief that says exactly what to fix. Do not write the code yourself.
- From the repository, ask for the feature:
claude -p "Add an aging report: python3 -m invoices aging --today 2026-09-27 prints each customer's unpaid total split into 0-30, 31-60, 61-90 and 90+ days since issue, biggest total first, with a --csv flag for the same table as CSV. Follow CLAUDE.md."- Claude Code reads the code and data, works out the expected totals by hand, and runs one
codeaf do: the files, bucket edges, sort order,Decimalthroughout, andDone means: python3 -m unittest passes. - Read the JSON:
"ok": true,"stop": "done","seconds": 85.2. - Claude Code reviews the diff and the report. If something is wrong, it sends one more brief saying exactly what to fix.
What you see
The review finds one bug: the text table misaligns when a customer name is longer than 8 characters. Claude Code sends a fix brief, CodeAF answers True Fixed aging text-table alignment and adds a test. The report prints:
customer 0-30 31-60 61-90 90+ total
acme 0.00 75.25 980.00 0.00 1055.25
initech 640.00 0.00 0.00 0.00 640.00
globex 0.00 120.00 0.00 450.50 570.50
In our run
3m34s end to end, 7 turns. CodeAF billed $0.20 for both do runs; Claude Code's own side reported $0.38. Claude Code never edited a code file itself.
Make it yours
- Write the rule down. The
CLAUDE.mdis the whole contract. Claude Code delegates because the file told it to. - Review is part of the job. The architect that reviews the diff catches what the crew missed.
- Let it run the command. Claude Code needs permission to run
codeafin a shell. Allow it when it asks, or add it to your allowed commands. The samecodeaf do --jsonline works from any agent or script that runs a shell: see Headless mode.
Go further
Headless mode: Hand CodeAF one job from a script, a CI job, a cron line or another agent, and get back one JSON object and an exit code.
Coming soon: describe the org you want and CodeAF builds it: teams, managers, budgets, standing orders.