/peer-planning:makefrom peer-planning
Create an implementation plan in docs/plans/ whose tasks are coarse, outcome-level slices meant for capable executors that find the details themselves, argued with Codex in the adjacent agterm pane before it is written and checked by Codex after, following the project's .claude/planning-rules.md. Use it whenever the user asks for a peer-planning:make plan, a plan for /peer-planning:exec, a peer-validated plan, a less granular plan, or a plan "for high-effort models", and whenever a plan will be executed with Codex paired in the adjacent pane, even if they only say "plan this".
Ships in peer-planning. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The plan this skill writes is executed by /peer-planning:exec. There, a subagent implements each
task (Opus at medium by default) and Codex reviews the diff before the commit. A task the plan marks
for discussion has its approach agreed with Codex before any code. The executor is capable and finds
details itself, so each task states the outcome, the constraints and the proof that it is done, not
the steps. The planner's job moves up a level: settle the decisions an
executor must not re-open, and cut the work into slices that can each be reviewed on their own.
Codex takes part in planning too. Before anything is written, the planner and Codex argue the problem and the approach, and the user picks from what survives. After the draft, Codex checks that the plan says what was settled. A plan made without Codex says so in its header.
bash ${CLAUDE_PLUGIN_ROOT}/scripts/resolve-rules.sh
It prints the project's .claude/planning-rules.md, with a first line naming it, or nothing when
the project has none. Treat the content as binding project convention for the plan's structure,
naming, testing and documentation. It supplements this skill, and where it contradicts this
skill, the rules win: they are the project's own.
If the project has a workflow document (docs/development-workflow.md or one the root agent doc
names), read its planning stage before drafting. It says which gates and review rounds a plan
passes through here.
Codex runs in the right pane of this agterm split. This session is the planner and the only writer; Codex is read-only in the repository.
~/.agents/AGENTS.md applies to every
exchange. One question at a time. The planner states its position, the minimal option it was
priced against and the code behind it; Codex agrees or refutes with a cite. There is no turn
limit: an exchange goes on while each turn brings something new (a refutation, a cite, a checked
fact or a changed position), and a turn that only restates the one before it ends it. An addition
names the failure it prevents, the input that produces it, whether that input is realistic, and
what breaks without it, or it is refused.mailbox-chat skill; its sending, waiting and manners rules apply to every
message. references/codex-messages.md has the messages. After each one, end the turn: Codex's
reply wakes this session. Verify every claim Codex makes about the code with your own tool call
before accepting or disputing it.RUN_DIR is .peer-planning/<plan-stem>/ at the root of this checkout, the same
directory exec uses for the run. Create RUN_DIR/msgs/; if git check-ignore -q "$RUN_DIR"
fails, append /.peer-planning/ to
$(git rev-parse --path-format=absolute --git-common-dir)/info/exclude and tell the user. Name
files NNN-claude-plan.md, NNN-codex-plan.md and, for the one Fable call, NNN-fable-plan.md,
numbered from 001; 000 is exec's setup
check. Never create progress.md there: exec reads it as a run to resume. The plan must read
whole without these files.${CLAUDE_PLUGIN_ROOT}/skills/exec/scripts/reviewer-seat.py, as
${CLAUDE_PLUGIN_ROOT}/skills/exec/references/reviewer-seat.md says. When it says switch, run
codex-clear.sh with the seat's --model and --reasoning once, before the first message. When
Codex is unavailable, the same reference makes the second voice an Opus subagent; that is a
second model family, so it needs no waiver. The plan header names the model that held the seat.bash ${CLAUDE_PLUGIN_ROOT}/skills/exec/scripts/codex-clear.sh --check. It reads the right pane
without typing and exits 0 only when Codex is idle with an empty composer and registered for
mail. If it fails, say what it reported and offer a numbered choice: start Codex in the right
pane and say go, or plan without a peer. This skill never starts an agent or opens a pane.With --night before the argument, this skill drafts a plan unattended for a scheduled job:
Codex is argued through a resumable codex exec thread instead of the pane, questions for the user
are written into the plan instead of asked, the review runs headless, and the plan is committed on
its night branch. references/night.md is the whole of it; read it first when --night is given.
Before any question that asks the user to rule (an approach, a size, a disagreement with Codex
that stalled, a scope call), run the decide:gate skill on it. It checks whether a recorded
ruling, a probe or a rule already answers it, sends a question about users through the persona
panel, checks the card's framing, and records the user's answer as a ruling when it is one. While
the gate is in shadow mode the question still reaches the user; only the judge's verdict is
logged. Inside a run its files go in RUN_DIR/gate/. A typed value or a bare go-ahead on a step
just described is not a ruling and skips the gate.
Build enough context to ask good questions, and no more:
git status and git log --oneline -5;Stop at about five files. The executor does the deep reading later. Summarize what you found in three to five bullets.
When the request names a docs/backlog/ item, it is the problem statement. Its where: is a
starting point; check that its condition still holds. Its worth: and rationale keep the
provenance they have: a later brings its open question, and a no an earlier call against the
work, which takes new evidence or the user's word to reopen. A worth: field is a triage call, not
an owner ruling, unless the item says the user ruled.
When the ask is missing who it serves, why, what success looks like or the binding constraint,
run the decide:interview-me skill if it is available. Its confirmed restate is this plan's
Overview. Otherwise ask the few questions you need one at a time, each with your recommended answer
attached, in the form the user's own instructions give for questions.
Before any draft, and before the user picks an approach, argue the problem with Codex.
docs/plans/
and tells Codex its Decisions are settled, so a plan cannot carry an open one.A path that looks single and clear still gets this step: that judgment is the planner's, and testing it is what Codex is for. A small change gets a short exchange, not none.
Fable is not a participant. It is one call per make run, for one question, when the pair is
stuck on a design issue: the stalled question in Step 1.5, or a point in Step 2.5 that reopens a
decision and stalls the same way. A stall over a value choice (scope, priority, what the user
wants) goes straight to the user, since Fable cannot answer it either.
second-opinion agent definition, from .claude/agents/
or ~/.claude/agents/. This plugin does not ship it. If neither has it, tell the user and take
the question to them as a plain stall.RUN_DIR/msgs/NNN-claude-plan.md: the problem, the binding
constraints, the stalled question, each side's position with its cites, why both of you think
the design is at fault, and the files to read. Ask for its view of the design, any approach the
pair did not name, and what it would refuse, priced on the same four questions as any addition.subagent_type: "second-opinion", telling it it is
read-only and should leave nothing behind. Save its final message as
RUN_DIR/msgs/NNN-fable-plan.md. Never continue it with SendMessage and never call it again in
this run: a challenged Fable claim is a fact you check with your own tool call.Name the file the way the rules say. When they are silent, use docs/plans/yyyy-mm-dd-<task-name>.md
with today's date. Build it from references/plan-template.md. Headings are
### Task N: with real integers, so other executors can run the same file.
A task is one coherent, reviewable change: a behavior slice that a capable model can build and verify in one session, which usually means one commit and a handful of files. Size it by review, not by step count. Split a task when its two halves would each deserve their own review, or when one half crosses a risky boundary alone: a migration, a lock order, a protocol or schema change, a visibility rule. Merge two tasks when neither can be reviewed without the other. A feature typically lands in three to eight implementation tasks, plus the closing tasks the rules require.
worth: was, the task whose commit lands the fix carries its git rm: the
backlog deletes an item in the commit that lands the fix, not in a separate cleanup.worker (Opus at high).yes only when the task crosses a risky boundary: a migration, a lock order, a
protocol or schema change, a visibility rule. Codex and the orchestrator then agree the approach
before any code. Leave the line out everywhere else; such a task goes straight to the
implementer, and Codex reviews the approach together with the diff. Planning having argued the
task does not remove the mark: exec's discussion checks a sketch against the checkout as it
stands then, after the earlier tasks.Never write exec's **Agreed approach (Claude and Codex, <date>):** block under a task. exec writes
it after its own discussion, the implementer is told to follow it, and Codex's review skips judging
an approach marked agreed. A planning sketch under that label would pass unchecked. What planning
settled goes in Decisions.
Step-by-step instructions, code snippets, per-function test lists and exhaustive file inventories all go. Each is a guess the executor would have to unlearn. The implementer designs the approach against the real code, and Codex reviews it, or agrees it first on a task marked for discussion. What stays in the plan is what an executor cannot discover: why this, which alternatives were refused, and what must not break.
implementer agent definition (Opus at medium) unless
the plan names another definition, the validation commands and the whole-suite command, once.
Tasks refer to them rather than repeating them.Before the user approves the stories, run the persona panel's story read (decide:panel,
"Reading stories") on the plan's ## Stories, unless the plan says "No actor observes a change".
Its files go in .peer-planning/panels/<plan-stem>-stories/ at the checkout root, since the run
directory does not exist yet. When the user approves the stories, put the flagged ones first, each
with the persona answers that flagged it quoted beside it; the others follow as already read. A
flag is a reason to look, not a verdict: the user may keep a flagged story as written.
Send the draft-read request. Codex checks that the plan says what was settled, not the decisions over again: every Decision reaches the Constraints or Done when of each task it binds, the tasks fit together and each can be reviewed alone, and each Done when is evidence an executor can produce. A point that reopens a decision is argued as one question under the Step 1.5 rules, including the one Fable call if it has not been used, not as a new round over the whole plan. Fix the plan for every point you accept. The read ends when Codex has no point left, or when a point stalls, which goes to the user as in Step 1.5; close it with "nothing further".
Codex helped settle the Decisions, so this read is not the independent one. That is the project's review, next.
If the project ships plan checkers, run them now and fix the plan until each is clean. In this
user's main repository those are python scripts/check_plan.py <plan> and
python scripts/check_stories.py --form <plan>. A name the plan introduces comes back as
unresolved; confirm it is new rather than a typo.
Then run the review the project's workflow prescribes for a plan. Where the project reviews with
revmux (it has a .revmux/ directory), that is one round on the profile its workflow names for
plans (expert here), through the revmux:revmux skill, with the plan file as the subject and no
round-local profile.md. Fix what comes back. A confirming round is only for fixes that changed a
contract, and it runs on the narrower profile the workflow names (final here). Never run a
second planning round on the same profile.
When a finding overturns a pair-settled decision, take that one question back to Codex, and record the outcome with its new provenance. Do not rerun the whole discussion.
Offer execution only when no question is open. Tell the user the plan's path, then offer, as a numbered list:
/clear, then /peer-planning:exec <plan>. Started here,
the run would carry this planning context and pay for it on every call. /clear keeps this
agterm session, so Codex stays in the pane next to it, and removes any /goal, which exec
refuses to run under. Codex's pane needs no /clear: exec clears Codex itself before a new
run's first task, so the planning argument does not reach the first review.Commit the plan only when the user asks. Where it lands, on the feature branch or elsewhere, is the project's convention; follow its rules.
.claude/planning-rules.md. Other planning tools may read it too
(/planning:make does), so say that before editing it.This skill never edits its own files. A change to how it plans is a request to the user, not something to do mid-plan.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub pysilver/cc-tools --plugin peer-planning2 skills in this plugin