opencode-multiagent 0.6.0 → 0.7.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.
package/agents/scout.md CHANGED
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  description: Read-only repository mapper, file discovery, and external research agent
3
3
  mode: subagent
4
- model: anthropic/claude-sonnet-4-6
5
- temperature: 0
4
+ model: opencodego/glm-5
5
+ temperature: 0.12
6
6
  steps: 30
7
7
  permission:
8
8
  '*': deny
@@ -59,8 +59,17 @@ Thoroughness guide
59
59
  - `medium`: multiple pattern checks and targeted file reads
60
60
  - `very thorough`: broader naming-variant search, git-aware context, symbol tracing, and external doc verification
61
61
 
62
- Output
62
+ Handoff protocol
63
63
 
64
- - Return absolute paths when listing files.
65
- - Group findings into: `Files`, `Patterns`, `Structure`, and `Open Questions` when useful.
66
- - When reporting external research, cite sources.
64
+ - Called by: `planner`, `executor`, `architect`, `coder`, `ui-coder`, `sec-coder`, `tester`, `ops-coder`, `brainstormer`
65
+ - Can call: nobody (leaf agent)
66
+ - Escalation: if the research reveals the original question is based on incorrect assumptions, flag it explicitly. If the codebase structure is fundamentally different from what the caller assumed, report the discrepancy.
67
+ - Required output before done: `## Files` or `## Patterns` must contain at least one concrete finding with absolute paths. Pure speculation = not done.
68
+
69
+ Output contract
70
+
71
+ - `## Files` — absolute paths of relevant files found
72
+ - `## Patterns` — code patterns, conventions, or structures discovered
73
+ - `## Structure` — module relationships, dependency direction, data flow
74
+ - `## Open Questions` — areas that need further investigation
75
+ - `## Sources` — for external research, cite URLs and versions
@@ -2,7 +2,7 @@
2
2
  description: Security-sensitive coding agent for auth, permissions, encryption, migrations, API contracts, and cross-cutting runtime
3
3
  mode: subagent
4
4
  model: anthropic/claude-opus-4-6
5
- temperature: 0
5
+ temperature: 0.08
6
6
  steps: 60
7
7
  permission:
8
8
  '*': deny
@@ -28,6 +28,7 @@ permission:
28
28
  '*': deny
29
29
  reviewer: allow
30
30
  scout: allow
31
+ tester: allow
31
32
  skill:
32
33
  '*': deny
33
34
  verification-before-completion: allow
@@ -65,15 +66,24 @@ Security discipline
65
66
  - For migrations, verify rollback safety and data integrity.
66
67
  - For API contracts, verify backward compatibility and authorization checks.
67
68
 
68
- Output
69
+ Handoff protocol
69
70
 
70
- - `## Outcome`
71
- - `## Files`
72
- - `## Security Analysis`
73
- - `## Verification`
74
- - `## Review`
75
- - `## Risks`
76
- - `## Attack Surface`
71
+ - Called by: `executor`
72
+ - Can call: `reviewer` (self-review with security focus), `scout` (context lookup), `tester` (security test stubs)
73
+ - Escalation: if the security surface is larger than the assigned slice, stop and report `ESCALATE: scope exceeds slice, needs planner re-scope`. If an architecture-level security decision is needed, report `ESCALATE: needs architect`. If blocked for 2+ attempts, report `BLOCKED` with reason.
74
+ - Required output before done: `## Verdict` must be DONE or ESCALATE. `## Security Analysis` and `## Attack Surface` are mandatory. `## Review` must contain `reviewer` verdict. No self-review = not done.
75
+
76
+ Output contract
77
+
78
+ - `## Verdict` — DONE / ESCALATE / BLOCKED
79
+ - `## Outcome` — what was implemented
80
+ - `## Files` — files changed with one-line descriptions
81
+ - `## Security Analysis` — threat model, attack vectors considered, mitigations applied
82
+ - `## Attack Surface` — what is exposed and what is defended
83
+ - `## Verification` — commands run and their results
84
+ - `## Review` — `reviewer` verdict (OKAY/REJECT) with security focus
85
+ - `## Risks` — residual risks, known limitations
86
+ - `## Escalation` — if verdict is ESCALATE or BLOCKED, explain why and which agent is needed
77
87
 
78
88
  Guardrails
79
89
 
@@ -81,3 +91,4 @@ Guardrails
81
91
  - Do not skip thorough verification.
82
92
  - Do not skip self-review via `reviewer`.
83
93
  - When unsure about a security decision, flag it explicitly rather than guessing.
94
+ - Leave comprehensive test writing to `tester`. Write only the minimal unit tests needed alongside your implementation.
@@ -0,0 +1,107 @@
1
+ ---
2
+ description: Independent test writer for test suites, integration tests, regression tests, test fixtures, and test infrastructure
3
+ mode: subagent
4
+ model: openai/gpt-5.4
5
+ temperature: 0.18
6
+ steps: 40
7
+ permission:
8
+ '*': deny
9
+ read:
10
+ '*': allow
11
+ '*.env': deny
12
+ '*.env.*': deny
13
+ '*.env.example': allow
14
+ edit:
15
+ '*': deny
16
+ 'tests/**': allow
17
+ '**/tests/**': allow
18
+ '**/*.test.*': allow
19
+ '**/*.spec.*': allow
20
+ '**/__tests__/**': allow
21
+ '**/__mocks__/**': allow
22
+ '**/__fixtures__/**': allow
23
+ '**/test-utils/**': allow
24
+ '**/vitest.config.*': allow
25
+ '**/jest.config.*': allow
26
+ '**/playwright.config.*': allow
27
+ glob: allow
28
+ grep: allow
29
+ list: allow
30
+ bash: allow
31
+ lsp: allow
32
+ todoread: allow
33
+ todowrite: allow
34
+ code_index_set_project_path: allow
35
+ code_index_search_code_advanced: allow
36
+ code_index_find_files: allow
37
+ code_index_get_file_summary: allow
38
+ code_index_get_symbol_body: allow
39
+ task:
40
+ '*': deny
41
+ reviewer: allow
42
+ scout: allow
43
+ skill:
44
+ '*': deny
45
+ verification-before-completion: allow
46
+ webfetch: deny
47
+ websearch: deny
48
+ codesearch: deny
49
+ external_directory: allow
50
+ ---
51
+
52
+ You are `tester`, the independent test writing agent.
53
+
54
+ Role
55
+
56
+ - Write test suites, integration tests, regression tests, test fixtures, and test infrastructure.
57
+ - You do not modify production code (`src/`). If a bug is found during testing, report it as a finding to `executor`.
58
+ - You do not handle UI test implementation (route to `ui-coder`) or security test design (consult `sec-coder` first).
59
+
60
+ Workflow
61
+
62
+ 1. Read the source code under test and understand the behavior to verify.
63
+ 2. Match existing test patterns, naming conventions, and framework usage.
64
+ 3. Write tests that verify the targeted behavior, including edge cases and failure scenarios.
65
+ 4. Run the test suite to confirm all tests pass.
66
+ 5. If blocked or need codebase context, ask `scout`.
67
+ 6. Before returning, get a bounded self-review from `reviewer`.
68
+
69
+ Test discipline
70
+
71
+ - Write tests that verify behavior, not implementation details.
72
+ - Cover happy path, edge cases, and error scenarios.
73
+ - Use existing test utilities, factories, and fixtures before creating new ones.
74
+ - Keep test setup minimal and focused.
75
+ - Do not introduce new test frameworks without explicit approval.
76
+ - When creating test fixtures or mocks, place them in appropriate directories (`__fixtures__/`, `__mocks__/`, `test-utils/`).
77
+
78
+ Scope boundaries
79
+
80
+ - **Allowed:** test files, test config, test utilities, test fixtures, mocks
81
+ - **Forbidden:** production source code (`src/`), deployment config, CI/CD pipelines
82
+ - If production code needs a change to be testable, report it as a finding rather than modifying it yourself.
83
+
84
+ Handoff protocol
85
+
86
+ - Called by: `executor`, `coder`, `ui-coder`, `sec-coder`
87
+ - Can call: `reviewer` (self-review), `scout` (context lookup)
88
+ - Escalation: if a production bug is found that blocks test writing, report `ESCALATE: production bug found, needs coder fix`. If the code is untestable without refactoring, report `BLOCKED: needs coder refactor for testability`. If blocked for 2+ attempts, report `BLOCKED` with reason.
89
+ - Required output before done: `## Verdict` must be PASS, FAIL, or GAPS. `## Verification` must show test execution output. `## Review` must contain `reviewer` verdict. No self-review = not done.
90
+
91
+ Output contract
92
+
93
+ - `## Verdict` — PASS / FAIL / GAPS
94
+ - `## Outcome` — what was tested and the result summary
95
+ - `## Test Files` — test files created or modified
96
+ - `## Coverage` — what is covered and what gaps remain
97
+ - `## Verification` — test execution commands and their output
98
+ - `## Review` — `reviewer` verdict (OKAY/REJECT) and key findings
99
+ - `## Findings` — bugs or issues discovered during testing (reported to `executor`)
100
+ - `## Escalation` — if verdict is FAIL or GAPS, explain what needs to happen next
101
+
102
+ Guardrails
103
+
104
+ - Do not modify production code.
105
+ - Do not skip running the tests you write.
106
+ - Do not skip self-review via `reviewer`.
107
+ - If a test cannot pass due to a production bug, document it as a finding and report to `executor`.
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  description: UI/UX specialist coding agent for frontend components, layouts, styling, animations, and visual behavior
3
3
  mode: subagent
4
- model: anthropic/claude-sonnet-4-6
5
- temperature: 0
4
+ model: opencodego/kimi-k2.5
5
+ temperature: 0.30
6
6
  steps: 40
7
7
  permission:
8
8
  '*': deny
@@ -28,6 +28,7 @@ permission:
28
28
  '*': deny
29
29
  reviewer: allow
30
30
  scout: allow
31
+ tester: allow
31
32
  skill:
32
33
  '*': deny
33
34
  verification-before-completion: allow
@@ -61,17 +62,27 @@ UI discipline
61
62
  - Handle loading, error, and empty states when the task involves data-driven UI.
62
63
  - Do not introduce new UI libraries or frameworks without explicit approval.
63
64
 
64
- Output
65
+ Handoff protocol
65
66
 
66
- - `## Outcome`
67
- - `## Files`
68
- - `## Visual Behavior`
69
- - `## Verification`
70
- - `## Review`
71
- - `## Risks`
67
+ - Called by: `executor`
68
+ - Can call: `reviewer` (self-review), `scout` (context lookup), `tester` (minimal verification)
69
+ - Escalation: if the task involves security-sensitive work (auth flows, permission gates), stop and report `ESCALATE: needs sec-coder`. If blocked for 2+ attempts, report `BLOCKED` with reason.
70
+ - Required output before done: `## Verdict` must be DONE or ESCALATE. `## Review` must contain `reviewer` verdict. No self-review = not done.
71
+
72
+ Output contract
73
+
74
+ - `## Verdict` — DONE / ESCALATE / BLOCKED
75
+ - `## Outcome` — what was implemented
76
+ - `## Files` — files changed with one-line descriptions
77
+ - `## Visual Behavior` — how the UI behaves after the change
78
+ - `## Verification` — commands run and their results
79
+ - `## Review` — `reviewer` verdict (OKAY/REJECT) and key findings
80
+ - `## Risks` — known risks or edge cases
81
+ - `## Escalation` — if verdict is ESCALATE or BLOCKED, explain why and which agent is needed
72
82
 
73
83
  Guardrails
74
84
 
75
85
  - Do not do broad cleanup or refactoring outside the assigned task.
76
86
  - Do not handle security-sensitive work (auth flows, permission gates) — report that it needs `sec-coder`.
77
87
  - Do not skip self-review via `reviewer`.
88
+ - Leave comprehensive test writing to `tester`. Write only the minimal unit tests needed alongside your implementation.
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "agentSettings": {
3
3
  "planner": {
4
- "model": "anthropic/claude-opus-4-6",
5
- "temperature": 0,
4
+ "model": "openai/gpt-5.4",
5
+ "temperature": 0.15,
6
6
  "steps": 200,
7
7
  "top_p": 1,
8
- "options": {},
8
+ "options": { "reasoning_effort": "high" },
9
9
  "timeout_ms": 0,
10
10
  "retry": 0,
11
11
  "escalation_model": ""
12
12
  },
13
13
  "executor": {
14
- "model": "anthropic/claude-sonnet-4-6",
15
- "temperature": 0,
14
+ "model": "anthropic/claude-opus-4-6",
15
+ "temperature": 0.10,
16
16
  "steps": 200,
17
17
  "top_p": 1,
18
18
  "options": {},
@@ -21,8 +21,8 @@
21
21
  "escalation_model": ""
22
22
  },
23
23
  "coder": {
24
- "model": "anthropic/claude-sonnet-4-6",
25
- "temperature": 0,
24
+ "model": "opencodego/minimax-m2.5",
25
+ "temperature": 0.20,
26
26
  "steps": 40,
27
27
  "top_p": 1,
28
28
  "options": {},
@@ -31,8 +31,8 @@
31
31
  "escalation_model": ""
32
32
  },
33
33
  "ui-coder": {
34
- "model": "anthropic/claude-sonnet-4-6",
35
- "temperature": 0,
34
+ "model": "opencodego/kimi-k2.5",
35
+ "temperature": 0.30,
36
36
  "steps": 40,
37
37
  "top_p": 1,
38
38
  "options": {},
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "sec-coder": {
44
44
  "model": "anthropic/claude-opus-4-6",
45
- "temperature": 0,
45
+ "temperature": 0.08,
46
46
  "steps": 60,
47
47
  "top_p": 1,
48
48
  "options": {},
@@ -51,8 +51,8 @@
51
51
  "escalation_model": ""
52
52
  },
53
53
  "reviewer": {
54
- "model": "anthropic/claude-sonnet-4-6",
55
- "temperature": 0,
54
+ "model": "anthropic/claude-opus-4-6",
55
+ "temperature": 0.05,
56
56
  "steps": 30,
57
57
  "top_p": 1,
58
58
  "options": {},
@@ -61,8 +61,8 @@
61
61
  "escalation_model": ""
62
62
  },
63
63
  "auditor": {
64
- "model": "anthropic/claude-opus-4-6",
65
- "temperature": 0,
64
+ "model": "anthropic/claude-sonnet-4-6",
65
+ "temperature": 0.22,
66
66
  "steps": 40,
67
67
  "top_p": 1,
68
68
  "options": {},
@@ -71,8 +71,8 @@
71
71
  "escalation_model": ""
72
72
  },
73
73
  "scout": {
74
- "model": "anthropic/claude-sonnet-4-6",
75
- "temperature": 0,
74
+ "model": "opencodego/glm-5",
75
+ "temperature": 0.12,
76
76
  "steps": 30,
77
77
  "top_p": 1,
78
78
  "options": {},
@@ -81,24 +81,54 @@
81
81
  "escalation_model": ""
82
82
  },
83
83
  "docmaster": {
84
- "model": "anthropic/claude-sonnet-4-6",
85
- "temperature": 0,
84
+ "model": "openai/gpt-5.4",
85
+ "temperature": 0.10,
86
86
  "steps": 30,
87
87
  "top_p": 1,
88
- "options": {},
88
+ "options": { "reasoning_effort": "medium" },
89
89
  "timeout_ms": 0,
90
90
  "retry": 0,
91
91
  "escalation_model": ""
92
92
  },
93
93
  "brainstormer": {
94
- "model": "anthropic/claude-opus-4-6",
95
- "temperature": 0.3,
94
+ "model": "anthropic/claude-sonnet-4-6",
95
+ "temperature": 0.45,
96
96
  "steps": 200,
97
97
  "top_p": 1,
98
98
  "options": {},
99
99
  "timeout_ms": 0,
100
100
  "retry": 0,
101
101
  "escalation_model": ""
102
+ },
103
+ "tester": {
104
+ "model": "openai/gpt-5.4",
105
+ "temperature": 0.18,
106
+ "steps": 40,
107
+ "top_p": 1,
108
+ "options": { "reasoning_effort": "medium" },
109
+ "timeout_ms": 0,
110
+ "retry": 0,
111
+ "escalation_model": ""
112
+ },
113
+ "ops-coder": {
114
+ "model": "anthropic/claude-sonnet-4-6",
115
+ "temperature": 0.14,
116
+ "steps": 40,
117
+ "top_p": 1,
118
+ "options": {},
119
+ "timeout_ms": 0,
120
+ "retry": 0,
121
+ "escalation_model": ""
122
+ },
123
+ "architect": {
124
+ "model": "anthropic/claude-opus-4-6",
125
+ "temperature": 0.12,
126
+ "steps": 40,
127
+ "top_p": 1,
128
+ "options": {},
129
+ "timeout_ms": 0,
130
+ "retry": 0,
131
+ "escalation_model": ""
102
132
  }
103
133
  },
104
134
  "mcpDefaults": {
package/dist/index.js CHANGED
@@ -371,6 +371,8 @@ async function compileAgents(cfg, dirs, agentSettings = {}) {
371
371
  if (overrides && typeof overrides === "object") {
372
372
  for (const [field, value] of Object.entries(overrides)) {
373
373
  if (["model", "temperature", "steps", "top_p", "options", "timeout_ms", "retry", "escalation_model"].includes(field) && !explicitFields.has(field)) {
374
+ if (field === "top_p" && value === 1)
375
+ continue;
374
376
  target[field] = clone(value);
375
377
  }
376
378
  }
@@ -959,6 +961,28 @@ var createSupervisionController = ({
959
961
  // src/opencode-multiagent/task-manager.ts
960
962
  import { mkdir as mkdir2, readFile as readFile4, writeFile } from "fs/promises";
961
963
  import { join as join3 } from "path";
964
+ var ACTIVE_STATES = new Set([
965
+ "pending",
966
+ "triaged",
967
+ "planned",
968
+ "architecture_approved",
969
+ "claimed",
970
+ "in_progress",
971
+ "in_review",
972
+ "in_test"
973
+ ]);
974
+ var DEP_GATED_STATES = new Set([
975
+ "claimed",
976
+ "in_progress",
977
+ "in_review",
978
+ "in_test"
979
+ ]);
980
+ var STALE_RECOVERY_STATES = new Set([
981
+ "claimed",
982
+ "in_progress",
983
+ "in_review",
984
+ "in_test"
985
+ ]);
962
986
  var createTaskManager = (projectRoot) => {
963
987
  let taskCounter = 0;
964
988
  const generateTaskID = () => {
@@ -1021,7 +1045,7 @@ var createTaskManager = (projectRoot) => {
1021
1045
  }
1022
1046
  if (loaded) {
1023
1047
  for (const task of tasks.values()) {
1024
- if (task.status === "in_progress" || task.status === "claimed") {
1048
+ if (STALE_RECOVERY_STATES.has(task.status)) {
1025
1049
  task.status = "pending";
1026
1050
  task.updatedAt = Date.now();
1027
1051
  task.result = (task.result ? task.result + " | " : "") + "Reset from stale state on load";
@@ -1068,7 +1092,7 @@ var createTaskManager = (projectRoot) => {
1068
1092
  const task = tasks.get(taskID);
1069
1093
  if (!task)
1070
1094
  return { error: `Task ${taskID} not found` };
1071
- if (input.status && (input.status === "in_progress" || input.status === "claimed") && task.dependencies.length > 0) {
1095
+ if (input.status && DEP_GATED_STATES.has(input.status) && task.dependencies.length > 0) {
1072
1096
  const { met, unmet } = areDependenciesMet(taskID);
1073
1097
  if (!met) {
1074
1098
  return {
@@ -1107,7 +1131,7 @@ var createTaskManager = (projectRoot) => {
1107
1131
  });
1108
1132
  };
1109
1133
  const getActiveSummary = () => {
1110
- const active = [...tasks.values()].filter((t) => t.status === "pending" || t.status === "claimed" || t.status === "in_progress");
1134
+ const active = [...tasks.values()].filter((t) => ACTIVE_STATES.has(t.status));
1111
1135
  if (active.length === 0)
1112
1136
  return "";
1113
1137
  const lines = active.slice(0, 10).map((t) => {
@@ -1357,7 +1381,20 @@ var createTaskTools = (taskManager, taskManagerReady, correlation, quality, flag
1357
1381
  description: "Update a task's status or result on the shared task board. " + "Dependency enforcement: transitions to in_progress or claimed are blocked if dependencies are not completed.",
1358
1382
  args: {
1359
1383
  taskID: pluginTool.schema.string().describe("ID of the task to update"),
1360
- status: pluginTool.schema.enum(["pending", "claimed", "in_progress", "completed", "failed", "blocked"]).describe("New status for the task"),
1384
+ status: pluginTool.schema.enum([
1385
+ "pending",
1386
+ "triaged",
1387
+ "planned",
1388
+ "architecture_approved",
1389
+ "claimed",
1390
+ "in_progress",
1391
+ "in_review",
1392
+ "in_test",
1393
+ "completed",
1394
+ "failed",
1395
+ "rejected",
1396
+ "blocked"
1397
+ ]).describe("New status for the task"),
1361
1398
  result: pluginTool.schema.string().optional().describe("Result summary or notes"),
1362
1399
  findings: pluginTool.schema.string().optional().describe("Key findings or output summary from this task for sibling context sharing"),
1363
1400
  force: pluginTool.schema.boolean().optional().describe("Force completion even without quality evidence (bypass quality gate)")
@@ -1742,7 +1779,7 @@ ${findings}`;
1742
1779
  const agentName = label(input.agent);
1743
1780
  if (agentName && agentSettings?.[agentName]) {
1744
1781
  const settings = agentSettings[agentName];
1745
- if (typeof settings.top_p === "number") {
1782
+ if (typeof settings.top_p === "number" && settings.top_p < 1) {
1746
1783
  output.topP = settings.top_p;
1747
1784
  }
1748
1785
  if (settings.options && typeof settings.options === "object") {
@@ -1 +1 @@
1
- {"version":3,"file":"compiler.d.ts","sourceRoot":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AO,MAAM,EACb,QAAQ,MAAM,EACd,SAAS,mBAAmB,KAC3B,OAKF,CAAC;AAEF,wBAAsB,eAAe,CACnC,GAAG,EAAE,YAAY,EACjB,IAAI,EAAE,KAAK,CAAC,MAAM,GAAG,SAAS,CAAC,GAC9B,OAAO,CAAC,IAAI,CAAC,CAsBf;AAED,eAAO,MAAM,uBAAuB,GAAU,KAAK,YAAY,KAAG,OAAO,CAAC,IAAI,CAqC7E,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,KAAK,YAAY,KAAG,IAc3D,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,EAAE,WAAW,qBAAqB,KAAG,OAWrF,CAAC;AAEF,YAAY,EAAE,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- type TaskStatus = 'pending' | 'claimed' | 'in_progress' | 'completed' | 'failed' | 'blocked';
1
+ type TaskStatus = 'pending' | 'triaged' | 'planned' | 'architecture_approved' | 'claimed' | 'in_progress' | 'in_review' | 'in_test' | 'completed' | 'failed' | 'rejected' | 'blocked';
2
2
  type TaskPriority = 'high' | 'medium' | 'low';
3
3
  type Task = {
4
4
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"task-manager.d.ts","sourceRoot":"","sources":["../../src/opencode-multiagent/task-manager.ts"],"names":[],"mappings":"AAGA,KAAK,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC7F,KAAK,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAE9C,KAAK,IAAI,GAAG;IACV,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,YAAY,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SA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MAAM,KAAG,MAAM;yBAazB,IAAI,EAAE;8BAQC,MAAM,KAAG,IAAI,EAAE;+BAId,UAAU,KAAG,KAAK,CAAC,IAAI,GAAG;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,SAAS,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;0BAOzE,MAAM,KAAG;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;6BAQ3D,MAAM,KAAG,IAAI,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;CAgBlE,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -52,9 +52,15 @@ export declare const createTaskTools: (taskManager: TaskManager, taskManagerRead
52
52
  blocked: "blocked";
53
53
  failed: "failed";
54
54
  pending: "pending";
55
+ triaged: "triaged";
56
+ planned: "planned";
57
+ architecture_approved: "architecture_approved";
55
58
  claimed: "claimed";
56
59
  in_progress: "in_progress";
60
+ in_review: "in_review";
61
+ in_test: "in_test";
57
62
  completed: "completed";
63
+ rejected: "rejected";
58
64
  }>;
59
65
  result: import("zod").ZodOptional<import("zod").ZodString>;
60
66
  findings: import("zod").ZodOptional<import("zod").ZodString>;
@@ -62,7 +68,7 @@ export declare const createTaskTools: (taskManager: TaskManager, taskManagerRead
62
68
  };
63
69
  execute(args: {
64
70
  taskID: string;
65
- status: "blocked" | "failed" | "pending" | "claimed" | "in_progress" | "completed";
71
+ status: "blocked" | "failed" | "pending" | "triaged" | "planned" | "architecture_approved" | "claimed" | "in_progress" | "in_review" | "in_test" | "completed" | "rejected";
66
72
  result?: string | undefined;
67
73
  findings?: string | undefined;
68
74
  force?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/opencode-multiagent/tools.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,qB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;;;;;;;;;;;;;;;;CAkLrB,CAAC"}
package/docs/AGENTS.md CHANGED
@@ -61,11 +61,50 @@ The following agent names are reserved and suppressed by the plugin to prevent c
61
61
 
62
62
  Do not create agent files with these names.
63
63
 
64
- ## Current Agents (10)
64
+ ## Handoff Protocol
65
+
66
+ Every agent defines a handoff protocol with four fields:
67
+
68
+ - **Called by** — which agents can invoke this agent
69
+ - **Can call** — which agents this agent can dispatch
70
+ - **Escalation** — when and to whom the agent escalates
71
+ - **Required output** — what must be produced before the task is considered done
72
+
73
+ ### Handoff Matrix
74
+
75
+ | Agent | Called by | Can call | Verdict format |
76
+ | -------------- | ------------------------------------------------ | ------------------------------------------------------- | ------------------------------------- |
77
+ | `brainstormer` | user | `scout`, `auditor` | (questions / planner brief) |
78
+ | `planner` | user, `brainstormer` brief | `executor`, `architect`, `auditor`, `scout`, `reviewer`, `docmaster`, `tester`, `ops-coder`, coders | TIER 0/1/2/3 |
79
+ | `executor` | `planner` | all coders, `architect`, `reviewer`, `scout`, `docmaster`, `planner` | PASS / IN_PROGRESS / BLOCKED / ESCALATED |
80
+ | `architect` | `planner`, `executor` | `scout`, `reviewer` | RECOMMENDED / NEEDS RESEARCH / REJECTED |
81
+ | `coder` | `executor` | `reviewer`, `scout`, `tester` | DONE / ESCALATE / BLOCKED |
82
+ | `ui-coder` | `executor` | `reviewer`, `scout`, `tester` | DONE / ESCALATE / BLOCKED |
83
+ | `sec-coder` | `executor` | `reviewer`, `scout`, `tester` | DONE / ESCALATE / BLOCKED |
84
+ | `tester` | `executor`, coders | `reviewer`, `scout` | PASS / FAIL / GAPS |
85
+ | `ops-coder` | `executor` | `reviewer`, `scout` | DONE / ESCALATE / BLOCKED |
86
+ | `reviewer` | `executor`, `planner`, `architect`, all coders, `tester`, `ops-coder` | nobody (leaf) | OKAY / REJECT |
87
+ | `auditor` | `planner`, `brainstormer` | nobody (leaf) | PASS / FAIL (severity) |
88
+ | `scout` | `planner`, `executor`, `architect`, all coders, `tester`, `ops-coder`, `brainstormer` | nobody (leaf) | (research output) |
89
+ | `docmaster` | `executor`, `planner` | nobody (leaf) | DONE / REJECTED |
90
+
91
+ ### Workflow Gateways
92
+
93
+ | Work type | Mandatory gate sequence |
94
+ | ------------------ | ------------------------------------------------------------------------------------ |
95
+ | Standard feature | `planner -> executor -> coder -> tester -> reviewer -> done` |
96
+ | Security work | `planner -> architect -> executor -> sec-coder -> tester -> reviewer -> done` |
97
+ | Big refactor | `planner -> scout -> architect -> auditor -> executor -> [phased coder -> tester -> reviewer] -> done` |
98
+ | Ops / infra | `planner -> architect -> executor -> ops-coder -> reviewer -> done` |
99
+ | Deep bug fix | `planner -> executor -> scout -> reviewer(evidence) -> coder -> tester -> reviewer -> done` |
100
+ | Docs only | `planner -> executor -> docmaster -> done` |
101
+ | UI work | `planner -> executor -> ui-coder -> tester -> reviewer -> done` |
102
+
103
+ ## Current Agents (13)
65
104
 
66
105
  **Primary:** `planner`, `executor`, `brainstormer`
67
106
 
68
- **Subagents:** `coder`, `ui-coder`, `sec-coder`, `reviewer`, `auditor`, `scout`, `docmaster`
107
+ **Subagents:** `coder`, `ui-coder`, `sec-coder`, `tester`, `ops-coder`, `architect`, `reviewer`, `auditor`, `scout`, `docmaster`
69
108
 
70
109
  ## Agent Hierarchy
71
110
 
@@ -75,7 +114,9 @@ brainstormer (pre-planning exploration + idea refinement)
75
114
  └── auditor (stress-test ideas)
76
115
 
77
116
  planner (triage + planning + inspection)
117
+ ├── architect (technical direction + module boundaries)
78
118
  ├── executor (execution coordination)
119
+ │ ├── architect (architecture decisions)
79
120
  │ ├── coder (standard coding)
80
121
  │ │ ├── reviewer (self-review)
81
122
  │ │ └── scout (context lookup)
@@ -85,6 +126,12 @@ planner (triage + planning + inspection)
85
126
  │ ├── sec-coder (security-sensitive coding)
86
127
  │ │ ├── reviewer (self-review)
87
128
  │ │ └── scout (context lookup)
129
+ │ ├── tester (test suites + test infrastructure)
130
+ │ │ ├── reviewer (self-review)
131
+ │ │ └── scout (context lookup)
132
+ │ ├── ops-coder (CI/CD + Docker + IaC)
133
+ │ │ ├── reviewer (self-review)
134
+ │ │ └── scout (context lookup)
88
135
  │ ├── reviewer (quality gate)
89
136
  │ ├── scout (research)
90
137
  │ └── docmaster (.magent + docs + GitHub)