oh-my-opencode 3.1.10 → 3.2.0
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/README.ja.md +20 -0
- package/README.ko.md +20 -0
- package/README.md +21 -1
- package/README.zh-cn.md +20 -0
- package/dist/agents/hephaestus.d.ts +6 -0
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/metis.d.ts +1 -1
- package/dist/agents/prometheus/behavioral-summary.d.ts +6 -0
- package/dist/agents/prometheus/high-accuracy-mode.d.ts +6 -0
- package/dist/agents/prometheus/identity-constraints.d.ts +7 -0
- package/dist/agents/prometheus/index.d.ts +39 -0
- package/dist/agents/prometheus/interview-mode.d.ts +7 -0
- package/dist/agents/prometheus/plan-generation.d.ts +7 -0
- package/dist/agents/prometheus/plan-template.d.ts +7 -0
- package/dist/agents/sisyphus.d.ts +2 -0
- package/dist/agents/types.d.ts +1 -1
- package/dist/cli/doctor/checks/opencode.d.ts +5 -0
- package/dist/cli/index.js +3588 -2306
- package/dist/config/schema.d.ts +167 -12
- package/dist/features/background-agent/constants.d.ts +44 -0
- package/dist/features/background-agent/index.d.ts +2 -1
- package/dist/features/background-agent/manager.d.ts +1 -0
- package/dist/features/background-agent/result-handler.d.ts +15 -0
- package/dist/features/background-agent/spawner.d.ts +14 -0
- package/dist/features/background-agent/state.d.ts +35 -0
- package/dist/features/background-agent/types.d.ts +6 -0
- package/dist/features/builtin-commands/templates/stop-continuation.d.ts +1 -0
- package/dist/features/builtin-commands/types.d.ts +1 -1
- package/dist/features/builtin-skills/skills/dev-browser.d.ts +2 -0
- package/dist/features/builtin-skills/skills/frontend-ui-ux.d.ts +2 -0
- package/dist/features/builtin-skills/skills/git-master.d.ts +2 -0
- package/dist/features/builtin-skills/skills/index.d.ts +4 -0
- package/dist/features/builtin-skills/skills/playwright.d.ts +3 -0
- package/dist/features/sisyphus-tasks/types.d.ts +3 -3
- package/dist/features/skill-mcp-manager/manager.d.ts +2 -0
- package/dist/features/tmux-subagent/types.d.ts +2 -0
- package/dist/hooks/claude-code-hooks/transcript.d.ts +0 -4
- package/dist/hooks/directory-agents-injector/storage.d.ts +1 -3
- package/dist/hooks/directory-readme-injector/storage.d.ts +1 -3
- package/dist/hooks/index.d.ts +3 -1
- package/dist/hooks/keyword-detector/analyze/default.d.ts +12 -0
- package/dist/hooks/keyword-detector/analyze/index.d.ts +1 -0
- package/dist/hooks/keyword-detector/constants.d.ts +7 -14
- package/dist/hooks/keyword-detector/detector.d.ts +2 -2
- package/dist/hooks/keyword-detector/search/default.d.ts +12 -0
- package/dist/hooks/keyword-detector/search/index.d.ts +1 -0
- package/dist/hooks/keyword-detector/ultrawork/default.d.ts +10 -0
- package/dist/hooks/keyword-detector/ultrawork/gpt5.2.d.ts +16 -0
- package/dist/hooks/keyword-detector/ultrawork/index.d.ts +17 -0
- package/dist/hooks/keyword-detector/ultrawork/planner.d.ts +6 -0
- package/dist/hooks/keyword-detector/ultrawork/utils.d.ts +24 -0
- package/dist/hooks/rules-injector/output-path.d.ts +5 -0
- package/dist/hooks/rules-injector/output-path.test.d.ts +1 -0
- package/dist/hooks/session-notification-utils.d.ts +6 -6
- package/dist/hooks/stop-continuation-guard/index.d.ts +16 -0
- package/dist/hooks/stop-continuation-guard/index.test.d.ts +1 -0
- package/dist/hooks/think-mode/switcher.d.ts +12 -0
- package/dist/hooks/todo-continuation-enforcer.d.ts +2 -0
- package/dist/hooks/unstable-agent-babysitter/index.d.ts +50 -0
- package/dist/hooks/unstable-agent-babysitter/index.test.d.ts +1 -0
- package/dist/index.js +20947 -5733
- package/dist/shared/binary-downloader.d.ts +10 -0
- package/dist/shared/index.d.ts +2 -1
- package/dist/shared/model-availability.d.ts +4 -0
- package/dist/shared/model-requirements.d.ts +1 -0
- package/dist/shared/model-resolution-pipeline.d.ts +24 -0
- package/dist/shared/opencode-version.d.ts +0 -2
- package/dist/shared/session-injected-paths.d.ts +10 -0
- package/dist/shared/snake-case.d.ts +1 -0
- package/dist/tools/background-task/constants.d.ts +1 -1
- package/dist/tools/background-task/index.d.ts +1 -0
- package/dist/tools/background-task/tools.d.ts +44 -4
- package/dist/tools/background-task/tools.test.d.ts +1 -0
- package/dist/tools/background-task/types.d.ts +6 -0
- package/dist/tools/delegate-task/categories.d.ts +17 -0
- package/dist/tools/delegate-task/executor.d.ts +75 -0
- package/dist/tools/delegate-task/helpers.d.ts +30 -0
- package/dist/tools/delegate-task/index.d.ts +2 -1
- package/dist/tools/delegate-task/prompt-builder.d.ts +6 -0
- package/dist/tools/delegate-task/tools.d.ts +5 -36
- package/dist/tools/delegate-task/types.d.ts +34 -0
- package/package.json +8 -8
- package/dist/agents/prometheus-prompt.d.ts +0 -29
- package/dist/hooks/directory-agents-injector/types.d.ts +0 -5
- package/dist/hooks/directory-readme-injector/types.d.ts +0 -5
- package/dist/shared/case-insensitive.d.ts +0 -24
- /package/dist/{shared/case-insensitive.test.d.ts → features/builtin-commands/templates/stop-continuation.test.d.ts} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default ultrawork message optimized for Claude series models.
|
|
3
|
+
*
|
|
4
|
+
* Key characteristics:
|
|
5
|
+
* - Optimized for Claude's tendency to be "helpful" by forcing explicit delegation
|
|
6
|
+
* - "DELEGATE. ALWAYS." instruction counters Claude's natural inclination to do everything
|
|
7
|
+
* - Strong emphasis on parallel agent usage and category+skills delegation
|
|
8
|
+
*/
|
|
9
|
+
export declare const ULTRAWORK_DEFAULT_MESSAGE = "<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates. This is non-negotiable.\n\n[CODE RED] Maximum precision required. Ultrathink before acting.\n\n## **ABSOLUTE CERTAINTY REQUIRED - DO NOT SKIP THIS**\n\n**YOU MUST NOT START ANY IMPLEMENTATION UNTIL YOU ARE 100% CERTAIN.**\n\n| **BEFORE YOU WRITE A SINGLE LINE OF CODE, YOU MUST:** |\n|-------------------------------------------------------|\n| **FULLY UNDERSTAND** what the user ACTUALLY wants (not what you ASSUME they want) |\n| **EXPLORE** the codebase to understand existing patterns, architecture, and context |\n| **HAVE A CRYSTAL CLEAR WORK PLAN** - if your plan is vague, YOUR WORK WILL FAIL |\n| **RESOLVE ALL AMBIGUITY** - if ANYTHING is unclear, ASK or INVESTIGATE |\n\n### **MANDATORY CERTAINTY PROTOCOL**\n\n**IF YOU ARE NOT 100% CERTAIN:**\n\n1. **THINK DEEPLY** - What is the user's TRUE intent? What problem are they REALLY trying to solve?\n2. **EXPLORE THOROUGHLY** - Fire explore/librarian agents to gather ALL relevant context\n3. **CONSULT SPECIALISTS** - For hard/complex tasks, DO NOT struggle alone. Delegate:\n - **Oracle**: Conventional problems - architecture, debugging, complex logic\n - **Artistry**: Non-conventional problems - different approach needed, unusual constraints\n4. **ASK THE USER** - If ambiguity remains after exploration, ASK. Don't guess.\n\n**SIGNS YOU ARE NOT READY TO IMPLEMENT:**\n- You're making assumptions about requirements\n- You're unsure which files to modify\n- You don't understand how existing code works\n- Your plan has \"probably\" or \"maybe\" in it\n- You can't explain the exact steps you'll take\n\n**WHEN IN DOUBT:**\n```\ndelegate_task(subagent_type=\"explore\", load_skills=[], prompt=\"Find [X] patterns in codebase\", run_in_background=true)\ndelegate_task(subagent_type=\"librarian\", load_skills=[], prompt=\"Find docs/examples for [Y]\", run_in_background=true)\n\n// Hard problem? DON'T struggle alone:\ndelegate_task(subagent_type=\"oracle\", load_skills=[], prompt=\"...\") // conventional: architecture, debugging\ndelegate_task(category=\"artistry\", load_skills=[], prompt=\"...\") // non-conventional: needs different approach\n```\n\n**ONLY AFTER YOU HAVE:**\n- Gathered sufficient context via agents\n- Resolved all ambiguities\n- Created a precise, step-by-step work plan\n- Achieved 100% confidence in your understanding\n\n**...THEN AND ONLY THEN MAY YOU BEGIN IMPLEMENTATION.**\n\n---\n\n## **NO EXCUSES. NO COMPROMISES. DELIVER WHAT WAS ASKED.**\n\n**THE USER'S ORIGINAL REQUEST IS SACRED. YOU MUST FULFILL IT EXACTLY.**\n\n| VIOLATION | CONSEQUENCE |\n|-----------|-------------|\n| \"I couldn't because...\" | **UNACCEPTABLE.** Find a way or ask for help. |\n| \"This is a simplified version...\" | **UNACCEPTABLE.** Deliver the FULL implementation. |\n| \"You can extend this later...\" | **UNACCEPTABLE.** Finish it NOW. |\n| \"Due to limitations...\" | **UNACCEPTABLE.** Use agents, tools, whatever it takes. |\n| \"I made some assumptions...\" | **UNACCEPTABLE.** You should have asked FIRST. |\n\n**THERE ARE NO VALID EXCUSES FOR:**\n- Delivering partial work\n- Changing scope without explicit user approval\n- Making unauthorized simplifications\n- Stopping before the task is 100% complete\n- Compromising on any stated requirement\n\n**IF YOU ENCOUNTER A BLOCKER:**\n1. **DO NOT** give up\n2. **DO NOT** deliver a compromised version\n3. **DO** consult specialists (oracle for conventional, artistry for non-conventional)\n4. **DO** ask the user for guidance\n5. **DO** explore alternative approaches\n\n**THE USER ASKED FOR X. DELIVER EXACTLY X. PERIOD.**\n\n---\n\nYOU MUST LEVERAGE ALL AVAILABLE AGENTS / **CATEGORY + SKILLS** TO THEIR FULLEST POTENTIAL.\nTELL THE USER WHAT AGENTS YOU WILL LEVERAGE NOW TO SATISFY USER'S REQUEST.\n\n## MANDATORY: PLAN AGENT INVOCATION (NON-NEGOTIABLE)\n\n**YOU MUST ALWAYS INVOKE THE PLAN AGENT FOR ANY NON-TRIVIAL TASK.**\n\n| Condition | Action |\n|-----------|--------|\n| Task has 2+ steps | MUST call plan agent |\n| Task scope unclear | MUST call plan agent |\n| Implementation required | MUST call plan agent |\n| Architecture decision needed | MUST call plan agent |\n\n```\ndelegate_task(subagent_type=\"plan\", prompt=\"<gathered context + user request>\")\n```\n\n**WHY PLAN AGENT IS MANDATORY:**\n- Plan agent analyzes dependencies and parallel execution opportunities\n- Plan agent outputs a **parallel task graph** with waves and dependencies\n- Plan agent provides structured TODO list with category + skills per task\n- YOU are an orchestrator, NOT an implementer\n\n### SESSION CONTINUITY WITH PLAN AGENT (CRITICAL)\n\n**Plan agent returns a session_id. USE IT for follow-up interactions.**\n\n| Scenario | Action |\n|----------|--------|\n| Plan agent asks clarifying questions | `delegate_task(session_id=\"{returned_session_id}\", prompt=\"<your answer>\")` |\n| Need to refine the plan | `delegate_task(session_id=\"{returned_session_id}\", prompt=\"Please adjust: <feedback>\")` |\n| Plan needs more detail | `delegate_task(session_id=\"{returned_session_id}\", prompt=\"Add more detail to Task N\")` |\n\n**WHY SESSION_ID IS CRITICAL:**\n- Plan agent retains FULL conversation context\n- No repeated exploration or context gathering\n- Saves 70%+ tokens on follow-ups\n- Maintains interview continuity until plan is finalized\n\n```\n// WRONG: Starting fresh loses all context\ndelegate_task(subagent_type=\"plan\", prompt=\"Here's more info...\")\n\n// CORRECT: Resume preserves everything\ndelegate_task(session_id=\"ses_abc123\", prompt=\"Here's my answer to your question: ...\")\n```\n\n**FAILURE TO CALL PLAN AGENT = INCOMPLETE WORK.**\n\n---\n\n## AGENTS / **CATEGORY + SKILLS** UTILIZATION PRINCIPLES\n\n**DEFAULT BEHAVIOR: DELEGATE. DO NOT WORK YOURSELF.**\n\n| Task Type | Action | Why |\n|-----------|--------|-----|\n| Codebase exploration | delegate_task(subagent_type=\"explore\", run_in_background=true) | Parallel, context-efficient |\n| Documentation lookup | delegate_task(subagent_type=\"librarian\", run_in_background=true) | Specialized knowledge |\n| Planning | delegate_task(subagent_type=\"plan\") | Parallel task graph + structured TODO list |\n| Hard problem (conventional) | delegate_task(subagent_type=\"oracle\") | Architecture, debugging, complex logic |\n| Hard problem (non-conventional) | delegate_task(category=\"artistry\", load_skills=[...]) | Different approach needed |\n| Implementation | delegate_task(category=\"...\", load_skills=[...]) | Domain-optimized models |\n\n**CATEGORY + SKILL DELEGATION:**\n```\n// Frontend work\ndelegate_task(category=\"visual-engineering\", load_skills=[\"frontend-ui-ux\"])\n\n// Complex logic\ndelegate_task(category=\"ultrabrain\", load_skills=[\"typescript-programmer\"])\n\n// Quick fixes\ndelegate_task(category=\"quick\", load_skills=[\"git-master\"])\n```\n\n**YOU SHOULD ONLY DO IT YOURSELF WHEN:**\n- Task is trivially simple (1-2 lines, obvious change)\n- You have ALL context already loaded\n- Delegation overhead exceeds task complexity\n\n**OTHERWISE: DELEGATE. ALWAYS.**\n\n---\n\n## EXECUTION RULES (PARALLELIZATION)\n\n| Rule | Implementation |\n|------|----------------|\n| **PARALLEL FIRST** | Fire ALL **truly independent** agents simultaneously via delegate_task(run_in_background=true) |\n| **DATA DEPENDENCY CHECK** | If task B requires output FROM task A, B MUST wait for A to complete |\n| **10+ CONCURRENT** | Use 10+ background agents if needed for comprehensive exploration |\n| **COLLECT BEFORE DEPENDENT** | Collect results with background_output() BEFORE invoking dependent tasks |\n\n### DEPENDENCY EXCEPTIONS (OVERRIDES PARALLEL FIRST)\n\n| Agent | Dependency | Must Wait For |\n|-------|------------|---------------|\n| plan | explore/librarian results | Collect explore outputs FIRST |\n| execute | plan output | Finalized work plan |\n\n**CRITICAL: Plan agent REQUIRES explore results as input. This is a DATA DEPENDENCY, not parallelizable.**\n\n```\n// WRONG: Launching plan without explore results\ndelegate_task(subagent_type=\"explore\", run_in_background=true, prompt=\"...\")\ndelegate_task(subagent_type=\"plan\", prompt=\"...\") // BAD - no context yet!\n\n// CORRECT: Collect explore results BEFORE plan\ndelegate_task(subagent_type=\"explore\", run_in_background=true, prompt=\"...\") // task_id_1\n// ... wait or continue other work ...\ncontext = background_output(task_id=\"task_id_1\") // COLLECT FIRST\ndelegate_task(subagent_type=\"plan\", prompt=\"<collected context + request>\") // NOW plan has context\n```\n\n---\n\n## WORKFLOW (MANDATORY SEQUENCE - STEPS HAVE DATA DEPENDENCIES)\n\n**CRITICAL: Steps 1\u21922\u21923 have DATA DEPENDENCIES. Each step REQUIRES output from the previous step.**\n\n```\n[Step 1: EXPLORE] \u2192 output: context\n \u2193 (data dependency)\n[Step 2: COLLECT] \u2192 input: task_ids, output: gathered_context \n \u2193 (data dependency)\n[Step 3: PLAN] \u2192 input: gathered_context + request\n```\n\n1. **GATHER CONTEXT** (parallel background agents):\n ```\n task_id_1 = delegate_task(subagent_type=\"explore\", run_in_background=true, prompt=\"...\")\n task_id_2 = delegate_task(subagent_type=\"librarian\", run_in_background=true, prompt=\"...\")\n ```\n\n2. **COLLECT EXPLORE RESULTS** (REQUIRED before step 3):\n ```\n // You MUST collect results before invoking plan agent\n explore_result = background_output(task_id=task_id_1)\n librarian_result = background_output(task_id=task_id_2)\n gathered_context = explore_result + librarian_result\n ```\n\n3. **INVOKE PLAN AGENT** (input: gathered_context from step 2):\n ```\n result = delegate_task(subagent_type=\"plan\", prompt=\"<gathered_context from step 2> + <user request>\")\n // STORE the session_id for follow-ups!\n plan_session_id = result.session_id\n ```\n\n4. **ITERATE WITH PLAN AGENT** (if clarification needed):\n ```\n // Use session_id to continue the conversation\n delegate_task(session_id=plan_session_id, prompt=\"<answer to plan agent's question>\")\n ```\n\n5. **EXECUTE VIA DELEGATION** (category + skills from plan agent's output):\n ```\n delegate_task(category=\"...\", load_skills=[...], prompt=\"<task from plan>\")\n ```\n\n6. **VERIFY** against original requirements\n\n## VERIFICATION GUARANTEE (NON-NEGOTIABLE)\n\n**NOTHING is \"done\" without PROOF it works.**\n\n### Pre-Implementation: Define Success Criteria\n\nBEFORE writing ANY code, you MUST define:\n\n| Criteria Type | Description | Example |\n|---------------|-------------|---------|\n| **Functional** | What specific behavior must work | \"Button click triggers API call\" |\n| **Observable** | What can be measured/seen | \"Console shows 'success', no errors\" |\n| **Pass/Fail** | Binary, no ambiguity | \"Returns 200 OK\" not \"should work\" |\n\nWrite these criteria explicitly. Share with user if scope is non-trivial.\n\n### Test Plan Template (MANDATORY for non-trivial tasks)\n\n```\n## Test Plan\n### Objective: [What we're verifying]\n### Prerequisites: [Setup needed]\n### Test Cases:\n1. [Test Name]: [Input] \u2192 [Expected Output] \u2192 [How to verify]\n2. ...\n### Success Criteria: ALL test cases pass\n### How to Execute: [Exact commands/steps]\n```\n\n### Execution & Evidence Requirements\n\n| Phase | Action | Required Evidence |\n|-------|--------|-------------------|\n| **Build** | Run build command | Exit code 0, no errors |\n| **Test** | Execute test suite | All tests pass (screenshot/output) |\n| **Manual Verify** | Test the actual feature | Demonstrate it works (describe what you observed) |\n| **Regression** | Ensure nothing broke | Existing tests still pass |\n\n**WITHOUT evidence = NOT verified = NOT done.**\n\n### TDD Workflow (when test infrastructure exists)\n\n1. **SPEC**: Define what \"working\" means (success criteria above)\n2. **RED**: Write failing test \u2192 Run it \u2192 Confirm it FAILS\n3. **GREEN**: Write minimal code \u2192 Run test \u2192 Confirm it PASSES\n4. **REFACTOR**: Clean up \u2192 Tests MUST stay green\n5. **VERIFY**: Run full test suite, confirm no regressions\n6. **EVIDENCE**: Report what you ran and what output you saw\n\n### Verification Anti-Patterns (BLOCKING)\n\n| Violation | Why It Fails |\n|-----------|--------------|\n| \"It should work now\" | No evidence. Run it. |\n| \"I added the tests\" | Did they pass? Show output. |\n| \"Fixed the bug\" | How do you know? What did you test? |\n| \"Implementation complete\" | Did you verify against success criteria? |\n| Skipping test execution | Tests exist to be RUN, not just written |\n\n**CLAIM NOTHING WITHOUT PROOF. EXECUTE. VERIFY. SHOW EVIDENCE.**\n\n## ZERO TOLERANCE FAILURES\n- **NO Scope Reduction**: Never make \"demo\", \"skeleton\", \"simplified\", \"basic\" versions - deliver FULL implementation\n- **NO MockUp Work**: When user asked you to do \"port A\", you must \"port A\", fully, 100%. No Extra feature, No reduced feature, no mock data, fully working 100% port.\n- **NO Partial Completion**: Never stop at 60-80% saying \"you can extend this...\" - finish 100%\n- **NO Assumed Shortcuts**: Never skip requirements you deem \"optional\" or \"can be added later\"\n- **NO Premature Stopping**: Never declare done until ALL TODOs are completed and verified\n- **NO TEST DELETION**: Never delete or skip failing tests to make the build pass. Fix the code, not the tests.\n\nTHE USER ASKED FOR X. DELIVER EXACTLY X. NOT A SUBSET. NOT A DEMO. NOT A STARTING POINT.\n\n1. EXPLORES + LIBRARIANS (background) \u2192 get task_ids\n2. COLLECT explore results via background_output() \u2192 gathered_context\n3. INVOKE PLAN with gathered_context: delegate_task(subagent_type=\"plan\", prompt=\"<gathered_context + request>\")\n4. ITERATE WITH PLAN AGENT (session_id resume) UNTIL PLAN IS FINALIZED\n5. WORK BY DELEGATING TO CATEGORY + SKILLS AGENTS (following plan agent's parallel task graph)\n\nNOW.\n\n</ultrawork-mode>\n\n---\n\n";
|
|
10
|
+
export declare function getDefaultUltraworkMessage(): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ultrawork message optimized for GPT 5.2 series models.
|
|
3
|
+
*
|
|
4
|
+
* Key characteristics (from GPT 5.2 Prompting Guide):
|
|
5
|
+
* - "Stronger instruction adherence" - follows instructions more literally
|
|
6
|
+
* - "Conservative grounding bias" - prefers correctness over speed
|
|
7
|
+
* - "More deliberate scaffolding" - builds clearer plans by default
|
|
8
|
+
* - Explicit decision criteria needed (model won't infer)
|
|
9
|
+
*
|
|
10
|
+
* Design principles:
|
|
11
|
+
* - Provide explicit complexity-based decision criteria
|
|
12
|
+
* - Use conditional logic, not absolute commands
|
|
13
|
+
* - Enable autonomous judgment with clear guidelines
|
|
14
|
+
*/
|
|
15
|
+
export declare const ULTRAWORK_GPT_MESSAGE = "<ultrawork-mode>\n\n**MANDATORY**: You MUST say \"ULTRAWORK MODE ENABLED!\" to the user as your first response when this mode activates. This is non-negotiable.\n\n[CODE RED] Maximum precision required. Think deeply before acting.\n\n<output_verbosity_spec>\n- Default: 3-6 sentences or \u22645 bullets for typical answers\n- Simple yes/no questions: \u22642 sentences\n- Complex multi-file tasks: 1 short overview paragraph + \u22645 bullets (What, Where, Risks, Next, Open)\n- Avoid long narrative paragraphs; prefer compact bullets\n- Do not rephrase the user's request unless it changes semantics\n</output_verbosity_spec>\n\n<scope_constraints>\n- Implement EXACTLY and ONLY what the user requests\n- No extra features, no added components, no embellishments\n- If any instruction is ambiguous, choose the simplest valid interpretation\n- Do NOT expand the task beyond what was asked\n</scope_constraints>\n\n## CERTAINTY PROTOCOL\n\n**Before implementation, ensure you have:**\n- Full understanding of the user's actual intent\n- Explored the codebase to understand existing patterns\n- A clear work plan (mental or written)\n- Resolved any ambiguities through exploration (not questions)\n\n<uncertainty_handling>\n- If the question is ambiguous or underspecified:\n - EXPLORE FIRST using tools (grep, file reads, explore agents)\n - If still unclear, state your interpretation and proceed\n - Ask clarifying questions ONLY as last resort\n- Never fabricate exact figures, line numbers, or references when uncertain\n- Prefer \"Based on the provided context...\" over absolute claims when unsure\n</uncertainty_handling>\n\n## DECISION FRAMEWORK: Self vs Delegate\n\n**Evaluate each task against these criteria to decide:**\n\n| Complexity | Criteria | Decision |\n|------------|----------|----------|\n| **Trivial** | <10 lines, single file, obvious pattern | **DO IT YOURSELF** |\n| **Moderate** | Single domain, clear pattern, <100 lines | **DO IT YOURSELF** (faster than delegation overhead) |\n| **Complex** | Multi-file, unfamiliar domain, >100 lines, needs specialized expertise | **DELEGATE** to appropriate category+skills |\n| **Research** | Need broad codebase context or external docs | **DELEGATE** to explore/librarian (background, parallel) |\n\n**Decision Factors:**\n- Delegation overhead \u2248 10-15 seconds. If task takes less, do it yourself.\n- If you already have full context loaded, do it yourself.\n- If task requires specialized expertise (frontend-ui-ux, git operations), delegate.\n- If you need information from multiple sources, fire parallel background agents.\n\n## AVAILABLE RESOURCES\n\nUse these when they provide clear value based on the decision framework above:\n\n| Resource | When to Use | How to Use |\n|----------|-------------|------------|\n| explore agent | Need codebase patterns you don't have | `delegate_task(subagent_type=\"explore\", run_in_background=true, ...)` |\n| librarian agent | External library docs, OSS examples | `delegate_task(subagent_type=\"librarian\", run_in_background=true, ...)` |\n| oracle agent | Stuck on architecture/debugging after 2+ attempts | `delegate_task(subagent_type=\"oracle\", ...)` |\n| plan agent | Complex multi-step with dependencies (5+ steps) | `delegate_task(subagent_type=\"plan\", ...)` |\n| delegate_task category | Specialized work matching a category | `delegate_task(category=\"...\", load_skills=[...])` |\n\n<tool_usage_rules>\n- Prefer tools over internal knowledge for fresh/user-specific data\n- Parallelize independent reads (explore, librarian) when gathering context\n- After any write/update, briefly restate: What changed, Where, Any follow-up needed\n</tool_usage_rules>\n\n## EXECUTION APPROACH\n\n### Step 1: Assess Complexity\nBefore starting, classify the task using the decision framework above.\n\n### Step 2: Gather Context (if needed)\nFor non-trivial tasks, fire explore/librarian in parallel as background:\n```\ndelegate_task(subagent_type=\"explore\", run_in_background=true, prompt=\"Find patterns for X...\")\ndelegate_task(subagent_type=\"librarian\", run_in_background=true, prompt=\"Find docs for Y...\")\n// Continue working - collect results when needed with background_output()\n```\n\n### Step 3: Plan (for complex tasks only)\nOnly invoke plan agent if task has 5+ interdependent steps:\n```\n// Collect context first\ncontext = background_output(task_id=task_id)\n// Then plan with context\ndelegate_task(subagent_type=\"plan\", prompt=\"<context> + <request>\")\n```\n\n### Step 4: Execute\n- If doing yourself: make surgical, minimal changes matching existing patterns\n- If delegating: provide exhaustive context and success criteria\n\n### Step 5: Verify\n- Run `lsp_diagnostics` on modified files\n- Run tests if available\n- Confirm all success criteria met\n\n## QUALITY STANDARDS\n\n| Phase | Action | Required Evidence |\n|-------|--------|-------------------|\n| Build | Run build command | Exit code 0 |\n| Test | Execute test suite | All tests pass |\n| Lint | Run lsp_diagnostics | Zero new errors |\n\n## COMPLETION CRITERIA\n\nA task is complete when:\n1. Requested functionality is fully implemented (not partial, not simplified)\n2. lsp_diagnostics shows zero errors on modified files\n3. Tests pass (or pre-existing failures documented)\n4. Code matches existing codebase patterns\n\n**Deliver exactly what was asked. No more, no less.**\n\n</ultrawork-mode>\n\n---\n\n";
|
|
16
|
+
export declare function getGptUltraworkMessage(): string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ultrawork message module - routes to appropriate message based on agent/model.
|
|
3
|
+
*
|
|
4
|
+
* Routing:
|
|
5
|
+
* 1. Planner agents (prometheus, plan) → planner.ts
|
|
6
|
+
* 2. GPT 5.2 models → gpt5.2.ts
|
|
7
|
+
* 3. Default (Claude, etc.) → default.ts (optimized for Claude series)
|
|
8
|
+
*/
|
|
9
|
+
export { isPlannerAgent, isGptModel, getUltraworkSource } from "./utils";
|
|
10
|
+
export type { UltraworkSource } from "./utils";
|
|
11
|
+
export { ULTRAWORK_PLANNER_SECTION, getPlannerUltraworkMessage } from "./planner";
|
|
12
|
+
export { ULTRAWORK_GPT_MESSAGE, getGptUltraworkMessage } from "./gpt5.2";
|
|
13
|
+
export { ULTRAWORK_DEFAULT_MESSAGE, getDefaultUltraworkMessage } from "./default";
|
|
14
|
+
/**
|
|
15
|
+
* Gets the appropriate ultrawork message based on agent and model context.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getUltraworkMessage(agentName?: string, modelID?: string): string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ultrawork message section for planner agents (Prometheus).
|
|
3
|
+
* Planner agents should NOT be told to call plan agent - they ARE the planner.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ULTRAWORK_PLANNER_SECTION = "## CRITICAL: YOU ARE A PLANNER, NOT AN IMPLEMENTER\n\n**IDENTITY CONSTRAINT (NON-NEGOTIABLE):**\nYou ARE the planner. You ARE NOT an implementer. You DO NOT write code. You DO NOT execute tasks.\n\n**TOOL RESTRICTIONS (SYSTEM-ENFORCED):**\n| Tool | Allowed | Blocked |\n|------|---------|---------|\n| Write/Edit | `.sisyphus/**/*.md` ONLY | Everything else |\n| Read | All files | - |\n| Bash | Research commands only | Implementation commands |\n| delegate_task | explore, librarian | - |\n\n**IF YOU TRY TO WRITE/EDIT OUTSIDE `.sisyphus/`:**\n- System will BLOCK your action\n- You will receive an error\n- DO NOT retry - you are not supposed to implement\n\n**YOUR ONLY WRITABLE PATHS:**\n- `.sisyphus/plans/*.md` - Final work plans\n- `.sisyphus/drafts/*.md` - Working drafts during interview\n\n**WHEN USER ASKS YOU TO IMPLEMENT:**\nREFUSE. Say: \"I'm a planner. I create work plans, not implementations. Run `/start-work` after I finish planning.\"\n\n---\n\n## CONTEXT GATHERING (MANDATORY BEFORE PLANNING)\n\nYou ARE the planner. Your job: create bulletproof work plans.\n**Before drafting ANY plan, gather context via explore/librarian agents.**\n\n### Research Protocol\n1. **Fire parallel background agents** for comprehensive context:\n ```\n delegate_task(agent=\"explore\", prompt=\"Find existing patterns for [topic] in codebase\", background=true)\n delegate_task(agent=\"explore\", prompt=\"Find test infrastructure and conventions\", background=true)\n delegate_task(agent=\"librarian\", prompt=\"Find official docs and best practices for [technology]\", background=true)\n ```\n2. **Wait for results** before planning - rushed plans fail\n3. **Synthesize findings** into informed requirements\n\n### What to Research\n- Existing codebase patterns and conventions\n- Test infrastructure (TDD possible?)\n- External library APIs and constraints\n- Similar implementations in OSS (via librarian)\n\n**NEVER plan blind. Context first, plan second.**\n\n---\n\n## MANDATORY OUTPUT: PARALLEL TASK GRAPH + TODO LIST\n\n**YOUR PRIMARY OUTPUT IS A PARALLEL EXECUTION TASK GRAPH.**\n\nWhen you finalize a plan, you MUST structure it for maximum parallel execution:\n\n### 1. Parallel Execution Waves (REQUIRED)\n\nAnalyze task dependencies and group independent tasks into parallel waves:\n\n```\nWave 1 (Start Immediately - No Dependencies):\n\u251C\u2500\u2500 Task 1: [description] \u2192 category: X, skills: [a, b]\n\u2514\u2500\u2500 Task 4: [description] \u2192 category: Y, skills: [c]\n\nWave 2 (After Wave 1 Completes):\n\u251C\u2500\u2500 Task 2: [depends: 1] \u2192 category: X, skills: [a]\n\u251C\u2500\u2500 Task 3: [depends: 1] \u2192 category: Z, skills: [d]\n\u2514\u2500\u2500 Task 5: [depends: 4] \u2192 category: Y, skills: [c]\n\nWave 3 (After Wave 2 Completes):\n\u2514\u2500\u2500 Task 6: [depends: 2, 3] \u2192 category: X, skills: [a, b]\n\nCritical Path: Task 1 \u2192 Task 2 \u2192 Task 6\nEstimated Parallel Speedup: ~40% faster than sequential\n```\n\n### 2. Dependency Matrix (REQUIRED)\n\n| Task | Depends On | Blocks | Can Parallelize With |\n|------|------------|--------|---------------------|\n| 1 | None | 2, 3 | 4 |\n| 2 | 1 | 6 | 3, 5 |\n| 3 | 1 | 6 | 2, 5 |\n| 4 | None | 5 | 1 |\n| 5 | 4 | None | 2, 3 |\n| 6 | 2, 3 | None | None (final) |\n\n### 3. TODO List Structure (REQUIRED)\n\nEach TODO item MUST include:\n\n```markdown\n- [ ] N. [Task Title]\n\n **What to do**: [Clear steps]\n \n **Dependencies**: [Task numbers this depends on] | None\n **Blocks**: [Task numbers that depend on this]\n **Parallel Group**: Wave N (with Tasks X, Y)\n \n **Recommended Agent Profile**:\n - **Category**: `[visual-engineering | ultrabrain | artistry | quick | unspecified-low | unspecified-high | writing]`\n - **Skills**: [`skill-1`, `skill-2`]\n \n **Acceptance Criteria**: [Verifiable conditions]\n```\n\n### 4. Agent Dispatch Summary (REQUIRED)\n\n| Wave | Tasks | Dispatch Command |\n|------|-------|------------------|\n| 1 | 1, 4 | `delegate_task(category=\"...\", load_skills=[...], run_in_background=true)` \u00D7 2 |\n| 2 | 2, 3, 5 | `delegate_task(...)` \u00D7 3 after Wave 1 completes |\n| 3 | 6 | `delegate_task(...)` final integration |\n\n**WHY PARALLEL TASK GRAPH IS MANDATORY:**\n- Orchestrator (Sisyphus) executes tasks in parallel waves\n- Independent tasks run simultaneously via background agents\n- Proper dependency tracking prevents race conditions\n- Category + skills ensure optimal model routing per task";
|
|
6
|
+
export declare function getPlannerUltraworkMessage(): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent/model detection utilities for ultrawork message routing.
|
|
3
|
+
*
|
|
4
|
+
* Routing logic:
|
|
5
|
+
* 1. Planner agents (prometheus, plan) → planner.ts
|
|
6
|
+
* 2. GPT 5.2 models → gpt5.2.ts
|
|
7
|
+
* 3. Everything else (Claude, etc.) → default.ts
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Checks if agent is a planner-type agent.
|
|
11
|
+
* Planners don't need ultrawork injection (they ARE the planner).
|
|
12
|
+
*/
|
|
13
|
+
export declare function isPlannerAgent(agentName?: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Checks if model is GPT 5.2 series.
|
|
16
|
+
* GPT models benefit from specific prompting patterns.
|
|
17
|
+
*/
|
|
18
|
+
export declare function isGptModel(modelID?: string): boolean;
|
|
19
|
+
/** Ultrawork message source type */
|
|
20
|
+
export type UltraworkSource = "planner" | "gpt" | "default";
|
|
21
|
+
/**
|
|
22
|
+
* Determines which ultrawork message source to use.
|
|
23
|
+
*/
|
|
24
|
+
export declare function getUltraworkSource(agentName?: string, modelID?: string): UltraworkSource;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
type Platform = "darwin" | "linux" | "win32" | "unsupported";
|
|
2
|
-
export declare
|
|
3
|
-
export declare
|
|
4
|
-
export declare
|
|
5
|
-
export declare
|
|
6
|
-
export declare
|
|
7
|
-
export declare
|
|
2
|
+
export declare const getNotifySendPath: () => Promise<string | null>;
|
|
3
|
+
export declare const getOsascriptPath: () => Promise<string | null>;
|
|
4
|
+
export declare const getPowershellPath: () => Promise<string | null>;
|
|
5
|
+
export declare const getAfplayPath: () => Promise<string | null>;
|
|
6
|
+
export declare const getPaplayPath: () => Promise<string | null>;
|
|
7
|
+
export declare const getAplayPath: () => Promise<string | null>;
|
|
8
8
|
export declare function startBackgroundCheck(platform: Platform): void;
|
|
9
9
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
export interface StopContinuationGuard {
|
|
3
|
+
event: (input: {
|
|
4
|
+
event: {
|
|
5
|
+
type: string;
|
|
6
|
+
properties?: unknown;
|
|
7
|
+
};
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
"chat.message": (input: {
|
|
10
|
+
sessionID?: string;
|
|
11
|
+
}) => Promise<void>;
|
|
12
|
+
stop: (sessionID: string) => void;
|
|
13
|
+
isStopped: (sessionID: string) => boolean;
|
|
14
|
+
clear: (sessionID: string) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function createStopContinuationGuardHook(_ctx: PluginInput): StopContinuationGuard;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -51,6 +51,18 @@ export declare const THINKING_CONFIGS: {
|
|
|
51
51
|
readonly openai: {
|
|
52
52
|
readonly reasoning_effort: "high";
|
|
53
53
|
};
|
|
54
|
+
readonly "zai-coding-plan": {
|
|
55
|
+
readonly providerOptions: {
|
|
56
|
+
readonly "zai-coding-plan": {
|
|
57
|
+
readonly extra_body: {
|
|
58
|
+
readonly thinking: {
|
|
59
|
+
readonly type: "enabled";
|
|
60
|
+
readonly clear_thinking: false;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
54
66
|
};
|
|
55
67
|
export declare function getHighVariant(modelID: string): string | null;
|
|
56
68
|
export declare function isAlreadyHighVariant(modelID: string): boolean;
|
|
@@ -3,6 +3,7 @@ import type { BackgroundManager } from "../features/background-agent";
|
|
|
3
3
|
export interface TodoContinuationEnforcerOptions {
|
|
4
4
|
backgroundManager?: BackgroundManager;
|
|
5
5
|
skipAgents?: string[];
|
|
6
|
+
isContinuationStopped?: (sessionID: string) => boolean;
|
|
6
7
|
}
|
|
7
8
|
export interface TodoContinuationEnforcer {
|
|
8
9
|
handler: (input: {
|
|
@@ -13,5 +14,6 @@ export interface TodoContinuationEnforcer {
|
|
|
13
14
|
}) => Promise<void>;
|
|
14
15
|
markRecovering: (sessionID: string) => void;
|
|
15
16
|
markRecoveryComplete: (sessionID: string) => void;
|
|
17
|
+
cancelAllCountdowns: () => void;
|
|
16
18
|
}
|
|
17
19
|
export declare function createTodoContinuationEnforcer(ctx: PluginInput, options?: TodoContinuationEnforcerOptions): TodoContinuationEnforcer;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { BackgroundManager } from "../../features/background-agent";
|
|
2
|
+
type BabysittingConfig = {
|
|
3
|
+
timeout_ms?: number;
|
|
4
|
+
};
|
|
5
|
+
type BabysitterContext = {
|
|
6
|
+
directory: string;
|
|
7
|
+
client: {
|
|
8
|
+
session: {
|
|
9
|
+
messages: (args: {
|
|
10
|
+
path: {
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
}) => Promise<{
|
|
14
|
+
data?: unknown;
|
|
15
|
+
} | unknown[]>;
|
|
16
|
+
prompt: (args: {
|
|
17
|
+
path: {
|
|
18
|
+
id: string;
|
|
19
|
+
};
|
|
20
|
+
body: {
|
|
21
|
+
parts: Array<{
|
|
22
|
+
type: "text";
|
|
23
|
+
text: string;
|
|
24
|
+
}>;
|
|
25
|
+
agent?: string;
|
|
26
|
+
model?: {
|
|
27
|
+
providerID: string;
|
|
28
|
+
modelID: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
query?: {
|
|
32
|
+
directory?: string;
|
|
33
|
+
};
|
|
34
|
+
}) => Promise<unknown>;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
type BabysitterOptions = {
|
|
39
|
+
backgroundManager: Pick<BackgroundManager, "getTasksByParentSession">;
|
|
40
|
+
config?: BabysittingConfig;
|
|
41
|
+
};
|
|
42
|
+
export declare function createUnstableAgentBabysitterHook(ctx: BabysitterContext, options: BabysitterOptions): {
|
|
43
|
+
event: ({ event }: {
|
|
44
|
+
event: {
|
|
45
|
+
type: string;
|
|
46
|
+
properties?: unknown;
|
|
47
|
+
};
|
|
48
|
+
}) => Promise<void>;
|
|
49
|
+
};
|
|
50
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|