@te-river/opencode-team-mode 1.1.0 → 1.2.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/README.md CHANGED
@@ -190,6 +190,7 @@ opencode-team-mode/
190
190
  │ ├── index.ts ← Plugin entry (v2 format, id: "team-mode")
191
191
  │ ├── agents.ts ← Agent definitions (prompts, modes, colors)
192
192
  │ ├── commands.ts ← Command definitions (templates, agent bindings)
193
+ │ ├── blackboard.ts ← Shared blackboard + TTL auto-cleanup sweeper
193
194
  │ └── types.ts ← v2 Plugin API type definitions
194
195
  ├── scripts/
195
196
  │ ├── install.sh ← One-click installer (bash)
@@ -209,6 +210,52 @@ opencode-team-mode/
209
210
 
210
211
  ---
211
212
 
213
+ ## 🗂️ Shared Blackboard (with automatic cleanup)
214
+
215
+ Sub-agents cannot message each other live (platform limitation), so TeamMode coordinates them through a **file blackboard**:
216
+
217
+ - Each multi-agent task gets its own directory under
218
+ `<repo>/.git/opencode-team/<task-slug>/` — inside `.git/`, so your working
219
+ tree and commits are **never polluted**. (Non-git workspaces fall back to
220
+ the OS temp dir.)
221
+ - Every agent writes its full deliverable to a designated artifact
222
+ (`01-architect-design.md`, `03-review-findings.md`, …); the Team Lead
223
+ relays *summary + file path* in each dispatch and keeps `MANIFEST.md` as
224
+ the index. Full documents are shared verbatim — no lossy telephone game,
225
+ and fewer tokens.
226
+ - The Team Lead also enforces a review/test **feedback loop**: Critical/Major
227
+ findings and product bugs automatically become tracked fix tasks until the
228
+ deliverable converges.
229
+
230
+ ### Cleanup — two layers
231
+
232
+ | Layer | Who | When |
233
+ |---|---|---|
234
+ | Fast path | Team Lead (prompt rule) | Deletes the task directory right after the final report |
235
+ | Safety net | Plugin code (in-process sweeper) | At startup + every hour: removes task directories idle **beyond the TTL** |
236
+
237
+ The sweeper is pure code — it never relies on the model remembering to
238
+ delete, and it also cleans up leftovers from crashes or force-kills.
239
+
240
+ ### Configure the TTL
241
+
242
+ Default is **5 days**. To choose your own, use the tuple plugin form in
243
+ `opencode.jsonc`:
244
+
245
+ ```jsonc
246
+ {
247
+ "$schema": "https://opencode.ai/config.json",
248
+ "plugin": [
249
+ ["@te-river/opencode-team-mode", { "ttlDays": 7 }]
250
+ ]
251
+ }
252
+ ```
253
+
254
+ `ttlDays` accepts any number of days in `(0, 365]`; invalid values silently
255
+ fall back to 5.
256
+
257
+ ---
258
+
212
259
  ## 🔧 Customization
213
260
 
214
261
  ### Override an agent
package/README.zh-CN.md CHANGED
@@ -190,6 +190,7 @@ opencode-team-mode/
190
190
  │ ├── index.ts ← 插件入口(v2 格式,id: "team-mode")
191
191
  │ ├── agents.ts ← Agent 定义(prompts、模式、颜色)
192
192
  │ ├── commands.ts ← 命令定义(模板、Agent 绑定)
193
+ │ ├── blackboard.ts ← 共享黑板 + TTL 自动清理清扫器
193
194
  │ └── types.ts ← v2 Plugin API 类型定义
194
195
  ├── scripts/
195
196
  │ ├── install.sh ← 一键安装脚本(bash)
@@ -208,6 +209,44 @@ opencode-team-mode/
208
209
 
209
210
  ---
210
211
 
212
+ ## 🗂️ 共享黑板(带自动清理)
213
+
214
+ 子代理之间无法实时互发消息(平台限制),TeamMode 通过**文件黑板**让它们协作:
215
+
216
+ - 每个多 Agent 任务在 `<repo>/.git/opencode-team/<task-slug>/` 下拥有独立目录 ——
217
+ 位于 `.git/` 内,**绝不污染**你的工作区和 commit(非 git 工作区自动回退到系统临时目录)。
218
+ - 每个 Agent 把完整产出写入指定文件(`01-architect-design.md`、`03-review-findings.md`
219
+ 等),Team Lead 在派发时传递*摘要 + 文件路径*,并维护 `MANIFEST.md` 索引。
220
+ 全文档原文共享 —— 没有"传话失真",还省 token。
221
+ - Team Lead 同时强制执行审查/测试**反馈闭环**:Critical/Major 问题和产品 bug
222
+ 自动转化为跟踪的修复任务,直到交付物收敛。
223
+
224
+ ### 清理 —— 两层防御
225
+
226
+ | 层级 | 责任方 | 时机 |
227
+ |---|---|---|
228
+ | 快速路径 | Team Lead(prompt 规则) | 最终报告交付后立即删除任务目录 |
229
+ | 安全网 | 插件代码(进程内清扫器) | 启动时 + 每小时:清除空闲超过 **TTL** 的任务目录 |
230
+
231
+ 清扫器是纯代码实现 —— 从不依赖模型"记得删",还能兜底清理崩溃/强杀留下的残骸。
232
+
233
+ ### 自定义 TTL
234
+
235
+ 默认为 **5 天**。想自定义,在 `opencode.jsonc` 中使用元组形式的插件声明:
236
+
237
+ ```jsonc
238
+ {
239
+ "$schema": "https://opencode.ai/config.json",
240
+ "plugin": [
241
+ ["@te-river/opencode-team-mode", { "ttlDays": 7 }]
242
+ ]
243
+ }
244
+ ```
245
+
246
+ `ttlDays` 接受 `(0, 365]` 内的天数;非法值静默回退到 5 天。
247
+
248
+ ---
249
+
211
250
  ## 🔧 自定义
212
251
 
213
252
  ### 覆盖某个 Agent
package/dist/agents.d.ts CHANGED
@@ -1,9 +1,19 @@
1
1
  /**
2
2
  * TeamMode agent definitions.
3
3
  *
4
- * Each agent is injected into the OpenCode config via the plugin's `config`
5
- * hook. Users see them in the agent picker of OpenCode Desktop and can
6
- * invoke them with `@agent-name` or via the `/team-*` commands.
4
+ * Each agent is injected into the OpenCode config via the plugin's v2
5
+ * `setup` hook. Users see them in the agent picker of OpenCode Desktop
6
+ * and can invoke them with `@agent-name` or via the `/team-*` commands.
7
+ *
8
+ * Prompt design principles (v1.2):
9
+ * - TodoList discipline is a hard rule for the Team Lead (plan-first for
10
+ * medium+ tasks, live status updates).
11
+ * - Explicit failure-classification retry policy.
12
+ * - Mandatory feedback loop: review findings and test failures are
13
+ * converted into tracked fix tasks before "done" can be declared.
14
+ * - Context-relay rule: sub-agents cannot talk to each other, so every
15
+ * dispatch embeds the relevant prior outputs.
16
+ * - Research findings carry confidence tags and critical ones are verified.
7
17
  */
8
18
  import type { AgentItem } from "./types.js";
9
19
  export declare const agents: Record<string, AgentItem>;
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAwN3C,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAO5C,CAAA"}
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AA+W3C,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAO5C,CAAA"}
package/dist/agents.js CHANGED
@@ -1,9 +1,19 @@
1
1
  /**
2
2
  * TeamMode agent definitions.
3
3
  *
4
- * Each agent is injected into the OpenCode config via the plugin's `config`
5
- * hook. Users see them in the agent picker of OpenCode Desktop and can
6
- * invoke them with `@agent-name` or via the `/team-*` commands.
4
+ * Each agent is injected into the OpenCode config via the plugin's v2
5
+ * `setup` hook. Users see them in the agent picker of OpenCode Desktop
6
+ * and can invoke them with `@agent-name` or via the `/team-*` commands.
7
+ *
8
+ * Prompt design principles (v1.2):
9
+ * - TodoList discipline is a hard rule for the Team Lead (plan-first for
10
+ * medium+ tasks, live status updates).
11
+ * - Explicit failure-classification retry policy.
12
+ * - Mandatory feedback loop: review findings and test failures are
13
+ * converted into tracked fix tasks before "done" can be declared.
14
+ * - Context-relay rule: sub-agents cannot talk to each other, so every
15
+ * dispatch embeds the relevant prior outputs.
16
+ * - Research findings carry confidence tags and critical ones are verified.
7
17
  */
8
18
  /* ------------------------------------------------------------------ */
9
19
  /* Team Lead — orchestrator */
@@ -11,34 +21,112 @@
11
21
  const teamLead = {
12
22
  mode: "all",
13
23
  description: "Team lead orchestrator — decomposes complex tasks, dispatches sub-agents " +
14
- "(architect, implementer, reviewer, tester, researcher), and synthesises " +
15
- "their outputs into a coherent deliverable. Use when the task requires " +
16
- "multi-step collaboration across different expertise areas.",
24
+ "(architect, implementer, reviewer, tester, researcher), enforces a " +
25
+ "review/test feedback loop, and synthesises their outputs into a coherent " +
26
+ "deliverable. Use when the task requires multi-step collaboration across " +
27
+ "different expertise areas.",
17
28
  prompt: `You are the **Team Lead** in a multi-agent coding team.
18
29
 
19
30
  ## Role
20
- You orchestrate the team. You never write production code yourself instead
21
- you decompose the user's request into clear sub-tasks and dispatch them to the
22
- specialist agents via the Task tool.
31
+ You orchestrate the team: decompose work, dispatch it to specialist agents
32
+ via the Task tool, integrate their outputs, and enforce quality gates.
33
+
34
+ ## Hard rule — TodoList discipline (non-negotiable)
35
+ Before you touch anything on a medium-or-larger task you MUST create a todo
36
+ list. A task qualifies as medium-or-larger if ANY of these hold:
37
+ - it needs ≥ 3 steps,
38
+ - it touches ≥ 2 files,
39
+ - it involves more than one specialist agent,
40
+ - the scope is not crystal-clear upfront.
41
+
42
+ Rules for the list:
43
+ - Each item is one concrete work package with a checkable "done" condition.
44
+ - Keep it LIVE: exactly one item \`in_progress\` at a time; mark \`completed\`
45
+ only after the work is actually verified — never batch completions
46
+ retroactively.
47
+ - If scope shifts mid-flight, update the list BEFORE continuing.
48
+ - Trivial single-step asks may skip the list; when in doubt, create it.
49
+ - Before ending your turn, confirm every status matches reality.
23
50
 
24
51
  ## Workflow
25
- 1. **Understand** — Clarify the goal, constraints, and acceptance criteria.
26
- 2. **Plan** — Break the work into ordered sub-tasks. Identify dependencies.
27
- 3. **Dispatch** — Assign each sub-task to the best-fit agent:
52
+ 1. **Understand** — clarify goal, constraints, acceptance criteria.
53
+ 2. **Todo** — translate the plan into an explicit todo list (rule above).
54
+ 3. **Dispatch** — assign each work package to the best-fit agent:
28
55
  - Architecture / system design → \`architect\`
29
56
  - Feature implementation → \`implementer\`
30
57
  - Code review / quality audit → \`reviewer\`
31
58
  - Test writing / validation → \`tester\`
32
59
  - Research / documentation → \`researcher\`
33
- 4. **Synthesize** Collect outputs, resolve conflicts, merge results.
34
- 5. **Report** — Present a concise summary to the user with next steps.
60
+ Independent items run in parallel; dependent items serialize.
61
+ 4. **Integrate** — collect outputs, resolve conflicts, synthesize; consult
62
+ blackboard files whenever a summary is not enough.
63
+ 5. **Verify** — run the feedback loop below before declaring done.
64
+ 6. **Report & clean up** — structured summary with changes, review/test
65
+ verdict, risks; then delete the task blackboard directory.
35
66
 
36
- ## Rules
37
- - Always create a todo list before dispatching work.
38
- - Run independent sub-tasks in parallel when possible.
39
- - If a sub-agent returns poor results, refine the prompt and retry once.
40
- - Keep the user informed with brief progress updates.
41
- - Your final output must be a structured summary, not raw agent output.
67
+ ## When you may edit directly
68
+ Delegation is the default, not a straitjacket. You MAY make small direct
69
+ edits: config tweaks, typo/format fixes, doc updates, tiny glue code
70
+ (≲ 10 lines). Anything substantive feature logic, multi-file changes,
71
+ API design goes to \`implementer\`.
72
+
73
+ ## Shared blackboard (sub-agent coordination)
74
+ Sub-agents cannot message each other live, so the team coordinates through a
75
+ file blackboard (root path is appended at the end of this prompt):
76
+ - When a task involves 2+ agents, create ONE task directory under the board
77
+ root: \`<root>/<task-slug>/\`.
78
+ - Every dispatch must state: the task directory, the exact output file the
79
+ agent should write (e.g. \`01-architect-design.md\`), and which prior files
80
+ to read first.
81
+ - Keep dispatches self-contained: include a 2–5 line summary of relevant
82
+ prior work in the text AND point to the blackboard file holding the full
83
+ content. Summary-in-prompt + file-path is the belt-and-braces protocol —
84
+ never rely on an agent "knowing" what another produced.
85
+ - Sub-agents reply with a summary plus their file path; read the file
86
+ yourself when you need detail, then relay the relevant parts onward.
87
+ - Maintain \`MANIFEST.md\` in the task directory: one line per artifact
88
+ (file — role — status — one-line summary).
89
+ - After you deliver the final report, DELETE the task directory (use the
90
+ platform-appropriate command). The plugin also auto-sweeps directories
91
+ idle beyond the TTL — your deletion is the fast path, the sweeper is the
92
+ safety net.
93
+
94
+ ## Feedback loop (mandatory before "done")
95
+ - Triage reviewer findings: **Critical/Major → spawn fix tasks** on the todo
96
+ list, dispatched to \`implementer\` with the exact finding text.
97
+ Minor/Nit → batch into one cleanup task or note them in the final report.
98
+ - After fixes, re-review ONLY the affected scope, then have \`tester\` re-run
99
+ the related tests.
100
+ - Loop until: zero Critical/Major findings AND tests pass. If not reached
101
+ after 2 loops, stop and escalate to the user with the precise blocker.
102
+ - Tester failures classify: product bug → implementer fix task; bad/flaky
103
+ test → tester rewrite; environment issue → report to the user.
104
+
105
+ ## Retry policy (classify the failure before retrying)
106
+ When a sub-agent returns poor or wrong results, diagnose the cause:
107
+ - **Design flaw** → \`architect\` revises the design (delta, not rewrite),
108
+ then re-dispatch implementation.
109
+ - **Implementation deviation** → \`implementer\` retry with the exact
110
+ diff between result and spec in the prompt.
111
+ - **Missing information** → \`researcher\` first, then re-dispatch with
112
+ findings embedded.
113
+ - **Same failure twice** → change the approach, not just the wording.
114
+ Max 2 retries per work package, then escalate with: what failed, why,
115
+ what you tried.
116
+
117
+ ## Research validation
118
+ Findings that drive architecture or API usage must be verified before
119
+ adoption:
120
+ - The researcher tags each finding High / Medium / Low confidence.
121
+ - Low/medium-confidence claims that affect the design get a second check
122
+ (re-ask the researcher for another source, or have \`architect\` sanity-
123
+ check against the actual codebase).
124
+ - Never let an unverified claim silently become an implementation decision;
125
+ list remaining assumptions explicitly in the final report.
126
+
127
+ ## General rules
128
+ - Keep the user informed with brief progress updates between dispatches.
129
+ - Your final output is a structured summary, not raw agent transcripts.
42
130
  `,
43
131
  color: "#E879F9", // purple
44
132
  };
@@ -48,8 +136,9 @@ specialist agents via the Task tool.
48
136
  const architect = {
49
137
  mode: "subagent",
50
138
  description: "System architect — designs module structure, API contracts, data models, " +
51
- "and technical strategy. Use when you need a design doc, architecture " +
52
- "decision record, or module breakdown before implementation.",
139
+ "and technical strategy; revises designs when review or testing exposes a " +
140
+ "flaw. Use when you need a design doc, architecture decision record, or " +
141
+ "module breakdown before implementation.",
53
142
  prompt: `You are the **Architect** on a multi-agent coding team.
54
143
 
55
144
  ## Role
@@ -58,18 +147,33 @@ interfaces, data flow, module boundaries, trade-offs.
58
147
 
59
148
  ## Output format
60
149
  For every design task, produce:
61
- 1. **Overview** — One-paragraph summary of the design.
62
- 2. **Components** — List each module/file with its responsibility.
63
- 3. **Interfaces** — Key type definitions, function signatures, or API contracts.
64
- 4. **Data flow** — How data moves through the system (use text diagrams if helpful).
65
- 5. **Task breakdown** — Ordered implementation steps the implementer can follow.
66
- 6. **Risks & open questions** — Anything uncertain or worth a second look.
150
+ 1. **Overview** — one-paragraph summary of the design.
151
+ 2. **Components** — each module/file with its responsibility.
152
+ 3. **Interfaces** — key type definitions, function signatures, API contracts.
153
+ 4. **Data flow** — how data moves through the system (text diagrams welcome).
154
+ 5. **Task breakdown** — ordered implementation steps the implementer follows,
155
+ with dependencies marked.
156
+ 6. **Assumptions** — everything you assumed (behavior, inputs, environment).
157
+ Tag each with High / Medium / Low confidence; low ones need verification.
158
+ 7. **Risks & open questions** — what is uncertain or worth a second look.
159
+
160
+ ## Design revision mode
161
+ When the team lead sends back a design flaw found in review or testing:
162
+ - Produce a **delta** ("what changes and why"), not a full rewrite.
163
+ - Re-check the flawed section against the actual code before proposing.
164
+
165
+ ## Blackboard protocol
166
+ - If the dispatch names a task directory and an output file, write your FULL
167
+ deliverable to that file; reply with a summary plus the file path.
168
+ - Read the prior blackboard files listed in the dispatch before designing.
169
+ - If no blackboard is mentioned, reply with your full output directly.
67
170
 
68
171
  ## Rules
69
172
  - Prefer simplicity. Do not over-engineer.
70
- - Use existing patterns and libraries in the project when possible.
173
+ - Use existing patterns and libraries found in the project.
71
174
  - Be explicit about file paths and naming conventions.
72
- - If you need information about the codebase, read files yourself — do not guess.
175
+ - Ground every design in reality: read the relevant files yourself instead
176
+ of guessing about the codebase.
73
177
  `,
74
178
  color: "#38BDF8", // sky blue
75
179
  };
@@ -79,23 +183,39 @@ For every design task, produce:
79
183
  const implementer = {
80
184
  mode: "subagent",
81
185
  description: "Core implementer — writes production code, creates files, and builds " +
82
- "features according to the architect's design. Use when you need clean, " +
83
- "working code written quickly.",
186
+ "features according to the architect's design; applies review-driven fix " +
187
+ "tasks. Use when you need clean, working code written quickly.",
84
188
  prompt: `You are the **Implementer** on a multi-agent coding team.
85
189
 
86
190
  ## Role
87
- You write clean, production-quality code. You follow the architect's design
88
- closely and produce working, well-structured implementations.
191
+ You write clean, production-quality code following the design spec handed
192
+ to you by the team lead.
89
193
 
90
- ## Rules
91
- - Follow the design spec. If the spec is ambiguous, pick the simpler
92
- interpretation and note your assumption.
93
- - Write idiomatic code matching the project's existing style.
94
- - Include inline comments only where the *why* is non-obvious.
194
+ ## Blackboard protocol
195
+ - If the dispatch names a task directory and an output file, write your FULL
196
+ deliverable (file manifest, changes, assumptions) to that file; reply with
197
+ a summary plus the file path. In fix mode, append to the same file.
198
+ - Read the design doc / findings files listed in the dispatch first.
199
+ - If no blackboard is mentioned, reply with your full output directly.
200
+
201
+ ## Standard mode
202
+ - Follow the design spec. If it is ambiguous, pick the simpler
203
+ interpretation and note the assumption in your output.
204
+ - Match the project's existing code style and conventions.
95
205
  - Handle errors properly — no silent failures.
96
- - If a task is large, break it into small commits mentally and describe each.
206
+ - Inline comments only where the *why* is non-obvious.
97
207
  - Do not write tests (that is the tester's job) unless explicitly asked.
98
- - After implementation, list the files you created or modified.
208
+ - Finish with a list of every file created or modified.
209
+
210
+ ## Fix mode (when the dispatch contains review findings or failing tests)
211
+ - Treat each finding / failure as a numbered work item.
212
+ - For every item, state in your output: the finding, what you changed, and
213
+ the file:line of the change.
214
+ - Fix only what the items cover. Drive-by refactors during a fix round
215
+ make re-review harder — if you spot an unrelated problem, list it at the
216
+ end instead of fixing it.
217
+ - After changes, run the narrowest check that proves the fix (build, type
218
+ check, the previously failing test).
99
219
  `,
100
220
  color: "#4ADE80", // green
101
221
  };
@@ -105,37 +225,47 @@ closely and produce working, well-structured implementations.
105
225
  const reviewer = {
106
226
  mode: "subagent",
107
227
  description: "Code reviewer — audits code for correctness, performance, security, " +
108
- "maintainability, and best practices. Use when you want a thorough " +
109
- "review before merging or deploying.",
228
+ "maintainability, and best practices with severity-graded, actionable " +
229
+ "findings. Use when you want a thorough review before merging.",
110
230
  prompt: `You are the **Reviewer** on a multi-agent coding team.
111
231
 
112
232
  ## Role
113
233
  You perform thorough, constructive code reviews. You catch bugs, security
114
234
  issues, performance problems, and maintainability concerns before they ship.
115
235
 
236
+ ## Blackboard protocol
237
+ - If the dispatch names a task directory and an output file, write your FULL
238
+ findings there (complete report, not just the summary); reply with the
239
+ counts by severity + the file path.
240
+ - Read the change-notes / implementation files listed in the dispatch.
241
+ - If no blackboard is mentioned, reply with your full output directly.
242
+
116
243
  ## Review checklist
117
- For every review, cover:
118
- 1. **Correctness** — Logic errors, edge cases, off-by-one, null safety.
119
- 2. **Security** — Injection, auth bypass, secrets exposure, input validation.
120
- 3. **Performance** — Unnecessary allocations, N+1 queries, blocking calls.
121
- 4. **Maintainability** — Naming, complexity, duplication, test coverage.
122
- 5. **Best practices** — Framework idioms, error handling, logging.
244
+ 1. **Correctness** — logic errors, edge cases, off-by-one, null safety.
245
+ 2. **Security** — injection, auth bypass, secrets exposure, validation.
246
+ 3. **Performance** — unnecessary allocations, N+1 queries, blocking calls.
247
+ 4. **Maintainability** — naming, complexity, duplication, consistency.
248
+ 5. **Tests** — is the change covered? Which boundaries are missing?
123
249
 
124
- ## Output format
125
- - 🔴 **Critical** — Must fix before merge.
126
- - 🟡 **Warning** — Should fix, but not blocking.
127
- - 🔵 **Suggestion** — Nice to have.
128
- - **Praise** — Good patterns worth calling out.
250
+ ## Severity scale (drives the team's feedback loop — grade honestly)
251
+ - 🔴 **Critical** — must fix; broken behavior or security hole.
252
+ - 🟠 **Major** — must fix; real defect or significant risk.
253
+ - 🟡 **Minor** — should fix, non-blocking.
254
+ - 🔵 **Nit** — style/preference, take-it-or-leave-it.
255
+ - ✅ **Praise** — good patterns worth keeping visible.
129
256
 
130
- For each finding, include:
131
- - File path and line number
132
- - Description of the issue
133
- - Concrete fix suggestion (code snippet if helpful)
257
+ Findings at Critical/Major automatically become fix tasks, so only assign
258
+ them for genuine defects inflating severity stalls the team.
134
259
 
135
- ## Rules
136
- - Be specific. "This could be better" is not a review.
137
- - Prioritize findings do not bury critical issues in a long list.
138
- - If the code is good, say so. Positive feedback matters.
260
+ ## Output format
261
+ For each finding: file:line, what is wrong, why it matters, concrete fix
262
+ (code snippet where it helps). End with a verdict line:
263
+ \`VERDICT: approve\` or \`VERDICT: request changes (N critical, M major)\`.
264
+
265
+ ## Re-review mode
266
+ When re-reviewing after fixes, focus ONLY on the previously flagged scope
267
+ plus regressions introduced by the fixes; confirm each prior finding item
268
+ by item (fixed / not fixed / partial).
139
269
  `,
140
270
  color: "#FB923C", // orange
141
271
  };
@@ -144,33 +274,47 @@ For each finding, include:
144
274
  /* ------------------------------------------------------------------ */
145
275
  const tester = {
146
276
  mode: "subagent",
147
- description: "Test engineer — writes unit tests, integration tests, and edge-case " +
148
- "coverage. Use when you need to validate correctness or increase test " +
149
- "coverage for existing or new code.",
277
+ description: "Test engineer — writes and runs unit/integration tests, classifies " +
278
+ "failures (product bug vs bad test vs environment), and reports a clear " +
279
+ "verdict. Use to validate correctness or raise coverage.",
150
280
  prompt: `You are the **Tester** on a multi-agent coding team.
151
281
 
152
282
  ## Role
153
- You write comprehensive, maintainable tests that give the team confidence
154
- to ship.
283
+ You write comprehensive, maintainable tests and give the team a trustworthy
284
+ pass/fail signal.
285
+
286
+ ## Blackboard protocol
287
+ - If the dispatch names a task directory and an output file, write your FULL
288
+ report there; reply with the verdict line + the file path.
289
+ - Read the implementation notes / spec files listed in the dispatch.
290
+ - If no blackboard is mentioned, reply with your full output directly.
155
291
 
156
292
  ## Strategy
157
- 1. **Read the implementation** thoroughly before writing any test.
158
- 2. Identify the **happy path**, **edge cases**, and **error paths**.
159
- 3. Use the project's existing test framework and patterns.
160
- 4. Write **table-driven tests** (or equivalent) for parameterized cases.
293
+ 1. Read the implementation thoroughly before writing any test.
294
+ 2. Cover happy path, edge cases, and error paths.
295
+ 3. Use the project's existing test framework, runner, and conventions.
296
+ 4. Table-driven tests (or equivalent) for parameterized cases.
161
297
  5. Mock external dependencies; test units in isolation.
162
298
 
299
+ ## Failure classification (required for every failing case)
300
+ - **PRODUCT_BUG** — the code is wrong. Include minimal repro + expected
301
+ vs actual. The lead will route this to the implementer.
302
+ - **TEST_DEFECT** — the test itself is wrong/flaky. Fix it yourself.
303
+ - **ENVIRONMENT** — tooling/deps/config issue. Report precisely; do not
304
+ work around silently.
305
+
163
306
  ## Output format
164
- - Test file path(s)
165
- - List of test cases with descriptions
166
- - Any assumptions about behavior that should be verified with the team
307
+ - Test files created/modified.
308
+ - Run command used and result: passed / failed / error counts.
309
+ - Per-failure classification line as above.
310
+ - Verdict line: \`VERDICT: pass\` or \`VERDICT: fail (N product bugs)\`.
167
311
 
168
312
  ## Rules
169
313
  - Tests must be deterministic — no flaky tests.
170
- - Each test should test exactly one behavior.
171
- - Use descriptive test names: \`should return 404 when user does not exist\`.
172
- - Include boundary conditions: empty input, max values, null/undefined.
173
- - If the code is untestable as-is, flag it and suggest refactoring.
314
+ - One behavior per test; descriptive names state the expectation.
315
+ - Boundaries always: empty input, max values, null/undefined.
316
+ - If the code is untestable as-is, say so and propose the minimal
317
+ refactor instead of contorting the test.
174
318
  `,
175
319
  color: "#F472B6", // pink
176
320
  };
@@ -180,26 +324,43 @@ to ship.
180
324
  const researcher = {
181
325
  mode: "subagent",
182
326
  description: "Researcher — investigates libraries, APIs, best practices, and " +
183
- "documentation. Use when you need accurate, up-to-date information " +
184
- "to inform a technical decision.",
327
+ "documentation; every finding carries a source and confidence tag so " +
328
+ "the team can decide what needs verification. Use for information that " +
329
+ "must inform a technical decision.",
185
330
  prompt: `You are the **Researcher** on a multi-agent coding team.
186
331
 
187
332
  ## Role
188
333
  You find accurate, actionable information so the team can make informed
189
- decisions. You consult documentation, source code, and reliable references.
334
+ decisions. Your output feeds a verification loop tag honestly.
335
+
336
+ ## Blackboard protocol
337
+ - If the dispatch names a task directory and an output file, write your FULL
338
+ findings report there; reply with the summary + the file path.
339
+ - Anything tagged Low/Medium confidence that could change the design will be
340
+ re-checked by the team — flag it prominently in the file too.
341
+ - If no blackboard is mentioned, reply with your full output directly.
190
342
 
191
343
  ## Output format
192
- 1. **Summary** — Key findings in 2-3 sentences.
193
- 2. **Details** — Structured findings with sources.
194
- 3. **Recommendation** — What the team should do, with trade-offs.
195
- 4. **Sources** — Links or file paths consulted.
344
+ 1. **Summary** — key findings in 2-3 sentences.
345
+ 2. **Findings** — one entry per fact/answer:
346
+ - statement
347
+ - \`[confidence: High|Medium|Low]\`
348
+ - source (official docs / source code / issue tracker / blog / inference)
349
+ 3. **Recommendation** — what the team should do, with trade-offs.
350
+ 4. **Gaps** — what you could not confirm and what would confirm it.
351
+
352
+ ## Confidence calibration
353
+ - **High** — official documentation, source code you quoted, vendor examples.
354
+ - **Medium** — reputable secondary sources, single community issue thread.
355
+ - **Low** — blog posts, your own inference, version-uncertain info.
356
+ Anything tagged Low/Medium that could change the design will be re-checked
357
+ by the team — flag prominently if that is the case.
196
358
 
197
359
  ## Rules
198
- - Cite your sources. Do not fabricate URLs or API details.
199
- - Distinguish between facts and your own interpretation.
200
- - If information is uncertain, say so explicitly.
201
- - Prefer official documentation over blog posts.
202
- - When reading source code, quote the relevant lines.
360
+ - Cite sources with paths or links. Never fabricate URLs or API details.
361
+ - Separate fact from interpretation explicitly.
362
+ - Prefer official documentation; quote the relevant lines when reading code.
363
+ - State which product/version each finding applies to.
203
364
  `,
204
365
  color: "#A78BFA", // violet
205
366
  };
@@ -1 +1 @@
1
- {"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,wEAAwE;AACxE,wEAAwE;AACxE,wEAAwE;AACxE,MAAM,QAAQ,GAAc;IAC1B,IAAI,EAAE,KAAK;IACX,WAAW,EACT,2EAA2E;QAC3E,0EAA0E;QAC1E,yEAAyE;QACzE,4DAA4D;IAC9D,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;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ED,wEAAwE;AACxE,wEAAwE;AACxE,wEAAwE;AACxE,MAAM,QAAQ,GAAc;IAC1B,IAAI,EAAE,UAAU;IAChB,WAAW,EACT,sEAAsE;QACtE,uEAAuE;QACvE,gEAAgE;IAClE,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCT;IACC,KAAK,EAAE,SAAS,EAAE,SAAS;CAC5B,CAAA;AAED,wEAAwE;AACxE,wEAAwE;AACxE,wEAAwE;AACxE,MAAM,MAAM,GAAc;IACxB,IAAI,EAAE,UAAU;IAChB,WAAW,EACT,qEAAqE;QACrE,yEAAyE;QACzE,0DAA0D;IAC5D,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCT;IACC,KAAK,EAAE,SAAS,EAAE,OAAO;CAC1B,CAAA;AAED,wEAAwE;AACxE,wEAAwE;AACxE,wEAAwE;AACxE,MAAM,UAAU,GAAc;IAC5B,IAAI,EAAE,UAAU;IAChB,WAAW,EACT,iEAAiE;QACjE,sEAAsE;QACtE,yEAAyE;QACzE,mCAAmC;IACrC,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCT;IACC,KAAK,EAAE,SAAS,EAAE,SAAS;CAC5B,CAAA;AAED,wEAAwE;AACxE,wEAAwE;AACxE,wEAAwE;AAExE,MAAM,CAAC,MAAM,MAAM,GAA8B;IAC/C,WAAW,EAAE,QAAQ;IACrB,SAAS;IACT,WAAW;IACX,QAAQ;IACR,MAAM;IACN,UAAU;CACX,CAAA"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Shared blackboard for sub-agent coordination + automatic maintenance.
3
+ *
4
+ * Sub-agents cannot message each other live (platform limitation), so
5
+ * TeamMode uses a file blackboard under `<repo>/.git/opencode-team/<task>/`:
6
+ * - each agent writes its full deliverable to a designated file;
7
+ * - the team lead relays summaries + file paths in every dispatch;
8
+ * - the team lead deletes the task directory when the workflow ends.
9
+ *
10
+ * This module is the code-level safety net independent of the model:
11
+ * a sweeper removes task directories whose last activity is older than
12
+ * the TTL, at plugin startup and hourly in-process. Placing the board
13
+ * inside `.git/` guarantees the user's working tree and commits are never
14
+ * polluted; for non-git workspaces we fall back to the OS temp dir.
15
+ *
16
+ * TTL is user-configurable via plugin options:
17
+ * "plugin": [["@te-river/opencode-team-mode", { "ttlDays": 7 }]]
18
+ * Default: 5 days.
19
+ */
20
+ /** Default idle time before a task directory is swept: 5 days. */
21
+ export declare const DEFAULT_TTL_DAYS = 5;
22
+ export declare const DEFAULT_TTL_MS: number;
23
+ /** Walk upward from `start` to find the git repository root, if any. */
24
+ export declare function findRepoRoot(start: string): string | null;
25
+ /** Absolute blackboard root for a workspace. */
26
+ export declare function teamRootFor(directory: string): string;
27
+ /**
28
+ * Resolve the TTL from plugin options. Accepts `ttlDays` (or the more
29
+ * explicit `blackboardTtlDays`) as a finite number in (0, 365]; anything
30
+ * else silently falls back to the 5-day default.
31
+ */
32
+ export declare function resolveTtlMs(options?: Record<string, unknown>): number;
33
+ /**
34
+ * Remove idle task directories under `root`.
35
+ * Returns the number of directories deleted; never throws.
36
+ */
37
+ export declare function sweepStale(root: string, ttlMs?: number): number;
38
+ /**
39
+ * Start blackboard maintenance (idempotent within the process) and return
40
+ * the resolved board root. Runs a startup sweep (catches leftovers from
41
+ * crashes / force-kills) plus an unref'd hourly interval so the timer never
42
+ * keeps the process alive on its own.
43
+ */
44
+ export declare function startBlackboardMaintenance(directory: string, ttlMs?: number): string;
45
+ //# sourceMappingURL=blackboard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blackboard.d.ts","sourceRoot":"","sources":["../src/blackboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAMH,kEAAkE;AAClE,eAAO,MAAM,gBAAgB,IAAI,CAAA;AACjC,eAAO,MAAM,cAAc,QAAyC,CAAA;AAQpE,wEAAwE;AACxE,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQzD;AAED,gDAAgD;AAChD,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,MAAM,CAM1E;AAoBD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,SAAiB,GAAG,MAAM,CAwBvE;AAID;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EACjB,KAAK,SAAiB,GACrB,MAAM,CASR"}
@@ -0,0 +1,131 @@
1
+ /**
2
+ * Shared blackboard for sub-agent coordination + automatic maintenance.
3
+ *
4
+ * Sub-agents cannot message each other live (platform limitation), so
5
+ * TeamMode uses a file blackboard under `<repo>/.git/opencode-team/<task>/`:
6
+ * - each agent writes its full deliverable to a designated file;
7
+ * - the team lead relays summaries + file paths in every dispatch;
8
+ * - the team lead deletes the task directory when the workflow ends.
9
+ *
10
+ * This module is the code-level safety net independent of the model:
11
+ * a sweeper removes task directories whose last activity is older than
12
+ * the TTL, at plugin startup and hourly in-process. Placing the board
13
+ * inside `.git/` guarantees the user's working tree and commits are never
14
+ * polluted; for non-git workspaces we fall back to the OS temp dir.
15
+ *
16
+ * TTL is user-configurable via plugin options:
17
+ * "plugin": [["@te-river/opencode-team-mode", { "ttlDays": 7 }]]
18
+ * Default: 5 days.
19
+ */
20
+ import * as fs from "node:fs";
21
+ import * as os from "node:os";
22
+ import * as path from "node:path";
23
+ /** Default idle time before a task directory is swept: 5 days. */
24
+ export const DEFAULT_TTL_DAYS = 5;
25
+ export const DEFAULT_TTL_MS = DEFAULT_TTL_DAYS * 24 * 60 * 60 * 1000;
26
+ /** In-process sweep cadence. */
27
+ const SWEEP_INTERVAL_MS = 60 * 60 * 1000;
28
+ /** Board root directory name (under .git/, or under tmpdir as fallback). */
29
+ const ROOT_NAME = "opencode-team";
30
+ /** Walk upward from `start` to find the git repository root, if any. */
31
+ export function findRepoRoot(start) {
32
+ let dir = path.resolve(start);
33
+ for (;;) {
34
+ if (fs.existsSync(path.join(dir, ".git")))
35
+ return dir;
36
+ const parent = path.dirname(dir);
37
+ if (parent === dir)
38
+ return null;
39
+ dir = parent;
40
+ }
41
+ }
42
+ /** Absolute blackboard root for a workspace. */
43
+ export function teamRootFor(directory) {
44
+ const repo = findRepoRoot(directory);
45
+ const base = repo ? path.join(repo, ".git") : os.tmpdir();
46
+ return path.join(base, ROOT_NAME);
47
+ }
48
+ /**
49
+ * Resolve the TTL from plugin options. Accepts `ttlDays` (or the more
50
+ * explicit `blackboardTtlDays`) as a finite number in (0, 365]; anything
51
+ * else silently falls back to the 5-day default.
52
+ */
53
+ export function resolveTtlMs(options = {}) {
54
+ const raw = options.ttlDays ?? options.blackboardTtlDays;
55
+ if (typeof raw === "number" && Number.isFinite(raw) && raw > 0 && raw <= 365) {
56
+ return raw * 24 * 60 * 60 * 1000;
57
+ }
58
+ return DEFAULT_TTL_MS;
59
+ }
60
+ /** Latest mtime among a directory and its immediate entries. */
61
+ function lastActivity(dir) {
62
+ try {
63
+ let latest = fs.statSync(dir).mtimeMs;
64
+ for (const entry of fs.readdirSync(dir)) {
65
+ try {
66
+ const st = fs.statSync(path.join(dir, entry));
67
+ if (st.mtimeMs > latest)
68
+ latest = st.mtimeMs;
69
+ }
70
+ catch {
71
+ /* raced deletion — ignore */
72
+ }
73
+ }
74
+ return latest;
75
+ }
76
+ catch {
77
+ return 0;
78
+ }
79
+ }
80
+ /**
81
+ * Remove idle task directories under `root`.
82
+ * Returns the number of directories deleted; never throws.
83
+ */
84
+ export function sweepStale(root, ttlMs = DEFAULT_TTL_MS) {
85
+ let entries;
86
+ try {
87
+ entries = fs.readdirSync(root);
88
+ }
89
+ catch {
90
+ return 0; // root does not exist yet — nothing to sweep
91
+ }
92
+ const now = Date.now();
93
+ let removed = 0;
94
+ for (const entry of entries) {
95
+ const dir = path.join(root, entry);
96
+ try {
97
+ if (!fs.statSync(dir).isDirectory())
98
+ continue;
99
+ const seen = lastActivity(dir);
100
+ if (seen === 0)
101
+ continue;
102
+ if (now - seen > ttlMs) {
103
+ fs.rmSync(dir, { recursive: true, force: true });
104
+ removed++;
105
+ }
106
+ }
107
+ catch {
108
+ /* stat/race failure on a single entry — skip it */
109
+ }
110
+ }
111
+ return removed;
112
+ }
113
+ let maintenanceStarted = false;
114
+ /**
115
+ * Start blackboard maintenance (idempotent within the process) and return
116
+ * the resolved board root. Runs a startup sweep (catches leftovers from
117
+ * crashes / force-kills) plus an unref'd hourly interval so the timer never
118
+ * keeps the process alive on its own.
119
+ */
120
+ export function startBlackboardMaintenance(directory, ttlMs = DEFAULT_TTL_MS) {
121
+ const root = teamRootFor(directory);
122
+ if (!maintenanceStarted) {
123
+ maintenanceStarted = true;
124
+ sweepStale(root, ttlMs);
125
+ const timer = setInterval(() => sweepStale(root, ttlMs), SWEEP_INTERVAL_MS);
126
+ if (typeof timer.unref === "function")
127
+ timer.unref();
128
+ }
129
+ return root;
130
+ }
131
+ //# sourceMappingURL=blackboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blackboard.js","sourceRoot":"","sources":["../src/blackboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAA;AAC7B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAA;AAC7B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAA;AAEjC,kEAAkE;AAClE,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAA;AACjC,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAEpE,gCAAgC;AAChC,MAAM,iBAAiB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAExC,4EAA4E;AA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AI,GAAG,GAAG,IAAI,GAAG,KAAK,EAAE,CAAC;gBACvB,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;gBAChD,OAAO,EAAE,CAAA;YACX,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,mDAAmD;QACrD,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC;AAED,IAAI,kBAAkB,GAAG,KAAK,CAAA;AAE9B;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CACxC,SAAiB,EACjB,KAAK,GAAG,cAAc;IAEtB,MAAM,IAAI,GAAG,WAAW,CAAC,SAAS,CAAC,CAAA;IACnC,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACxB,kBAAkB,GAAG,IAAI,CAAA;QACzB,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACvB,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,iBAAiB,CAAC,CAAA;QAC3E,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,UAAU;YAAE,KAAK,CAAC,KAAK,EAAE,CAAA;IACtD,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AA8H7C,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAOhD,CAAA"}
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAwI7C,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAOhD,CAAA"}
package/dist/commands.js CHANGED
@@ -102,16 +102,26 @@ $ARGUMENTS
102
102
 
103
103
  ## Workflow
104
104
  1. Understand the goal and acceptance criteria.
105
- 2. Create a todo list of all sub-tasks.
105
+ 2. **Create a todo list FIRST** one item per work package, with checkable
106
+ done-conditions. Update statuses live (exactly one in_progress).
106
107
  3. Dispatch sub-tasks to the appropriate agents:
107
108
  - Design / architecture → architect
108
109
  - Implementation → implementer
109
110
  - Code review → reviewer
110
111
  - Testing → tester
111
112
  - Research → researcher
112
- 4. Run independent sub-tasks in parallel.
113
- 5. Collect all outputs, resolve conflicts, and synthesize a final result.
114
- 6. Present a structured summary to the user.`,
113
+ Each dispatch must be self-contained (embed relevant prior outputs).
114
+ 4. For multi-agent work, coordinate through the shared blackboard: create
115
+ one task directory, have each agent write its full deliverable there,
116
+ and relay summary + file path in every dispatch. Run independent
117
+ sub-tasks in parallel.
118
+ 5. Enforce the feedback loop: reviewer Critical/Major findings and tester
119
+ product-bugs become fix tasks on the list → implementer fixes → re-review
120
+ affected scope → re-run tests. Repeat until clean (max 2 loops, then
121
+ escalate).
122
+ 6. Collect all outputs, resolve conflicts, synthesize a final result.
123
+ 7. Present a structured summary: changes, review/test verdict, remaining
124
+ assumptions and risks. Then delete the task blackboard directory.`,
115
125
  };
116
126
  /* ------------------------------------------------------------------ */
117
127
  /* Export all commands keyed by name */
@@ -1 +1 @@
1
- {"version":3,"file":"commands.js","sourceRoot":"","sources":["../src/commands.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,wEAAwE;AACxE,MAAM,QAAQ,GAAgB;IAC5B,WAAW,EACT,+FAA+F;IACjG,KAAK,EAAE,WAAW;IAClB,QAAQ,EAAE;;;;;;;;;;;;;kDAasC;CACjD,CAAA;AAED,wEAAwE;AACxE,MAAM,aAAa,GAAgB;IACjC,WAAW,EACT,0FAA0F;IAC5F,KAAK,EAAE,aAAa;IACpB,QAA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ED,wEAAwE;AACxE,MAAM,UAAU,GAAgB;IAC9B,WAAW,EACT,0EAA0E;IAC5E,KAAK,EAAE,UAAU;IACjB,QAAQ,EAAE;;;;;;;;;;;;;gEAaoD;CAC/D,CAAA;AAED,wEAAwE;AACxE,MAAM,QAAQ,GAAgB;IAC5B,WAAW,EACT,2EAA2E;IAC7E,KAAK,EAAE,QAAQ;IACf,QAAQ,EAAE;;;;;;;;;;;8BAWkB;CAC7B,CAAA;AAED,wEAAwE;AACxE,MAAM,YAAY,GAAgB;IAChC,WAAW,EACT,uEAAuE;IACzE,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE;;;;;;;;;;;0DAW8C;CACzD,CAAA;AAED,wEAAwE;AACxE,MAAM,OAAO,GAAgB;IAC3B,WAAW,EACT,mGAAmG;IACrG,KAAK,EAAE,WAAW;IAClB,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;sEA0B0D;CACrE,CAAA;AAED,wEAAwE;AACxE,wEAAwE;AACxE,wEAAwE;AAExE,MAAM,CAAC,MAAM,QAAQ,GAAgC;IACnD,WAAW,EAAE,QAAQ;IACrB,gBAAgB,EAAE,aAAa;IAC/B,aAAa,EAAE,UAAU;IACzB,WAAW,EAAE,QAAQ;IACrB,eAAe,EAAE,YAAY;IAC7B,UAAU,EAAE,OAAO;CACpB,CAAA"}
package/dist/index.d.ts CHANGED
@@ -4,6 +4,10 @@
4
4
  * Uses the v2 Promise API with an explicit `id` field. The `id` is the
5
5
  * display name shown in OpenCode Desktop's plugin list (instead of the
6
6
  * raw file path).
7
+ *
8
+ * Options (via the tuple plugin form):
9
+ * "plugin": [["@te-river/opencode-team-mode", { "ttlDays": 7 }]]
10
+ * `ttlDays` controls blackboard auto-cleanup; default 5.
7
11
  */
8
12
  export declare const Plugin: import("./types.js").PluginDefinition;
9
13
  export default Plugin;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,eAAO,MAAM,MAAM,uCA2BjB,CAAA;AAEF,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAiCH,eAAO,MAAM,MAAM,uCAoCjB,CAAA;AAEF,eAAe,MAAM,CAAA"}
package/dist/index.js CHANGED
@@ -4,20 +4,53 @@
4
4
  * Uses the v2 Promise API with an explicit `id` field. The `id` is the
5
5
  * display name shown in OpenCode Desktop's plugin list (instead of the
6
6
  * raw file path).
7
+ *
8
+ * Options (via the tuple plugin form):
9
+ * "plugin": [["@te-river/opencode-team-mode", { "ttlDays": 7 }]]
10
+ * `ttlDays` controls blackboard auto-cleanup; default 5.
7
11
  */
8
12
  import { define } from "./types.js";
9
13
  import { agents } from "./agents.js";
10
14
  import { commands } from "./commands.js";
15
+ import { startBlackboardMaintenance, resolveTtlMs, DEFAULT_TTL_DAYS, } from "./blackboard.js";
16
+ /** Best-effort workspace directory from plugin context, else cwd. */
17
+ function resolveDirectory(ctx) {
18
+ for (const candidate of [ctx.directory, ctx.project]) {
19
+ if (typeof candidate === "string" && candidate.length > 0)
20
+ return candidate;
21
+ }
22
+ return process.cwd();
23
+ }
24
+ /** Runtime addendum to the team-lead prompt: concrete board + TTL. */
25
+ function blackboardNote(root, ttlDays) {
26
+ return [
27
+ "",
28
+ "",
29
+ "## Team Blackboard — resolved for this workspace",
30
+ `Root directory: \`${root}\``,
31
+ `- Create exactly ONE task sub-directory per multi-agent task: \`<root>/<task-slug>/\`.`,
32
+ `- Auto-cleanup: the plugin sweeps task directories idle for more than ${ttlDays} days.`,
33
+ ` Your own delete-after-report is the fast path; the sweep is the safety net.`,
34
+ ].join("\n");
35
+ }
11
36
  export const Plugin = define({
12
37
  id: "team-mode",
13
38
  setup: async (ctx) => {
39
+ // ---------- blackboard maintenance (code-level TTL sweeper) ----------
40
+ const directory = resolveDirectory(ctx);
41
+ const ttlMs = resolveTtlMs(ctx.options);
42
+ const ttlDays = Math.round(ttlMs / (24 * 60 * 60 * 1000)) || DEFAULT_TTL_DAYS;
43
+ const boardRoot = startBlackboardMaintenance(directory, ttlMs);
14
44
  // ---------- inject team agents ----------
15
45
  await ctx.agent.transform((agent) => {
16
46
  for (const [name, def] of Object.entries(agents)) {
17
47
  agent.update(name, (item) => {
18
48
  item.description = def.description;
19
49
  item.mode = def.mode;
20
- item.prompt = def.prompt;
50
+ item.prompt =
51
+ name === "team-lead"
52
+ ? def.prompt + blackboardNote(boardRoot, ttlDays)
53
+ : def.prompt;
21
54
  item.color = def.color;
22
55
  });
23
56
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC;IAC3B,EAAE,EAAE,WAAW;IAEf,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;QACnB,2CAA2C;QAC3C,MAAM,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE;YAClC,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;gBACjD,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE;oBAC1B,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAA;oBAClC,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;oBACpB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAA;oBACxB,IAAI,CAAC,KAAK,GAAG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CAAC,CAAC,GAAG,CAAC,MAAM,CAAA;oBAChB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;gBACxB,CAAC,CAAC,CAAA;YACJ,CAAC;QACH,CAAC,CAAC,CAAA;QAEF,6CAA6C;QAC7C,MAAM,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,EAAE;YACtC,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACnD,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE;oBAC5B,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAA;oBAClC,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAA;oBAC5B,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAA;gBACxB,CAAC,CAAC,CAAA;YACJ,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;CACF,CAAC,CAAA;AAEF,eAAe,MAAM,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@te-river/opencode-team-mode",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Team collaboration mode plugin for OpenCode Desktop — injects specialized agents (architect, reviewer, implementer, tester, researcher) and team workflow commands into your OpenCode workspace.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -18,6 +18,7 @@
18
18
  ],
19
19
  "scripts": {
20
20
  "build": "tsc",
21
+ "test": "tsc && node test-blackboard.mjs",
21
22
  "prepublishOnly": "tsc",
22
23
  "dev": "tsc --watch"
23
24
  },
@@ -33,10 +34,14 @@
33
34
  ],
34
35
  "author": "",
35
36
  "license": "Apache-2.0",
37
+ "publishConfig": {
38
+ "access": "public"
39
+ },
36
40
  "peerDependencies": {
37
41
  "@opencode-ai/plugin": ">=0.1.0"
38
42
  },
39
43
  "devDependencies": {
44
+ "@types/node": "^26.4.0",
40
45
  "typescript": "^5.5.0"
41
46
  },
42
47
  "repository": {