/plan:plan-cycle [plan name]from Plan & Critique
Drafts, critiques, and merges a plan in one loop, then stops for user approval. Use for structured planning without executing code.
Ships in Plan & Critique. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
On Codex, invoke skills with $skill-name (for example, $plan-create). Use that form when giving Codex
commands; other clients use /skill-name.
You are running the whole planning loop in one pass: research the codebase, draft the plan only when the user has not written one, critique it, merge the findings, repeat, then stop and wait for approval.
This skill never executes the plan. It ends at the approval gate.
Fixed rules:
Read the working agreement at working-agreement.md before step 1 and follow it for the whole run. If it cannot be found, tell the user it is missing and apply the rules listed below.
These rules bind this phase and override any step below that conflicts with them:
plan.md, a critique.md and a cycle-log.md and nothing else. The user approves before
anything is built.plan.md only when it is empty or still the unedited template. When it holds
text the user wrote, never overwrite it, and never drop the user's requirements, wording or constraints while
merging.plan.md on your own only when the change a finding asks for is obvious. Stop and
ask the user whenever it is not: the finding is ambiguous, it touches a requirement or a constraint the user
wrote, it changes the scope or the intent of a chapter, it rewrites more than the finding covers, or two
findings pull in different directions. Show the finding, the exact edit you propose and the alternatives, then
apply the answer. A doubt is a question, never a guess.file:line reference, a command output, or a failing test.plan.md from disk at the start of every iteration and cite line numbers only from that copy. Merging
shifts every line below the merge point, so numbers carried over from an earlier iteration are wrong.cycle-log.md, and
print the same summary after each iteration.## Summary or log start), stop on the first clean iteration; once at least one finding has been
merged, require two consecutive clean iterations before stopping early. Partition surfaced findings before
checking cleanliness: any finding matching an earlier Not merged entry with unchanged non-plan.md evidence
(or a repeat split recommendation, left for the user) is Previously decided, is not re-asked, and does not
reset cleanPasses. An iteration is clean when it has 0 new (non-Previously decided) CONFIRMED or
UNVERIFIED findings; any new finding (merged, asked, or skipped) resets cleanPasses to 0. Respond
"No new findings." and go to the approval gate.To do this, follow these steps precisely:
+-------------------------------------------------+
| Plan Critique v3.0.1 - Plan cycle |
+-------------------------------------------------+
plansFolder from config:
.codex/plan-critique-config.json for Codex,
.claude/plan-critique-config.json for Claude Code,
.gemini/plan-critique-config.json for Agy/Gemini, or .copilot/plan-critique-config.json for Copilot CLI),
falling back to the other agent configs.plansFolder is not set or is an empty string:
.planning):".
By default, the user should be presented with the option .planning.plansFolder in the active agent's config file.archived/ subfolder inside it.cycleIterations value from the resolved config file. It is the maximum number of critique
and merge iterations for this run. Default to 3 when missing, and clamp any value outside the range 1 to 5.COPILOT_AGENT_SESSION_ID is set): read COPILOT_AGENT_SESSION_ID via
echo $COPILOT_AGENT_SESSION_ID (macOS/Linux) or $env:COPILOT_AGENT_SESSION_ID (Windows); if empty, use the
literal value default. Store as sessionId.echo $PPID and store as sessionId.[plansFolder]/.sessions/ (non-blocking, never abort because of cleanup):
kill -0 [PID] 2>/dev/null and delete if the process is no longer running.default or UUIDs), delete files not modified in the last 7 days.[plansFolder]/.sessions/[sessionId] if it exists. Store as sessionPlan.[plansFolder]/ for subdirectories (each subdirectory is a plan). Exclude archived/ and .sessions/
folders and any files, only list plan directories.$ARGUMENTS or the invoking prompt text is a slug that matches an existing plan folder, select that plan.$ARGUMENTS or the invoking prompt text is not empty, treat it as the name of a new plan and create it
by following the plan naming and folder creation steps of ../plan-create/SKILL.md:
the slug rules, the name collision check, the folder creation and the plan.md template from
plan-template.md. Do not display the create banner.sessionPlan exists and matches a plan folder, auto-select it and inform the user:
"Using current session plan: [sessionPlan]"[plansFolder]/.sessions/[sessionId] with the selected plan slug (create if needed).[plansFolder]/[selected-plan]/plan.md and classify it:
$ARGUMENTS or the invoking prompt text as the goal when it describes what to build.AGENTS.md for Codex, GEMINI.md for Agy,
.github/copilot-instructions.md for Copilot, or CLAUDE.md for Claude Code. Fall back to AGENTS.md then
CLAUDE.md, and read the result alongside README.md and the files the goal touches.[plansFolder]/[selected-plan]/plan.md using plan-template.md: one
numbered chapter per unit of work, in dependency order, each with its own Affected files and
Verification sections. Every chapter names the test to write or the command to run.plan.md is empty after step 12: respond with "Plan file is empty. Edit
[plansFolder]/[selected-plan]/plan.md" and stop.AGENTS.md, CLAUDE.md, GEMINI.md, or
.github/copilot-instructions.md): respond with "Create a project instructions file in the root of your
project." and stop.hasMerged = false and cleanPasses = 0 from
[plansFolder]/[selected-plan]/cycle-log.md:
cycle-log.md does not exist, or its last ## Summary follows the final iteration entry and stopped
with no new findings or two consecutive clean passes: keep hasMerged = false and cleanPasses = 0.## Summary stopped with iteration limit reached, or if trailing iteration entries have no
following ## Summary (an interrupted run): scan back to the last converged ## Summary (no new findings
or two consecutive clean passes) or log start. Set hasMerged = true if any iteration in that segment
modified plan.md (Merged > 0 or an Asked entry whose Answer: starts with Applied:), and set
cleanPasses to the trailing consecutive clean iteration count (0 or 1).## Run [n] block in [plansFolder]/[selected-plan]/cycle-log.md with Started: [YYYY-MM-DD HH:MM:SS]
before iteration 1 of this run (creating # Plan Cycle Log: [Plan Title] and Plan drafted by: on Run 1,
and incrementing [n] from the last ## Run on resumed runs).cycleIterations iterations or the stop condition below triggers:
plan.md from disk.plan.md binds
the critique step only, because merging is a separate step below.[plansFolder]/[selected-plan]/critique.md using
critique-format.md, with the iteration number incremented from the
previous critique.Not merged entries in cycle-log.md using chapter title
plus finding target/summary as the match key (ignoring shifting plan.md line numbers when checking
whether non-plan.md evidence is unchanged). Also match any repeat split recommendation, left for the user already logged under Not merged.Previously decided: do not re-ask them, do not re-count them in
Not merged or Open items, and log them under Previously decided instead.CONFIRMED and UNVERIFIED):
0 new CONFIRMED and 0 new UNVERIFIED findings):
hasMerged is true, increment cleanPasses by 1.CONFIRMED or UNVERIFIED findings, whether merged, asked, or skipped):
cleanPasses = 0 and merge the new findings into plan.md:
[plansFolder]/[selected-plan]/cycle-log.md
for all changes recorded as merged anywhere in the selected plan's log across all runs (both
Merged entries and Asked entries whose Answer: starts with Applied:), not only in the
immediately preceding iteration. When an Asked entry with Answer: Applied: explicitly approved
reversing an earlier merge, that decision supersedes the earlier entry so subsequent checks compare
against the latest decision rather than re-flagging the old merge. If applying a finding would
undo, revert, or contradict an active earlier decision, do not auto-merge it. Surface it to the
user instead per fixed rule 3, showing the earlier change, the new finding, and the options. Record
the surfaced finding under Asked, and if declined or left unapplied also record it under
Not merged with Reason: reverses an earlier merge, asked.Answer: in Asked entries starting with Applied: or Declined:, and include Evidence:
on every Not merged entry (file:line, command output, or "missing").Verification section
and confirm it passes on the current tree and can fail, and check every path and line number the edit
introduces. Do not carry a line range or an index from the critique into the plan when the chapter
will change the lines it points at: anchor to a heading, a fence or a symbol instead. When the edit
does not survive this check, ask the user rather than merging it.Affected files and Verification sections in every chapter.Not merged with Reason: split recommendation, left for the user as an open item for the approval
gate.plan.md in this iteration (auto-merged or applied from the
user's answer), set hasMerged = true.[plansFolder]/[selected-plan]/cycle-log.md using
cycle-log-format.md, and print the same merged and skipped summary to the user.hasMerged is false or cleanPasses >= 2): record exit reason
(no new findings when hasMerged is false, or two consecutive clean passes when
cleanPasses >= 2, taking precedence over iteration limit reached if on the final iteration), respond
with "No new findings." and leave the loop.hasMerged is true and cleanPasses is 1: inform the user that one
clean pass is complete and one more consecutive clean pass is needed, then continue if cycleIterations
allows (otherwise record iteration limit reached).## Summary at the end of the current ## Run [n] block on loop exit, using Stopped because
(no new findings, two consecutive clean passes, or iteration limit reached), current-run Iterations run
and Questions asked, and Open items counting deduplicated Not merged entries across all unfinished or
active runs.plan.md in full, followed by the open items: every deduplicated skipped finding and split
recommendation recorded under Not merged across all unfinished or active runs.[N], Merged, Asked about, and Not merged scoped to the
current run):
Cycle complete after [N] iteration(s): [plansFolder]/[selected-plan]/plan.md
Merged: [X] findings. Asked about: [Z]. Not merged: [Y], listed in cycle-log.md.
Nothing has been executed and no project code was changed.
Review the plan. When you approve it, run `/plan-execute`.
Notes:
/plan-execute, which carries its own rules, its own confirmation and its own execution log.cycleIterations of 1 or 2 hits the iteration limit unless a
prior run left cleanPasses = 1, and 4 or 5 is needed to stop before the cap). Set cycleIterations to 1 or 2
in your config file for small plans.model frontmatter, select a high-capability model with /model.plan.md and from the
iteration number recorded in critique.md.critique.md holds the latest iteration only, because each critique overwrites it. cycle-log.md holds the
history of what was merged and what was skipped./plan-create,
/plan-critique, /plan-execute and /plan-archive. The cycle is a shortcut through the first two, not a
separate workflow.What SKILL.md sets; muted values are Claude Code's defaults
opushighThree short reads, in order
npx claudepluginhub serbanghita/plan-critique-skills --plugin plan5 skills in this plugin
/plan-archiveArchive a completed or abandoned plan for future reference. Use when the user runs /plan-archive or asks to archive a finished plan./plan-createCreate a new plan folder with a plan.md template. Use when the user asks to start, create or open a new plan, or runs /plan-create./plan-critiqueCritique the user's plan from plan.md and write critique.md. Use when the user runs /plan-critique or asks for an adversarial review of an existing plan./plan-executeExecute the user's plan that has been iteratively refined, step by step, with resume on failure. Use when the user runs /plan-execute or asks to execute an existing plan.Other plugins' skills for the same job