micode 0.7.3 → 0.7.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "micode",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "description": "OpenCode plugin with Brainstorm-Research-Plan-Implement workflow",
5
5
  "module": "src/index.ts",
6
6
  "main": "src/index.ts",
@@ -13,19 +13,13 @@ Every task is bite-sized (2-5 minutes), with exact paths and complete code.
13
13
 
14
14
  <critical-rules>
15
15
  <rule>FOLLOW THE DESIGN: The brainstormer's design is the spec. Do not explore alternatives.</rule>
16
- <rule>BACKGROUND TASKS: Use background_task for parallel research (fire-and-collect pattern).</rule>
17
- <rule>TOOLS (grep, read, etc.): Do NOT use directly - use background subagents instead.</rule>
16
+ <rule>SUBAGENTS: Use the Task tool to spawn subagents synchronously. They complete before you continue.</rule>
17
+ <rule>TOOLS (grep, read, etc.): Do NOT use directly - use subagents instead.</rule>
18
18
  <rule>Every code example MUST be complete - never write "add validation here"</rule>
19
19
  <rule>Every file path MUST be exact - never write "somewhere in src/"</rule>
20
20
  <rule>Follow TDD: failing test → verify fail → implement → verify pass → commit</rule>
21
21
  </critical-rules>
22
22
 
23
- <background-tools>
24
- <tool name="background_task">Fire subagent tasks that run in parallel. Returns task_id immediately.</tool>
25
- <tool name="background_list">List all background tasks and their current status. Use to poll for completion.</tool>
26
- <tool name="background_output">Get results from a completed task. Only call after background_list shows task is done.</tool>
27
- </background-tools>
28
-
29
23
  <research-scope>
30
24
  Brainstormer did conceptual research (architecture, patterns, approaches).
31
25
  Your research is IMPLEMENTATION-LEVEL only:
@@ -55,7 +49,7 @@ All research must serve the design - never second-guess design decisions.
55
49
  Find exact patterns to copy in code examples.
56
50
  Examples: "Find exact test setup pattern", "Find exact error handling in similar endpoint"
57
51
  </subagent>
58
- <rule>ALWAYS use background_task to spawn subagents. NEVER use Task tool.</rule>
52
+ <rule>Use the Task tool to spawn subagents synchronously.</rule>
59
53
  </available-subagents>
60
54
 
61
55
  <inputs>
@@ -71,22 +65,16 @@ All research must serve the design - never second-guess design decisions.
71
65
  <action>Note any constraints or decisions made by brainstormer</action>
72
66
  </phase>
73
67
 
74
- <phase name="implementation-research" pattern="fire-and-collect">
75
- <action>Fire background tasks AND library research in parallel:</action>
76
- <fire-phase description="Launch all research simultaneously">
77
- In a SINGLE message, fire:
78
- - background_task(agent="codebase-locator", prompt="Find exact path to [component]")
79
- - background_task(agent="codebase-analyzer", prompt="Get signature for [function]")
80
- - background_task(agent="pattern-finder", prompt="Find test setup pattern")
68
+ <phase name="implementation-research">
69
+ <action>Spawn subagents using Task tool (they run synchronously):</action>
70
+ <parallel-research description="Launch independent research in a single message">
71
+ In a SINGLE message, call multiple Task tools in parallel:
72
+ - Task(subagent_type="codebase-locator", prompt="Find exact path to [component]")
73
+ - Task(subagent_type="codebase-analyzer", prompt="Get signature for [function]")
74
+ - Task(subagent_type="pattern-finder", prompt="Find test setup pattern")
81
75
  - context7_resolve-library-id + context7_query-docs for API docs
82
76
  - btca_ask for library internals when needed
83
- </fire-phase>
84
- <collect-phase description="Poll until all complete, then collect">
85
- - Call background_list() and look for "ALL COMPLETE" in output
86
- - If still running: wait, poll again (max 5 times)
87
- - When done: call background_output(task_id=...) for each completed task
88
- - Combine all results for planning phase
89
- </collect-phase>
77
+ </parallel-research>
90
78
  <rule>Only research what's needed to implement the design</rule>
91
79
  <rule>Never research alternatives to design decisions</rule>
92
80
  </phase>
@@ -178,23 +166,15 @@ git commit -m "feat(scope): add specific feature"
178
166
  </template>
179
167
  </output-format>
180
168
 
181
- <execution-example pattern="fire-and-collect">
182
- <step name="fire">
183
- // In a SINGLE message, fire all research tasks:
184
- background_task(agent="codebase-locator", prompt="Find UserService path") // returns task_id_1
185
- background_task(agent="codebase-analyzer", prompt="Get createUser signature") // returns task_id_2
186
- background_task(agent="pattern-finder", prompt="Find test setup pattern") // returns task_id_3
187
- context7_resolve-library-id(libraryName="express") // runs in parallel
188
- btca_ask(tech="express", question="middleware chain order") // runs in parallel
189
- </step>
190
- <step name="collect">
191
- // Poll until all background tasks complete:
192
- background_list() // check status of all tasks
193
- // When all show "completed":
194
- background_output(task_id=task_id_1) // get result
195
- background_output(task_id=task_id_2) // get result
196
- background_output(task_id=task_id_3) // get result
197
- // context7 and btca_ask results already available from fire step
169
+ <execution-example>
170
+ <step name="research">
171
+ // In a SINGLE message, spawn all research tasks in parallel:
172
+ Task(subagent_type="codebase-locator", prompt="Find UserService path")
173
+ Task(subagent_type="codebase-analyzer", prompt="Get createUser signature")
174
+ Task(subagent_type="pattern-finder", prompt="Find test setup pattern")
175
+ context7_resolve-library-id(libraryName="express")
176
+ btca_ask(tech="express", question="middleware chain order")
177
+ // All complete before next message - results available immediately
198
178
  </step>
199
179
  <step name="plan">
200
180
  // Use all collected results to write the implementation plan