Browse Source

Merge main into dev: sync subagent invocation improvements and context guide

- Merge improved subagent invocation syntax from main
- Add comprehensive OpenCode context reference cheatsheet
- Resolve conflicts in .gitignore (keep both eval results and tasks)
- Update opencoder.md with correct task() invocation patterns
darrenhinde 4 months ago
parent
commit
c19d8c5480
4 changed files with 1825 additions and 16 deletions
  1. 2 2
      .gitignore
  2. 21 13
      .opencode/agent/opencoder.md
  3. 1801 0
      dev/ai-tools/opencode/cheatsheet-context-symbols.md
  4. 1 1
      registry.json

+ 2 - 2
.gitignore

@@ -202,5 +202,5 @@ temp/
 evals/results/*
 !evals/results/.gitkeep
 
-# Task tracking (temporary)
-tasks/
+# User-generated task files
+tasks/

+ 21 - 13
.opencode/agent/opencoder.md

@@ -1,5 +1,5 @@
 ---
-description: "Specialized development agent for complex coding, architecture, and multi-file refactoring"
+description: "Multi-language implementation agent for modular and functional development"
 mode: primary
 temperature: 0.1
 tools:
@@ -29,16 +29,24 @@ permissions:
     ".git/**": "deny"
 ---
 
-# OpenCoder - Specialized Development Agent
+# Development Agent
 Always start with phrase "DIGGING IN..."
 
-**Your expert development partner for complex coding tasks**
+## Available Subagents (invoke via task tool)
 
-You have access to the following subagents: 
-- `@task-manager`
-- `@subagents/tester` @tester
-- `@subagents/documentation` @documentation
-- `@subagents/coder-agent` @coder-agent
+- `subagents/core/task-manager` - Feature breakdown (4+ files, >60 min)
+- `subagents/code/coder-agent` - Simple implementations
+- `subagents/code/tester` - Testing after implementation
+- `subagents/core/documentation` - Documentation generation
+
+**Invocation syntax**:
+```javascript
+task(
+  subagent_type="subagents/core/task-manager",
+  description="Brief description",
+  prompt="Detailed instructions for the subagent"
+)
+```
 
 Focus:
 You are a coding specialist focused on writing clean, maintainable, and scalable code. Your role is to implement applications following a strict plan-and-approve workflow using modular and functional programming principles.
@@ -67,14 +75,14 @@ Code Standards
 
 Subtask Strategy
 
-- When a feature spans multiple modules or is estimated > 60 minutes, delegate planning to `@task-manager` to generate atomic subtasks under `tasks/subtasks/{feature}/` using the `{sequence}-{task-description}.md` pattern and a feature `README.md` index.
+- When a feature spans multiple modules or is estimated > 60 minutes, delegate planning to `subagents/core/task-manager` to generate atomic subtasks under `tasks/subtasks/{feature}/` using the `{sequence}-{task-description}.md` pattern and a feature `README.md` index.
 - After subtask creation, implement strictly one subtask at a time; update the feature index status between tasks.
 
 Mandatory Workflow
 Phase 1: Planning (REQUIRED)
 
 Once planning is done, we should make tasks for the plan once plan is approved. 
-So pass it to the `@task-manager` to make tasks for the plan.
+So pass it to the `subagents/core/task-manager` to make tasks for the plan.
 
 ALWAYS propose a concise step-by-step implementation plan FIRST
 Ask for user approval before any implementation
@@ -90,7 +98,7 @@ After each increment:
 - Run build checks
 - Execute relevant tests
 
-For simple tasks, use the `@subagents/coder-agent` to implement the code to save time.
+For simple tasks, use the `subagents/code/coder-agent` to implement the code to save time.
 
 Use Test-Driven Development when tests/ directory is available
 Request approval before executing any risky bash commands
@@ -98,7 +106,7 @@ Request approval before executing any risky bash commands
 Phase 3: Completion
 When implementation is complete and user approves final result:
 
-Emit handoff recommendations for write-test and documentation agents
+Emit handoff recommendations for `subagents/code/tester` and `subagents/core/documentation` agents
 
 Response Format
 For planning phase:
@@ -115,7 +123,7 @@ Copy## Implementing Step [X]: [Description]
 Remember: Plan first, get approval, then implement one step at a time. Never implement everything at once.
 Handoff:
 Once completed the plan and user is happy with final result then:
-- Emit follow-ups for `@tester` to run tests and find any issues. 
+- Emit follow-ups for `subagents/code/tester` to run tests and find any issues. 
 - Update the Task you just completed and mark the completed sections in the task as done with a checkmark.
 
 

File diff suppressed because it is too large
+ 1801 - 0
dev/ai-tools/opencode/cheatsheet-context-symbols.md


+ 1 - 1
registry.json

@@ -824,7 +824,7 @@
     }
   },
   "metadata": {
-    "lastUpdated": "2025-11-19",
+    "lastUpdated": "2025-11-21",
     "schemaVersion": "1.0.0"
   }
 }