plan-critique
Critique the user's plan from plan.md
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Critique the user's plan from plan.md
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Create a new plan folder with a plan.md template
Archive a completed or abandoned plan for future reference. Use when the user runs /plan-archive or asks to archive a finished plan.
Create 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.
Critique 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.
Execute 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.
Execute the user's plan that has been iteratively refined
| name | plan:critique |
| allowed-tools | Read, Glob, Grep, Write, Edit, AskUserQuestion, LSP, mcp__ide__getDiagnostics, Bash(git status:*), Bash(git log:*), Bash(git diff:*), Bash(echo $PPID), Bash(kill -0:*), Bash(rm:*), Bash(mkdir:*) |
| description | Critique the user's plan from plan.md |
| disable-model-invocation | true |
| model | opus |
| effort | high |
You are performing an iterative review of the user's execution plan. Critique the plan, code, architecture, system design, and design patterns.
Fixed rules:
Read the working agreement at working-agreement.md before step 1 and follow it for
the whole run. If that path does not resolve, look for working-agreement.md in the project root, then in
.gemini/. If it cannot be found anywhere, 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:
file:line reference, a command output, or a failing test. Never assert
a plausible but unverified conclusion, and never present a guess as a fact.plan.md during this phase. This phase writes critique.md only. The user
decides what moves into the plan.To do this, follow these steps precisely:
Read .claude/plan-critique-config.json, get plansFolder path from settings. If the file doesn't exist or
plansFolder is not set: Respond with "No plans folder configured. Run /plan:create first to set up."
Get the Claude Code process ID by running: echo $PPID. Store this as sessionPID.
Clean up stale sessions: Scan [plansFolder]/.sessions/ for files. For each file named with a PID, check if that
process is still running via kill -0 [PID] 2>/dev/null. If the command fails (process not running), delete that
session file. This is non-blocking cleanup.
Read the current session's plan from [plansFolder]/.sessions/[sessionPID] if it exists. Store as sessionPlan.
Scan [plansFolder]/ for subdirectories (each subdirectory is a plan). Exclude archived/ and .sessions/
folders and any files, only list plan directories.
If no plan folders exist: Respond with "No plans found. Create one with /plan:create".
Select the plan to critique:
sessionPlan exists and matches a plan folder, auto-select it. Inform the user:
"Using current session plan: [sessionPlan]"Available plans:
1. add-user-authentication
2. refactor-database-layer
3. implement-caching
Which plan would you like to critique? [1-3]
Update the session file [plansFolder]/.sessions/[sessionPID] with the selected plan slug (create if needed).
Read the plan file at [plansFolder]/[selected-plan]/plan.md
Check for errors:
plan.md is empty: Respond with "Plan file is empty. Edit [plansFolder]/[selected-plan]/plan.md"CLAUDE.md does not exist in project root: Respond with "Create a CLAUDE.md file in the root of your project."Detect project languages and check for LSP support:
tsconfig.json, *.ts, or *.tsx files in the projectcomposer.json or *.php files in the projecttypescript-lsp plugin (claude-plugins-official). Check with the /plugins command."php-lsp plugin (claude-plugins-official). Check with the /plugins command."Read the existing "Iteration: [number]" at [plansFolder]/[selected-plan]/critique.md (if it exists) and
determine the current iteration number. If no critique exists, this is iteration 1.
If the plan references files that are in the [plansFolder]/[selected-plan]/ folder, review those as well and
add them to the context of the critique.
Perform a thorough critique of the plan considering:
CLAUDE.md project standards?Evaluate whether the plan can be split into independent tasks. If the plan contains multiple features or changes that can be executed separately, strongly recommend splitting it into separate plans. Why this matters:
Example: A plan with "Add user authentication", "Refactor database layer", and "Add caching" should be split into three separate plans if these can be implemented independently.
When suggesting a split, be specific about which sections should become their own plan.
Write the critique to [plansFolder]/[selected-plan]/critique.md.
When writing the critique, follow the original chapters from plan.md.
The goal is to be able to easily override the plan.md if the user chooses to merge critique.md with plan.md
Use the format in critique-format.md.
Notes:
CLAUDE.md, The README.md file, dependencies (package.json, requirements.txt, etc.), git state if relevant, whether referenced files/APIs actually exist, supporting files in the plan folder.plan.md file and reference those, so that the user can easily find what text to replace/update.class, interface, type, or struct definitionsfunction/def/fn declarations in the target filemcp__ide__getDiagnostics to pull current errors/warnings from the IDE for files referenced in the plan