@skj1724/oh-my-opencode 3.17.16 → 3.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/agents/atlas/default-prompt-sections.d.ts +6 -6
  2. package/dist/agents/atlas/gemini-prompt-sections.d.ts +6 -6
  3. package/dist/agents/atlas/gpt-prompt-sections.d.ts +6 -6
  4. package/dist/agents/builtin-agents/environment-context.d.ts +1 -0
  5. package/dist/agents/builtin-agents/general-agents.d.ts +1 -0
  6. package/dist/agents/builtin-agents/hephaestus-agent.d.ts +1 -0
  7. package/dist/agents/builtin-agents/sisyphus-agent.d.ts +1 -0
  8. package/dist/agents/builtin-agents.d.ts +1 -1
  9. package/dist/agents/env-context.d.ts +1 -7
  10. package/dist/agents/metis.d.ts +9 -9
  11. package/dist/agents/momus.d.ts +11 -8
  12. package/dist/agents/prometheus/behavioral-summary.d.ts +1 -1
  13. package/dist/agents/prometheus/high-accuracy-mode.d.ts +1 -1
  14. package/dist/agents/prometheus/identity-constraints.d.ts +1 -1
  15. package/dist/agents/prometheus/plan-generation.d.ts +1 -1
  16. package/dist/agents/prometheus/plan-template.d.ts +1 -1
  17. package/dist/cli/index.js +10 -6
  18. package/dist/config/schema/agent-overrides.d.ts +15 -0
  19. package/dist/config/schema/i18n.d.ts +21 -0
  20. package/dist/config/schema/oh-my-opencode-config.d.ts +17 -0
  21. package/dist/features/builtin-commands/templates/handoff.d.ts +1 -1
  22. package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
  23. package/dist/features/builtin-commands/templates/open-plan.d.ts +1 -0
  24. package/dist/features/builtin-commands/templates/ralph-loop.d.ts +3 -3
  25. package/dist/features/builtin-commands/templates/refactor.d.ts +1 -1
  26. package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -1
  27. package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
  28. package/dist/features/builtin-commands/templates/stop-continuation.d.ts +1 -1
  29. package/dist/features/builtin-commands/types.d.ts +1 -1
  30. package/dist/hooks/atlas/system-reminder-templates.d.ts +2 -2
  31. package/dist/index.js +3979 -3801
  32. package/dist/oh-my-opencode.schema.json +52 -0
  33. package/dist/tools/delegate-task/background-continuation.d.ts +1 -1
  34. package/dist/tools/delegate-task/constants.d.ts +2 -2
  35. package/dist/tools/delegate-task/resolve-metadata-model.d.ts +3 -2
  36. package/dist/tools/delegate-task/sync-continuation.d.ts +1 -1
  37. package/dist/tools/delegate-task/types.d.ts +1 -4
  38. package/package.json +2 -2
@@ -1 +1 @@
1
- export declare const REFACTOR_TEMPLATE = "# \u667A\u80FD\u91CD\u6784\u547D\u4EE4\n\n## \u4F7F\u7528\u65B9\u5F0F\n```\n/refactor <\u91CD\u6784\u76EE\u6807> [--scope=<file|module|project>] [--strategy=<safe|aggressive>]\n\n\u53C2\u6570\uFF1A\n \u91CD\u6784\u76EE\u6807\uFF1A\u8981\u91CD\u6784\u7684\u5185\u5BB9\u3002\u53EF\u4E3A\uFF1A\n - \u6587\u4EF6\u8DEF\u5F84\uFF1Asrc/auth/handler.ts\n - \u7B26\u53F7\u540D\u79F0\uFF1A\"AuthService class\"\n - \u6A21\u5F0F\uFF1A\"all functions using deprecated API\"\n - \u63CF\u8FF0\uFF1A\"extract validation logic into separate module\"\n\n\u9009\u9879\uFF1A\n --scope\uFF1A\u91CD\u6784\u8303\u56F4\uFF08\u9ED8\u8BA4\uFF1Amodule\uFF09\n - file\uFF1A\u4EC5\u5355\u4E2A\u6587\u4EF6\n - module\uFF1A\u6A21\u5757/\u76EE\u5F55\u8303\u56F4\n - project\uFF1A\u6574\u4E2A\u4EE3\u7801\u5E93\n\n --strategy\uFF1A\u98CE\u9669\u5BB9\u5FCD\u5EA6\uFF08\u9ED8\u8BA4\uFF1Asafe\uFF09\n - safe\uFF1A\u4FDD\u5B88\u7B56\u7565\uFF0C\u9700\u8981\u6700\u5927\u5316\u7684\u6D4B\u8BD5\u8986\u76D6\u7387\n - aggressive\uFF1A\u5141\u8BB8\u66F4\u5E7F\u6CDB\u7684\u53D8\u66F4\uFF0C\u53EA\u8981\u6709\u8DB3\u591F\u7684\u8986\u76D6\u7387\n```\n\n## \u6B64\u547D\u4EE4\u7684\u529F\u80FD\n\n\u6267\u884C\u667A\u80FD\u7684\u3001\u786E\u5B9A\u6027\u7684\u91CD\u6784\uFF0C\u5168\u9762\u4E86\u89E3\u4EE3\u7801\u5E93\u3002\u4E0E\u76F2\u76EE\u7684\u641C\u7D22\u66FF\u6362\u4E0D\u540C\uFF0C\u6B64\u547D\u4EE4\uFF1A\n\n1. **\u7406\u89E3\u4F60\u7684\u610F\u56FE** - \u5206\u6790\u4F60\u5B9E\u9645\u60F3\u8981\u8FBE\u5230\u7684\u76EE\u6807\n2. **\u6620\u5C04\u4EE3\u7801\u5E93** - \u5728\u4FEE\u6539\u4EFB\u4F55\u5185\u5BB9\u4E4B\u524D\u6784\u5EFA\u786E\u5B9A\u7684 codemap\n3. **\u8BC4\u4F30\u98CE\u9669** - \u8BC4\u4F30\u6D4B\u8BD5\u8986\u76D6\u7387\u5E76\u786E\u5B9A\u9A8C\u8BC1\u7B56\u7565\n4. **\u7CBE\u5FC3\u89C4\u5212** - \u4F7F\u7528 Plan agent \u521B\u5EFA\u8BE6\u7EC6\u8BA1\u5212\n5. **\u7CBE\u786E\u6267\u884C** - \u901A\u8FC7 LSP \u548C AST-grep \u9010\u6B65\u91CD\u6784\n6. **\u6301\u7EED\u9A8C\u8BC1** - \u6BCF\u6B21\u53D8\u66F4\u540E\u8FD0\u884C\u6D4B\u8BD5\uFF0C\u786E\u4FDD\u96F6\u56DE\u5F52\n\n---\n\n# \u9636\u6BB5 0\uFF1A\u610F\u56FE\u95E8\u63A7\uFF08\u5F3A\u5236\u6027\u7B2C\u4E00\u6B65\uFF09\n\n**\u5728\u4EFB\u4F55\u64CD\u4F5C\u4E4B\u524D\uFF0C\u5BF9\u8BF7\u6C42\u8FDB\u884C\u5206\u7C7B\u548C\u9A8C\u8BC1\u3002**\n\n## \u6B65\u9AA4 0.1\uFF1A\u89E3\u6790\u8BF7\u6C42\u7C7B\u578B\n\n| \u4FE1\u53F7 | \u5206\u7C7B | \u64CD\u4F5C |\n|--------|----------------|--------|\n| \u7279\u5B9A\u6587\u4EF6/\u7B26\u53F7 | \u660E\u786E\u7684 | \u8FDB\u5165\u4EE3\u7801\u5E93\u5206\u6790 |\n| \"Refactor X to Y\" | \u6E05\u6670\u7684\u8F6C\u6362 | \u8FDB\u5165\u4EE3\u7801\u5E93\u5206\u6790 |\n| \"Improve\"\u3001\"Clean up\" | \u5F00\u653E\u5F0F | **\u5FC5\u987B\u8BE2\u95EE**\uFF1A\"\u5177\u4F53\u60F3\u8981\u6539\u8FDB\u4EC0\u4E48\uFF1F\" |\n| \u8303\u56F4\u6A21\u7CCA | \u4E0D\u786E\u5B9A | **\u5FC5\u987B\u8BE2\u95EE**\uFF1A\"\u6D89\u53CA\u54EA\u4E9B\u6A21\u5757/\u6587\u4EF6\uFF1F\" |\n| \u7F3A\u5C11\u4E0A\u4E0B\u6587 | \u4E0D\u5B8C\u6574 | **\u5FC5\u987B\u8BE2\u95EE**\uFF1A\"\u671F\u671B\u7684\u7ED3\u679C\u662F\u4EC0\u4E48\uFF1F\" |\n\n## \u6B65\u9AA4 0.2\uFF1A\u9A8C\u8BC1\u7406\u89E3\n\n\u5728\u7EE7\u7EED\u4E4B\u524D\uFF0C\u786E\u8BA4\uFF1A\n- [ ] \u76EE\u6807\u5DF2\u660E\u786E\u8BC6\u522B\n- [ ] \u671F\u671B\u7ED3\u679C\u5DF2\u7406\u89E3\n- [ ] \u8303\u56F4\u5DF2\u5B9A\u4E49\uFF08file/module/project\uFF09\n- [ ] \u53EF\u4EE5\u8868\u8FF0\u6210\u529F\u6807\u51C6\n\n**\u5982\u679C\u4E0A\u8FF0\u4EFB\u4F55\u4E00\u9879\u4E0D\u6E05\u6670\uFF0C\u63D0\u51FA\u6F84\u6E05\u95EE\u9898\uFF1A**\n\n```\n\u6211\u60F3\u786E\u4FDD\u6211\u6B63\u786E\u7406\u89E3\u4E86\u91CD\u6784\u76EE\u6807\u3002\n\n**\u6211\u7406\u89E3\u7684\u5185\u5BB9**\uFF1A[\u89E3\u91CA]\n**\u6211\u4E0D\u786E\u5B9A\u7684\u90E8\u5206**\uFF1A[\u5177\u4F53\u6A21\u7CCA\u4E4B\u5904]\n\n\u6211\u770B\u5230\u7684\u9009\u9879\uFF1A\n1. [\u9009\u9879 A] - [\u542B\u4E49]\n2. [\u9009\u9879 B] - [\u542B\u4E49]\n\n**\u6211\u7684\u5EFA\u8BAE**\uFF1A[\u5E26\u63A8\u7406\u7684\u5EFA\u8BAE]\n\n\u6211\u5E94\u8BE5\u6309 [\u5EFA\u8BAE] \u8FDB\u884C\u5417\uFF0C\u8FD8\u662F\u4F60\u6709\u5176\u4ED6\u504F\u597D\uFF1F\n```\n\n## \u6B65\u9AA4 0.3\uFF1A\u521B\u5EFA\u521D\u59CB Todos\n\n**\u5728\u7406\u89E3\u8BF7\u6C42\u540E\u7ACB\u5373\u521B\u5EFA todos\uFF1A**\n\n```\nTodoWrite([\n {\"id\": \"phase-1\", \"content\": \"PHASE 1: \u4EE3\u7801\u5E93\u5206\u6790 - \u542F\u52A8\u5E76\u884C\u7684 explore agents\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-2\", \"content\": \"PHASE 2: \u6784\u5EFA Codemap - \u6620\u5C04\u4F9D\u8D56\u5173\u7CFB\u548C\u5F71\u54CD\u533A\u57DF\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-3\", \"content\": \"PHASE 3: \u6D4B\u8BD5\u8BC4\u4F30 - \u5206\u6790\u6D4B\u8BD5\u8986\u76D6\u7387\u5E76\u786E\u5B9A\u9A8C\u8BC1\u7B56\u7565\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-4\", \"content\": \"PHASE 4: \u8BA1\u5212\u751F\u6210 - \u8C03\u7528 Plan agent \u751F\u6210\u8BE6\u7EC6\u91CD\u6784\u8BA1\u5212\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-5\", \"content\": \"PHASE 5: \u6267\u884C\u91CD\u6784 - \u9010\u6B65\u8FDB\u884C\u5E76\u6301\u7EED\u9A8C\u8BC1\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-6\", \"content\": \"PHASE 6: \u6700\u7EC8\u9A8C\u8BC1 - \u5B8C\u6574\u6D4B\u8BD5\u5957\u4EF6\u548C\u56DE\u5F52\u68C0\u67E5\", \"status\": \"pending\", \"priority\": \"high\"}\n])\n```\n\n---\n\n# \u9636\u6BB5 1\uFF1A\u4EE3\u7801\u5E93\u5206\u6790\uFF08\u5E76\u884C\u63A2\u7D22\uFF09\n\n**\u5C06 phase-1 \u6807\u8BB0\u4E3A in_progress\u3002**\n\n## 1.1\uFF1A\u542F\u52A8\u5E76\u884C Explore Agents\uFF08\u540E\u53F0\uFF09\n\n\u4F7F\u7528 `call_omo_agent` \u540C\u65F6\u542F\u52A8\u6240\u6709\u8FD9\u4E9B agents\uFF1A\n\n```\n// Agent 1: \u627E\u5230\u91CD\u6784\u76EE\u6807\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=true,\n prompt=\"Find all occurrences and definitions of [TARGET].\n Report: file paths, line numbers, usage patterns.\"\n)\n\n// Agent 2: \u627E\u5230\u76F8\u5173\u4EE3\u7801\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=true,\n prompt=\"Find all code that imports, uses, or depends on [TARGET].\n Report: dependency chains, import graphs.\"\n)\n\n// Agent 3: \u627E\u5230\u76F8\u4F3C\u6A21\u5F0F\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=true,\n prompt=\"Find similar code patterns to [TARGET] in the codebase.\n Report: analogous implementations, established conventions.\"\n)\n\n// Agent 4: \u627E\u5230\u6D4B\u8BD5\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=true,\n prompt=\"Find all test files related to [TARGET].\n Report: test file paths, test case names, coverage indicators.\"\n)\n\n// Agent 5: \u67B6\u6784\u4E0A\u4E0B\u6587\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=true,\n prompt=\"Find architectural patterns and module organization around [TARGET].\n Report: module boundaries, layer structure, design patterns in use.\"\n)\n```\n\n## 1.2\uFF1A\u76F4\u63A5\u5DE5\u5177\u63A2\u7D22\uFF08\u540E\u53F0 agents \u8FD0\u884C\u671F\u95F4\uFF09\n\n\u5728\u540E\u53F0 agents \u8FD0\u884C\u65F6\uFF0C\u4F7F\u7528\u76F4\u63A5\u5DE5\u5177\uFF1A\n\n### \u7528\u4E8E\u7CBE\u786E\u5206\u6790\u7684 LSP \u5DE5\u5177\uFF1A\n\n```typescript\n// \u67E5\u627E\u5B9A\u4E49\nLspGotoDefinition(filePath, line, character) // \u5B9A\u4E49\u5728\u54EA\u91CC\uFF1F\n\n// \u67E5\u627E\u6574\u4E2A workspace \u4E2D\u7684\u6240\u6709\u7528\u6CD5\nLspFindReferences(filePath, line, character, includeDeclaration=true)\n\n// \u83B7\u53D6\u6587\u4EF6\u7ED3\u6784\nLspDocumentSymbols(filePath) // \u5C42\u7EA7\u5927\u7EB2\nLspWorkspaceSymbols(filePath, query=\"[target_symbol]\") // \u6309\u540D\u79F0\u641C\u7D22\n\n// \u83B7\u53D6\u5F53\u524D\u8BCA\u65AD\nlsp_diagnostics(filePath) // \u5F00\u59CB\u524D\u7684\u9519\u8BEF\u548C\u8B66\u544A\n```\n\n### \u7528\u4E8E\u6A21\u5F0F\u5206\u6790\u7684 AST-Grep\uFF1A\n\n```typescript\n// \u67E5\u627E\u7ED3\u6784\u6A21\u5F0F\nast_grep_search(\n pattern=\"function $NAME($$$) { $$$ }\", // \u6216\u76F8\u5173\u6A21\u5F0F\n lang=\"typescript\", // \u6216\u76F8\u5173\u8BED\u8A00\n paths=[\"src/\"]\n)\n\n// \u9884\u89C8\u91CD\u6784\uFF08DRY RUN\uFF09\nast_grep_replace(\n pattern=\"[old_pattern]\",\n rewrite=\"[new_pattern]\",\n lang=\"[language]\",\n dryRun=true // \u59CB\u7EC8\u5148\u9884\u89C8\n)\n```\n\n### \u7528\u4E8E\u6587\u672C\u6A21\u5F0F\u7684 Grep\uFF1A\n\n```\ngrep(pattern=\"[search_term]\", path=\"src/\", include=\"*.ts\")\n```\n\n## 1.3\uFF1A\u6536\u96C6\u540E\u53F0\u7ED3\u679C\n\n```\nbackground_output(task_id=\"[agent_1_id]\")\nbackground_output(task_id=\"[agent_2_id]\")\n...\n```\n\n**\u6536\u96C6\u5B8C\u6240\u6709\u7ED3\u679C\u540E\uFF0C\u5C06 phase-1 \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n# \u9636\u6BB5 2\uFF1A\u6784\u5EFA CODEMAP\uFF08\u4F9D\u8D56\u5173\u7CFB\u6620\u5C04\uFF09\n\n**\u5C06 phase-2 \u6807\u8BB0\u4E3A in_progress\u3002**\n\n## 2.1\uFF1A\u6784\u5EFA\u786E\u5B9A\u7684 Codemap\n\n\u57FA\u4E8E\u9636\u6BB5 1 \u7684\u7ED3\u679C\uFF0C\u6784\u5EFA\uFF1A\n\n```\n## CODEMAP: [TARGET]\n\n### \u6838\u5FC3\u6587\u4EF6\uFF08\u76F4\u63A5\u5F71\u54CD\uFF09\n- `path/to/file.ts:L10-L50` - \u4E3B\u8981\u5B9A\u4E49\n- `path/to/file2.ts:L25` - \u5173\u952E\u7528\u6CD5\n\n### \u4F9D\u8D56\u5173\u7CFB\u56FE\n```\n[TARGET]\n\u251C\u2500\u2500 \u5BFC\u5165\u81EA:\n\u2502 \u251C\u2500\u2500 module-a (types)\n\u2502 \u2514\u2500\u2500 module-b (utils)\n\u251C\u2500\u2500 \u88AB\u4EE5\u4E0B\u5BFC\u5165:\n\u2502 \u251C\u2500\u2500 consumer-1.ts\n\u2502 \u251C\u2500\u2500 consumer-2.ts\n\u2502 \u2514\u2500\u2500 consumer-3.ts\n\u2514\u2500\u2500 \u88AB\u4EE5\u4E0B\u4F7F\u7528:\n \u251C\u2500\u2500 handler.ts (\u76F4\u63A5\u8C03\u7528)\n \u2514\u2500\u2500 service.ts (\u4F9D\u8D56\u6CE8\u5165)\n```\n\n### \u5F71\u54CD\u533A\u57DF\n| \u533A\u57DF | \u98CE\u9669\u7B49\u7EA7 | \u6D89\u53CA\u6587\u4EF6 | \u6D4B\u8BD5\u8986\u76D6\u7387 |\n|------|------------|----------------|---------------|\n| \u6838\u5FC3 | HIGH | 3 \u4E2A\u6587\u4EF6 | 85% \u8986\u76D6 |\n| \u6D88\u8D39\u8005 | MEDIUM | 8 \u4E2A\u6587\u4EF6 | 70% \u8986\u76D6 |\n| \u8FB9\u7F18 | LOW | 2 \u4E2A\u6587\u4EF6 | 50% \u8986\u76D6 |\n\n### \u5DF2\u786E\u7ACB\u7684\u6A21\u5F0F\n- Pattern A: [\u63CF\u8FF0] - \u5728 N \u5904\u4F7F\u7528\n- Pattern B: [\u63CF\u8FF0] - \u5DF2\u5EFA\u7ACB\u7684\u7EA6\u5B9A\n```\n\n## 2.2\uFF1A\u8BC6\u522B\u91CD\u6784\u7EA6\u675F\n\n\u57FA\u4E8E codemap\uFF1A\n- **\u5FC5\u987B\u9075\u5FAA**\uFF1A[\u5DF2\u8BC6\u522B\u7684\u73B0\u6709\u6A21\u5F0F]\n- **\u4E0D\u80FD\u7834\u574F**\uFF1A[\u5173\u952E\u4F9D\u8D56\u5173\u7CFB]\n- **\u53EF\u4EE5\u5B89\u5168\u4FEE\u6539**\uFF1A[\u9694\u79BB\u7684\u4EE3\u7801\u533A\u57DF]\n- **\u9700\u8981\u8FC1\u79FB**\uFF1A[\u7834\u574F\u6027\u53D8\u66F4\u7684\u5F71\u54CD]\n\n**\u5C06 phase-2 \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n# \u9636\u6BB5 3\uFF1A\u6D4B\u8BD5\u8BC4\u4F30\uFF08\u9A8C\u8BC1\u7B56\u7565\uFF09\n\n**\u5C06 phase-3 \u6807\u8BB0\u4E3A in_progress\u3002**\n\n## 3.1\uFF1A\u68C0\u6D4B\u6D4B\u8BD5\u57FA\u7840\u8BBE\u65BD\n\n```bash\n# \u68C0\u67E5\u6D4B\u8BD5\u547D\u4EE4\ncat package.json | jq '.scripts | keys[] | select(test(\"test\"))'\n\n# \u6216\u5BF9\u4E8E Python\nls -la pytest.ini pyproject.toml setup.cfg\n\n# \u6216\u5BF9\u4E8E Go\nls -la *_test.go\n```\n\n## 3.2\uFF1A\u5206\u6790\u6D4B\u8BD5\u8986\u76D6\u7387\n\n```\n// \u67E5\u627E\u4E0E\u76EE\u6807\u76F8\u5173\u7684\u6240\u6709\u6D4B\u8BD5\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=false, // \u9700\u8981\u540C\u6B65\u83B7\u53D6\n prompt=\"Analyze test coverage for [TARGET]:\n 1. Which test files cover this code?\n 2. What test cases exist?\n 3. Are there integration tests?\n 4. What edge cases are tested?\n 5. Estimated coverage percentage?\"\n)\n```\n\n## 3.3\uFF1A\u786E\u5B9A\u9A8C\u8BC1\u7B56\u7565\n\n\u57FA\u4E8E\u6D4B\u8BD5\u5206\u6790\uFF1A\n\n| \u8986\u76D6\u7387\u7B49\u7EA7 | \u7B56\u7565 |\n|----------------|----------|\n| HIGH (>80%) | \u6BCF\u6B65\u540E\u8FD0\u884C\u73B0\u6709\u6D4B\u8BD5 |\n| MEDIUM (50-80%) | \u8FD0\u884C\u6D4B\u8BD5 + \u6DFB\u52A0\u5B89\u5168\u65AD\u8A00 |\n| LOW (<50%) | **\u6682\u505C**\uFF1A\u5EFA\u8BAE\u5148\u6DFB\u52A0\u6D4B\u8BD5 |\n| NONE | **\u963B\u6B62**\uFF1A\u62D2\u7EDD\u6FC0\u8FDB\u91CD\u6784 |\n\n**\u5982\u679C\u8986\u76D6\u7387\u4E3A LOW \u6216 NONE\uFF0C\u5411\u7528\u6237\u8BE2\u95EE\uFF1A**\n\n```\n[TARGET] \u7684\u6D4B\u8BD5\u8986\u76D6\u7387\u4E3A [\u7B49\u7EA7]\u3002\n\n**\u98CE\u9669\u8BC4\u4F30**\uFF1A\u6CA1\u6709\u8DB3\u591F\u6D4B\u8BD5\u7684\u91CD\u6784\u662F\u5371\u9669\u7684\u3002\n\n\u9009\u9879\uFF1A\n1. \u5148\u6DFB\u52A0\u6D4B\u8BD5\uFF0C\u518D\u91CD\u6784\uFF08\u63A8\u8350\uFF09\n2. \u683C\u5916\u5C0F\u5FC3\u5730\u8FDB\u884C\uFF0C\u9700\u8981\u624B\u52A8\u9A8C\u8BC1\n3. \u7EC8\u6B62\u91CD\u6784\n\n\u4F60\u503E\u5411\u4E8E\u54EA\u79CD\u65B9\u5F0F\uFF1F\n```\n\n## 3.4\uFF1A\u8BB0\u5F55\u9A8C\u8BC1\u8BA1\u5212\n\n```\n## \u9A8C\u8BC1\u8BA1\u5212\n\n### \u6D4B\u8BD5\u547D\u4EE4\n- \u5355\u5143\u6D4B\u8BD5\uFF1A`bun test` / `npm test` / `pytest` / \u7B49\n- \u96C6\u6210\u6D4B\u8BD5\uFF1A[\u547D\u4EE4\uFF0C\u5982\u5B58\u5728]\n- \u7C7B\u578B\u68C0\u67E5\uFF1A`tsc --noEmit` / `pyright` / \u7B49\n\n### \u9A8C\u8BC1\u68C0\u67E5\u70B9\n\u6BCF\u6B21\u91CD\u6784\u6B65\u9AA4\u540E\uFF1A\n1. lsp_diagnostics \u2192 \u65E0\u65B0\u589E\u9519\u8BEF\n2. \u8FD0\u884C\u6D4B\u8BD5\u547D\u4EE4 \u2192 \u5168\u90E8\u901A\u8FC7\n3. \u7C7B\u578B\u68C0\u67E5 \u2192 \u6E05\u6D01\n\n### \u56DE\u5F52\u6307\u6807\n- [\u5FC5\u987B\u901A\u8FC7\u7684\u7279\u5B9A\u6D4B\u8BD5]\n- [\u5FC5\u987B\u4FDD\u7559\u7684\u884C\u4E3A]\n- [\u4E0D\u80FD\u6539\u53D8\u7684 API \u5951\u7EA6]\n```\n\n**\u5C06 phase-3 \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n# \u9636\u6BB5 4\uFF1A\u8BA1\u5212\u751F\u6210\uFF08PLAN AGENT\uFF09\n\n**\u5C06 phase-4 \u6807\u8BB0\u4E3A in_progress\u3002**\n\n## 4.1\uFF1A\u8C03\u7528 Plan Agent\n\n```\nTask(\n subagent_type=\"plan\",\n prompt=\"Create a detailed refactoring plan:\n\n ## Refactoring Goal\n [User's original request]\n\n ## Codemap (from Phase 2)\n [Insert codemap here]\n\n ## Test Coverage (from Phase 3)\n [Insert verification plan here]\n\n ## Constraints\n - MUST follow existing patterns: [list]\n - MUST NOT break: [critical paths]\n - MUST run tests after each step\n\n ## Requirements\n 1. Break down into atomic refactoring steps\n 2. Each step must be independently verifiable\n 3. Order steps by dependency (what must happen first)\n 4. Specify exact files and line ranges for each step\n 5. Include rollback strategy for each step\n 6. Define commit checkpoints\"\n)\n```\n\n## 4.2\uFF1A\u5BA1\u67E5\u548C\u9A8C\u8BC1\u8BA1\u5212\n\n\u5728\u6536\u5230 Plan agent \u7684\u8BA1\u5212\u540E\uFF1A\n\n1. **\u9A8C\u8BC1\u5B8C\u6574\u6027**\uFF1A\u6240\u6709\u8BC6\u522B\u7684\u6587\u4EF6\u90FD\u5DF2\u5904\u7406\uFF1F\n2. **\u9A8C\u8BC1\u5B89\u5168\u6027**\uFF1A\u6BCF\u6B65\u90FD\u662F\u53EF\u9006\u7684\uFF1F\n3. **\u9A8C\u8BC1\u987A\u5E8F**\uFF1A\u4F9D\u8D56\u5173\u7CFB\u88AB\u5C0A\u91CD\u4E86\uFF1F\n4. **\u9A8C\u8BC1\u9A8C\u8BC1**\uFF1A\u6D4B\u8BD5\u547D\u4EE4\u662F\u5426\u5DF2\u6307\u5B9A\uFF1F\n\n## 4.3\uFF1A\u6CE8\u518C\u8BE6\u7EC6 Todos\n\n\u5C06 Plan agent \u7684\u8F93\u51FA\u8F6C\u6362\u4E3A\u7EC6\u7C92\u5EA6 todos\uFF1A\n\n```\nTodoWrite([\n // \u8BA1\u5212\u4E2D\u7684\u6BCF\u4E00\u6B65\u90FD\u6210\u4E3A\u4E00\u4E2A todo\n {\"id\": \"refactor-1\", \"content\": \"Step 1: [\u63CF\u8FF0]\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"verify-1\", \"content\": \"Verify Step 1: run tests\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"refactor-2\", \"content\": \"Step 2: [\u63CF\u8FF0]\", \"status\": \"pending\", \"priority\": \"medium\"},\n {\"id\": \"verify-2\", \"content\": \"Verify Step 2: run tests\", \"status\": \"pending\", \"priority\": \"medium\"},\n // ... \u4E3A\u6240\u6709\u6B65\u9AA4\u7EE7\u7EED\n])\n```\n\n**\u5C06 phase-4 \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n# \u9636\u6BB5 5\uFF1A\u6267\u884C\u91CD\u6784\uFF08\u786E\u5B9A\u6027\u6267\u884C\uFF09\n\n**\u5C06 phase-5 \u6807\u8BB0\u4E3A in_progress\u3002**\n\n## 5.1\uFF1A\u6267\u884C\u534F\u8BAE\n\n\u5BF9\u4E8E\u6BCF\u4E2A\u91CD\u6784\u6B65\u9AA4\uFF1A\n\n### \u6B65\u9AA4\u524D\n1. \u5C06\u6B65\u9AA4 todo \u6807\u8BB0\u4E3A `in_progress`\n2. \u8BFB\u53D6\u5F53\u524D\u6587\u4EF6\u72B6\u6001\n3. \u9A8C\u8BC1 lsp_diagnostics \u57FA\u7EBF\n\n### \u6267\u884C\u6B65\u9AA4\n\u4F7F\u7528\u9002\u5F53\u7684\u5DE5\u5177\uFF1A\n\n**\u5BF9\u4E8E\u7B26\u53F7\u91CD\u547D\u540D\uFF1A**\n```typescript\nlsp_prepare_rename(filePath, line, character) // \u9A8C\u8BC1\u91CD\u547D\u540D\u662F\u5426\u53EF\u884C\nlsp_rename(filePath, line, character, newName) // \u6267\u884C\u91CD\u547D\u540D\n```\n\n**\u5BF9\u4E8E\u6A21\u5F0F\u8F6C\u6362\uFF1A**\n```typescript\n// \u5148\u9884\u89C8\nast_grep_replace(pattern, rewrite, lang, dryRun=true)\n\n// \u5982\u679C\u9884\u89C8\u770B\u8D77\u6765\u6CA1\u95EE\u9898\uFF0C\u6267\u884C\nast_grep_replace(pattern, rewrite, lang, dryRun=false)\n```\n\n**\u5BF9\u4E8E\u7ED3\u6784\u53D8\u66F4\uFF1A**\n```typescript\n// \u4F7F\u7528 Edit \u5DE5\u5177\u8FDB\u884C\u7CBE\u786E\u4FEE\u6539\nedit(filePath, oldString, newString)\n```\n\n### \u6B65\u9AA4\u540E\u9A8C\u8BC1\uFF08\u5F3A\u5236\uFF09\n\n```typescript\n// 1. \u68C0\u67E5\u8BCA\u65AD\nlsp_diagnostics(filePath) // \u5FC5\u987B\u6E05\u6D01\u6216\u4E0E\u57FA\u7EBF\u76F8\u540C\n\n// 2. \u8FD0\u884C\u6D4B\u8BD5\nbash(\"bun test\") // \u6216\u9002\u5F53\u7684\u6D4B\u8BD5\u547D\u4EE4\n\n// 3. \u7C7B\u578B\u68C0\u67E5\nbash(\"tsc --noEmit\") // \u6216\u9002\u5F53\u7684\u7C7B\u578B\u68C0\u67E5\n```\n\n### \u6B65\u9AA4\u5B8C\u6210\n1. \u5982\u679C\u9A8C\u8BC1\u901A\u8FC7 \u2192 \u5C06\u6B65\u9AA4 todo \u6807\u8BB0\u4E3A `completed`\n2. \u5982\u679C\u9A8C\u8BC1\u5931\u8D25 \u2192 **\u505C\u6B62\u5E76\u4FEE\u590D**\n\n## 5.2\uFF1A\u5931\u8D25\u6062\u590D\u534F\u8BAE\n\n\u5982\u679C\u4EFB\u4F55\u9A8C\u8BC1\u5931\u8D25\uFF1A\n\n1. **\u7ACB\u5373\u505C\u6B62**\n2. **\u56DE\u6EDA**\u5931\u8D25\u7684\u53D8\u66F4\n3. **\u8BCA\u65AD**\u95EE\u9898\u6240\u5728\n4. **\u9009\u9879**\uFF1A\n - \u4FEE\u590D\u95EE\u9898\u5E76\u91CD\u8BD5\n - \u8DF3\u8FC7\u6B64\u6B65\u9AA4\uFF08\u5982\u53EF\u9009\uFF09\n - \u54A8\u8BE2 oracle agent\n - \u5411\u7528\u6237\u5BFB\u6C42\u6307\u5BFC\n\n**\u6C38\u8FDC\u4E0D\u8981\u5728\u6D4B\u8BD5\u5931\u8D25\u7684\u60C5\u51B5\u4E0B\u7EE7\u7EED\u4E0B\u4E00\u6B65\u3002**\n\n## 5.3\uFF1A\u63D0\u4EA4\u68C0\u67E5\u70B9\n\n\u5728\u6BCF\u7EC4\u903B\u8F91\u53D8\u66F4\u4E4B\u540E\uFF1A\n\n```bash\ngit add [changed-files]\ngit commit -m \"refactor(scope): description\n\n[details of what was changed and why]\"\n```\n\n**\u6240\u6709\u91CD\u6784\u6B65\u9AA4\u5B8C\u6210\u540E\uFF0C\u5C06 phase-5 \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n# \u9636\u6BB5 6\uFF1A\u6700\u7EC8\u9A8C\u8BC1\uFF08\u56DE\u5F52\u68C0\u67E5\uFF09\n\n**\u5C06 phase-6 \u6807\u8BB0\u4E3A in_progress\u3002**\n\n## 6.1\uFF1A\u5B8C\u6574\u6D4B\u8BD5\u5957\u4EF6\n\n```bash\n# \u8FD0\u884C\u5B8C\u6574\u6D4B\u8BD5\u5957\u4EF6\nbun test # \u6216 npm test, pytest, go test, \u7B49\n```\n\n## 6.2\uFF1A\u7C7B\u578B\u68C0\u67E5\n\n```bash\n# \u5B8C\u6574\u7C7B\u578B\u68C0\u67E5\ntsc --noEmit # \u6216\u7B49\u6548\u547D\u4EE4\n```\n\n## 6.3\uFF1ALint \u68C0\u67E5\n\n```bash\n# \u8FD0\u884C linter\neslint . # \u6216\u7B49\u6548\u547D\u4EE4\n```\n\n## 6.4\uFF1A\u6784\u5EFA\u9A8C\u8BC1\uFF08\u5982\u9002\u7528\uFF09\n\n```bash\n# \u786E\u4FDD\u6784\u5EFA\u4ECD\u7136\u6B63\u5E38\nbun run build # \u6216 npm run build, \u7B49\n```\n\n## 6.5\uFF1A\u6700\u7EC8\u8BCA\u65AD\n\n```typescript\n// \u68C0\u67E5\u6240\u6709\u53D8\u66F4\u7684\u6587\u4EF6\nfor (file of changedFiles) {\n lsp_diagnostics(file) // \u5FC5\u987B\u5168\u90E8\u6E05\u6D01\n}\n```\n\n## 6.6\uFF1A\u751F\u6210\u6458\u8981\n\n```markdown\n## \u91CD\u6784\u5B8C\u6210\n\n### \u53D8\u66F4\u5185\u5BB9\n- [\u6240\u505A\u53D8\u66F4\u5217\u8868]\n\n### \u4FEE\u6539\u7684\u6587\u4EF6\n- `path/to/file.ts` - [\u53D8\u66F4\u5185\u5BB9]\n- `path/to/file2.ts` - [\u53D8\u66F4\u5185\u5BB9]\n\n### \u9A8C\u8BC1\u7ED3\u679C\n- \u6D4B\u8BD5\uFF1A\u5DF2\u901A\u8FC7\uFF08X/Y \u901A\u8FC7\uFF09\n- \u7C7B\u578B\u68C0\u67E5\uFF1A\u6E05\u6D01\n- Lint\uFF1A\u6E05\u6D01\n- \u6784\u5EFA\uFF1A\u6210\u529F\n\n### \u672A\u68C0\u6D4B\u5230\u56DE\u5F52\n\u6240\u6709\u73B0\u6709\u6D4B\u8BD5\u5747\u901A\u8FC7\u3002\u65E0\u65B0\u589E\u9519\u8BEF\u3002\n```\n\n**\u5C06 phase-6 \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n# \u5173\u952E\u89C4\u5219\n\n## \u7981\u6B62\u4E8B\u9879\n- \u53D8\u66F4\u540E\u8DF3\u8FC7 lsp_diagnostics \u68C0\u67E5\n- \u5728\u6D4B\u8BD5\u5931\u8D25\u7684\u60C5\u51B5\u4E0B\u7EE7\u7EED\n- \u4E0D\u4E86\u89E3\u5F71\u54CD\u5C31\u8FDB\u884C\u4FEE\u6539\n- \u4F7F\u7528 `as any`\u3001`@ts-ignore`\u3001`@ts-expect-error`\n- \u5220\u9664\u6D4B\u8BD5\u4F7F\u5176\u901A\u8FC7\n- \u63D0\u4EA4\u6709\u95EE\u9898\u7684\u4EE3\u7801\n- \u4E0D\u4E86\u89E3\u73B0\u6709\u6A21\u5F0F\u5C31\u91CD\u6784\n\n## \u5FC5\u505A\u4E8B\u9879\n- \u6539\u524D\u5148\u7406\u89E3\n- \u5E94\u7528\u524D\u5148\u9884\u89C8\uFF08ast_grep dryRun=true\uFF09\n- \u6BCF\u6B21\u53D8\u66F4\u540E\u9A8C\u8BC1\n- \u9075\u5FAA\u73B0\u6709\u4EE3\u7801\u5E93\u6A21\u5F0F\n- \u5B9E\u65F6\u66F4\u65B0 todos\n- \u5728\u903B\u8F91\u68C0\u67E5\u70B9\u63D0\u4EA4\n- \u7ACB\u5373\u62A5\u544A\u95EE\u9898\n\n## \u4E2D\u6B62\u6761\u4EF6\n\u5982\u679C\u53D1\u751F\u4EE5\u4E0B\u4EFB\u4F55\u60C5\u51B5\uFF0C**\u505C\u6B62\u5E76\u54A8\u8BE2\u7528\u6237**\uFF1A\n- \u76EE\u6807\u4EE3\u7801\u7684\u6D4B\u8BD5\u8986\u76D6\u7387\u4E3A\u96F6\n- \u53D8\u66F4\u4F1A\u7834\u574F public API\n- \u91CD\u6784\u8303\u56F4\u4E0D\u6E05\u6670\n- \u8FDE\u7EED 3 \u6B21\u9A8C\u8BC1\u5931\u8D25\n- \u7528\u6237\u5B9A\u4E49\u7684\u7EA6\u675F\u88AB\u8FDD\u53CD\n\n---\n\n# \u5DE5\u5177\u4F7F\u7528\u7406\u5FF5\n\n\u4F60\u5DF2\u4E86\u89E3\u8FD9\u4E9B\u5DE5\u5177\u3002\u8BF7\u660E\u667A\u5730\u4F7F\u7528\u5B83\u4EEC\uFF1A\n\n## LSP \u5DE5\u5177\n\u5229\u7528 LSP \u5DE5\u5177\u8FDB\u884C\u7CBE\u786E\u5206\u6790\u3002\u5173\u952E\u6A21\u5F0F\uFF1A\n- **\u6539\u524D\u5148\u7406\u89E3**\uFF1A\u4F7F\u7528 `LspGotoDefinition` \u7406\u89E3\u4E0A\u4E0B\u6587\n- **\u5F71\u54CD\u5206\u6790**\uFF1A\u4FEE\u6539\u524D\u4F7F\u7528 `LspFindReferences` \u6620\u5C04\u6240\u6709\u7528\u6CD5\n- **\u5B89\u5168\u91CD\u6784**\uFF1A\u7B26\u53F7\u91CD\u547D\u540D\u4F7F\u7528 `lsp_prepare_rename` \u2192 `lsp_rename`\n- **\u6301\u7EED\u9A8C\u8BC1**\uFF1A\u6BCF\u6B21\u53D8\u66F4\u540E\u4F7F\u7528 `lsp_diagnostics`\n\n## AST-Grep\n\u4F7F\u7528 `ast_grep_search` \u548C `ast_grep_replace` \u8FDB\u884C\u7ED3\u6784\u8F6C\u6362\u3002\n**\u5173\u952E**\uFF1A\u59CB\u7EC8\u5148\u7528 `dryRun=true` \u9884\u89C8\uFF0C\u5BA1\u67E5\u540E\u518D\u6267\u884C\u3002\n\n## Agents\n- `explore`\uFF1A\u5E76\u884C\u4EE3\u7801\u5E93\u6A21\u5F0F\u53D1\u73B0\n- `plan`\uFF1A\u8BE6\u7EC6\u91CD\u6784\u8BA1\u5212\u751F\u6210\n- `oracle`\uFF1A\u7528\u4E8E\u590D\u6742\u67B6\u6784\u51B3\u7B56\u548C\u8C03\u8BD5\u7684\u53EA\u8BFB\u54A8\u8BE2\n- `librarian`\uFF1A\u9047\u5230\u5F03\u7528\u65B9\u6CD5\u6216\u5E93\u8FC1\u79FB\u4EFB\u52A1\u65F6**\u4E3B\u52A8\u4F7F\u7528**\u3002\u67E5\u8BE2\u5B98\u65B9\u6587\u6863\u548C\u5F00\u6E90\u793A\u4F8B\u4EE5\u83B7\u53D6\u73B0\u4EE3\u66FF\u4EE3\u65B9\u6848\u3002\n\n## \u5F03\u7528\u4EE3\u7801\u4E0E\u5E93\u8FC1\u79FB\n\u5728\u91CD\u6784\u8FC7\u7A0B\u4E2D\u9047\u5230\u5F03\u7528\u7684\u65B9\u6CD5/API \u65F6\uFF1A\n1. \u542F\u52A8 `librarian` \u67E5\u627E\u63A8\u8350\u7684\u73B0\u4EE3\u66FF\u4EE3\u65B9\u6848\n2. **\u9664\u975E\u7528\u6237\u660E\u786E\u8981\u6C42\u8FC1\u79FB\uFF0C\u5426\u5219\u4E0D\u8981\u81EA\u52A8\u5347\u7EA7\u5230\u6700\u65B0\u7248\u672C**\n3. \u5982\u679C\u7528\u6237\u8981\u6C42\u5E93\u8FC1\u79FB\uFF0C\u5728\u8FDB\u884C\u66F4\u6539\u4E4B\u524D\u4F7F\u7528 `librarian` \u83B7\u53D6\u6700\u65B0\u7684 API \u6587\u6863\n\n---\n\n**\u8BB0\u4F4F\uFF1A\u6CA1\u6709\u6D4B\u8BD5\u7684\u91CD\u6784\u662F\u9C81\u83BD\u7684\u3002\u6CA1\u6709\u7406\u89E3\u7684\u91CD\u6784\u662F\u7834\u574F\u6027\u7684\u3002\u6B64\u547D\u4EE4\u786E\u4FDD\u4F60\u4E24\u8005\u90FD\u4E0D\u4F1A\u505A\u3002**\n\n<user-request>\n$ARGUMENTS\n</user-request>\n";
1
+ export declare const REFACTOR_TEMPLATE = "# Intelligent Refactor Command\n\n## Usage\n```\n/refactor <refactoring-target> [--scope=<file|module|project>] [--strategy=<safe|aggressive>]\n\nArguments:\n refactoring-target: What to refactor. Can be:\n - File path: src/auth/handler.ts\n - Symbol name: \"AuthService class\"\n - Pattern: \"all functions using deprecated API\"\n - Description: \"extract validation logic into separate module\"\n\nOptions:\n --scope: Refactoring scope (default: module)\n - file: Single file only\n - module: Module/directory scope\n - project: Entire codebase\n\n --strategy: Risk tolerance (default: safe)\n - safe: Conservative, maximum test coverage required\n - aggressive: Allow broader changes with adequate coverage\n```\n\n## What This Command Does\n\nPerforms intelligent, deterministic refactoring with full codebase awareness. Unlike blind search-and-replace, this command:\n\n1. **Understands your intent** - Analyzes what you actually want to achieve\n2. **Maps the codebase** - Builds a definitive codemap before touching anything\n3. **Assesses risk** - Evaluates test coverage and determines verification strategy\n4. **Plans meticulously** - Creates a detailed plan with Plan agent\n5. **Executes precisely** - Step-by-step refactoring with LSP and AST-grep\n6. **Verifies constantly** - Runs tests after each change to ensure zero regression\n\n---\n\n# PHASE 0: INTENT GATE (MANDATORY FIRST STEP)\n\n**BEFORE ANY ACTION, classify and validate the request.**\n\n## Step 0.1: Parse Request Type\n\n| Signal | Classification | Action |\n|--------|----------------|--------|\n| Specific file/symbol | Explicit | Proceed to codebase analysis |\n| \"Refactor X to Y\" | Clear transformation | Proceed to codebase analysis |\n| \"Improve\", \"Clean up\" | Open-ended | **MUST ask**: \"What specific improvement?\" |\n| Ambiguous scope | Uncertain | **MUST ask**: \"Which modules/files?\" |\n| Missing context | Incomplete | **MUST ask**: \"What's the desired outcome?\" |\n\n## Step 0.2: Validate Understanding\n\nBefore proceeding, confirm:\n- [ ] Target is clearly identified\n- [ ] Desired outcome is understood\n- [ ] Scope is defined (file/module/project)\n- [ ] Success criteria can be articulated\n\n**If ANY of above is unclear, ASK CLARIFYING QUESTION:**\n\n```\nI want to make sure I understand the refactoring goal correctly.\n\n**What I understood**: [interpretation]\n**What I'm unsure about**: [specific ambiguity]\n\nOptions I see:\n1. [Option A] - [implications]\n2. [Option B] - [implications]\n\n**My recommendation**: [suggestion with reasoning]\n\nShould I proceed with [recommendation], or would you prefer differently?\n```\n\n## Step 0.3: Create Initial Todos\n\n**IMMEDIATELY after understanding the request, create todos:**\n\n```\nTodoWrite([\n {\"id\": \"phase-1\", \"content\": \"PHASE 1: Codebase Analysis - launch parallel explore agents\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-2\", \"content\": \"PHASE 2: Build Codemap - map dependencies and impact zones\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-3\", \"content\": \"PHASE 3: Test Assessment - analyze test coverage and verification strategy\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-4\", \"content\": \"PHASE 4: Plan Generation - invoke Plan agent for detailed refactoring plan\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-5\", \"content\": \"PHASE 5: Execute Refactoring - step-by-step with continuous verification\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"phase-6\", \"content\": \"PHASE 6: Final Verification - full test suite and regression check\", \"status\": \"pending\", \"priority\": \"high\"}\n])\n```\n\n---\n\n# PHASE 1: CODEBASE ANALYSIS (PARALLEL EXPLORATION)\n\n**Mark phase-1 as in_progress.**\n\n## 1.1: Launch Parallel Explore Agents (BACKGROUND)\n\nFire ALL of these simultaneously using `call_omo_agent`:\n\n```\n// Agent 1: Find the refactoring target\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=true,\n prompt=\"Find all occurrences and definitions of [TARGET]. \n Report: file paths, line numbers, usage patterns.\"\n)\n\n// Agent 2: Find related code\ncall_omo_agent(\n subagent_type=\"explore\", \n run_in_background=true,\n prompt=\"Find all code that imports, uses, or depends on [TARGET].\n Report: dependency chains, import graphs.\"\n)\n\n// Agent 3: Find similar patterns\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=true,\n prompt=\"Find similar code patterns to [TARGET] in the codebase.\n Report: analogous implementations, established conventions.\"\n)\n\n// Agent 4: Find tests\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=true,\n prompt=\"Find all test files related to [TARGET].\n Report: test file paths, test case names, coverage indicators.\"\n)\n\n// Agent 5: Architecture context\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=true,\n prompt=\"Find architectural patterns and module organization around [TARGET].\n Report: module boundaries, layer structure, design patterns in use.\"\n)\n```\n\n## 1.2: Direct Tool Exploration (WHILE AGENTS RUN)\n\nWhile background agents are running, use direct tools:\n\n### LSP Tools for Precise Analysis:\n\n```typescript\n// Find definition(s)\nLspGotoDefinition(filePath, line, character) // Where is it defined?\n\n// Find ALL usages across workspace\nLspFindReferences(filePath, line, character, includeDeclaration=true)\n\n// Get file structure\nLspDocumentSymbols(filePath) // Hierarchical outline\nLspWorkspaceSymbols(filePath, query=\"[target_symbol]\") // Search by name\n\n// Get current diagnostics\nlsp_diagnostics(filePath) // Errors, warnings before we start\n```\n\n### AST-Grep for Pattern Analysis:\n\n```typescript\n// Find structural patterns\nast_grep_search(\n pattern=\"function $NAME($$$) { $$$ }\", // or relevant pattern\n lang=\"typescript\", // or relevant language\n paths=[\"src/\"]\n)\n\n// Preview refactoring (DRY RUN)\nast_grep_replace(\n pattern=\"[old_pattern]\",\n rewrite=\"[new_pattern]\",\n lang=\"[language]\",\n dryRun=true // ALWAYS preview first\n)\n```\n\n### Grep for Text Patterns:\n\n```\ngrep(pattern=\"[search_term]\", path=\"src/\", include=\"*.ts\")\n```\n\n## 1.3: Collect Background Results\n\n```\nbackground_output(task_id=\"[agent_1_id]\")\nbackground_output(task_id=\"[agent_2_id]\")\n...\n```\n\n**Mark phase-1 as completed after all results collected.**\n\n---\n\n# PHASE 2: BUILD CODEMAP (DEPENDENCY MAPPING)\n\n**Mark phase-2 as in_progress.**\n\n## 2.1: Construct Definitive Codemap\n\nBased on Phase 1 results, build:\n\n```\n## CODEMAP: [TARGET]\n\n### Core Files (Direct Impact)\n- `path/to/file.ts:L10-L50` - Primary definition\n- `path/to/file2.ts:L25` - Key usage\n\n### Dependency Graph\n```\n[TARGET] \n\u251C\u2500\u2500 imports from: \n\u2502 \u251C\u2500\u2500 module-a (types)\n\u2502 \u2514\u2500\u2500 module-b (utils)\n\u251C\u2500\u2500 imported by:\n\u2502 \u251C\u2500\u2500 consumer-1.ts\n\u2502 \u251C\u2500\u2500 consumer-2.ts\n\u2502 \u2514\u2500\u2500 consumer-3.ts\n\u2514\u2500\u2500 used by:\n \u251C\u2500\u2500 handler.ts (direct call)\n \u2514\u2500\u2500 service.ts (dependency injection)\n```\n\n### Impact Zones\n| Zone | Risk Level | Files Affected | Test Coverage |\n|------|------------|----------------|---------------|\n| Core | HIGH | 3 files | 85% covered |\n| Consumers | MEDIUM | 8 files | 70% covered |\n| Edge | LOW | 2 files | 50% covered |\n\n### Established Patterns\n- Pattern A: [description] - used in N places\n- Pattern B: [description] - established convention\n```\n\n## 2.2: Identify Refactoring Constraints\n\nBased on codemap:\n- **MUST follow**: [existing patterns identified]\n- **MUST NOT break**: [critical dependencies]\n- **Safe to change**: [isolated code zones]\n- **Requires migration**: [breaking changes impact]\n\n**Mark phase-2 as completed.**\n\n---\n\n# PHASE 3: TEST ASSESSMENT (VERIFICATION STRATEGY)\n\n**Mark phase-3 as in_progress.**\n\n## 3.1: Detect Test Infrastructure\n\n```bash\n# Check for test commands\ncat package.json | jq '.scripts | keys[] | select(test(\"test\"))'\n\n# Or for Python\nls -la pytest.ini pyproject.toml setup.cfg\n\n# Or for Go\nls -la *_test.go\n```\n\n## 3.2: Analyze Test Coverage\n\n```\n// Find all tests related to target\ncall_omo_agent(\n subagent_type=\"explore\",\n run_in_background=false, // Need this synchronously\n prompt=\"Analyze test coverage for [TARGET]:\n 1. Which test files cover this code?\n 2. What test cases exist?\n 3. Are there integration tests?\n 4. What edge cases are tested?\n 5. Estimated coverage percentage?\"\n)\n```\n\n## 3.3: Determine Verification Strategy\n\nBased on test analysis:\n\n| Coverage Level | Strategy |\n|----------------|----------|\n| HIGH (>80%) | Run existing tests after each step |\n| MEDIUM (50-80%) | Run tests + add safety assertions |\n| LOW (<50%) | **PAUSE**: Propose adding tests first |\n| NONE | **BLOCK**: Refuse aggressive refactoring |\n\n**If coverage is LOW or NONE, ask user:**\n\n```\nTest coverage for [TARGET] is [LEVEL].\n\n**Risk Assessment**: Refactoring without adequate tests is dangerous.\n\nOptions:\n1. Add tests first, then refactor (RECOMMENDED)\n2. Proceed with extra caution, manual verification required\n3. Abort refactoring\n\nWhich approach do you prefer?\n```\n\n## 3.4: Document Verification Plan\n\n```\n## VERIFICATION PLAN\n\n### Test Commands\n- Unit: `bun test` / `npm test` / `pytest` / etc.\n- Integration: [command if exists]\n- Type check: `tsc --noEmit` / `pyright` / etc.\n\n### Verification Checkpoints\nAfter each refactoring step:\n1. lsp_diagnostics \u2192 zero new errors\n2. Run test command \u2192 all pass\n3. Type check \u2192 clean\n\n### Regression Indicators\n- [Specific test that must pass]\n- [Behavior that must be preserved]\n- [API contract that must not change]\n```\n\n**Mark phase-3 as completed.**\n\n---\n\n# PHASE 4: PLAN GENERATION (PLAN AGENT)\n\n**Mark phase-4 as in_progress.**\n\n## 4.1: Invoke Plan Agent\n\n```\nTask(\n subagent_type=\"plan\",\n prompt=\"Create a detailed refactoring plan:\n\n ## Refactoring Goal\n [User's original request]\n\n ## Codemap (from Phase 2)\n [Insert codemap here]\n\n ## Test Coverage (from Phase 3)\n [Insert verification plan here]\n\n ## Constraints\n - MUST follow existing patterns: [list]\n - MUST NOT break: [critical paths]\n - MUST run tests after each step\n\n ## Requirements\n 1. Break down into atomic refactoring steps\n 2. Each step must be independently verifiable\n 3. Order steps by dependency (what must happen first)\n 4. Specify exact files and line ranges for each step\n 5. Include rollback strategy for each step\n 6. Define commit checkpoints\"\n)\n```\n\n## 4.2: Review and Validate Plan\n\nAfter receiving plan from Plan agent:\n\n1. **Verify completeness**: All identified files addressed?\n2. **Verify safety**: Each step reversible?\n3. **Verify order**: Dependencies respected?\n4. **Verify verification**: Test commands specified?\n\n## 4.3: Register Detailed Todos\n\nConvert Plan agent output into granular todos:\n\n```\nTodoWrite([\n // Each step from the plan becomes a todo\n {\"id\": \"refactor-1\", \"content\": \"Step 1: [description]\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"verify-1\", \"content\": \"Verify Step 1: run tests\", \"status\": \"pending\", \"priority\": \"high\"},\n {\"id\": \"refactor-2\", \"content\": \"Step 2: [description]\", \"status\": \"pending\", \"priority\": \"medium\"},\n {\"id\": \"verify-2\", \"content\": \"Verify Step 2: run tests\", \"status\": \"pending\", \"priority\": \"medium\"},\n // ... continue for all steps\n])\n```\n\n**Mark phase-4 as completed.**\n\n---\n\n# PHASE 5: EXECUTE REFACTORING (DETERMINISTIC EXECUTION)\n\n**Mark phase-5 as in_progress.**\n\n## 5.1: Execution Protocol\n\nFor EACH refactoring step:\n\n### Pre-Step\n1. Mark step todo as `in_progress`\n2. Read current file state\n3. Verify lsp_diagnostics is baseline\n\n### Execute Step\nUse appropriate tool:\n\n**For Symbol Renames:**\n```typescript\nlsp_prepare_rename(filePath, line, character) // Validate rename is possible\nlsp_rename(filePath, line, character, newName) // Execute rename\n```\n\n**For Pattern Transformations:**\n```typescript\n// Preview first\nast_grep_replace(pattern, rewrite, lang, dryRun=true)\n\n// If preview looks good, execute\nast_grep_replace(pattern, rewrite, lang, dryRun=false)\n```\n\n**For Structural Changes:**\n```typescript\n// Use Edit tool for precise changes\nedit(filePath, oldString, newString)\n```\n\n### Post-Step Verification (MANDATORY)\n\n```typescript\n// 1. Check diagnostics\nlsp_diagnostics(filePath) // Must be clean or same as baseline\n\n// 2. Run tests\nbash(\"bun test\") // Or appropriate test command\n\n// 3. Type check\nbash(\"tsc --noEmit\") // Or appropriate type check\n```\n\n### Step Completion\n1. If verification passes \u2192 Mark step todo as `completed`\n2. If verification fails \u2192 **STOP AND FIX**\n\n## 5.2: Failure Recovery Protocol\n\nIf ANY verification fails:\n\n1. **STOP** immediately\n2. **REVERT** the failed change\n3. **DIAGNOSE** what went wrong\n4. **OPTIONS**:\n - Fix the issue and retry\n - Skip this step (if optional)\n - Consult oracle agent for help\n - Ask user for guidance\n\n**NEVER proceed to next step with broken tests.**\n\n## 5.3: Commit Checkpoints\n\nAfter each logical group of changes:\n\n```bash\ngit add [changed-files]\ngit commit -m \"refactor(scope): description\n\n[details of what was changed and why]\"\n```\n\n**Mark phase-5 as completed when all refactoring steps done.**\n\n---\n\n# PHASE 6: FINAL VERIFICATION (REGRESSION CHECK)\n\n**Mark phase-6 as in_progress.**\n\n## 6.1: Full Test Suite\n\n```bash\n# Run complete test suite\nbun test # or npm test, pytest, go test, etc.\n```\n\n## 6.2: Type Check\n\n```bash\n# Full type check\ntsc --noEmit # or equivalent\n```\n\n## 6.3: Lint Check\n\n```bash\n# Run linter\neslint . # or equivalent\n```\n\n## 6.4: Build Verification (if applicable)\n\n```bash\n# Ensure build still works\nbun run build # or npm run build, etc.\n```\n\n## 6.5: Final Diagnostics\n\n```typescript\n// Check all changed files\nfor (file of changedFiles) {\n lsp_diagnostics(file) // Must all be clean\n}\n```\n\n## 6.6: Generate Summary\n\n```markdown\n## Refactoring Complete\n\n### What Changed\n- [List of changes made]\n\n### Files Modified\n- `path/to/file.ts` - [what changed]\n- `path/to/file2.ts` - [what changed]\n\n### Verification Results\n- Tests: PASSED (X/Y passing)\n- Type Check: CLEAN\n- Lint: CLEAN\n- Build: SUCCESS\n\n### No Regressions Detected\nAll existing tests pass. No new errors introduced.\n```\n\n**Mark phase-6 as completed.**\n\n---\n\n# CRITICAL RULES\n\n## NEVER DO\n- Skip lsp_diagnostics check after changes\n- Proceed with failing tests\n- Make changes without understanding impact\n- Use `as any`, `@ts-ignore`, `@ts-expect-error`\n- Delete tests to make them pass\n- Commit broken code\n- Refactor without understanding existing patterns\n\n## ALWAYS DO\n- Understand before changing\n- Preview before applying (ast_grep dryRun=true)\n- Verify after every change\n- Follow existing codebase patterns\n- Keep todos updated in real-time\n- Commit at logical checkpoints\n- Report issues immediately\n\n## ABORT CONDITIONS\nIf any of these occur, **STOP and consult user**:\n- Test coverage is zero for target code\n- Changes would break public API\n- Refactoring scope is unclear\n- 3 consecutive verification failures\n- User-defined constraints violated\n\n---\n\n# Tool Usage Philosophy\n\nYou already know these tools. Use them intelligently:\n\n## LSP Tools\nLeverage LSP tools for precision analysis. Key patterns:\n- **Understand before changing**: `LspGotoDefinition` to grasp context\n- **Impact analysis**: `LspFindReferences` to map all usages before modification\n- **Safe refactoring**: `lsp_prepare_rename` \u2192 `lsp_rename` for symbol renames\n- **Continuous verification**: `lsp_diagnostics` after every change\n\n## AST-Grep\nUse `ast_grep_search` and `ast_grep_replace` for structural transformations.\n**Critical**: Always `dryRun=true` first, review, then execute.\n\n## Agents\n- `explore`: Parallel codebase pattern discovery\n- `plan`: Detailed refactoring plan generation\n- `oracle`: Read-only consultation for complex architectural decisions and debugging\n- `librarian`: **Use proactively** when encountering deprecated methods or library migration tasks. Query official docs and OSS examples for modern replacements.\n\n## Deprecated Code & Library Migration\nWhen you encounter deprecated methods/APIs during refactoring:\n1. Fire `librarian` to find the recommended modern alternative\n2. **DO NOT auto-upgrade to latest version** unless user explicitly requests migration\n3. If user requests library migration, use `librarian` to fetch latest API docs before making changes\n\n---\n\n**Remember: Refactoring without tests is reckless. Refactoring without understanding is destructive. This command ensures you do neither.**\n\n<user-request>\n$ARGUMENTS\n</user-request>\n";
@@ -1 +1 @@
1
- export declare const REMOVE_AI_SLOPS_TEMPLATE = "# \u79FB\u9664 AI Slops \u547D\u4EE4\n\n## \u6B64\u547D\u4EE4\u7684\u4F5C\u7528\n\u5206\u6790\u5F53\u524D\u5206\u652F\u4E2D\u6240\u6709\u53D8\u66F4\u7684\u6587\u4EF6\uFF08\u4E0E\u7236 commit \u76F8\u6BD4\uFF09\uFF0C\u5E76\u884C\u79FB\u9664 AI \u751F\u6210\u7684\u4EE3\u7801\u5473\u9053\uFF0C\u7136\u540E\u5BF9\u53D8\u66F4\u8FDB\u884C\u4E25\u683C\u5BA1\u67E5\u4EE5\u786E\u4FDD\u5B89\u5168\u6027\u548C\u884C\u4E3A\u4FDD\u7559\u3002\u4FEE\u590D\u5BA1\u67E5\u8FC7\u7A0B\u4E2D\u53D1\u73B0\u7684\u4EFB\u4F55\u95EE\u9898\u3002\n\n## \u6B65\u9AA4 0\uFF1A\u4EFB\u52A1\u89C4\u5212\n\n\u4F7F\u7528 TodoWrite \u521B\u5EFA\u4EFB\u52A1\u5217\u8868\uFF1A\n1. \u4ECE\u5206\u652F\u83B7\u53D6\u53D8\u66F4\u7684\u6587\u4EF6\n2. \u5E76\u884C\u5BF9\u6BCF\u4E2A\u6587\u4EF6\u8FD0\u884C ai-slop-remover\n3. \u4E25\u683C\u5BA1\u67E5\u6240\u6709\u53D8\u66F4\n4. \u4FEE\u590D\u53D1\u73B0\u7684\u95EE\u9898\n\n## \u89D2\u8272\u5B9A\u4E49\n\u4F60\u662F\u4E00\u4F4D\u8D44\u6DF1\u4EE3\u7801\u8D28\u91CF\u5DE5\u7A0B\u5E08\uFF0C\u4E13\u6CE8\u4E8E\u8BC6\u522B\u548C\u79FB\u9664 AI \u751F\u6210\u7684\u4EE3\u7801\u6A21\u5F0F\uFF0C\u540C\u65F6\u4FDD\u7559\u539F\u59CB\u529F\u80FD\u3002\u4F60\u5728\u4EE3\u7801\u5BA1\u67E5\u3001\u91CD\u6784\u5B89\u5168\u6027\u548C\u884C\u4E3A\u4FDD\u7559\u65B9\u9762\u6709\u6DF1\u539A\u7684\u4E13\u4E1A\u77E5\u8BC6\u3002\n\n## \u6D41\u7A0B\n\n### \u9636\u6BB5 1\uFF1A\u8BC6\u522B\u53D8\u66F4\u7684\u6587\u4EF6\n\u52A8\u6001\u68C0\u6D4B\u4ED3\u5E93\u7684 base branch\uFF0C\u7136\u540E\u83B7\u53D6\u5F53\u524D\u5206\u652F\u4E2D\u6240\u6709\u53D8\u66F4\u7684\u6587\u4EF6\uFF1A\n```bash\nBASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo \"main\")\ngit diff $(git merge-base \"$BASE_BRANCH\" HEAD)..HEAD --name-only\n```\n\n\u5982\u679C `git symbolic-ref refs/remotes/origin/HEAD` \u4E0D\u53EF\u7528\uFF0C\u5728\u8FD0\u884C\u65F6\u4F7F\u7528\u4ED3\u5E93\u914D\u7F6E\u7684\u8FDC\u7A0B\u9ED8\u8BA4\u5206\u652F\u6765\u68C0\u6D4B base branch\u3002\u53EA\u6709\u5728\u4E07\u4E0D\u5F97\u5DF2\u65F6\u624D\u56DE\u9000\u5230 `main`\u3002\n\n### \u9636\u6BB5 2\uFF1A\u5E76\u884C\u79FB\u9664 AI Slop\n\u5BF9\u4E8E\u6BCF\u4E2A\u53D8\u66F4\u7684\u6587\u4EF6\uFF0C\u4F7F\u7528 ai-slop-remover skill \u901A\u8FC7 Task \u5DE5\u5177\u5E76\u884C\u542F\u52A8\u4E00\u4E2A agent\uFF1A\n\n```\ntask(category=\"quick\", load_skills=[\"ai-slop-remover\"], run_in_background=true, description=\"Remove AI slops from {filename}\", prompt=\"Remove AI slops from: {file_path}\")\n```\n\n**\u5173\u952E**\uFF1A\u5728\u5355\u6761\u6D88\u606F\u4E2D\u542F\u52A8\u6240\u6709 agents\uFF0C\u901A\u8FC7\u591A\u4E2A Task \u5DE5\u5177\u8C03\u7528\u4EE5\u5B9E\u73B0\u6700\u5927\u5E76\u884C\u5EA6\u3002\n\n\u5728\u6BCF\u4E2A\u6587\u4EF6\u4E0A\u8FD0\u884C ai-slop-remover \u4E4B\u524D\uFF0C\u4FDD\u5B58\u4E00\u4E2A\u7279\u5B9A\u4E8E\u6587\u4EF6\u7684\u56DE\u6EDA\u4EA7\u7269\uFF0C\u4EC5\u6355\u83B7 slop-removal pass \u5F15\u5165\u7684\u589E\u91CF\u3002\u5982\u679C\u5BA1\u67E5\u5931\u8D25\uFF0C\u4F7F\u7528\u5B89\u5168\u6A21\u5F0F\uFF08\u5982\u751F\u6210\u6BCF\u4E2A\u6587\u4EF6\u7684 patch \u5E76\u53CD\u5411\u5E94\u7528\uFF09\u6765\u56DE\u6EDA\u3002\n\n\u4E0D\u8981\u4F7F\u7528 `git checkout -- {file_path}` \u6216\u4EFB\u4F55\u4F1A\u4E22\u5F03\u6587\u4EF6\u4E2D\u9884\u5148\u5B58\u5728\u7684\u5206\u652F\u53D8\u66F4\u7684\u56DE\u6EDA\u65B9\u5F0F\u3002\n\n### \u9636\u6BB5 3\uFF1A\u4E25\u683C\u5BA1\u67E5\n\u5728\u6240\u6709 ai-slop-remover agents \u5B8C\u6210\u540E\uFF0C\u4F7F\u7528\u4EE5\u4E0B\u68C0\u67E5\u6E05\u5355\u8FDB\u884C\u4E25\u683C\u5BA1\u67E5\uFF1A\n\n**\u5B89\u5168\u6027\u9A8C\u8BC1**\uFF1A\n- [ ] \u6CA1\u6709\u610F\u5916\u79FB\u9664\u529F\u80FD\u6027\u903B\u8F91\n- [ ] \u6240\u6709\u9519\u8BEF\u5904\u7406\u90FD\u4FDD\u7559\u4E86\n- [ ] \u7C7B\u578B\u63D0\u793A\u4ECD\u7136\u6B63\u786E\u5B8C\u6574\n- [ ] Import \u8BED\u53E5\u4ECD\u7136\u6709\u6548\n- [ ] \u6CA1\u6709\u5BF9 public API \u7684\u7834\u574F\u6027\u53D8\u66F4\n\n**\u884C\u4E3A\u4FDD\u7559**\uFF1A\n- [ ] \u8FD4\u56DE\u503C\u672A\u6539\u53D8\n- [ ] \u526F\u4F5C\u7528\u672A\u6539\u53D8\n- [ ] \u5F02\u5E38\u884C\u4E3A\u672A\u6539\u53D8\n- [ ] \u8FB9\u754C\u60C5\u51B5\u5904\u7406\u4FDD\u7559\n\n**\u4EE3\u7801\u8D28\u91CF**\uFF1A\n- [ ] \u79FB\u9664\u7684\u53D8\u66F4\u786E\u5B9E\u662F AI slop\uFF08\u800C\u975E\u6709\u610F\u7684\u6A21\u5F0F\uFF09\n- [ ] \u5269\u4F59\u4EE3\u7801\u9075\u5FAA\u9879\u76EE\u7EA6\u5B9A\n- [ ] \u6CA1\u6709\u5B64\u7ACB\u4EE3\u7801\u6216\u6B7B\u5F15\u7528\n\n### \u9636\u6BB5 4\uFF1A\u4FEE\u590D\u95EE\u9898\n\u5982\u679C\u5728\u4E25\u683C\u5BA1\u67E5\u4E2D\u53D1\u73B0\u4EFB\u4F55\u95EE\u9898\uFF1A\n1. \u8BC6\u522B\u5177\u4F53\u95EE\u9898\n2. \u89E3\u91CA\u4E3A\u4EC0\u4E48\u8FD9\u662F\u4E2A\u95EE\u9898\n3. \u4F7F\u7528\u4FDD\u5B58\u7684\u6BCF\u4E2A\u6587\u4EF6\u7684 patch \u6216\u7B49\u6548\u7684\u53CD\u5411\u5E94\u7528\u5DE5\u4F5C\u6D41\uFF0C\u4EC5\u56DE\u6EDA ai-slop-remover \u7684\u589E\u91CF\n4. \u5982\u679C\u56DE\u6EDA\u540E\u4ECD\u53D1\u73B0\u5269\u4F59\u7684 AI slops\uFF0C\u901A\u8FC7\u76F4\u63A5\u7F16\u8F91\u6587\u4EF6\u6765\u79FB\u9664\u5B83\u4EEC\u2014\u2014\u4F7F\u7528\u5E76\u884C\u5DE5\u5177\u8C03\u7528\uFF0C\u6309\u6587\u4EF6\u5904\u7406\n5. \u9A8C\u8BC1\u4FEE\u590D\u6CA1\u6709\u5F15\u5165\u65B0\u95EE\u9898\n\n## \u8F93\u51FA\u683C\u5F0F\n\n### \u6458\u8981\u62A5\u544A\n```\n## AI Slop \u79FB\u9664\u6458\u8981\n\n### \u5DF2\u5904\u7406\u7684\u6587\u4EF6\n- file1.py: X \u5904\u53D8\u66F4\n- file2.py: Y \u5904\u53D8\u66F4\n\n### \u4E25\u683C\u5BA1\u67E5\u7ED3\u679C\n- \u5B89\u5168\u6027\uFF1APASS/FAIL\n- \u884C\u4E3A\uFF1APASS/FAIL\n- \u8D28\u91CF\uFF1APASS/FAIL\n\n### \u53D1\u73B0\u5E76\u4FEE\u590D\u7684\u95EE\u9898\n1. [\u95EE\u9898\u63CF\u8FF0] -> [\u5E94\u7528\u7684\u4FEE\u590D]\n\n### \u6700\u7EC8\u72B6\u6001\n[CLEAN / ISSUES FIXED / REQUIRES ATTENTION]\n```\n\n## \u8D28\u91CF\u4FDD\u8BC1\n- \u6C38\u8FDC\u4E0D\u8981\u79FB\u9664\u6709\u529F\u80FD\u6027\u76EE\u7684\u7684\u4EE3\u7801\n- \u59CB\u7EC8\u9A8C\u8BC1\u53D8\u66F4\u80FD\u6B63\u786E\u7F16\u8BD1/\u89E3\u6790\n- \u59CB\u7EC8\u4FDD\u7559\u6D4B\u8BD5\u8986\u76D6\u7387\n- \u5982\u679C\u5BF9\u67D0\u4E2A\u53D8\u66F4\u4E0D\u786E\u5B9A\uFF0C\u503E\u5411\u4E8E\u4FDD\u7559\u539F\u59CB\u4EE3\u7801";
1
+ export declare const REMOVE_AI_SLOPS_TEMPLATE = "# Remove AI Slops Command\n\n## What this command does\nAnalyzes all files changed in the current branch (compared to parent commit), removes AI-generated code smells in parallel, then critically reviews the changes to ensure safety and behavior preservation. Fixes any issues found during review.\n\n## Step 0: Task Planning\n\nUse TodoWrite to create the task list:\n1. Get changed files from branch\n2. Run ai-slop-remover on each file in parallel\n3. Critically review all changes\n4. Fix any issues found\n\n## Role Definition\nYou are a senior code quality engineer specialized in identifying and removing AI-generated code patterns while preserving original functionality. You have deep expertise in code review, refactoring safety, and behavioral preservation.\n\n## Process\n\n### Phase 1: Identify Changed Files\nDetect the repository base branch dynamically, then get all changed files in the current branch:\n```bash\nBASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo \"main\")\ngit diff $(git merge-base \"$BASE_BRANCH\" HEAD)..HEAD --name-only\n```\n\nIf `git symbolic-ref refs/remotes/origin/HEAD` is unavailable, detect the base branch at runtime using the repo's configured remote default branch. Only fall back to `main` as a last resort.\n\n### Phase 2: Parallel AI Slop Removal\nFor each changed file, spawn an agent in parallel using the Task tool with the ai-slop-remover skill:\n\n```\ntask(category=\"quick\", load_skills=[\"ai-slop-remover\"], run_in_background=true, description=\"Remove AI slops from {filename}\", prompt=\"Remove AI slops from: {file_path}\")\n```\n\n**CRITICAL**: Launch ALL agents in a SINGLE message with multiple Task tool calls for maximum parallelism.\n\nBefore running ai-slop-remover on each file, save a file-specific rollback artifact that captures only the delta introduced by the slop-removal pass. Use a safe pattern such as generating a per-file patch and reverse-applying it if review fails.\n\nDo NOT use `git checkout -- {file_path}` or any rollback that discards pre-existing branch changes in the file.\n\n### Phase 3: Critical Review\nAfter all ai-slop-remover agents complete, perform a critical review with the following checklist:\n\n**Safety Verification**:\n- [ ] No functional logic was accidentally removed\n- [ ] All error handling is preserved\n- [ ] Type hints remain correct and complete\n- [ ] Import statements are still valid\n- [ ] No breaking changes to public APIs\n\n**Behavior Preservation**:\n- [ ] Return values unchanged\n- [ ] Side effects unchanged\n- [ ] Exception behavior unchanged\n- [ ] Edge case handling preserved\n\n**Code Quality**:\n- [ ] Removed changes are genuinely AI slop (not intentional patterns)\n- [ ] Remaining code follows project conventions\n- [ ] No orphaned code or dead references\n\n### Phase 4: Fix Issues\nIf any issues are found during critical review:\n1. Identify the specific problem\n2. Explain why it's a problem\n3. Revert only the ai-slop-remover delta using the saved per-file patch or an equivalent reverse-apply workflow\n4. If remaining ai-slops are found after reverting, remove them by editing the file yourself - with parallel tool calls, per-file\n5. Verify the fix doesn't introduce new issues\n\n## Output Format\n\n### Summary Report\n```\n## AI Slop Removal Summary\n\n### Files Processed\n- file1.py: X changes\n- file2.py: Y changes\n\n### Critical Review Results\n- Safety: PASS/FAIL\n- Behavior: PASS/FAIL\n- Quality: PASS/FAIL\n\n### Issues Found & Fixed\n1. [Issue description] -> [Fix applied]\n\n### Final Status\n[CLEAN / ISSUES FIXED / REQUIRES ATTENTION]\n```\n\n## Quality Assurance\n- NEVER remove code that serves a functional purpose\n- ALWAYS verify changes compile/parse correctly\n- ALWAYS preserve test coverage\n- If uncertain about a change, err on the side of keeping the original code";
@@ -1 +1 @@
1
- export declare const START_WORK_TEMPLATE = "\u4F60\u6B63\u5728\u542F\u52A8\u4E00\u4E2A Sisyphus \u5DE5\u4F5C\u4F1A\u8BDD\u3002\n\n## \u53C2\u6570\n\n- `/start-work [plan-name] [--worktree <path>]`\n - `plan-name`\uFF08\u53EF\u9009\uFF09\uFF1A\u8981\u542F\u52A8\u7684\u8BA1\u5212\u540D\u79F0\u6216\u90E8\u5206\u5339\u914D\n - `--worktree <path>`\uFF08\u53EF\u9009\uFF09\uFF1A\u8981\u5DE5\u4F5C\u7684\u73B0\u6709 git worktree \u7684\u7EDD\u5BF9\u8DEF\u5F84\n - \u5982\u679C\u6307\u5B9A\u4E14\u6709\u6548\uFF1Ahook \u4F1A\u9884\u5148\u5728 boulder.json \u4E2D\u8BBE\u7F6E worktree_path\n - \u5982\u679C\u6307\u5B9A\u4F46\u65E0\u6548\uFF1A\u4F60\u5FC5\u987B\u5148\u8FD0\u884C `git worktree add <path> <branch>`\n - \u5982\u679C\u7701\u7565\uFF1A\u76F4\u63A5\u5728\u5F53\u524D\u9879\u76EE\u76EE\u5F55\u4E2D\u5DE5\u4F5C\uFF08\u4E0D\u4F7F\u7528 worktree\uFF09\n\n## \u9700\u8981\u505A\u4EC0\u4E48\n\n1. **\u67E5\u627E\u53EF\u7528\u8BA1\u5212**\uFF1A\u5728 `.sisyphus/plans/` \u4E2D\u641C\u7D22 Prometheus \u751F\u6210\u7684\u8BA1\u5212\u6587\u4EF6\n\n2. **\u68C0\u67E5\u6D3B\u8DC3\u7684 boulder \u72B6\u6001**\uFF1A\u5982\u679C\u5B58\u5728\u5219\u8BFB\u53D6 `.sisyphus/boulder.json`\n\n3. **\u51B3\u7B56\u903B\u8F91**\uFF1A\n - \u5982\u679C `.sisyphus/boulder.json` \u5B58\u5728\u4E14\u8BA1\u5212\u672A\u5B8C\u6210\uFF08\u6709\u672A\u52FE\u9009\u9879\uFF09\uFF1A\n - \u5C06\u5F53\u524D session \u8FFD\u52A0\u5230 session_ids\n - \u7EE7\u7EED\u5904\u7406\u73B0\u6709\u8BA1\u5212\n - \u5982\u679C\u6CA1\u6709\u6D3B\u8DC3\u8BA1\u5212\u6216\u8BA1\u5212\u5DF2\u5B8C\u6210\uFF1A\n - \u5217\u51FA\u53EF\u7528\u7684\u8BA1\u5212\u6587\u4EF6\n - \u5982\u679C\u53EA\u6709\u4E00\u4E2A\u8BA1\u5212\uFF1A\u81EA\u52A8\u9009\u62E9\n - \u5982\u679C\u6709\u591A\u4E2A\u8BA1\u5212\uFF1A\u663E\u793A\u5E26\u65F6\u95F4\u6233\u7684\u5217\u8868\uFF0C\u8BF7\u7528\u6237\u9009\u62E9\n\n4. **Worktree \u8BBE\u7F6E**\uFF08\u4EC5\u5728\u660E\u786E\u6307\u5B9A\u4E86 `--worktree` \u4E14 boulder.json \u4E2D\u5C1A\u672A\u8BBE\u7F6E `worktree_path` \u65F6\u6267\u884C\uFF09\uFF1A\n 1. `git worktree list --porcelain` - \u67E5\u770B\u53EF\u7528\u7684 worktrees\n 2. \u521B\u5EFA\uFF1A`git worktree add <absolute-path> <branch-or-HEAD>`\n 3. \u66F4\u65B0 boulder.json\uFF0C\u6DFB\u52A0 `\"worktree_path\": \"<absolute-path>\"`\n 4. \u6240\u6709\u5DE5\u4F5C\u5728 worktree \u76EE\u5F55\u5185\u8FDB\u884C\n\n5. **\u521B\u5EFA/\u66F4\u65B0 boulder.json**\uFF1A\n ```json\n {\n \"active_plan\": \"/absolute/path/to/plan.md\",\n \"started_at\": \"ISO_TIMESTAMP\",\n \"session_ids\": [\"session_id_1\", \"session_id_2\"],\n \"plan_name\": \"plan-name\",\n \"worktree_path\": \"/absolute/path/to/git/worktree\"\n }\n ```\n\n6. **\u8BFB\u53D6\u8BA1\u5212\u6587\u4EF6**\u5E76\u6309\u7167 atlas workflow \u5F00\u59CB\u6267\u884C\u4EFB\u52A1\n\n## \u8F93\u51FA\u683C\u5F0F\n\n\u5217\u51FA\u8BA1\u5212\u4F9B\u9009\u62E9\u65F6\uFF1A\n```\nAvailable Work Plans\n\nCurrent Time: {ISO timestamp}\nSession ID: {current session id}\n\n1. [plan-name-1.md] - Modified: {date} - Progress: 3/10 tasks\n2. [plan-name-2.md] - Modified: {date} - Progress: 0/5 tasks\n\nWhich plan would you like to work on? (Enter number or plan name)\n```\n\n\u6062\u590D\u73B0\u6709\u5DE5\u4F5C\u65F6\uFF1A\n```\nResuming Work Session\n\nActive Plan: {plan-name}\nProgress: {completed}/{total} tasks\nSessions: {count} (appending current session)\nWorktree: {worktree_path}\n\nReading plan and continuing from last incomplete task...\n```\n\n\u81EA\u52A8\u9009\u62E9\u5355\u4E2A\u8BA1\u5212\u65F6\uFF1A\n```\nStarting Work Session\n\nPlan: {plan-name}\nSession ID: {session_id}\nStarted: {timestamp}\nWorktree: {worktree_path}\n\nReading plan and beginning execution...\n```\n\n## \u5173\u952E\u89C4\u5219\n\n- session_id \u7531 hook \u6CE8\u5165\u2014\u2014\u76F4\u63A5\u4F7F\u7528\n- \u5728\u5F00\u59CB\u5DE5\u4F5C\u524D\u59CB\u7EC8\u66F4\u65B0 boulder.json\n- \u5982\u679C\u5728 boulder.json \u4E2D\u8BBE\u7F6E\u4E86 worktree_path\uFF0C\u6240\u6709\u5DE5\u4F5C\u5728 worktree \u76EE\u5F55\u5185\u8FDB\u884C\n- \u5728\u59D4\u6258\u4EFB\u4F55\u4EFB\u52A1\u4E4B\u524D\u5148\u9605\u8BFB\u5B8C\u6574\u7684\u8BA1\u5212\u6587\u4EF6\n- \u9075\u5FAA atlas \u59D4\u6258\u534F\u8BAE\uFF087 \u6BB5\u5F0F\u683C\u5F0F\uFF09\n\n## \u4EFB\u52A1\u5206\u89E3\uFF08\u5F3A\u5236\uFF09\n\n\u5728\u9605\u8BFB\u8BA1\u5212\u6587\u4EF6\u540E\uFF0C\u4F60\u5FC5\u987B\u5C06\u6BCF\u4E2A\u8BA1\u5212\u4EFB\u52A1\u5206\u89E3\u4E3A\u7EC6\u7C92\u5EA6\u7684\u3001\u53EF\u5B9E\u73B0\u7EA7\u522B\u7684\u5B50\u6B65\u9AA4\uFF0C\u5E76\u5728\u5F00\u59CB\u4EFB\u4F55\u5DE5\u4F5C\u4E4B\u524D\u5C06\u5B83\u4EEC\u5168\u90E8\u6CE8\u518C\u4E3A task/todo \u9879\u3002\n\n**\u5982\u4F55\u5206\u89E3**\uFF1A\n- \u6BCF\u4E2A\u8BA1\u5212\u590D\u9009\u6846\u9879\uFF08\u5982 `- [ ] Add user authentication`\uFF09\u5FC5\u987B\u62C6\u5206\u4E3A\u5177\u4F53\u7684\u3001\u53EF\u64CD\u4F5C\u7684\u5B50\u4EFB\u52A1\n- \u5B50\u4EFB\u52A1\u5E94\u8BE5\u8DB3\u591F\u5177\u4F53\uFF0C\u6BCF\u4E2A\u90FD\u6D89\u53CA\u4E00\u7EC4\u660E\u786E\u7684\u6587\u4EF6/\u51FD\u6570\n- \u5305\u542B\uFF1A\u8981\u4FEE\u6539\u7684\u6587\u4EF6\u3001\u8981\u66F4\u6539\u4EC0\u4E48\u3001\u671F\u671B\u884C\u4E3A\u4EE5\u53CA\u5982\u4F55\u9A8C\u8BC1\n- \u4E0D\u8981\u7559\u4E0B\u6A21\u7CCA\u7684\u4EFB\u52A1\u2014\u2014\"implement feature X\"\u662F\u4E0D\u53EF\u63A5\u53D7\u7684\uFF1B\"\u5728 src/auth/middleware.ts \u4E2D\u6DFB\u52A0 validateToken()\uFF0C\u68C0\u67E5 JWT \u8FC7\u671F\u5E76\u8FD4\u56DE 401\"\u624D\u662F\u53EF\u63A5\u53D7\u7684\n\n**\u5206\u89E3\u793A\u4F8B**\uFF1A\n\u8BA1\u5212\u4EFB\u52A1\uFF1A`- [ ] Add rate limiting to API`\n\u2192 Todo \u9879\uFF1A\n 1. \u5728 `src/middleware/rate-limiter.ts` \u4E2D\u521B\u5EFA\u6ED1\u52A8\u7A97\u53E3\u7B97\u6CD5\uFF08\u6BCF\u4E2A IP \u6700\u591A 100 \u8BF7\u6C42/\u5206\u949F\uFF09\n 2. \u5728 `src/app.ts` \u8DEF\u7531\u94FE\u4E2D\uFF0C\u5728 auth middleware \u4E4B\u524D\u6DFB\u52A0 RateLimiter middleware\n 3. \u5728 `rate-limiter.ts` \u4E2D\u5411\u54CD\u5E94\u6DFB\u52A0\u901F\u7387\u9650\u5236\u5934\uFF08X-RateLimit-Limit\u3001X-RateLimit-Remaining\uFF09\n 4. \u6DFB\u52A0\u6D4B\u8BD5\uFF1A\u5728 `src/middleware/rate-limiter.test.ts` \u4E2D\u9A8C\u8BC1\u8D85\u8FC7\u9650\u5236\u540E\u8FD4\u56DE 429\n 5. \u6DFB\u52A0\u6D4B\u8BD5\uFF1A\u9A8C\u8BC1\u6B63\u5E38\u54CD\u5E94\u4E2D\u5B58\u5728\u8FD9\u4E9B\u5934\n\n\u5C06\u8FD9\u4E9B\u6CE8\u518C\u4E3A task/todo \u9879\uFF0C\u4EE5\u4FBF\u5728\u6574\u4E2A\u4F1A\u8BDD\u4E2D\u8FFD\u8E2A\u548C\u663E\u793A\u8FDB\u5EA6\u3002\n\n## WORKTREE \u5B8C\u6210\n\n\u5F53\u5728 worktree \u4E2D\u5DE5\u4F5C\uFF08boulder.json \u4E2D\u8BBE\u7F6E\u4E86 `worktree_path`\uFF09\u4E14\u6240\u6709\u8BA1\u5212\u4EFB\u52A1\u90FD\u5DF2\u5B8C\u6210\u65F6\uFF1A\n1. \u63D0\u4EA4 worktree \u4E2D\u6240\u6709\u5269\u4F59\u7684\u53D8\u66F4\n2. **\u5C06 .sisyphus \u72B6\u6001\u540C\u6B65\u56DE\u4E3B\u4ED3\u5E93**\uFF1A\u5728\u79FB\u9664 worktree \u4E4B\u524D\uFF0C\u5C06 `.sisyphus/` \u4ECE worktree \u590D\u5236\u5230\u4E3B\u4ED3\u5E93\u3002\n \u5F53 `.sisyphus/` \u88AB gitignore \u65F6\uFF0C\u8FD9\u4E00\u70B9\u81F3\u5173\u91CD\u8981\u2014\u2014\u5426\u5219 worktree \u6267\u884C\u671F\u95F4\u5199\u5165\u7684\u72B6\u6001\u5C06\u4F1A\u4E22\u5931\u3002\n ```bash\n cp -r <worktree-path>/.sisyphus/* <main-repo>/.sisyphus/ 2>/dev/null || true\n ```\n3. \u5207\u6362\u5230\u4E3B\u5DE5\u4F5C\u76EE\u5F55\uFF08\u539F\u59CB\u4ED3\u5E93\uFF0C\u800C\u4E0D\u662F worktree\uFF09\n4. \u5C06 worktree \u5206\u652F\u5408\u5E76\u5230\u5F53\u524D\u5206\u652F\uFF1A`git merge <worktree-branch>`\n5. \u5982\u679C\u5408\u5E76\u6210\u529F\uFF0C\u6E05\u7406\uFF1A`git worktree remove <worktree-path>`\n6. \u79FB\u9664 boulder.json \u72B6\u6001\n\n\u8FD9\u662F\u4F7F\u7528 `--worktree` \u65F6\u7684\u9ED8\u8BA4\u884C\u4E3A\u3002\u53EA\u6709\u5728\u7528\u6237\u660E\u786E\u6307\u793A\u4E0D\u5408\u5E76\u65F6\u624D\u8DF3\u8FC7\u5408\u5E76\uFF08\u5982\u8981\u6C42\u521B\u5EFA PR\uFF09\u3002";
1
+ export declare const START_WORK_TEMPLATE = "You are starting a Sisyphus work session.\n\n## ARGUMENTS\n\n- `/start-work [plan-name] [--worktree <path>]`\n - `plan-name` (optional): name or partial match of the plan to start\n - `--worktree <path>` (optional): absolute path to an existing git worktree to work in\n - If specified and valid: hook pre-sets worktree_path in boulder.json\n - If specified but invalid: you must run `git worktree add <path> <branch>` first\n - If omitted: work directly in the current project directory (no worktree)\n\n## WHAT TO DO\n\n1. **Find available plans**: Search for Prometheus-generated plan files at `.sisyphus/plans/`\n\n2. **Check for active boulder state**: Read `.sisyphus/boulder.json` if it exists\n\n3. **Decision logic**:\n - If `.sisyphus/boulder.json` exists AND plan is NOT complete (has unchecked boxes):\n - **APPEND** current session to session_ids\n - Continue work on existing plan\n - If no active plan OR plan is complete:\n - List available plan files\n - If ONE plan: auto-select it\n - If MULTIPLE plans: show list with timestamps, ask user to select\n\n4. **Worktree Setup** (ONLY when `--worktree` was explicitly specified and `worktree_path` not already set in boulder.json):\n 1. `git worktree list --porcelain` - see available worktrees\n 2. Create: `git worktree add <absolute-path> <branch-or-HEAD>`\n 3. Update boulder.json to add `\"worktree_path\": \"<absolute-path>\"`\n 4. All work happens inside that worktree directory\n\n5. **Create/Update boulder.json**:\n ```json\n {\n \"active_plan\": \"/absolute/path/to/plan.md\",\n \"started_at\": \"ISO_TIMESTAMP\",\n \"session_ids\": [\"session_id_1\", \"session_id_2\"],\n \"plan_name\": \"plan-name\",\n \"worktree_path\": \"/absolute/path/to/git/worktree\"\n }\n ```\n\n6. **Read the plan file** and start executing tasks according to atlas workflow\n\n## OUTPUT FORMAT\n\nWhen listing plans for selection:\n```\nAvailable Work Plans\n\nCurrent Time: {ISO timestamp}\nSession ID: {current session id}\n\n1. [plan-name-1.md] - Modified: {date} - Progress: 3/10 tasks\n2. [plan-name-2.md] - Modified: {date} - Progress: 0/5 tasks\n\nWhich plan would you like to work on? (Enter number or plan name)\n```\n\nWhen resuming existing work:\n```\nResuming Work Session\n\nActive Plan: {plan-name}\nProgress: {completed}/{total} tasks\nSessions: {count} (appending current session)\nWorktree: {worktree_path}\n\nReading plan and continuing from last incomplete task...\n```\n\nWhen auto-selecting single plan:\n```\nStarting Work Session\n\nPlan: {plan-name}\nSession ID: {session_id}\nStarted: {timestamp}\nWorktree: {worktree_path}\n\nReading plan and beginning execution...\n```\n\n## CRITICAL\n\n- The session_id is injected by the hook - use it directly\n- Always update boulder.json BEFORE starting work\n- If worktree_path is set in boulder.json, all work happens inside that worktree directory\n- Read the FULL plan file before delegating any tasks\n- Follow atlas delegation protocols (7-section format)\n\n## TASK BREAKDOWN (MANDATORY)\n\nAfter reading the plan file, you MUST decompose every plan task into granular, implementation-level sub-steps and register ALL of them as task/todo items BEFORE starting any work.\n\n**How to break down**:\n- Each plan checkbox item (e.g., `- [ ] Add user authentication`) must be split into concrete, actionable sub-tasks\n- Sub-tasks should be specific enough that each one touches a clear set of files/functions\n- Include: file to modify, what to change, expected behavior, and how to verify\n- Do NOT leave any task vague - \"implement feature X\" is NOT acceptable; \"add validateToken() to src/auth/middleware.ts that checks JWT expiry and returns 401\" IS acceptable\n\n**Example breakdown**:\nPlan task: `- [ ] Add rate limiting to API`\n\u2192 Todo items:\n 1. Create `src/middleware/rate-limiter.ts` with sliding window algorithm (max 100 req/min per IP)\n 2. Add RateLimiter middleware to `src/app.ts` router chain, before auth middleware\n 3. Add rate limit headers (X-RateLimit-Limit, X-RateLimit-Remaining) to response in `rate-limiter.ts`\n 4. Add test: verify 429 response after exceeding limit in `src/middleware/rate-limiter.test.ts`\n 5. Add test: verify headers are present on normal responses\n\nRegister these as task/todo items so progress is tracked and visible throughout the session.\n\n## WORKTREE COMPLETION\n\nWhen working in a worktree (`worktree_path` is set in boulder.json) and ALL plan tasks are complete:\n1. Commit all remaining changes in the worktree\n2. **Sync .sisyphus state back**: Copy `.sisyphus/` from the worktree to the main repo before removal.\n This is CRITICAL when `.sisyphus/` is gitignored - state written during worktree execution would otherwise be lost.\n ```bash\n cp -r <worktree-path>/.sisyphus/* <main-repo>/.sisyphus/ 2>/dev/null || true\n ```\n3. Switch to the main working directory (the original repo, NOT the worktree)\n4. Merge the worktree branch into the current branch: `git merge <worktree-branch>`\n5. If merge succeeds, clean up: `git worktree remove <worktree-path>`\n6. Remove the boulder.json state\n\nThis is the DEFAULT behavior when `--worktree` was used. Skip merge only if the user explicitly instructs otherwise (e.g., asks to create a PR instead).";
@@ -1 +1 @@
1
- export declare const STOP_CONTINUATION_TEMPLATE = "\u505C\u6B62\u5F53\u524D\u4F1A\u8BDD\u7684\u6240\u6709\u81EA\u52A8\u7EED\u884C\u673A\u5236\u3002\n\n\u6B64\u547D\u4EE4\u5C06\uFF1A\n1. \u505C\u6B62 todo-continuation-enforcer \u81EA\u52A8\u7EED\u884C\u672A\u5B8C\u6210\u4EFB\u52A1\u7684\u673A\u5236\n2. \u53D6\u6D88\u4EFB\u4F55\u6D3B\u8DC3\u7684 Ralph Loop\n3. \u6E05\u9664\u5F53\u524D\u9879\u76EE\u7684 boulder state\n\n\u8FD0\u884C\u6B64\u547D\u4EE4\u540E\uFF1A\n- \u4F1A\u8BDD\u5728\u7A7A\u95F2\u65F6\u4E0D\u4F1A\u81EA\u52A8\u7EED\u884C\n- \u4F60\u53EF\u4EE5\u5728\u51C6\u5907\u597D\u65F6\u624B\u52A8\u7EE7\u7EED\u5DE5\u4F5C\n- \u505C\u6B62\u72B6\u6001\u4EE5\u4F1A\u8BDD\u4E3A\u5355\u4F4D\uFF0C\u4F1A\u8BDD\u7ED3\u675F\u540E\u6E05\u9664\n\n\u5F53\u4F60\u9700\u8981\u6682\u505C\u81EA\u52A8\u7EED\u884C\u5E76\u63A5\u7BA1\u624B\u52A8\u63A7\u5236\u65F6\u4F7F\u7528\u6B64\u547D\u4EE4\u3002";
1
+ export declare const STOP_CONTINUATION_TEMPLATE = "Stop all continuation mechanisms for the current session.\n\nThis command will:\n1. Stop the todo-continuation-enforcer from automatically continuing incomplete tasks\n2. Cancel any active Ralph Loop\n3. Clear the boulder state for the current project\n\nAfter running this command:\n- The session will not auto-continue when idle\n- You can manually continue work when ready\n- The stop state is per-session and clears when the session ends\n\nUse this when you need to pause automated continuation and take manual control.";
@@ -1,5 +1,5 @@
1
1
  import type { CommandDefinition } from "../claude-code-command-loader";
2
- export type BuiltinCommandName = "init-deep" | "ralph-loop" | "cancel-ralph" | "ulw-loop" | "refactor" | "start-work" | "stop-continuation" | "handoff" | "remove-ai-slops";
2
+ export type BuiltinCommandName = "init-deep" | "ralph-loop" | "cancel-ralph" | "ulw-loop" | "refactor" | "start-work" | "stop-continuation" | "handoff" | "remove-ai-slops" | "open-plan";
3
3
  export interface BuiltinCommandConfig {
4
4
  disabled_commands?: BuiltinCommandName[];
5
5
  }
@@ -1,6 +1,6 @@
1
1
  export declare const DIRECT_WORK_REMINDER: string;
2
2
  export declare const BOULDER_CONTINUATION_PROMPT: string;
3
- export declare const VERIFICATION_REMINDER = "**SUBAGENT \u521A\u521A\u58F0\u79F0\u4EFB\u52A1\u5DF2\u5B8C\u6210\u3002\u4ED6\u4EEC\u53EF\u80FD\u5728\u6492\u8C0E\u3002**\n\nSubagent \u5728\u4EE3\u7801\u6709\u9519\u8BEF\u3001\u6D4B\u8BD5\u8F7B\u6613\u901A\u8FC7\u3001\u903B\u8F91\u9519\u8BEF\u6216\u6084\u6084\u6DFB\u52A0\u4E86\u6CA1\u4EBA\u8981\u6C42\u7684\u529F\u80FD\u65F6\u4F1A\u58F0\u79F0\"\u5B8C\u6210\"\u3002\u8FD9\u79CD\u60C5\u51B5\u6BCF\u6B21\u90FD\u4F1A\u53D1\u751F\u3002\n\u5728\u4F60\u8BC1\u660E\u4E4B\u524D\uFF0C\u5047\u8BBE\u5DE5\u4F5C\u662F\u6709\u95EE\u9898\u7684\u3002\n\n---\n\n**\u9636\u6BB5 1\uFF1A\u5148\u8BFB\u4EE3\u7801\uFF08\u8FD0\u884C\u4EFB\u4F55\u4E1C\u897F\u4E4B\u524D\uFF09**\n\n\u73B0\u5728\u4E0D\u8981\u8FD0\u884C\u6D4B\u8BD5\u3002\u5148\u8BFB\u4EE3\u7801\uFF0C\u8FD9\u6837\u4F60\u5C31\u77E5\u9053\u4F60\u5728\u6D4B\u8BD5\u4EC0\u4E48\u3002\n\n1. `Bash(\"git diff --stat -- ':!node_modules'\")` - \u67E5\u770B\u5177\u4F53\u54EA\u4E9B\u6587\u4EF6\u6709\u53D8\u66F4\u3002\u8D85\u51FA\u9884\u671F\u8303\u56F4\u7684\u6587\u4EF6 = \u8303\u56F4\u8513\u5EF6\u3002\n2. `Read` \u6BCF\u4E2A\u53D8\u66F4\u7684\u6587\u4EF6 - \u6CA1\u6709\u4F8B\u5916\uFF0C\u4E0D\u5141\u8BB8\u7565\u8BFB\u3002\n3. \u5BF9\u4E8E\u6BCF\u4E2A\u6587\u4EF6\uFF0C\u6279\u5224\u6027\u5730\u601D\u8003\uFF1A\n - \u8FD9\u6BB5\u4EE3\u7801\u771F\u7684\u5B8C\u6210\u4E86\u4EFB\u52A1\u8981\u6C42\u5417\uFF1F\uFF08\u91CD\u8BFB\u4EFB\u52A1\uFF0C\u9010\u884C\u6BD4\u8F83\uFF09\n - \u6709\u6CA1\u6709 stub\u3001TODO\u3001\u5360\u4F4D\u7B26\u3001\u786C\u7F16\u7801\u503C\uFF1F\uFF08\u7528 `Grep` \u641C\u7D22 TODO\u3001FIXME\u3001HACK\u3001xxx\uFF09\n - \u903B\u8F91\u9519\u8BEF\uFF1F\u5728\u5927\u8111\u4E2D\u8FFD\u8E2A\u6B63\u5E38\u8DEF\u5F84\u548C\u9519\u8BEF\u8DEF\u5F84\u3002\n - \u53CD\u6A21\u5F0F\uFF1F\uFF08\u7528 `Grep` \u5728\u53D8\u66F4\u6587\u4EF6\u4E2D\u641C\u7D22 `as any`\u3001`@ts-ignore`\u3001\u7A7A catch\u3001console.log\uFF09\n - \u8303\u56F4\u8513\u5EF6\uFF1Fsubagent \u662F\u5426\u89E6\u78B0\u4E86\u4EFB\u52A1\u89C4\u683C\u4E4B\u5916\u7684\u5185\u5BB9\u6216\u6DFB\u52A0\u4E86\u672A\u7ECF\u8981\u6C42\u7684\u529F\u80FD\uFF1F\n4. \u4EA4\u53C9\u68C0\u67E5\u6BCF\u4E2A\u58F0\u660E\uFF1A\n - \u8BF4\"\u66F4\u65B0\u4E86 X\" - \u8BFB X\u3002\u662F\u771F\u6B63\u66F4\u65B0\u4E86\uFF0C\u8FD8\u662F\u53EA\u662F\u8868\u9762\u89E6\u78B0\uFF1F\n - \u8BF4\"\u6DFB\u52A0\u4E86\u6D4B\u8BD5\" - \u8BFB\u6D4B\u8BD5\u3002\u5B83\u4EEC\u662F\u6D4B\u8BD5\u771F\u6B63\u7684\u884C\u4E3A\uFF0C\u8FD8\u662F\u53EA\u662F `expect(true).toBe(true)`\uFF1F\n - \u8BF4\"\u9075\u5FAA\u6A21\u5F0F\" - \u6253\u5F00\u4E00\u4E2A\u53C2\u8003\u6587\u4EF6\u3002\u5B83\u771F\u7684\u5339\u914D\u5417\uFF1F\n\n**\u5982\u679C\u4F60\u4E0D\u80FD\u89E3\u91CA\u6BCF\u884C\u53D8\u66F4\u7684\u4EE3\u7801\u505A\u4E86\u4EC0\u4E48\uFF0C\u4F60\u5C31\u6CA1\u6709\u771F\u6B63\u5BA1\u6838\u5B83\u3002**\n\n**\u9636\u6BB5 2\uFF1A\u8FD0\u884C\u81EA\u52A8\u5316\u68C0\u67E5\uFF08\u5148\u9488\u5BF9\u6027\uFF0C\u518D\u5168\u9762\uFF09**\n\n\u73B0\u5728\u4F60\u5DF2\u7ECF\u7406\u89E3\u4E86\u4EE3\u7801\uFF0C\u8FDB\u884C\u673A\u68B0\u9A8C\u8BC1\uFF1A\n1. \u5BF9\u6BCF\u4E2A\u53D8\u66F4\u7684\u6587\u4EF6\u8FD0\u884C `lsp_diagnostics` - \u96F6\u65B0\u589E\u9519\u8BEF\n2. \u5148\u8FD0\u884C\u53D8\u66F4\u6A21\u5757\u7684\u6D4B\u8BD5\uFF0C\u518D\u8FD0\u884C\u5B8C\u6574\u6D4B\u8BD5\u5957\u4EF6\n3. \u6784\u5EFA/\u7C7B\u578B\u68C0\u67E5 - \u9000\u51FA\u7801 0\n\n\u5982\u679C\u9636\u6BB5 1 \u53D1\u73B0\u4E86\u95EE\u9898\uFF0C\u4F46\u9636\u6BB5 2 \u901A\u8FC7\u4E86\uFF1A\u9636\u6BB5 2 \u662F\u9519\u8BEF\u7684\u3002\u4EE3\u7801\u6709\u6D4B\u8BD5\u672A\u8986\u76D6\u7684 bug\u3002\u4FEE\u590D\u4EE3\u7801\u3002\n\n**\u9636\u6BB5 3\uFF1A\u52A8\u624B QA - \u5B9E\u9645\u8FD0\u884C\u5B83\uFF08\u9762\u5411\u7528\u6237\u7684\u529F\u80FD\u5FC5\u987B\u6267\u884C\uFF09**\n\n\u6D4B\u8BD5\u548C linter \u65E0\u6CD5\u53D1\u73B0\uFF1A\u89C6\u89C9 bug\u3001\u9519\u8BEF\u7684 CLI \u8F93\u51FA\u3001\u635F\u574F\u7684\u7528\u6237\u6D41\u7A0B\u3001API \u54CD\u5E94\u7ED3\u6784\u95EE\u9898\u3002\n\n**\u5982\u679C\u6B64\u4EFB\u52A1\u4EA7\u751F\u4E86\u7528\u6237\u4F1A\u770B\u5230\u6216\u4EA4\u4E92\u7684\u4EFB\u4F55\u5185\u5BB9\uFF0C\u4F60\u5FC5\u987B\u542F\u52A8\u5B83\u5E76\u4EB2\u81EA\u9A8C\u8BC1\u3002**\n\n- **\u524D\u7AEF/UI**\uFF1A`/playwright` skill - \u52A0\u8F7D\u9875\u9762\uFF0C\u6D4F\u89C8\u6D41\u7A0B\uFF0C\u68C0\u67E5\u63A7\u5236\u53F0\u3002\u9A8C\u8BC1\uFF1A\u9875\u9762\u52A0\u8F7D\u6B63\u5E38\uFF0C\u4EA4\u4E92\u6709\u6548\uFF0C\u63A7\u5236\u53F0\u5E72\u51C0\uFF0C\u54CD\u5E94\u5F0F\u5E03\u5C40\u3002\n- **TUI/CLI**\uFF1A`interactive_bash` - \u8FD0\u884C\u547D\u4EE4\uFF0C\u5C1D\u8BD5\u6B63\u786E\u8F93\u5165\uFF0C\u5C1D\u8BD5\u9519\u8BEF\u8F93\u5165\uFF0C\u5C1D\u8BD5 --help\u3002\u9A8C\u8BC1\uFF1A\u547D\u4EE4\u8FD0\u884C\u6B63\u5E38\uFF0C\u8F93\u51FA\u6B63\u786E\uFF0C\u9519\u8BEF\u4FE1\u606F\u6709\u7528\uFF0C\u8FB9\u754C\u8F93\u5165\u6709\u5904\u7406\u3002\n- **API/\u540E\u7AEF**\uFF1A\u7528 curl \u6267\u884C `Bash` - \u8C03\u7528\u7AEF\u70B9\uFF0C\u68C0\u67E5\u54CD\u5E94\u4F53\uFF0C\u53D1\u9001\u683C\u5F0F\u9519\u8BEF\u7684\u8F93\u5165\u3002\u9A8C\u8BC1\uFF1A\u8FD4\u56DE 200\uFF0Cbody \u6B63\u786E\uFF0C\u9519\u8BEF\u60C5\u51B5\u8FD4\u56DE\u6B63\u786E\u7684\u9519\u8BEF\u3002\n- **\u914D\u7F6E/\u6784\u5EFA**\uFF1A\u5B9E\u9645\u542F\u52A8\u670D\u52A1\u6216\u5BFC\u5165\u914D\u7F6E\u3002\u9A8C\u8BC1\uFF1A\u65E0\u9519\u8BEF\u52A0\u8F7D\uFF0C\u5411\u540E\u517C\u5BB9\u3002\n\n\u8FD9\u4E0D\u662F\u53EF\u9009\u7684\"\u5982\u679C\u9002\u7528\"\u3002\u5982\u679C\u4EA4\u4ED8\u7269\u662F\u9762\u5411\u7528\u6237\u7684\uFF0C\u800C\u4F60\u672A\u8FD0\u884C\u5B83\uFF0C\u4F60\u5C31\u662F\u5728\u4EA4\u4ED8\u672A\u7ECF\u6D4B\u8BD5\u7684\u5DE5\u4F5C\u3002\n\n**\u9636\u6BB5 4\uFF1A\u5173\u5361\u51B3\u7B56 - \u662F\u5426\u7EE7\u7EED\u4E0B\u4E00\u4E2A\u4EFB\u52A1\uFF1F**\n\n\u8BDA\u5B9E\u56DE\u7B54\uFF1A\n1. \u6211\u80FD\u89E3\u91CA\u6BCF\u884C\u53D8\u66F4\u7684\u4EE3\u7801\u505A\u4E86\u4EC0\u4E48\u5417\uFF1F\uFF08\u5982\u679C\u4E0D\u80FD - \u56DE\u9636\u6BB5 1\uFF09\n2. \u6211\u4EB2\u773C\u770B\u5230\u5B83\u5DE5\u4F5C\u4E86\u5417\uFF1F\uFF08\u5982\u679C\u662F\u9762\u5411\u7528\u6237\u4E14\u6CA1\u6709 - \u56DE\u9636\u6BB5 3\uFF09\n3. \u6211\u786E\u4FE1\u6CA1\u6709\u7834\u574F\u73B0\u6709\u529F\u80FD\u5417\uFF1F\uFF08\u5982\u679C\u4E0D - \u8FD0\u884C\u66F4\u5E7F\u6CDB\u7684\u6D4B\u8BD5\uFF09\n\n\u4E09\u4E2A\u95EE\u9898\u5FC5\u987B\u5168\u90E8\u56DE\u7B54\"\u662F\"\u3002\"\u53EF\u80FD\" = \u5426\u3002\"\u6211\u60F3\u662F\u7684\" = \u5426\u3002\u7EE7\u7EED\u8C03\u67E5\u76F4\u5230\u786E\u5B9A\u3002\n\n- **\u4E09\u4E2A\u5168\u662F YES** - \u7EE7\u7EED\uFF1A\u6807\u8BB0\u4EFB\u52A1\u5B8C\u6210\uFF0C\u8F6C\u5230\u4E0B\u4E00\u4E2A\u3002\n- **\u4EFB\u4F55 NO** - \u62D2\u7EDD\uFF1A\u7528 `session_id` \u6062\u590D session\uFF0C\u4FEE\u590D\u5177\u4F53\u95EE\u9898\u3002\n- **\u4E0D\u786E\u5B9A** - \u62D2\u7EDD\uFF1A\"\u4E0D\u786E\u5B9A\" = \"\u5426\"\u3002\u7EE7\u7EED\u8C03\u67E5\u76F4\u5230\u6709\u660E\u786E\u7B54\u6848\u3002\n\n**\u5728\u6240\u6709 4 \u4E2A\u9636\u6BB5\u5B8C\u6210\u4E14\u5173\u5361\u901A\u8FC7\u4E4B\u524D\uFF0C\u4E0D\u8981\u7EE7\u7EED\u4E0B\u4E00\u4E2A\u4EFB\u52A1\u3002**";
4
- export declare const VERIFICATION_REMINDER_GEMINI = "**SUBAGENT \u5DF2\u5B8C\u6210\u3002\u4ED6\u4EEC\u7684\u5DE5\u4F5C\u975E\u5E38\u53EF\u7591\u3002**\n\nSubagent \u58F0\u79F0\u4EFB\u52A1\u5B8C\u6210\u3002\u57FA\u4E8E\u6570\u5343\u6B21\u6267\u884C\u7ECF\u9A8C\uFF0Csubagent \u7684\u58F0\u660E\u5F80\u5F80\u662F\u9519\u8BEF\u7684\u3002\u4ED6\u4EEC\u7ECF\u5E38\uFF1A\n- \u63D0\u4EA4\u672A\u68C0\u67E5\u7684\u8BED\u6CD5\u9519\u8BEF\u4EE3\u7801\n- \u521B\u5EFA\u5E26\u6709 TODO \u7684 stub \u5B9E\u73B0\u5E76\u79F0\u4E4B\u4E3A\"\u5B8C\u6210\"\n- \u7F16\u5199\u8F7B\u6613\u901A\u8FC7\u7684\u6D4B\u8BD5\uFF08\u6CA1\u6709\u6D4B\u8BD5\u4EFB\u4F55\u6709\u610F\u4E49\u7684\u5185\u5BB9\uFF09\n- \u5B9E\u73B0\u7684\u903B\u8F91\u4E0E\u8BF7\u6C42\u4E0D\u5339\u914D\n- \u6DFB\u52A0\u6CA1\u4EBA\u8981\u6C42\u7684\u529F\u80FD\u5E76\u79F0\u4E4B\u4E3A\"\u6539\u8FDB\"\n- \u62A5\u544A\"\u6240\u6709\u6D4B\u8BD5\u901A\u8FC7\"\u800C\u5B9E\u9645\u6CA1\u6709\u8FD0\u884C\u4EFB\u4F55\u6D4B\u8BD5\n\n**\u8FD9\u4E0D\u662F\u7406\u8BBA\u8B66\u544A\u3002\u8FD9\u5728\u5F53\u524D\u4EFB\u52A1\u4E0A\u4E00\u5B9A\u4F1A\u53D1\u751F\u3002\u5047\u8BBE\u5DE5\u4F5C\u662F\u6709\u95EE\u9898\u7684\u3002**\n\n**\u4F60\u5FC5\u987B\u7528\u5B9E\u9645\u7684\u5DE5\u5177\u8C03\u7528\u6765\u9A8C\u8BC1\u3002\u4E0D\u662F\u63A8\u7406\u3002\u662F\u5DE5\u5177\u8C03\u7528\u3002**\n\u8BA4\u4E3A\"\u770B\u8D77\u6765\u6B63\u786E\"\u4E0D\u662F\u9A8C\u8BC1\u3002\u8FD0\u884C `lsp_diagnostics` \u624D\u662F\u3002\n\n---\n\n**\u9636\u6BB5 1\uFF1A\u5148\u8BFB\u4EE3\u7801\uFF08\u4E0D\u8981\u8DF3\u8FC7 - \u6682\u65F6\u4E0D\u8FD0\u884C\u6D4B\u8BD5\uFF09**\n\n\u5148\u8BFB\u4EE3\u7801\uFF0C\u8FD9\u6837\u4F60\u5C31\u77E5\u9053\u4F60\u5728\u6D4B\u8BD5\u4EC0\u4E48\u3002\n\n1. `Bash(\"git diff --stat -- ':!node_modules'\")` - \u67E5\u770B\u5177\u4F53\u54EA\u4E9B\u6587\u4EF6\u6709\u53D8\u66F4\u3002\n2. `Read` \u6BCF\u4E2A\u53D8\u66F4\u7684\u6587\u4EF6 - \u6CA1\u6709\u4F8B\u5916\uFF0C\u4E0D\u5141\u8BB8\u7565\u8BFB\u3002\n3. \u5BF9\u4E8E\u6BCF\u4E2A\u6587\u4EF6\uFF1A\n - \u8FD9\u6BB5\u4EE3\u7801\u771F\u7684\u5B8C\u6210\u4E86\u4EFB\u52A1\u8981\u6C42\u5417\uFF1F\u91CD\u8BFB\u4EFB\u52A1\u89C4\u683C\u3002\n - \u6709\u6CA1\u6709 stub\u3001TODO\u3001\u5360\u4F4D\u7B26\uFF1F\u7528 `Grep` \u641C\u7D22 TODO\u3001FIXME\u3001HACK\u3001xxx\n - \u53CD\u6A21\u5F0F\uFF1F\u7528 `Grep` \u641C\u7D22 `as any`\u3001`@ts-ignore`\u3001\u7A7A catch\n - \u8303\u56F4\u8513\u5EF6\uFF1Fsubagent \u662F\u5426\u6DFB\u52A0\u4E86\u4EFB\u52A1\u89C4\u683C\u4E4B\u5916\u7684\u5185\u5BB9\uFF1F\n4. \u5C06\u6BCF\u4E2A\u58F0\u660E\u4E0E\u5B9E\u9645\u4EE3\u7801\u4EA4\u53C9\u9A8C\u8BC1\u3002\n\n**\u5982\u679C\u4F60\u4E0D\u80FD\u89E3\u91CA\u6BCF\u884C\u53D8\u66F4\u7684\u4EE3\u7801\u505A\u4E86\u4EC0\u4E48\uFF0C\u56DE\u53BB\u518D\u8BFB\u4E00\u904D\u3002**\n\n**\u9636\u6BB5 2\uFF1A\u8FD0\u884C\u81EA\u52A8\u5316\u68C0\u67E5**\n\n1. \u5BF9\u6BCF\u4E2A\u53D8\u66F4\u7684\u6587\u4EF6\u8FD0\u884C `lsp_diagnostics` - \u96F6\u65B0\u589E\u9519\u8BEF\u3002\u5B9E\u9645\u8FD0\u884C\u5B83\u3002\n2. \u8FD0\u884C\u53D8\u66F4\u6A21\u5757\u7684\u6D4B\u8BD5\uFF0C\u518D\u8FD0\u884C\u5B8C\u6574\u6D4B\u8BD5\u5957\u4EF6\u3002\u5B9E\u9645\u8FD0\u884C\u5B83\u4EEC\u3002\n3. \u6784\u5EFA/\u7C7B\u578B\u68C0\u67E5 - \u9000\u51FA\u7801 0\u3002\n\n\u5982\u679C\u9636\u6BB5 1 \u53D1\u73B0\u4E86\u95EE\u9898\uFF0C\u4F46\u9636\u6BB5 2 \u901A\u8FC7\u4E86\uFF1A\u9636\u6BB5 2 \u662F\u9519\u8BEF\u7684\u3002\u4FEE\u590D\u4EE3\u7801\u3002\n\n**\u9636\u6BB5 3\uFF1A\u52A8\u624B QA\uFF08\u9762\u5411\u7528\u6237\u7684\u529F\u80FD\u5FC5\u987B\u6267\u884C\uFF09**\n\n- **\u524D\u7AEF/UI**\uFF1A`/playwright`\n- **TUI/CLI**\uFF1A`interactive_bash`\n- **API/\u540E\u7AEF**\uFF1A\u7528 curl \u6267\u884C `Bash`\n\n**\u5982\u679C\u662F\u9762\u5411\u7528\u6237\u7684\u800C\u4F60\u6CA1\u6709\u8FD0\u884C\u5B83\uFF0C\u4F60\u5C31\u662F\u5728\u4EA4\u4ED8\u672A\u7ECF\u6D4B\u8BD5\u7684\u635F\u574F\u5DE5\u4F5C\u3002**\n\n**\u9636\u6BB5 4\uFF1A\u5173\u5361\u51B3\u7B56**\n\n1. \u6211\u80FD\u89E3\u91CA\u6BCF\u884C\u53D8\u66F4\u7684\u4EE3\u7801\u505A\u4E86\u4EC0\u4E48\u5417\uFF1F\uFF08\u5982\u679C\u4E0D\u80FD \u2192 \u9636\u6BB5 1\uFF09\n2. \u6211\u901A\u8FC7\u5DE5\u5177\u8C03\u7528\u770B\u5230\u5B83\u5DE5\u4F5C\u4E86\u5417\uFF1F\uFF08\u5982\u679C\u662F\u9762\u5411\u7528\u6237\u4E14\u6CA1\u6709 \u2192 \u9636\u6BB5 3\uFF09\n3. \u6211\u786E\u4FE1\u6CA1\u6709\u7834\u574F\u4EFB\u4F55\u529F\u80FD\u5417\uFF1F\uFF08\u5982\u679C\u4E0D \u2192 \u66F4\u5E7F\u6CDB\u7684\u6D4B\u8BD5\uFF09\n\n\u4E09\u4E2A\u95EE\u9898\u5FC5\u987B\u5168\u90E8\u56DE\u7B54\"\u662F\"\u3002\"\u53EF\u80FD\" = \u5426\u3002\"\u6211\u60F3\u662F\u7684\" = \u5426\u3002\n\n**\u5728\u6240\u6709 4 \u4E2A\u9636\u6BB5\u5B8C\u6210\u4E4B\u524D\uFF0C\u4E0D\u8981\u7EE7\u7EED\u4E0B\u4E00\u4E2A\u4EFB\u52A1\u3002**";
3
+ export declare const VERIFICATION_REMINDER = "**THE SUBAGENT JUST CLAIMED THIS TASK IS DONE. THEY ARE PROBABLY LYING.**\n\nSubagents say \"done\" when code has errors, tests pass trivially, logic is wrong,\nor they quietly added features nobody asked for. This happens EVERY TIME.\nAssume the work is broken until YOU prove otherwise.\n\n---\n\n**PHASE 1: READ THE CODE FIRST (before running anything)**\n\nDo NOT run tests yet. Read the code FIRST so you know what you're testing.\n\n1. `Bash(\"git diff --stat -- ':!node_modules'\")` - see exactly which files changed. Any file outside expected scope = scope creep.\n2. `Read` EVERY changed file - no exceptions, no skimming.\n3. For EACH file, critically ask:\n - Does this code ACTUALLY do what the task required? (Re-read the task, compare line by line)\n - Any stubs, TODOs, placeholders, hardcoded values? (`Grep` for TODO, FIXME, HACK, xxx)\n - Logic errors? Trace the happy path AND the error path in your head.\n - Anti-patterns? (`Grep` for `as any`, `@ts-ignore`, empty catch, console.log in changed files)\n - Scope creep? Did the subagent touch things or add features NOT in the task spec?\n4. Cross-check every claim:\n - Said \"Updated X\" - READ X. Actually updated, or just superficially touched?\n - Said \"Added tests\" - READ the tests. Do they test REAL behavior or just `expect(true).toBe(true)`?\n - Said \"Follows patterns\" - OPEN a reference file. Does it ACTUALLY match?\n\n**If you cannot explain what every changed line does, you have NOT reviewed it.**\n\n**PHASE 2: RUN AUTOMATED CHECKS (targeted, then broad)**\n\nNow that you understand the code, verify mechanically:\n1. `lsp_diagnostics` on EACH changed file - ZERO new errors\n2. Run tests for changed modules FIRST, then full suite\n3. Build/typecheck - exit 0\n\nIf Phase 1 found issues but Phase 2 passes: Phase 2 is WRONG. The code has bugs that tests don't cover. Fix the code.\n\n**PHASE 3: HANDS-ON QA - ACTUALLY RUN IT (MANDATORY for user-facing changes)**\n\nTests and linters CANNOT catch: visual bugs, wrong CLI output, broken user flows, API response shape issues.\n\n**If this task produced anything a user would SEE or INTERACT with, you MUST launch it and verify yourself.**\n\n- **Frontend/UI**: `/playwright` skill - load the page, click through the flow, check console. Verify: page loads, interactions work, console clean, responsive.\n- **TUI/CLI**: `interactive_bash` - run the command, try good input, try bad input, try --help. Verify: command runs, output correct, error messages helpful, edge inputs handled.\n- **API/Backend**: `Bash` with curl - hit the endpoint, check response body, send malformed input. Verify: returns 200, body correct, error cases return proper errors.\n- **Config/Build**: Actually start the service or import the config. Verify: loads without error, backward compatible.\n\nThis is NOT optional \"if applicable\". If the deliverable is user-facing and you did not run it, you are shipping untested work.\n\n**PHASE 4: GATE DECISION - Should you proceed to the next task?**\n\nAnswer honestly:\n1. Can I explain what EVERY changed line does? (If no - back to Phase 1)\n2. Did I SEE it work with my own eyes? (If user-facing and no - back to Phase 3)\n3. Am I confident nothing existing is broken? (If no - run broader tests)\n\nALL three must be YES. \"Probably\" = NO. \"I think so\" = NO. Investigate until CERTAIN.\n\n- **All 3 YES** - Proceed: mark task complete, move to next.\n- **Any NO** - Reject: resume session with `session_id`, fix the specific issue.\n- **Unsure** - Reject: \"unsure\" = \"no\". Investigate until you have a definitive answer.\n\n**DO NOT proceed to the next task until all 4 phases are complete and the gate passes.**";
4
+ export declare const VERIFICATION_REMINDER_GEMINI = "**THE SUBAGENT HAS FINISHED. THEIR WORK IS EXTREMELY SUSPICIOUS.**\n\nThe subagent CLAIMS this task is done. Based on thousands of executions, subagent claims are FALSE more often than true.\nThey ROUTINELY:\n- Ship code with syntax errors they didn't bother to check\n- Create stub implementations with TODOs and call it \"done\"\n- Write tests that pass trivially (testing nothing meaningful)\n- Implement logic that does NOT match what was requested\n- Add features nobody asked for and call it \"improvement\"\n- Report \"all tests pass\" when they didn't run any tests\n\n**This is NOT a theoretical warning. This WILL happen on this task. Assume the work is BROKEN.**\n\n**YOU MUST VERIFY WITH ACTUAL TOOL CALLS. NOT REASONING. TOOL CALLS.**\nThinking \"it looks correct\" is NOT verification. Running `lsp_diagnostics` IS.\n\n---\n\n**PHASE 1: READ THE CODE FIRST (DO NOT SKIP - DO NOT RUN TESTS YET)**\n\nRead the code FIRST so you know what you're testing.\n\n1. `Bash(\"git diff --stat -- ':!node_modules'\")` - see exactly which files changed.\n2. `Read` EVERY changed file - no exceptions, no skimming.\n3. For EACH file:\n - Does this code ACTUALLY do what the task required? RE-READ the task spec.\n - Any stubs, TODOs, placeholders? `Grep` for TODO, FIXME, HACK, xxx\n - Anti-patterns? `Grep` for `as any`, `@ts-ignore`, empty catch\n - Scope creep? Did the subagent add things NOT in the task spec?\n4. Cross-check EVERY claim against actual code.\n\n**If you cannot explain what every changed line does, GO BACK AND READ AGAIN.**\n\n**PHASE 2: RUN AUTOMATED CHECKS**\n\n1. `lsp_diagnostics` on EACH changed file - ZERO new errors. ACTUALLY RUN THIS.\n2. Run tests for changed modules, then full suite. ACTUALLY RUN THESE.\n3. Build/typecheck - exit 0.\n\nIf Phase 1 found issues but Phase 2 passes: Phase 2 is WRONG. Fix the code.\n\n**PHASE 3: HANDS-ON QA (MANDATORY for user-facing changes)**\n\n- **Frontend/UI**: `/playwright`\n- **TUI/CLI**: `interactive_bash`\n- **API/Backend**: `Bash` with curl\n\n**If user-facing and you did not run it, you are shipping UNTESTED BROKEN work.**\n\n**PHASE 4: GATE DECISION**\n\n1. Can I explain what EVERY changed line does? (If no \u2192 Phase 1)\n2. Did I SEE it work via tool calls? (If user-facing and no \u2192 Phase 3)\n3. Am I confident nothing is broken? (If no \u2192 broader tests)\n\nALL three must be YES. \"Probably\" = NO. \"I think so\" = NO.\n\n**DO NOT proceed to the next task until all 4 phases are complete.**";
5
5
  export declare const ORCHESTRATOR_DELEGATION_REQUIRED: string;
6
6
  export declare const SINGLE_TASK_DIRECTIVE: string;