opencode-multiagent 0.2.1 → 0.4.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.
Files changed (160) hide show
  1. package/AGENTS.md +83 -0
  2. package/CHANGELOG.md +31 -0
  3. package/CONTRIBUTING.md +36 -0
  4. package/README.md +44 -168
  5. package/README.tr.md +84 -0
  6. package/RELEASE.md +68 -0
  7. package/agents/AGENTS.md +91 -0
  8. package/agents/auditor.md +67 -23
  9. package/agents/{worker.md → coder.md} +24 -17
  10. package/agents/docmaster.md +91 -0
  11. package/agents/executor.md +63 -79
  12. package/agents/planner.md +78 -58
  13. package/agents/reviewer.md +31 -15
  14. package/agents/scout.md +25 -17
  15. package/agents/sec-coder.md +83 -0
  16. package/agents/ui-coder.md +77 -0
  17. package/commands/board.md +17 -0
  18. package/commands/execute.md +9 -7
  19. package/commands/init-deep.md +7 -6
  20. package/commands/init.md +5 -5
  21. package/commands/inspect.md +6 -5
  22. package/commands/plan.md +8 -6
  23. package/commands/quality.md +4 -3
  24. package/commands/review.md +5 -3
  25. package/commands/status.md +5 -3
  26. package/defaults/AGENTS.md +48 -0
  27. package/defaults/opencode-multiagent.json +180 -0
  28. package/defaults/opencode-multiagent.schema.json +265 -0
  29. package/dist/control-plane.d.ts +4 -0
  30. package/dist/control-plane.d.ts.map +1 -0
  31. package/dist/index.d.ts +5 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +1916 -0
  34. package/dist/opencode-multiagent/compiler.d.ts +25 -0
  35. package/dist/opencode-multiagent/compiler.d.ts.map +1 -0
  36. package/dist/opencode-multiagent/constants.d.ts +128 -0
  37. package/dist/opencode-multiagent/constants.d.ts.map +1 -0
  38. package/dist/opencode-multiagent/correlation.d.ts +21 -0
  39. package/dist/opencode-multiagent/correlation.d.ts.map +1 -0
  40. package/dist/opencode-multiagent/defaults.d.ts +10 -0
  41. package/dist/opencode-multiagent/defaults.d.ts.map +1 -0
  42. package/dist/opencode-multiagent/hooks.d.ts +62 -0
  43. package/dist/opencode-multiagent/hooks.d.ts.map +1 -0
  44. package/dist/opencode-multiagent/log.d.ts +2 -0
  45. package/dist/opencode-multiagent/log.d.ts.map +1 -0
  46. package/dist/opencode-multiagent/markdown.d.ts +8 -0
  47. package/dist/opencode-multiagent/markdown.d.ts.map +1 -0
  48. package/dist/opencode-multiagent/mcp.d.ts +3 -0
  49. package/dist/opencode-multiagent/mcp.d.ts.map +1 -0
  50. package/dist/opencode-multiagent/policy.d.ts +5 -0
  51. package/dist/opencode-multiagent/policy.d.ts.map +1 -0
  52. package/dist/opencode-multiagent/quality.d.ts +18 -0
  53. package/dist/opencode-multiagent/quality.d.ts.map +1 -0
  54. package/dist/opencode-multiagent/runtime.d.ts +7 -0
  55. package/dist/opencode-multiagent/runtime.d.ts.map +1 -0
  56. package/dist/opencode-multiagent/session-tracker.d.ts +32 -0
  57. package/dist/opencode-multiagent/session-tracker.d.ts.map +1 -0
  58. package/dist/opencode-multiagent/skills.d.ts +17 -0
  59. package/dist/opencode-multiagent/skills.d.ts.map +1 -0
  60. package/dist/opencode-multiagent/supervision.d.ts +26 -0
  61. package/dist/opencode-multiagent/supervision.d.ts.map +1 -0
  62. package/dist/opencode-multiagent/task-manager.d.ts +54 -0
  63. package/dist/opencode-multiagent/task-manager.d.ts.map +1 -0
  64. package/dist/opencode-multiagent/telemetry.d.ts +28 -0
  65. package/dist/opencode-multiagent/telemetry.d.ts.map +1 -0
  66. package/dist/opencode-multiagent/tools.d.ts +87 -0
  67. package/dist/opencode-multiagent/tools.d.ts.map +1 -0
  68. package/dist/opencode-multiagent/types.d.ts +36 -0
  69. package/dist/opencode-multiagent/types.d.ts.map +1 -0
  70. package/dist/opencode-multiagent/utils.d.ts +9 -0
  71. package/dist/opencode-multiagent/utils.d.ts.map +1 -0
  72. package/docs/agents.md +148 -0
  73. package/docs/agents.tr.md +149 -0
  74. package/docs/configuration.md +244 -0
  75. package/docs/configuration.tr.md +244 -0
  76. package/docs/usage-guide.md +224 -0
  77. package/docs/usage-guide.tr.md +225 -0
  78. package/examples/opencode.with-overrides.json +3 -7
  79. package/package.json +23 -13
  80. package/skills/AGENTS.md +51 -0
  81. package/skills/advanced-evaluation/SKILL.md +37 -21
  82. package/skills/advanced-evaluation/manifest.json +2 -13
  83. package/skills/cek-context-engineering/SKILL.md +159 -87
  84. package/skills/cek-context-engineering/manifest.json +1 -3
  85. package/skills/cek-prompt-engineering/SKILL.md +13 -10
  86. package/skills/cek-prompt-engineering/manifest.json +1 -3
  87. package/skills/cek-test-prompt/SKILL.md +38 -28
  88. package/skills/cek-test-prompt/manifest.json +1 -3
  89. package/skills/cek-thought-based-reasoning/SKILL.md +75 -21
  90. package/skills/cek-thought-based-reasoning/manifest.json +1 -3
  91. package/skills/context-degradation/SKILL.md +14 -13
  92. package/skills/context-degradation/manifest.json +1 -3
  93. package/skills/debate/SKILL.md +23 -78
  94. package/skills/debate/manifest.json +2 -12
  95. package/skills/design-first/manifest.json +2 -13
  96. package/skills/dispatching-parallel-agents/SKILL.md +14 -3
  97. package/skills/dispatching-parallel-agents/manifest.json +1 -4
  98. package/skills/drift-analysis/SKILL.md +50 -29
  99. package/skills/drift-analysis/manifest.json +2 -12
  100. package/skills/evaluation/manifest.json +2 -12
  101. package/skills/executing-plans/SKILL.md +15 -8
  102. package/skills/executing-plans/manifest.json +1 -3
  103. package/skills/handoff-protocols/manifest.json +2 -12
  104. package/skills/parallel-investigation/SKILL.md +25 -12
  105. package/skills/parallel-investigation/manifest.json +1 -4
  106. package/skills/reflexion-critique/SKILL.md +21 -10
  107. package/skills/reflexion-critique/manifest.json +1 -3
  108. package/skills/reflexion-reflect/SKILL.md +36 -34
  109. package/skills/reflexion-reflect/manifest.json +2 -10
  110. package/skills/root-cause-analysis/manifest.json +2 -13
  111. package/skills/sadd-judge-with-debate/SKILL.md +50 -26
  112. package/skills/sadd-judge-with-debate/manifest.json +1 -3
  113. package/skills/structured-code-review/manifest.json +2 -11
  114. package/skills/task-decomposition/manifest.json +2 -13
  115. package/skills/verification-before-completion/manifest.json +2 -15
  116. package/skills/verification-gates/SKILL.md +27 -19
  117. package/skills/verification-gates/manifest.json +2 -12
  118. package/agents/advisor.md +0 -57
  119. package/agents/critic.md +0 -127
  120. package/agents/deep-worker.md +0 -65
  121. package/agents/devil.md +0 -36
  122. package/agents/heavy-worker.md +0 -68
  123. package/agents/lead.md +0 -155
  124. package/agents/librarian.md +0 -62
  125. package/agents/qa.md +0 -50
  126. package/agents/quick.md +0 -65
  127. package/agents/scribe.md +0 -78
  128. package/agents/strategist.md +0 -63
  129. package/agents/ui-heavy-worker.md +0 -62
  130. package/agents/ui-worker.md +0 -69
  131. package/agents/validator.md +0 -47
  132. package/defaults/agent-settings.json +0 -102
  133. package/defaults/agent-settings.schema.json +0 -25
  134. package/defaults/flags.json +0 -35
  135. package/defaults/flags.schema.json +0 -119
  136. package/defaults/mcp-defaults.json +0 -47
  137. package/defaults/mcp-defaults.schema.json +0 -38
  138. package/defaults/profiles.json +0 -53
  139. package/defaults/profiles.schema.json +0 -60
  140. package/defaults/team-profiles.json +0 -83
  141. package/src/control-plane.ts +0 -21
  142. package/src/index.ts +0 -8
  143. package/src/opencode-multiagent/compiler.ts +0 -168
  144. package/src/opencode-multiagent/constants.ts +0 -178
  145. package/src/opencode-multiagent/file-lock.ts +0 -90
  146. package/src/opencode-multiagent/hooks.ts +0 -599
  147. package/src/opencode-multiagent/log.ts +0 -12
  148. package/src/opencode-multiagent/mailbox.ts +0 -287
  149. package/src/opencode-multiagent/markdown.ts +0 -99
  150. package/src/opencode-multiagent/mcp.ts +0 -35
  151. package/src/opencode-multiagent/policy.ts +0 -67
  152. package/src/opencode-multiagent/quality.ts +0 -140
  153. package/src/opencode-multiagent/runtime.ts +0 -55
  154. package/src/opencode-multiagent/skills.ts +0 -144
  155. package/src/opencode-multiagent/supervision.ts +0 -156
  156. package/src/opencode-multiagent/task-manager.ts +0 -148
  157. package/src/opencode-multiagent/team-manager.ts +0 -219
  158. package/src/opencode-multiagent/team-tools.ts +0 -359
  159. package/src/opencode-multiagent/telemetry.ts +0 -124
  160. package/src/opencode-multiagent/utils.ts +0 -54
@@ -9,9 +9,7 @@
9
9
  "lost in middle",
10
10
  "context design"
11
11
  ],
12
- "applicable_agents": [
13
- "critic"
14
- ],
12
+ "applicable_agents": ["planner"],
15
13
  "max_context_tokens": 2600,
16
14
  "entry_file": "SKILL.md"
17
15
  }
@@ -37,6 +37,7 @@ Request step-by-step reasoning before the final answer. Add "Let's think step by
37
37
  Analyze this bug report and determine root cause.
38
38
 
39
39
  Think step by step:
40
+
40
41
  1. What is the expected behavior?
41
42
  2. What is the actual behavior?
42
43
  3. What changed recently that could cause this?
@@ -100,6 +101,7 @@ Set global behavior and constraints that persist across the conversation. Define
100
101
  System: You are a senior backend engineer specializing in API design.
101
102
 
102
103
  Rules:
104
+
103
105
  - Always consider scalability and performance
104
106
  - Suggest RESTful patterns by default
105
107
  - Flag security concerns immediately
@@ -107,6 +109,7 @@ Rules:
107
109
  - Use early return pattern
108
110
 
109
111
  Format responses as:
112
+
110
113
  1. Analysis
111
114
  2. Recommendation
112
115
  3. Code example
@@ -249,7 +252,7 @@ Only add context Claude doesn't already have. Challenge each piece of informatio
249
252
 
250
253
  **Good example: Concise** (approximately 50 tokens):
251
254
 
252
- ````markdown theme={null}
255
+ ````markdown theme={null}
253
256
  ## Extract PDF text
254
257
 
255
258
  Use pdfplumber for text extraction:
@@ -264,7 +267,7 @@ with pdfplumber.open("file.pdf") as pdf:
264
267
 
265
268
  **Bad example: Too verbose** (approximately 150 tokens):
266
269
 
267
- ```markdown theme={null}
270
+ ```markdown theme={null}
268
271
  ## Extract PDF text
269
272
 
270
273
  PDF (Portable Document Format) files are a common file format that contains
@@ -290,7 +293,7 @@ Use when:
290
293
 
291
294
  Example:
292
295
 
293
- ```markdown theme={null}
296
+ ```markdown theme={null}
294
297
  ## Code review process
295
298
 
296
299
  1. Analyze the code structure and organization
@@ -309,7 +312,7 @@ Use when:
309
312
 
310
313
  Example:
311
314
 
312
- ````markdown theme={null}
315
+ ````markdown theme={null}
313
316
  ## Generate report
314
317
 
315
318
  Use this template and customize as needed:
@@ -332,7 +335,7 @@ Use when:
332
335
 
333
336
  Example:
334
337
 
335
- ````markdown theme={null}
338
+ ````markdown theme={null}
336
339
  ## Database migration
337
340
 
338
341
  Run exactly this script:
@@ -504,12 +507,12 @@ LLMs respond to the same persuasion principles as humans. Understanding this psy
504
507
 
505
508
  ## Principle Combinations by Prompt Type
506
509
 
507
- | Prompt Type | Use | Avoid |
508
- |------------|-----|-------|
510
+ | Prompt Type | Use | Avoid |
511
+ | -------------------- | ------------------------------------- | ------------------- |
509
512
  | Discipline-enforcing | Authority + Commitment + Social Proof | Liking, Reciprocity |
510
- | Guidance/technique | Moderate Authority + Unity | Heavy authority |
511
- | Collaborative | Unity + Commitment | Authority, Liking |
512
- | Reference | Clarity only | All persuasion |
513
+ | Guidance/technique | Moderate Authority + Unity | Heavy authority |
514
+ | Collaborative | Unity + Commitment | Authority, Liking |
515
+ | Reference | Clarity only | All persuasion |
513
516
 
514
517
  ## Why This Works: The Psychology
515
518
 
@@ -9,9 +9,7 @@
9
9
  "rewrite prompt",
10
10
  "instruction design"
11
11
  ],
12
- "applicable_agents": [
13
- "critic"
14
- ],
12
+ "applicable_agents": ["planner"],
15
13
  "max_context_tokens": 2200,
16
14
  "entry_file": "SKILL.md"
17
15
  }
@@ -16,10 +16,9 @@ Run scenarios without the prompt (RED - watch agent behavior), write prompt addr
16
16
  **Core principle:** If you didn't watch an agent fail without the prompt, you don't know what the prompt needs to fix.
17
17
 
18
18
  **REQUIRED BACKGROUND:**
19
- - You MUST understand `tdd:test-driven-development` - defines RED-GREEN-REFACTOR cycle
20
- - You SHOULD understand `prompt-engineering` skill - provides prompt optimization techniques
21
19
 
22
- **Related skill:** See `test-skill` for testing discipline-enforcing skills specifically. This command covers ALL prompts.
20
+ - You MUST understand TDD methodology (RED-GREEN-REFACTOR cycle)
21
+ - You SHOULD understand `cek-prompt-engineering` skill - provides prompt optimization techniques
23
22
 
24
23
  ## When to Use
25
24
 
@@ -40,26 +39,26 @@ Test before deployment when:
40
39
 
41
40
  ## Prompt Types & Testing Strategies
42
41
 
43
- | Prompt Type | Test Focus | Example |
44
- |-------------|------------|---------|
45
- | **Instruction** | Does agent follow steps correctly? | Command that performs git workflow |
46
- | **Discipline-enforcing** | Does agent resist rationalization under pressure? | Skill requiring TDD compliance |
47
- | **Guidance** | Does agent apply advice appropriately? | Skill with architecture patterns |
48
- | **Reference** | Is information accurate and accessible? | API documentation skill |
49
- | **Subagent** | Does subagent accomplish task reliably? | Task tool prompt for code review |
42
+ | Prompt Type | Test Focus | Example |
43
+ | ------------------------ | ------------------------------------------------- | ---------------------------------- |
44
+ | **Instruction** | Does agent follow steps correctly? | Command that performs git workflow |
45
+ | **Discipline-enforcing** | Does agent resist rationalization under pressure? | Skill requiring TDD compliance |
46
+ | **Guidance** | Does agent apply advice appropriately? | Skill with architecture patterns |
47
+ | **Reference** | Is information accurate and accessible? | API documentation skill |
48
+ | **Subagent** | Does subagent accomplish task reliably? | Task tool prompt for code review |
50
49
 
51
50
  Different types need different test scenarios (covered in sections below).
52
51
 
53
52
  ## TDD Mapping for Prompt Testing
54
53
 
55
- | TDD Phase | Prompt Testing | What You Do |
56
- |-----------|----------------|-------------|
57
- | **RED** | Baseline test | Run scenario WITHOUT prompt using subagent, observe behavior |
58
- | **Verify RED** | Document behavior | Capture exact agent actions/reasoning verbatim |
59
- | **GREEN** | Write prompt | Address specific baseline failures |
60
- | **Verify GREEN** | Test with prompt | Run WITH prompt using subagent, verify improvement |
61
- | **REFACTOR** | Optimize prompt | Improve clarity, close loopholes, reduce tokens |
62
- | **Stay GREEN** | Re-verify | Test again with fresh subagent, ensure still works |
54
+ | TDD Phase | Prompt Testing | What You Do |
55
+ | ---------------- | ----------------- | ------------------------------------------------------------ |
56
+ | **RED** | Baseline test | Run scenario WITHOUT prompt using subagent, observe behavior |
57
+ | **Verify RED** | Document behavior | Capture exact agent actions/reasoning verbatim |
58
+ | **GREEN** | Write prompt | Address specific baseline failures |
59
+ | **Verify GREEN** | Test with prompt | Run WITH prompt using subagent, verify improvement |
60
+ | **REFACTOR** | Optimize prompt | Improve clarity, close loopholes, reduce tokens |
61
+ | **Stay GREEN** | Re-verify | Test again with fresh subagent, ensure still works |
63
62
 
64
63
  ## Why Use Subagents for Testing?
65
64
 
@@ -111,6 +110,7 @@ Make an appropriate commit.
111
110
  ```
112
111
 
113
112
  **Baseline behavior (without prompt):**
113
+
114
114
  - Agent might commit all files (including experimental)
115
115
  - Might skip running tests first
116
116
  - Might write vague commit message
@@ -140,6 +140,7 @@ Choose A, B, or C. Be honest.
140
140
  ```
141
141
 
142
142
  **Baseline behavior (without skill):**
143
+
143
144
  - Agent chooses B or C
144
145
  - Rationalizations: "manually tested", "tests after achieve same goals", "deleting wasteful"
145
146
 
@@ -160,6 +161,7 @@ Propose an architecture.
160
161
  ```
161
162
 
162
163
  **Baseline behavior (without skill):**
164
+
163
165
  - Agent might propose synchronous processing (too slow)
164
166
  - Might miss retry/fallback mechanisms
165
167
  - Might not consider event ordering
@@ -179,6 +181,7 @@ What's the retry strategy for failed requests?
179
181
  ```
180
182
 
181
183
  **Baseline behavior (without reference):**
184
+
182
185
  - Agent guesses or provides generic advice
183
186
  - Misses product-specific details
184
187
  - Provides outdated information
@@ -241,16 +244,18 @@ Clear steps addressing baseline failures:
241
244
  Add explicit counters for each rationalization:
242
245
 
243
246
  ## The Iron Law
247
+
244
248
  Write code before test? Delete it. Start over.
245
249
 
246
250
  **No exceptions:**
251
+
247
252
  - Don't keep as "reference"
248
253
  - Don't "adapt" while writing tests
249
254
  - Delete means delete
250
255
 
251
- | Excuse | Reality |
252
- |--------|---------|
253
- | "Already manually tested" | Ad-hoc ≠ systematic. No record, can't re-run. |
256
+ | Excuse | Reality |
257
+ | -------------------------- | ------------------------------------------------- |
258
+ | "Already manually tested" | Ad-hoc ≠ systematic. No record, can't re-run. |
254
259
  | "Tests after achieve same" | Tests-after = verifying. Tests-first = designing. |
255
260
  ```
256
261
 
@@ -264,6 +269,7 @@ Pattern with clear applicability:
264
269
  **When to use:** >1000 events/sec, async operations, resilience required
265
270
 
266
271
  **Pattern:**
272
+
267
273
  1. Queue-based ingestion (decouple receipt from processing)
268
274
  2. Worker pools (parallel processing)
269
275
  3. Dead letter queue (failed events)
@@ -309,6 +315,7 @@ description: "Green test for [prompt-name]"
309
315
  ```
310
316
 
311
317
  **Success criteria:**
318
+
312
319
  - Agent follows prompt instructions
313
320
  - Baseline failures no longer occur
314
321
  - Agent cites prompt when relevant
@@ -418,6 +425,7 @@ to submit. If validation fails, show errors to the user.
418
425
  **Re-test same scenarios with updated prompt using fresh subagents.**
419
426
 
420
427
  Agent should:
428
+
421
429
  - Still follow instructions correctly
422
430
  - Show improved understanding
423
431
  - Reference updated sections when relevant
@@ -470,6 +478,7 @@ For critical prompts, test under extreme conditions.
470
478
 
471
479
  ```markdown
472
480
  Launch subagent with:
481
+
473
482
  - Maximum pressure scenarios
474
483
  - Ambiguous edge cases
475
484
  - Contradictory constraints
@@ -546,6 +555,7 @@ Testing command: `/git:commit` - should create conventional commits with verific
546
555
  Task: You need to commit changes.
547
556
 
548
557
  Modified files:
558
+
549
559
  - src/payment.ts (new feature complete)
550
560
  - src/experimental.ts (work in progress, broken)
551
561
  - tests/payment.test.ts (tests for new feature)
@@ -677,13 +687,13 @@ Kept: Critical rules and process steps
677
687
 
678
688
  ## Quick Reference
679
689
 
680
- | Prompt Type | RED Test | GREEN Fix | REFACTOR Focus |
681
- |-------------|----------|-----------|----------------|
682
- | **Instruction** | Does agent skip steps? | Add explicit steps/verification | Reduce tokens, improve clarity |
683
- | **Discipline** | Does agent rationalize? | Add counters for rationalizations | Close new loopholes |
684
- | **Guidance** | Does agent misapply? | Clarify when/how to use | Add examples, simplify |
685
- | **Reference** | Is information missing/wrong? | Add accurate details | Organize for findability |
686
- | **Subagent** | Does task fail? | Clarify task/constraints | Optimize for token cost |
690
+ | Prompt Type | RED Test | GREEN Fix | REFACTOR Focus |
691
+ | --------------- | ----------------------------- | --------------------------------- | ------------------------------ |
692
+ | **Instruction** | Does agent skip steps? | Add explicit steps/verification | Reduce tokens, improve clarity |
693
+ | **Discipline** | Does agent rationalize? | Add counters for rationalizations | Close new loopholes |
694
+ | **Guidance** | Does agent misapply? | Clarify when/how to use | Add examples, simplify |
695
+ | **Reference** | Is information missing/wrong? | Add accurate details | Organize for findability |
696
+ | **Subagent** | Does task fail? | Clarify task/constraints | Optimize for token cost |
687
697
 
688
698
  ## Integration with Prompt Engineering
689
699
 
@@ -9,9 +9,7 @@
9
9
  "prompt behavior",
10
10
  "red green prompt"
11
11
  ],
12
- "applicable_agents": [
13
- "critic"
14
- ],
12
+ "applicable_agents": ["planner"],
15
13
  "max_context_tokens": 2400,
16
14
  "entry_file": "SKILL.md"
17
15
  }