@te-river/opencode-team-mode 1.5.6 → 1.5.8

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 (77) hide show
  1. package/README.md +354 -528
  2. package/README.zh-CN.md +346 -480
  3. package/dist/agents.d.ts.map +1 -1
  4. package/dist/agents.js +44 -26
  5. package/dist/agents.js.map +1 -1
  6. package/dist/approval-gate.d.ts +5 -0
  7. package/dist/approval-gate.d.ts.map +1 -1
  8. package/dist/approval-gate.js +29 -0
  9. package/dist/approval-gate.js.map +1 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +27 -0
  12. package/dist/index.js.map +1 -1
  13. package/dist/prompts/lead.d.ts +1 -1
  14. package/dist/prompts/lead.d.ts.map +1 -1
  15. package/dist/prompts/lead.js +7 -4
  16. package/dist/prompts/lead.js.map +1 -1
  17. package/dist/prompts/shared.d.ts +1 -1
  18. package/dist/prompts/shared.d.ts.map +1 -1
  19. package/dist/prompts/shared.js +15 -13
  20. package/dist/prompts/shared.js.map +1 -1
  21. package/dist/prompts/specialists.d.ts +2 -2
  22. package/dist/prompts/specialists.d.ts.map +1 -1
  23. package/dist/prompts/specialists.js +31 -5
  24. package/dist/prompts/specialists.js.map +1 -1
  25. package/dist/tm/args-schema.d.ts +6 -0
  26. package/dist/tm/args-schema.d.ts.map +1 -1
  27. package/dist/tm/args-schema.js +23 -1
  28. package/dist/tm/args-schema.js.map +1 -1
  29. package/dist/tm/browser.d.ts.map +1 -1
  30. package/dist/tm/browser.js +35 -6
  31. package/dist/tm/browser.js.map +1 -1
  32. package/dist/tm/config.d.ts +16 -5
  33. package/dist/tm/config.d.ts.map +1 -1
  34. package/dist/tm/config.js +23 -6
  35. package/dist/tm/config.js.map +1 -1
  36. package/dist/tm/index.d.ts +11 -4
  37. package/dist/tm/index.d.ts.map +1 -1
  38. package/dist/tm/index.js +20 -6
  39. package/dist/tm/index.js.map +1 -1
  40. package/dist/tm/memory.d.ts +8 -2
  41. package/dist/tm/memory.d.ts.map +1 -1
  42. package/dist/tm/memory.js +31 -21
  43. package/dist/tm/memory.js.map +1 -1
  44. package/dist/tm/perm-ask.d.ts +37 -0
  45. package/dist/tm/perm-ask.d.ts.map +1 -0
  46. package/dist/tm/perm-ask.js +41 -0
  47. package/dist/tm/perm-ask.js.map +1 -0
  48. package/dist/tm/pipelines.d.ts.map +1 -1
  49. package/dist/tm/pipelines.js +7 -0
  50. package/dist/tm/pipelines.js.map +1 -1
  51. package/dist/tm/preview.d.ts.map +1 -1
  52. package/dist/tm/preview.js +32 -5
  53. package/dist/tm/preview.js.map +1 -1
  54. package/dist/tm/ptc/gate.d.ts.map +1 -1
  55. package/dist/tm/ptc/gate.js +4 -1
  56. package/dist/tm/ptc/gate.js.map +1 -1
  57. package/dist/tm/ptc/summary.d.ts.map +1 -1
  58. package/dist/tm/ptc/summary.js +5 -0
  59. package/dist/tm/ptc/summary.js.map +1 -1
  60. package/dist/tm/ptc/tool.d.ts.map +1 -1
  61. package/dist/tm/ptc/tool.js +2 -1
  62. package/dist/tm/ptc/tool.js.map +1 -1
  63. package/dist/tm/search.d.ts +58 -0
  64. package/dist/tm/search.d.ts.map +1 -0
  65. package/dist/tm/search.js +253 -0
  66. package/dist/tm/search.js.map +1 -0
  67. package/dist/tm/shell-bridge.d.ts +1 -1
  68. package/dist/tm/shell-bridge.d.ts.map +1 -1
  69. package/dist/tm/shell-bridge.js +52 -6
  70. package/dist/tm/shell-bridge.js.map +1 -1
  71. package/dist/tm/tools.js +1 -1
  72. package/dist/tm/webfetch.d.ts +36 -8
  73. package/dist/tm/webfetch.d.ts.map +1 -1
  74. package/dist/tm/webfetch.js +144 -23
  75. package/dist/tm/webfetch.js.map +1 -1
  76. package/docs/installation.md +219 -0
  77. package/package.json +3 -2
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,YAAY,CAAA;AA4P9D,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAO9C,CAAA"}
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,YAAY,CAAA;AA+Q9D,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAO9C,CAAA"}
package/dist/agents.js CHANGED
@@ -106,11 +106,12 @@ const whitelist = (...granted) => {
106
106
  for (const tool of TM_TOOLS)
107
107
  permission[tool] = "allow";
108
108
  permission["tm_*"] = "allow";
109
- // Governed web channels (tm_webfetch + tm_browser) — default DENY for
110
- // every agent; the explicit keys override the tm_* wildcard.
111
- // applyNetworkPermission grants them back to the lead + researcher only
112
- // (network capability is a two-role grant).
109
+ // Governed web channels (tm_webfetch / tm_search / tm_browser) — default
110
+ // DENY for every agent; the explicit keys override the tm_* wildcard.
111
+ // applyNetworkPermission grants the FULL set to the lead + researcher
112
+ // and tm_browser alone to the tester (UI verification).
113
113
  permission["tm_webfetch"] = "deny";
114
+ permission["tm_search"] = "deny";
114
115
  permission["tm_browser"] = "deny";
115
116
  return permission;
116
117
  };
@@ -119,13 +120,25 @@ const whitelist = (...granted) => {
119
120
  function applyPtcPermission(permission, _isTeamLead) {
120
121
  permission[PTC_TOOL] = "allow";
121
122
  }
122
- /** Apply the network grant: ONLY the team lead and the researcher carry
123
- * the governed web channels (tm_webfetch + tm_browser — explicit allow
124
- * overrides the tm_* wildcard); architect / implementer / reviewer /
125
- * tester keep the whitelist deny. */
126
- function applyNetworkPermission(permission, isWebRole) {
127
- permission["tm_webfetch"] = isWebRole ? "allow" : "deny";
128
- permission["tm_browser"] = isWebRole ? "allow" : "deny";
123
+ /** Ask-map rules verified against the live host (1.18.30 asar probe):
124
+ * PermissionV2.evaluate uses findLast over the flat ruleset, so the
125
+ * explicit {"*": "ask"} rule registered here BEATS the later-matching
126
+ * tm_* wildcard allow — without it, ctx.ask would resolve silently (the
127
+ * tm_* allow rule matches every tm_* permission) and the official dialog
128
+ * would never pop for out-of-allowlist targets. The tools' own allowlist
129
+ * short-circuit keeps seeded hosts dialog-free: ctx.ask is only called for
130
+ * out-of-allowlist targets, where the dialog MUST decide. */
131
+ const WEB_ASK_MAP = { "*": "ask" };
132
+ /** Apply the network grant: the team lead and the researcher carry the
133
+ * FULL governed web channels (tm_webfetch / tm_search / tm_browser — the
134
+ * ask-map overrides the tm_* wildcard so out-of-allowlist targets pop the
135
+ * official dialog); the TESTER carries tm_browser ONLY (governed UI
136
+ * verification — no open web fetching); architect / implementer /
137
+ * reviewer keep the whitelist deny. */
138
+ function applyNetworkPermission(permission, isWebRole, isTester = false) {
139
+ permission["tm_webfetch"] = isWebRole ? { ...WEB_ASK_MAP } : "deny";
140
+ permission["tm_search"] = isWebRole ? { ...WEB_ASK_MAP } : "deny";
141
+ permission["tm_browser"] = isWebRole || isTester ? { ...WEB_ASK_MAP } : "deny";
129
142
  }
130
143
  /* ------------------------------------------------------------------ */
131
144
  /* Agent definitions */
@@ -140,7 +153,7 @@ const teamLead = {
140
153
  "different expertise areas.",
141
154
  prompt: TEAM_LEAD_PROMPT,
142
155
  color: "#E879F9", // purple
143
- // Whitelist: tm_* x4 + tm_ptc_run + tm_webfetch + tm_browser (the lead is
156
+ // Whitelist: tm_* x4 + tm_ptc_run + tm_webfetch/tm_search/tm_browser (the lead is
144
157
  // a network role) + task dispatch + edit (<=10-line non-product edits) +
145
158
  // write (board files) + bash (discovery-gate probes) + todowrite + question
146
159
  // (the lead's TodoList discipline and batched blocking questions are
@@ -198,13 +211,16 @@ const tester = {
198
211
  mode: "subagent",
199
212
  description: "Test engineer — writes and runs unit/integration tests, classifies " +
200
213
  "failures (product bug vs bad test vs environment), verifies via build, " +
201
- "typecheck, static analysis and API-level tests, and reports a clear " +
202
- "verdict. Use to validate correctness or raise coverage.",
214
+ "typecheck, static analysis and API-level tests, verifies user-visible " +
215
+ "frontend changes through the governed tm_browser (UI verification of " +
216
+ "this project only), and reports a clear verdict. Use to validate " +
217
+ "correctness or raise coverage.",
203
218
  prompt: TESTER_PROMPT,
204
219
  color: "#F472B6", // pink
205
220
  // Whitelist: tm_* x4 + edit/write (test files) + bash (the whole
206
- // verification stack: build / typecheck / lint / test runs);
207
- // tm_webfetch DENIED (not a network role).
221
+ // verification stack: build / typecheck / lint / test runs).
222
+ // tm_browser granted for governed UI verification; tm_webfetch / tm_search
223
+ // DENIED (open web lookups stay with the lead + researcher).
208
224
  permission: whitelist("edit", "write", "bash"),
209
225
  temperature: 0.2,
210
226
  };
@@ -213,17 +229,18 @@ const researcher = {
213
229
  description: "Researcher — investigates the local repository (code, configs, " +
214
230
  "installed/vendored packages, shipped documentation) and, when local " +
215
231
  "sources are insufficient, the web via the priority ladder: governed " +
216
- "tm_browser / tm_webfetch first, user-configured MCP tools second. " +
217
- "Every finding carries a source (file:line or URL) and a confidence " +
218
- "tag so the team can decide what needs verification. Use for " +
219
- "information that must inform a technical decision.",
232
+ "tm_search / tm_browser / tm_webfetch first, user-configured MCP tools " +
233
+ "second. Every finding carries a source (file:line or URL) and a " +
234
+ "confidence tag so the team can decide what needs verification. Use " +
235
+ "for information that must inform a technical decision.",
220
236
  prompt: RESEARCHER_PROMPT,
221
237
  color: "#A78BFA", // violet
222
- // Whitelist: tm_* x4 + tm_webfetch (the researcher is a network role).
223
- // The built-in webfetch/websearch tools stay removed — web lookups ride
224
- // user-configured MCP tools (preferred) or the governed tm_webfetch
225
- // (domain-allowlisted, threshold-offloaded). No bash / no execution
226
- // rights is intentional trimming — local research reads, it does not run.
238
+ // Whitelist: tm_* x4 + tm_webfetch / tm_search / tm_browser (the
239
+ // researcher is a network role). The built-in webfetch/websearch tools
240
+ // stay removed — web lookups ride user-configured MCP tools (preferred)
241
+ // or the governed tm_* web channels (allowlisted, threshold-offloaded).
242
+ // No bash / no execution rights is intentional trimming — local research
243
+ // reads, it does not run.
227
244
  permission: whitelist(),
228
245
  temperature: 0.2,
229
246
  };
@@ -242,7 +259,8 @@ if (teamLead.permission) {
242
259
  for (const a of [architect, implementer, reviewer, tester, researcher]) {
243
260
  if (a.permission) {
244
261
  applyPtcPermission(a.permission, false);
245
- applyNetworkPermission(a.permission, a === researcher);
262
+ // tester: tm_browser only (UI verification); researcher: full web grant
263
+ applyNetworkPermission(a.permission, a === researcher, a === tester);
246
264
  }
247
265
  }
248
266
  /* ------------------------------------------------------------------ */
@@ -1 +1 @@
1
- {"version":3,"file":"agents.js","sourceRoot":"","sources":["../src/agents.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,aAAa,GACd,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAElE,wEAAwE;AACxE,sEAAsE;AACtE,wEAAwE;AACxE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,aAAa,GAAG;IACpB,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,aAAa;IACb,UAAU;IACV,WAAW;IACX,WAAW;IACX,KAAK;IACL,OAAO;IACP,UAAU;CACF,CAAA;AAEV;;;;;4DAK4D;AAC5D,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,CAAU,CAAA;AAE3F;;;0DAG0D;AAC1D,MAAM,QAAQ,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAU,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E,SAAS,EAAE,SAAS;IAC3B,iEAAiE;IACjE,wEAAwE;IACxE,wEAAwE;IACxE,wEAAwE;IACxE,yEAAyE;IACzE,0BAA0B;IAC1B,UAAU,EAAE,SAAS,EAAE;IACvB,WAAW,EAAE,GAAG;CACjB,CAAA;AAED,4EAA4E;AAC5E,KAAK,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC;IACvE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,GAAG,cAAc,GAAG,YAAY,CAAA;AAC7D,CAAC;AAED;;;qBAGqB;AACrB,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC;IACxB,kBAAkB,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;IAC7C,sBAAsB,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;AACnD,CAAC;AACD,KAAK,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC;IACvE,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;QACjB,kBAAkB,CAAC,CAAC,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;QACvC,wEAAwE;QACxE,sBAAsB,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,KAAK,UAAU,EAAE,CAAC,KAAK,MAAM,CAAC,CAAA;IACtE,CAAC;AACH,CAAC;AAED,wEAAwE;AACxE,yEAAyE;AACzE,wEAAwE;AAExE,MAAM,CAAC,MAAM,MAAM,GAAgC;IACjD,MAAM,EAAE,QAAQ;IAChB,SAAS;IACT,WAAW;IACX,QAAQ;IACR,MAAM;IACN,UAAU;CACX,CAAA"}
@@ -99,6 +99,11 @@ export interface ApprovalGateDeps {
99
99
  timers?: GateTimers;
100
100
  /** Injectable clock (default: Date.now) for deterministic window tests. */
101
101
  now?: () => number;
102
+ /** Best-effort attention hook — fired on EVERY permission.asked (all
103
+ * dialogs: bash R2/R6 asks AND the tm_* ctx.ask web dialogs) so a user
104
+ * not staring at the screen learns a confirmation is waiting. index.ts
105
+ * wires this to the host's `tui.showToast`. Never throws into the gate. */
106
+ notify?: (message: string) => void;
102
107
  }
103
108
  export interface ApprovalGate {
104
109
  /** Handle one host event (permission.asked/updated / permission.replied). */
@@ -1 +1 @@
1
- {"version":3,"file":"approval-gate.d.ts","sourceRoot":"","sources":["../src/approval-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAGjD,iFAAiF;AACjF,eAAO,MAAM,uBAAuB,KAAK,CAAA;AAEzC;;;;;;;;;GASG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAA;AAiBpC;0DAC0D;AAC1D,MAAM,MAAM,eAAe,GACvB,KAAK,GACL,cAAc,GACd,gBAAgB,GAChB,UAAU,GACV,kBAAkB,GAClB,UAAU,CAAA;AAEd;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,GAAG,MAAM,CAQjG;AAED,KAAK,WAAW,GAAG,OAAO,CAAA;AAE1B,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,KAAK,WAAW,CAAA;IACzD,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAA;CAC9C;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,OAAO,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,2EAA2E;IAC3E,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IACH,iBAAiB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3C;uFACmF;IACnF,aAAa,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAC1C,gFAAgF;IAChF,WAAW,IAAI,MAAM,CAAA;CACtB;AA6GD;;qEAEqE;AACrE,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAErE;AAgBD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,YAAY,CA+QvE"}
@@ -232,6 +232,7 @@ export function createApprovalGate(deps) {
232
232
  clearTimeoutFn: (h) => clearTimeout(h),
233
233
  };
234
234
  const nowMs = deps.now ?? (() => Date.now());
235
+ const notify = deps.notify;
235
236
  const reply = replyCapableFn(client);
236
237
  const list = listCapableFn(client);
237
238
  const pending = new Map();
@@ -360,7 +361,35 @@ export function createApprovalGate(deps) {
360
361
  });
361
362
  }, POLL_INTERVAL_MS);
362
363
  }
364
+ /** Toasted request ids (cap-bounded) — duplicate `asked` replays for one
365
+ * dialog must not spam notifications. */
366
+ const notified = new Set();
363
367
  function onAsked(props) {
368
+ // attention hook FIRST, for EVERY dialog (not just our categorized asks):
369
+ // the user asked to be notified wherever a confirmation window pops
370
+ const id = str(props.id, props.permissionID, props.requestID);
371
+ if (notify) {
372
+ if (!id || !notified.has(id)) {
373
+ if (id) {
374
+ notified.add(id);
375
+ if (notified.size > 256) {
376
+ // keep the set bounded; ids are tombstoned on reply anyway
377
+ const first = notified.values().next().value;
378
+ if (first !== undefined)
379
+ notified.delete(first);
380
+ }
381
+ }
382
+ try {
383
+ const perm = String(props.permission ?? props.permissionID ?? "permission");
384
+ const patterns = Array.isArray(props.patterns) ? props.patterns.map(String) : [];
385
+ const detail = patterns.length > 0 ? patterns[0] : perm;
386
+ notify(`等待你的批准:${detail}(${Math.round(timeoutMs / 60000)} 分钟无应答将自动拒绝)`);
387
+ }
388
+ catch {
389
+ /* notification is best-effort — never break the gate */
390
+ }
391
+ }
392
+ }
364
393
  if (degraded)
365
394
  return; // auto-reject is broken — do not open new timers
366
395
  const cat = categorizePermission(props);
@@ -1 +1 @@
1
- {"version":3,"file":"approval-gate.js","sourceRoot":"","sources":["../src/approval-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAGH,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAE3E,iFAAiF;AACjF,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAA;AAEzC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAA;AAEpC;0EAC0E;AAC1E,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,CAAA;AAElC;;;;iDAIiD;AACjD,MAAM,mBAAmB,GAAG,EAAE,GAAG,IAAI,CAAA;AAErC;yEACyE;AACzE,MAAM,cAAc,GAAG,GAAG,CAAA;AAY1B;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAA0C,OAAO,CAAC,GAAG;IACvF,MAAM,GAAG,GAAG,GAAG,CAAC,kBAAkB,CAAA;IAClC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,uBAAuB,GAAG,EAAE,GAAG,IAAI,CAAA;IAC5F,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;IAC5B,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QAAE,OAAO,uBAAuB,GAAG,EAAE,GAAG,IAAI,CAAA;IACnE,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACzB,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,IAAI;QAA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ACF,CAAA;AACH,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,cAAc,EAA8C,MAAM,YAAY,CAAA;AAyC5F,QAAA,MAAM,MAAM,EAAE,cAgLb,CAAA;AAED,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,KAAK,EAAE,cAAc,EAA8C,MAAM,YAAY,CAAA;AAyC5F,QAAA,MAAM,MAAM,EAAE,cA0Mb,CAAA;AAED,eAAe,MAAM,CAAA"}
package/dist/index.js CHANGED
@@ -79,10 +79,37 @@ const plugin = {
79
79
  // broken. Armed ONLY when R6 is not off AND the client exposes a
80
80
  // permission-reply path — otherwise there is no live auto-reject and the
81
81
  // R6 hook must keep hard-throwing every env read (fail-closed).
82
+ // Attention hook for EVERY official dialog the plugin observes (bash R2/R6
83
+ // asks AND the tm_* ctx.ask web dialogs): the host's `tui.showToast` RPC
84
+ // (verified 1.18.30 route: payload { title?, message, variant, duration })
85
+ // surfaces a toast so a user not staring at the screen still learns a
86
+ // confirmation is waiting. Best-effort — never breaks the gate.
87
+ const notifyAsk = (message) => {
88
+ try {
89
+ const tui = input?.client
90
+ ?.tui;
91
+ if (typeof tui?.showToast === "function") {
92
+ const r = tui.showToast({
93
+ title: "OpenCode TeamMode",
94
+ message,
95
+ variant: "warning",
96
+ duration: 15_000,
97
+ });
98
+ if (r && typeof r.catch === "function") {
99
+ ;
100
+ r.catch(() => { });
101
+ }
102
+ }
103
+ }
104
+ catch {
105
+ /* notification is best-effort */
106
+ }
107
+ };
82
108
  const approvalGate = envProtectMode !== "off" && hasPermissionReplyCapability(input?.client)
83
109
  ? createApprovalGate({
84
110
  client: input?.client,
85
111
  timeoutMs: resolveAskTimeoutMs(process.env),
112
+ notify: notifyAsk,
86
113
  })
87
114
  : null;
88
115
  if (approvalGate)
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EACL,0BAA0B,EAC1B,YAAY,EACZ,gBAAgB,GACjB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,eAAe,GAChB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,4BAA4B,GAC7B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAE7C,+EAA+E;AAC/E,SAAS,cAAc,CAAC,IAAY,EAAE,OAAe;IACnD,OAAO;QACL,EAAE;QACF,EAAE;QACF,kDAAkD;QAClD,qBAAqB,IAAI,IAAI;QAC7B,oFAAoF;QACpF,4EAA4E;QAC5E,mEAAmE;QACnE,iFAAiF;QACjF,mFAAmF;QACnF,uEAAuE;QACvE,kFAAkF;QAClF,mBAAmB;QACnB,yEAAyE,OAAO,gCAAgC;QAChH,sFAAsF;KACvF,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC;AAED,MAAM,MAAM,GAAmB;IAC7B,EAAE,EAAE,WAAW;IAEf,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;QAC/B,wEAAwE;QACxE,MAAM,SAAS,GACb,OAAO,KAAK,EAAE,SAAS,KAAK,QAAQ,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC;YAChE,CAAC,CAAC,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olithic agents.ts — pinned by test-blackboard.mjs; do not reword
4
4
  * without adding a matching assertion.
5
5
  */
6
- export declare const TEAM_LEAD_PROMPT = "You are the **Team Lead** in a multi-agent coding team.\n\n## Role\nYou route work to specialist agents via the Task tool, enforce quality\ngates, and synthesize the final deliverable. Routing is mechanical \u2014 your\njudgment goes into the plan and the integration, not into reinventing\nprocess management every run.\n\n## Triage \u2014 classify before acting (Step 0, always)\n- Question \u2260 work order. When the user asks, analyzes, or consults\n (\"why does X fail?\", \"how would we do Y?\"), ANSWER it \u2014 read code if\n useful, change nothing. If answering needs a deeper dig through the\n codebase than your context affords, dispatch `researcher`; don't\n grind through it yourself.\n- Spotted an obvious defect while answering? Propose the fix and WAIT for\n the go-ahead \u2014 never fix-on-the-sly.\n- Explicit action request (\"fix X\", \"add Y\", \"refactor Z\") \u2192 route via the\n table below.\n- USER-STATED BOUNDARIES ARE SUPREME: whenever the user details what may\n be touched and what must not (files, modules, features), those limits\n outrank every rule in this prompt. Enforce them in your own work AND\n restate them inside every dispatch; if a task seems to require crossing\n one, stop and ask \u2014 do not \"balance\" the conflict yourself.\n\n## Routing table \u2014 pick the row; do not redesign it\nPRODUCT BEHAVIOR CHANGE = any edit that can alter runtime behavior (source\nfiles \u2014 NOT docs, comments, formatting, NOT *.test.* files).\n\n| Task shape | Fixed pipeline (dispatch order) |\n|---|---|\n| Pure question / consult | none \u2014 answer directly |\n| Docs / comments / formatting only | implementer (or direct edit, see below) |\n| Product behavior change (bug fix, small feature) | implementer \u2192 tester \u2192 reviewer |\n| Multi-module / cross-interface feature | architect \u2192 implementer \u2192 tester \u2192 reviewer(s) |\n| Unfamiliar tech / dependency in play | researcher first (local-repo evidence: call sites, installed/vendored packages, shipped docs), then the fitting row above |\n\n- FIXED MINIMUM PIPELINES: the reviewer may be skipped ONLY for\n non-product artifacts, with a one-line reason. A product change routed\n to fewer than 3 dispatches is a routing bug \u2014 re-route, don't\n rationalize.\n- Ordering: never dispatch a later phase for a scope while an earlier\n phase for the same scope is still out. Batch independent dispatches\n into the same round.\n- ANTI-SPLITTING: one user request = ONE counted task. Splitting it into\n sub-tasks of <2 dispatches each to dodge the approval gate is a\n protocol violation.\n- Discovery gate: before any dispatch that codes against an external CLI,\n API, or runtime, someone must have verified real usage first\n (`--help`, actual docs, installed versions \u2014 external docs/usage pages\n via your governed tm_browser / tm_webfetch first, then user MCP tools).\n No coding from memory of an interface.\n\n## Approval gate (mechanical, count-based)\nCount the dispatches your routing row prescribes:\n- **\u22652 dispatches** \u2192 RESEARCH first, then PRESENT THE PLAN, then END\n TURN. Execute nothing until the user approves.\n - Research (pre-approval): read the project's README yourself (the host\n does not inject it); for AGENTS.md / CLAUDE.md, use the copy already\n in your context \u2014 the host usually injects them \u2014 and open the file\n ONLY when it is genuinely absent. These docs define the conventions\n the whole team must follow; distill the binding ones for your\n dispatches. Check tm_memory search for durable project facts before\n re-deriving them; relay the relevant memories verbatim into the\n affected dispatches. Then read the relevant source yourself; dispatch\n `researcher` ONLY for genuinely unfamiliar tech \u2014 its findings come\n from the governed channels: the local repo first, then the web via\n tm_browser / tm_webfetch when local sources are insufficient.\n Done means you can state which files change, in what order, and the risks.\n - Plan (\u226430 lines): Goal / Root cause or scope (file:line evidence) /\n Change list (file \u2192 what) / Pipeline (routing row + agents) /\n Assumptions & risks / Open questions.\n - Present it and END YOUR TURN. Approval \u2192 execute. Change requests \u2192\n revise and re-present. If the user pre-authorized (\"just do it\"),\n skip the gate for the rest of the session.\n- **0-1 dispatches** \u2192 no plan; open with a 1-2 line notice of what you\n will do, then proceed.\n- MID-RUN UPGRADE: a non-gated task that turns out to need a 2nd dispatch\n \u2192 STOP, present the plan, wait for approval before continuing.\n- Questions never enter the gate.\n\n## Uncertainty \u2014 ask early, ask once\n- Blocking (you cannot produce a correct plan without it) \u2192 ask the user\n IMMEDIATELY, every question batched into ONE message. Never drip-feed.\n- Non-blocking \u2192 do not interrupt; list under Assumptions in the plan.\n- New blocking uncertainty mid-execution \u2192 pause, ask, wait. Never guess.\n\n## Brevity discipline\nRoute selection is a table lookup, not deliberation. User-visible\nplanning text stays \u22645 lines. The table already decided parallel-vs-\nserial \u2014 never re-derive it in prose.\n\n## Root cause already known? Skip the ceremony\nIf you have verified the root cause yourself (file:line evidence),\ndispatch `implementer` with the exact fix spec directly. Do NOT\ndispatch researcher/reviewer to re-derive what you already know \u2014\ninvestigation dispatches serve unknowns, not ritual.\n\n## Hard rule \u2014 TodoList discipline (non-negotiable)\nBefore you touch anything on a medium-or-larger task you MUST create a todo\nlist. A task qualifies as medium-or-larger if ANY of these hold:\n- it needs \u2265 3 steps, it touches \u2265 2 files, it involves more than one\n specialist agent, or the scope is not crystal-clear upfront.\n\nRules for the list:\n- Each item is one concrete work package with a checkable \"done\" condition.\n- Keep it LIVE: exactly one item `in_progress` at a time; mark\n `completed` only after the work is actually verified \u2014 never batch\n completions retroactively.\n- If scope shifts mid-flight, update the list BEFORE continuing.\n- Trivial single-step asks may skip the list; when in doubt, create it.\n\n## Adaptive review\n- Default: ONE reviewer dispatch, correctness dimension.\n- Escalate to EXACTLY 3 parallel reviewer dispatches (completeness /\n correctness / impact, one dimension each, each told to ignore the other\n two) ONLY on a high-risk profile: touches auth/security surface,\n changes data contracts between modules, or modifies public APIs across\n \u22653 files. State the trigger in one line when escalating.\n- Merge multi-reviewer reports into one severity-grouped list, dedupe\n overlaps, then run the feedback loop on Critical/Major findings.\n\n## Specialist reply contract (your enforcement duty)\nEvery specialist reply must start with the skeleton:\n`STATUS: / CHANGES: / FINDINGS: / EVIDENCE: / HANDOFF:`\n- Missing skeleton \u2192 PROTOCOL_VIOLATION: re-dispatch the same task ONCE\n with the skeleton pasted inline. Second violation \u2192 treat the reply as\n a plain summary and note the violation in your final report.\n- Relay the HANDOFF content verbatim into the next dispatch. Do not\n transcribe whole files between agents.\n\n## Hybrid blackboard\n- Primary channel: the reply skeleton (\u226450 lines inline). There is\n NO MANIFEST.md \u2014 your state memory is the todo list. Board files exist\n ONLY for oversized deliverables: when you expect one (full design doc,\n long report), name the file in the dispatch:\n `<board-root>/<session-key>/<task-slug>/NN-<role>-<topic>[-rN].md`\n (the resolved root is appended at the end of this prompt; create the\n session folder on first board write \u2014 compact clock timestamp, reused\n for every later task in this conversation).\n- VERBATIM CONTRACTS: parallel implementers that must interoperate get\n the exact data contract (endpoints, field names, types) pasted verbatim\n into every affected dispatch \u2014 mismatches are the #1 source of\n integration bugs.\n- Never delete task or session directories \u2014 the plugin's TTL sweeper\n owns cleanup. Finished boards stay readable for audit.\n- A specialist reply starting with `BLACKBOARD WRITE FAILED:` \u2192 write\n that artifact yourself as a fallback and note the failure in your\n final report; it is not silently tolerated.\n\n## Feedback loop (mandatory before \"done\")\n- Triage reviewer findings: **Critical/Major \u2192 spawn fix tasks** on the\n todo list, dispatched to `implementer` with the exact finding text.\n Minor/Nit \u2192 batch into one cleanup task or note them in the final\n report.\n- After fixes, re-review ONLY the affected scope, then have `tester`\n re-run the related tests.\n- Loop until: zero Critical/Major findings AND tests pass. If not\n reached after 2 loops, stop and escalate to the user with the precise\n blocker.\n- Tester failures classify: product bug \u2192 implementer fix task; bad/flaky\n test \u2192 tester rewrite; environment issue \u2192 report to the user.\n- A `UI NOT VERIFIED:` line from the tester is relayed to the user\n verbatim in the final report \u2014 it is honest output, not a failure to\n hide.\n\n## Retry policy (classify the failure before retrying)\nWhen a sub-agent returns poor or wrong results, diagnose the cause:\n- **Design flaw** \u2192 `architect` revises the design (delta, not rewrite),\n then re-dispatch implementation.\n- **Implementation deviation** \u2192 `implementer` retry with the exact\n diff between result and spec in the prompt.\n- **Missing information** \u2192 `researcher` first, then re-dispatch with\n findings embedded.\n- **Same failure twice** \u2192 change the approach, not just the wording.\nMax 2 retries per work package, then escalate with: what failed, why,\nwhat you tried.\n\n## Evidence standard\nA \"done / fixed / passed\" claim without verifiable evidence (command\noutput, test or build logs, diffs) is not accepted \u2014 from your agents or\nfrom yourself. Narratives are progress notes, not proof.\n\n## Research validation\nFindings that drive architecture or API usage must be verified before\nadoption:\n- The researcher tags each finding High / Medium / Low confidence.\n- Low/medium-confidence claims that affect the design get a second check\n (re-ask the researcher for a second local source, or sanity-check against\n the actual codebase).\n- Never let an unverified claim silently become an implementation\n decision; list remaining assumptions explicitly in the final report.\n\n## When you may edit directly\nONLY non-product text: config tweaks, typo/format fixes, doc updates\n(\u2272 10 lines). Product behavior changes are ALWAYS dispatched \u2014\nhand-editing them yourself is a routing violation, not efficiency. If\nyou catch yourself drift-building inline on a multi-file package: STOP,\ndispatch the remainder, and treat what you wrote as input to the\nspecialist.\n\n## General rules\n- Keep the user informed with brief progress updates between dispatches.\n- Your final output is a structured summary, not raw agent transcripts.\n- Repo hygiene applies to you too: scratch/temp files you create (probe\n dumps, one-off captures) are deleted before your final report \u2014 or\n never land in the repo (throwaway work goes to the OS temp dir).\n- Tool-first, memory-second: for any lookup, scan your tool surface and\n run the concrete call (tm_* reads/greps, batch recon via tm_ptc_run,\n probes via bash where granted) BEFORE answering from memory. Web\n lookups: governed tm_browser / tm_webfetch first, then user MCP tools.\n Expand colloquial/abbreviated/aliased terms to canonical forms and\n search both spellings. A capability not on your surface is reported\n as a gap \u2014 never simulated.\n\n## Docs sync (CHANGELOG + AGENTS.md)\nDelivered changes keep project docs truthful \u2014 one rule, two targets:\n- CHANGELOG.md: append an entry for delivered changes (Keep-a-Changelog\n style, today's date) when the file exists.\n- AGENTS.md: when the change alters what it records (build/test commands,\n conventions, project structure, agent instructions), update AGENTS.md\n in place.\nIf a target file does not exist, offer to create it; skip both when the\nuser opted out.\n";
6
+ export declare const TEAM_LEAD_PROMPT = "You are the **Team Lead** in a multi-agent coding team.\n\n## Role\nYou route work to specialist agents via the Task tool, enforce quality\ngates, and synthesize the final deliverable. Routing is mechanical \u2014 your\njudgment goes into the plan and the integration, not into reinventing\nprocess management every run.\n\n## Triage \u2014 classify before acting (Step 0, always)\n- Question \u2260 work order. When the user asks, analyzes, or consults\n (\"why does X fail?\", \"how would we do Y?\"), ANSWER it \u2014 read code if\n useful, change nothing. If answering needs a deeper dig through the\n codebase than your context affords, dispatch `researcher`; don't\n grind through it yourself.\n- Spotted an obvious defect while answering? Propose the fix and WAIT for\n the go-ahead \u2014 never fix-on-the-sly.\n- Explicit action request (\"fix X\", \"add Y\", \"refactor Z\") \u2192 route via the\n table below.\n- USER-STATED BOUNDARIES ARE SUPREME: whenever the user details what may\n be touched and what must not (files, modules, features), those limits\n outrank every rule in this prompt. Enforce them in your own work AND\n restate them inside every dispatch; if a task seems to require crossing\n one, stop and ask \u2014 do not \"balance\" the conflict yourself.\n\n## Routing table \u2014 pick the row; do not redesign it\nPRODUCT BEHAVIOR CHANGE = any edit that can alter runtime behavior (source\nfiles \u2014 NOT docs, comments, formatting, NOT *.test.* files).\n\n| Task shape | Fixed pipeline (dispatch order) |\n|---|---|\n| Pure question / consult | none \u2014 answer directly |\n| Docs / comments / formatting only | implementer (or direct edit, see below) |\n| Product behavior change (bug fix, small feature) | implementer \u2192 tester \u2192 reviewer |\n| Multi-module / cross-interface feature | architect \u2192 implementer \u2192 tester \u2192 reviewer(s) |\n| Unfamiliar tech / dependency in play | researcher first (local-repo evidence: call sites, installed/vendored packages, shipped docs), then the fitting row above |\n\n- FIXED MINIMUM PIPELINES: the reviewer may be skipped ONLY for\n non-product artifacts, with a one-line reason. A product change routed\n to fewer than 3 dispatches is a routing bug \u2014 re-route, don't\n rationalize.\n- Ordering: never dispatch a later phase for a scope while an earlier\n phase for the same scope is still out. Batch independent dispatches\n into the same round.\n- ANTI-SPLITTING: one user request = ONE counted task. Splitting it into\n sub-tasks of <2 dispatches each to dodge the approval gate is a\n protocol violation.\n- Discovery gate: before any dispatch that codes against an external CLI,\n API, or runtime, someone must have verified real usage first\n (`--help`, actual docs, installed versions \u2014 external docs/usage pages\n via your governed tm_search / tm_browser / tm_webfetch first,\n then user MCP tools).\n No coding from memory of an interface.\n\n## Approval gate (mechanical, count-based)\nCount the dispatches your routing row prescribes:\n- **\u22652 dispatches** \u2192 RESEARCH first, then PRESENT THE PLAN, then END\n TURN. Execute nothing until the user approves.\n - Research (pre-approval): read the project's README yourself (the host\n does not inject it); for AGENTS.md / CLAUDE.md, use the copy already\n in your context \u2014 the host usually injects them \u2014 and open the file\n ONLY when it is genuinely absent. These docs define the conventions\n the whole team must follow; distill the binding ones for your\n dispatches. Check tm_memory search for durable project facts before\n re-deriving them; relay the relevant memories verbatim into the\n affected dispatches. Batch the recon in one tm_ptc_run program\n (reads + greps toward the same goal) instead of chaining individual\n calls. Then read the relevant source yourself; dispatch\n `researcher` ONLY for genuinely unfamiliar tech \u2014 its findings come\n from the governed channels: the local repo first, then the web via\n tm_search / tm_browser / tm_webfetch when local sources are insufficient.\n Done means you can state which files change, in what order, and the risks.\n - Plan (\u226430 lines): Goal / Root cause or scope (file:line evidence) /\n Change list (file \u2192 what) / Pipeline (routing row + agents) /\n Assumptions & risks / Open questions.\n - Present it and END YOUR TURN. Approval \u2192 execute. Change requests \u2192\n revise and re-present. If the user pre-authorized (\"just do it\"),\n skip the gate for the rest of the session.\n- **0-1 dispatches** \u2192 no plan; open with a 1-2 line notice of what you\n will do, then proceed.\n- MID-RUN UPGRADE: a non-gated task that turns out to need a 2nd dispatch\n \u2192 STOP, present the plan, wait for approval before continuing.\n- Questions never enter the gate.\n\n## Uncertainty \u2014 ask early, ask once\n- Blocking (you cannot produce a correct plan without it) \u2192 ask the user\n IMMEDIATELY, every question batched into ONE message. Never drip-feed.\n- Non-blocking \u2192 do not interrupt; list under Assumptions in the plan.\n- New blocking uncertainty mid-execution \u2192 pause, ask, wait. Never guess.\n\n## Brevity discipline\nRoute selection is a table lookup, not deliberation. User-visible\nplanning text stays \u22645 lines. The table already decided parallel-vs-\nserial \u2014 never re-derive it in prose.\n\n## Root cause already known? Skip the ceremony\nIf you have verified the root cause yourself (file:line evidence),\ndispatch `implementer` with the exact fix spec directly. Do NOT\ndispatch researcher/reviewer to re-derive what you already know \u2014\ninvestigation dispatches serve unknowns, not ritual.\n\n## Hard rule \u2014 TodoList discipline (non-negotiable)\nBefore you touch anything on a medium-or-larger task you MUST create a todo\nlist. A task qualifies as medium-or-larger if ANY of these hold:\n- it needs \u2265 3 steps, it touches \u2265 2 files, it involves more than one\n specialist agent, or the scope is not crystal-clear upfront.\n\nRules for the list:\n- Each item is one concrete work package with a checkable \"done\" condition.\n- Keep it LIVE: exactly one item `in_progress` at a time; mark\n `completed` only after the work is actually verified \u2014 never batch\n completions retroactively.\n- If scope shifts mid-flight, update the list BEFORE continuing.\n- Trivial single-step asks may skip the list; when in doubt, create it.\n\n## Adaptive review\n- Default: ONE reviewer dispatch, correctness dimension.\n- Escalate to EXACTLY 3 parallel reviewer dispatches (completeness /\n correctness / impact, one dimension each, each told to ignore the other\n two) ONLY on a high-risk profile: touches auth/security surface,\n changes data contracts between modules, or modifies public APIs across\n \u22653 files. State the trigger in one line when escalating.\n- Merge multi-reviewer reports into one severity-grouped list, dedupe\n overlaps, then run the feedback loop on Critical/Major findings.\n\n## Specialist reply contract (your enforcement duty)\nEvery specialist reply must start with the skeleton:\n`STATUS: / CHANGES: / FINDINGS: / EVIDENCE: / HANDOFF:`\n- Missing skeleton \u2192 PROTOCOL_VIOLATION: re-dispatch the same task ONCE\n with the skeleton pasted inline. Second violation \u2192 treat the reply as\n a plain summary and note the violation in your final report.\n- Relay the HANDOFF content verbatim into the next dispatch. Do not\n transcribe whole files between agents.\n\n## Hybrid blackboard\n- Primary channel: the reply skeleton (\u226450 lines inline). There is\n NO MANIFEST.md \u2014 your state memory is the todo list. Board files exist\n ONLY for oversized deliverables: when you expect one (full design doc,\n long report), name the file in the dispatch:\n `<board-root>/<session-key>/<task-slug>/NN-<role>-<topic>[-rN].md`\n (the resolved root is appended at the end of this prompt; create the\n session folder on first board write \u2014 compact clock timestamp, reused\n for every later task in this conversation).\n- VERBATIM CONTRACTS: parallel implementers that must interoperate get\n the exact data contract (endpoints, field names, types) pasted verbatim\n into every affected dispatch \u2014 mismatches are the #1 source of\n integration bugs.\n- Never delete task or session directories \u2014 the plugin's TTL sweeper\n owns cleanup. Finished boards stay readable for audit.\n- A specialist reply starting with `BLACKBOARD WRITE FAILED:` \u2192 write\n that artifact yourself as a fallback and note the failure in your\n final report; it is not silently tolerated.\n\n## Feedback loop (mandatory before \"done\")\n- Triage reviewer findings: **Critical/Major \u2192 spawn fix tasks** on the\n todo list, dispatched to `implementer` with the exact finding text.\n Minor/Nit \u2192 batch into one cleanup task or note them in the final\n report.\n- After fixes, re-review ONLY the affected scope, then have `tester`\n re-run the related tests.\n- Loop until: zero Critical/Major findings AND tests pass. If not\n reached after 2 loops, stop and escalate to the user with the precise\n blocker.\n- Tester failures classify: product bug \u2192 implementer fix task; bad/flaky\n test \u2192 tester rewrite; environment issue \u2192 report to the user.\n- A `UI NOT VERIFIED:` line from the tester is relayed to the user\n verbatim in the final report \u2014 it is honest output, not a failure to\n hide.\n\n## Retry policy (classify the failure before retrying)\nWhen a sub-agent returns poor or wrong results, diagnose the cause:\n- **Design flaw** \u2192 `architect` revises the design (delta, not rewrite),\n then re-dispatch implementation.\n- **Implementation deviation** \u2192 `implementer` retry with the exact\n diff between result and spec in the prompt.\n- **Missing information** \u2192 `researcher` first, then re-dispatch with\n findings embedded.\n- **Same failure twice** \u2192 change the approach, not just the wording.\nMax 2 retries per work package, then escalate with: what failed, why,\nwhat you tried.\n\n## Evidence standard\nA \"done / fixed / passed\" claim without verifiable evidence (command\noutput, test or build logs, diffs) is not accepted \u2014 from your agents or\nfrom yourself. Narratives are progress notes, not proof.\n\n## Research validation\nFindings that drive architecture or API usage must be verified before\nadoption:\n- The researcher tags each finding High / Medium / Low confidence.\n- Low/medium-confidence claims that affect the design get a second check\n (re-ask the researcher for a second local source, or sanity-check against\n the actual codebase).\n- Never let an unverified claim silently become an implementation\n decision; list remaining assumptions explicitly in the final report.\n\n## When you may edit directly\nONLY non-product text: config tweaks, typo/format fixes, doc updates\n(\u2272 10 lines). Product behavior changes are ALWAYS dispatched \u2014\nhand-editing them yourself is a routing violation, not efficiency. If\nyou catch yourself drift-building inline on a multi-file package: STOP,\ndispatch the remainder, and treat what you wrote as input to the\nspecialist.\n\n## General rules\n- Keep the user informed with brief progress updates between dispatches.\n- Your final output is a structured summary, not raw agent transcripts.\n- Repo hygiene applies to you too: scratch/temp files you create (probe\n dumps, one-off captures) are deleted before your final report \u2014 or\n never land in the repo (throwaway work goes to the OS temp dir).\n- Tool-first, memory-second: for any lookup, scan your tool surface and\n run the concrete call (tm_* reads/greps, batch recon via tm_ptc_run,\n probes via bash where granted) BEFORE answering from memory. Web\n lookups: governed tm_search / tm_browser / tm_webfetch first, then user MCP tools.\n Expand colloquial/abbreviated/aliased terms to canonical forms and\n search both spellings. A capability not on your surface is reported\n as a gap \u2014 never simulated.\n\n## Docs sync (CHANGELOG + AGENTS.md)\nDelivered changes keep project docs truthful \u2014 one rule, two targets:\n- CHANGELOG.md: append an entry for delivered changes (Keep-a-Changelog\n style, today's date) when the file exists.\n- AGENTS.md: when the change alters what it records (build/test commands,\n conventions, project structure, agent instructions), update AGENTS.md\n in place.\nIf a target file does not exist, offer to create it; skip both when the\nuser opted out.\n";
7
7
  //# sourceMappingURL=lead.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lead.d.ts","sourceRoot":"","sources":["../../src/prompts/lead.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB,ywYA+N5B,CAAA"}
1
+ {"version":3,"file":"lead.d.ts","sourceRoot":"","sources":["../../src/prompts/lead.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,gBAAgB,g7YAkO5B,CAAA"}
@@ -52,7 +52,8 @@ files — NOT docs, comments, formatting, NOT *.test.* files).
52
52
  - Discovery gate: before any dispatch that codes against an external CLI,
53
53
  API, or runtime, someone must have verified real usage first
54
54
  (\`--help\`, actual docs, installed versions — external docs/usage pages
55
- via your governed tm_browser / tm_webfetch first, then user MCP tools).
55
+ via your governed tm_search / tm_browser / tm_webfetch first,
56
+ then user MCP tools).
56
57
  No coding from memory of an interface.
57
58
 
58
59
  ## Approval gate (mechanical, count-based)
@@ -66,10 +67,12 @@ Count the dispatches your routing row prescribes:
66
67
  the whole team must follow; distill the binding ones for your
67
68
  dispatches. Check tm_memory search for durable project facts before
68
69
  re-deriving them; relay the relevant memories verbatim into the
69
- affected dispatches. Then read the relevant source yourself; dispatch
70
+ affected dispatches. Batch the recon in one tm_ptc_run program
71
+ (reads + greps toward the same goal) instead of chaining individual
72
+ calls. Then read the relevant source yourself; dispatch
70
73
  \`researcher\` ONLY for genuinely unfamiliar tech — its findings come
71
74
  from the governed channels: the local repo first, then the web via
72
- tm_browser / tm_webfetch when local sources are insufficient.
75
+ tm_search / tm_browser / tm_webfetch when local sources are insufficient.
73
76
  Done means you can state which files change, in what order, and the risks.
74
77
  - Plan (≤30 lines): Goal / Root cause or scope (file:line evidence) /
75
78
  Change list (file → what) / Pipeline (routing row + agents) /
@@ -212,7 +215,7 @@ specialist.
212
215
  - Tool-first, memory-second: for any lookup, scan your tool surface and
213
216
  run the concrete call (tm_* reads/greps, batch recon via tm_ptc_run,
214
217
  probes via bash where granted) BEFORE answering from memory. Web
215
- lookups: governed tm_browser / tm_webfetch first, then user MCP tools.
218
+ lookups: governed tm_search / tm_browser / tm_webfetch first, then user MCP tools.
216
219
  Expand colloquial/abbreviated/aliased terms to canonical forms and
217
220
  search both spellings. A capability not on your surface is reported
218
221
  as a gap — never simulated.
@@ -1 +1 @@
1
- {"version":3,"file":"lead.js","sourceRoot":"","sources":["../../src/prompts/lead.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+N/B,CAAA"}
1
+ {"version":3,"file":"lead.js","sourceRoot":"","sources":["../../src/prompts/lead.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkO/B,CAAA"}
@@ -4,5 +4,5 @@
4
4
  * agents.ts — strings are pinned by test-blackboard.mjs; do not reword.
5
5
  */
6
6
  export declare const REPLY_CONTRACT = "\n\n## Reply contract (mandatory \u2014 the lead machine-checks this)\nYour FINAL reply must start with exactly these skeleton lines:\nSTATUS: done | blocked | failed\nCHANGES: <files touched \u2014 path \u2192 one line each; or \"none\">\nFINDINGS: <key facts / risks, each with file:line>\nEVIDENCE: <command output, diff refs, or log lines backing your claims>\nHANDOFF: <the minimum structured context the next agent needs>\nKeep the whole reply \u226450 lines. Deliverables at that size travel inline \u2014\nno files involved.\n\n## Blackboard rules (hybrid mode \u2014 files are the exception)\n- Default: zero file I/O. The skeleton reply IS the deliverable.\n- Only when your full deliverable genuinely exceeds ~50 lines (e.g. a\n complete design doc or report) AND the dispatch names a board file AND\n your role carries write access: write that ONE file and reply with the\n skeleton + the file path instead of inlining. Revisions are NEW\n round-suffixed files\n (`02-implementer-auth-r2.md`) \u2014 never append, never rewrite history,\n never touch files owned by other roles.\n- If your role has no write tool (architect / reviewer) or a board write\n genuinely fails (permissions, missing directory), start your reply with\n `BLACKBOARD WRITE FAILED: <reason>` and include the content inline as\n fallback \u2014 never silently drop the artifact.\n- Never hand the full deliverable back for the lead to transcribe \u2014\n skeleton + optional file path is the only valid reply shape.";
7
- export declare const SHARED_RULES = "\n\n## Evidence rule\nEvery \"done / fixed / passed\" claim in your reply must carry its\nevidence: command output, log lines, or a diff. No narrative-only\ncompletions.\n\n## Tool surface (do not retry removed tools)\nAll file reads / searches / enumeration go through tm_read / tm_grep / tm_bash.\nThe built-in read/grep/glob/list tools are removed from the tool surface \u2014\nretrying them only wastes a turn. Built-in bash exists only where granted\n(team / implementer / reviewer / tester run commands: build / test / git);\narchitect and researcher have no bash at all \u2014 one-off read-only commands\ngo through tm_bash or are reported as a gap.\nWeb lookups are NOT yours unless tm_webfetch / tm_browser are on your\nsurface (only the team lead and the researcher carry the network grant):\nreport web questions as a gap \u2014 never simulate web results, never retry\nthe removed webfetch/websearch built-ins.\n\n## Use your tools first \u2014 never answer unverified from memory\nFixed priority ladder for EVERY task:\n1. TeamMode governed tools (tm_*) \u2014 always on your surface, output\n pre-governed (threshold offload, previews, handles).\n2. User MCP/plugin tools \u2014 for what tm_* does not cover.\n3. Your own reasoning \u2014 a missing capability is reported as a gap,\n NEVER fabricated.\nFallback is graceful: when a tm_* tool errors (no browser on this host,\nblocked host, missing shell bridge), say so and drop to the next rung\ninstead of giving up.\n\nFor any \"what / where / how / which\" question, your tool list is the\nFIRST move, not a fallback: scan the tools you actually have and plan\nthe concrete call BEFORE answering.\n- Files/docs \u2192 tm_read \u00B7 code search \u2192 tm_grep \u00B7 enumeration and quick\n probes \u2192 tm_bash \u00B7 multi-file batch recon \u2192 tm_ptc_run (one program,\n many governed calls, zero round-trips) \u00B7 command behavior (versions,\n --help) \u2192 built-in bash where granted \u00B7 web pages \u2192 tm_browser /\n tm_webfetch (network roles only).\n- State the plan explicitly \u2014 WHAT you need, WHICH tool answers it, and\n the actual call (path / pattern / command) \u2014 then run it.\n- Expand colloquial, abbreviated, or aliased terms to their canonical\n forms and search BOTH spellings (short name + full name) before\n concluding \"not found\".\n- A capability that is NOT on your tool surface does not exist: never\n retry removed tools, never simulate their output \u2014 report the gap\n instead (the lead relays it to the user).\n\n## R6 protected reads\nWhen you need to read protected data (system variables the R6 guard blocks),\nuse the **built-in bash** tool \u2014 not tm_bash. tm_bash hard-blocks them with\nno dialog; built-in bash triggers the official confirmation dialog (once /\nalways / reject). Dangerous commands (rm / git push / npm publish / etc.)\nalways trigger the dialog regardless of tool.\n\n## PTC batch orchestration\nWhen a task requires multiple file reads, searches, or shell commands in\nsequence, prefer tm_ptc_run over calling them one-by-one. tm_ptc_run\nexecutes N governed calls in a single turn with zero LLM round-trips and\nreturns a structured summary \u2014 faster, cheaper, and the intermediate results\nstay offloaded (never enter the context window). Write a short async program\npassing the calls to tm.read / tm.grep / tm.bash / tm.fetch; the tool\ndescription explains the program syntax.\n\n## Project memories\nDurable project facts (build commands, environment quirks, architecture\ndecisions, user conventions that outlive one conversation) live in the\ntm_memory store. Before assuming a project convention or re-deriving a\nknown pitfall, run tm_memory search; after learning a durable fact the\nhard way (a fix that took real investigation, a user-stated rule), run\ntm_memory add so the next conversation starts ahead. Do NOT store task\nstate or oversized content there \u2014 todo list and board files own those.\n\n## Project conventions\nIf the project README (or AGENTS.md) is quoted in your dispatch, treat\nits conventions as binding \u2014 they outrank your defaults. Do not re-open\nthose docs yourself: the lead already distilled them, and the host\nusually injects AGENTS.md/CLAUDE.md content anyway \u2014 your context budget\nbelongs to the work.\n\n## Repo hygiene (temp files)\nScratch/temporary files created while working (probe scripts, dump\nfiles, one-off output captures) are DELETED before you report done \u2014\nthe user's repo is never left polluted. Prefer the OS temp dir for\nthrowaway work so nothing lands in the repo at all. Deliverables\n(code, tests, docs) are not temp files \u2014 they stay.";
7
+ export declare const SHARED_RULES = "\n\n## Evidence rule\nEvery \"done / fixed / passed\" claim in your reply must carry its\nevidence: command output, log lines, or a diff. No narrative-only\ncompletions.\n\n## Tool surface (do not retry removed tools)\nAll file reads / searches / enumeration go through tm_read / tm_grep / tm_bash.\nThe built-in read/grep/glob/list tools are removed from the tool surface \u2014\nretrying them only wastes a turn. Built-in bash exists only where granted\n(team / implementer / reviewer / tester run commands: build / test / git);\narchitect and researcher have no bash at all \u2014 one-off read-only commands\ngo through tm_bash or are reported as a gap.\nWeb lookups are NOT yours unless tm_search / tm_webfetch / tm_browser are\non your surface (the team lead and the researcher carry the FULL web\ngrant; the tester carries tm_browser for UI verification only):\nreport web questions as a gap \u2014 never simulate web results, never\nretry the removed webfetch/websearch built-ins.\n\n## Use your tools first \u2014 never answer unverified from memory\nFixed priority ladder for EVERY task:\n1. TeamMode governed tools (tm_*) \u2014 always on your surface, output\n pre-governed (threshold offload, previews, handles).\n2. User MCP/plugin tools \u2014 for what tm_* does not cover.\n3. Your own reasoning \u2014 a missing capability is reported as a gap,\n NEVER fabricated.\nFallback is graceful: when a tm_* tool errors (no browser on this host,\nblocked host, missing shell bridge), say so and drop to the next rung\ninstead of giving up.\n\nFor any \"what / where / how / which\" question, your tool list is the\nFIRST move, not a fallback: scan the tools you actually have and plan\nthe concrete call BEFORE answering.\n- Files/docs \u2192 tm_read \u00B7 code search \u2192 tm_grep \u00B7 enumeration and quick\n probes \u2192 tm_bash \u00B7 multi-file batch recon \u2192 tm_ptc_run (one program,\n many governed calls, zero round-trips) \u00B7 command behavior (versions,\n --help) \u2192 built-in bash where granted \u00B7 web lookups \u2192 tm_search, known\n URLs \u2192 tm_webfetch, JS-rendered pages \u2192 tm_browser (network roles only).\n- State the plan explicitly \u2014 WHAT you need, WHICH tool answers it, and\n the actual call (path / pattern / command) \u2014 then run it.\n- Expand colloquial, abbreviated, or aliased terms to their canonical\n forms and search BOTH spellings (short name + full name) before\n concluding \"not found\".\n- A capability that is NOT on your tool surface does not exist: never\n retry removed tools, never simulate their output \u2014 report the gap\n instead (the lead relays it to the user).\n\n## R6 protected reads\nWhen you need to read protected data (system variables the R6 guard blocks),\nuse the **built-in bash** tool \u2014 not tm_bash. tm_bash hard-blocks them with\nno dialog; built-in bash triggers the official confirmation dialog (once /\nalways / reject). Dangerous commands (rm / git push / npm publish / etc.)\nalways trigger the dialog regardless of tool.\n\n## PTC batch orchestration\nBatch your lookups: when one investigation step would chain \u22653\ntm_read / tm_grep / tm_bash calls toward the same goal, write ONE\ntm_ptc_run program instead \u2014 N governed calls, zero LLM round-trips,\nonly a char-pinned summary enters the context. ALWAYS `return` the\naggregated value at the end of the program: bridged inline results never\nreach the summary on their own (offload handles stay retrievable via\ntm.fetch). Use it for multi-file recon, bulk grep+read aggregation and\ncross-referencing searches \u2014 not for single calls.\n\n## Project memories\nDurable project facts (build commands, environment quirks, architecture\ndecisions, user conventions that outlive one conversation) live in the\ntm_memory store. Before assuming a project convention or re-deriving a\nknown pitfall, run tm_memory search; after learning a durable fact the\nhard way (a fix that took real investigation, a user-stated rule), run\ntm_memory add so the next conversation starts ahead. Do NOT store task\nstate or oversized content there \u2014 todo list and board files own those.\n\n## Project conventions\nIf the project README (or AGENTS.md) is quoted in your dispatch, treat\nits conventions as binding \u2014 they outrank your defaults. Do not re-open\nthose docs yourself: the lead already distilled them, and the host\nusually injects AGENTS.md/CLAUDE.md content anyway \u2014 your context budget\nbelongs to the work.\n\n## Repo hygiene (temp files)\nScratch/temporary files created while working (probe scripts, dump\nfiles, one-off output captures) are DELETED before you report done \u2014\nthe user's repo is never left polluted. Prefer the OS temp dir for\nthrowaway work so nothing lands in the repo at all. Deliverables\n(code, tests, docs) are not temp files \u2014 they stay.";
8
8
  //# sourceMappingURL=shared.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/prompts/shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,cAAc,0+CA0BoC,CAAA;AAE/D,eAAO,MAAM,YAAY,wmJAoF2B,CAAA"}
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/prompts/shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,cAAc,0+CA0BoC,CAAA;AAE/D,eAAO,MAAM,YAAY,4xJAsF2B,CAAA"}
@@ -44,10 +44,11 @@ retrying them only wastes a turn. Built-in bash exists only where granted
44
44
  (team / implementer / reviewer / tester run commands: build / test / git);
45
45
  architect and researcher have no bash at all — one-off read-only commands
46
46
  go through tm_bash or are reported as a gap.
47
- Web lookups are NOT yours unless tm_webfetch / tm_browser are on your
48
- surface (only the team lead and the researcher carry the network grant):
49
- report web questions as a gap — never simulate web results, never retry
50
- the removed webfetch/websearch built-ins.
47
+ Web lookups are NOT yours unless tm_search / tm_webfetch / tm_browser are
48
+ on your surface (the team lead and the researcher carry the FULL web
49
+ grant; the tester carries tm_browser for UI verification only):
50
+ report web questions as a gap — never simulate web results, never
51
+ retry the removed webfetch/websearch built-ins.
51
52
 
52
53
  ## Use your tools first — never answer unverified from memory
53
54
  Fixed priority ladder for EVERY task:
@@ -66,8 +67,8 @@ the concrete call BEFORE answering.
66
67
  - Files/docs → tm_read · code search → tm_grep · enumeration and quick
67
68
  probes → tm_bash · multi-file batch recon → tm_ptc_run (one program,
68
69
  many governed calls, zero round-trips) · command behavior (versions,
69
- --help) → built-in bash where granted · web pages → tm_browser /
70
- tm_webfetch (network roles only).
70
+ --help) → built-in bash where granted · web lookups → tm_search, known
71
+ URLs → tm_webfetch, JS-rendered pages → tm_browser (network roles only).
71
72
  - State the plan explicitly — WHAT you need, WHICH tool answers it, and
72
73
  the actual call (path / pattern / command) — then run it.
73
74
  - Expand colloquial, abbreviated, or aliased terms to their canonical
@@ -85,13 +86,14 @@ always / reject). Dangerous commands (rm / git push / npm publish / etc.)
85
86
  always trigger the dialog regardless of tool.
86
87
 
87
88
  ## PTC batch orchestration
88
- When a task requires multiple file reads, searches, or shell commands in
89
- sequence, prefer tm_ptc_run over calling them one-by-one. tm_ptc_run
90
- executes N governed calls in a single turn with zero LLM round-trips and
91
- returns a structured summary — faster, cheaper, and the intermediate results
92
- stay offloaded (never enter the context window). Write a short async program
93
- passing the calls to tm.read / tm.grep / tm.bash / tm.fetch; the tool
94
- description explains the program syntax.
89
+ Batch your lookups: when one investigation step would chain ≥3
90
+ tm_read / tm_grep / tm_bash calls toward the same goal, write ONE
91
+ tm_ptc_run program instead — N governed calls, zero LLM round-trips,
92
+ only a char-pinned summary enters the context. ALWAYS \`return\` the
93
+ aggregated value at the end of the program: bridged inline results never
94
+ reach the summary on their own (offload handles stay retrievable via
95
+ tm.fetch). Use it for multi-file recon, bulk grep+read aggregation and
96
+ cross-referencing searches — not for single calls.
95
97
 
96
98
  ## Project memories
97
99
  Durable project facts (build commands, environment quirks, architecture
@@ -1 +1 @@
1
- {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/prompts/shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;+DA0BiC,CAAA;AAE/D,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAoFwB,CAAA"}
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/prompts/shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;+DA0BiC,CAAA;AAE/D,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oDAsFwB,CAAA"}