Have two coding agents build a feature together: one leads and plans, the other builds, and they review each other's pull requests through a shared chat log file: AI agent prompt
Dave Martin (@itsdavemartin) described on X (Oct 23, 2026) how he builds with Claude and Codex together: Codex first turns his brief into a clickable HTML mockup, then Claude takes the lead, writes Linear issues and a plan, and the two agents coordinate through a /planning folder holding one markdown chat log, a checkbox plan and a list of decisions. Each works in its own copy of the repo, opens small pull requests, and neither may merge its own. He reports a help center feature took 23 pull requests and 95 help docs, starting one afternoon and finishing the next morning, from three prompts and a few answers. This prompt sets up that hand-off for your own project.
CodingTwo-agent build and reviewadvancedThe prompt
I want two AI coding agents to build a feature together in my repo [repo/project]. Agent A is [e.g. Claude Code] and will be the lead; agent B is [e.g. Codex]. The feature: [describe what it should do, where it lives, and anything to copy]. Set this up: 1) create a git-ignored /planning folder with chat-log.md (each entry stamped with time, author and a verb like PLAN, REVIEW, ASK-ME or MERGE; nobody edits another agent's entry), plan.md with checkboxes, decisions.md listing choices made without me, and later.md for ideas to revisit, 2) before any code, turn the feature into small issues [in Linear/GitHub Issues] and split them between A and B, 3) each agent works in its own branch or worktree, opens small pull requests, and the other agent reviews them; neither merges its own, 4) stop and write ASK-ME in the log for anything needing a human: product choices, user-facing wording, and every push to production, and 5) when done, run end-to-end tests, fix what fails, and give me a summary of pull requests, decisions and open questions. Post the opening plan in chat-log.md and wait for my go-ahead.
How to use it
- Copy the prompt above.
- Replace every [bracket] with your own details (or fill in the blanks on AgentPlaybook Real Estate, which remembers your answers for the next prompt).
- Paste it into Claude Code, Codex, Linear and review the answer before you use it.
Works with: Claude Code, Codex, Linear, GitHub
Real-world example: x.com/itsdavemartin/status/2113579861490983262
Featured in: AI prompts to summarize meetings, notes, documents and reports · AI prompts for writing SOPs, reports, policies and checklists
Before you use it: what to check
Check yourself
- This prompt works on text other people wrote (emails, reviews, messages or web pages). That text can hide instructions aimed at AI, such as "ignore your rules and…". Paste it as material to work on, and never let the AI act on requests inside it, like paying, sharing logins or changing records. How prompt injection works →
- Read and edit the draft before it reaches a customer or goes public. If you later automate this prompt, start with "draft and notify me", not "send automatically".
- Check names, dates, numbers and any claim against your own source material before you use the answer. AI can misread or invent details.
Using an AI agent? Download this prompt as a SKILL.md agent skill with these checks built in, or get the .zip for Claude.ai. How to install skills.
Want to make this prompt even better? Grade it with the free prompt grader or build your own with the AI prompt generator.
32 copy-paste agent prompts (PDF) plus 5 new prompts every week.
Get it free