ワンクリックで
replan
Revise an existing feature plan after review findings, implementation issues, or manual edits while preserving plan history.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Revise an existing feature plan after review findings, implementation issues, or manual edits while preserving plan history.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Audit a feature implementation against its approved plan and implementation report, then produce the architect verdict and follow-up direction.
Create a feature document covering business context and initial architecture for a new feature using the PM and Architect workflow.
Execute a review-approved feature plan and produce or refine the implementation report for that feature.
Orchestrate the full feature workflow loop by detecting artifact state and routing through review, implementation, audit, and follow-up steps.
Create or update a feature implementation plan with concrete steps, risks, and acceptance criteria for the Architect workflow.
Run feature research with document pre-search and produce a context document covering options, best practices, and third-party findings.
| name | replan |
| description | Revise an existing feature plan after review findings, implementation issues, or manual edits while preserving plan history. |
Purpose: Invoke the Architect to revise the plan of this feature using the review or implementation issues. Hermetic per feature; agent doc context = feature.
Choose any of the following:
/replan # No args: auto-detect from chat history
/replan feat-2026-01-123 # With FEATURE_ID: infer plan-slug from feature dir
/replan plan # Artifact ref: use current feature + assume review/implementation trigger
/replan R{n} # Review ref: load Review Round R{n} from current feature
/replan I{n} # Implementation ref: load Implementation Round I{n} from current feature
/replan A{n} # Audit ref: load Audit Round A{n} from current feature
/replan feat-2026-01-123 from R2 # Force entry point (rare; use only to override auto-detect)
When no args: auto-detect from chat — find most recent FEATURE_ID reference + most recent Review/Implementation round mentioned, or validate if already in feature context.
Artifact references:
plan = use review pass, implement round, or audit round from current feature (context should be clear from chat)R{n} = explicitly load Review Round nI{n} = explicitly load Implementation Round nA{n} = explicitly load Audit Round nWhen to use from: Only when auto-detect is wrong (rare). Use from R2 to force replan from Review Round 2, or from I3 for Implementation Round 3.
/replan — skill will infer context from chat or prompt you if ambiguous./replan plan (use current review/implement/audit), /replan R2 (specific review round), /replan I1 (specific implementation round), /replan A1 (specific audit round).## Plan revision log must use Manual in the Round column (see skill — Trigger 3: Manual edits (logging)).You are the Architect (architect.md) for revision. Doc context = this feature (feat doc + plans/).
CRITICAL — Execution context: Execute the replan work directly in the current context. You ARE the Architect — do the work yourself. Do NOT launch a subagent (Task tool, runSubagent, or equivalent) to perform the replan. Subagents are only used for follow-up steps (e.g. review after replan in loop/auto mode), never for the replan itself. This applies in both inline and loop modes — see workflow Subagent roles table: Architect (plan/replan) → Current context. Exception: after the revised plan exists on disk, you must launch a Validator subagent for workflow-doc validation (see Validation).
Parse the user's input using this order:
Extract FEATURE_ID from:
feat-2026-01-123)If unable to determine: Prompt user for FEATURE_ID before proceeding.
Extract trigger type from remaining args:
R{n} → Review Round (load from reports/{plan-slug}.review.md section ## {plan-slug} R{n})I{n} → Implementation Round (load from reports/{plan-slug}.implementation.md section ## Implementation Round I{n})A{n} → Audit Round (load from reports/{plan-slug}.audit.md section for audit round A{n})plan → Auto-detect review pass, latest implementation round, OR latest audit round (check which exists/is more recent)from {trigger} → Use this specific trigger (override auto-detect)Infer plan-slug from:
plans/ directory)Validate review/implementation/audit exists (HARD GATE — must read file before proceeding) only when the trigger is not Trigger 3:
reports/*.review.md / reports/*.implementation.md / reports/*.audit.md requirement).plan resolved to an R/I/A round): You MUST read the actual file (reports/{plan-slug}.review.md, reports/{plan-slug}.implementation.md, or reports/{plan-slug}.audit.md) and search for the exact section header. Do NOT assume it exists based on round numbers, chat history, or inference.R{n}: open reports/{plan-slug}.review.md, search for ## {plan-slug} R{n} section. If the section does not exist in the file → STOP immediately.I{n}: open reports/{plan-slug}.implementation.md, search for ## Implementation Round I{n} section. If the section does not exist → STOP immediately.A{n}: open reports/{plan-slug}.audit.md, search for audit round A{n}. If the section does not exist → STOP immediately./review, do NOT proceed with replan. Error message: "Cannot replan from R{n}: section ## {plan-slug} R{n} not found in reports/{plan-slug}.review.md. Run /review first to produce R{n}, then retry /replan R{n}." (adjust for I{n}/A{n} similarly).After input parsing, determine the trigger type for the replan:
R{n} or plan resolved to a review roundI{n} or plan resolved to an implementation roundA{n} or plan resolved to an audit round with verdict plan-fix or re-planProceed only after trigger is confirmed. For Trigger 1, Trigger 2, and Trigger 4, the trigger artifact must have been read from disk in step 4; if the file or section was not found, you must have already stopped. For Trigger 3 (Manual edits), step 4 is skipped — confirm plans/{plan-slug}.plan.md exists and the user’s edit intent is clear.
NEVER fall back to running a different command (e.g. /review) when the trigger artifact is missing. Report the error and stop.
Architecture Ambiguity Checkpoint (required before revising plan):
Pros, Cons, impact on risks/scope/complexityMandatory context load (before any analysis):
plans/{plan-slug}.plan.md — section ## Retrospective### v{N} — {round-ref} — {date})[risk] entries to anticipate likely problems in this roundMandatory open-concern sweep (before any edits) — skip when trigger is Trigger 3 (Manual edits); for Trigger 3, reconcile the user’s edits with the current plan (and linked contexts if needed) for internal consistency instead.
Summary of Concerns and any unchecked items in Addressed by ArchitectTrigger detection: Before starting, determine the trigger type:
Verdict:, CONCERN-*, BLOCKED)## Implementation Round I{n} or contains BLOCKER/PROBLEM entries from implementation reportA{n} or contains audit verdict plan-fix / re-planReview Analysis Process:
Critical: Architect is NOT required to accept all review findings. Architect must exercise professional judgment and may disagree with Reviewer's recommendations if they are invalid, out of scope, or contradict plan objectives.
Follow-up after replan — mode-dependent:
/review, and stop. The user decides when to run it./loop): Launch the Reviewer subagent (e.g. /review or Task tool with Reviewer role) in a separate context. Do not run /review or produce the review in this (Architect) context.Implementation Issues Analysis Process:
## Implementation Round I{n} section.Critical rules for implementation-driven replan:
Step Version Marker (required on every new or amended step):
### Step N: {title}
**Added**: v{N} ({round-ref}) ← for new steps
**Amended**: v{N} ({round-ref}) ← for amended steps (keep original text, add amendment note at end)
{round-ref} = I{n} for implementation-driven replan, R{n} for review-driven replan, A{n} for audit-driven replan, Manual for Trigger 3 (Manual edits)No automatic follow-up: Implementation-driven replan does NOT auto-trigger /review. The Architect decides whether a new review cycle is needed.
Use this trigger when /audit returns plan-fix or re-plan and points to audit round A{n}.
Audit Findings Analysis Process:
problems.md references from the referenced audit round.plan-fix: the implementation mostly followed the intended approach, but the plan has small specification errors or missing constraints.re-plan: the approach, scope, or architecture direction is wrong enough that a new review gate is needed.plan-fix, default to no immediate review unless the amendments change architecture, data contracts, or validation strategy materially.re-plan, require a new /review before the next /implement.Critical rules for audit-driven replan:
{round-ref} = A{n}.A{n}.A{n}. Keep the last real review round unless a new review completed.needs-fixes, do not replan by default; route to Developer refinement unless user explicitly asks for architecture changes.When the replan is Trigger 3: Manual edits (user applied edits to the plan and asked to merge / “agree with changes” / chat-driven revision without a formal R{n} or I{n} artifact):
## Plan revision log — Round column: You must write exactly Manual. This is the canonical token for this trigger (same name as in State Detection). Do not use chat, user, ad-hoc, direct, or other synonyms — they break traceability and reporting.## Retrospective (if you append a block): use ### v{N} — Manual — {date} so {round-ref} matches the revision log.(Manual) as {round-ref} on any Added or Amended steps in this cycle.Before generating revised plan: Get current date via date +%Y-%m-%d. Use this date for new Plan revision log entry.
Step structure: When adding or amending steps, use the full step structure in plan-format.md (Change, Where, Preconditions, Concrete outcome, Edge cases/errors, Validation, Tests to add when step requires new tests, API/types when step adds API or data format, Pattern/approach if relevant, Acceptance) so new or amended steps are implementable and reviewable.
Output: Full revised plan document (Markdown) only. Do not edit the review or implementation report files (Architect stays read-only on those). The plan output MUST include:
R{n} linkR{n} | I{n} | A{n} | Manual for Trigger 3 — see Trigger 3: Manual edits (logging)), date, list of steps added/amended (e.g. Step 9 amended, Step 12 added), 1-line summary of what changed and whyRetrospective section (append to plan after ## Plan revision log):
## Retrospective
### v{N} — {round-ref} — {date}
- [plan] {insight about plan structure, scope, or gaps}
- [codebase] {insight about codebase behavior or constraints}
- [process] {what complicated this replan}
- [risk] {newly identified risk for next round}
- [automation] {repeating operations observed by Reviewer or Developer that could be automated; suggest skill name/purpose if applicable}
### v{N} block is optional — write only if there are real discoveries[automation] notes from review and implementation rounds and synthesize them into actionable retrospective findings. These inform future skill creation and process optimization decisions.[plan], [codebase], [process], [risk], [automation]; add domain-specific labels when they make future synthesis clearerDecision Log section (optional, append to plan after ## Retrospective):
## Decision Log
- {context/condition}: {decision, correction, or preference}
{context/condition}: {decision, correction, or preference}User:Cross-reference update (after writing plan): For each context listed in ## Contexts, update that context file's ## Used by section to add a link back to this plan if not already present.
Inputs integration:
scripts/inputs.sh check <artifact> on the current plan and on each cited context, review, or implementation artifact that declares inputs:.STALE, MISSING, or INVALID, surface that raw result to the user before continuing. /replan still does not assign a global warn/block policy and must not hide or reinterpret the result.inputs: block, proceed normally and do not invent one for consumption.scripts/inputs.sh add <plan-file> <dep> [<dep>...].scripts/inputs.sh update <plan-file> only after the document already reflects the current source files.Validation (before completing):
plans/{plan-slug}.plan.md is updated on disk, launch a Validator subagent in a separate context. Use the handoff prompt in /validate skill § Validator subagent (delegation): absolute {ABS_PATH_TO_VALIDATE_SKILL} and absolute path to the plan file. Do not claim the plan matches the format contract until exit 0.
subagent_type="generalPurpose" or the same type your /loop skill uses for one-shot handoffs. Delegated body = only the filled handoff prompt from /validate skill § Validator subagent; do not paste revised plan text or review concern dumps — only validation instructions./review as next step## Navigation is updated with links to all new or amended steps## Retrospective block added to plan file for this replan cycle if discoveries exist (skip if nothing new was learned)YYYY-MM-DD (from date +%Y-%m-%d)## Contexts has this plan listed in its ## Used by section**Added** or **Amended** version marker## Plan revision log Round is exactly Manual (not chat or other labels); verify Last review round was not falsified; verify step markers use (Manual) where steps were added/amendedStructured response: Output structured response in chat using Architect Response Format A2. Plan Revision Response from response-formats.md. Copy the format template exactly — do NOT summarize or abbreviate. Every section including ## Next Steps is mandatory.
After the revised plan is saved in inline mode:
## Next Steps using separate **Actions** and **Copy to run elsewhere** blocks from Architect Response Format A2. Plan Revision Response**Active context** footer with explicit mode:
**Active context**: role: Architect · feat: {feat-id}|fixes · plan: {plan-slug} · mode: revise · skill: /replan/replan as a skill invocation on the same plan path; do not continue with free-form Architect discussion when this chooser action is selected/plan {path}, /replan {path}, and /review {path} snippets below the chooser in the copy block[r][p], rerun the /replan skill from the saved plan artifact and current chat context[p] or [r], do nothing further because the revised plan is already savedFindings / Issue Assessment (required in structured response):
Retrospective (optional in structured response AND saved to plan file only if discoveries exist):
The Architect reflects on what was learned or observed during this replan cycle. This content is both output in chat summary and appended to ## Retrospective in the plan file — only if there are real discoveries. If nothing new was learned, omit entirely from both.
### Retrospective
- [plan] {insight about plan structure, scope, or gaps that became apparent}
- [codebase] {insight about codebase behavior or constraints discovered while analyzing issues}
- [process] {what slowed down or complicated this replan — e.g. ambiguous evidence, missing context}
- [risk] {newly identified risk or unknown that should be watched in next implementation round}
Labels: [plan], [codebase], [process], [risk] — use whichever are relevant, skip others.
When revising from review, address BLOCKED and CONCERN-* first, but critically evaluate each one — you may reject invalid concerns.
Note: Do NOT add **Status**: field to Steps in plan. Steps are not yet implemented, so status is not applicable. Status will be added by /audit after successful audit.
Do not put brainstorm hints, review hints, or See also lines inside the active context footer itself.