بنقرة واحدة
refactor
Use when updating requirements, design, or tasks after implementation learnings.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when updating requirements, design, or tasks after implementation learnings.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when a spec has tasks.md and should enter autonomous task execution.
Use when starting curdx-flow, creating a spec, resuming work, or routing intent.
Use when handling curdx-flow flags, state files, delegation, execution loops, or skill entrypoint rules.
Use when curdx-flow needs user decisions after codebase facts are discovered.
Use when a spec has design.md and needs implementation tasks.
Use when showing curdx-flow slash skills, options, workflow, or troubleshooting.
| name | refactor |
| description | Use when updating requirements, design, or tasks after implementation learnings. |
| argument-hint | [spec-name] [--file=requirements|design|tasks] |
| allowed-tools | Read Write Edit Agent Bash AskUserQuestion |
| disable-model-invocation | true |
Update specification files after execution. You are a coordinator, not a writer -- delegate actual updates to the refactor-specialist subagent.
Complete these coordination steps in order; do not create user-facing implementation tasks from this checklist:
curdx-flow specs resolve "$ARGUMENTS"curdx-flow specs resolvepath/fsPath as the resolved spec directory and check it exists.curdx-state.json if existsrequirements.md, design.md, tasks.md.progress.md to understand implementation learningsCheck $ARGUMENTS for --file= flag:
--file=requirements: Only requirements.md--file=design: Only design.md--file=tasks: Only tasks.mdPresent overview to user:
Spec: $spec
Files to review:
- requirements.md: [exists/missing] - [brief summary: X user stories, Y requirements]
- design.md: [exists/missing] - [brief summary: X components, Y decisions]
- tasks.md: [exists/missing] - [brief summary: X tasks, Y completed]
Implementation learnings from .progress.md:
- [Key learning 1]
- [Key learning 2]
Process files in order: requirements -> design -> tasks. For each file in scope:
Use AskUserQuestion: "Do you want to update [filename]?" with options:
If "Skip", move to next file.
For each major section in the file, use AskUserQuestion to determine if it needs changes:
Requirements sections: Goal, User Stories (keep/add/modify/remove), Functional Requirements, Non-Functional Requirements, Out of Scope, Dependencies, Success Criteria.
Design sections: Architecture overview (keep/update diagram/major restructure), Components (keep/add/modify/remove), Data Flow, Technical Decisions, File Structure, Interfaces, Error Handling, Test Strategy.
Tasks sections: Completed tasks (all good/some need rework), New tasks (none/add), Phase Structure, Task Dependencies, Verification Steps.
For sections marked for update, ask: "What specific changes for [section]?" with options:
Include in prompt:
.progress.md learningsSpecialist reports: REFACTOR_COMPLETE: [filename] and CASCADE_NEEDED: [downstream files] with reasons.
After specialist completes, check for CASCADE_NEEDED:
If requirements changed and cascade includes design: Ask user "Requirements changed. Update design.md to match?" (Yes / Skip / Regenerate)
If design changed and cascade includes tasks: Ask user "Design changed. Update tasks.md to match?" (Yes / Skip / Regenerate)
If "Regenerate" selected, delegate to the original agent (architect-reviewer for design, task-planner for tasks) instead of refactor-specialist.
.curdx-state.json via curdx-flow state merge with '{"completed":false,"awaitingApproval":true,"$unset":["completedAt"]}' (per design §11) -- keep existing phase, reset taskIndex to 0 if tasks modified.progress.mdRead commitSpec from .curdx-state.json. If true:
git add ./specs/$spec/
git commit -m "spec($spec): refactor specifications"
git push -u origin $(git branch --show-current)
If commit or push fails, display warning but continue.
Refactoring complete for '$spec'.
Updated files:
- [list of files updated with brief change summary]
Cascade updates:
- [any cascade updates made]
[If commitSpec: "Changes committed and pushed."]
Next steps:
- Review updated spec files
- Run /curdx-flow:implement to continue execution (if tasks were modified)