micode 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +40 -26
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -763,14 +763,22 @@ Batch 3 (parallel):
763
763
  Executes ONE task from the plan.
764
764
  Input: Single task with context (which files, what to do).
765
765
  Output: Changes made and verification results for that task.
766
+ Invoke with: Task tool, subagent_type="implementer"
766
767
  </subagent>
767
768
  <subagent name="reviewer" spawn="parallel-per-task">
768
769
  Reviews ONE task's implementation.
769
770
  Input: Single task's changes against its requirements.
770
771
  Output: APPROVED or CHANGES REQUESTED for that task.
772
+ Invoke with: Task tool, subagent_type="reviewer"
771
773
  </subagent>
772
774
  </available-subagents>
773
775
 
776
+ <critical-instruction>
777
+ You MUST use the Task tool to spawn implementer and reviewer subagents.
778
+ Example: Task(description="Implement task 1", prompt="...", subagent_type="implementer")
779
+ Do NOT try to implement or review yourself - delegate to subagents.
780
+ </critical-instruction>
781
+
774
782
  <per-task-cycle>
775
783
  For each task:
776
784
  1. Spawn implementer with task details
@@ -782,18 +790,17 @@ For each task:
782
790
  </per-task-cycle>
783
791
 
784
792
  <parallel-spawning>
785
- Within a batch, spawn ALL implementers in a SINGLE message:
786
-
787
- Example for batch with tasks 1, 2, 3:
788
- - In ONE message, spawn:
789
- - implementer: "Execute task 1: [details]"
790
- - implementer: "Execute task 2: [details]"
791
- - implementer: "Execute task 3: [details]"
792
-
793
- Then after all complete, in ONE message spawn:
794
- - reviewer: "Review task 1 implementation"
795
- - reviewer: "Review task 2 implementation"
796
- - reviewer: "Review task 3 implementation"
793
+ Within a batch, spawn ALL implementers in a SINGLE message using the Task tool:
794
+
795
+ Example for batch with tasks 1, 2, 3 - call Task tool 3 times in ONE message:
796
+ - Task(description="Task 1", prompt="Execute task 1: [details]", subagent_type="implementer")
797
+ - Task(description="Task 2", prompt="Execute task 2: [details]", subagent_type="implementer")
798
+ - Task(description="Task 3", prompt="Execute task 3: [details]", subagent_type="implementer")
799
+
800
+ Then after all complete, in ONE message call Task tool for reviewers:
801
+ - Task(description="Review 1", prompt="Review task 1 implementation", subagent_type="reviewer")
802
+ - Task(description="Review 2", prompt="Review task 2 implementation", subagent_type="reviewer")
803
+ - Task(description="Review 3", prompt="Review task 3 implementation", subagent_type="reviewer")
797
804
  </parallel-spawning>
798
805
 
799
806
  <rules>
@@ -1032,17 +1039,25 @@ var PROMPT2 = `
1032
1039
  <subagent name="codebase-locator" spawn="multiple">
1033
1040
  Fast file/pattern finder. Spawn multiple with different queries.
1034
1041
  Examples: "Find all entry points", "Find all config files", "Find test directories"
1042
+ Invoke with: Task tool, subagent_type="codebase-locator"
1035
1043
  </subagent>
1036
1044
  <subagent name="codebase-analyzer" spawn="multiple">
1037
1045
  Deep module analyzer. Spawn multiple for different areas.
1038
1046
  Examples: "Analyze src/core", "Analyze api layer", "Analyze database module"
1047
+ Invoke with: Task tool, subagent_type="codebase-analyzer"
1039
1048
  </subagent>
1040
1049
  <subagent name="pattern-finder" spawn="multiple">
1041
1050
  Pattern extractor. Spawn for different pattern types.
1042
1051
  Examples: "Find naming patterns", "Find error handling patterns", "Find async patterns"
1052
+ Invoke with: Task tool, subagent_type="pattern-finder"
1043
1053
  </subagent>
1044
1054
  </available-subagents>
1045
1055
 
1056
+ <critical-instruction>
1057
+ You MUST use the Task tool to spawn subagents. Call multiple Task tools in a SINGLE message for parallelism.
1058
+ Example: Task(description="Find entry points", prompt="Find all entry points and main files", subagent_type="codebase-locator")
1059
+ </critical-instruction>
1060
+
1046
1061
  <language-detection>
1047
1062
  <rule>Identify language(s) by examining file extensions and config files</rule>
1048
1063
  <markers>
@@ -1136,22 +1151,19 @@ var PROMPT2 = `
1136
1151
 
1137
1152
  <execution-example>
1138
1153
  <step description="Start with maximum parallelism">
1139
- In a SINGLE message, spawn:
1140
- - codebase-locator: "Find all entry points and main files"
1141
- - codebase-locator: "Find all config files (linters, formatters, build)"
1142
- - codebase-locator: "Find test directories and test files"
1143
- - codebase-analyzer: "Analyze the directory structure and organization"
1144
- - pattern-finder: "Find naming conventions used across the codebase"
1145
-
1146
- AND run tools:
1154
+ In a SINGLE message, call Task tool multiple times AND run other tools:
1155
+ - Task(description="Find entry points", prompt="Find all entry points and main files", subagent_type="codebase-locator")
1156
+ - Task(description="Find configs", prompt="Find all config files (linters, formatters, build)", subagent_type="codebase-locator")
1157
+ - Task(description="Find tests", prompt="Find test directories and test files", subagent_type="codebase-locator")
1158
+ - Task(description="Analyze structure", prompt="Analyze the directory structure and organization", subagent_type="codebase-analyzer")
1159
+ - Task(description="Find patterns", prompt="Find naming conventions used across the codebase", subagent_type="pattern-finder")
1147
1160
  - Glob: package.json, pyproject.toml, go.mod, Cargo.toml, etc.
1148
1161
  - Glob: README*, ARCHITECTURE*, docs/*
1149
- - Bash: ls -la (root directory)
1150
1162
  </step>
1151
1163
 
1152
1164
  <step description="Parallel deep analysis">
1153
- Based on discovery, in a SINGLE message spawn:
1154
- - codebase-analyzer for each major module found
1165
+ Based on discovery, in a SINGLE message:
1166
+ - Task for each major module: subagent_type="codebase-analyzer"
1155
1167
  - Read multiple source files simultaneously
1156
1168
  - Read multiple test files simultaneously
1157
1169
  </step>
@@ -15947,11 +15959,13 @@ var OpenCodeConfigPlugin = async (ctx) => {
15947
15959
  };
15948
15960
  const mergedAgents = mergeAgentConfigs(agents, userConfig);
15949
15961
  config2.agent = {
15950
- [PRIMARY_AGENT_NAME]: mergedAgents[PRIMARY_AGENT_NAME],
15951
- ...Object.fromEntries(Object.entries(mergedAgents).filter(([k]) => k !== PRIMARY_AGENT_NAME)),
15952
15962
  ...config2.agent,
15953
15963
  build: { ...config2.agent?.build, mode: "subagent" },
15954
- plan: { ...config2.agent?.plan, mode: "subagent" }
15964
+ plan: { ...config2.agent?.plan, mode: "subagent" },
15965
+ triage: { ...config2.agent?.triage, mode: "subagent" },
15966
+ docs: { ...config2.agent?.docs, mode: "subagent" },
15967
+ ...Object.fromEntries(Object.entries(mergedAgents).filter(([k]) => k !== PRIMARY_AGENT_NAME)),
15968
+ [PRIMARY_AGENT_NAME]: mergedAgents[PRIMARY_AGENT_NAME]
15955
15969
  };
15956
15970
  config2.mcp = {
15957
15971
  ...config2.mcp,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "micode",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "OpenCode plugin with Brainstorm-Research-Plan-Implement workflow",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -44,7 +44,7 @@
44
44
  "url": "https://github.com/vtemian/micode/issues"
45
45
  },
46
46
  "dependencies": {
47
- "@opencode-ai/plugin": "1.0.207"
47
+ "@opencode-ai/plugin": "^1.0.219"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@biomejs/biome": "^2.3.10",