opencode-multiagent 0.2.1 → 0.3.0-next.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.
- package/AGENTS.md +62 -0
- package/CHANGELOG.md +18 -0
- package/CONTRIBUTING.md +36 -0
- package/README.md +41 -165
- package/README.tr.md +84 -0
- package/RELEASE.md +68 -0
- package/agents/advisor.md +9 -6
- package/agents/auditor.md +8 -6
- package/agents/critic.md +19 -10
- package/agents/deep-worker.md +11 -7
- package/agents/devil.md +3 -1
- package/agents/executor.md +20 -19
- package/agents/heavy-worker.md +11 -7
- package/agents/lead.md +22 -30
- package/agents/librarian.md +6 -2
- package/agents/planner.md +18 -10
- package/agents/qa.md +9 -6
- package/agents/quick.md +12 -7
- package/agents/reviewer.md +9 -6
- package/agents/scout.md +9 -5
- package/agents/scribe.md +33 -28
- package/agents/strategist.md +10 -7
- package/agents/ui-heavy-worker.md +11 -7
- package/agents/ui-worker.md +12 -7
- package/agents/validator.md +8 -5
- package/agents/worker.md +12 -7
- package/commands/execute.md +1 -0
- package/commands/init-deep.md +1 -0
- package/commands/init.md +1 -0
- package/commands/inspect.md +1 -0
- package/commands/plan.md +1 -0
- package/commands/quality.md +1 -0
- package/commands/review.md +1 -0
- package/commands/status.md +1 -0
- package/defaults/opencode-multiagent.json +223 -0
- package/defaults/opencode-multiagent.schema.json +249 -0
- package/dist/control-plane.d.ts +4 -0
- package/dist/control-plane.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1583 -0
- package/dist/opencode-multiagent/compiler.d.ts +19 -0
- package/dist/opencode-multiagent/compiler.d.ts.map +1 -0
- package/dist/opencode-multiagent/constants.d.ts +116 -0
- package/dist/opencode-multiagent/constants.d.ts.map +1 -0
- package/dist/opencode-multiagent/defaults.d.ts +10 -0
- package/dist/opencode-multiagent/defaults.d.ts.map +1 -0
- package/dist/opencode-multiagent/file-lock.d.ts +15 -0
- package/dist/opencode-multiagent/file-lock.d.ts.map +1 -0
- package/dist/opencode-multiagent/hooks.d.ts +62 -0
- package/dist/opencode-multiagent/hooks.d.ts.map +1 -0
- package/dist/opencode-multiagent/log.d.ts +2 -0
- package/dist/opencode-multiagent/log.d.ts.map +1 -0
- package/dist/opencode-multiagent/markdown.d.ts +8 -0
- package/dist/opencode-multiagent/markdown.d.ts.map +1 -0
- package/dist/opencode-multiagent/mcp.d.ts +3 -0
- package/dist/opencode-multiagent/mcp.d.ts.map +1 -0
- package/dist/opencode-multiagent/policy.d.ts +5 -0
- package/dist/opencode-multiagent/policy.d.ts.map +1 -0
- package/dist/opencode-multiagent/quality.d.ts +14 -0
- package/dist/opencode-multiagent/quality.d.ts.map +1 -0
- package/dist/opencode-multiagent/runtime.d.ts +7 -0
- package/dist/opencode-multiagent/runtime.d.ts.map +1 -0
- package/dist/opencode-multiagent/session-tracker.d.ts +32 -0
- package/dist/opencode-multiagent/session-tracker.d.ts.map +1 -0
- package/dist/opencode-multiagent/skills.d.ts +17 -0
- package/dist/opencode-multiagent/skills.d.ts.map +1 -0
- package/dist/opencode-multiagent/supervision.d.ts +12 -0
- package/dist/opencode-multiagent/supervision.d.ts.map +1 -0
- package/dist/opencode-multiagent/task-manager.d.ts +48 -0
- package/dist/opencode-multiagent/task-manager.d.ts.map +1 -0
- package/dist/opencode-multiagent/telemetry.d.ts +26 -0
- package/dist/opencode-multiagent/telemetry.d.ts.map +1 -0
- package/dist/opencode-multiagent/tools.d.ts +56 -0
- package/dist/opencode-multiagent/tools.d.ts.map +1 -0
- package/dist/opencode-multiagent/types.d.ts +36 -0
- package/dist/opencode-multiagent/types.d.ts.map +1 -0
- package/dist/opencode-multiagent/utils.d.ts +9 -0
- package/dist/opencode-multiagent/utils.d.ts.map +1 -0
- package/docs/agents.md +260 -0
- package/docs/agents.tr.md +260 -0
- package/docs/configuration.md +255 -0
- package/docs/configuration.tr.md +255 -0
- package/docs/usage-guide.md +226 -0
- package/docs/usage-guide.tr.md +227 -0
- package/examples/opencode.with-overrides.json +1 -5
- package/package.json +23 -13
- package/skills/advanced-evaluation/SKILL.md +37 -21
- package/skills/advanced-evaluation/manifest.json +2 -13
- package/skills/cek-context-engineering/SKILL.md +159 -87
- package/skills/cek-context-engineering/manifest.json +1 -3
- package/skills/cek-prompt-engineering/SKILL.md +13 -10
- package/skills/cek-prompt-engineering/manifest.json +1 -3
- package/skills/cek-test-prompt/SKILL.md +38 -28
- package/skills/cek-test-prompt/manifest.json +1 -3
- package/skills/cek-thought-based-reasoning/SKILL.md +75 -21
- package/skills/cek-thought-based-reasoning/manifest.json +1 -3
- package/skills/context-degradation/SKILL.md +14 -13
- package/skills/context-degradation/manifest.json +1 -3
- package/skills/debate/SKILL.md +23 -78
- package/skills/debate/manifest.json +2 -12
- package/skills/design-first/manifest.json +2 -13
- package/skills/dispatching-parallel-agents/SKILL.md +14 -3
- package/skills/dispatching-parallel-agents/manifest.json +1 -4
- package/skills/drift-analysis/SKILL.md +50 -29
- package/skills/drift-analysis/manifest.json +2 -12
- package/skills/evaluation/manifest.json +2 -12
- package/skills/executing-plans/SKILL.md +15 -8
- package/skills/executing-plans/manifest.json +1 -3
- package/skills/handoff-protocols/manifest.json +2 -12
- package/skills/parallel-investigation/SKILL.md +25 -12
- package/skills/parallel-investigation/manifest.json +1 -4
- package/skills/reflexion-critique/SKILL.md +21 -10
- package/skills/reflexion-critique/manifest.json +1 -3
- package/skills/reflexion-reflect/SKILL.md +36 -34
- package/skills/reflexion-reflect/manifest.json +2 -10
- package/skills/root-cause-analysis/manifest.json +2 -13
- package/skills/sadd-judge-with-debate/SKILL.md +50 -26
- package/skills/sadd-judge-with-debate/manifest.json +1 -3
- package/skills/structured-code-review/manifest.json +2 -11
- package/skills/task-decomposition/manifest.json +2 -13
- package/skills/verification-before-completion/manifest.json +2 -15
- package/skills/verification-gates/SKILL.md +27 -19
- package/skills/verification-gates/manifest.json +2 -12
- package/defaults/agent-settings.json +0 -102
- package/defaults/agent-settings.schema.json +0 -25
- package/defaults/flags.json +0 -35
- package/defaults/flags.schema.json +0 -119
- package/defaults/mcp-defaults.json +0 -47
- package/defaults/mcp-defaults.schema.json +0 -38
- package/defaults/profiles.json +0 -53
- package/defaults/profiles.schema.json +0 -60
- package/defaults/team-profiles.json +0 -83
- package/src/control-plane.ts +0 -21
- package/src/index.ts +0 -8
- package/src/opencode-multiagent/compiler.ts +0 -168
- package/src/opencode-multiagent/constants.ts +0 -178
- package/src/opencode-multiagent/file-lock.ts +0 -90
- package/src/opencode-multiagent/hooks.ts +0 -599
- package/src/opencode-multiagent/log.ts +0 -12
- package/src/opencode-multiagent/mailbox.ts +0 -287
- package/src/opencode-multiagent/markdown.ts +0 -99
- package/src/opencode-multiagent/mcp.ts +0 -35
- package/src/opencode-multiagent/policy.ts +0 -67
- package/src/opencode-multiagent/quality.ts +0 -140
- package/src/opencode-multiagent/runtime.ts +0 -55
- package/src/opencode-multiagent/skills.ts +0 -144
- package/src/opencode-multiagent/supervision.ts +0 -156
- package/src/opencode-multiagent/task-manager.ts +0 -148
- package/src/opencode-multiagent/team-manager.ts +0 -219
- package/src/opencode-multiagent/team-tools.ts +0 -359
- package/src/opencode-multiagent/telemetry.ts +0 -124
- package/src/opencode-multiagent/utils.ts +0 -54
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
508
|
-
|
|
510
|
+
| Prompt Type | Use | Avoid |
|
|
511
|
+
| -------------------- | ------------------------------------- | ------------------- |
|
|
509
512
|
| Discipline-enforcing | Authority + Commitment + Social Proof | Liking, Reciprocity |
|
|
510
|
-
| Guidance/technique
|
|
511
|
-
| Collaborative
|
|
512
|
-
| Reference
|
|
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
|
|
|
@@ -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
|
-
|
|
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
|
|
44
|
-
|
|
45
|
-
| **Instruction**
|
|
46
|
-
| **Discipline-enforcing** | Does agent resist rationalization under pressure? | Skill requiring TDD compliance
|
|
47
|
-
| **Guidance**
|
|
48
|
-
| **Reference**
|
|
49
|
-
| **Subagent**
|
|
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
|
|
56
|
-
|
|
57
|
-
| **RED**
|
|
58
|
-
| **Verify RED**
|
|
59
|
-
| **GREEN**
|
|
60
|
-
| **Verify GREEN** | Test with prompt
|
|
61
|
-
| **REFACTOR**
|
|
62
|
-
| **Stay GREEN**
|
|
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
|
|
252
|
-
|
|
253
|
-
| "Already manually tested"
|
|
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
|
|
681
|
-
|
|
682
|
-
| **Instruction** | Does agent skip steps?
|
|
683
|
-
| **Discipline**
|
|
684
|
-
| **Guidance**
|
|
685
|
-
| **Reference**
|
|
686
|
-
| **Subagent**
|
|
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
|
|