@bonesofspring/ai-rules 0.2.35 → 0.2.37

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 (201) hide show
  1. package/bin/lib/merged-config.js +9 -0
  2. package/bin/opencode-install.js +46 -1
  3. package/package.json +4 -1
  4. package/presets/_shared/hooks/README.md +137 -0
  5. package/presets/_shared/hooks/chain-team-phases.sh.tmpl +1288 -0
  6. package/presets/claude/android-kotlin/MCP.md +2 -2
  7. package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +171 -10
  8. package/presets/claude/android-kotlin/mcp.json +1 -1
  9. package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +6 -153
  10. package/presets/claude/android-kotlin/team/README.md +2 -6
  11. package/presets/claude/android-kotlin/team/fixtures/artifact-manifest.example.json +1 -0
  12. package/presets/claude/go/MCP.md +2 -2
  13. package/presets/claude/go/hooks/chain-team-phases.sh +183 -16
  14. package/presets/claude/go/mcp.json +1 -1
  15. package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +6 -11
  16. package/presets/claude/go/team/README.md +2 -6
  17. package/presets/claude/ios-swift/MCP.md +2 -2
  18. package/presets/claude/ios-swift/hooks/chain-team-phases.sh +178 -17
  19. package/presets/claude/ios-swift/mcp.json +1 -1
  20. package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +6 -153
  21. package/presets/claude/ios-swift/team/README.md +2 -6
  22. package/presets/claude/ios-swift/team/fixtures/artifact-manifest.example.json +1 -0
  23. package/presets/claude/java/hooks/chain-team-phases.sh +183 -16
  24. package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +6 -28
  25. package/presets/claude/java/team/README.md +2 -6
  26. package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +182 -13
  27. package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +6 -14
  28. package/presets/claude/mcp-ts/team/README.md +2 -6
  29. package/presets/claude/next/MCP.md +2 -2
  30. package/presets/claude/next/commands/task.md +5 -3
  31. package/presets/claude/next/hooks/chain-team-phases.sh +102 -6
  32. package/presets/claude/next/mcp.json +1 -1
  33. package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +6 -226
  34. package/presets/claude/next/team/README.md +2 -6
  35. package/presets/claude/next/team/fixtures/artifact-manifest.example.json +1 -0
  36. package/presets/claude/nuxt/MCP.md +2 -2
  37. package/presets/claude/nuxt/hooks/chain-team-phases.sh +148 -7
  38. package/presets/claude/nuxt/mcp.json +1 -1
  39. package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +6 -223
  40. package/presets/claude/nuxt/team/README.md +2 -6
  41. package/presets/claude/nuxt/team/fixtures/artifact-manifest.example.json +1 -0
  42. package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +183 -16
  43. package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +6 -28
  44. package/presets/claude/php-hexagonal/team/README.md +2 -6
  45. package/presets/claude/php-laravel/hooks/chain-team-phases.sh +183 -16
  46. package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +6 -29
  47. package/presets/claude/php-laravel/team/README.md +2 -6
  48. package/presets/claude/svelte/MCP.md +2 -2
  49. package/presets/claude/svelte/hooks/chain-team-phases.sh +148 -7
  50. package/presets/claude/svelte/mcp.json +1 -1
  51. package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +6 -223
  52. package/presets/claude/svelte/team/README.md +2 -6
  53. package/presets/claude/svelte/team/fixtures/artifact-manifest.example.json +1 -0
  54. package/presets/cursor/android-kotlin/MCP.md +2 -2
  55. package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +150 -7
  56. package/presets/cursor/android-kotlin/mcp.json +1 -1
  57. package/presets/cursor/android-kotlin/team/README.md +2 -0
  58. package/presets/cursor/android-kotlin/team/fixtures/artifact-manifest.example.json +1 -0
  59. package/presets/cursor/go/MCP.md +2 -2
  60. package/presets/cursor/go/hooks/chain-team-phases.sh +175 -8
  61. package/presets/cursor/go/mcp.json +1 -1
  62. package/presets/cursor/go/team/README.md +2 -0
  63. package/presets/cursor/ios-swift/MCP.md +2 -2
  64. package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +150 -7
  65. package/presets/cursor/ios-swift/mcp.json +1 -1
  66. package/presets/cursor/ios-swift/team/README.md +2 -0
  67. package/presets/cursor/ios-swift/team/fixtures/artifact-manifest.example.json +1 -0
  68. package/presets/cursor/java/hooks/chain-team-phases.sh +175 -8
  69. package/presets/cursor/java/team/README.md +2 -0
  70. package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +179 -10
  71. package/presets/cursor/mcp-ts/team/README.md +2 -0
  72. package/presets/cursor/next/MCP.md +2 -2
  73. package/presets/cursor/next/commands/task.md +5 -3
  74. package/presets/cursor/next/hooks/chain-team-phases.sh +99 -5
  75. package/presets/cursor/next/mcp.json +1 -1
  76. package/presets/cursor/next/team/README.md +2 -0
  77. package/presets/cursor/next/team/fixtures/artifact-manifest.example.json +1 -0
  78. package/presets/cursor/nuxt/MCP.md +2 -2
  79. package/presets/cursor/nuxt/hooks/chain-team-phases.sh +145 -6
  80. package/presets/cursor/nuxt/mcp.json +1 -1
  81. package/presets/cursor/nuxt/team/README.md +2 -0
  82. package/presets/cursor/nuxt/team/fixtures/artifact-manifest.example.json +1 -0
  83. package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +175 -8
  84. package/presets/cursor/php-hexagonal/team/README.md +2 -0
  85. package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +175 -8
  86. package/presets/cursor/php-laravel/team/README.md +2 -0
  87. package/presets/cursor/svelte/MCP.md +2 -2
  88. package/presets/cursor/svelte/hooks/chain-team-phases.sh +145 -6
  89. package/presets/cursor/svelte/mcp.json +1 -1
  90. package/presets/cursor/svelte/team/README.md +2 -0
  91. package/presets/cursor/svelte/team/fixtures/artifact-manifest.example.json +1 -0
  92. package/presets/mavis/android-kotlin/MCP.md +2 -2
  93. package/presets/mavis/android-kotlin/adapter-map.json +1 -1
  94. package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +150 -7
  95. package/presets/mavis/android-kotlin/mcp.json +1 -1
  96. package/presets/mavis/android-kotlin/team/README.md +2 -0
  97. package/presets/mavis/android-kotlin/team/fixtures/artifact-manifest.example.json +1 -0
  98. package/presets/mavis/go/MCP.md +2 -2
  99. package/presets/mavis/go/adapter-map.json +1 -1
  100. package/presets/mavis/go/hooks/chain-team-phases.sh +175 -8
  101. package/presets/mavis/go/mcp.json +1 -1
  102. package/presets/mavis/go/team/README.md +2 -0
  103. package/presets/mavis/ios-swift/MCP.md +2 -2
  104. package/presets/mavis/ios-swift/adapter-map.json +1 -1
  105. package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +150 -7
  106. package/presets/mavis/ios-swift/mcp.json +1 -1
  107. package/presets/mavis/ios-swift/team/README.md +2 -0
  108. package/presets/mavis/ios-swift/team/fixtures/artifact-manifest.example.json +1 -0
  109. package/presets/mavis/java/adapter-map.json +1 -1
  110. package/presets/mavis/java/hooks/chain-team-phases.sh +175 -8
  111. package/presets/mavis/java/team/README.md +2 -0
  112. package/presets/mavis/mcp-ts/adapter-map.json +1 -1
  113. package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +179 -10
  114. package/presets/mavis/mcp-ts/team/README.md +2 -0
  115. package/presets/mavis/next/MCP.md +2 -2
  116. package/presets/mavis/next/adapter-map.json +1 -1
  117. package/presets/mavis/next/commands/task.md +5 -3
  118. package/presets/mavis/next/hooks/chain-team-phases.sh +99 -5
  119. package/presets/mavis/next/mcp.json +1 -1
  120. package/presets/mavis/next/team/README.md +2 -0
  121. package/presets/mavis/next/team/fixtures/artifact-manifest.example.json +1 -0
  122. package/presets/mavis/nuxt/MCP.md +2 -2
  123. package/presets/mavis/nuxt/adapter-map.json +1 -1
  124. package/presets/mavis/nuxt/hooks/chain-team-phases.sh +145 -6
  125. package/presets/mavis/nuxt/mcp.json +1 -1
  126. package/presets/mavis/nuxt/team/README.md +2 -0
  127. package/presets/mavis/nuxt/team/fixtures/artifact-manifest.example.json +1 -0
  128. package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
  129. package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +175 -8
  130. package/presets/mavis/php-hexagonal/team/README.md +2 -0
  131. package/presets/mavis/php-laravel/adapter-map.json +1 -1
  132. package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +175 -8
  133. package/presets/mavis/php-laravel/team/README.md +2 -0
  134. package/presets/mavis/svelte/MCP.md +2 -2
  135. package/presets/mavis/svelte/adapter-map.json +1 -1
  136. package/presets/mavis/svelte/hooks/chain-team-phases.sh +145 -6
  137. package/presets/mavis/svelte/mcp.json +1 -1
  138. package/presets/mavis/svelte/team/README.md +2 -0
  139. package/presets/mavis/svelte/team/fixtures/artifact-manifest.example.json +1 -0
  140. package/presets/opencode/android-kotlin/MCP.md +2 -2
  141. package/presets/opencode/android-kotlin/OPENCODE.md +6 -4
  142. package/presets/opencode/android-kotlin/adapter-map.json +1 -1
  143. package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +150 -7
  144. package/presets/opencode/android-kotlin/opencode.json +13 -1
  145. package/presets/opencode/android-kotlin/team/README.md +2 -0
  146. package/presets/opencode/android-kotlin/team/fixtures/artifact-manifest.example.json +1 -0
  147. package/presets/opencode/go/MCP.md +2 -2
  148. package/presets/opencode/go/OPENCODE.md +6 -4
  149. package/presets/opencode/go/adapter-map.json +1 -1
  150. package/presets/opencode/go/hooks/chain-team-phases.sh +175 -8
  151. package/presets/opencode/go/opencode.json +13 -1
  152. package/presets/opencode/go/team/README.md +2 -0
  153. package/presets/opencode/ios-swift/MCP.md +2 -2
  154. package/presets/opencode/ios-swift/OPENCODE.md +6 -4
  155. package/presets/opencode/ios-swift/adapter-map.json +1 -1
  156. package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +150 -7
  157. package/presets/opencode/ios-swift/opencode.json +13 -1
  158. package/presets/opencode/ios-swift/team/README.md +2 -0
  159. package/presets/opencode/ios-swift/team/fixtures/artifact-manifest.example.json +1 -0
  160. package/presets/opencode/java/OPENCODE.md +6 -4
  161. package/presets/opencode/java/adapter-map.json +1 -1
  162. package/presets/opencode/java/hooks/chain-team-phases.sh +175 -8
  163. package/presets/opencode/java/opencode.json +12 -0
  164. package/presets/opencode/java/team/README.md +2 -0
  165. package/presets/opencode/mcp-ts/OPENCODE.md +6 -4
  166. package/presets/opencode/mcp-ts/adapter-map.json +1 -1
  167. package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +179 -10
  168. package/presets/opencode/mcp-ts/opencode.json +12 -0
  169. package/presets/opencode/mcp-ts/team/README.md +2 -0
  170. package/presets/opencode/next/MCP.md +2 -2
  171. package/presets/opencode/next/OPENCODE.md +6 -4
  172. package/presets/opencode/next/adapter-map.json +1 -1
  173. package/presets/opencode/next/commands/task.md +5 -3
  174. package/presets/opencode/next/hooks/chain-team-phases.sh +99 -5
  175. package/presets/opencode/next/opencode.json +13 -1
  176. package/presets/opencode/next/team/README.md +2 -0
  177. package/presets/opencode/next/team/fixtures/artifact-manifest.example.json +1 -0
  178. package/presets/opencode/nuxt/MCP.md +2 -2
  179. package/presets/opencode/nuxt/OPENCODE.md +6 -4
  180. package/presets/opencode/nuxt/adapter-map.json +1 -1
  181. package/presets/opencode/nuxt/hooks/chain-team-phases.sh +145 -6
  182. package/presets/opencode/nuxt/opencode.json +13 -1
  183. package/presets/opencode/nuxt/team/README.md +2 -0
  184. package/presets/opencode/nuxt/team/fixtures/artifact-manifest.example.json +1 -0
  185. package/presets/opencode/php-hexagonal/OPENCODE.md +6 -4
  186. package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
  187. package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +175 -8
  188. package/presets/opencode/php-hexagonal/opencode.json +12 -0
  189. package/presets/opencode/php-hexagonal/team/README.md +2 -0
  190. package/presets/opencode/php-laravel/OPENCODE.md +6 -4
  191. package/presets/opencode/php-laravel/adapter-map.json +1 -1
  192. package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +175 -8
  193. package/presets/opencode/php-laravel/opencode.json +12 -0
  194. package/presets/opencode/php-laravel/team/README.md +2 -0
  195. package/presets/opencode/svelte/MCP.md +2 -2
  196. package/presets/opencode/svelte/OPENCODE.md +6 -4
  197. package/presets/opencode/svelte/adapter-map.json +1 -1
  198. package/presets/opencode/svelte/hooks/chain-team-phases.sh +145 -6
  199. package/presets/opencode/svelte/opencode.json +13 -1
  200. package/presets/opencode/svelte/team/README.md +2 -0
  201. package/presets/opencode/svelte/team/fixtures/artifact-manifest.example.json +1 -0
@@ -173,7 +173,21 @@ function mutateMetrics(mutator) {
173
173
  try { metrics = JSON.parse(fs.readFileSync(METRICS_PATH, 'utf8')); } catch {
174
174
  const runId = status.metricsRunId || `${slug}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
175
175
  status.metricsRunId = runId;
176
- metrics = { schemaVersion: 1, task: { runId, slug, preset: 'ai-rules', stack: STACK, platform: PLATFORM, intent: status.intent || 'unknown', profile: 'unknown' }, events: [] };
176
+ // Resolve profile from pipeline.json (preferred) or status.json, falling back to 'unknown'.
177
+ // The router/agent must never write profile into status.json — pipeline.json is the SoT.
178
+ let profile = 'unknown';
179
+ try {
180
+ if (fs.existsSync(pipelinePath)) {
181
+ const pipe = JSON.parse(fs.readFileSync(pipelinePath, 'utf8'));
182
+ if (pipe && (pipe.profile === 'light' || pipe.profile === 'standard' || pipe.profile === 'full')) {
183
+ profile = pipe.profile;
184
+ }
185
+ }
186
+ } catch {}
187
+ if (profile === 'unknown' && (status.profile === 'light' || status.profile === 'standard' || status.profile === 'full')) {
188
+ profile = status.profile;
189
+ }
190
+ metrics = { schemaVersion: 1, task: { runId, slug, preset: 'ai-rules', stack: STACK, platform: PLATFORM, intent: status.intent || 'unknown', profile }, events: [] };
177
191
  metrics.events.push({ eventId: `${runId}:task_started`, type: 'task_started', at: now, source: 'hook', attributionConfidence: 'high' });
178
192
  }
179
193
  mutator(metrics);
@@ -244,21 +258,119 @@ function resolvedAttempt() {
244
258
  const active = status.activeAttempts || {}; const entries = Object.entries(active);
245
259
  const stableAttemptId = hookInput.attemptId;
246
260
  if (stableAttemptId) {
247
- return active[stableAttemptId] ? { attemptId: stableAttemptId, entry: active[stableAttemptId], confidence: 'high' } : null;
261
+ return active[stableAttemptId]
262
+ ? { attemptId: stableAttemptId, entry: active[stableAttemptId], confidence: 'high' }
263
+ : null;
248
264
  }
249
265
  if (entries.length === 1) return { attemptId: entries[0][0], entry: entries[0][1], confidence: 'high' };
250
266
  try { const receipts = JSON.parse(fs.readFileSync(path.join(taskDir, '.metrics-receipts.json'), 'utf8')); const receipt = Array.isArray(receipts) ? receipts.find((item) => active[item.attemptId]) : null; if (receipt) return { attemptId: receipt.attemptId, entry: active[receipt.attemptId], confidence: 'fallback', source: 'agent' }; } catch {}
251
267
  return null;
252
268
  }
269
+ let artifactStallMessage = null;
270
+
271
+ // A1: seed the manifest a modern pipeline expects instead of advancing without
272
+ // one. Exclusive publish via hard link so a producer that wrote the file in the
273
+ // meantime is never overwritten; returns null on success (or when the file
274
+ // appeared) and the fs error otherwise.
275
+ function writeSkeletonManifest(manifestPath) {
276
+ const temporary = `${manifestPath}.${process.pid}.${Date.now()}.seed`;
277
+ const body = JSON.stringify({ schemaVersion: 1, slug, artifacts: [] }, null, 2) + '\n';
278
+ let descriptor = null;
279
+ try {
280
+ descriptor = fs.openSync(temporary, 'wx');
281
+ try { fs.writeSync(descriptor, body); try { fs.fsyncSync(descriptor); } catch {} } finally { fs.closeSync(descriptor); descriptor = null; }
282
+ fs.linkSync(temporary, manifestPath);
283
+ fs.unlinkSync(temporary);
284
+ return null;
285
+ } catch (error) {
286
+ if (descriptor !== null) { try { fs.closeSync(descriptor); } catch {} }
287
+ try { fs.unlinkSync(temporary); } catch {}
288
+ if (error && error.code === 'EEXIST' && fs.existsSync(manifestPath)) return null;
289
+ return String(error && error.message ? error.message : error);
290
+ }
291
+ }
292
+
293
+ // A2: a `completed` receipt must cite evidence the harness can inspect. Order is
294
+ // the message order — the first failing predicate wins, so the operator sees one
295
+ // actionable line. `authoritativePaths[]` stays task-dir-relative; external
296
+ // references belong in `evidencePaths[]`.
297
+ function validateCompletedArtifact(entry) {
298
+ const artifactId = entry && entry.id ? entry.id : '(unnamed)';
299
+ const entryStatus = entry && entry.status;
300
+ if (entryStatus !== 'completed') {
301
+ return `[chain-team-phases] ${slug}: receipt "${artifactId}" has receipt.outcome "completed" but entry status "${entryStatus}". Make entry.status and receipt.outcome agree, then resume with: /task-continue ${slug}`;
302
+ }
303
+ const authoritativePaths = entry && Array.isArray(entry.authoritativePaths) ? entry.authoritativePaths : [];
304
+ if (authoritativePaths.length === 0) {
305
+ return `[chain-team-phases] ${slug}: receipt "${artifactId}" is "completed" but authoritativePaths[] is empty. Record at least one file you produced under .ai.local/team/tasks/${slug}/, then resume with: /task-continue ${slug}`;
306
+ }
307
+ for (const cited of authoritativePaths) {
308
+ const value = typeof cited === 'string' ? cited.trim() : '';
309
+ const resolvedPath = value ? path.resolve(taskDir, value) : taskDir;
310
+ const relative = path.relative(taskDir, resolvedPath);
311
+ const escapes = !value || path.isAbsolute(value) || relative === '' || relative === '..' || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative);
312
+ if (escapes) {
313
+ return `[chain-team-phases] ${slug}: receipt "${artifactId}" cites "${value}", which resolves outside .ai.local/team/tasks/${slug}/ (relative: "${relative}"). Cite a task-relative path; keep external references in evidencePaths[]. Then resume with: /task-continue ${slug}`;
314
+ }
315
+ let stat = null;
316
+ try { stat = fs.statSync(resolvedPath); } catch {}
317
+ if (!stat || !stat.isFile()) {
318
+ return `[chain-team-phases] ${slug}: receipt "${artifactId}" cites "${value}" but no such file exists under .ai.local/team/tasks/${slug}/. Write the file, then resume with: /task-continue ${slug}`;
319
+ }
320
+ if (/\.md[c]?$/i.test(value)) {
321
+ let content = '';
322
+ try { content = fs.readFileSync(resolvedPath, 'utf8'); } catch {}
323
+ if (!/\S/.test(content)) {
324
+ return `[chain-team-phases] ${slug}: receipt "${artifactId}" is "completed" but authoritative path "${value}" has no non-whitespace content. Produce the artifact, then resume with: /task-continue ${slug}`;
325
+ }
326
+ }
327
+ }
328
+ return null;
329
+ }
330
+
253
331
  function readBoundReceiptOutcome(agent, step, resolved) {
254
332
  if (!agent || !resolved) return { outcome: null, receiptRequired: false };
255
333
  const manifestPath = path.join(taskDir, 'artifact-manifest.json');
256
- if (!fs.existsSync(manifestPath)) return { outcome: null, receiptRequired: false };
334
+ const expectedOutputId = artifactOutputIdFor(step, agent);
335
+ if (!fs.existsSync(manifestPath)) {
336
+ // A1: absent manifest + a parsed modern pipeline denies silent advancement.
337
+ // Legacy/step-less pipelines keep their previous behaviour (legacyFlow owns them).
338
+ if (!(Array.isArray(steps) && steps.length > 0)) return { outcome: null, receiptRequired: false };
339
+ const seeded = writeSkeletonManifest(manifestPath);
340
+ const stepIndex = typeof resolved.entry.stepIndex === 'number' ? resolved.entry.stepIndex : 0;
341
+ if (seeded) {
342
+ return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: artifact-manifest.json is missing and the skeleton could not be written (${seeded}). Create .ai.local/team/tasks/${slug}/artifact-manifest.json with {schemaVersion:1, slug, artifacts:[]}, add the receipt for artifactOutputId "${expectedOutputId}", then resume with: /task-continue ${slug}` };
343
+ }
344
+ return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: no artifact-manifest.json for step ${stepIndex} (${agent}). Wrote a skeleton {schemaVersion:1, slug, artifacts:[]}. Expected artifactOutputId "${expectedOutputId}". Write the artifact and its receipt, then resume with: /task-continue ${slug}` };
345
+ }
257
346
  try {
258
347
  const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
348
+ // Guard: the schema key is `artifacts` (see agent-artifact-contracts.md). A top-level
349
+ // `entries` key is a silent bug — producer wrote to a wrong field, hook would not
350
+ // see the receipt, and the step hangs in `awaiting_artifact_receipt`. Warn loudly.
351
+ if (manifest && typeof manifest === 'object' && !Array.isArray(manifest.artifacts) && Array.isArray(manifest.entries)) {
352
+ process.stderr.write(`WARNING: ${manifestPath} has top-level "entries" but no "artifacts" array; reading only "artifacts" per schema. The producer likely upserted into the wrong key. See agent-artifact-contracts.md (Schema field name).` + '\n');
353
+ } else if (manifest && typeof manifest === 'object' && Array.isArray(manifest.entries) && Array.isArray(manifest.artifacts)) {
354
+ process.stderr.write(`WARNING: ${manifestPath} has both "artifacts" and "entries" keys; reading only "artifacts" per schema. Foreign "entries" content is ignored.` + '\n');
355
+ }
259
356
  const artifacts = Array.isArray(manifest.artifacts) ? manifest.artifacts : [];
260
- const expectedOutputId = artifactOutputIdFor(step, agent);
261
357
  const attemptStartedAt = Date.parse(resolved.entry.startedAt);
358
+ // Pre-scan: warn on the silent-bug classes the filter below would otherwise drop.
359
+ // A receipt with a non-matching attemptId is dropped silently; without this warning,
360
+ // the step hangs in `awaiting_artifact_receipt` with no signal of why. Same for
361
+ // receipts whose terminal timestamp is older than the active attempt (stale retry).
362
+ const activeIds = new Set(Object.keys(status.activeAttempts || {}));
363
+ for (const entry of artifacts) {
364
+ if (!entry || entry.producer !== agent || !entry.receipt || typeof entry.receipt.outcome !== 'string') continue;
365
+ const rid = entry.receipt.attemptId;
366
+ if (typeof rid === 'string' && rid !== resolved.attemptId && !activeIds.has(rid)) {
367
+ process.stderr.write(`WARNING: ${manifestPath} receipt for producer "${agent}" id "${entry.id}" carries attemptId "${rid}" that does not match the active attempt "${resolved.attemptId}". The receipt is being dropped; step will hang in \`awaiting_artifact_receipt\` unless the producer retries. Common cause: agent reused an attemptId from a prior failed attempt. See agent-artifact-contracts.md (Receipt binding).` + '\n');
368
+ }
369
+ const terminalAt = Date.parse(entry.timestamps?.completedAt || entry.timestamps?.updatedAt || '');
370
+ if (Number.isFinite(attemptStartedAt) && Number.isFinite(terminalAt) && terminalAt < attemptStartedAt) {
371
+ process.stderr.write(`WARNING: ${manifestPath} receipt for producer "${agent}" id "${entry.id}" has timestamps.completedAt older than the active attempt's startedAt. Likely a stale receipt from a previous attempt; it is being dropped. See agent-artifact-contracts.md (Receipt binding).` + '\n');
372
+ }
373
+ }
262
374
  const owned = artifacts
263
375
  .filter((entry) => {
264
376
  if (!entry || entry.producer !== agent || !entry.receipt || typeof entry.receipt.outcome !== 'string') return false;
@@ -273,19 +385,33 @@ function readBoundReceiptOutcome(agent, step, resolved) {
273
385
  const tb = Date.parse(b.timestamps?.completedAt || b.timestamps?.updatedAt || 0) || 0;
274
386
  return tb - ta;
275
387
  });
276
- return { outcome: owned[0]?.receipt?.outcome || null, receiptRequired: true };
388
+ // Bonus: warn if the active attempt's receipts all lack attemptId in a non-parallel step.
389
+ // The orchestrator always provides attemptId, so a missing one means the agent dropped it
390
+ // (model output, JSON.stringify omission, etc.). boundByOutput still binds the receipt by
391
+ // expectedOutputId, so this is not fatal — but it is a contract violation worth flagging.
392
+ if (owned.length > 0 && owned[0].receipt.attemptId == null && !(step && step.parallel && Array.isArray(getStepAgents(step)) && getStepAgents(step).length > 1)) {
393
+ process.stderr.write(`WARNING: ${manifestPath} receipt for producer "${agent}" id "${owned[0].id}" lacks entry.receipt.attemptId on a non-parallel step. The receipt is bound by output-id fallback; the agent should always include the attemptId the orchestrator provides. See agent-artifact-contracts.md (Receipt binding).` + '\n');
394
+ }
395
+ const outcome = owned[0]?.receipt?.outcome || null;
396
+ if (outcome === 'completed') {
397
+ const stallMessage = validateCompletedArtifact(owned[0]);
398
+ if (stallMessage) return { outcome: null, receiptRequired: true, stallMessage };
399
+ }
400
+ return { outcome, receiptRequired: true };
277
401
  } catch {
278
402
  return { outcome: null, receiptRequired: false };
279
403
  }
280
404
  }
281
405
  function reconcileStatusFromManifest(agent, step, resolved) {
282
406
  const terminal = new Set(['completed', 'blocked', 'changes_requested', 'validation_failed']);
283
- const { outcome, receiptRequired } = readBoundReceiptOutcome(agent, step, resolved);
407
+ artifactStallMessage = null;
408
+ const { outcome, receiptRequired, stallMessage } = readBoundReceiptOutcome(agent, step, resolved);
284
409
  if (terminal.has(outcome)) {
285
410
  status.state = outcome;
286
411
  return outcome;
287
412
  }
288
413
  if (receiptRequired) {
414
+ artifactStallMessage = stallMessage || null;
289
415
  status.state = 'awaiting_artifact_receipt';
290
416
  status.phase = 'blocked';
291
417
  return status.state;
@@ -344,6 +470,15 @@ function out(message) {
344
470
  process.stdout.write(JSON.stringify({ followup_message: message }));
345
471
  }
346
472
 
473
+ // The stall text always reaches stderr so a second, different rejection is never
474
+ // silent; `out()` fires only when the stop enters the stall, so the follow-up
475
+ // message cannot loop.
476
+ function emitArtifactStall(message, announce) {
477
+ if (message) process.stderr.write(message + '\n');
478
+ if (message && announce) out(message);
479
+ else process.stdout.write('{}');
480
+ }
481
+
347
482
  function readArtifact(name) {
348
483
  const p = path.join(taskDir, name);
349
484
  if (!fs.existsSync(p)) return '';
@@ -600,22 +735,22 @@ const AGENT_HANDOFF = {
600
735
  `Use ci-investigation skill. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
601
736
  'feature-developer': (s) =>
602
737
  `Invoke feature-developer for slug "${s}". Read brief.md, decomposition.md, validation-report.md, review.md, architecture.md, migration-plan.md, api-contract-review.md, debug-report.md if present. ` +
603
- `Follow feature-delivery-workflow.mdc and reference-features.mdc. Prefer internal/domain|application|adapters and cmd/ composition root. ` +
738
+ `Follow architecture/feature-delivery.md and architecture/reference-features.md. Prefer internal/domain|application|adapters and cmd/ composition root. ` +
604
739
  `Include table-driven go test coverage for domain/use cases before handoff. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
605
740
  'build-verifier': (s) =>
606
- `Invoke build-verifier (readonly) for slug "${s}". Follow go-tooling.mdc and post-change-test.mdc. ` +
741
+ `Invoke build-verifier (readonly) for slug "${s}". Follow tooling-and-review/go-tooling.md and tooling-and-review/post-change-test.md. ` +
607
742
  `Run go test ./..., go vet ./..., and golangci-lint/staticcheck if configured — never yarn/ESLint/Stylelint. ` +
608
743
  `Write validation-report.md and emit receipt outcome completed or validation_failed. Do not edit production code.`,
609
744
  'performance-auditor': (s) =>
610
745
  `Invoke performance-auditor (readonly) for slug "${s}". Audit Go hot paths/allocs/DB N+1/pprof risks; write perf-report.md. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
611
746
  'code-reviewer': (s) =>
612
- `Invoke code-reviewer subagent (readonly) for slug "${s}". Review git diff vs brief.md per code-review-mr.mdc (hexagonal boundaries). ` +
747
+ `Invoke code-reviewer subagent (readonly) for slug "${s}". Review git diff vs brief.md per tooling-and-review/code-review.md (hexagonal boundaries). ` +
613
748
  `Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
614
749
  'security-reviewer': (s) =>
615
- `Invoke security-reviewer (readonly) for slug "${s}". Follow security-go.mdc; write security-review.md. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
750
+ `Invoke security-reviewer (readonly) for slug "${s}". Follow tooling-and-review/security-go.md; write security-review.md. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
616
751
  'qa-tester': (s, scope) =>
617
752
  `Invoke qa-tester for slug "${s}"${scope ? ` (scope: ${scope})` : ''}. ` +
618
- `Add/update go unit and integration tests per brief. Follow tests-unit.mdc, tests-integration.mdc, and skill integration-testing. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
753
+ `Add/update go unit and integration tests per brief. Follow testing/unit.md, testing/integration.md, and skill integration-testing. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
619
754
  'unit-test-planner': (s) =>
620
755
  `Invoke unit-test-planner for slug "${s}". Write unit-test-plan.md for table-driven go test. Use unit-testing skill. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
621
756
  'unit-test-generator': (s) =>
@@ -624,13 +759,13 @@ const AGENT_HANDOFF = {
624
759
  `Invoke unit-test-healer for slug "${s}". Fix failing unit tests. Use unit-testing and debug-investigation skills. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
625
760
  'integration-test-planner': (s) =>
626
761
  `Invoke integration-test-planner for slug "${s}". Create/update integration test plans (httptest/testcontainers/adapter contracts). ` +
627
- `Follow tests-integration.mdc and the integration-testing skill. Do not use browser e2e tooling. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
762
+ `Follow testing/integration.md and the integration-testing skill. Do not use browser e2e tooling. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
628
763
  'integration-test-generator': (s) =>
629
764
  `Invoke integration-test-generator for slug "${s}". Generate/update *_integration_test.go from plans. ` +
630
- `Follow tests-integration.mdc and the integration-testing skill. Do not use browser e2e tooling. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
765
+ `Follow testing/integration.md and the integration-testing skill. Do not use browser e2e tooling. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
631
766
  'integration-test-healer': (s) =>
632
767
  `Invoke integration-test-healer for slug "${s}". Fix failing/flaky integration tests while preserving plan assertions. ` +
633
- `Follow tests-integration.mdc, integration-testing, and debug-investigation. Do not use browser e2e tooling. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
768
+ `Follow testing/integration.md, integration-testing, and debug-investigation. Do not use browser e2e tooling. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
634
769
  'tech-writer': (s) =>
635
770
  `Invoke tech-writer for slug "${s}". Write documentation.md from task artifacts. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
636
771
  'openspec-author': (s, scope) =>
@@ -643,11 +778,11 @@ const AGENT_HANDOFF = {
643
778
 
644
779
  const REVIEW_AGENTS = new Set([
645
780
  'code-reviewer',
781
+ 'accessibility-reviewer',
646
782
  'security-reviewer',
647
783
  'api-contract-reviewer',
648
784
  ]);
649
785
 
650
-
651
786
  function metricsHandoff(agent) {
652
787
  const matches = Object.entries(status.activeAttempts || {}).filter(([, entry]) => entry.agent === agent);
653
788
  if (matches.length === 1) {
@@ -921,10 +1056,11 @@ const completingAgentHint = (() => {
921
1056
  return getStepAgents(initialStep)[0];
922
1057
  })();
923
1058
  const reconcilingAttempt = resolvedAttempt();
1059
+ const wasWaitingForReceipt = status.state === 'awaiting_artifact_receipt';
924
1060
  reconcileStatusFromManifest(completingAgentHint, initialStep, reconcilingAttempt);
925
1061
  if (status.state === 'awaiting_artifact_receipt') {
926
1062
  writeStatus({});
927
- process.stdout.write('{}');
1063
+ emitArtifactStall(artifactStallMessage, !wasWaitingForReceipt);
928
1064
  process.exit(0);
929
1065
  }
930
1066
  let finishedAttempt = finishActiveAttempt();
@@ -934,6 +1070,11 @@ if (!finishedAttempt && activeAttemptCountBeforeFinish > 0) {
934
1070
  if (repaired) {
935
1071
  appendMetric({ type: 'parallel_attribution_repair', at: now, attemptIds: [repaired.attemptId], source: 'hook', attributionConfidence: 'fallback' });
936
1072
  reconcileStatusFromManifest(repaired.entry.agent, steps[repaired.entry.stepIndex], repaired);
1073
+ if (status.state === 'awaiting_artifact_receipt') {
1074
+ writeStatus({});
1075
+ emitArtifactStall(artifactStallMessage, true);
1076
+ process.exit(0);
1077
+ }
937
1078
  finishedAttempt = finishActiveAttempt(repaired);
938
1079
  } else {
939
1080
  writeStatus({});
@@ -990,6 +1131,7 @@ const waveIndexes = activeWave
990
1131
  ? [idx]
991
1132
  : (isGraphMode() && finishedAttempt ? [completedStepIndex] : null));
992
1133
 
1134
+
993
1135
  if (waveIndexes) {
994
1136
  const waveAgents = waveIndexes.flatMap((i) => getStepAgents(steps[i]));
995
1137
  const done = [...(status.parallelCompleted || [])];
@@ -1042,6 +1184,20 @@ if (waveIndexes) {
1042
1184
  }
1043
1185
 
1044
1186
  const retryReviewer = waveAgents.find((agent) => outcomes[agent]?.outcome === 'changes_requested');
1187
+ if (retryReviewer === 'mockup-reviewer') {
1188
+ beginHumanGate();
1189
+ writeStatus({
1190
+ awaitingHumanGate: true,
1191
+ state: 'awaiting_approval',
1192
+ currentAgent: 'mockup-reviewer',
1193
+ parallelCompleted: [],
1194
+ parallelOutcomes: {},
1195
+ waveSteps: [],
1196
+ waveId: null,
1197
+ });
1198
+ out(`Mockup review FAIL for slug "${slug}". Read mockup-review.md. Resume only via /task-continue. Do not retry feature-developer.`);
1199
+ process.exit(0);
1200
+ }
1045
1201
  if (retryReviewer) {
1046
1202
  if (isGraphMode()) {
1047
1203
  const reviewerStepIndex = waveIndexes.find((i) => getStepAgents(steps[i]).includes(retryReviewer));
@@ -1148,6 +1304,17 @@ if (status.state === 'blocked') {
1148
1304
  process.exit(0);
1149
1305
  }
1150
1306
 
1307
+ if (status.state === 'changes_requested' && (completedAgent === 'mockup-reviewer' || status.currentAgent === 'mockup-reviewer')) {
1308
+ beginHumanGate();
1309
+ writeStatus({
1310
+ awaitingHumanGate: true,
1311
+ state: 'awaiting_approval',
1312
+ currentAgent: 'mockup-reviewer',
1313
+ });
1314
+ out(`Mockup review FAIL for slug "${slug}". Read mockup-review.md. Resume only via /task-continue. Do not retry feature-developer.`);
1315
+ process.exit(0);
1316
+ }
1317
+
1151
1318
  if (status.state === 'changes_requested') {
1152
1319
  const reviewer = status.currentAgent || finishedAttempt?.entry?.agent;
1153
1320
  if (!reviewer) {
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "figma": {
8
8
  "type": "http",
9
- "url": "https://mcp.figma.com/mcp"
9
+ "url": "http://127.0.0.1:3845/mcp"
10
10
  }
11
11
  }
12
12
  }
@@ -32,10 +32,14 @@ Roster of specialists is **stack-specific** (agent names and write scopes differ
32
32
  | Tests | unit planner/generator/healer; e2e/UI planner/generator/healer (stack-native) |
33
33
  | Docs | `tech-writer` |
34
34
 
35
- **Cursor frontmatter:** all team pipeline agents use `readonly: false` so they can write team artifacts. Production/app restrictions live in the agent prompt body — do **not** set `readonly: true`.
35
+ **Claude packaging:** team pipeline agents are Markdown files with YAML frontmatter under `.claude/agents/`; subagents are invoked with the Task tool and start with no always-on context, so each prompt re-declares the rules it needs. Production/app restrictions live in the agent prompt body. See `agents/README.md`.
36
36
 
37
37
  Full prompts: stack `agents/*.md`. Artifact conventions: stack `team/README.md`; schema SoT: **agent-artifact-contracts**.
38
38
 
39
+ ## Stack notes
40
+
41
+ Roles, write scopes, and Claude `tools` / frontmatter packaging — **`agents/README.md`**.
42
+
39
43
  ## Dynamic pipeline
40
44
 
41
45
  ```mermaid
@@ -203,7 +207,7 @@ On each `subagentStop`, the hook reconciles `status.state` from the completing p
203
207
  12. **Invoke the ready set, and never advance before reconciliation.** In graph mode the hook computes the ready queue; invoke exactly the handoff's agent list (a wave in one assistant turn, multiple Task calls) and do not start any next step from your own reasoning until the hook records the join and emits the next handoff. The wave is the join unit; `status.joinedSlots` is the satisfaction ledger.
204
208
  13. **Only a proven conflict-free set is `parallel: true`.** Disjoint declared `writeScopes`, distinct agents, distinct `artifactOutputIds`, no shared lifecycle file; `mockup-reviewer` is never parallel (its FAIL gate is serial). See **plan-graph** § Conflict model.
205
209
 
206
- ## Team artifact I/O (Cursor Shell sandbox)
210
+ ## Team artifact I/O
207
211
 
208
212
  - **Persist the original prompt.** For **every** task — `/task` or a routed work request — write the user's **verbatim** prompt to `.ai.local/team/tasks/<slug>/prompt.md` during slug bootstrap (write-if-absent; never overwrite on resume). The header is additive provenance only; the fenced text block holds the user's words unchanged. It is not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt artifact.
209
213
  - **Append follow-up prompts.** When a user-authored prompt arrives for an active slug (new message, `/task-continue` args, gate feedback, clarification), append it verbatim to `.ai.local/team/tasks/<slug>/prompt-log.md` — `seq` = current max + 1, create on first append, never rewrite or duplicate an entry, never touch `prompt.md`. Exclude hook `followup_message` and empty/argument-less invocations. Not a manifest `artifacts[]` body — the path lives on the `routing` entry. See **agent-artifact-contracts** § Prompt log.
@@ -249,12 +253,3 @@ When user describes a **non-trivial task** (not a question), suggest `/task <mes
249
253
  ## Preset authoring
250
254
 
251
255
  When the work edits `packages/ai-rules/presets/**` (or dogfood `.cursor/` sync of presets), follow meta-rules: **preset-goals**, **preset-pr-checklist**, **preset-twin-sync**, **preset-layering**, **preset-token-budget**, **preset-no-cross-stack-leakage**.
252
-
253
- ## Stack notes
254
-
255
- - Scope: Go hexagonal modules (`internal/`, `cmd/`) — not Next `app/src` or iOS `Features/`.
256
- - **No `accessibility-reviewer`** agent (no UI surface) — do not schedule it; `task-router` bans it. Gates: `build-verifier`, `code-reviewer`, `security-reviewer`, `performance-auditor`.
257
- - E2E/integration intents use **`integration-test-*`** agents — never Playwright or XCUITest.
258
- - After Go code changes, pipeline includes **build-verifier** with `go test` / `post-change-test`.
259
-
260
- **Product specs:** When `/task` or `/spec-start` touches pages/features/`docs/specs`: if INDEX exists and no generate intent → instruct next agent to load requestable **`product-specs`** (consume; soft-fail; never invent). If generate/bootstrap/`spec-gen` → load **`product-specs-authoring`** + skill **`spec-authoring`** inside **task-analyst** (not a separate pipeline step); pass created spec paths + INDEX diff in handoff; human gate must approve before feature-developer. No-op if INDEX absent and no author intent.
@@ -74,6 +74,8 @@ Same JSON on Claude, Mavis, or OpenCode: `bash .<tool>/hooks/chain-team-phases.s
74
74
 
75
75
  ## Contracts
76
76
 
77
+ - **Manifest field name:** receipts go in `artifacts[]`. Anything written under `entries` is ignored — the hook reads only `artifacts` and prints a dual-read warning naming the file. See `agent-team/agent-artifact-contracts.md` § Schema field name.
78
+ - **Evidence paths:** `authoritativePaths[]` must be task-relative (`.ai.local/team/tasks/<slug>/…`). Put anything outside the task directory — e.g. `openspec/changes/**` — in `evidencePaths[]`.
77
79
  - Manifest schema: shared core `agent-team/agent-artifact-contracts.md`. Read it first; producers upsert only their IDs.
78
80
  - Metrics: append-only allowlisted events — `agent-team/agent-task-metrics.md`. Aggregate: `node node_modules/@bonesofspring/ai-rules/scripts/aggregate-agent-task-metrics.mjs --team-root .ai.local/team`.
79
81
  - Commit `.ai.local/team/` templates (and slugs if you want them in clones).
@@ -89,9 +91,3 @@ Same JSON on Claude, Mavis, or OpenCode: `bash .<tool>/hooks/chain-team-phases.s
89
91
  **Checkpoint / resume:** progress is checkpointed to `tasks/<slug>/.memlog.md` (`## <date>` + `event:` entries) and the `artifact-manifest.json` `implementation` entry (`authoritativePaths`). A resumed run reads both and continues at the first stage whose exit criteria are unmet.
90
92
 
91
93
  **Self-review / re-anchor:** each producing agent records a `## Self-review` block in the artifact it owns (`brief.md` / `implementation.md` / `debug-report.md` / `validation-report.md` / `review.md`) and, on detected context loss / excess, a re-anchor line in `.memlog.md` — `event:` (no plan change) or `decision: replan rev N → N+1` (plan change). No hook/lifecycle field is added.
92
-
93
- ## Contracts
94
-
95
- - Manifest schema: shared core `agent-team/agent-artifact-contracts.md`. Read it first; producers upsert only their IDs.
96
- - Metrics: append-only allowlisted events — `agent-team/agent-task-metrics.md`. Aggregate: `node node_modules/@bonesofspring/ai-rules/scripts/aggregate-agent-task-metrics.mjs --team-root .ai.local/team`.
97
- - Commit `.ai.local/team/` templates (and slugs if you want them in clones).
@@ -7,11 +7,11 @@ Copied to `.claude/mcp.json` on `ai-rules init cursor --preset ios-swift`.
7
7
  | Name | Package | Purpose |
8
8
  |------|---------|---------|
9
9
  | `context7` | `@upstash/context7-mcp` | Up-to-date Swift / SwiftUI / Apple frameworks docs |
10
- | `figma` | remote `https://mcp.figma.com/mcp` | Design context → SwiftUI; OAuth in the Claude Code / MCP client |
10
+ | `figma` | desktop `http://127.0.0.1:3845/mcp` | Design context → SwiftUI; local desktop server (enable in Figma Desktop, Dev/Full seat) |
11
11
 
12
12
  Playwright / Chrome DevTools are **not** part of the ios preset (browser e2e is forbidden for the agent team).
13
13
 
14
- Do not put secrets in the file. Optional: `CONTEXT7_API_KEY` in the environment. Figma — OAuth (do not commit the token).
14
+ Do not put secrets in the file. Optional: `CONTEXT7_API_KEY` in the environment. Figma — local desktop server (enable in Figma Desktop, Dev/Full seat).
15
15
 
16
16
 
17
17
  ## Agent usage