[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71KD2SF4DQRYWTKR9V18004":3,"skill-same:01M71KD2SF4DQRYWTKR9V18004":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":34,"publishedAt":51,"linkOnly":52,"markdownContent":53,"markdownBody":54,"frontMatter":55,"refName":59,"commitSha":60,"skillDirectory":61,"forksCount":62,"repositoryHtmlUrl":63,"repositoryHomepageUrl":64,"ownerHtmlUrl":65,"ownerBlogUrl":66,"ownerDescription":67,"updatedAt":68,"install":69,"resources":81},"01M71KD2SF4DQRYWTKR9V18004","refactor",null,"Use when updating requirements, design, or tasks after implementation learnings.","mugsun\u002Fcurdx-flow","mugsun","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F100790155?v=4","01M6KJSAN2W4WRPDFBKTJTDDQ2","Mugsun","01M71K65VJXA4C1KPJAHZ6ZVHC",4,"MIT","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fcurdx-flow\u002Fskills\u002Frefactor\u002FSKILL.md",[18,23,26,29],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":30,"categoryName":31,"taxonomyType":32,"taxonomyTypeDesc":33},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[5,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],"write","when","true","name","requirements","learnings","implementation","use","edit","design","read","Bash","file","tasks","edit agent","spec","2026-11-10 10:12:30",false,"---\nname: refactor\ndescription: Use when updating requirements, design, or tasks after implementation learnings.\nargument-hint: \"[spec-name] [--file=requirements|design|tasks]\"\nallowed-tools: \"Read Write Edit Agent Bash AskUserQuestion\"\ndisable-model-invocation: true\n---\n\n\n# Refactor Spec\n\nUpdate specification files after execution. You are a **coordinator, not a writer** -- delegate actual updates to the `refactor-specialist` subagent.\n\n## Coordinator Checklist\n\nComplete these coordination steps in order; do not create user-facing implementation tasks from this checklist:\n\n1. **Gather context** -- resolve spec, read existing files and learnings\n2. **Determine scope** -- which files to refactor (from --file flag or all)\n3. **File-by-file review** -- section-by-section review with user for each file\n4. **Delegate updates** -- dispatch refactor-specialist for each file\n5. **Handle cascades** -- propagate changes downstream if needed\n6. **Finalize** -- update state, commit\n\n## Step 1: Gather Context\n\n1. Resolve the target spec with the runtime CLI:\n   - With an argument: `curdx-flow specs resolve \"$ARGUMENTS\"`\n   - Without an argument: `curdx-flow specs resolve`\n2. If no active spec, error: \"No active spec. Run \u002Fcurdx-flow:new \u003Cname> first.\"\n3. Use the returned `path`\u002F`fsPath` as the resolved spec directory and check it exists\n4. Read `.curdx-state.json` if exists\n5. Identify which spec files exist: `requirements.md`, `design.md`, `tasks.md`\n6. If no spec files exist, error: \"No spec files found. Run \u002Fcurdx-flow:start first.\"\n7. Read `.progress.md` to understand implementation learnings\n\n## Step 2: Determine Scope & Present Overview\n\nCheck `$ARGUMENTS` for `--file=` flag:\n- `--file=requirements`: Only requirements.md\n- `--file=design`: Only design.md\n- `--file=tasks`: Only tasks.md\n- No flag: All files in order (requirements -> design -> tasks)\n\nPresent overview to user:\n```\nSpec: $spec\n\nFiles to review:\n- requirements.md: [exists\u002Fmissing] - [brief summary: X user stories, Y requirements]\n- design.md: [exists\u002Fmissing] - [brief summary: X components, Y decisions]\n- tasks.md: [exists\u002Fmissing] - [brief summary: X tasks, Y completed]\n\nImplementation learnings from .progress.md:\n- [Key learning 1]\n- [Key learning 2]\n```\n\n## Step 3: File-by-File Review\n\nProcess files in order: requirements -> design -> tasks. For each file in scope:\n\n### Ask About This File\n\nUse AskUserQuestion: \"Do you want to update [filename]?\" with options:\n- **Yes, review sections** -- go through section by section\n- **Skip this file** -- move to next\n- **Major rewrite needed** -- note for specialist\n\nIf \"Skip\", move to next file.\n\n### Section-by-Section Review\n\nFor each major section in the file, use AskUserQuestion to determine if it needs changes:\n\n**Requirements sections**: Goal, User Stories (keep\u002Fadd\u002Fmodify\u002Fremove), Functional Requirements, Non-Functional Requirements, Out of Scope, Dependencies, Success Criteria.\n\n**Design sections**: Architecture overview (keep\u002Fupdate diagram\u002Fmajor restructure), Components (keep\u002Fadd\u002Fmodify\u002Fremove), Data Flow, Technical Decisions, File Structure, Interfaces, Error Handling, Test Strategy.\n\n**Tasks sections**: Completed tasks (all good\u002Fsome need rework), New tasks (none\u002Fadd), Phase Structure, Task Dependencies, Verification Steps.\n\n### Gather Update Details\n\nFor sections marked for update, ask: \"What specific changes for [section]?\" with options:\n- **I'll describe changes** -- wait for text input\n- **Based on learnings** -- use implementation learnings to guide updates\n- **Remove outdated parts** -- clean up obsolete content\n\n## Step 4: Delegate to Specialist\n\n\u003Cmandatory>\nUse `Agent(agent_type: refactor-specialist)` for each file update.\n\nInclude in prompt:\n- Full current file content\n- Relevant `.progress.md` learnings\n- Sections to update with user's specific instructions\n- Guidelines: minimal focused changes, preserve valuable content, update cross-references\n\nSpecialist reports: `REFACTOR_COMPLETE: [filename]` and `CASCADE_NEEDED: [downstream files]` with reasons.\n\u003C\u002Fmandatory>\n\n## Step 5: Handle Cascade Updates\n\nAfter specialist completes, check for CASCADE_NEEDED:\n\n**If requirements changed** and cascade includes design: Ask user \"Requirements changed. Update design.md to match?\" (Yes \u002F Skip \u002F Regenerate)\n\n**If design changed** and cascade includes tasks: Ask user \"Design changed. Update tasks.md to match?\" (Yes \u002F Skip \u002F Regenerate)\n\nIf \"Regenerate\" selected, delegate to the original agent (architect-reviewer for design, task-planner for tasks) instead of refactor-specialist.\n\n## Step 6: Finalize\n\n### Update State\n\n1. Update `.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\n2. Append refactoring summary to `.progress.md`\n\n### Commit (if enabled)\n\nRead `commitSpec` from `.curdx-state.json`. If true:\n```bash\ngit add .\u002Fspecs\u002F$spec\u002F\ngit commit -m \"spec($spec): refactor specifications\"\ngit push -u origin $(git branch --show-current)\n```\nIf commit or push fails, display warning but continue.\n\n### Output\n\n```\nRefactoring complete for '$spec'.\n\nUpdated files:\n- [list of files updated with brief change summary]\n\nCascade updates:\n- [any cascade updates made]\n\n[If commitSpec: \"Changes committed and pushed.\"]\n\nNext steps:\n- Review updated spec files\n- Run \u002Fcurdx-flow:implement to continue execution (if tasks were modified)\n```\n","# Refactor Spec\n\nUpdate specification files after execution. You are a **coordinator, not a writer** -- delegate actual updates to the `refactor-specialist` subagent.\n\n## Coordinator Checklist\n\nComplete these coordination steps in order; do not create user-facing implementation tasks from this checklist:\n\n1. **Gather context** -- resolve spec, read existing files and learnings\n2. **Determine scope** -- which files to refactor (from --file flag or all)\n3. **File-by-file review** -- section-by-section review with user for each file\n4. **Delegate updates** -- dispatch refactor-specialist for each file\n5. **Handle cascades** -- propagate changes downstream if needed\n6. **Finalize** -- update state, commit\n\n## Step 1: Gather Context\n\n1. Resolve the target spec with the runtime CLI:\n   - With an argument: `curdx-flow specs resolve \"$ARGUMENTS\"`\n   - Without an argument: `curdx-flow specs resolve`\n2. If no active spec, error: \"No active spec. Run \u002Fcurdx-flow:new \u003Cname> first.\"\n3. Use the returned `path`\u002F`fsPath` as the resolved spec directory and check it exists\n4. Read `.curdx-state.json` if exists\n5. Identify which spec files exist: `requirements.md`, `design.md`, `tasks.md`\n6. If no spec files exist, error: \"No spec files found. Run \u002Fcurdx-flow:start first.\"\n7. Read `.progress.md` to understand implementation learnings\n\n## Step 2: Determine Scope & Present Overview\n\nCheck `$ARGUMENTS` for `--file=` flag:\n- `--file=requirements`: Only requirements.md\n- `--file=design`: Only design.md\n- `--file=tasks`: Only tasks.md\n- No flag: All files in order (requirements -> design -> tasks)\n\nPresent overview to user:\n```\nSpec: $spec\n\nFiles to review:\n- requirements.md: [exists\u002Fmissing] - [brief summary: X user stories, Y requirements]\n- design.md: [exists\u002Fmissing] - [brief summary: X components, Y decisions]\n- tasks.md: [exists\u002Fmissing] - [brief summary: X tasks, Y completed]\n\nImplementation learnings from .progress.md:\n- [Key learning 1]\n- [Key learning 2]\n```\n\n## Step 3: File-by-File Review\n\nProcess files in order: requirements -> design -> tasks. For each file in scope:\n\n### Ask About This File\n\nUse AskUserQuestion: \"Do you want to update [filename]?\" with options:\n- **Yes, review sections** -- go through section by section\n- **Skip this file** -- move to next\n- **Major rewrite needed** -- note for specialist\n\nIf \"Skip\", move to next file.\n\n### Section-by-Section Review\n\nFor each major section in the file, use AskUserQuestion to determine if it needs changes:\n\n**Requirements sections**: Goal, User Stories (keep\u002Fadd\u002Fmodify\u002Fremove), Functional Requirements, Non-Functional Requirements, Out of Scope, Dependencies, Success Criteria.\n\n**Design sections**: Architecture overview (keep\u002Fupdate diagram\u002Fmajor restructure), Components (keep\u002Fadd\u002Fmodify\u002Fremove), Data Flow, Technical Decisions, File Structure, Interfaces, Error Handling, Test Strategy.\n\n**Tasks sections**: Completed tasks (all good\u002Fsome need rework), New tasks (none\u002Fadd), Phase Structure, Task Dependencies, Verification Steps.\n\n### Gather Update Details\n\nFor sections marked for update, ask: \"What specific changes for [section]?\" with options:\n- **I'll describe changes** -- wait for text input\n- **Based on learnings** -- use implementation learnings to guide updates\n- **Remove outdated parts** -- clean up obsolete content\n\n## Step 4: Delegate to Specialist\n\n\u003Cmandatory>\nUse `Agent(agent_type: refactor-specialist)` for each file update.\n\nInclude in prompt:\n- Full current file content\n- Relevant `.progress.md` learnings\n- Sections to update with user's specific instructions\n- Guidelines: minimal focused changes, preserve valuable content, update cross-references\n\nSpecialist reports: `REFACTOR_COMPLETE: [filename]` and `CASCADE_NEEDED: [downstream files]` with reasons.\n\u003C\u002Fmandatory>\n\n## Step 5: Handle Cascade Updates\n\nAfter specialist completes, check for CASCADE_NEEDED:\n\n**If requirements changed** and cascade includes design: Ask user \"Requirements changed. Update design.md to match?\" (Yes \u002F Skip \u002F Regenerate)\n\n**If design changed** and cascade includes tasks: Ask user \"Design changed. Update tasks.md to match?\" (Yes \u002F Skip \u002F Regenerate)\n\nIf \"Regenerate\" selected, delegate to the original agent (architect-reviewer for design, task-planner for tasks) instead of refactor-specialist.\n\n## Step 6: Finalize\n\n### Update State\n\n1. Update `.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\n2. Append refactoring summary to `.progress.md`\n\n### Commit (if enabled)\n\nRead `commitSpec` from `.curdx-state.json`. If true:\n```bash\ngit add .\u002Fspecs\u002F$spec\u002F\ngit commit -m \"spec($spec): refactor specifications\"\ngit push -u origin $(git branch --show-current)\n```\nIf commit or push fails, display warning but continue.\n\n### Output\n\n```\nRefactoring complete for '$spec'.\n\nUpdated files:\n- [list of files updated with brief change summary]\n\nCascade updates:\n- [any cascade updates made]\n\n[If commitSpec: \"Changes committed and pushed.\"]\n\nNext steps:\n- Review updated spec files\n- Run \u002Fcurdx-flow:implement to continue execution (if tasks were modified)\n```\n",{"name":5,"description":7,"allowed-tools":56,"argument-hint":57,"disable-model-invocation":58},"Read Write Edit Agent Bash AskUserQuestion","[spec-name] [--file=requirements|design|tasks]",true,"main","7357746802ae7a84cafa93b9dbffd138817b0290","plugins\u002Fcurdx-flow\u002Fskills\u002Frefactor",0,"https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow","https:\u002F\u002Fcurdx.org","https:\u002F\u002Fgithub.com\u002Fmugsun","📮 bydongxin@gmail.com","🧑‍💻 AI Builder & Software Engineer\r\n🚀 Turning ideas into software.          \r\n\r\n","2026-08-19 15:19:29",{"source":8,"skillName":5,"commands":70,"prompt":80,"zipAvailable":58},[71,74,77],{"tool":72,"command":73},"npx","npx skills add mugsun\u002Fcurdx-flow --skill refactor",{"tool":75,"command":76},"bunx","bunx skills add mugsun\u002Fcurdx-flow --skill refactor",{"tool":78,"command":79},"pnpm","pnpm dlx skills add mugsun\u002Fcurdx-flow --skill refactor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fcurdx-flow\u002Fskills\u002Frefactor\u002FSKILL.md",[],[83,92,109,121,131,142],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":90,"publishedAt":51},"01M71KDR5EJP6G4VWFCHNJ35PT","help","Fixture help skill","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fruntime-readiness\u002Fclaude-code-plugin-like\u002Fskills\u002Fhelp\u002FSKILL.md",[89],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[85,91],"fixture",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":51},"01M71KDNAVB000W3MZB1W7CMD8","verification-before-completion","Use when checking fixes, phase exits, completion evidence, or mock-heavy tests before claiming success.","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fcurdx-flow\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[99,100,101,102,36,48,103,104,105,106,42,107,108],"verification","verification before completion","only","false","phase","evidence","fixes","tests","mock","state",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":116,"publishedAt":51},"01M71KDKFE975GFYRDC21H1NEE","triage","Use when a large feature should be decomposed into dependency-aware specs.","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fcurdx-flow\u002Fskills\u002Ftriage\u002FSKILL.md",[115],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[111,117,37,118,35,45,119,38,46,36,42,120],"goal","feature","dependency","EPIC",{"skillNo":122,"name":48,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":127,"publishedAt":51},"01M71KDH7XFQJPKYZ0H9JDNSA5","Use when a spec has design.md and needs implementation tasks.","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fcurdx-flow\u002Fskills\u002Ftasks\u002FSKILL.md",[126],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[48,41,50,38,128,42,129,44,130,36,46,45,35,43,37],"task","standard","auto",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":138,"publishedAt":51},"01M71KDEV9G51MCXDQWPJH7QST","switch","Use when changing the active spec by name or path.","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fcurdx-flow\u002Fskills\u002Fswitch\u002FSKILL.md",[137],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[133,46,139,37,42,36,140,38,45,50,35,141],"by name","active","path",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":149,"publishedAt":51},"01M71KDDJFRV09YZ08B3WJ39SC","status","Use when inspecting curdx-flow specs, active state, progress, or index status.","https:\u002F\u002Fgithub.com\u002Fmugsun\u002Fcurdx-flow\u002Fblob\u002Fmain\u002Fplugins\u002Fcurdx-flow\u002Fskills\u002Fstatus\u002FSKILL.md",[148],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},[144,37,42,36,46,108,150,140,151,45,152,153],"progress","update","flow","index"]