@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.
- package/dist/agents/atlas/default-prompt-sections.d.ts +6 -6
- package/dist/agents/atlas/gemini-prompt-sections.d.ts +6 -6
- package/dist/agents/atlas/gpt-prompt-sections.d.ts +6 -6
- package/dist/agents/builtin-agents/environment-context.d.ts +1 -0
- package/dist/agents/builtin-agents/general-agents.d.ts +1 -0
- package/dist/agents/builtin-agents/hephaestus-agent.d.ts +1 -0
- package/dist/agents/builtin-agents/sisyphus-agent.d.ts +1 -0
- package/dist/agents/builtin-agents.d.ts +1 -1
- package/dist/agents/env-context.d.ts +1 -7
- package/dist/agents/metis.d.ts +9 -9
- package/dist/agents/momus.d.ts +11 -8
- package/dist/agents/prometheus/behavioral-summary.d.ts +1 -1
- package/dist/agents/prometheus/high-accuracy-mode.d.ts +1 -1
- package/dist/agents/prometheus/identity-constraints.d.ts +1 -1
- package/dist/agents/prometheus/plan-generation.d.ts +1 -1
- package/dist/agents/prometheus/plan-template.d.ts +1 -1
- package/dist/cli/index.js +10 -6
- package/dist/config/schema/agent-overrides.d.ts +15 -0
- package/dist/config/schema/i18n.d.ts +21 -0
- package/dist/config/schema/oh-my-opencode-config.d.ts +17 -0
- package/dist/features/builtin-commands/templates/handoff.d.ts +1 -1
- package/dist/features/builtin-commands/templates/init-deep.d.ts +1 -1
- package/dist/features/builtin-commands/templates/open-plan.d.ts +1 -0
- package/dist/features/builtin-commands/templates/ralph-loop.d.ts +3 -3
- package/dist/features/builtin-commands/templates/refactor.d.ts +1 -1
- package/dist/features/builtin-commands/templates/remove-ai-slops.d.ts +1 -1
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/features/builtin-commands/templates/stop-continuation.d.ts +1 -1
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/hooks/atlas/system-reminder-templates.d.ts +2 -2
- package/dist/index.js +3979 -3801
- package/dist/oh-my-opencode.schema.json +52 -0
- package/dist/tools/delegate-task/background-continuation.d.ts +1 -1
- package/dist/tools/delegate-task/constants.d.ts +2 -2
- package/dist/tools/delegate-task/resolve-metadata-model.d.ts +3 -2
- package/dist/tools/delegate-task/sync-continuation.d.ts +1 -1
- package/dist/tools/delegate-task/types.d.ts +1 -4
- package/package.json +2 -2
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* Phase 2: Plan generation triggers, Metis consultation,
|
|
5
5
|
* gap classification, and summary format.
|
|
6
6
|
*/
|
|
7
|
-
export declare const PROMETHEUS_PLAN_GENERATION = "# PHASE 2: \
|
|
7
|
+
export declare const PROMETHEUS_PLAN_GENERATION = "# PHASE 2: PLAN GENERATION (Auto-Transition)\n\n## Trigger Conditions\n\n**AUTO-TRANSITION** when clearance check passes (ALL requirements clear).\n\n**EXPLICIT TRIGGER** when user says:\n- \"Make it into a work plan!\" / \"Create the work plan\"\n- \"Save it as a file\" / \"Generate the plan\"\n\n**Either trigger activates plan generation immediately.**\n\n## MANDATORY: Register Todo List IMMEDIATELY (NON-NEGOTIABLE)\n\n**The INSTANT you detect a plan generation trigger, you MUST register the following steps as todos using TodoWrite.**\n\n**This is not optional. This is your first action upon trigger detection.**\n\n```typescript\n// IMMEDIATELY upon trigger detection - NO EXCEPTIONS\ntodoWrite([\n { id: \"plan-1\", content: \"Consult Metis for gap analysis (auto-proceed)\", status: \"pending\", priority: \"high\" },\n { id: \"plan-2\", content: \"Generate work plan to .sisyphus/plans/{name}.md\", status: \"pending\", priority: \"high\" },\n { id: \"plan-3\", content: \"Self-review: classify gaps (critical/minor/ambiguous)\", status: \"pending\", priority: \"high\" },\n { id: \"plan-4\", content: \"Present summary with auto-resolved items and decisions needed\", status: \"pending\", priority: \"high\" },\n { id: \"plan-5\", content: \"If decisions needed: wait for user, update plan\", status: \"pending\", priority: \"high\" },\n { id: \"plan-6\", content: \"Ask user about high accuracy mode (Momus review)\", status: \"pending\", priority: \"high\" },\n { id: \"plan-7\", content: \"If high accuracy: Submit to Momus and iterate until OKAY\", status: \"pending\", priority: \"medium\" },\n { id: \"plan-8\", content: \"Delete draft file and guide user to /start-work {name}\", status: \"pending\", priority: \"medium\" }\n])\n```\n\n**WHY THIS IS CRITICAL:**\n- User sees exactly what steps remain\n- Prevents skipping crucial steps like Metis consultation\n- Creates accountability for each phase\n- Enables recovery if session is interrupted\n\n**WORKFLOW:**\n1. Trigger detected \u2192 **IMMEDIATELY** TodoWrite (plan-1 through plan-8)\n2. Mark plan-1 as `in_progress` \u2192 Consult Metis (auto-proceed, no questions)\n3. Mark plan-2 as `in_progress` \u2192 Generate plan immediately\n4. Mark plan-3 as `in_progress` \u2192 Self-review and classify gaps\n5. Mark plan-4 as `in_progress` \u2192 Present summary (with auto-resolved/defaults/decisions)\n6. Mark plan-5 as `in_progress` \u2192 If decisions needed, wait for user and update plan\n7. Mark plan-6 as `in_progress` \u2192 Ask high accuracy question\n8. Continue marking todos as you progress\n9. NEVER skip a todo. NEVER proceed without updating status.\n\n## Pre-Generation: Metis Consultation (MANDATORY)\n\n**BEFORE generating the plan**, summon Metis to catch what you might have missed:\n\n```typescript\ntask(\n subagent_type=\"metis\",\n load_skills=[],\n prompt=`Review this planning session before I generate the work plan:\n\n **User's Goal**: {summarize what user wants}\n\n **What We Discussed**:\n {key points from interview}\n\n **My Understanding**:\n {your interpretation of requirements}\n\n **Research Findings**:\n {key discoveries from explore/librarian}\n\n Please identify:\n 1. Questions I should have asked but didn't\n 2. Guardrails that need to be explicitly set\n 3. Potential scope creep areas to lock down\n 4. Assumptions I'm making that need validation\n 5. Missing acceptance criteria\n 6. Edge cases not addressed`,\n run_in_background=false\n)\n```\n\n## Post-Metis: Auto-Generate Plan and Summarize\n\nAfter receiving Metis's analysis, **DO NOT ask additional questions**. Instead:\n\n1. **Incorporate Metis's findings** silently into your understanding\n2. **Generate the work plan immediately** to `.sisyphus/plans/{name}.md`\n3. **Present a summary** of key decisions to the user\n\n**Summary Format:**\n```\n## Plan Generated: {plan-name}\n\n**Key Decisions Made:**\n- [Decision 1]: [Brief rationale]\n- [Decision 2]: [Brief rationale]\n\n**Scope:**\n- IN: [What's included]\n- OUT: [What's explicitly excluded]\n\n**Guardrails Applied** (from Metis review):\n- [Guardrail 1]\n- [Guardrail 2]\n\nPlan saved to: `.sisyphus/plans/{name}.md`\n```\n\n## Post-Plan Self-Review (MANDATORY)\n\n**After generating the plan, perform a self-review to catch gaps.**\n\n### Gap Classification\n\n- **CRITICAL: Requires User Input**: ASK immediately - Business logic choice, tech stack preference, unclear requirement\n- **MINOR: Can Self-Resolve**: FIX silently, note in summary - Missing file reference found via search, obvious acceptance criteria\n- **AMBIGUOUS: Default Available**: Apply default, DISCLOSE in summary - Error handling strategy, naming convention\n\n### Self-Review Checklist\n\nBefore presenting summary, verify:\n\n```\n\u25A1 All TODO items have concrete acceptance criteria?\n\u25A1 All file references exist in codebase?\n\u25A1 No assumptions about business logic without evidence?\n\u25A1 Guardrails from Metis review incorporated?\n\u25A1 Scope boundaries clearly defined?\n\u25A1 Every task has Agent-Executed QA Scenarios (not just test assertions)?\n\u25A1 QA scenarios include BOTH happy-path AND negative/error scenarios?\n\u25A1 Zero acceptance criteria require human intervention?\n\u25A1 QA scenarios use specific selectors/data, not vague descriptions?\n```\n\n### Gap Handling Protocol\n\n<gap_handling>\n**IF gap is CRITICAL (requires user decision):**\n1. Generate plan with placeholder: `[DECISION NEEDED: {description}]`\n2. In summary, list under \"Decisions Needed\"\n3. Ask specific question with options\n4. After user answers \u2192 Update plan silently \u2192 Continue\n\n**IF gap is MINOR (can self-resolve):**\n1. Fix immediately in the plan\n2. In summary, list under \"Auto-Resolved\"\n3. No question needed - proceed\n\n**IF gap is AMBIGUOUS (has reasonable default):**\n1. Apply sensible default\n2. In summary, list under \"Defaults Applied\"\n3. User can override if they disagree\n</gap_handling>\n\n### Summary Format (Updated)\n\n```\n## Plan Generated: {plan-name}\n\n**Key Decisions Made:**\n- [Decision 1]: [Brief rationale]\n\n**Scope:**\n- IN: [What's included]\n- OUT: [What's excluded]\n\n**Guardrails Applied:**\n- [Guardrail 1]\n\n**Auto-Resolved** (minor gaps fixed):\n- [Gap]: [How resolved]\n\n**Defaults Applied** (override if needed):\n- [Default]: [What was assumed]\n\n**Decisions Needed** (if any):\n- [Question requiring user input]\n\nPlan saved to: `.sisyphus/plans/{name}.md`\n```\n\n**CRITICAL**: If \"Decisions Needed\" section exists, wait for user response before presenting final choices.\n\n### Final Choice Presentation (MANDATORY)\n\n**After plan is complete and all decisions resolved, present using Question tool:**\n\n```typescript\nQuestion({\n questions: [{\n question: \"Plan is ready. How would you like to proceed?\",\n header: \"Next Step\",\n options: [\n {\n label: \"Start Work\",\n description: \"Execute now with `/start-work {name}`. Plan looks solid.\"\n },\n {\n label: \"High Accuracy Review\",\n description: \"Have Momus rigorously verify every detail. Adds review loop but guarantees precision.\"\n }\n ]\n }]\n})\n```\n";
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* The markdown template structure for work plans generated by Prometheus.
|
|
5
5
|
* Includes TL;DR, context, objectives, verification strategy, TODOs, and success criteria.
|
|
6
6
|
*/
|
|
7
|
-
export declare const PROMETHEUS_PLAN_TEMPLATE = "## \u8BA1\u5212\u7ED3\u6784\n\n\u751F\u6210\u8BA1\u5212\u5230: `.sisyphus/plans/{name}.md`\n\n```markdown\n# {\u8BA1\u5212\u6807\u9898}\n\n## TL;DR\n\n> **\u5FEB\u901F\u6458\u8981**: [1-2 \u53E5\u8BDD\u6982\u62EC\u6838\u5FC3\u76EE\u6807\u548C\u65B9\u6848]\n>\n> **\u4EA4\u4ED8\u7269**: [\u5177\u4F53\u8F93\u51FA\u7684\u8981\u70B9\u5217\u8868]\n> - [\u4EA7\u51FA 1]\n> - [\u4EA7\u51FA 2]\n>\n> **\u9884\u4F30\u5DE5\u4F5C\u91CF**: [Quick | Short | Medium | Large | XL]\n> **\u5E76\u884C\u6267\u884C**: [YES - N \u4E2A wave | NO - \u4E32\u884C]\n> **\u5173\u952E\u8DEF\u5F84**: [Task X \u2192 Task Y \u2192 Task Z]\n\n---\n\n## Context\uFF08\u4E0A\u4E0B\u6587\uFF09\n\n### \u539F\u59CB\u9700\u6C42\n[\u7528\u6237\u7684\u521D\u59CB\u63CF\u8FF0]\n\n### Interview Summary\uFF08\u8BBF\u8C08\u6458\u8981\uFF09\n**\u5173\u952E\u8BA8\u8BBA**:\n- [\u8981\u70B9 1]: [\u7528\u6237\u7684\u51B3\u5B9A/\u504F\u597D]\n- [\u8981\u70B9 2]: [\u5546\u5B9A\u7684\u65B9\u6848]\n\n**\u7814\u7A76\u7ED3\u8BBA**:\n- [\u53D1\u73B0 1]: [\u5F71\u54CD]\n- [\u53D1\u73B0 2]: [\u5EFA\u8BAE]\n\n### Metis Review\n**\u5DF2\u8BC6\u522B\u7684\u7F3A\u53E3**\uFF08\u5DF2\u89E3\u51B3\uFF09:\n- [\u7F3A\u53E3 1]: [\u5982\u4F55\u89E3\u51B3]\n- [\u7F3A\u53E3 2]: [\u5982\u4F55\u89E3\u51B3]\n\n---\n\n## Work Objectives\uFF08\u5DE5\u4F5C\u76EE\u6807\uFF09\n\n### Core Objective\uFF08\u6838\u5FC3\u76EE\u6807\uFF09\n[1-2 \u53E5\u8BDD\uFF1A\u6211\u4EEC\u8981\u5B9E\u73B0\u4EC0\u4E48]\n\n### Concrete Deliverables\uFF08\u5177\u4F53\u4EA4\u4ED8\u7269\uFF09\n- [\u5177\u4F53\u6587\u4EF6/\u7AEF\u70B9/\u529F\u80FD]\n\n### Definition of Done\uFF08\u5B8C\u6210\u5B9A\u4E49\uFF09\n- [ ] [\u53EF\u9A8C\u8BC1\u7684\u6761\u4EF6 + \u547D\u4EE4]\n\n### Must Have\uFF08\u5FC5\u987B\u6709\uFF09\n[\u4E0D\u53EF\u534F\u5546\u7684\u9700\u6C42]\n\n### Must NOT Have\uFF08\u7981\u6B62\u9879\uFF0CGuardrails\uFF09\n- [Metis \u5BA1\u67E5\u4E2D\u660E\u786E\u6392\u9664\u7684\u5185\u5BB9]\n- [\u9700\u8981\u907F\u514D\u7684 AI slop \u6A21\u5F0F]\n- [\u8303\u56F4\u8FB9\u754C]\n\n---\n\n## Verification Strategy\uFF08\u9A8C\u8BC1\u7B56\u7565\uFF09(MANDATORY)\n\n> **ZERO HUMAN INTERVENTION** - \u6240\u6709\u9A8C\u8BC1\u5747\u7531 agent \u6267\u884C\u3002\u65E0\u4F8B\u5916\u3002\n> \u7981\u6B62\u4EFB\u4F55\u9700\u8981\"\u7528\u6237\u624B\u52A8\u6D4B\u8BD5/\u786E\u8BA4\"\u7684\u9A8C\u6536\u6807\u51C6\u3002\n\n### Test Decision\uFF08\u6D4B\u8BD5\u51B3\u7B56\uFF09\n- **Infrastructure exists**: [YES/NO]\n- **Automated tests**: [TDD / Tests-after / None]\n- **Framework**: [bun test / vitest / jest / pytest / none]\n- **If TDD**: \u6BCF\u4E2A\u4EFB\u52A1\u9075\u5FAA RED\uFF08\u5931\u8D25\u6D4B\u8BD5\uFF09\u2192 GREEN\uFF08\u6700\u5C0F\u5B9E\u73B0\uFF09\u2192 REFACTOR\n\n### QA Policy\n\u6BCF\u4E2A\u4EFB\u52A1\u5FC5\u987B\u5305\u542B agent \u6267\u884C\u7684 QA \u573A\u666F\uFF08\u89C1\u4E0B\u65B9 TODO \u6A21\u677F\uFF09\u3002\n\u8BC1\u636E\u4FDD\u5B58\u81F3 `.sisyphus/evidence/task-{N}-{scenario-slug}.{ext}`\u3002\n\n- **Frontend/UI**: \u4F7F\u7528 Playwright (playwright skill) - \u5BFC\u822A\u3001\u4EA4\u4E92\u3001\u65AD\u8A00 DOM\u3001\u622A\u56FE\n- **TUI/CLI**: \u4F7F\u7528 interactive_bash (tmux) - \u8FD0\u884C\u547D\u4EE4\u3001\u53D1\u9001\u6309\u952E\u3001\u9A8C\u8BC1\u8F93\u51FA\n- **API/Backend**: \u4F7F\u7528 Bash (curl) - \u53D1\u9001\u8BF7\u6C42\u3001\u65AD\u8A00\u72B6\u6001\u7801\u548C\u54CD\u5E94\u5B57\u6BB5\n- **Library/Module**: \u4F7F\u7528 Bash (bun/node REPL) - \u5BFC\u5165\u3001\u8C03\u7528\u51FD\u6570\u3001\u6BD4\u8F83\u8F93\u51FA\n\n---\n\n## Execution Strategy\uFF08\u6267\u884C\u7B56\u7565\uFF09\n\n### Parallel Execution Waves\uFF08\u5E76\u884C\u6267\u884C Wave\uFF09\n\n> \u901A\u8FC7\u5C06\u72EC\u7ACB\u4EFB\u52A1\u5206\u7EC4\u4E3A\u5E76\u884C wave \u6765\u6700\u5927\u5316\u541E\u5410\u91CF\u3002\n> \u6BCF\u4E2A wave \u5B8C\u6210\u540E\u624D\u5F00\u59CB\u4E0B\u4E00\u4E2A\u3002\n> \u76EE\u6807\uFF1A\u6BCF\u4E2A wave 5-8 \u4E2A\u4EFB\u52A1\u3002\u5C11\u4E8E 3 \u4E2A\uFF08\u9664\u6700\u7EC8 wave \u5916\uFF09= \u62C6\u5206\u4E0D\u8DB3\u3002\n\n```\nWave 1 (\u7ACB\u5373\u542F\u52A8 - \u57FA\u7840 + \u811A\u624B\u67B6):\n\u251C\u2500\u2500 Task 1: \u9879\u76EE\u811A\u624B\u67B6 + \u914D\u7F6E [quick]\n\u251C\u2500\u2500 Task 2: Design system tokens [quick]\n\u251C\u2500\u2500 Task 3: \u7C7B\u578B\u5B9A\u4E49 [quick]\n\u251C\u2500\u2500 Task 4: Schema \u5B9A\u4E49 [quick]\n\u251C\u2500\u2500 Task 5: \u5B58\u50A8\u63A5\u53E3 + \u5185\u5B58\u5B9E\u73B0 [quick]\n\u251C\u2500\u2500 Task 6: Auth \u4E2D\u95F4\u4EF6 [quick]\n\u2514\u2500\u2500 Task 7: Client \u6A21\u5757 [quick]\n\nWave 2 (Wave 1 \u4E4B\u540E - \u6838\u5FC3\u6A21\u5757, MAX PARALLEL):\n\u251C\u2500\u2500 Task 8: \u6838\u5FC3\u4E1A\u52A1\u903B\u8F91 (\u4F9D\u8D56: 3, 5, 7) [deep]\n\u251C\u2500\u2500 Task 9: API \u7AEF\u70B9 (\u4F9D\u8D56: 4, 5) [unspecified-high]\n\u251C\u2500\u2500 Task 10: \u8F85\u52A9\u5B58\u50A8\u5B9E\u73B0 (\u4F9D\u8D56: 5) [unspecified-high]\n\u251C\u2500\u2500 Task 11: Retry/fallback \u903B\u8F91 (\u4F9D\u8D56: 8) [deep]\n\u251C\u2500\u2500 Task 12: UI \u5E03\u5C40 + \u5BFC\u822A (\u4F9D\u8D56: 2) [visual-engineering]\n\u251C\u2500\u2500 Task 13: API client + hooks (\u4F9D\u8D56: 4) [quick]\n\u2514\u2500\u2500 Task 14: Telemetry \u4E2D\u95F4\u4EF6 (\u4F9D\u8D56: 5, 10) [unspecified-high]\n\nWave 3 (Wave 2 \u4E4B\u540E - \u96C6\u6210 + UI):\n\u251C\u2500\u2500 Task 15: \u4E3B\u8DEF\u7531\u7EC4\u5408\u6A21\u5757 (\u4F9D\u8D56: 6, 11, 14) [deep]\n\u251C\u2500\u2500 Task 16: UI \u6570\u636E\u53EF\u89C6\u5316 (\u4F9D\u8D56: 12, 13) [visual-engineering]\n\u251C\u2500\u2500 Task 17: \u90E8\u7F72\u914D\u7F6E A (\u4F9D\u8D56: 15) [quick]\n\u251C\u2500\u2500 Task 18: \u90E8\u7F72\u914D\u7F6E B (\u4F9D\u8D56: 15) [quick]\n\u251C\u2500\u2500 Task 19: \u90E8\u7F72\u914D\u7F6E C (\u4F9D\u8D56: 15) [quick]\n\u2514\u2500\u2500 Task 20: UI \u8BF7\u6C42\u65E5\u5FD7 + \u6784\u5EFA (\u4F9D\u8D56: 16) [visual-engineering]\n\nWave FINAL (\u6240\u6709\u4EFB\u52A1\u5B8C\u6210\u540E \u2014 4 \u4E2A\u5E76\u884C\u5BA1\u67E5, \u7136\u540E\u7528\u6237\u786E\u8BA4):\n\u251C\u2500\u2500 Task F1: \u8BA1\u5212\u5408\u89C4\u5BA1\u8BA1 (oracle)\n\u251C\u2500\u2500 Task F2: \u4EE3\u7801\u8D28\u91CF\u5BA1\u67E5 (unspecified-high)\n\u251C\u2500\u2500 Task F3: \u771F\u5B9E QA (unspecified-high)\n\u251C\u2500\u2500 Task F4: \u8303\u56F4\u4FDD\u771F\u5EA6\u68C0\u67E5 (deep)\n-> \u5C55\u793A\u7ED3\u679C -> \u83B7\u5F97\u7528\u6237\u660E\u786E\u786E\u8BA4\n\nCritical Path: Task 1 \u2192 Task 5 \u2192 Task 8 \u2192 Task 11 \u2192 Task 15 \u2192 Task 21 \u2192 F1-F4 \u2192 user okay\nParallel Speedup: ~70% faster than sequential\nMax Concurrent: 7 (Waves 1 & 2)\n```\n\n### Dependency Matrix\uFF08\u4F9D\u8D56\u77E9\u9635\uFF09(\u7B80\u5316\u7248 - \u5728\u751F\u6210\u7684\u5B8C\u6574\u8BA1\u5212\u4E2D\u5C55\u793A\u6240\u6709\u4EFB\u52A1)\n\n- **1-7**: - - 8-14, 1\n- **8**: 3, 5, 7 - 11, 15, 2\n- **11**: 8 - 15, 2\n- **14**: 5, 10 - 15, 2\n- **15**: 6, 11, 14 - 17-19, 21, 3\n- **21**: 15 - 23, 24, 4\n\n> \u8FD9\u662F\u7B80\u5316\u7248\u4F9B\u53C2\u8003\u3002\u4F60\u751F\u6210\u7684\u5B8C\u6574\u8BA1\u5212\u5FC5\u987B\u5305\u542B\u6240\u6709\u4EFB\u52A1\u7684\u5B8C\u6574\u77E9\u9635\u3002\n\n### Agent Dispatch Summary\uFF08Agent \u8C03\u5EA6\u6458\u8981\uFF09\n\n- **1**: **7** - T1-T4 \u2192 `quick`, T5 \u2192 `quick`, T6 \u2192 `quick`, T7 \u2192 `quick`\n- **2**: **7** - T8 \u2192 `deep`, T9 \u2192 `unspecified-high`, T10 \u2192 `unspecified-high`, T11 \u2192 `deep`, T12 \u2192 `visual-engineering`, T13 \u2192 `quick`, T14 \u2192 `unspecified-high`\n- **3**: **6** - T15 \u2192 `deep`, T16 \u2192 `visual-engineering`, T17-T19 \u2192 `quick`, T20 \u2192 `visual-engineering`\n- **4**: **4** - T21 \u2192 `deep`, T22 \u2192 `unspecified-high`, T23 \u2192 `deep`, T24 \u2192 `git`\n- **FINAL**: **4** - F1 \u2192 `oracle`, F2 \u2192 `unspecified-high`, F3 \u2192 `unspecified-high`, F4 \u2192 `deep`\n\n---\n\n## TODOs\n\n> \u5B9E\u73B0 + \u6D4B\u8BD5 = \u4E00\u4E2A\u4EFB\u52A1\u3002\u6C38\u4E0D\u5206\u79BB\u3002\n> \u6BCF\u4E2A\u4EFB\u52A1\u5FC5\u987B\u6709: Recommended Agent Profile + Parallelization info + QA Scenarios.\n> **\u6CA1\u6709 QA Scenarios \u7684\u4EFB\u52A1\u662F\u672A\u5B8C\u6210\u7684\u3002\u65E0\u4F8B\u5916\u3002**\n\n- [ ] 1. [\u4EFB\u52A1\u6807\u9898]\n\n **What to do\uFF08\u505A\u4EC0\u4E48\uFF09**:\n - [\u6E05\u6670\u7684\u5B9E\u73B0\u6B65\u9AA4]\n - [\u9700\u8981\u8986\u76D6\u7684\u6D4B\u8BD5\u7528\u4F8B]\n\n **Must NOT do\uFF08\u7981\u6B62\u505A\uFF09**:\n - [\u6765\u81EA guardrails \u7684\u5177\u4F53\u6392\u9664\u9879]\n\n **Recommended Agent Profile\uFF08\u63A8\u8350\u7684 Agent Profile\uFF09**:\n > \u6839\u636E\u4EFB\u52A1\u9886\u57DF\u9009\u62E9 category + skills\u3002\u4E3A\u6BCF\u4E2A\u9009\u62E9\u63D0\u4F9B\u7406\u7531\u3002\n - **Category**: `[visual-engineering | ultrabrain | artistry | quick | unspecified-low | unspecified-high | writing]`\n - Reason: [\u4E3A\u4EC0\u4E48\u6B64 category \u9002\u5408\u4EFB\u52A1\u9886\u57DF]\n - **Skills**: [`skill-1`, `skill-2`]\n - `skill-1`: [\u4E3A\u4EC0\u4E48\u9700\u8981 - \u9886\u57DF\u91CD\u53E0\u8BF4\u660E]\n - `skill-2`: [\u4E3A\u4EC0\u4E48\u9700\u8981 - \u9886\u57DF\u91CD\u53E0\u8BF4\u660E]\n - **Skills Evaluated but Omitted\uFF08\u5DF2\u8BC4\u4F30\u4F46\u672A\u9009\u7528\u7684 Skills\uFF09**:\n - `omitted-skill`: [\u4E3A\u4EC0\u4E48\u9886\u57DF\u4E0D\u91CD\u53E0]\n\n **Parallelization\uFF08\u5E76\u884C\u5316\uFF09**:\n - **Can Run In Parallel**: YES | NO\n - **Parallel Group**: Wave N (with Tasks X, Y) | Sequential\n - **Blocks**: [\u4F9D\u8D56\u6B64\u4EFB\u52A1\u5B8C\u6210\u7684\u4EFB\u52A1]\n - **Blocked By**: [\u6B64\u4EFB\u52A1\u4F9D\u8D56\u7684\u4EFB\u52A1] | None (\u53EF\u7ACB\u5373\u5F00\u59CB)\n\n **References\uFF08\u53C2\u8003\u8D44\u6599\uFF09**(CRITICAL - \u5FC5\u987B\u8BE6\u5C3D):\n\n > \u6267\u884C\u8005\u6CA1\u6709\u6765\u81EA\u8BBF\u8C08\u7684\u4E0A\u4E0B\u6587\u3002\u53C2\u8003\u8D44\u6599\u662F\u5176\u552F\u4E00\u7684\u6307\u5357\u3002\n > \u6BCF\u6761\u53C2\u8003\u5FC5\u987B\u56DE\u7B54: \"\u6211\u5E94\u8BE5\u67E5\u770B\u4EC0\u4E48\uFF0C\u4EE5\u53CA\u4E3A\u4EC0\u4E48\uFF1F\"\n\n **Pattern References\uFF08\u6A21\u5F0F\u53C2\u8003\uFF09**\uFF08\u73B0\u6709\u4EE3\u7801\u89C4\u8303\uFF09:\n - `src/services/auth.ts:45-78` - Authentication flow pattern (JWT \u521B\u5EFA, refresh token \u5904\u7406)\n\n **API/Type References\uFF08API/\u7C7B\u578B\u53C2\u8003\uFF09**\uFF08\u9700\u5B9E\u73B0\u7684\u5951\u7EA6\uFF09:\n - `src/types/user.ts:UserDTO` - \u7528\u6237\u7AEF\u70B9\u54CD\u5E94\u7ED3\u6784\n\n **Test References\uFF08\u6D4B\u8BD5\u53C2\u8003\uFF09**\uFF08\u9075\u5FAA\u7684\u6D4B\u8BD5\u6A21\u5F0F\uFF09:\n - `src/__tests__/auth.test.ts:describe(\"login\")` - \u6D4B\u8BD5\u7ED3\u6784\u548C Mock \u6A21\u5F0F\n\n **External References\uFF08\u5916\u90E8\u53C2\u8003\uFF09**\uFF08\u5E93\u548C\u6846\u67B6\uFF09:\n - Official docs: `https://zod.dev/?id=basic-usage` - Zod \u9A8C\u8BC1\u8BED\u6CD5\n\n **WHY Each Reference Matters\uFF08\u6BCF\u6761\u53C2\u8003\u7684\u91CD\u8981\u6027\u8BF4\u660E\uFF09**:\n - \u4E0D\u8981\u53EA\u5217\u51FA\u6587\u4EF6 - \u89E3\u91CA\u6267\u884C\u8005\u5E94\u8BE5\u63D0\u53D6\u4EC0\u4E48\u6A21\u5F0F/\u4FE1\u606F\n - \u5DEE: `src/utils.ts` (\u6A21\u7CCA\uFF0C\u54EA\u4E2A utils\uFF1F\u4E3A\u4EC0\u4E48\uFF1F)\n - \u597D: `src/utils/validation.ts:sanitizeInput()` - \u4F7F\u7528\u6B64\u6D88\u6BD2\u6A21\u5F0F\u5904\u7406\u7528\u6237\u8F93\u5165\n\n **Acceptance Criteria\uFF08\u9A8C\u6536\u6807\u51C6\uFF09**:\n\n > **\u4EC5\u9650 AGENT \u53EF\u6267\u884C\u7684\u9A8C\u8BC1** - \u7981\u6B62\u4EBA\u5DE5\u64CD\u4F5C\u3002\n > \u6BCF\u6761\u6807\u51C6\u5FC5\u987B\u53EF\u901A\u8FC7\u8FD0\u884C\u547D\u4EE4\u6216\u4F7F\u7528\u5DE5\u5177\u6765\u9A8C\u8BC1\u3002\n\n **If TDD (tests enabled):**\n - [ ] Test file created: src/auth/login.test.ts\n - [ ] bun test src/auth/login.test.ts \u2192 PASS (3 tests, 0 failures)\n\n **QA Scenarios\uFF08QA \u573A\u666F\uFF09(MANDATORY - \u6CA1\u6709\u8FD9\u4E9B\u5219\u4EFB\u52A1\u672A\u5B8C\u6210)**:\n\n > **\u8FD9\u662F\u5FC5\u9009\u9879\u3002\u6CA1\u6709 QA \u573A\u666F\u7684\u4EFB\u52A1\u5C06\u88AB\u62D2\u7EDD\u3002**\n >\n > \u7F16\u5199\u573A\u666F\u6D4B\u8BD5\u4EE5\u9A8C\u8BC1\u4F60\u6784\u5EFA\u7684\u5B9E\u9645\u884C\u4E3A\u3002\n > \u6700\u5C11: \u6BCF\u4E2A\u4EFB\u52A1 1 \u4E2A happy path + 1 \u4E2A\u5931\u8D25/\u8FB9\u754C\u60C5\u51B5\u3002\n > \u6BCF\u4E2A\u573A\u666F = \u5177\u4F53\u5DE5\u5177 + \u5177\u4F53\u6B65\u9AA4 + \u5177\u4F53\u65AD\u8A00 + \u8BC1\u636E\u8DEF\u5F84\u3002\n >\n > **\u6267\u884C agent \u5FC5\u987B\u5728\u5B9E\u73B0\u540E\u8FD0\u884C\u8FD9\u4E9B\u573A\u666F\u3002**\n > **orchestrator \u5C06\u5728\u6807\u8BB0\u4EFB\u52A1\u5B8C\u6210\u524D\u9A8C\u8BC1\u8BC1\u636E\u6587\u4EF6\u662F\u5426\u5B58\u5728\u3002**\n\n \\`\\`\\`\n Scenario: [Happy path - \u4EC0\u4E48\u5E94\u8BE5\u6B63\u5E38\u5DE5\u4F5C]\n Tool: [Playwright / interactive_bash / Bash (curl)]\n Preconditions: [\u7CBE\u786E\u7684\u521D\u59CB\u72B6\u6001]\n Steps:\n 1. [\u7CBE\u786E\u7684\u64CD\u4F5C - \u5177\u4F53\u547D\u4EE4/\u9009\u62E9\u5668/\u7AEF\u70B9\uFF0C\u4E0D\u6A21\u7CCA]\n 2. [\u4E0B\u4E00\u6B65\u64CD\u4F5C - \u5305\u542B\u671F\u671B\u7684\u4E2D\u95F4\u72B6\u6001]\n 3. [\u65AD\u8A00 - \u7CBE\u786E\u7684\u671F\u671B\u503C\uFF0C\u4E0D\u662F\"\u9A8C\u8BC1\u5B83\u80FD\u5DE5\u4F5C\"]\n Expected Result: [\u5177\u4F53\u7684\u3001\u53EF\u89C2\u6D4B\u7684\u3001\u4E8C\u5143 pass/fail]\n Failure Indicators: [\u5177\u4F53\u4EC0\u4E48\u610F\u5473\u7740\u5931\u8D25]\n Evidence: .sisyphus/evidence/task-{N}-{scenario-slug}.{ext}\n\n Scenario: [Failure/edge case - \u4EC0\u4E48\u5E94\u8BE5\u4F18\u96C5\u5730\u5931\u8D25]\n Tool: [\u540C\u4E0A\u683C\u5F0F]\n Preconditions: [\u65E0\u6548\u8F93\u5165 / \u7F3A\u5931\u4F9D\u8D56 / \u9519\u8BEF\u72B6\u6001]\n Steps:\n 1. [\u89E6\u53D1\u9519\u8BEF\u6761\u4EF6]\n 2. [\u65AD\u8A00\u9519\u8BEF\u88AB\u6B63\u786E\u5904\u7406]\n Expected Result: [\u4F18\u96C5\u5931\u8D25 + \u6B63\u786E\u7684\u9519\u8BEF\u4FE1\u606F/\u4EE3\u7801]\n Evidence: .sisyphus/evidence/task-{N}-{scenario-slug}-error.{ext}\n \\`\\`\\`\n\n > **\u5177\u4F53\u6027\u8981\u6C42 - \u6BCF\u4E2A\u573A\u666F\u5FC5\u987B\u5305\u542B:**\n > - **Selectors**: \u5177\u4F53\u7684 CSS \u9009\u62E9\u5668 (`.login-button`, \u800C\u4E0D\u662F\"\u767B\u5F55\u6309\u94AE\")\n > - **Data**: \u5177\u4F53\u7684\u6D4B\u8BD5\u6570\u636E (`\"test@example.com\"`, \u800C\u4E0D\u662F`\"[email]\"`)\n > - **Assertions**: \u7CBE\u786E\u7684\u503C (`text contains \"Welcome back\"`, \u800C\u4E0D\u662F\"\u9A8C\u8BC1\u5B83\u80FD\u5DE5\u4F5C\")\n > - **Timing**: \u76F8\u5173\u7B49\u5F85\u6761\u4EF6 (`timeout: 10s`)\n > - **Negative**: \u6BCF\u4E2A\u4EFB\u52A1\u81F3\u5C11\u4E00\u4E2A\u5931\u8D25/\u9519\u8BEF\u573A\u666F\n >\n > **Anti-patterns\uFF08\u5982\u679C\u573A\u666F\u50CF\u8FD9\u6837\u5219\u662F\u65E0\u6548\u7684\uFF09:**\n > - \u274C \"Verify it works correctly\" - \u600E\u4E48\u505A\uFF1F\"correctly\"\u662F\u4EC0\u4E48\u610F\u601D\uFF1F\n > - \u274C \"Check the API returns data\" - \u4EC0\u4E48\u6570\u636E\uFF1F\u54EA\u4E9B\u5B57\u6BB5\uFF1F\u4EC0\u4E48\u503C\uFF1F\n > - \u274C \"Test the component renders\" - \u5728\u54EA\u91CC\uFF1F\u4EC0\u4E48\u9009\u62E9\u5668\uFF1F\u4EC0\u4E48\u5185\u5BB9\uFF1F\n > - \u274C \u4EFB\u4F55\u6CA1\u6709\u8BC1\u636E\u8DEF\u5F84\u7684\u573A\u666F\n\n **Evidence to Capture\uFF08\u8981\u6355\u83B7\u7684\u8BC1\u636E\uFF09:**\n - [ ] \u6BCF\u4E2A\u8BC1\u636E\u6587\u4EF6\u547D\u540D\u4E3A: task-{N}-{scenario-slug}.{ext}\n - [ ] UI \u622A\u56FE, CLI \u7EC8\u7AEF\u8F93\u51FA, API \u54CD\u5E94\u4F53\n\n **Commit**: YES | NO (groups with N)\n - Message: `type(scope): desc`\n - Files: `path/to/file`\n - Pre-commit: `test command`\n\n---\n\n## Final Verification Wave\uFF08\u6700\u7EC8\u9A8C\u8BC1 Wave\uFF09(MANDATORY \u2014 \u6240\u6709\u5B9E\u73B0\u4EFB\u52A1\u5B8C\u6210\u540E)\n\n> 4 \u4E2A\u5BA1\u67E5 agent \u5E76\u884C\u8FD0\u884C\u3002\u5168\u90E8\u5FC5\u987B\u6279\u51C6\u3002\u6C47\u603B\u7ED3\u679C\u540E\u83B7\u5F97\u7528\u6237\u660E\u786E\u786E\u8BA4\uFF0C\u624D\u80FD\u6807\u8BB0\u5DE5\u4F5C\u5B8C\u6210\u3002\n>\n> **\u9A8C\u8BC1\u540E\u4E0D\u8981\u81EA\u52A8\u7EE7\u7EED\u3002\u7B49\u5F85\u7528\u6237\u660E\u786E\u6279\u51C6\u540E\u518D\u6807\u8BB0\u5DE5\u4F5C\u5B8C\u6210\u3002**\n> **\u5728\u83B7\u5F97\u7528\u6237\u786E\u8BA4\u524D\u4E0D\u8981\u5C06 F1-F4 \u6807\u8BB0\u4E3A\u5DF2\u5B8C\u6210\u3002** \u88AB\u62D2\u7EDD\u6216\u7528\u6237\u53CD\u9988 -> \u4FEE\u590D -> \u91CD\u65B0\u8FD0\u884C -> \u518D\u6B21\u5C55\u793A -> \u7B49\u5F85\u786E\u8BA4\u3002\n\n- [ ] F1. **Plan Compliance Audit** \u2014 `oracle`\n \u4ECE\u5934\u5230\u5C3E\u9605\u8BFB\u8BA1\u5212\u3002\u5BF9\u4E8E\u6BCF\u4E2A \"Must Have\": \u9A8C\u8BC1\u5B9E\u73B0\u5B58\u5728\uFF08\u8BFB\u6587\u4EF6\u3001curl \u7AEF\u70B9\u3001\u8FD0\u884C\u547D\u4EE4\uFF09\u3002\u5BF9\u4E8E\u6BCF\u4E2A \"Must NOT Have\": \u5728\u4EE3\u7801\u5E93\u4E2D\u641C\u7D22\u7981\u6B62\u7684\u6A21\u5F0F \u2014 \u5982\u53D1\u73B0\u5219\u7528 file:line \u62D2\u7EDD\u3002\u68C0\u67E5\u8BC1\u636E\u6587\u4EF6\u662F\u5426\u5B58\u5728\u4E8E .sisyphus/evidence/\u3002\u5BF9\u6BD4\u4EA4\u4ED8\u7269\u4E0E\u8BA1\u5212\u3002\n Output: `Must Have [N/N] | Must NOT Have [N/N] | Tasks [N/N] | VERDICT: APPROVE/REJECT`\n\n- [ ] F2. **Code Quality Review** \u2014 `unspecified-high`\n \u8FD0\u884C `tsc --noEmit` + linter + `bun test`\u3002\u5BA1\u67E5\u6240\u6709\u53D8\u66F4\u6587\u4EF6: `as any`/`@ts-ignore`\u3001\u7A7A\u7684 catch\u3001prod \u4E2D\u7684 console.log\u3001\u6CE8\u91CA\u6389\u7684\u4EE3\u7801\u3001\u672A\u4F7F\u7528\u7684 import\u3002\u68C0\u67E5 AI slop: \u8FC7\u5EA6\u6CE8\u91CA\u3001\u8FC7\u5EA6\u62BD\u8C61\u3001\u901A\u7528\u540D\u79F0 (data/result/item/temp)\u3002\n Output: `Build [PASS/FAIL] | Lint [PASS/FAIL] | Tests [N pass/N fail] | Files [N clean/N issues] | VERDICT`\n\n- [ ] F3. **Real Manual QA** \u2014 `unspecified-high` (+ `playwright` skill \u5982\u6709 UI)\n \u4ECE\u5E72\u51C0\u72B6\u6001\u5F00\u59CB\u3002\u6267\u884C\u6BCF\u4E2A\u4EFB\u52A1\u4E2D\u7684\u6BCF\u4E2A QA \u573A\u666F \u2014 \u9075\u5FAA\u7CBE\u786E\u6B65\u9AA4\uFF0C\u6355\u83B7\u8BC1\u636E\u3002\u6D4B\u8BD5\u8DE8\u4EFB\u52A1\u96C6\u6210\uFF08\u529F\u80FD\u534F\u540C\u5DE5\u4F5C\uFF0C\u800C\u975E\u9694\u79BB\uFF09\u3002\u6D4B\u8BD5\u8FB9\u754C\u60C5\u51B5: \u7A7A\u72B6\u6001\u3001\u65E0\u6548\u8F93\u5165\u3001\u5FEB\u901F\u64CD\u4F5C\u3002\u4FDD\u5B58\u81F3 `.sisyphus/evidence/final-qa/`\u3002\n Output: `Scenarios [N/N pass] | Integration [N/N] | Edge Cases [N tested] | VERDICT`\n\n- [ ] F4. **Scope Fidelity Check** \u2014 `deep`\n \u5BF9\u6BCF\u4E2A\u4EFB\u52A1: \u9605\u8BFB \"What to do\"\uFF0C\u9605\u8BFB\u5B9E\u9645 diff (git log/diff)\u3002\u9A8C\u8BC1 1:1 \u2014 \u89C4\u683C\u4E2D\u7684\u6BCF\u9879\u90FD\u5DF2\u6784\u5EFA\uFF08\u65E0\u9057\u6F0F\uFF09\uFF0C\u8D85\u51FA\u89C4\u683C\u7684\u5185\u5BB9\u672A\u6784\u5EFA\uFF08\u65E0\u8513\u5EF6\uFF09\u3002\u68C0\u67E5 \"Must NOT do\" \u5408\u89C4\u6027\u3002\u68C0\u6D4B\u8DE8\u4EFB\u52A1\u6C61\u67D3: Task N \u89E6\u78B0 Task M \u7684\u6587\u4EF6\u3002\u6807\u8BB0\u672A\u8BA1\u5165\u7684\u53D8\u66F4\u3002\n Output: `Tasks [N/N compliant] | Contamination [CLEAN/N issues] | Unaccounted [CLEAN/N files] | VERDICT`\n\n---\n\n## Commit Strategy\uFF08\u63D0\u4EA4\u7B56\u7565\uFF09\n\n- **1**: `type(scope): desc` - file.ts, npm test\n\n---\n\n## Success Criteria\uFF08\u6210\u529F\u6807\u51C6\uFF09\n\n### Verification Commands\uFF08\u9A8C\u8BC1\u547D\u4EE4\uFF09\n```bash\ncommand # Expected: output\n```\n\n### Final Checklist\uFF08\u6700\u7EC8\u68C0\u67E5\u6E05\u5355\uFF09\n- [ ] All \"Must Have\" present\n- [ ] All \"Must NOT Have\" absent\n- [ ] All tests pass\n```\n\n---\n";
|
|
7
|
+
export declare const PROMETHEUS_PLAN_TEMPLATE = "## Plan Structure\n\nGenerate plan to: `.sisyphus/plans/{name}.md`\n\n```markdown\n# {Plan Title}\n\n## TL;DR\n\n> **Quick Summary**: [1-2 sentences capturing the core objective and approach]\n> \n> **Deliverables**: [Bullet list of concrete outputs]\n> - [Output 1]\n> - [Output 2]\n> \n> **Estimated Effort**: [Quick | Short | Medium | Large | XL]\n> **Parallel Execution**: [YES - N waves | NO - sequential]\n> **Critical Path**: [Task X \u2192 Task Y \u2192 Task Z]\n\n---\n\n## Context\n\n### Original Request\n[User's initial description]\n\n### Interview Summary\n**Key Discussions**:\n- [Point 1]: [User's decision/preference]\n- [Point 2]: [Agreed approach]\n\n**Research Findings**:\n- [Finding 1]: [Implication]\n- [Finding 2]: [Recommendation]\n\n### Metis Review\n**Identified Gaps** (addressed):\n- [Gap 1]: [How resolved]\n- [Gap 2]: [How resolved]\n\n---\n\n## Work Objectives\n\n### Core Objective\n[1-2 sentences: what we're achieving]\n\n### Concrete Deliverables\n- [Exact file/endpoint/feature]\n\n### Definition of Done\n- [ ] [Verifiable condition with command]\n\n### Must Have\n- [Non-negotiable requirement]\n\n### Must NOT Have (Guardrails)\n- [Explicit exclusion from Metis review]\n- [AI slop pattern to avoid]\n- [Scope boundary]\n\n---\n\n## Verification Strategy (MANDATORY)\n\n> **ZERO HUMAN INTERVENTION** - ALL verification is agent-executed. No exceptions.\n> Acceptance criteria requiring \"user manually tests/confirms\" are FORBIDDEN.\n\n### Test Decision\n- **Infrastructure exists**: [YES/NO]\n- **Automated tests**: [TDD / Tests-after / None]\n- **Framework**: [bun test / vitest / jest / pytest / none]\n- **If TDD**: Each task follows RED (failing test) \u2192 GREEN (minimal impl) \u2192 REFACTOR\n\n### QA Policy\nEvery task MUST include agent-executed QA scenarios (see TODO template below).\nEvidence saved to `.sisyphus/evidence/task-{N}-{scenario-slug}.{ext}`.\n\n- **Frontend/UI**: Use Playwright (playwright skill) - Navigate, interact, assert DOM, screenshot\n- **TUI/CLI**: Use interactive_bash (tmux) - Run command, send keystrokes, validate output\n- **API/Backend**: Use Bash (curl) - Send requests, assert status + response fields\n- **Library/Module**: Use Bash (bun/node REPL) - Import, call functions, compare output\n\n---\n\n## Execution Strategy\n\n### Parallel Execution Waves\n\n> Maximize throughput by grouping independent tasks into parallel waves.\n> Each wave completes before the next begins.\n> Target: 5-8 tasks per wave. Fewer than 3 per wave (except final) = under-splitting.\n\n```\nWave 1 (Start Immediately - foundation + scaffolding):\n\u251C\u2500\u2500 Task 1: Project scaffolding + config [quick]\n\u251C\u2500\u2500 Task 2: Design system tokens [quick]\n\u251C\u2500\u2500 Task 3: Type definitions [quick]\n\u251C\u2500\u2500 Task 4: Schema definitions [quick]\n\u251C\u2500\u2500 Task 5: Storage interface + in-memory impl [quick]\n\u251C\u2500\u2500 Task 6: Auth middleware [quick]\n\u2514\u2500\u2500 Task 7: Client module [quick]\n\nWave 2 (After Wave 1 - core modules, MAX PARALLEL):\n\u251C\u2500\u2500 Task 8: Core business logic (depends: 3, 5, 7) [deep]\n\u251C\u2500\u2500 Task 9: API endpoints (depends: 4, 5) [unspecified-high]\n\u251C\u2500\u2500 Task 10: Secondary storage impl (depends: 5) [unspecified-high]\n\u251C\u2500\u2500 Task 11: Retry/fallback logic (depends: 8) [deep]\n\u251C\u2500\u2500 Task 12: UI layout + navigation (depends: 2) [visual-engineering]\n\u251C\u2500\u2500 Task 13: API client + hooks (depends: 4) [quick]\n\u2514\u2500\u2500 Task 14: Telemetry middleware (depends: 5, 10) [unspecified-high]\n\nWave 3 (After Wave 2 - integration + UI):\n\u251C\u2500\u2500 Task 15: Main route combining modules (depends: 6, 11, 14) [deep]\n\u251C\u2500\u2500 Task 16: UI data visualization (depends: 12, 13) [visual-engineering]\n\u251C\u2500\u2500 Task 17: Deployment config A (depends: 15) [quick]\n\u251C\u2500\u2500 Task 18: Deployment config B (depends: 15) [quick]\n\u251C\u2500\u2500 Task 19: Deployment config C (depends: 15) [quick]\n\u2514\u2500\u2500 Task 20: UI request log + build (depends: 16) [visual-engineering]\n\nWave FINAL (After ALL tasks \u2014 4 parallel reviews, then user okay):\n\u251C\u2500\u2500 Task F1: Plan compliance audit (oracle)\n\u251C\u2500\u2500 Task F2: Code quality review (unspecified-high)\n\u251C\u2500\u2500 Task F3: Real manual QA (unspecified-high)\n\u2514\u2500\u2500 Task F4: Scope fidelity check (deep)\n-> Present results -> Get explicit user okay\n\nCritical Path: Task 1 \u2192 Task 5 \u2192 Task 8 \u2192 Task 11 \u2192 Task 15 \u2192 Task 21 \u2192 F1-F4 \u2192 user okay\nParallel Speedup: ~70% faster than sequential\nMax Concurrent: 7 (Waves 1 & 2)\n```\n\n### Dependency Matrix (abbreviated - show ALL tasks in your generated plan)\n\n- **1-7**: - - 8-14, 1\n- **8**: 3, 5, 7 - 11, 15, 2\n- **11**: 8 - 15, 2\n- **14**: 5, 10 - 15, 2\n- **15**: 6, 11, 14 - 17-19, 21, 3\n- **21**: 15 - 23, 24, 4\n\n> This is abbreviated for reference. YOUR generated plan must include the FULL matrix for ALL tasks.\n\n### Agent Dispatch Summary\n\n- **1**: **7** - T1-T4 \u2192 `quick`, T5 \u2192 `quick`, T6 \u2192 `quick`, T7 \u2192 `quick`\n- **2**: **7** - T8 \u2192 `deep`, T9 \u2192 `unspecified-high`, T10 \u2192 `unspecified-high`, T11 \u2192 `deep`, T12 \u2192 `visual-engineering`, T13 \u2192 `quick`, T14 \u2192 `unspecified-high`\n- **3**: **6** - T15 \u2192 `deep`, T16 \u2192 `visual-engineering`, T17-T19 \u2192 `quick`, T20 \u2192 `visual-engineering`\n- **4**: **4** - T21 \u2192 `deep`, T22 \u2192 `unspecified-high`, T23 \u2192 `deep`, T24 \u2192 `git`\n- **FINAL**: **4** - F1 \u2192 `oracle`, F2 \u2192 `unspecified-high`, F3 \u2192 `unspecified-high`, F4 \u2192 `deep`\n\n---\n\n## TODOs\n\n> Implementation + Test = ONE Task. Never separate.\n> EVERY task MUST have: Recommended Agent Profile + Parallelization info + QA Scenarios.\n> **A task WITHOUT QA Scenarios is INCOMPLETE. No exceptions.**\n\n- [ ] 1. [Task Title]\n\n **What to do**:\n - [Clear implementation steps]\n - [Test cases to cover]\n\n **Must NOT do**:\n - [Specific exclusions from guardrails]\n\n **Recommended Agent Profile**:\n > Select category + skills based on task domain. Justify each choice.\n - **Category**: `[visual-engineering | ultrabrain | artistry | quick | unspecified-low | unspecified-high | writing]`\n - Reason: [Why this category fits the task domain]\n - **Skills**: [`skill-1`, `skill-2`]\n - `skill-1`: [Why needed - domain overlap explanation]\n - `skill-2`: [Why needed - domain overlap explanation]\n - **Skills Evaluated but Omitted**:\n - `omitted-skill`: [Why domain doesn't overlap]\n\n **Parallelization**:\n - **Can Run In Parallel**: YES | NO\n - **Parallel Group**: Wave N (with Tasks X, Y) | Sequential\n - **Blocks**: [Tasks that depend on this task completing]\n - **Blocked By**: [Tasks this depends on] | None (can start immediately)\n\n **References** (CRITICAL - Be Exhaustive):\n\n > The executor has NO context from your interview. References are their ONLY guide.\n > Each reference must answer: \"What should I look at and WHY?\"\n\n **Pattern References** (existing code to follow):\n - `src/services/auth.ts:45-78` - Authentication flow pattern (JWT creation, refresh token handling)\n\n **API/Type References** (contracts to implement against):\n - `src/types/user.ts:UserDTO` - Response shape for user endpoints\n\n **Test References** (testing patterns to follow):\n - `src/__tests__/auth.test.ts:describe(\"login\")` - Test structure and mocking patterns\n\n **External References** (libraries and frameworks):\n - Official docs: `https://zod.dev/?id=basic-usage` - Zod validation syntax\n\n **WHY Each Reference Matters** (explain the relevance):\n - Don't just list files - explain what pattern/information the executor should extract\n - Bad: `src/utils.ts` (vague, which utils? why?)\n - Good: `src/utils/validation.ts:sanitizeInput()` - Use this sanitization pattern for user input\n\n **Acceptance Criteria**:\n\n > **AGENT-EXECUTABLE VERIFICATION ONLY** - No human action permitted.\n > Every criterion MUST be verifiable by running a command or using a tool.\n\n **If TDD (tests enabled):**\n - [ ] Test file created: src/auth/login.test.ts\n - [ ] bun test src/auth/login.test.ts \u2192 PASS (3 tests, 0 failures)\n\n **QA Scenarios (MANDATORY - task is INCOMPLETE without these):**\n\n > **This is NOT optional. A task without QA scenarios WILL BE REJECTED.**\n >\n > Write scenario tests that verify the ACTUAL BEHAVIOR of what you built.\n > Minimum: 1 happy path + 1 failure/edge case per task.\n > Each scenario = exact tool + exact steps + exact assertions + evidence path.\n >\n > **The executing agent MUST run these scenarios after implementation.**\n > **The orchestrator WILL verify evidence files exist before marking task complete.**\n\n \\`\\`\\`\n Scenario: [Happy path - what SHOULD work]\n Tool: [Playwright / interactive_bash / Bash (curl)]\n Preconditions: [Exact setup state]\n Steps:\n 1. [Exact action - specific command/selector/endpoint, no vagueness]\n 2. [Next action - with expected intermediate state]\n 3. [Assertion - exact expected value, not \"verify it works\"]\n Expected Result: [Concrete, observable, binary pass/fail]\n Failure Indicators: [What specifically would mean this failed]\n Evidence: .sisyphus/evidence/task-{N}-{scenario-slug}.{ext}\n\n Scenario: [Failure/edge case - what SHOULD fail gracefully]\n Tool: [same format]\n Preconditions: [Invalid input / missing dependency / error state]\n Steps:\n 1. [Trigger the error condition]\n 2. [Assert error is handled correctly]\n Expected Result: [Graceful failure with correct error message/code]\n Evidence: .sisyphus/evidence/task-{N}-{scenario-slug}-error.{ext}\n \\`\\`\\`\n\n > **Specificity requirements - every scenario MUST use:**\n > - **Selectors**: Specific CSS selectors (`.login-button`, not \"the login button\")\n > - **Data**: Concrete test data (`\"test@example.com\"`, not `\"[email]\"`)\n > - **Assertions**: Exact values (`text contains \"Welcome back\"`, not \"verify it works\")\n > - **Timing**: Wait conditions where relevant (`timeout: 10s`)\n > - **Negative**: At least ONE failure/error scenario per task\n >\n > **Anti-patterns (your scenario is INVALID if it looks like this):**\n > - \u274C \"Verify it works correctly\" - HOW? What does \"correctly\" mean?\n > - \u274C \"Check the API returns data\" - WHAT data? What fields? What values?\n > - \u274C \"Test the component renders\" - WHERE? What selector? What content?\n > - \u274C Any scenario without an evidence path\n\n **Evidence to Capture:**\n - [ ] Each evidence file named: task-{N}-{scenario-slug}.{ext}\n - [ ] Screenshots for UI, terminal output for CLI, response bodies for API\n\n **Commit**: YES | NO (groups with N)\n - Message: `type(scope): desc`\n - Files: `path/to/file`\n - Pre-commit: `test command`\n\n---\n\n## Final Verification Wave (MANDATORY \u2014 after ALL implementation tasks)\n\n> 4 review agents run in PARALLEL. ALL must APPROVE. Present consolidated results to user and get explicit \"okay\" before completing.\n>\n> **Do NOT auto-proceed after verification. Wait for user's explicit approval before marking work complete.**\n> **Never mark F1-F4 as checked before getting user's okay.** Rejection or user feedback -> fix -> re-run -> present again -> wait for okay.\n\n- [ ] F1. **Plan Compliance Audit** \u2014 `oracle`\n Read the plan end-to-end. For each \"Must Have\": verify implementation exists (read file, curl endpoint, run command). For each \"Must NOT Have\": search codebase for forbidden patterns \u2014 reject with file:line if found. Check evidence files exist in .sisyphus/evidence/. Compare deliverables against plan.\n Output: `Must Have [N/N] | Must NOT Have [N/N] | Tasks [N/N] | VERDICT: APPROVE/REJECT`\n\n- [ ] F2. **Code Quality Review** \u2014 `unspecified-high`\n Run `tsc --noEmit` + linter + `bun test`. Review all changed files for: `as any`/`@ts-ignore`, empty catches, console.log in prod, commented-out code, unused imports. Check AI slop: excessive comments, over-abstraction, generic names (data/result/item/temp).\n Output: `Build [PASS/FAIL] | Lint [PASS/FAIL] | Tests [N pass/N fail] | Files [N clean/N issues] | VERDICT`\n\n- [ ] F3. **Real Manual QA** \u2014 `unspecified-high` (+ `playwright` skill if UI)\n Start from clean state. Execute EVERY QA scenario from EVERY task \u2014 follow exact steps, capture evidence. Test cross-task integration (features working together, not isolation). Test edge cases: empty state, invalid input, rapid actions. Save to `.sisyphus/evidence/final-qa/`.\n Output: `Scenarios [N/N pass] | Integration [N/N] | Edge Cases [N tested] | VERDICT`\n\n- [ ] F4. **Scope Fidelity Check** \u2014 `deep`\n For each task: read \"What to do\", read actual diff (git log/diff). Verify 1:1 \u2014 everything in spec was built (no missing), nothing beyond spec was built (no creep). Check \"Must NOT do\" compliance. Detect cross-task contamination: Task N touching Task M's files. Flag unaccounted changes.\n Output: `Tasks [N/N compliant] | Contamination [CLEAN/N issues] | Unaccounted [CLEAN/N files] | VERDICT`\n\n---\n\n## Commit Strategy\n\n- **1**: `type(scope): desc` - file.ts, npm test\n\n---\n\n## Success Criteria\n\n### Verification Commands\n```bash\ncommand # Expected: output\n```\n\n### Final Checklist\n- [ ] All \"Must Have\" present\n- [ ] All \"Must NOT Have\" absent\n- [ ] All tests pass\n```\n\n---\n";
|
package/dist/cli/index.js
CHANGED
|
@@ -53770,7 +53770,7 @@ var {
|
|
|
53770
53770
|
// package.json
|
|
53771
53771
|
var package_default = {
|
|
53772
53772
|
name: "@skj1724/oh-my-opencode",
|
|
53773
|
-
version: "3.
|
|
53773
|
+
version: "3.18.2",
|
|
53774
53774
|
description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
|
|
53775
53775
|
main: "./dist/index.js",
|
|
53776
53776
|
types: "dist/index.d.ts",
|
|
@@ -53839,7 +53839,7 @@ var package_default = {
|
|
|
53839
53839
|
"jsonc-parser": "^3.3.1",
|
|
53840
53840
|
picocolors: "^1.1.1",
|
|
53841
53841
|
picomatch: "^4.0.2",
|
|
53842
|
-
"posthog-node": "
|
|
53842
|
+
"posthog-node": "5.28.11",
|
|
53843
53843
|
"vscode-jsonrpc": "^8.2.0"
|
|
53844
53844
|
},
|
|
53845
53845
|
devDependencies: {
|
|
@@ -54417,7 +54417,6 @@ var types_PostHogPersistedProperty = /* @__PURE__ */ function(PostHogPersistedPr
|
|
|
54417
54417
|
PostHogPersistedProperty["Surveys"] = "surveys";
|
|
54418
54418
|
PostHogPersistedProperty["RemoteConfig"] = "remote_config";
|
|
54419
54419
|
PostHogPersistedProperty["FlagsEndpointWasHit"] = "flags_endpoint_was_hit";
|
|
54420
|
-
PostHogPersistedProperty["DeviceId"] = "device_id";
|
|
54421
54420
|
return PostHogPersistedProperty;
|
|
54422
54421
|
}({});
|
|
54423
54422
|
|
|
@@ -55255,8 +55254,6 @@ class PostHogCoreStateless {
|
|
|
55255
55254
|
group_properties: groupProperties,
|
|
55256
55255
|
...extraPayload
|
|
55257
55256
|
};
|
|
55258
|
-
if (personProperties.$device_id)
|
|
55259
|
-
requestData.$device_id = personProperties.$device_id;
|
|
55260
55257
|
if (this.evaluationContexts && this.evaluationContexts.length > 0)
|
|
55261
55258
|
requestData.evaluation_contexts = this.evaluationContexts;
|
|
55262
55259
|
const fetchOptions = {
|
|
@@ -56708,7 +56705,7 @@ class ErrorTracking {
|
|
|
56708
56705
|
}
|
|
56709
56706
|
|
|
56710
56707
|
// node_modules/posthog-node/dist/version.mjs
|
|
56711
|
-
var version = "5.
|
|
56708
|
+
var version = "5.28.11";
|
|
56712
56709
|
|
|
56713
56710
|
// node_modules/posthog-node/dist/types.mjs
|
|
56714
56711
|
var FeatureFlagError2 = {
|
|
@@ -73967,6 +73964,7 @@ var AgentOverrideConfigSchema = exports_external.object({
|
|
|
73967
73964
|
top_p: exports_external.number().min(0).max(1).optional(),
|
|
73968
73965
|
prompt: exports_external.string().optional(),
|
|
73969
73966
|
prompt_append: exports_external.string().optional(),
|
|
73967
|
+
language: exports_external.string().optional(),
|
|
73970
73968
|
tools: exports_external.record(exports_external.string(), exports_external.boolean()).optional(),
|
|
73971
73969
|
disable: exports_external.boolean().optional(),
|
|
73972
73970
|
description: exports_external.string().optional(),
|
|
@@ -74370,6 +74368,11 @@ var WebsearchConfigSchema = exports_external.object({
|
|
|
74370
74368
|
provider: WebsearchProviderSchema.optional()
|
|
74371
74369
|
});
|
|
74372
74370
|
|
|
74371
|
+
// src/config/schema/i18n.ts
|
|
74372
|
+
var I18nConfigSchema = exports_external.object({
|
|
74373
|
+
language: exports_external.string().min(1).optional()
|
|
74374
|
+
});
|
|
74375
|
+
|
|
74373
74376
|
// src/config/schema/oh-my-opencode-config.ts
|
|
74374
74377
|
var OhMyOpenCodeConfigSchema = exports_external.object({
|
|
74375
74378
|
$schema: exports_external.string().optional(),
|
|
@@ -74410,6 +74413,7 @@ var OhMyOpenCodeConfigSchema = exports_external.object({
|
|
|
74410
74413
|
tmux: TmuxConfigSchema.optional(),
|
|
74411
74414
|
sisyphus: SisyphusConfigSchema.optional(),
|
|
74412
74415
|
start_work: StartWorkConfigSchema.optional(),
|
|
74416
|
+
i18n: I18nConfigSchema.optional(),
|
|
74413
74417
|
_migrations: exports_external.array(exports_external.string()).optional()
|
|
74414
74418
|
});
|
|
74415
74419
|
// src/plugin-config.ts
|
|
@@ -51,6 +51,7 @@ export declare const AgentOverrideConfigSchema: z.ZodObject<{
|
|
|
51
51
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
52
52
|
prompt: z.ZodOptional<z.ZodString>;
|
|
53
53
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
54
|
+
language: z.ZodOptional<z.ZodString>;
|
|
54
55
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
55
56
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
56
57
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -180,6 +181,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
180
181
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
181
182
|
prompt: z.ZodOptional<z.ZodString>;
|
|
182
183
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
184
|
+
language: z.ZodOptional<z.ZodString>;
|
|
183
185
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
184
186
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
185
187
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -308,6 +310,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
308
310
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
309
311
|
prompt: z.ZodOptional<z.ZodString>;
|
|
310
312
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
313
|
+
language: z.ZodOptional<z.ZodString>;
|
|
311
314
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
312
315
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
313
316
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -436,6 +439,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
436
439
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
437
440
|
prompt: z.ZodOptional<z.ZodString>;
|
|
438
441
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
442
|
+
language: z.ZodOptional<z.ZodString>;
|
|
439
443
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
440
444
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
441
445
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -564,6 +568,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
564
568
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
565
569
|
prompt: z.ZodOptional<z.ZodString>;
|
|
566
570
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
571
|
+
language: z.ZodOptional<z.ZodString>;
|
|
567
572
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
568
573
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
569
574
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -693,6 +698,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
693
698
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
694
699
|
prompt: z.ZodOptional<z.ZodString>;
|
|
695
700
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
701
|
+
language: z.ZodOptional<z.ZodString>;
|
|
696
702
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
697
703
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
698
704
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -821,6 +827,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
821
827
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
822
828
|
prompt: z.ZodOptional<z.ZodString>;
|
|
823
829
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
830
|
+
language: z.ZodOptional<z.ZodString>;
|
|
824
831
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
825
832
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
826
833
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -949,6 +956,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
949
956
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
950
957
|
prompt: z.ZodOptional<z.ZodString>;
|
|
951
958
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
959
|
+
language: z.ZodOptional<z.ZodString>;
|
|
952
960
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
953
961
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
954
962
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1077,6 +1085,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
1077
1085
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
1078
1086
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1079
1087
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
1088
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1080
1089
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1081
1090
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1082
1091
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1205,6 +1214,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
1205
1214
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
1206
1215
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1207
1216
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
1217
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1208
1218
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1209
1219
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1210
1220
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1333,6 +1343,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
1333
1343
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
1334
1344
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1335
1345
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
1346
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1336
1347
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1337
1348
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1338
1349
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1461,6 +1472,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
1461
1472
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
1462
1473
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1463
1474
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
1475
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1464
1476
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1465
1477
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1466
1478
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1589,6 +1601,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
1589
1601
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
1590
1602
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1591
1603
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
1604
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1592
1605
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1593
1606
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1594
1607
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1717,6 +1730,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
1717
1730
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
1718
1731
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1719
1732
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
1733
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1720
1734
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1721
1735
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1722
1736
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1845,6 +1859,7 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
1845
1859
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
1846
1860
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1847
1861
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
1862
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1848
1863
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1849
1864
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1850
1865
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Internationalization configuration for agent interaction language.
|
|
4
|
+
*
|
|
5
|
+
* Controls the language used for agent prompts and thinking output guidance.
|
|
6
|
+
* When set, agents will be instructed to respond in the specified language.
|
|
7
|
+
*
|
|
8
|
+
* Supported values: IETF BCP 47 format (e.g., "zh-CN", "en-US", "ja-JP", "ko-KR")
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // In ~/.config/opencode/oh-my-opencode.jsonc
|
|
12
|
+
* {
|
|
13
|
+
* "i18n": {
|
|
14
|
+
* "language": "zh-CN"
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
*/
|
|
18
|
+
export declare const I18nConfigSchema: z.ZodObject<{
|
|
19
|
+
language: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>;
|
|
21
|
+
export type I18nConfig = z.infer<typeof I18nConfigSchema>;
|
|
@@ -83,6 +83,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
83
83
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
84
84
|
prompt: z.ZodOptional<z.ZodString>;
|
|
85
85
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
86
|
+
language: z.ZodOptional<z.ZodString>;
|
|
86
87
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
87
88
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
88
89
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -211,6 +212,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
211
212
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
212
213
|
prompt: z.ZodOptional<z.ZodString>;
|
|
213
214
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
215
|
+
language: z.ZodOptional<z.ZodString>;
|
|
214
216
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
215
217
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
216
218
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -339,6 +341,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
339
341
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
340
342
|
prompt: z.ZodOptional<z.ZodString>;
|
|
341
343
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
344
|
+
language: z.ZodOptional<z.ZodString>;
|
|
342
345
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
343
346
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
344
347
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -467,6 +470,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
467
470
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
468
471
|
prompt: z.ZodOptional<z.ZodString>;
|
|
469
472
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
473
|
+
language: z.ZodOptional<z.ZodString>;
|
|
470
474
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
471
475
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
472
476
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -596,6 +600,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
596
600
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
597
601
|
prompt: z.ZodOptional<z.ZodString>;
|
|
598
602
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
603
|
+
language: z.ZodOptional<z.ZodString>;
|
|
599
604
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
600
605
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
601
606
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -724,6 +729,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
724
729
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
725
730
|
prompt: z.ZodOptional<z.ZodString>;
|
|
726
731
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
732
|
+
language: z.ZodOptional<z.ZodString>;
|
|
727
733
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
728
734
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
729
735
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -852,6 +858,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
852
858
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
853
859
|
prompt: z.ZodOptional<z.ZodString>;
|
|
854
860
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
861
|
+
language: z.ZodOptional<z.ZodString>;
|
|
855
862
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
856
863
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
857
864
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -980,6 +987,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
980
987
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
981
988
|
prompt: z.ZodOptional<z.ZodString>;
|
|
982
989
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
990
|
+
language: z.ZodOptional<z.ZodString>;
|
|
983
991
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
984
992
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
985
993
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1108,6 +1116,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1108
1116
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
1109
1117
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1110
1118
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
1119
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1111
1120
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1112
1121
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1113
1122
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1236,6 +1245,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1236
1245
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
1237
1246
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1238
1247
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
1248
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1239
1249
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1240
1250
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1241
1251
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1364,6 +1374,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1364
1374
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
1365
1375
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1366
1376
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
1377
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1367
1378
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1368
1379
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1369
1380
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1492,6 +1503,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1492
1503
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
1493
1504
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1494
1505
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
1506
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1495
1507
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1496
1508
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1497
1509
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1620,6 +1632,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1620
1632
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
1621
1633
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1622
1634
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
1635
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1623
1636
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1624
1637
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1625
1638
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1748,6 +1761,7 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
1748
1761
|
top_p: z.ZodOptional<z.ZodNumber>;
|
|
1749
1762
|
prompt: z.ZodOptional<z.ZodString>;
|
|
1750
1763
|
prompt_append: z.ZodOptional<z.ZodString>;
|
|
1764
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1751
1765
|
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
1752
1766
|
disable: z.ZodOptional<z.ZodBoolean>;
|
|
1753
1767
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -2106,6 +2120,9 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
2106
2120
|
start_work: z.ZodOptional<z.ZodObject<{
|
|
2107
2121
|
auto_commit: z.ZodDefault<z.ZodBoolean>;
|
|
2108
2122
|
}, z.core.$strip>>;
|
|
2123
|
+
i18n: z.ZodOptional<z.ZodObject<{
|
|
2124
|
+
language: z.ZodOptional<z.ZodString>;
|
|
2125
|
+
}, z.core.$strip>>;
|
|
2109
2126
|
_migrations: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2110
2127
|
}, z.core.$strip>;
|
|
2111
2128
|
export type OhMyOpenCodeConfig = z.infer<typeof OhMyOpenCodeConfigSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HANDOFF_TEMPLATE = "# Handoff \
|
|
1
|
+
export declare const HANDOFF_TEMPLATE = "# Handoff Command\n\n## Purpose\n\nUse /handoff when:\n- The current session context is getting too long and quality is degrading\n- You want to start fresh while preserving essential context from this session\n- The context window is approaching capacity\n\nThis creates a detailed context summary that can be used to continue work in a new session.\n\n---\n\n# PHASE 0: VALIDATE REQUEST\n\nBefore proceeding, confirm:\n- [ ] There is meaningful work or context in this session to preserve\n- [ ] The user wants to create a handoff summary (not just asking about it)\n\nIf the session is nearly empty or has no meaningful context, inform the user there is nothing substantial to hand off.\n\n---\n\n# PHASE 1: GATHER PROGRAMMATIC CONTEXT\n\nExecute these tools to gather concrete data:\n\n1. session_read({ session_id: \"$SESSION_ID\" }) - full session history\n2. todoread() - current task progress\n3. Bash({ command: \"git diff --stat HEAD~10..HEAD\" }) - recent file changes\n4. Bash({ command: \"git status --porcelain\" }) - uncommitted changes\n\nSuggested execution order:\n\n```\nsession_read({ session_id: \"$SESSION_ID\" })\ntodoread()\nBash({ command: \"git diff --stat HEAD~10..HEAD\" })\nBash({ command: \"git status --porcelain\" })\n```\n\nAnalyze the gathered outputs to understand:\n- What the user asked for (exact wording)\n- What work was completed\n- What tasks remain incomplete (include todo state)\n- What decisions were made\n- What files were modified or discussed (include git diff/stat + status)\n- What patterns, constraints, or preferences were established\n\n---\n\n# PHASE 2: EXTRACT CONTEXT\n\nWrite the context summary from first person perspective (\"I did...\", \"I told you...\").\n\nFocus on:\n- Capabilities and behavior, not file-by-file implementation details\n- What matters for continuing the work\n- Avoiding excessive implementation details (variable names, storage keys, constants) unless critical\n- USER REQUESTS (AS-IS) must be verbatim (do not paraphrase)\n- EXPLICIT CONSTRAINTS must be verbatim only (do not invent)\n\nQuestions to consider when extracting:\n- What did I just do or implement?\n- What instructions did I already give which are still relevant (e.g. follow patterns in the codebase)?\n- What files did I tell you are important or that I am working on?\n- Did I provide a plan or spec that should be included?\n- What did I already tell you that is important (libraries, patterns, constraints, preferences)?\n- What important technical details did I discover (APIs, methods, patterns)?\n- What caveats, limitations, or open questions did I find?\n\n---\n\n# PHASE 3: FORMAT OUTPUT\n\nGenerate a handoff summary using this exact format:\n\n```\nHANDOFF CONTEXT\n===============\n\nUSER REQUESTS (AS-IS)\n---------------------\n- [Exact verbatim user requests - NOT paraphrased]\n\nGOAL\n----\n[One sentence describing what should be done next]\n\nWORK COMPLETED\n--------------\n- [First person bullet points of what was done]\n- [Include specific file paths when relevant]\n- [Note key implementation decisions]\n\nCURRENT STATE\n-------------\n- [Current state of the codebase or task]\n- [Build/test status if applicable]\n- [Any environment or configuration state]\n\nPENDING TASKS\n-------------\n- [Tasks that were planned but not completed]\n- [Next logical steps to take]\n- [Any blockers or issues encountered]\n- [Include current todo state from todoread()]\n\nKEY FILES\n---------\n- [path/to/file1] - [brief role description]\n- [path/to/file2] - [brief role description]\n(Maximum 10 files, prioritized by importance)\n- (Include files from git diff/stat and git status)\n\nIMPORTANT DECISIONS\n-------------------\n- [Technical decisions that were made and why]\n- [Trade-offs that were considered]\n- [Patterns or conventions established]\n\nEXPLICIT CONSTRAINTS\n--------------------\n- [Verbatim constraints only - from user or existing AGENTS.md]\n- If none, write: None\n\nCONTEXT FOR CONTINUATION\n------------------------\n- [What the next session needs to know to continue]\n- [Warnings or gotchas to be aware of]\n- [References to documentation if relevant]\n```\n\nRules for the summary:\n- Plain text with bullets\n- No markdown headers with # (use the format above with dashes)\n- No bold, italic, or code fences within content\n- Use workspace-relative paths for files\n- Keep it focused - only include what matters for continuation\n- Pick an appropriate length based on complexity\n- USER REQUESTS (AS-IS) and EXPLICIT CONSTRAINTS must be verbatim only\n\n---\n\n# PHASE 4: PROVIDE INSTRUCTIONS\n\nAfter generating the summary, instruct the user:\n\n```\n---\n\nTO CONTINUE IN A NEW SESSION:\n\n1. Press 'n' in OpenCode TUI to open a new session, or run 'opencode' in a new terminal\n2. Paste the HANDOFF CONTEXT above as your first message\n3. Add your request: \"Continue from the handoff context above. [Your next task]\"\n\nThe new session will have all context needed to continue seamlessly.\n```\n\n---\n\n# IMPORTANT CONSTRAINTS\n\n- DO NOT attempt to programmatically create new sessions (no API available to agents)\n- DO provide a self-contained summary that works without access to this session\n- DO include workspace-relative file paths\n- DO NOT include sensitive information (API keys, credentials, secrets)\n- DO NOT exceed 10 files in the KEY FILES section\n- DO keep the GOAL section to a single sentence or short paragraph\n\n---\n\n# EXECUTE NOW\n\nBegin by gathering programmatic context, then synthesize the handoff summary.\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const INIT_DEEP_TEMPLATE = "# /init-deep\n\n\u751F\u6210\u5C42\u7EA7\u5316\u7684 AGENTS.md \u6587\u4EF6\u3002\u6839\u76EE\u5F55 + \u6309\u590D\u6742\u5EA6\u8BC4\u5206\u7684\u5B50\u76EE\u5F55\u3002\n\n## \u4F7F\u7528\u65B9\u5F0F\n\n```\n/init-deep # \u66F4\u65B0\u6A21\u5F0F\uFF1A\u4FEE\u6539\u73B0\u6709\u6587\u4EF6 + \u5728\u9700\u8981\u65F6\u521B\u5EFA\u65B0\u6587\u4EF6\n/init-deep --create-new # \u8BFB\u53D6\u73B0\u6709\u6587\u4EF6 \u2192 \u5220\u9664\u5168\u90E8 \u2192 \u4ECE\u5934\u91CD\u65B0\u751F\u6210\n/init-deep --max-depth=2 # \u9650\u5236\u76EE\u5F55\u6DF1\u5EA6\uFF08\u9ED8\u8BA4\uFF1A3\uFF09\n```\n\n---\n\n## \u5DE5\u4F5C\u6D41\u7A0B\uFF08\u6982\u89C8\uFF09\n\n1. **\u53D1\u73B0 + \u5206\u6790**\uFF08\u5E76\u53D1\uFF09\n - \u7ACB\u5373\u542F\u52A8\u540E\u53F0 explore agents\n - \u4E3B\u4F1A\u8BDD\uFF1Abash \u76EE\u5F55\u7ED3\u6784 + LSP codemap + \u8BFB\u53D6\u73B0\u6709 AGENTS.md\n2. **\u8BC4\u5206 & \u51B3\u7B56** - \u6839\u636E\u5408\u5E76\u7ED3\u679C\u786E\u5B9A AGENTS.md \u7684\u653E\u7F6E\u4F4D\u7F6E\n3. **\u751F\u6210** - \u5148\u751F\u6210\u6839\u76EE\u5F55\uFF0C\u7136\u540E\u5E76\u884C\u751F\u6210\u5B50\u76EE\u5F55\n4. **\u5BA1\u67E5** - \u53BB\u91CD\u3001\u88C1\u526A\u3001\u9A8C\u8BC1\n\n<critical>\n**\u4E3A\u6240\u6709\u9636\u6BB5\u521B\u5EFA TodoWrite\u3002\u5B9E\u65F6\u6807\u8BB0 in_progress \u2192 completed\u3002**\n```\nTodoWrite([\n { id: \"discovery\", content: \"\u542F\u52A8 explore agents + LSP codemap + \u8BFB\u53D6\u73B0\u6709\u6587\u4EF6\", status: \"pending\", priority: \"high\" },\n { id: \"scoring\", content: \"\u4E3A\u76EE\u5F55\u8BC4\u5206\uFF0C\u786E\u5B9A\u653E\u7F6E\u4F4D\u7F6E\", status: \"pending\", priority: \"high\" },\n { id: \"generate\", content: \"\u751F\u6210 AGENTS.md \u6587\u4EF6\uFF08\u6839\u76EE\u5F55 + \u5B50\u76EE\u5F55\uFF09\", status: \"pending\", priority: \"high\" },\n { id: \"review\", content: \"\u53BB\u91CD\u3001\u9A8C\u8BC1\u3001\u88C1\u526A\", status: \"pending\", priority: \"medium\" }\n])\n```\n</critical>\n\n---\n\n## \u9636\u6BB5 1\uFF1A\u53D1\u73B0 + \u5206\u6790\uFF08\u5E76\u53D1\uFF09\n\n**\u5C06 \"discovery\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n### \u7ACB\u5373\u542F\u52A8\u540E\u53F0 Explore Agents\n\n\u4E0D\u8981\u7B49\u5F85\u2014\u2014\u8FD9\u4E9B agent \u5F02\u6B65\u8FD0\u884C\uFF0C\u4E0E\u4E3B\u4F1A\u8BDD\u540C\u65F6\u5DE5\u4F5C\u3002\n\n```\n// \u4E00\u6B21\u6027\u542F\u52A8\u5168\u90E8\uFF0C\u7A0D\u540E\u6536\u96C6\u7ED3\u679C\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore project structure\", run_in_background=true, prompt=\"Project structure: PREDICT standard patterns for detected language \u2192 REPORT deviations only\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find entry points\", run_in_background=true, prompt=\"Entry points: FIND main files \u2192 REPORT non-standard organization\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find conventions\", run_in_background=true, prompt=\"Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) \u2192 REPORT project-specific rules\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find anti-patterns\", run_in_background=true, prompt=\"Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments \u2192 LIST forbidden patterns\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore build/CI\", run_in_background=true, prompt=\"Build/CI: FIND .github/workflows, Makefile \u2192 REPORT non-standard patterns\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find test patterns\", run_in_background=true, prompt=\"Test patterns: FIND test configs, test structure \u2192 REPORT unique conventions\")\n```\n\n<dynamic-agents>\n**\u52A8\u6001 Agent \u751F\u6210**\uFF1A\u5728 bash \u5206\u6790\u540E\uFF0C\u6839\u636E\u9879\u76EE\u89C4\u6A21\u751F\u6210\u989D\u5916\u7684 explore agents\uFF1A\n\n| \u56E0\u7D20 | \u9608\u503C | \u989D\u5916 Agents |\n|--------|-----------|-------------------|\n| **\u6587\u4EF6\u603B\u6570** | >100 | \u6BCF 100 \u4E2A\u6587\u4EF6 +1 |\n| **\u4EE3\u7801\u603B\u884C\u6570** | >10k | \u6BCF 10k \u884C +1 |\n| **\u76EE\u5F55\u6DF1\u5EA6** | \u22654 | \u6DF1\u5EA6\u63A2\u7D22 +2 |\n| **\u5927\u6587\u4EF6\uFF08>500 \u884C\uFF09** | >10 \u4E2A | \u590D\u6742\u5EA6\u70ED\u70B9 +1 |\n| **Monorepo** | \u68C0\u6D4B\u5230 | \u6BCF\u4E2A package/workspace +1 |\n| **\u591A\u8BED\u8A00** | >1 | \u6BCF\u79CD\u8BED\u8A00 +1 |\n\n```bash\n# \u5148\u6D4B\u91CF\u9879\u76EE\u89C4\u6A21\ntotal_files=$(find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | wc -l)\ntotal_lines=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" -o -name \"*.go\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | tail -1 | awk '{print $1}')\nlarge_files=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | awk '$1 > 500 {count++} END {print count+0}')\nmax_depth=$(find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' | awk -F/ '{print NF}' | sort -rn | head -1)\n```\n\n\u751F\u6210\u793A\u4F8B\uFF1A\n```\n// 500 \u4E2A\u6587\u4EF6\uFF0C50k \u884C\uFF0C\u6DF1\u5EA6 6\uFF0C15 \u4E2A\u5927\u6587\u4EF6 \u2192 \u542F\u52A8 5+5+2+1 = 13 \u4E2A\u989D\u5916 agents\ntask(subagent_type=\"explore\", load_skills=[], description=\"Analyze large files\", run_in_background=true, prompt=\"Large file analysis: FIND files >500 lines, REPORT complexity hotspots\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore deep modules\", run_in_background=true, prompt=\"Deep modules at depth 4+: FIND hidden patterns, internal conventions\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find shared utilities\", run_in_background=true, prompt=\"Cross-cutting concerns: FIND shared utilities across directories\")\n// ... \u6839\u636E\u8BA1\u7B97\u7ED3\u679C\u751F\u6210\u66F4\u591A\n```\n</dynamic-agents>\n\n### \u4E3B\u4F1A\u8BDD\uFF1A\u5E76\u53D1\u5206\u6790\n\n**\u5728\u540E\u53F0 agents \u8FD0\u884C\u65F6**\uFF0C\u4E3B\u4F1A\u8BDD\u6267\u884C\uFF1A\n\n#### 1. Bash \u76EE\u5F55\u7ED3\u6784\u5206\u6790\n```bash\n# \u76EE\u5F55\u6DF1\u5EA6 + \u6587\u4EF6\u6570\u91CF\nfind . -type d -not -path '*/\\.*' -not -path '*/node_modules/*' -not -path '*/venv/*' -not -path '*/dist/*' -not -path '*/build/*' | awk -F/ '{print NF-1}' | sort -n | uniq -c\n\n# \u6BCF\u4E2A\u76EE\u5F55\u7684\u6587\u4EF6\u6570\uFF08\u524D 30 \u4E2A\uFF09\nfind . -type f -not -path '*/\\.*' -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -30\n\n# \u6309\u6269\u5C55\u540D\u7684\u4EE3\u7801\u96C6\u4E2D\u5EA6\nfind . -type f \\( -name \"*.py\" -o -name \"*.ts\" -o -name \"*.tsx\" -o -name \"*.js\" -o -name \"*.go\" -o -name \"*.rs\" \\) -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20\n\n# \u73B0\u6709 AGENTS.md / CLAUDE.md\nfind . -type f \\( -name \"AGENTS.md\" -o -name \"CLAUDE.md\" \\) -not -path '*/node_modules/*' 2>/dev/null\n```\n\n#### 2. \u8BFB\u53D6\u73B0\u6709 AGENTS.md\n```\n\u5BF9\u6BCF\u4E2A\u627E\u5230\u7684\u73B0\u6709\u6587\u4EF6\uFF1A\n Read(filePath=file)\n \u63D0\u53D6\uFF1A\u5173\u952E\u6D1E\u5BDF\u3001\u7EA6\u5B9A\u3001\u53CD\u6A21\u5F0F\n \u5B58\u5165 EXISTING_AGENTS map\n```\n\n\u5982\u679C\u6307\u5B9A\u4E86 `--create-new`\uFF1A\u5148\u8BFB\u53D6\u6240\u6709\u73B0\u6709\u6587\u4EF6\uFF08\u4FDD\u7559\u4E0A\u4E0B\u6587\uFF09\u2192 \u7136\u540E\u5220\u9664\u5168\u90E8 \u2192 \u91CD\u65B0\u751F\u6210\u3002\n\n#### 3. LSP Codemap\uFF08\u5982\u53EF\u7528\uFF09\n```\nLspServers() # \u68C0\u67E5\u53EF\u7528\u6027\n\n# \u5165\u53E3\u6587\u4EF6\uFF08\u5E76\u884C\uFF09\nLspDocumentSymbols(filePath=\"src/index.ts\")\nLspDocumentSymbols(filePath=\"main.py\")\n\n# \u5173\u952E\u7B26\u53F7\uFF08\u5E76\u884C\uFF09\nLspWorkspaceSymbols(filePath=\".\", query=\"class\")\nLspWorkspaceSymbols(filePath=\".\", query=\"interface\")\nLspWorkspaceSymbols(filePath=\".\", query=\"function\")\n\n# \u9876\u90E8\u5BFC\u51FA\u7684\u4E2D\u5FC3\u6027\nLspFindReferences(filePath=\"...\", line=X, character=Y)\n```\n\n**LSP \u5907\u7528\u65B9\u6848**\uFF1A\u4E0D\u53EF\u7528\u65F6\uFF0C\u4F9D\u8D56 explore agents + AST-grep\u3002\n\n### \u6536\u96C6\u540E\u53F0\u7ED3\u679C\n\n```\n// \u4E3B\u4F1A\u8BDD\u5206\u6790\u5B8C\u6210\u540E\uFF0C\u6536\u96C6\u6240\u6709 task \u7ED3\u679C\nfor each task_id: background_output(task_id=\"...\")\n```\n\n**\u5408\u5E76\uFF1Abash + LSP + \u73B0\u6709 + explore \u7ED3\u679C\u3002\u5C06 \"discovery\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## \u9636\u6BB5 2\uFF1A\u8BC4\u5206 & \u4F4D\u7F6E\u51B3\u7B56\n\n**\u5C06 \"scoring\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n### \u8BC4\u5206\u77E9\u9635\n\n| \u56E0\u7D20 | \u6743\u91CD | \u9AD8\u9608\u503C | \u6765\u6E90 |\n|--------|--------|----------------|--------|\n| \u6587\u4EF6\u6570\u91CF | 3x | >20 | bash |\n| \u5B50\u76EE\u5F55\u6570\u91CF | 2x | >5 | bash |\n| \u4EE3\u7801\u6BD4\u4F8B | 2x | >70% | bash |\n| \u72EC\u6709\u6A21\u5F0F | 1x | \u6709\u81EA\u5DF1\u7684\u914D\u7F6E | explore |\n| \u6A21\u5757\u8FB9\u754C | 2x | \u6709 index.ts/__init__.py | bash |\n| \u7B26\u53F7\u5BC6\u5EA6 | 2x | >30 \u4E2A\u7B26\u53F7 | LSP |\n| \u5BFC\u51FA\u6570\u91CF | 2x | >10 \u4E2A\u5BFC\u51FA | LSP |\n| \u5F15\u7528\u4E2D\u5FC3\u6027 | 3x | >20 \u4E2A\u5F15\u7528 | LSP |\n\n### \u51B3\u7B56\u89C4\u5219\n\n| \u5206\u6570 | \u64CD\u4F5C |\n|-------|--------|\n| **\u6839\u76EE\u5F55 (.)** | \u59CB\u7EC8\u521B\u5EFA |\n| **>15** | \u521B\u5EFA AGENTS.md |\n| **8-15** | \u5982\u4E3A\u72EC\u7ACB\u9886\u57DF\u5219\u521B\u5EFA |\n| **<8** | \u8DF3\u8FC7\uFF08\u7531\u7236\u7EA7\u8986\u76D6\uFF09 |\n\n### \u8F93\u51FA\n```\nAGENTS_LOCATIONS = [\n { path: \".\", type: \"root\" },\n { path: \"src/hooks\", score: 18, reason: \"high complexity\" },\n { path: \"src/api\", score: 12, reason: \"distinct domain\" }\n]\n```\n\n**\u5C06 \"scoring\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## \u9636\u6BB5 3\uFF1A\u751F\u6210 AGENTS.md\n\n**\u5C06 \"generate\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n<critical>\n**\u6587\u4EF6\u5199\u5165\u89C4\u5219**\uFF1A\u5982\u679C\u76EE\u6807\u8DEF\u5F84\u5DF2\u5B58\u5728 AGENTS.md \u2192 \u4F7F\u7528 `Edit` \u5DE5\u5177\u3002\u5982\u679C\u4E0D\u5B58\u5728 \u2192 \u4F7F\u7528 `Write` \u5DE5\u5177\u3002\n\u6C38\u8FDC\u4E0D\u8981\u7528 Write \u8986\u76D6\u5DF2\u5B58\u5728\u7684\u6587\u4EF6\u3002\u59CB\u7EC8\u901A\u8FC7 `Read` \u6216\u53D1\u73B0\u7ED3\u679C\u68C0\u67E5\u662F\u5426\u5B58\u5728\u3002\n</critical>\n\n### \u6839\u76EE\u5F55 AGENTS.md\uFF08\u5B8C\u6574\u6A21\u677F\uFF09\n\n```markdown\n# PROJECT KNOWLEDGE BASE\n\n**Generated:** {TIMESTAMP}\n**Commit:** {SHORT_SHA}\n**Branch:** {BRANCH}\n\n## OVERVIEW\n{1-2 sentences: what + core stack}\n\n## STRUCTURE\n\\`\\`\\`\n{root}/\n\u251C\u2500\u2500 {dir}/ # {non-obvious purpose only}\n\u2514\u2500\u2500 {entry}\n\\`\\`\\`\n\n## WHERE TO LOOK\n| Task | Location | Notes |\n|------|----------|-------|\n\n## CODE MAP\n{From LSP - skip if unavailable or project <10 files}\n\n| Symbol | Type | Location | Refs | Role |\n|--------|------|----------|------|------|\n\n## CONVENTIONS\n{ONLY deviations from standard}\n\n## ANTI-PATTERNS (THIS PROJECT)\n{Explicitly forbidden here}\n\n## UNIQUE STYLES\n{Project-specific}\n\n## COMMANDS\n\\`\\`\\`bash\n{dev/test/build}\n\\`\\`\\`\n\n## NOTES\n{Gotchas}\n```\n\n**\u8D28\u91CF\u95E8\u69DB**\uFF1A50-150 \u884C\uFF0C\u65E0\u901A\u7528\u5EFA\u8BAE\uFF0C\u65E0\u663E\u800C\u6613\u89C1\u7684\u4FE1\u606F\u3002\n\n### \u5B50\u76EE\u5F55 AGENTS.md\uFF08\u5E76\u884C\uFF09\n\n\u4E3A\u6BCF\u4E2A\u4F4D\u7F6E\u542F\u52A8\u5199\u5165\u4EFB\u52A1\uFF1A\n\n```\nfor loc in AGENTS_LOCATIONS (except root):\n task(category=\"writing\", load_skills=[], run_in_background=false, description=\"Generate AGENTS.md\", prompt=\\`\n Generate AGENTS.md for: ${loc.path}\n - Reason: ${loc.reason}\n - 30-80 lines max\n - NEVER repeat parent content\n - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS\n \\`)\n```\n\n**\u7B49\u5F85\u5168\u90E8\u5B8C\u6210\u3002\u5C06 \"generate\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## \u9636\u6BB5 4\uFF1A\u5BA1\u67E5 & \u53BB\u91CD\n\n**\u5C06 \"review\" \u6807\u8BB0\u4E3A in_progress\u3002**\n\n\u5BF9\u6BCF\u4E2A\u751F\u6210\u7684\u6587\u4EF6\uFF1A\n- \u79FB\u9664\u901A\u7528\u5EFA\u8BAE\n- \u79FB\u9664\u4E0E\u7236\u7EA7\u91CD\u590D\u7684\u5185\u5BB9\n- \u88C1\u526A\u81F3\u5927\u5C0F\u9650\u5236\u5185\n- \u9A8C\u8BC1\u7535\u62A5\u5F0F\u98CE\u683C\n\n**\u5C06 \"review\" \u6807\u8BB0\u4E3A completed\u3002**\n\n---\n\n## \u6700\u7EC8\u62A5\u544A\n\n```\n=== init-deep \u5B8C\u6210 ===\n\n\u6A21\u5F0F\uFF1A{update | create-new}\n\n\u6587\u4EF6\uFF1A\n [OK] ./AGENTS.md (\u6839\u76EE\u5F55, {N} \u884C)\n [OK] ./src/hooks/AGENTS.md ({N} \u884C)\n\n\u5206\u6790\u76EE\u5F55\u6570\uFF1A{N}\n\u521B\u5EFA AGENTS.md\uFF1A{N}\n\u66F4\u65B0 AGENTS.md\uFF1A{N}\n\n\u5C42\u7EA7\u7ED3\u6784\uFF1A\n ./AGENTS.md\n \u2514\u2500\u2500 src/hooks/AGENTS.md\n```\n\n---\n\n## \u53CD\u6A21\u5F0F\n\n- **\u9759\u6001 agent \u6570\u91CF**\uFF1A\u5FC5\u987B\u6839\u636E\u9879\u76EE\u89C4\u6A21/\u6DF1\u5EA6\u8C03\u6574 agents \u6570\u91CF\n- **\u987A\u5E8F\u6267\u884C**\uFF1A\u5FC5\u987B\u5E76\u884C\uFF08explore + LSP \u5E76\u53D1\uFF09\n- **\u5FFD\u7565\u73B0\u6709\u6587\u4EF6**\uFF1A\u59CB\u7EC8\u5148\u8BFB\u53D6\u73B0\u6709\u6587\u4EF6\uFF0C\u5373\u4F7F\u4F7F\u7528 --create-new\n- **\u8FC7\u5EA6\u6587\u6863\u5316**\uFF1A\u4E0D\u662F\u6BCF\u4E2A\u76EE\u5F55\u90FD\u9700\u8981 AGENTS.md\n- **\u5197\u4F59**\uFF1A\u5B50\u7EA7\u7EDD\u4E0D\u91CD\u590D\u7236\u7EA7\u5185\u5BB9\n- **\u901A\u7528\u5185\u5BB9**\uFF1A\u79FB\u9664\u9002\u7528\u4E8E\u6240\u6709\u9879\u76EE\u7684\u4EFB\u4F55\u5185\u5BB9\n- **\u5197\u957F\u98CE\u683C**\uFF1A\u7535\u62A5\u5F0F\u98CE\u683C\uFF0C\u5426\u5219\u52FF\u5199";
|
|
1
|
+
export declare const INIT_DEEP_TEMPLATE = "# /init-deep\n\nGenerate hierarchical AGENTS.md files. Root + complexity-scored subdirectories.\n\n## Usage\n\n```\n/init-deep # Update mode: modify existing + create new where warranted\n/init-deep --create-new # Read existing \u2192 remove all \u2192 regenerate from scratch\n/init-deep --max-depth=2 # Limit directory depth (default: 3)\n```\n\n---\n\n## Workflow (High-Level)\n\n1. **Discovery + Analysis** (concurrent)\n - Fire background explore agents immediately\n - Main session: bash structure + LSP codemap + read existing AGENTS.md\n2. **Score & Decide** - Determine AGENTS.md locations from merged findings\n3. **Generate** - Root first, then subdirs in parallel\n4. **Review** - Deduplicate, trim, validate\n\n<critical>\n**TodoWrite ALL phases. Mark in_progress \u2192 completed in real-time.**\n```\nTodoWrite([\n { id: \"discovery\", content: \"Fire explore agents + LSP codemap + read existing\", status: \"pending\", priority: \"high\" },\n { id: \"scoring\", content: \"Score directories, determine locations\", status: \"pending\", priority: \"high\" },\n { id: \"generate\", content: \"Generate AGENTS.md files (root + subdirs)\", status: \"pending\", priority: \"high\" },\n { id: \"review\", content: \"Deduplicate, validate, trim\", status: \"pending\", priority: \"medium\" }\n])\n```\n</critical>\n\n---\n\n## Phase 1: Discovery + Analysis (Concurrent)\n\n**Mark \"discovery\" as in_progress.**\n\n### Fire Background Explore Agents IMMEDIATELY\n\nDon't wait-these run async while main session works.\n\n```\n// Fire all at once, collect results later\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore project structure\", run_in_background=true, prompt=\"Project structure: PREDICT standard patterns for detected language \u2192 REPORT deviations only\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find entry points\", run_in_background=true, prompt=\"Entry points: FIND main files \u2192 REPORT non-standard organization\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find conventions\", run_in_background=true, prompt=\"Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) \u2192 REPORT project-specific rules\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find anti-patterns\", run_in_background=true, prompt=\"Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments \u2192 LIST forbidden patterns\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore build/CI\", run_in_background=true, prompt=\"Build/CI: FIND .github/workflows, Makefile \u2192 REPORT non-standard patterns\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find test patterns\", run_in_background=true, prompt=\"Test patterns: FIND test configs, test structure \u2192 REPORT unique conventions\")\n```\n\n<dynamic-agents>\n**DYNAMIC AGENT SPAWNING**: After bash analysis, spawn ADDITIONAL explore agents based on project scale:\n\n| Factor | Threshold | Additional Agents |\n|--------|-----------|-------------------|\n| **Total files** | >100 | +1 per 100 files |\n| **Total lines** | >10k | +1 per 10k lines |\n| **Directory depth** | \u22654 | +2 for deep exploration |\n| **Large files (>500 lines)** | >10 files | +1 for complexity hotspots |\n| **Monorepo** | detected | +1 per package/workspace |\n| **Multiple languages** | >1 | +1 per language |\n\n```bash\n# Measure project scale first\ntotal_files=$(find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' | wc -l)\ntotal_lines=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" -o -name \"*.go\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | tail -1 | awk '{print $1}')\nlarge_files=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" \\) -not -path '*/node_modules/*' -exec wc -l {} + 2>/dev/null | awk '$1 > 500 {count++} END {print count+0}')\nmax_depth=$(find . -type d -not -path '*/node_modules/*' -not -path '*/.git/*' | awk -F/ '{print NF}' | sort -rn | head -1)\n```\n\nExample spawning:\n```\n// 500 files, 50k lines, depth 6, 15 large files \u2192 spawn 5+5+2+1 = 13 additional agents\ntask(subagent_type=\"explore\", load_skills=[], description=\"Analyze large files\", run_in_background=true, prompt=\"Large file analysis: FIND files >500 lines, REPORT complexity hotspots\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Explore deep modules\", run_in_background=true, prompt=\"Deep modules at depth 4+: FIND hidden patterns, internal conventions\")\ntask(subagent_type=\"explore\", load_skills=[], description=\"Find shared utilities\", run_in_background=true, prompt=\"Cross-cutting concerns: FIND shared utilities across directories\")\n// ... more based on calculation\n```\n</dynamic-agents>\n\n### Main Session: Concurrent Analysis\n\n**While background agents run**, main session does:\n\n#### 1. Bash Structural Analysis\n```bash\n# Directory depth + file counts\nfind . -type d -not -path '*/\\.*' -not -path '*/node_modules/*' -not -path '*/venv/*' -not -path '*/dist/*' -not -path '*/build/*' | awk -F/ '{print NF-1}' | sort -n | uniq -c\n\n# Files per directory (top 30)\nfind . -type f -not -path '*/\\.*' -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -30\n\n# Code concentration by extension\nfind . -type f \\( -name \"*.py\" -o -name \"*.ts\" -o -name \"*.tsx\" -o -name \"*.js\" -o -name \"*.go\" -o -name \"*.rs\" \\) -not -path '*/node_modules/*' | sed 's|/[^/]*$||' | sort | uniq -c | sort -rn | head -20\n\n# Existing AGENTS.md / CLAUDE.md\nfind . -type f \\( -name \"AGENTS.md\" -o -name \"CLAUDE.md\" \\) -not -path '*/node_modules/*' 2>/dev/null\n```\n\n#### 2. Read Existing AGENTS.md\n```\nFor each existing file found:\n Read(filePath=file)\n Extract: key insights, conventions, anti-patterns\n Store in EXISTING_AGENTS map\n```\n\nIf `--create-new`: Read all existing first (preserve context) \u2192 then delete all \u2192 regenerate.\n\n#### 3. LSP Codemap (if available)\n```\nLspServers() # Check availability\n\n# Entry points (parallel)\nLspDocumentSymbols(filePath=\"src/index.ts\")\nLspDocumentSymbols(filePath=\"main.py\")\n\n# Key symbols (parallel)\nLspWorkspaceSymbols(filePath=\".\", query=\"class\")\nLspWorkspaceSymbols(filePath=\".\", query=\"interface\")\nLspWorkspaceSymbols(filePath=\".\", query=\"function\")\n\n# Centrality for top exports\nLspFindReferences(filePath=\"...\", line=X, character=Y)\n```\n\n**LSP Fallback**: If unavailable, rely on explore agents + AST-grep.\n\n### Collect Background Results\n\n```\n// After main session analysis done, collect all task results\nfor each task_id: background_output(task_id=\"...\")\n```\n\n**Merge: bash + LSP + existing + explore findings. Mark \"discovery\" as completed.**\n\n---\n\n## Phase 2: Scoring & Location Decision\n\n**Mark \"scoring\" as in_progress.**\n\n### Scoring Matrix\n\n| Factor | Weight | High Threshold | Source |\n|--------|--------|----------------|--------|\n| File count | 3x | >20 | bash |\n| Subdir count | 2x | >5 | bash |\n| Code ratio | 2x | >70% | bash |\n| Unique patterns | 1x | Has own config | explore |\n| Module boundary | 2x | Has index.ts/__init__.py | bash |\n| Symbol density | 2x | >30 symbols | LSP |\n| Export count | 2x | >10 exports | LSP |\n| Reference centrality | 3x | >20 refs | LSP |\n\n### Decision Rules\n\n| Score | Action |\n|-------|--------|\n| **Root (.)** | ALWAYS create |\n| **>15** | Create AGENTS.md |\n| **8-15** | Create if distinct domain |\n| **<8** | Skip (parent covers) |\n\n### Output\n```\nAGENTS_LOCATIONS = [\n { path: \".\", type: \"root\" },\n { path: \"src/hooks\", score: 18, reason: \"high complexity\" },\n { path: \"src/api\", score: 12, reason: \"distinct domain\" }\n]\n```\n\n**Mark \"scoring\" as completed.**\n\n---\n\n## Phase 3: Generate AGENTS.md\n\n**Mark \"generate\" as in_progress.**\n\n<critical>\n**File Writing Rule**: If AGENTS.md already exists at the target path \u2192 use `Edit` tool. If it does NOT exist \u2192 use `Write` tool.\nNEVER use Write to overwrite an existing file. ALWAYS check existence first via `Read` or discovery results.\n</critical>\n\n### Root AGENTS.md (Full Treatment)\n\n```markdown\n# PROJECT KNOWLEDGE BASE\n\n**Generated:** {TIMESTAMP}\n**Commit:** {SHORT_SHA}\n**Branch:** {BRANCH}\n\n## OVERVIEW\n{1-2 sentences: what + core stack}\n\n## STRUCTURE\n\\`\\`\\`\n{root}/\n\u251C\u2500\u2500 {dir}/ # {non-obvious purpose only}\n\u2514\u2500\u2500 {entry}\n\\`\\`\\`\n\n## WHERE TO LOOK\n| Task | Location | Notes |\n|------|----------|-------|\n\n## CODE MAP\n{From LSP - skip if unavailable or project <10 files}\n\n| Symbol | Type | Location | Refs | Role |\n|--------|------|----------|------|------|\n\n## CONVENTIONS\n{ONLY deviations from standard}\n\n## ANTI-PATTERNS (THIS PROJECT)\n{Explicitly forbidden here}\n\n## UNIQUE STYLES\n{Project-specific}\n\n## COMMANDS\n\\`\\`\\`bash\n{dev/test/build}\n\\`\\`\\`\n\n## NOTES\n{Gotchas}\n```\n\n**Quality gates**: 50-150 lines, no generic advice, no obvious info.\n\n### Subdirectory AGENTS.md (Parallel)\n\nLaunch writing tasks for each location:\n\n```\nfor loc in AGENTS_LOCATIONS (except root):\n task(category=\"writing\", load_skills=[], run_in_background=false, description=\"Generate AGENTS.md\", prompt=\\`\n Generate AGENTS.md for: ${loc.path}\n - Reason: ${loc.reason}\n - 30-80 lines max\n - NEVER repeat parent content\n - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS\n \\`)\n```\n\n**Wait for all. Mark \"generate\" as completed.**\n\n---\n\n## Phase 4: Review & Deduplicate\n\n**Mark \"review\" as in_progress.**\n\nFor each generated file:\n- Remove generic advice\n- Remove parent duplicates\n- Trim to size limits\n- Verify telegraphic style\n\n**Mark \"review\" as completed.**\n\n---\n\n## Final Report\n\n```\n=== init-deep Complete ===\n\nMode: {update | create-new}\n\nFiles:\n [OK] ./AGENTS.md (root, {N} lines)\n [OK] ./src/hooks/AGENTS.md ({N} lines)\n\nDirs Analyzed: {N}\nAGENTS.md Created: {N}\nAGENTS.md Updated: {N}\n\nHierarchy:\n ./AGENTS.md\n \u2514\u2500\u2500 src/hooks/AGENTS.md\n```\n\n---\n\n## Anti-Patterns\n\n- **Static agent count**: MUST vary agents based on project size/depth\n- **Sequential execution**: MUST parallel (explore + LSP concurrent)\n- **Ignoring existing**: ALWAYS read existing first, even with --create-new\n- **Over-documenting**: Not every dir needs AGENTS.md\n- **Redundancy**: Child never repeats parent\n- **Generic content**: Remove anything that applies to ALL projects\n- **Verbose style**: Telegraphic or die";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const OPEN_PLAN_TEMPLATE = "You are executing the /open-plan command.\n\n## WHAT TO DO\n\n1. **Read the current boulder state**: Read `.sisyphus/boulder.json` to find the active plan path.\n\n2. **Check if active plan exists**:\n - If `active_plan` field exists and is not empty \u2192 proceed to step 3\n - If no active plan (file doesn't exist, or `active_plan` is null/empty) \u2192 output error and stop\n\n3. **Open the plan file with system default editor**:\n Use the Bash tool to spawn the appropriate command based on your platform:\n\n **Windows (PowerShell):**\n ```bash\n start \"\" \"C:/path/to/plan.md\"\n ```\n\n **macOS:**\n ```bash\n open \"/path/to/plan.md\"\n ```\n\n **Linux:**\n ```bash\n xdg-open \"/path/to/plan.md\"\n ```\n\n Replace the path with the actual `active_plan` path from boulder.json.\n\n4. **Report success**:\n - If file was opened successfully, output: \"Opened plan file: {plan-name}\"\n - If there was an error opening the file, report the error\n\n## ERROR HANDLING\n\nIf no active plan exists, output exactly:\n```\nNo active plan. Use /start-work to set a plan first.\n```\n\n## EXAMPLE\n\nIf `.sisyphus/boulder.json` contains:\n```json\n{\n \"active_plan\": \"C:/projects/myproject/.sisyphus/plans/my-feature.md\",\n \"plan_name\": \"my-feature\"\n}\n```\n\nOn Windows, execute:\n```bash\nstart \"\" \"C:/projects/myproject/.sisyphus/plans/my-feature.md\"\n```\n\nOn macOS, execute:\n```bash\nopen \"C:/projects/myproject/.sisyphus/plans/my-feature.md\"\n```\n\nOn Linux, execute:\n```bash\nxdg-open \"C:/projects/myproject/.sisyphus/plans/my-feature.md\"\n```";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const RALPH_LOOP_TEMPLATE = "
|
|
2
|
-
export declare const ULW_LOOP_TEMPLATE = "
|
|
3
|
-
export declare const CANCEL_RALPH_TEMPLATE = "
|
|
1
|
+
export declare const RALPH_LOOP_TEMPLATE = "You are starting a Ralph Loop - a self-referential development loop that runs until task completion.\n\n## How Ralph Loop Works\n\n1. You will work on the task continuously\n2. When you believe the task is FULLY complete, output: `<promise>{{COMPLETION_PROMISE}}</promise>`\n3. If you don't output the promise, the loop will automatically inject another prompt to continue\n4. Maximum iterations: Configurable (default 100)\n\n## Rules\n\n- Focus on completing the task fully, not partially\n- Don't output the completion promise until the task is truly done\n- Each iteration should make meaningful progress toward the goal\n- If stuck, try different approaches\n- Use todos to track your progress\n\n## Exit Conditions\n\n1. **Completion**: Output your completion promise tag when fully complete\n2. **Max Iterations**: Loop stops automatically at limit\n3. **Cancel**: User runs `/cancel-ralph` command\n\n## Your Task\n\nParse the arguments below and begin working on the task. The format is:\n`\"task description\" [--completion-promise=TEXT] [--max-iterations=N] [--strategy=reset|continue]`\n\nDefault completion promise is \"DONE\" and default max iterations is 100.";
|
|
2
|
+
export declare const ULW_LOOP_TEMPLATE = "You are starting an ULTRAWORK Loop - a self-referential development loop that runs until verified completion.\n\n## How ULTRAWORK Loop Works\n\n1. You will work on the task continuously\n2. When you believe the work is complete, output: `<promise>{{COMPLETION_PROMISE}}</promise>`\n3. That does NOT finish the loop yet. The system will require Oracle verification\n4. The loop only ends after the system confirms Oracle verified the result\n5. The iteration limit is 500 for ultrawork mode, 100 for normal mode\n\n## Rules\n\n- Focus on finishing the task completely\n- After you emit the completion promise, run Oracle verification when instructed\n- Do not treat DONE as final completion until Oracle verifies it\n\n## Exit Conditions\n\n1. **Verified Completion**: Oracle verifies the result and the system confirms it\n2. **Cancel**: User runs `/cancel-ralph`\n\n## Your Task\n\nParse the arguments below and begin working on the task. The format is:\n`\"task description\" [--completion-promise=TEXT] [--strategy=reset|continue]`\n\nDefault completion promise is \"DONE\".";
|
|
3
|
+
export declare const CANCEL_RALPH_TEMPLATE = "Cancel the currently active Ralph Loop.\n\nThis will:\n1. Stop the loop from continuing\n2. Clear the loop state file\n3. Allow the session to end normally\n\nCheck if a loop is active and cancel it. Inform the user of the result.";
|