opencode-multiagent 0.3.0-next.1 → 0.5.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 (96) hide show
  1. package/AGENTS.md +21 -0
  2. package/CHANGELOG.md +25 -0
  3. package/README.md +4 -4
  4. package/README.tr.md +4 -4
  5. package/agents/AGENTS.md +95 -0
  6. package/agents/auditor.md +59 -17
  7. package/agents/brainstormer.md +113 -0
  8. package/agents/{worker.md → coder.md} +12 -10
  9. package/agents/{scribe.md → docmaster.md} +16 -8
  10. package/agents/executor.md +45 -62
  11. package/agents/planner.md +59 -47
  12. package/agents/reviewer.md +22 -9
  13. package/agents/scout.md +16 -12
  14. package/agents/sec-coder.md +83 -0
  15. package/agents/ui-coder.md +77 -0
  16. package/commands/board.md +17 -0
  17. package/commands/brainstorm-conclude.md +14 -0
  18. package/commands/brainstorm.md +14 -0
  19. package/commands/execute.md +8 -7
  20. package/commands/init-deep.md +6 -6
  21. package/commands/init.md +4 -5
  22. package/commands/inspect.md +5 -5
  23. package/commands/plan.md +7 -6
  24. package/commands/quality.md +3 -3
  25. package/commands/review.md +4 -3
  26. package/commands/status.md +4 -3
  27. package/defaults/AGENTS.md +48 -0
  28. package/defaults/opencode-multiagent.json +16 -150
  29. package/defaults/opencode-multiagent.schema.json +16 -190
  30. package/dist/index.js +471 -218
  31. package/dist/opencode-multiagent/compiler.d.ts +8 -2
  32. package/dist/opencode-multiagent/compiler.d.ts.map +1 -1
  33. package/dist/opencode-multiagent/constants.d.ts +3 -57
  34. package/dist/opencode-multiagent/constants.d.ts.map +1 -1
  35. package/dist/opencode-multiagent/correlation.d.ts +21 -0
  36. package/dist/opencode-multiagent/correlation.d.ts.map +1 -0
  37. package/dist/opencode-multiagent/defaults.d.ts +0 -2
  38. package/dist/opencode-multiagent/defaults.d.ts.map +1 -1
  39. package/dist/opencode-multiagent/hooks.d.ts.map +1 -1
  40. package/dist/opencode-multiagent/log.d.ts.map +1 -1
  41. package/dist/opencode-multiagent/markdown.d.ts.map +1 -1
  42. package/dist/opencode-multiagent/quality.d.ts +4 -0
  43. package/dist/opencode-multiagent/quality.d.ts.map +1 -1
  44. package/dist/opencode-multiagent/runtime.d.ts.map +1 -1
  45. package/dist/opencode-multiagent/supervision.d.ts +14 -0
  46. package/dist/opencode-multiagent/supervision.d.ts.map +1 -1
  47. package/dist/opencode-multiagent/task-manager.d.ts +8 -2
  48. package/dist/opencode-multiagent/task-manager.d.ts.map +1 -1
  49. package/dist/opencode-multiagent/telemetry.d.ts +2 -0
  50. package/dist/opencode-multiagent/telemetry.d.ts.map +1 -1
  51. package/dist/opencode-multiagent/tools.d.ts +32 -1
  52. package/dist/opencode-multiagent/tools.d.ts.map +1 -1
  53. package/docs/agents.md +77 -175
  54. package/docs/agents.tr.md +78 -175
  55. package/docs/configuration.md +17 -27
  56. package/docs/configuration.tr.md +17 -27
  57. package/docs/usage-guide.md +35 -34
  58. package/docs/usage-guide.tr.md +36 -35
  59. package/examples/opencode.with-overrides.json +2 -2
  60. package/package.json +1 -1
  61. package/skills/AGENTS.md +51 -0
  62. package/skills/advanced-evaluation/manifest.json +1 -1
  63. package/skills/cek-context-engineering/manifest.json +1 -1
  64. package/skills/cek-prompt-engineering/manifest.json +1 -1
  65. package/skills/cek-test-prompt/manifest.json +1 -1
  66. package/skills/cek-thought-based-reasoning/manifest.json +1 -1
  67. package/skills/context-degradation/manifest.json +1 -1
  68. package/skills/debate/manifest.json +1 -1
  69. package/skills/design-first/manifest.json +1 -1
  70. package/skills/dispatching-parallel-agents/manifest.json +1 -1
  71. package/skills/drift-analysis/manifest.json +1 -1
  72. package/skills/evaluation/manifest.json +1 -1
  73. package/skills/parallel-investigation/manifest.json +1 -1
  74. package/skills/reflexion-critique/manifest.json +1 -1
  75. package/skills/reflexion-reflect/manifest.json +1 -1
  76. package/skills/root-cause-analysis/manifest.json +1 -1
  77. package/skills/sadd-judge-with-debate/manifest.json +1 -1
  78. package/skills/structured-code-review/manifest.json +1 -1
  79. package/skills/task-decomposition/manifest.json +1 -1
  80. package/skills/verification-before-completion/manifest.json +1 -1
  81. package/skills/verification-gates/manifest.json +1 -1
  82. package/agents/advisor.md +0 -60
  83. package/agents/critic.md +0 -136
  84. package/agents/deep-worker.md +0 -69
  85. package/agents/devil.md +0 -38
  86. package/agents/heavy-worker.md +0 -72
  87. package/agents/lead.md +0 -147
  88. package/agents/librarian.md +0 -66
  89. package/agents/qa.md +0 -53
  90. package/agents/quick.md +0 -70
  91. package/agents/strategist.md +0 -66
  92. package/agents/ui-heavy-worker.md +0 -66
  93. package/agents/ui-worker.md +0 -74
  94. package/agents/validator.md +0 -50
  95. package/dist/opencode-multiagent/file-lock.d.ts +0 -15
  96. package/dist/opencode-multiagent/file-lock.d.ts.map +0 -1
@@ -0,0 +1,14 @@
1
+ ---
2
+ description: Start a brainstorming session to explore an idea before planning
3
+ agent: brainstormer
4
+ ---
5
+
6
+ Start a brainstorming session about: $ARGUMENTS
7
+
8
+ Requirements:
9
+
10
+ - explore the idea from multiple angles before converging on a direction
11
+ - inspect the current repository reality to ground the discussion
12
+ - challenge assumptions and surface alternatives the user may not have considered
13
+ - identify gaps and open questions early
14
+ - do not rush to a conclusion — the user decides when to wrap up with `/brainstorm:conclude`
@@ -1,7 +1,7 @@
1
1
  ---
2
- description: Lead the request through bounded execution
3
- agent: lead
4
- model: anthropic/claude-opus-4-6
2
+ description: Execute a plan or bounded task end to end
3
+ agent: executor
4
+ model: anthropic/claude-sonnet-4-6
5
5
  ---
6
6
 
7
7
  Own this execution request end to end: $ARGUMENTS
@@ -9,7 +9,8 @@ Own this execution request end to end: $ARGUMENTS
9
9
  Requirements:
10
10
 
11
11
  - if `$ARGUMENTS` points to a `.magent/plans/*.md` file, treat that as the source of truth
12
- - if the request is too ambiguous for safe execution, use `critic` and `planner` before routing to `executor`
13
- - keep the execution brief concise and only include the context `executor` actually needs
14
- - initialize or update `.magent/exec/<slug>/task.md` through `scribe` when execution begins
15
- - let `executor` own worker routing, tiered validation, and the internal QA loop
12
+ - if the request is too ambiguous for safe execution, hand to `planner` first
13
+ - keep the execution brief concise and only include the context coders actually need
14
+ - initialize or update `.magent/exec/<slug>/task.md`, `learn.md`, and `error.md` through `docmaster` when execution begins
15
+ - before dispatching work, call `task_list` to check existing board state and avoid duplicate task creation
16
+ - route to the right coder: `coder` (standard), `ui-coder` (UI/UX), `sec-coder` (security-sensitive)
@@ -1,10 +1,10 @@
1
1
  ---
2
- description: Lead a deep repo initialization pass through critic inspection mode
3
- agent: lead
2
+ description: Deep repo initialization pass
3
+ agent: planner
4
4
  model: anthropic/claude-opus-4-6
5
5
  ---
6
6
 
7
- Own this initialization request and use `critic` in inspection mode to perform a deep repository initialization pass.
7
+ Perform a deep repository initialization pass using Tier 3 inspection mode.
8
8
 
9
9
  User focus or extra constraints:
10
10
 
@@ -12,8 +12,8 @@ $ARGUMENTS
12
12
 
13
13
  Requirements:
14
14
 
15
- - walk all major top-level directories and identify their purpose, build surface, and distinct conventions when they materially affect agent guidance
15
+ - walk all major top-level directories and identify their purpose, build surface, and distinct conventions
16
16
  - inspect root and directory-scoped `AGENTS.md` or `AGENT.md` files if they exist
17
17
  - decide whether one root `AGENTS.md` is enough or whether additional directory-scoped guidance is warranted
18
- - if updates are needed, delegate each exact write to `scribe`
19
- - stay in inspection mode and do not emit a planner or executor handoff block
18
+ - if updates are needed, delegate each exact write to `docmaster`
19
+ - stay in inspection mode and do not emit an execution handoff
package/commands/init.md CHANGED
@@ -1,10 +1,10 @@
1
1
  ---
2
- description: Lead a bounded repo initialization pass through critic inspection mode
3
- agent: lead
2
+ description: Bounded repo initialization pass
3
+ agent: planner
4
4
  model: anthropic/claude-opus-4-6
5
5
  ---
6
6
 
7
- Own this initialization request and use `critic` in inspection mode to perform a bounded repository initialization pass.
7
+ Perform a bounded repository initialization pass using Tier 3 inspection mode.
8
8
 
9
9
  User focus or extra constraints:
10
10
 
@@ -14,6 +14,5 @@ Requirements:
14
14
 
15
15
  - inspect root-level repository signals first: `AGENTS.md`, `AGENT.md`, obvious rule files, workflow docs, and the build or test surface
16
16
  - keep the pass bounded and fast; do not exhaustively scan the full tree
17
- - if `AGENTS.md` is missing or clearly outdated, delegate the exact write to `scribe`
17
+ - if `AGENTS.md` is missing or clearly outdated, delegate the exact write to `docmaster`
18
18
  - if the existing guidance is already accurate, say so clearly and stop
19
- - do not emit a planner or executor handoff block
@@ -1,14 +1,14 @@
1
1
  ---
2
- description: Lead a repository inspection request through critic inspection mode
3
- agent: lead
2
+ description: Inspect repository state, conventions, and workflow configuration
3
+ agent: planner
4
4
  model: anthropic/claude-opus-4-6
5
5
  ---
6
6
 
7
- Own this inspection request and use `critic` in inspection mode for: $ARGUMENTS
7
+ Inspect this repository using Tier 3 inspection mode for: $ARGUMENTS
8
8
 
9
9
  Requirements:
10
10
 
11
11
  - inspect `AGENTS.md`, `AGENT.md`, rule files, command files, plan artifacts, and operational conventions
12
- - stay in inspection mode; do not return a planner or executor handoff unless I explicitly ask for routing
13
- - if durable docs or repo memory should be updated, delegate the exact write to `scribe`
12
+ - stay in inspection mode; do not return an execution handoff unless I explicitly ask for routing
13
+ - if durable docs or repo memory should be updated, delegate the exact write to `docmaster`
14
14
  - reply with the inspection-mode output contract
package/commands/plan.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: Lead the request into a durable implementation plan
3
- agent: lead
2
+ description: Create or update a durable implementation plan
3
+ agent: planner
4
4
  model: anthropic/claude-opus-4-6
5
5
  ---
6
6
 
@@ -9,8 +9,9 @@ Own this request and create or update a durable implementation plan for: $ARGUME
9
9
  Requirements:
10
10
 
11
11
  - inspect the current repository reality first
12
- - use `planner` for the actual durable plan work unless the request is obviously only inspection
13
- - keep the planning brief concise and task-shaped instead of dumping broad repository context
14
- - persist the result under `.magent/plans/<slug>.md` through `scribe` unless I explicitly asked for a dry run
15
- - identify verification gates, risks, affected files, and likely worker routing hints for `executor`
12
+ - use `auditor` to pressure-test the direction before finalizing
13
+ - keep the planning brief concise and task-shaped
14
+ - persist the result under `.magent/plans/<slug>.md` through `docmaster` unless I explicitly asked for a dry run
15
+ - identify verification gates, risks, affected files, and likely coder routing hints for `executor`
16
16
  - if a matching plan already exists, reuse and refine it instead of inventing a second parallel plan
17
+ - when the plan has 3 or more execution phases, seed the task board with `task_create` entries — one per phase
@@ -1,7 +1,7 @@
1
1
  ---
2
- description: Run bounded verification with validator
3
- agent: validator
4
- model: openai/gpt-5.3-codex
2
+ description: Run bounded verification and quality checks
3
+ agent: reviewer
4
+ model: anthropic/claude-sonnet-4-6
5
5
  subtask: true
6
6
  ---
7
7
 
@@ -1,7 +1,7 @@
1
1
  ---
2
- description: Run a bounded local code review with reviewer
2
+ description: Run a bounded local code review
3
3
  agent: reviewer
4
- model: github-copilot/grok-code-fast-1
4
+ model: anthropic/claude-sonnet-4-6
5
5
  subtask: true
6
6
  ---
7
7
 
@@ -9,7 +9,8 @@ Review this bounded local scope: $ARGUMENTS
9
9
 
10
10
  Rules:
11
11
 
12
- - keep the review at 1-3 files or one small diff slice
12
+ - keep the review at 1-5 files or one small diff slice
13
13
  - report only material issues
14
14
  - cite local evidence
15
+ - run verification commands when appropriate
15
16
  - if the scope is too broad, say it must be split
@@ -1,10 +1,10 @@
1
1
  ---
2
- description: Lead a .magent status inspection request through critic inspection mode
3
- agent: lead
2
+ description: Inspect .magent execution state and repository workflow status
3
+ agent: planner
4
4
  model: anthropic/claude-opus-4-6
5
5
  ---
6
6
 
7
- Own this status request and use `critic` in inspection mode to inspect the current repository execution state.
7
+ Inspect the current repository execution state using Tier 3 inspection mode.
8
8
 
9
9
  Focus on:
10
10
 
@@ -12,5 +12,6 @@ Focus on:
12
12
  - `.magent/exec/**`
13
13
  - active or stale execution artifacts
14
14
  - the next best action if the repository already contains plan history
15
+ - `.magent/board.json` — query live task board with `task_list` and include active/pending/blocked tasks
15
16
 
16
17
  If `.magent` does not exist, say so clearly and summarize what durable state is currently missing.
@@ -0,0 +1,48 @@
1
+ # defaults/
2
+
3
+ Unified plugin configuration defaults and JSON Schema. These two files must always stay in sync.
4
+
5
+ ## Files
6
+
7
+ - `opencode-multiagent.json` — runtime default values
8
+ - `opencode-multiagent.schema.json` — JSON Schema for validation
9
+
10
+ ## Validation
11
+
12
+ Run `mise run validate-config` after any change. This uses a **hand-rolled validator** in `scripts/schema-lib.ts` — not `ajv` or any standard JSON Schema library. Do not introduce external schema validation dependencies.
13
+
14
+ ## Schema Structure
15
+
16
+ The schema enforces `additionalProperties: false` throughout. Adding a new field requires updating both the schema and the defaults file.
17
+
18
+ Four top-level required sections:
19
+
20
+ | Section | Purpose |
21
+ | --------------- | --------------------------------------------------------------- |
22
+ | `flags` | Runtime feature flags and configuration |
23
+ | `agentSettings` | Per-agent model, temperature, and step overrides |
24
+ | `mcpDefaults` | MCP server definitions injected when missing from active config |
25
+ | `profiles` | Named flag bundles (`minimal`, `standard`, `strict`) |
26
+
27
+ ## Profile Merge Order
28
+
29
+ At runtime, flags are resolved in this order (later wins):
30
+
31
+ 1. `defaultFlags` (hardcoded in `constants.ts`)
32
+ 2. Profile values (from `profiles[selectedProfile]`)
33
+ 3. User flags (from user's `opencode-multiagent.json` in `~/.config/opencode/plugins/`)
34
+
35
+ ## agentSettings
36
+
37
+ Each entry requires at minimum a `model` field (`provider/model` format). Optional: `temperature` (0–2), `steps` (minimum 1). Every agent in `agents/*.md` must have a corresponding entry here.
38
+
39
+ ## mcpDefaults
40
+
41
+ MCP server definitions are injected **conservatively** — only when the key is absent from the user's active OpenCode config. They are never overwritten.
42
+
43
+ ## Key Constraints
44
+
45
+ - **Always run `mise run validate-config` after changes.** The build task depends on it.
46
+ - **Do not use `ajv` or standard JSON Schema validators.** The hand-rolled validator in `scripts/schema-lib.ts` has intentional limitations.
47
+ - **`additionalProperties: false` is enforced everywhere.** Unknown fields will fail validation.
48
+ - **Keep defaults and schema in sync.** A field in one must exist in the other.
@@ -1,135 +1,54 @@
1
1
  {
2
- "flags": {
3
- "profile": "standard",
4
- "enforcement": true,
5
- "observation": true,
6
- "prompt_controls": true,
7
- "agent_compilation": true,
8
- "command_compilation": true,
9
- "mcp_compilation": true,
10
- "telemetry": true,
11
- "supervision": true,
12
- "quality_gate": true,
13
- "skill_sources": ["${plugin_root}/skills", "${home}/.agents/skills", "${home}/skills"],
14
- "skill_injection": false,
15
- "compiler": {
16
- "permission_compilation": true
17
- },
18
- "experimental": {
19
- "chat_system_transform": false,
20
- "chat_messages_transform": false,
21
- "session_compacting": false,
22
- "text_complete": false
23
- },
24
- "supervision_config": {
25
- "idle_timeout_ms": 180000,
26
- "cooldown_ms": 300000
27
- },
28
- "quality_config": {
29
- "reminder_idle_ms": 120000,
30
- "reminder_cooldown_ms": 300000
31
- }
32
- },
33
2
  "agentSettings": {
34
- "lead": {
35
- "model": "anthropic/claude-opus-4-6",
36
- "temperature": 0,
37
- "steps": 500
38
- },
39
- "critic": {
40
- "model": "openai/gpt-5.4",
41
- "temperature": 0,
42
- "steps": 200
43
- },
44
3
  "planner": {
45
4
  "model": "anthropic/claude-opus-4-6",
46
5
  "temperature": 0,
47
- "steps": 100
6
+ "steps": 200
48
7
  },
49
8
  "executor": {
50
9
  "model": "anthropic/claude-sonnet-4-6",
51
10
  "temperature": 0,
52
11
  "steps": 200
53
12
  },
54
- "scout": {
13
+ "coder": {
55
14
  "model": "anthropic/claude-sonnet-4-6",
56
15
  "temperature": 0,
57
- "steps": 24
58
- },
59
- "worker": {
60
- "model": "openai/gpt-5.3-codex",
61
- "temperature": 0,
62
- "steps": 30
16
+ "steps": 40
63
17
  },
64
- "heavy-worker": {
65
- "model": "openai/gpt-5.4",
18
+ "ui-coder": {
19
+ "model": "anthropic/claude-sonnet-4-6",
66
20
  "temperature": 0,
67
21
  "steps": 40
68
22
  },
69
- "deep-worker": {
23
+ "sec-coder": {
70
24
  "model": "anthropic/claude-opus-4-6",
71
25
  "temperature": 0,
72
26
  "steps": 60
73
27
  },
74
- "ui-worker": {
75
- "model": "anthropic/claude-opus-4-6",
76
- "temperature": 0,
77
- "steps": 30
78
- },
79
- "ui-heavy-worker": {
80
- "model": "anthropic/claude-opus-4-6",
81
- "temperature": 0,
82
- "steps": 40
83
- },
84
- "quick": {
85
- "model": "opencode-go/minimax-m2.5",
86
- "temperature": 0,
87
- "steps": 16
88
- },
89
28
  "reviewer": {
90
- "model": "github-copilot/grok-code-fast-1",
91
- "temperature": 0,
92
- "steps": 24
93
- },
94
- "validator": {
95
- "model": "openai/gpt-5.3-codex",
96
- "temperature": 0,
97
- "steps": 24
98
- },
99
- "qa": {
100
- "model": "openai/gpt-5.4",
101
- "temperature": 0,
102
- "steps": 24
103
- },
104
- "advisor": {
105
- "model": "openai/gpt-5.4",
29
+ "model": "anthropic/claude-sonnet-4-6",
106
30
  "temperature": 0,
107
- "steps": 20
31
+ "steps": 30
108
32
  },
109
33
  "auditor": {
110
- "model": "openai/gpt-5.4",
111
- "temperature": 0,
112
- "steps": 24
113
- },
114
- "strategist": {
115
34
  "model": "anthropic/claude-opus-4-6",
116
35
  "temperature": 0,
117
- "steps": 20
36
+ "steps": 40
118
37
  },
119
- "devil": {
38
+ "scout": {
120
39
  "model": "anthropic/claude-sonnet-4-6",
121
40
  "temperature": 0,
122
- "steps": 8
41
+ "steps": 30
123
42
  },
124
- "scribe": {
43
+ "docmaster": {
125
44
  "model": "anthropic/claude-sonnet-4-6",
126
45
  "temperature": 0,
127
46
  "steps": 30
128
47
  },
129
- "librarian": {
130
- "model": "anthropic/claude-sonnet-4-6",
131
- "temperature": 0,
132
- "steps": 24
48
+ "brainstormer": {
49
+ "model": "anthropic/claude-opus-4-6",
50
+ "temperature": 0.3,
51
+ "steps": 200
133
52
  }
134
53
  },
135
54
  "mcpDefaults": {
@@ -166,58 +85,5 @@
166
85
  },
167
86
  "enabled": false
168
87
  }
169
- },
170
- "profiles": {
171
- "minimal": {
172
- "enforcement": true,
173
- "observation": false,
174
- "prompt_controls": false,
175
- "agent_compilation": true,
176
- "command_compilation": true,
177
- "mcp_compilation": true,
178
- "telemetry": false,
179
- "supervision": false,
180
- "quality_gate": false,
181
- "experimental": {
182
- "chat_system_transform": false,
183
- "chat_messages_transform": false,
184
- "session_compacting": false,
185
- "text_complete": false
186
- }
187
- },
188
- "standard": {
189
- "enforcement": true,
190
- "observation": true,
191
- "prompt_controls": true,
192
- "agent_compilation": true,
193
- "command_compilation": true,
194
- "mcp_compilation": true,
195
- "telemetry": true,
196
- "supervision": true,
197
- "quality_gate": true,
198
- "experimental": {
199
- "chat_system_transform": false,
200
- "chat_messages_transform": false,
201
- "session_compacting": false,
202
- "text_complete": false
203
- }
204
- },
205
- "strict": {
206
- "enforcement": true,
207
- "observation": true,
208
- "prompt_controls": true,
209
- "agent_compilation": true,
210
- "command_compilation": true,
211
- "mcp_compilation": true,
212
- "telemetry": true,
213
- "supervision": true,
214
- "quality_gate": true,
215
- "experimental": {
216
- "chat_system_transform": true,
217
- "chat_messages_transform": true,
218
- "session_compacting": true,
219
- "text_complete": true
220
- }
221
- }
222
88
  }
223
89
  }