@ambystech/ambykit 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/CHANGELOG.md +125 -1
  2. package/README.md +16 -4
  3. package/dist/cli/activity.d.ts +5 -1
  4. package/dist/cli/activity.js +22 -8
  5. package/dist/cli/activity.js.map +1 -1
  6. package/dist/cli/add.js +12 -5
  7. package/dist/cli/add.js.map +1 -1
  8. package/dist/cli/analyze.d.ts +1 -1
  9. package/dist/cli/analyze.js +83 -6
  10. package/dist/cli/analyze.js.map +1 -1
  11. package/dist/cli/base-command.js +12 -0
  12. package/dist/cli/base-command.js.map +1 -1
  13. package/dist/cli/check.js +36 -3
  14. package/dist/cli/check.js.map +1 -1
  15. package/dist/cli/dashboard.js +3 -1
  16. package/dist/cli/dashboard.js.map +1 -1
  17. package/dist/cli/directive.d.ts +7 -0
  18. package/dist/cli/directive.js +43 -0
  19. package/dist/cli/directive.js.map +1 -0
  20. package/dist/cli/fleet.d.ts +16 -0
  21. package/dist/cli/fleet.js +472 -0
  22. package/dist/cli/fleet.js.map +1 -0
  23. package/dist/cli/graph.d.ts +13 -0
  24. package/dist/cli/graph.js +40 -0
  25. package/dist/cli/graph.js.map +1 -0
  26. package/dist/cli/index.js +12 -0
  27. package/dist/cli/index.js.map +1 -1
  28. package/dist/cli/io/fsops.d.ts +9 -0
  29. package/dist/cli/io/fsops.js +70 -1
  30. package/dist/cli/io/fsops.js.map +1 -1
  31. package/dist/cli/lane.d.ts +20 -0
  32. package/dist/cli/lane.js +396 -0
  33. package/dist/cli/lane.js.map +1 -0
  34. package/dist/cli/mcp.d.ts +21 -0
  35. package/dist/cli/mcp.js +27 -0
  36. package/dist/cli/mcp.js.map +1 -0
  37. package/dist/cli/sync.d.ts +9 -1
  38. package/dist/cli/sync.js +61 -7
  39. package/dist/cli/sync.js.map +1 -1
  40. package/dist/cli/trace.d.ts +14 -0
  41. package/dist/cli/trace.js +89 -0
  42. package/dist/cli/trace.js.map +1 -0
  43. package/dist/cli/ui/dashboard/feature-chart.js +15 -2
  44. package/dist/cli/ui/dashboard/feature-chart.js.map +1 -1
  45. package/dist/cli/ui/dashboard/feature-view.js +11 -1
  46. package/dist/cli/ui/dashboard/feature-view.js.map +1 -1
  47. package/dist/cli/ui/dashboard/graph-view.d.ts +44 -0
  48. package/dist/cli/ui/dashboard/graph-view.js +78 -0
  49. package/dist/cli/ui/dashboard/graph-view.js.map +1 -0
  50. package/dist/cli/ui/dashboard/help-overlay.d.ts +1 -1
  51. package/dist/cli/ui/dashboard/help-overlay.js +9 -0
  52. package/dist/cli/ui/dashboard/help-overlay.js.map +1 -1
  53. package/dist/cli/ui/dashboard/live-tokens.d.ts +221 -0
  54. package/dist/cli/ui/dashboard/live-tokens.js +221 -0
  55. package/dist/cli/ui/dashboard/live-tokens.js.map +1 -1
  56. package/dist/cli/ui/dashboard/quality-view.d.ts +8 -0
  57. package/dist/cli/ui/dashboard/quality-view.js +31 -0
  58. package/dist/cli/ui/dashboard/quality-view.js.map +1 -0
  59. package/dist/cli/ui/dashboard/story-detail.d.ts +1 -1
  60. package/dist/cli/ui/dashboard/story-detail.js +10 -3
  61. package/dist/cli/ui/dashboard/story-detail.js.map +1 -1
  62. package/dist/cli/ui/dashboard/tokens.d.ts +26 -0
  63. package/dist/cli/ui/dashboard/tokens.js +26 -0
  64. package/dist/cli/ui/dashboard/tokens.js.map +1 -1
  65. package/dist/cli/ui/dashboard/worktrees-panel.js +21 -3
  66. package/dist/cli/ui/dashboard/worktrees-panel.js.map +1 -1
  67. package/dist/cli/ui/interactive/live.js +3 -0
  68. package/dist/cli/ui/interactive/live.js.map +1 -1
  69. package/dist/cli/ui/interactive/overview.d.ts +13 -1
  70. package/dist/cli/ui/interactive/overview.js +62 -0
  71. package/dist/cli/ui/interactive/overview.js.map +1 -1
  72. package/dist/cli/ui/interactive/prompt.d.ts +17 -2
  73. package/dist/cli/ui/interactive/prompt.js +39 -9
  74. package/dist/cli/ui/interactive/prompt.js.map +1 -1
  75. package/dist/cli/ui/tool-options.d.ts +3 -2
  76. package/dist/cli/ui/tool-options.js +3 -3
  77. package/dist/cli/ui/tool-options.js.map +1 -1
  78. package/dist/cli/update.d.ts +1 -1
  79. package/dist/cli/update.js +8 -3
  80. package/dist/cli/update.js.map +1 -1
  81. package/dist/core/activity.d.ts +19 -2
  82. package/dist/core/activity.js +23 -7
  83. package/dist/core/activity.js.map +1 -1
  84. package/dist/core/agents.d.ts +1 -1
  85. package/dist/core/agents.js +9 -0
  86. package/dist/core/agents.js.map +1 -1
  87. package/dist/core/analyze.d.ts +86 -2
  88. package/dist/core/analyze.js +211 -63
  89. package/dist/core/analyze.js.map +1 -1
  90. package/dist/core/checkouts.d.ts +11 -0
  91. package/dist/core/checkouts.js +84 -10
  92. package/dist/core/checkouts.js.map +1 -1
  93. package/dist/core/config.d.ts +28 -1
  94. package/dist/core/config.js +44 -0
  95. package/dist/core/config.js.map +1 -1
  96. package/dist/core/dashboard.d.ts +17 -0
  97. package/dist/core/dashboard.js +29 -1
  98. package/dist/core/dashboard.js.map +1 -1
  99. package/dist/core/decisions.d.ts +60 -0
  100. package/dist/core/decisions.js +231 -0
  101. package/dist/core/decisions.js.map +1 -0
  102. package/dist/core/emit.d.ts +21 -1
  103. package/dist/core/emit.js +93 -4
  104. package/dist/core/emit.js.map +1 -1
  105. package/dist/core/features.js +6 -1
  106. package/dist/core/features.js.map +1 -1
  107. package/dist/core/fleet/claims.d.ts +45 -0
  108. package/dist/core/fleet/claims.js +85 -0
  109. package/dist/core/fleet/claims.js.map +1 -0
  110. package/dist/core/fleet/directives.d.ts +56 -0
  111. package/dist/core/fleet/directives.js +99 -0
  112. package/dist/core/fleet/directives.js.map +1 -0
  113. package/dist/core/fleet/flow-input.d.ts +6 -0
  114. package/dist/core/fleet/flow-input.js +35 -0
  115. package/dist/core/fleet/flow-input.js.map +1 -0
  116. package/dist/core/fleet/index.d.ts +9 -0
  117. package/dist/core/fleet/index.js +10 -0
  118. package/dist/core/fleet/index.js.map +1 -0
  119. package/dist/core/fleet/lane-status.d.ts +39 -0
  120. package/dist/core/fleet/lane-status.js +63 -0
  121. package/dist/core/fleet/lane-status.js.map +1 -0
  122. package/dist/core/fleet/lock.d.ts +23 -0
  123. package/dist/core/fleet/lock.js +103 -0
  124. package/dist/core/fleet/lock.js.map +1 -0
  125. package/dist/core/fleet/notes.d.ts +31 -0
  126. package/dist/core/fleet/notes.js +56 -0
  127. package/dist/core/fleet/notes.js.map +1 -0
  128. package/dist/core/fleet/run-flow.d.ts +157 -0
  129. package/dist/core/fleet/run-flow.js +205 -0
  130. package/dist/core/fleet/run-flow.js.map +1 -0
  131. package/dist/core/fleet/runs.d.ts +46 -0
  132. package/dist/core/fleet/runs.js +182 -0
  133. package/dist/core/fleet/runs.js.map +1 -0
  134. package/dist/core/fleet/types.d.ts +63 -0
  135. package/dist/core/fleet/types.js +11 -0
  136. package/dist/core/fleet/types.js.map +1 -0
  137. package/dist/core/graph-format.d.ts +51 -0
  138. package/dist/core/graph-format.js +99 -0
  139. package/dist/core/graph-format.js.map +1 -0
  140. package/dist/core/graph-paths.d.ts +27 -0
  141. package/dist/core/graph-paths.js +94 -0
  142. package/dist/core/graph-paths.js.map +1 -0
  143. package/dist/core/graph-scope.d.ts +7 -0
  144. package/dist/core/graph-scope.js +31 -0
  145. package/dist/core/graph-scope.js.map +1 -0
  146. package/dist/core/graph-types.d.ts +55 -0
  147. package/dist/core/graph-types.js +6 -0
  148. package/dist/core/graph-types.js.map +1 -0
  149. package/dist/core/graph.d.ts +14 -0
  150. package/dist/core/graph.js +144 -0
  151. package/dist/core/graph.js.map +1 -0
  152. package/dist/core/index.d.ts +13 -0
  153. package/dist/core/index.js +13 -0
  154. package/dist/core/index.js.map +1 -1
  155. package/dist/core/lanes.d.ts +116 -0
  156. package/dist/core/lanes.js +225 -0
  157. package/dist/core/lanes.js.map +1 -0
  158. package/dist/core/legacy.d.ts +10 -0
  159. package/dist/core/legacy.js +35 -0
  160. package/dist/core/legacy.js.map +1 -0
  161. package/dist/core/markers.d.ts +44 -0
  162. package/dist/core/markers.js +139 -0
  163. package/dist/core/markers.js.map +1 -0
  164. package/dist/core/merge-json.d.ts +15 -0
  165. package/dist/core/merge-json.js +46 -0
  166. package/dist/core/merge-json.js.map +1 -0
  167. package/dist/core/moved-targets.d.ts +23 -0
  168. package/dist/core/moved-targets.js +23 -0
  169. package/dist/core/moved-targets.js.map +1 -0
  170. package/dist/core/overview-types.d.ts +42 -2
  171. package/dist/core/overview-types.js.map +1 -1
  172. package/dist/core/overview.d.ts +1 -1
  173. package/dist/core/overview.js +93 -74
  174. package/dist/core/overview.js.map +1 -1
  175. package/dist/core/path-guard.d.ts +5 -0
  176. package/dist/core/path-guard.js +9 -0
  177. package/dist/core/path-guard.js.map +1 -0
  178. package/dist/core/paths.d.ts +2 -0
  179. package/dist/core/paths.js +4 -0
  180. package/dist/core/paths.js.map +1 -1
  181. package/dist/core/query.d.ts +91 -0
  182. package/dist/core/query.js +197 -0
  183. package/dist/core/query.js.map +1 -0
  184. package/dist/core/report.d.ts +36 -0
  185. package/dist/core/report.js +62 -0
  186. package/dist/core/report.js.map +1 -0
  187. package/dist/core/rules.js +5 -2
  188. package/dist/core/rules.js.map +1 -1
  189. package/dist/core/scaffold.d.ts +2 -2
  190. package/dist/core/scaffold.js +3 -1
  191. package/dist/core/scaffold.js.map +1 -1
  192. package/dist/core/subagents.d.ts +29 -0
  193. package/dist/core/subagents.js +52 -0
  194. package/dist/core/subagents.js.map +1 -0
  195. package/dist/core/tasks-edit.d.ts +34 -0
  196. package/dist/core/tasks-edit.js +115 -0
  197. package/dist/core/tasks-edit.js.map +1 -0
  198. package/dist/core/test-design.d.ts +94 -0
  199. package/dist/core/test-design.js +325 -0
  200. package/dist/core/test-design.js.map +1 -0
  201. package/dist/core/trace-cite.d.ts +16 -0
  202. package/dist/core/trace-cite.js +24 -0
  203. package/dist/core/trace-cite.js.map +1 -0
  204. package/dist/core/trace-coverage.d.ts +8 -0
  205. package/dist/core/trace-coverage.js +40 -0
  206. package/dist/core/trace-coverage.js.map +1 -0
  207. package/dist/core/trace-design.d.ts +6 -0
  208. package/dist/core/trace-design.js +16 -0
  209. package/dist/core/trace-design.js.map +1 -0
  210. package/dist/core/trace-io.d.ts +14 -0
  211. package/dist/core/trace-io.js +97 -0
  212. package/dist/core/trace-io.js.map +1 -0
  213. package/dist/core/trace-requirements.d.ts +9 -0
  214. package/dist/core/trace-requirements.js +27 -0
  215. package/dist/core/trace-requirements.js.map +1 -0
  216. package/dist/core/trace-tests.d.ts +7 -0
  217. package/dist/core/trace-tests.js +27 -0
  218. package/dist/core/trace-tests.js.map +1 -0
  219. package/dist/core/trace-types.d.ts +81 -0
  220. package/dist/core/trace-types.js +3 -0
  221. package/dist/core/trace-types.js.map +1 -0
  222. package/dist/core/trace.d.ts +18 -0
  223. package/dist/core/trace.js +109 -0
  224. package/dist/core/trace.js.map +1 -0
  225. package/dist/core/types.d.ts +48 -1
  226. package/dist/core/worktree.d.ts +8 -0
  227. package/dist/core/worktree.js +19 -1
  228. package/dist/core/worktree.js.map +1 -1
  229. package/dist/emitters/antigravity-cli.d.ts +7 -2
  230. package/dist/emitters/antigravity-cli.js +11 -2
  231. package/dist/emitters/antigravity-cli.js.map +1 -1
  232. package/dist/emitters/antigravity.d.ts +14 -9
  233. package/dist/emitters/antigravity.js +16 -10
  234. package/dist/emitters/antigravity.js.map +1 -1
  235. package/dist/emitters/augment.d.ts +14 -0
  236. package/dist/emitters/augment.js +20 -0
  237. package/dist/emitters/augment.js.map +1 -0
  238. package/dist/emitters/base-emitter.d.ts +34 -0
  239. package/dist/emitters/base-emitter.js +50 -3
  240. package/dist/emitters/base-emitter.js.map +1 -1
  241. package/dist/emitters/claude.d.ts +12 -2
  242. package/dist/emitters/claude.js +34 -5
  243. package/dist/emitters/claude.js.map +1 -1
  244. package/dist/emitters/codex.d.ts +2 -9
  245. package/dist/emitters/codex.js +2 -19
  246. package/dist/emitters/codex.js.map +1 -1
  247. package/dist/emitters/copilot-cli.d.ts +7 -3
  248. package/dist/emitters/copilot-cli.js +12 -8
  249. package/dist/emitters/copilot-cli.js.map +1 -1
  250. package/dist/emitters/copilot.d.ts +5 -0
  251. package/dist/emitters/copilot.js +23 -1
  252. package/dist/emitters/copilot.js.map +1 -1
  253. package/dist/emitters/cursor.d.ts +3 -0
  254. package/dist/emitters/cursor.js +8 -1
  255. package/dist/emitters/cursor.js.map +1 -1
  256. package/dist/emitters/gemini.d.ts +14 -0
  257. package/dist/emitters/gemini.js +19 -0
  258. package/dist/emitters/gemini.js.map +1 -0
  259. package/dist/emitters/index.d.ts +28 -2
  260. package/dist/emitters/index.js +55 -4
  261. package/dist/emitters/index.js.map +1 -1
  262. package/dist/emitters/kilo.d.ts +14 -0
  263. package/dist/emitters/kilo.js +17 -0
  264. package/dist/emitters/kilo.js.map +1 -0
  265. package/dist/emitters/kiro.d.ts +12 -0
  266. package/dist/emitters/kiro.js +14 -0
  267. package/dist/emitters/kiro.js.map +1 -0
  268. package/dist/emitters/llxprt.d.ts +13 -0
  269. package/dist/emitters/llxprt.js +18 -0
  270. package/dist/emitters/llxprt.js.map +1 -0
  271. package/dist/emitters/opencode.d.ts +8 -0
  272. package/dist/emitters/opencode.js +23 -0
  273. package/dist/emitters/opencode.js.map +1 -1
  274. package/dist/emitters/qwen.d.ts +15 -0
  275. package/dist/emitters/qwen.js +23 -0
  276. package/dist/emitters/qwen.js.map +1 -0
  277. package/dist/emitters/skills-emitter.d.ts +21 -0
  278. package/dist/emitters/skills-emitter.js +39 -0
  279. package/dist/emitters/skills-emitter.js.map +1 -0
  280. package/dist/emitters/toml-command-emitter.d.ts +29 -0
  281. package/dist/emitters/toml-command-emitter.js +69 -0
  282. package/dist/emitters/toml-command-emitter.js.map +1 -0
  283. package/dist/emitters/windsurf.d.ts +16 -0
  284. package/dist/emitters/windsurf.js +21 -0
  285. package/dist/emitters/windsurf.js.map +1 -0
  286. package/dist/index.d.ts +5 -0
  287. package/dist/index.js +4 -0
  288. package/dist/index.js.map +1 -1
  289. package/dist/mcp/protocol.d.ts +44 -0
  290. package/dist/mcp/protocol.js +114 -0
  291. package/dist/mcp/protocol.js.map +1 -0
  292. package/dist/mcp/registry.d.ts +40 -0
  293. package/dist/mcp/registry.js +44 -0
  294. package/dist/mcp/registry.js.map +1 -0
  295. package/dist/mcp/server.d.ts +7 -0
  296. package/dist/mcp/server.js +14 -0
  297. package/dist/mcp/server.js.map +1 -0
  298. package/dist/mcp/tools/common.d.ts +12 -0
  299. package/dist/mcp/tools/common.js +12 -0
  300. package/dist/mcp/tools/common.js.map +1 -0
  301. package/dist/mcp/tools/fleet.d.ts +10 -0
  302. package/dist/mcp/tools/fleet.js +102 -0
  303. package/dist/mcp/tools/fleet.js.map +1 -0
  304. package/dist/mcp/tools/index.d.ts +3 -0
  305. package/dist/mcp/tools/index.js +13 -0
  306. package/dist/mcp/tools/index.js.map +1 -0
  307. package/dist/mcp/tools/read.d.ts +6 -0
  308. package/dist/mcp/tools/read.js +62 -0
  309. package/dist/mcp/tools/read.js.map +1 -0
  310. package/dist/mcp/tools/write.d.ts +6 -0
  311. package/dist/mcp/tools/write.js +34 -0
  312. package/dist/mcp/tools/write.js.map +1 -0
  313. package/dist/plugins/api.d.ts +39 -0
  314. package/dist/plugins/api.js +28 -0
  315. package/dist/plugins/api.js.map +1 -0
  316. package/dist/plugins/index.d.ts +11 -0
  317. package/dist/plugins/index.js +9 -0
  318. package/dist/plugins/index.js.map +1 -0
  319. package/dist/plugins/loader.d.ts +35 -0
  320. package/dist/plugins/loader.js +117 -0
  321. package/dist/plugins/loader.js.map +1 -0
  322. package/dist/plugins/manifest.d.ts +21 -0
  323. package/dist/plugins/manifest.js +53 -0
  324. package/dist/plugins/manifest.js.map +1 -0
  325. package/dist/plugins/registry.d.ts +36 -0
  326. package/dist/plugins/registry.js +30 -0
  327. package/dist/plugins/registry.js.map +1 -0
  328. package/dist/plugins/report.d.ts +9 -0
  329. package/dist/plugins/report.js +19 -0
  330. package/dist/plugins/report.js.map +1 -0
  331. package/dist/plugins/semver.d.ts +23 -0
  332. package/dist/plugins/semver.js +106 -0
  333. package/dist/plugins/semver.js.map +1 -0
  334. package/dist/plugins/session.d.ts +18 -0
  335. package/dist/plugins/session.js +22 -0
  336. package/dist/plugins/session.js.map +1 -0
  337. package/dist/testkit/contract.d.ts +33 -0
  338. package/dist/testkit/contract.js +118 -0
  339. package/dist/testkit/contract.js.map +1 -0
  340. package/dist/testkit/index.d.ts +15 -0
  341. package/dist/testkit/index.js +15 -0
  342. package/dist/testkit/index.js.map +1 -0
  343. package/docs/architecture.md +34 -6
  344. package/docs/artifacts/decision-record.md +54 -0
  345. package/docs/artifacts/tasks.md +37 -0
  346. package/docs/artifacts/tests.md +43 -0
  347. package/docs/cli-reference.md +224 -7
  348. package/docs/concepts/mcp-server.md +93 -0
  349. package/docs/contributing.md +9 -0
  350. package/docs/index.md +2 -2
  351. package/docs/plugin-api.md +124 -0
  352. package/docs/plugin-split.md +55 -0
  353. package/docs/plugin-trust.md +51 -0
  354. package/docs/tool-compatibility.md +155 -18
  355. package/docs/workflow.md +66 -5
  356. package/package.json +5 -2
  357. package/src/agents/worker.md +37 -0
  358. package/src/prompts/converge.md +8 -3
  359. package/src/prompts/decide.md +31 -0
  360. package/src/prompts/implement.md +17 -8
  361. package/src/prompts/revise.md +4 -2
  362. package/src/prompts/run.md +100 -0
  363. package/src/prompts/tasks.md +16 -4
  364. package/src/roles/security.md +17 -0
  365. package/src/templates/adr.md +29 -0
  366. package/src/templates/tasks.md +8 -1
  367. package/src/templates/tests.md +29 -0
@@ -0,0 +1,51 @@
1
+ # Plugin trust
2
+
3
+ > The plugin API is **experimental** in 1.6 (see [`plugin-api.md`](./plugin-api.md)). **There is no
4
+ > sandbox.** A plugin is JavaScript that runs inside `ambykit sync` with your permissions. Install one
5
+ > only if you would run its author's code.
6
+
7
+ ## What AmbyKit does to keep this safe
8
+
9
+ - **Nothing is discovered.** A package loads only when it is named in `.amby/config.json` under
10
+ `plugins`. Installing one does not enable it, and a package that happens to be in `node_modules` is
11
+ never imported.
12
+ - **Exact pins.** Each entry is `"package name": "x.y.z"`. A range, a tag, an empty value or anything
13
+ that is not an exact version is refused before any file of the package is read.
14
+ - **Installed version = pin.** If `node_modules/<package>/package.json` is not exactly the pinned
15
+ version, the plugin is refused. Upgrading is a deliberate edit to the pin, reviewed like any change.
16
+ - **One place to look.** Only `<project>/node_modules/<package>` is searched. A copy in a parent folder,
17
+ a global install or `NODE_PATH` is ignored, so the same config loads the same code on every machine
18
+ or fails loudly.
19
+ - **Named.** Every `sync` and `check` prints each loaded plugin as `name@version`.
20
+ - **Names are constrained.** Only packages named `ambykit-emitter-*` (optionally scoped) are accepted.
21
+ - **Failures are contained.** A plugin that is missing, out of range, malformed or throws on load is
22
+ reported by name; the other targets still sync, and the run exits 1 so CI notices.
23
+
24
+ ## What a plugin can and cannot do
25
+
26
+ A plugin **can** run any code Node can run (read and write files, use the network, spawn processes) at
27
+ the moment it is loaded and while it emits. Nothing prevents that.
28
+
29
+ AmbyKit **does** limit what it will *write on a plugin's behalf*:
30
+
31
+ - Files a plugin asks AmbyKit to write must be **inside the project**. A path that is absolute, has a
32
+ drive letter or contains `..` fails the whole sync and names the plugin.
33
+ - A file in the **home directory** (`scope: "user"`) is written only when you run
34
+ `ambykit sync --include-user`. That flag is the recorded consent, it is per run, and those files are
35
+ never part of `sync --check`.
36
+ - A plugin cannot replace a built-in target or another plugin's target: a clash is reported and the
37
+ later target is not registered.
38
+ - Two targets writing the same path must write identical bytes, or the sync fails naming both plugins.
39
+
40
+ ## Before you install a plugin
41
+
42
+ 1. Read its source or trust its maintainers; check the repository and the published tarball.
43
+ 2. Install with `npm install --save-exact` so the version in `package.json` is the one you pin.
44
+ 3. Copy that exact version into `plugins` in `.amby/config.json`.
45
+ 4. Re-read the diff when you change the pin.
46
+
47
+ ## Reporting a problem
48
+
49
+ A plugin that writes where it should not, or runs code you did not expect, is a bug in the plugin;
50
+ report it to its author. If AmbyKit loads something that is not listed and exactly pinned, that is a bug
51
+ in AmbyKit; please open an issue.
@@ -17,25 +17,112 @@ Several targets share one emitter's output (why `BaseEmitter` + thin subclasses
17
17
  | OpenCode | `OpenCodeEmitter` | `commands` |
18
18
  | Cursor | `CursorEmitter` | `commands` |
19
19
  | Cursor CLI (`cursor-agent`) | `CursorCliEmitter` | `none` (rules-only) |
20
- | Antigravity (IDE) | `AntigravityEmitter` | `workflows` |
21
- | Antigravity CLI (`agy`) | `AntigravityCliEmitter` | reuses Antigravity |
20
+ | Antigravity (IDE) | `AntigravityEmitter` | `skills` (workflows retired 2026-10-19) |
21
+ | Antigravity CLI (`agy`) | `AntigravityCliEmitter` | `skills` (reuses Antigravity) |
22
22
  | Codex CLI (`codex`) | `CodexEmitter` | `skills` |
23
+ | Gemini CLI (`gemini`) | `GeminiEmitter` | `commands` (TOML) |
24
+ | LLxprt Code (`llxprt`) | `LlxprtEmitter` | `commands` (TOML) |
25
+ | Qwen Code (`qwen`) | `QwenEmitter` | `commands` |
26
+ | Kilo Code (`kilo`) | `KiloEmitter` | `commands` |
27
+ | Augment Code (`auggie`) | `AugmentEmitter` | `commands` |
28
+ | Windsurf | `WindsurfEmitter` | `workflows` |
29
+ | Kiro (IDE + `kiro-cli`) | `KiroEmitter` | `skills` |
30
+ | Pi (`pi`) | `CodexEmitter` (alias) | `skills`, identical to Codex |
23
31
 
24
32
  ## Matrix
25
33
 
26
34
  | Concern | Claude Code | OpenCode | Copilot (VS Code) | Copilot CLI | Cursor | Cursor CLI | Antigravity | Codex CLI |
27
35
  |---|---|---|---|---|---|---|---|---|
28
36
  | Rules file | `CLAUDE.md` (+`@AGENTS.md` bridge) | `AGENTS.md` | `.github/copilot-instructions.md` + `AGENTS.md` | same as Copilot VS Code | `.cursor/rules/*.mdc` + `AGENTS.md` | Cursor config + `AGENTS.md` | `AGENTS.md` (+`GEMINI.md`) + `.agents/rules/*.md` | `AGENTS.md` |
29
- | Commands/prompts | `.claude/commands/amby/*.md` | `.opencode/commands/*.md` | `.github/prompts/*.prompt.md` | **none** → skills | `.cursor/commands/*.md` | none | `.agents/workflows/*.md` | `.agents/skills/*/SKILL.md` |
30
- | Command frontmatter | `description`, `argument-hint`, `allowed-tools`, `model` | `description`, `agent`, `model`, `subtask` | `description`, `name`, `agent`, `model`, `tools` | (skills) `name`, `description`, `allowed-tools` | plain body | — | `description` (+ `// turbo` line) | `name`, `description` |
37
+ | Commands/prompts | `.claude/commands/amby/*.md` | `.opencode/commands/*.md` | `.github/prompts/*.prompt.md` | **none** → skills | `.cursor/commands/*.md` | none | `.agents/skills/<name>/SKILL.md` (shared with Codex) | `.agents/skills/*/SKILL.md` |
38
+ | Command frontmatter | `description`, `argument-hint`, `allowed-tools`, `model` | `description`, `agent`, `model`, `subtask` | `description`, `name`, `agent`, `model`, `tools` | (skills) `name`, `description`, `allowed-tools` | plain body | — | `name`, `description` | `name`, `description` |
31
39
  | Scoped instructions | `.claude/rules/*.md` (`paths:`) | `instructions[]` in `opencode.json` | `.github/instructions/*.instructions.md` (`applyTo`) | same (`applyTo`, `excludeAgent`) | `.mdc` `globs`/`alwaysApply` | via `.mdc` | `.agents/rules/*.md` | nested `AGENTS.md`/`AGENTS.override.md` per directory (no glob key) |
32
- | Args placeholder | `$ARGUMENTS`, `$N`, `$name` | `$ARGUMENTS`, `$1` | `${input:x}` | — | prompt text | — | steps in body | none — trailing free text only (AmbyKit reworks `$ARGUMENTS` into prose) |
40
+ | Args placeholder | `$ARGUMENTS`, `$N`, `$name` | `$ARGUMENTS`, `$1` | `${input:x}` | — | prompt text | — | none — reworded as prose (as Codex) | none — trailing free text only (AmbyKit reworks `$ARGUMENTS` into prose) |
33
41
  | Agents | `.claude/agents/*.md` | `.opencode/agents/*.md` | `.github/agents/*.agent.md` | `.github/agents/*.agent.md` | UI modes (no file) | — | none (SDK only) | none (skills only) |
34
42
  | Agent frontmatter | `name`*, `description`*, `tools`, `model` (body = system prompt) | `description`* (+`mode`, `permission`; filename = id) | `description`*, `name`, `tools` | same as Copilot VS Code | — | — | — | — |
35
- | MCP file | `.mcp.json` | `opencode.json` → `mcp` | `.vscode/mcp.json` | `~/.copilot/mcp-config.json` (user) | `.cursor/mcp.json` | reads `.cursor/mcp.json` | `mcp_config.json` (user) | `.codex/config.toml` (TOML) — **out of scope**, AmbyKit does not write it |
36
- | MCP top-level key | (per-server `type`) | `mcp` | `servers` | `mcpServers` | `mcpServers` | — | `mcpServers` | `mcp_servers.<id>` (not written) |
43
+ | Subagents for `/amby.run` (019) | **confirmed**: the emitted `amby-*` agents are spawnable in a live Claude Code session (checked 2026-11-16); `amby-worker` is emitted at `.claude/agents/amby-worker.md` with `tools` incl. Write/Edit/Bash and `model` from `fleet.workerModel` | unconfirmed: format documented, `amby-worker` emitted at `.opencode/agents/` (no `model`), not run live | unconfirmed: `amby-worker` emitted at `.github/agents/amby-worker.agent.md`, not run live | unconfirmed (shares the Copilot file) | none (UI modes only) | none | none (SDK only) | none (skills only) |
44
+ | MCP file | `.mcp.json` | `opencode.json` — **not written** (two incompatible schemas; see `specs/025-mcp-server/research.md`) | `.vscode/mcp.json` | `~/.copilot/mcp-config.json` (user) | `.cursor/mcp.json` | reads `.cursor/mcp.json` | **not written** for the IDE (the CLI uses `.agents/mcp_config.json`, project) | `.codex/config.toml` (TOML) — **out of scope**, AmbyKit does not write it |
45
+ | MCP top-level key | `mcpServers` | `mcp` or `mcp.servers` (by version) | `servers` | `mcpServers` | `mcpServers` | `mcpServers` (shared file) | `mcpServers` | `mcp_servers.<id>` (not written) |
46
+ | MCP entry shape | `{type:"stdio",command,args}` | — | `{type:"stdio",command,args}` | `{type:"local",command,args,tools:["*"]}` (`tools` required) | `{type:"stdio",command,args}` | same as Cursor | `{command,args}` | — |
37
47
  | AGENTS.md native | No (bridge) | Yes | Yes (opt-in) | Yes | Yes | Yes | Yes | Yes |
38
48
 
49
+ ## Matrix — additional targets (feature 016)
50
+
51
+ Checked 2026-10-26 against vendor docs or the product's own repository (docs or loader source). Only
52
+ documented surfaces are emitted (Principle 4).
53
+
54
+ | Concern | Gemini CLI | LLxprt Code | Qwen Code | Kilo Code | Augment Code | Windsurf | Kiro | Pi |
55
+ |---|---|---|---|---|---|---|---|---|
56
+ | Rules file | `GEMINI.md` (pointer region) | `LLXPRT.md` (pointer region) | `AGENTS.md` (see below) | `AGENTS.md` | `AGENTS.md` (+`.augment/rules/`) | `AGENTS.md` (+`.windsurf/rules/`) | `AGENTS.md` (+`.kiro/steering/`) | `AGENTS.md` |
57
+ | Commands/prompts | `.gemini/commands/*.toml` | `.llxprt/commands/*.toml` | `.qwen/commands/*.md` | `.kilo/commands/*.md` | `.augment/commands/*.md` | `.windsurf/workflows/*.md` | `.kiro/skills/<name>/SKILL.md` | `.agents/skills/<name>/SKILL.md` (as Codex) |
58
+ | Command format | TOML: `prompt` (required), `description` | TOML: `prompt` (required), `description` | Markdown + YAML: `description`, `argument-hint` | Markdown + YAML: `description` | Markdown + YAML: `description`, `argument-hint` | Markdown, no frontmatter; 12,000-character limit | `name` (must equal the dir; lowercase, digits, `-`; ≤ 64), `description` | `name`, `description` |
59
+ | Args placeholder | `{{args}}` | `{{args}}` | `{{args}}` | `$ARGUMENTS`, `$N` | `$ARGUMENTS` | none — reworded as prose | `$ARGUMENTS` in the CLI only — reworded as prose | n/a for skills — reworded as prose |
60
+ | Command name | path under the dir, `/` ⇒ `:`; dots kept | as Gemini | as Gemini; dots kept | filename | filename; subdir ⇒ `:` | filename | directory name | invoked `/skill:<name>` |
61
+ | AGENTS.md native | No (opt-in via `context.fileName`) | No (`contextFileName`) | Yes per source; the docs page still says `QWEN.md` only | Yes | Yes | Yes | Yes | Yes (also `CLAUDE.md`) |
62
+ | Agents/personas | not emitted | not emitted | not emitted | not emitted | not emitted | not emitted | not emitted | not emitted |
63
+ | Subagents for `/amby.run` (019) | none (no documented file format) | none (`/subagent save` only) | none | none | none | none | none | none (shares the Codex output) |
64
+ | Sources | github.com/google-gemini/gemini-cli (docs/cli/custom-commands.md, gemini-md.md) | github.com/vybestack/llxprt-code (docs/cli/commands.md, configuration.md) | qwenlm.github.io/qwen-code-docs (features/commands); github.com/QwenLM/qwen-code | kilo.ai/docs (customize/workflows, agents-md) | docs.augmentcode.com/cli (custom-commands, rules) | docs.devin.ai/desktop/cascade (workflows, memories) | kiro.dev/docs (skills, steering) | github.com/earendil-works/pi (packages/coding-agent/docs/skills.md) |
65
+
66
+ **Gemini and LLxprt (TOML).** The prompt is a TOML literal multi-line string (`'''…'''`), so
67
+ backslashes and quotes need no escaping; a body containing `'''` falls back to a basic `"""` string.
68
+ The generated notice is a `#` comment. Gemini treats `!{…}` and `@{…}` as shell/file injection, so a
69
+ test forbids both in the neutral prompts. AmbyKit adds a `GEMINI.md` / `LLXPRT.md` pointer region and
70
+ never edits `.gemini/settings.json`.
71
+
72
+ **Windsurf.** `.windsurf/workflows/` is read by older Windsurf builds and by Devin Desktop (which
73
+ calls it legacy); `.devin/workflows/` works only on the newest builds. The trade-off is recorded
74
+ here, and switching is one emitter field.
75
+
76
+ **Pi** is an alias of the Codex emitter: it reads `.agents/skills/` natively, so the files are
77
+ identical and written once. Its activity self-report says `codex`.
78
+
79
+ **The `.agents/skills/` overlap.** Gemini, Qwen, LLxprt, Kilo, Augment, Windsurf and Pi also read
80
+ `.agents/skills/`. With Codex selected they can see each phase twice (once as a command, once as a
81
+ skill). This is documented, not suppressed. Augment also reads `.claude/commands/`; the names are
82
+ identical and `.augment/` takes precedence, so Claude plus Augment yields no duplicates.
83
+
84
+ **Subagents (feature 019).** `/amby.run` delegates to a write-capable `amby-worker` and to the read-only
85
+ `amby-qa` and `amby-architect` personas. The per-target table is `src/core/subagents.ts`; only a target
86
+ confirmed on a live install counts as supported (Principle 4), every other target gets the same prompt with
87
+ `$SUBAGENTS` = `no`, so the lead does the worker, QA and review steps itself in sequence from the same state
88
+ files. Claude Code is confirmed (the `amby-*` agents from feature 013 are spawnable in a live session, and the
89
+ worker uses the same documented frontmatter plus write tools); the first live run of `amby-worker` from
90
+ `/amby.run` is the 019 dogfood gate. Only Claude documents a `model` key for agent files, so
91
+ `fleet.workerModel` is applied there and ignored elsewhere.
92
+
93
+ ### Status notes (checked 2026-11-04)
94
+
95
+ - **Gemini CLI** is being transitioned to Antigravity CLI. Since 2026-06-18 it no longer serves free
96
+ individual or Google AI Pro/Ultra users; it remains for Gemini Code Assist Standard/Enterprise
97
+ licences and paid Gemini/Vertex API keys. The target stays for those users.
98
+ - **Antigravity CLI** reads `GEMINI.md` and `AGENTS.md`, and treats skills in `.agents/skills/` as
99
+ slash commands. It does not document `.gemini/commands/*.toml` (it converts them with
100
+ `agy plugin import gemini`).
101
+ - **Antigravity workflows are retired.** `.agents/workflows/*.md` stopped being indexed or run on
102
+ 2026-10-19; skills at `.agents/skills/<name>/SKILL.md` replace them. The `antigravity` and
103
+ `antigravity-cli` targets now emit skills instead (feature 018), the same files as `codex` and `pi`.
104
+ - **Antigravity skills** (antigravity.google/docs/skills/): frontmatter is `name` (optional, lowercase
105
+ and hyphens, defaults to the folder) and `description` (required). The CLI turns a skill into a slash
106
+ command named after the skill (the page's example: `deploy-staging` → `/deploy-staging`), so AmbyKit's
107
+ phases appear as `/amby-specify` etc. (dots become hyphens), not `/amby.specify`. The IDE lists skills
108
+ in the agent panel's Customizations menu and picks them by description. The migration guide states the
109
+ cutoff for the IDE and App and does not say whether the CLI is affected; both targets moved.
110
+ - **Shared skill files.** Codex, Pi and both Antigravity targets write one file set under
111
+ `.agents/skills/`, differing only in the `--agent=<id>` the prompt reports. It is written once and
112
+ carries the highest-ranked id: `codex`, then `antigravity`, then `antigravity-cli`. `ambykit check`
113
+ names every owner. A skill file without AmbyKit's generated notice is never overwritten.
114
+ - **Stale workflows.** Files from earlier releases at `.agents/workflows/amby.<phase>.md` are left in
115
+ place; `ambykit sync --prune-legacy` backs them up under `.amby/backups/` and removes only those
116
+ that carry the generated notice (`ambykit restore <file>` brings one back).
117
+
118
+ ### Out of scope (FR-002)
119
+
120
+ - **Amazon Q Developer CLI** is now Kiro CLI (docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/upgrade-to-kiro.html), which the Kiro target covers.
121
+ - **Kiro CLI prompt files** (`.kiro/prompts/`): file format undocumented.
122
+ - **Pi prompt templates** with dotted names: undocumented.
123
+ - **LLxprt sub-agents:** there is no file format, only `/subagent save`.
124
+ - **Agent/persona files** for every new target: not emitted until the format is verified (feature 013).
125
+
39
126
  ## Gotchas the emitters encode
40
127
 
41
128
  - **Claude Code does not read `AGENTS.md`.** Emit a `CLAUDE.md` whose first line is `@AGENTS.md` (or a
@@ -44,17 +131,22 @@ Several targets share one emitter's output (why `BaseEmitter` + thin subclasses
44
131
  - **Rules files are merged, not overwritten.** Every rules file wraps AmbyKit's content in a
45
132
  `### AmbyKit usage` section so it can be spliced into a file the user already authored; only that
46
133
  section is AmbyKit's. (Command/prompt/skill/workflow files remain fully generated and overwritten.)
47
- - **MCP top-level key differs**: `servers` (Copilot VS Code) vs `mcpServers` (Cursor, Copilot CLI,
48
- Antigravity) vs `mcp` (OpenCode) vs per-server `type` blocks (Claude `.mcp.json`).
49
- - **MCP scope differs**: Copilot CLI and Antigravity use **user-level** files outside the repo — AmbyKit
50
- writes these only with explicit consent and excludes them from the "repo in sync" check.
134
+ - **MCP top-level key differs**: `servers` (Copilot VS Code) vs `mcpServers` (Claude `.mcp.json`, Cursor,
135
+ Copilot CLI, Antigravity) vs `mcp` / `mcp.servers` (OpenCode, version-dependent, not written). Copilot CLI's
136
+ entry needs `type: "local"` and `tools`; the others use `type: "stdio"` (Antigravity has none).
137
+ - **MCP scope differs**: Copilot CLI uses a **user-level** file outside the repo, and the Antigravity IDE's
138
+ documented global file is user-level too. AmbyKit writes the Copilot CLI file only with explicit consent
139
+ (`--include-user`), never writes the Antigravity IDE's, and excludes user files from the "repo in sync"
140
+ check. Antigravity CLI has a project file, `.agents/mcp_config.json`. Verified shapes and sources are in
141
+ `specs/025-mcp-server/research.md`.
51
142
  - **Scoped-instruction key differs**: Copilot `applyTo` vs Cursor `globs` (+ `alwaysApply`).
52
143
  - **Command surface differs**: Copilot CLI has no `.prompt.md`; phases map to `SKILL.md`. Antigravity
53
- uses `.agents/workflows/*.md` with a `// turbo` line to auto-run a step. Cursor CLI is rules-only.
144
+ now uses skills (`.agents/skills/<name>/SKILL.md`); workflows (`.agents/workflows/*.md`, with a
145
+ `// turbo` line) are retired and only Windsurf still emits `workflows`. Cursor CLI is rules-only.
54
146
  - **OpenCode** uses plural dirs (`agents/`, `commands/`) and `provider/model-id` model strings.
55
147
  - **Antigravity** dir is `.agents/` (plural); `.agent/` is legacy read-compat.
56
- - **Codex** shares the `.agents/` root with Antigravity but a different subdirectory (`skills/` vs
57
- `workflows/`) — the two coexist without collision when both targets are selected. Codex's skills
148
+ - **Codex** shares `.agents/skills/` with Antigravity — the files are identical apart from the
149
+ self-report id and are written once (see the shared-file note above). Codex's skills
58
150
  frontmatter has no argument-placeholder key, so AmbyKit rewrites the neutral `$ARGUMENTS` token into
59
151
  prose rather than leaving a literal, un-substituted placeholder in the emitted `SKILL.md`. Codex's
60
152
  deprecated, user-level custom-prompts mechanism (`~/.codex/prompts/`, which does support
@@ -84,9 +176,16 @@ target ids above (`src/core/agents.ts`; a test keeps it in step with `TARGETS`):
84
176
  | `opencode` | `opencode`, or node running `opencode-ai` | opencode.ai/docs |
85
177
  | `copilot-cli` | `copilot`, or node running `@github/copilot` | docs.github.com (Copilot CLI command reference) |
86
178
  | `cursor-cli` | `cursor-agent`, or `agent` only when its path contains `cursor` | cursor.com/docs/cli/installation |
87
-
88
- IDE-hosted agents (`claude-vscode`, `copilot`, `cursor`, `antigravity`) run inside the editor process
89
- and can't be told apart, so they are self-report only. `antigravity-cli` has no documented executable
179
+ | `gemini` | `gemini`, or node running `@google/gemini-cli` | github.com/google-gemini/gemini-cli |
180
+ | `qwen` | `qwen`, or node running `@qwen-code/qwen-code` | github.com/QwenLM/qwen-code |
181
+ | `llxprt` | `llxprt`, or node running `@vybestack/llxprt-code` | github.com/vybestack/llxprt-code |
182
+ | `kiro` | `kiro-cli` | kiro.dev/docs/cli/ |
183
+ | `kilo` | `kilo`, or node running `@kilocode/cli` | kilo.ai/docs/cli |
184
+ | `augment` | `auggie`, or node running `@augmentcode/auggie` | docs.augmentcode.com/cli/overview |
185
+
186
+ IDE-hosted agents (`claude-vscode`, `copilot`, `cursor`, `antigravity`, `windsurf`) run inside the editor
187
+ process and can't be told apart, so they are self-report only. `pi` reports as `codex` (it shares the
188
+ Codex emitter) and its executable, `pi`, is too short to match by name. `antigravity-cli` has no documented executable
90
189
  name yet, so it is also self-report only. Working directories come from `lsof` (macOS) or
91
190
  `/proc/<pid>/cwd` (Linux). Windows exposes no cwd through CIM, so Windows detections are shown as
92
191
  "unknown location", never tied to a feature.
@@ -102,10 +201,48 @@ Docs conflicted on a couple of points; confirm before shipping those emitters:
102
201
 
103
202
  - Antigravity `.agents/` vs `.agent/` default on the targeted version.
104
203
  - Whether the `agy` CLI's `--output-format json` exists.
204
+ - Qwen Code reads `AGENTS.md` (true per its source, `memory-constants.ts`; its docs page says `QWEN.md`
205
+ only). If a live install ignores it, add a `QWEN.md` pointer region (a one-override change).
206
+ - Gemini CLI loads `/amby.specify` from the emitted `.gemini/commands/amby.specify.toml` (SC-006).
207
+ Waived: the CLI is now enterprise/API-key only (see the status notes above).
208
+ - Windsurf still reads `.windsurf/workflows/` on the current Devin Desktop build.
105
209
 
106
210
  ## Sources
107
211
 
108
212
  Claude Code: code.claude.com/docs · OpenCode: opencode.ai/docs · Copilot: code.visualstudio.com/docs
109
213
  and docs.github.com/copilot · Cursor: cursor.com/docs · Antigravity: antigravity.google/docs and
110
214
  Google Cloud blog. Codex CLI: developers.openai.com/codex (skills, custom prompts, config reference,
111
- AGENTS.md guide). AGENTS.md standard: agents.md.
215
+ AGENTS.md guide). Gemini CLI, LLxprt, Qwen Code, Kilo, Augment, Windsurf, Kiro and Pi: see the
216
+ "Sources" row of the additional-targets matrix. AGENTS.md standard: agents.md.
217
+
218
+ ## Matrix rows for plugins
219
+
220
+ The matrix above is prose for people. A plugin (feature 027, experimental) records the same facts as
221
+ **data**, so the test kit in `@ambystech/ambykit/testkit` can check an emitter against them. One row
222
+ describes one target:
223
+
224
+ ```json
225
+ {
226
+ "target": "mytool",
227
+ "commandSurface": "commands",
228
+ "commandDir": ".mytool/commands",
229
+ "fileTemplate": "amby.<phase>.md",
230
+ "frontmatterKeys": ["description"],
231
+ "sourceUrl": "https://example.com/docs/custom-commands"
232
+ }
233
+ ```
234
+
235
+ | Field | Meaning |
236
+ |---|---|
237
+ | `target` | The target id the row describes. |
238
+ | `commandSurface` | `commands`, `skills`, `workflows` or `none` (rules-only: no command files). |
239
+ | `commandDir` | Directory holding the command files, relative to the project root. |
240
+ | `fileTemplate` | One command file's path under `commandDir`. `<phase>` is replaced by each phase id (`specify`, `plan`, …); a skills layout is `amby-<phase>/SKILL.md`. |
241
+ | `frontmatterKeys` | The exact, ordered keys the host documents: YAML `key:` lines, or TOML `key =` lines for `.toml` files. |
242
+ | `sourceUrl` | Where the row was verified. Principle 4: no row, no emit; a row without a source is a guess. |
243
+
244
+ `checkEmitterContract(target, row)` emits every phase and lists each difference: a wrong `commandSurface`
245
+ or `commandDir`, a missing or unexpected file, frontmatter keys that differ (grouped when many files
246
+ share the difference), a path outside the project, or `emit()` throwing. **A missing row fails.** An
247
+ official plugin ships its row as `matrix-rows.json` in its own repository; this document keeps only the
248
+ human-readable summary.
package/docs/workflow.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # The AmbyKit workflow
2
2
 
3
- Eleven phases, each a slash command in your assistant, each producing or updating one artifact. The
3
+ Thirteen phases, each a slash command in your assistant, each producing or updating one artifact. The
4
4
  happy path is **specify → design → plan → tasks → implement**, with `constitution` once up front and
5
- `clarify`/`revise`/`analyze`/`converge`/`review` when you need them.
5
+ `clarify`/`revise`/`analyze`/`converge`/`review`/`decide`/`run` when you need them.
6
6
 
7
7
  | Phase | Command | Reads | Writes |
8
8
  |---|---|---|---|
@@ -12,11 +12,13 @@ happy path is **specify → design → plan → tasks → implement**, with `con
12
12
  | Revise | `/amby.revise` | spec, ui | spec / ui (continues in place) |
13
13
  | Design (UI) | `/amby.design` | spec | `ui.md`, `design-tokens.json` |
14
14
  | Plan (HOW) | `/amby.plan` | spec, ui | `plan.md` (+ `data-model.md`, `contracts/`) |
15
- | Tasks | `/amby.tasks` | plan | `tasks.md` |
15
+ | Tasks | `/amby.tasks` | plan | `tasks.md` + `tests.md` (test design) |
16
16
  | Analyze | `/amby.analyze` | all | consistency report |
17
17
  | Implement | `/amby.implement` | tasks (one slice) | code + task/status updates |
18
18
  | Converge | `/amby.converge` | spec, plan, tasks + code | `tasks.md` (appends gap tasks), story status |
19
19
  | Review | `/amby.review` | any artifact + a role | findings (advisory); the artifact only with `--apply` |
20
+ | Decide | `/amby.decide` | decision index | `.amby/decisions/ADR-###.md` + the index |
21
+ | Run | `/amby.run` | spec, plan, tasks, `tests.md` | `tasks.md` check-offs + `.amby/fleet/<run>/` |
20
22
 
21
23
  ## 1. Constitution
22
24
 
@@ -59,7 +61,9 @@ needed. See [the plan artifact](./artifacts/plan.md).
59
61
 
60
62
  Turns the plan into an ordered, dependency-aware checklist: stable `T###` IDs, `[P]` parallel
61
63
  markers, `[US#]` story tags, and file paths, grouped so foundational work precedes feature work. See
62
- [the tasks artifact](./artifacts/tasks.md).
64
+ [the tasks artifact](./artifacts/tasks.md). The same phase also writes `tests.md`, the test design: one case per
65
+ acceptance criterion with an automate-or-manual decision, decided before any code. See
66
+ [the tests artifact](./artifacts/tests.md).
63
67
 
64
68
  ## 8. Analyze
65
69
 
@@ -71,12 +75,20 @@ Cross-checks spec ↔ plan ↔ tasks for coverage gaps and inconsistencies, and
71
75
  Executes tasks one slice at a time, checking off `tasks.md` checkboxes and updating each story's
72
76
  `status:` as it goes — which is what `ambykit dashboard` reports on.
73
77
 
78
+ A task that cannot proceed gets a trailing `⚠ BLOCKED: <reason>` marker (and `↪ DEVIATION: <note>` when it
79
+ was done differently than planned); the implementer moves on to another unblocked task. Each phase ends
80
+ with one `**Verify:**` line that is run before the checkpoint, and its result (`✓ passed`,
81
+ `✗ failed: <why>`, `? unverified`) is written back on that line; a failed Verify keeps the checkpoint
82
+ closed. `ambykit dashboard` and `ambykit analyze` surface both at zero model tokens. Syntax:
83
+ [tasks artifact](./artifacts/tasks.md).
84
+
74
85
  ## 10. Converge
75
86
 
76
87
  Closes the loop after implementation: checks the code against every `FR-###`/`SC-###`, plan
77
88
  decision, and checked task; appends one unchecked task per gap under `## Convergence` in `tasks.md`
78
89
  (`[VERIFY]` for inconclusive items); marks fully covered stories `done`. Append-only and idempotent —
79
- it never edits source. Loop `implement → converge` until it reports **converged**.
90
+ it never edits source. It starts from `ambykit trace <feature> --json` (which requirements have tests),
91
+ so it spends effort only on what the matrix cannot answer. Loop `implement → converge` until it reports **converged**.
80
92
 
81
93
  ## 11. Review
82
94
 
@@ -85,6 +97,26 @@ plan, the PM on a UI design, or any role via `--as <id>`. Findings are one per l
85
97
  stable ID with severity and a suggested fix; nothing is modified. `--apply` patches the artifact in
86
98
  place (IDs are never renumbered) and appends a `## Reviews` record. Advisory, like `analyze`.
87
99
 
100
+ ## 12. Decide
101
+
102
+ Records a durable decision as `.amby/decisions/ADR-###.md` (context, decision, alternatives, consequences)
103
+ and patches the index. Callable from any phase; it has no role. It points to an existing record instead of
104
+ duplicating one, keeps a decision that conflicts with a constitution principle `proposed` for a person to
105
+ settle, and `--supersede ADR-###` marks the old record superseded on both sides. Cite records elsewhere as
106
+ `ADR-###`; `ambykit analyze` flags a citation with no record. See `docs/artifacts/decision-record.md`.
107
+
108
+ ## 13. Run
109
+
110
+ `/amby.run <feature>` works a feature through its tasks as a team. The assistant you call it from is the
111
+ **lead**: it gives worker subagents only their task IDs, file ownership and artifact references, then runs a
112
+ QA step (the phase's `**Verify:**` line and acceptance criteria, with the `tests.md` cases when present) and an
113
+ architect review before a phase passes. A failing Verify never passes a checkpoint; a failed review returns only
114
+ finding IDs to the same worker, and at the round limit (default 3) the lead stops and asks you. State lives in
115
+ `.amby/fleet/<feature>.<n>/`, so a run resumes in a new session; pause, resume and stop are directives that
116
+ workers obey at their next report. Defaults (`stallMinutes`, `restartLimit`, `concurrency`, `roundLimit`,
117
+ `workerModel`) are the `fleet` object in `.amby/config.json`. Without verified subagent support the lead does
118
+ every step itself, in sequence. `ambykit fleet` is the helper the prompt calls; see `docs/cli-reference.md`.
119
+
88
120
  ## Roles
89
121
 
90
122
  Every phase acts as a role defined in `.amby/roles/<id>.md` (PM, UX Designer, Architect, Tech
@@ -101,6 +133,35 @@ name. Opt in at `ambykit init` (or `"worktrees": true` in `.amby/config.json`) a
101
133
  creates the worktree for each new feature; `ambykit worktree list|remove` and `ambykit check` keep
102
134
  them tidy.
103
135
 
136
+ ## Parallel lanes
137
+
138
+ Worktrees isolate *features*; **lanes** isolate *tasks within one feature*. Every task line ends with
139
+ the files it owns, as its last parenthesized group:
140
+
141
+ ```text
142
+ - [ ] [T031] [P] [US2] Conflict tests (test/core/lane-conflicts.test.ts, test/helpers/)
143
+ ```
144
+
145
+ Paths are repo-relative and comma-separated, directories end in `/`, and globs are not allowed. Two
146
+ open tasks in the same phase **conflict** when their paths overlap (a directory overlaps every file
147
+ beneath it) and at least one is marked `[P]`; `ambykit analyze` reports them and exits non-zero, so
148
+ CI can gate on it. Fix a conflict by dropping `[P]` or moving one task to a later phase.
149
+
150
+ When a phase is clean, `ambykit lane <feature>` creates one worktree per lane, each with only its own
151
+ tasks in a manifest, and `/amby.implement` run inside a lane works only those task ids. Lane progress
152
+ shows in the dashboard's WORKTREES & AGENTS panel and counts toward the feature. When the lanes are
153
+ done, `ambykit lane merge <feature>` merges them back, resolving check-off-only `tasks.md`
154
+ differences automatically.
155
+
156
+ ## Supported assistants
157
+
158
+ The same neutral prompts are emitted for eighteen targets: Claude Code (CLI + VS Code), GitHub Copilot
159
+ (VS Code + CLI), OpenCode, Cursor (+ CLI), Antigravity (IDE + CLI), Codex CLI, Gemini CLI, LLxprt
160
+ Code, Qwen Code, Kilo Code, Augment Code, Windsurf, Kiro and Pi. Each gets its native command format
161
+ (Markdown, TOML, workflows or skills; Antigravity uses skills, since its workflows were retired on
162
+ 2026-10-19, and its CLI lists them as `/amby-specify` and so on); see [tool compatibility](./tool-compatibility.md). Editing a
163
+ prompt once and running `ambykit sync` updates all of them.
164
+
104
165
  ## Dependencies & prioritization
105
166
 
106
167
  Stories and features carry `priority` (P1/P2/P3) and `depends-on`/`blocked-by` references by stable
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ambystech/ambykit",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Spec-Driven Development framework that helps AI coding assistants build better software — author your specs, user stories, UI design, plans and tasks once, and emit native config for Claude Code, OpenCode, GitHub Copilot, Cursor, Antigravity and more.",
5
5
  "keywords": [
6
6
  "spec-driven-development",
@@ -39,12 +39,15 @@
39
39
  "ambykit": "dist/cli/index.js"
40
40
  },
41
41
  "exports": {
42
- ".": "./dist/index.js"
42
+ ".": "./dist/index.js",
43
+ "./plugin": "./dist/plugins/index.js",
44
+ "./testkit": "./dist/testkit/index.js"
43
45
  },
44
46
  "files": [
45
47
  "dist",
46
48
  "src/templates",
47
49
  "src/prompts",
50
+ "src/agents",
48
51
  "src/reference",
49
52
  "src/roles",
50
53
  "README.md",
@@ -0,0 +1,37 @@
1
+ ---
2
+ id: worker
3
+ name: Worker
4
+ description: AmbyKit fleet worker — implements the task IDs the lead gives it, checks them off and reports one line; used by /amby.run.
5
+ ---
6
+
7
+ You are an AmbyKit **worker**. The lead gave you a feature, a lane, task IDs and the files you own. Do those
8
+ tasks and nothing else; you are the only agent allowed to write for them.
9
+
10
+ **Load only what the tasks need:** your task lines in `specs/<feature>/tasks.md` by ID, the plan sections and
11
+ `US-#`/`FR-###` they cite, and `tests.md` cases for them if it exists. Never restate artifacts.
12
+
13
+ **For each task, in order:**
14
+
15
+ 1. Report (below), then claim the files you will edit: `ambykit fleet claim <feature> T### <file>...`. A refused
16
+ claim names the owner: do not edit that file; post a note (step 5) and tell the lead you are blocked.
17
+ 2. Do the task. Edit only files listed for it (plus its tests). Build to the `tests.md` cases when they exist.
18
+ 3. Check it off: `[ ]` → `[x]` on its line (the `tick_task` tool, or an edit of that one box). Checking off
19
+ frees the task's claims; if you edited by hand, also run `ambykit fleet release <feature> T###`.
20
+ 4. Report, then send the lead **one line**: `T###: <what changed> (<files>)`. No logs, no diffs.
21
+ 5. Anything the next person needs to know goes on the shared board as one line:
22
+ `ambykit fleet note <feature> T### --files=<files> "<text>"`.
23
+
24
+ **Stuck?** Stop work on that task and mark it, last on the task line: `⚠ BLOCKED: <reason>` (add
25
+ `↪ DEVIATION: <note>` if you did it differently than planned). Report `blocked`, tell the lead in one line, and
26
+ continue with another of your tasks that is not blocked. Never ask another worker directly: blocked work goes
27
+ through the lead.
28
+
29
+ **Reporting:** `ambykit activity <feature> --agent=$AGENT --phase=implement --task=T### --lane=<lane> --state=<state>`
30
+ (add `--run=<run>`; ignore any error), or the `report_activity` tool when it is available.
31
+ Report at the start of a task, at the end of a task, and whenever you are blocked or waiting. Never report on a timer and never report progress.
32
+ The reply carries a directive: continue, pause or stop. On pause or stop, finish the task you are on, then obey it at your next report: do not start another task.
33
+ `report_activity` returns the directive; without that tool, run `ambykit fleet directive <feature> <lane>` after
34
+ reporting, which prints it.
35
+
36
+ **Review findings:** when the lead returns finding IDs, fix exactly those in the same lane, check nothing new off
37
+ unless a task requires it, and report one line per ID: `<id>: fixed (<files>)`.
@@ -5,7 +5,7 @@ description: Check the codebase against spec, plan, and tasks after implementing
5
5
  argument-hint: "[feature id, defaults to current]"
6
6
  phase: converge
7
7
  role: qa
8
- reads: [specs/NNN-slug/spec.md, specs/NNN-slug/plan.md, specs/NNN-slug/tasks.md]
8
+ reads: [specs/NNN-slug/spec.md, specs/NNN-slug/plan.md, specs/NNN-slug/tasks.md, specs/NNN-slug/tests.md]
9
9
  writes: [specs/NNN-slug/tasks.md, specs/NNN-slug/spec.md]
10
10
  allowedTools: [read, edit]
11
11
  ---
@@ -14,13 +14,18 @@ Converge feature `$ARGUMENTS` (default: the current feature): does the code sati
14
14
  Never edit source code — only that feature's `tasks.md` and `spec.md` are writable.
15
15
 
16
16
  Run `ambykit activity <feature> --agent=$AGENT --phase=converge` first, with that feature's number; ignore any error.
17
+ Then run `ambykit trace <feature> --json`; if it fails, go on as without it. Its uncovered requirements are
18
+ gaps already — do not re-derive coverage by reading every test; read tests only to judge whether the covered
19
+ ones truly satisfy their requirement.
17
20
 
18
21
  1. No `tasks.md` → stop, say to run `/amby.tasks`. No `plan.md` → converge on spec + tasks and say so.
19
22
  2. For every `FR-###`/`SC-###`, plan decision (incl. `data-model.md`/`contracts/`), and checked
20
23
  `T###`: look for evidence only in files the plan/tasks name. Classify **covered**, **gap**
21
- (absent), or **unverified** (inconclusive). Skip items the plan marks deferred/out of scope.
24
+ (absent), or **unverified** (inconclusive). Skip items the plan marks deferred/out of scope. If `tests.md`
25
+ exists, read it after the `trace` matrix (where there is one) and treat its cases as the expected tests; spend
26
+ effort only on what neither answers.
22
27
  3. **Append, don't rewrite.** Under `## Convergence` in `tasks.md` (create at the end if absent) add
23
- `- [ ] [T###] [US#] … (closes FR-…)` per gap and `- [ ] [T###] [US#] [VERIFY] …` per unverified
28
+ `- [ ] [T###] [US#] … (closes NNN:FR-###)` per gap and `- [ ] [T###] [US#] [VERIFY] …` per unverified
24
29
  item. Continue IDs from the highest `T###` anywhere in the file; skip items already listed
25
30
  unchecked there. Nothing to add → leave the file untouched.
26
31
  4. In `spec.md`, patch only `status:` lines: a story → `done` when every FR/SC it maps to is
@@ -0,0 +1,31 @@
1
+ ---
2
+ id: decide
3
+ name: amby.decide
4
+ description: Record a decision as a numbered record — cited by ID, supersedable, checked by analyze.
5
+ argument-hint: "<decision text> [--supersede ADR-###]"
6
+ phase: decide
7
+ reads: [.amby/decisions/README.md, .amby/templates/adr.md, .amby/constitution.md]
8
+ writes: [.amby/decisions/ADR-###.md, .amby/decisions/README.md]
9
+ allowedTools: [read, write, edit, bash]
10
+ ---
11
+
12
+ Record the decision in `$ARGUMENTS`. Callable from any phase; it has no role of its own.
13
+
14
+ If a current feature applies, run `ambykit activity <feature> --agent=$AGENT --phase=decide` first; ignore any error.
15
+
16
+ 1. No decision text → ask for it in one question. Read `.amby/decisions/README.md` (the index) only;
17
+ if a row's title already covers the decision, name that `ADR-###` and stop — do not duplicate.
18
+ 2. Number: highest of the `ADR-###.md` files **and** the index rows, plus 1, three digits. Never reuse a
19
+ number, even for a deleted file. Create `.amby/decisions/` and its index (`| ID | Title | Status |`)
20
+ on first use.
21
+ 3. Write `.amby/decisions/ADR-<n>.md` from `@.amby/templates/adr.md`: Context, Decision, Alternatives,
22
+ Consequences, each short. Fill `feature` from the current feature and `principle` when relevant.
23
+ The file name is the id, with no slug.
24
+ 4. Principle conflict: if the decision conflicts with a constitution principle, set `status: proposed`,
25
+ list the principle numbers in `conflicts`, and tell the person it needs their call. Never write
26
+ `accepted` with `conflicts` filled. Otherwise `status: accepted`.
27
+ 5. `--supersede ADR-###`: set `supersedes` on the new record, and on the old record set
28
+ `status: superseded` and `superseded-by: <new id>`. Both sides, always. Never edit the old record's body.
29
+ 6. A wording-only edit of an existing record keeps its `id` and `status`.
30
+ 7. Patch the index in place: add or update this record's row. Leave rows of deleted files (tombstones).
31
+ 8. Cite decisions elsewhere only by `ADR-###`; never restate them. End with the id and path.
@@ -5,7 +5,7 @@ description: Execute the task list, checking off tasks and updating story status
5
5
  argument-hint: "[task id or story id, defaults to next unblocked]"
6
6
  phase: implement
7
7
  role: developer
8
- reads: [specs/NNN-slug/tasks.md, specs/NNN-slug/plan.md]
8
+ reads: [specs/NNN-slug/tasks.md, specs/NNN-slug/plan.md, specs/NNN-slug/tests.md]
9
9
  writes: [specs/NNN-slug/tasks.md, specs/NNN-slug/spec.md]
10
10
  allowedTools: [read, write, edit, bash]
11
11
  ---
@@ -14,14 +14,23 @@ Implement work for `$ARGUMENTS` (default: the next unblocked task in priority or
14
14
 
15
15
  Run `ambykit activity <feature> --agent=$AGENT --phase=implement` first, with that feature's number; ignore any error.
16
16
 
17
- 1. From `tasks.md`, pick the target task(s). Respect the Foundational-before-features gate and the
17
+ 1. From `tasks.md`, pick the target task(s). If `.amby/lane/lane.json` exists you are in a lane: work
18
+ only the task ids it lists. Respect the Foundational-before-features gate and the
18
19
  story dependency graph — never start a task whose story is `blocked-by` unfinished work.
19
20
  2. Load **only** the slice you need: the task line, the relevant `plan.md` section, and the specific
20
21
  files named. Don't read the whole spec tree (token-frugal).
21
22
  3. Implement to satisfy the mapped `FR-###`/acceptance criteria and the constitution. Add/adjust
22
- tests for the acceptance criteria.
23
- 4. **Patch in place:** flip the completed task's checkbox to `- [x]` in `tasks.md`; when all of a
24
- story's tasks are done, set that story's `status: done` in `spec.md` (or `in-progress` while
25
- partway). Don't rewrite untouched sections. After each checked task, run
26
- `ambykit activity <feature> --agent=$AGENT --phase=implement --task=T###` (ignore errors).
27
- 5. Report what you did and the next unblocked task. Stop at a story checkpoint for review.
23
+ tests for the acceptance criteria: build to the story's cases in `tests.md` and name tests `NNN:FR-###: …`;
24
+ at the story checkpoint say if `tests.md` is missing, never pass silently. If you cannot finish a task, add `⚠ BLOCKED: <reason>` as the last
25
+ segment of its line (after the `(file/path)` group), stop that task and continue with another unblocked
26
+ one; note any departure from the plan as `↪ DEVIATION: <note>`. Remove `⚠ BLOCKED:` once resolved.
27
+ 4. **Patch in place:** flip the completed task's checkbox to `- [x]` in `tasks.md`; set the story's
28
+ `status: in-progress` in `spec.md` while it is partway. Don't rewrite untouched sections. After each
29
+ checked task, run `ambykit activity <feature> --agent=$AGENT --phase=implement --task=T###` (ignore errors).
30
+ 5. At a phase checkpoint, run that phase's `**Verify:**` check before passing it (no Verify line: say so
31
+ and continue). Write the result at the end of that line, replacing any earlier one: `✓ passed`,
32
+ `✗ failed: <why>` or `? unverified`. Never pass the checkpoint on a failure: fix it and run again. If
33
+ you cannot run the check, ask a person to run or confirm it and record `? unverified`. Only once the
34
+ Verify has passed (or there is none) and all of a story's tasks are done, set that story's
35
+ `status: done`. In a lane, record the result after the phase's lanes are merged.
36
+ 6. Report what you did and the next unblocked task. Stop at a story checkpoint for review.
@@ -5,8 +5,8 @@ description: Continue an existing feature's spec (or design) — add and refine
5
5
  argument-hint: "[feature id, defaults to current] + what to add or refine"
6
6
  phase: revise
7
7
  role: pm
8
- reads: [specs/NNN-slug/spec.md, specs/NNN-slug/ui.md]
9
- writes: [specs/NNN-slug/spec.md, specs/NNN-slug/ui.md]
8
+ reads: [specs/NNN-slug/spec.md, specs/NNN-slug/ui.md, specs/NNN-slug/tests.md]
9
+ writes: [specs/NNN-slug/spec.md, specs/NNN-slug/ui.md, specs/NNN-slug/tests.md]
10
10
  allowedTools: [read, edit]
11
11
  ---
12
12
 
@@ -27,6 +27,8 @@ of `@.amby/templates/spec.md`. This command **extends** an existing feature —
27
27
  - New requirements use EARS (SHALL / WHEN / WHILE / IF-THEN / WHERE); new acceptance criteria use
28
28
  Given/When/Then — consistent with `specify`.
29
29
  - Leave any story already marked `status: done` untouched; you may still add new stories.
30
+ - If `tests.md` exists, mark each case citing a changed criterion `[stale]` and each citing a removed one
31
+ `[obsolete]` (never delete); change nothing else there.
30
32
  4. Set the `spec.md` frontmatter `status:` to `in-progress`.
31
33
  5. **Design (optional).** If the author is continuing the UI/design and `ui.md` exists, extend it in
32
34
  place, preserving existing sections. If `ui.md` does **not** exist, do not create it here — direct