@specship/specship-darwin-arm64 0.28.0 → 0.30.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 (324) hide show
  1. package/bin/specship +1 -1
  2. package/lib/dist/.claude-plugin/plugin.json +15 -3
  3. package/lib/dist/activation/cheatsheet.d.ts +10 -7
  4. package/lib/dist/activation/cheatsheet.d.ts.map +1 -1
  5. package/lib/dist/activation/cheatsheet.js +21 -5
  6. package/lib/dist/activation/cheatsheet.js.map +1 -1
  7. package/lib/dist/activation/hook-output.d.ts +75 -2
  8. package/lib/dist/activation/hook-output.d.ts.map +1 -1
  9. package/lib/dist/activation/hook-output.js +114 -3
  10. package/lib/dist/activation/hook-output.js.map +1 -1
  11. package/lib/dist/activation/search-intercept.d.ts +20 -7
  12. package/lib/dist/activation/search-intercept.d.ts.map +1 -1
  13. package/lib/dist/activation/search-intercept.js +27 -5
  14. package/lib/dist/activation/search-intercept.js.map +1 -1
  15. package/lib/dist/activation/steering.d.ts +7 -4
  16. package/lib/dist/activation/steering.d.ts.map +1 -1
  17. package/lib/dist/activation/steering.js +10 -8
  18. package/lib/dist/activation/steering.js.map +1 -1
  19. package/lib/dist/agents/detect.d.ts +32 -0
  20. package/lib/dist/agents/detect.d.ts.map +1 -0
  21. package/lib/dist/agents/detect.js +54 -0
  22. package/lib/dist/agents/detect.js.map +1 -0
  23. package/lib/dist/agents/recent-project.d.ts +18 -0
  24. package/lib/dist/agents/recent-project.d.ts.map +1 -0
  25. package/lib/dist/agents/recent-project.js +92 -0
  26. package/lib/dist/agents/recent-project.js.map +1 -0
  27. package/lib/dist/analytics/canonical-tools.d.ts +23 -0
  28. package/lib/dist/analytics/canonical-tools.d.ts.map +1 -0
  29. package/lib/dist/analytics/canonical-tools.js +36 -0
  30. package/lib/dist/analytics/canonical-tools.js.map +1 -0
  31. package/lib/dist/analytics/canonical-tools.json +16 -0
  32. package/lib/dist/analytics/specship-impact.d.ts +3 -2
  33. package/lib/dist/analytics/specship-impact.d.ts.map +1 -1
  34. package/lib/dist/analytics/specship-impact.js +6 -4
  35. package/lib/dist/analytics/specship-impact.js.map +1 -1
  36. package/lib/dist/bin/specship.js +252 -170
  37. package/lib/dist/bin/specship.js.map +1 -1
  38. package/lib/dist/bin/uninstall.js +2 -2
  39. package/lib/dist/bin/uninstall.js.map +1 -1
  40. package/lib/dist/claudemd/audit.d.ts +12 -3
  41. package/lib/dist/claudemd/audit.d.ts.map +1 -1
  42. package/lib/dist/claudemd/audit.js +65 -22
  43. package/lib/dist/claudemd/audit.js.map +1 -1
  44. package/lib/dist/commands/specship/spec.md +16 -1
  45. package/lib/dist/db/migrations.d.ts +1 -1
  46. package/lib/dist/db/migrations.d.ts.map +1 -1
  47. package/lib/dist/db/migrations.js +18 -4
  48. package/lib/dist/db/migrations.js.map +1 -1
  49. package/lib/dist/db/schema.sql +8 -0
  50. package/lib/dist/db/spec-queries.d.ts +13 -1
  51. package/lib/dist/db/spec-queries.d.ts.map +1 -1
  52. package/lib/dist/db/spec-queries.js +21 -0
  53. package/lib/dist/db/spec-queries.js.map +1 -1
  54. package/lib/dist/design-md/check.d.ts +51 -0
  55. package/lib/dist/design-md/check.d.ts.map +1 -0
  56. package/lib/dist/design-md/check.js +335 -0
  57. package/lib/dist/design-md/check.js.map +1 -0
  58. package/lib/dist/design-md/css.d.ts +40 -0
  59. package/lib/dist/design-md/css.d.ts.map +1 -0
  60. package/lib/dist/design-md/css.js +224 -0
  61. package/lib/dist/design-md/css.js.map +1 -0
  62. package/lib/dist/design-md/extract.d.ts +84 -0
  63. package/lib/dist/design-md/extract.d.ts.map +1 -0
  64. package/lib/dist/design-md/extract.js +595 -0
  65. package/lib/dist/design-md/extract.js.map +1 -0
  66. package/lib/dist/design-md/maintain.d.ts +45 -0
  67. package/lib/dist/design-md/maintain.d.ts.map +1 -0
  68. package/lib/dist/design-md/maintain.js +127 -0
  69. package/lib/dist/design-md/maintain.js.map +1 -0
  70. package/lib/dist/design-md/render.d.ts +28 -0
  71. package/lib/dist/design-md/render.d.ts.map +1 -0
  72. package/lib/dist/design-md/render.js +178 -0
  73. package/lib/dist/design-md/render.js.map +1 -0
  74. package/lib/dist/design-md/upkeep.d.ts +48 -0
  75. package/lib/dist/design-md/upkeep.d.ts.map +1 -0
  76. package/lib/dist/design-md/upkeep.js +169 -0
  77. package/lib/dist/design-md/upkeep.js.map +1 -0
  78. package/lib/dist/design-md/verify.d.ts +65 -0
  79. package/lib/dist/design-md/verify.d.ts.map +1 -0
  80. package/lib/dist/design-md/verify.js +311 -0
  81. package/lib/dist/design-md/verify.js.map +1 -0
  82. package/lib/dist/enforce/changed-files.d.ts +7 -0
  83. package/lib/dist/enforce/changed-files.d.ts.map +1 -1
  84. package/lib/dist/enforce/changed-files.js +17 -0
  85. package/lib/dist/enforce/changed-files.js.map +1 -1
  86. package/lib/dist/enforce/enforce.d.ts +35 -1
  87. package/lib/dist/enforce/enforce.d.ts.map +1 -1
  88. package/lib/dist/enforce/enforce.js +66 -2
  89. package/lib/dist/enforce/enforce.js.map +1 -1
  90. package/lib/dist/extraction/index.d.ts +50 -4
  91. package/lib/dist/extraction/index.d.ts.map +1 -1
  92. package/lib/dist/extraction/index.js +105 -13
  93. package/lib/dist/extraction/index.js.map +1 -1
  94. package/lib/dist/extraction/parse-warnings.d.ts +16 -0
  95. package/lib/dist/extraction/parse-warnings.d.ts.map +1 -0
  96. package/lib/dist/extraction/parse-warnings.js +30 -0
  97. package/lib/dist/extraction/parse-warnings.js.map +1 -0
  98. package/lib/dist/extraction/tree-sitter.d.ts +27 -0
  99. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  100. package/lib/dist/extraction/tree-sitter.js +168 -1
  101. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  102. package/lib/dist/health/smoke-check.js +1 -1
  103. package/lib/dist/health/smoke-check.js.map +1 -1
  104. package/lib/dist/hooks/hooks.json +16 -1
  105. package/lib/dist/index.d.ts +63 -3
  106. package/lib/dist/index.d.ts.map +1 -1
  107. package/lib/dist/index.js +235 -9
  108. package/lib/dist/index.js.map +1 -1
  109. package/lib/dist/installer/agent-record.d.ts +80 -0
  110. package/lib/dist/installer/agent-record.d.ts.map +1 -0
  111. package/lib/dist/installer/agent-record.js +351 -0
  112. package/lib/dist/installer/agent-record.js.map +1 -0
  113. package/lib/dist/installer/auto-migrate.d.ts +56 -0
  114. package/lib/dist/installer/auto-migrate.d.ts.map +1 -0
  115. package/lib/dist/installer/auto-migrate.js +328 -0
  116. package/lib/dist/installer/auto-migrate.js.map +1 -0
  117. package/lib/dist/installer/index.d.ts +37 -8
  118. package/lib/dist/installer/index.d.ts.map +1 -1
  119. package/lib/dist/installer/index.js +156 -46
  120. package/lib/dist/installer/index.js.map +1 -1
  121. package/lib/dist/installer/install-defaults.d.ts +4 -3
  122. package/lib/dist/installer/install-defaults.d.ts.map +1 -1
  123. package/lib/dist/installer/install-defaults.js +6 -5
  124. package/lib/dist/installer/install-defaults.js.map +1 -1
  125. package/lib/dist/installer/{config-writer.d.ts → targets/claude-config-writer.d.ts} +1 -1
  126. package/lib/dist/installer/targets/claude-config-writer.d.ts.map +1 -0
  127. package/lib/dist/installer/{config-writer.js → targets/claude-config-writer.js} +7 -6
  128. package/lib/dist/installer/targets/claude-config-writer.js.map +1 -0
  129. package/lib/dist/installer/targets/claude-projects.d.ts +9 -0
  130. package/lib/dist/installer/targets/claude-projects.d.ts.map +1 -0
  131. package/lib/dist/installer/targets/claude-projects.js +151 -0
  132. package/lib/dist/installer/targets/claude-projects.js.map +1 -0
  133. package/lib/dist/installer/targets/claude.d.ts +29 -2
  134. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  135. package/lib/dist/installer/targets/claude.js +44 -20
  136. package/lib/dist/installer/targets/claude.js.map +1 -1
  137. package/lib/dist/installer/targets/feature-parity.d.ts +28 -0
  138. package/lib/dist/installer/targets/feature-parity.d.ts.map +1 -0
  139. package/lib/dist/installer/targets/feature-parity.js +32 -0
  140. package/lib/dist/installer/targets/feature-parity.js.map +1 -0
  141. package/lib/dist/installer/{gemini-commands.d.ts → targets/gemini-commands.d.ts} +7 -3
  142. package/lib/dist/installer/targets/gemini-commands.d.ts.map +1 -0
  143. package/lib/dist/installer/{gemini-commands.js → targets/gemini-commands.js} +37 -9
  144. package/lib/dist/installer/targets/gemini-commands.js.map +1 -0
  145. package/lib/dist/installer/targets/gemini-projects.d.ts +11 -0
  146. package/lib/dist/installer/targets/gemini-projects.d.ts.map +1 -0
  147. package/lib/dist/installer/targets/gemini-projects.js +84 -0
  148. package/lib/dist/installer/targets/gemini-projects.js.map +1 -0
  149. package/lib/dist/installer/targets/gemini.d.ts +94 -8
  150. package/lib/dist/installer/targets/gemini.d.ts.map +1 -1
  151. package/lib/dist/installer/targets/gemini.js +392 -33
  152. package/lib/dist/installer/targets/gemini.js.map +1 -1
  153. package/lib/dist/installer/targets/registry.d.ts +8 -1
  154. package/lib/dist/installer/targets/registry.d.ts.map +1 -1
  155. package/lib/dist/installer/targets/registry.js +14 -5
  156. package/lib/dist/installer/targets/registry.js.map +1 -1
  157. package/lib/dist/installer/targets/shared.d.ts +44 -1
  158. package/lib/dist/installer/targets/shared.d.ts.map +1 -1
  159. package/lib/dist/installer/targets/shared.js +130 -3
  160. package/lib/dist/installer/targets/shared.js.map +1 -1
  161. package/lib/dist/installer/targets/types.d.ts +23 -1
  162. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  163. package/lib/dist/jira/auto-publish.d.ts +22 -2
  164. package/lib/dist/jira/auto-publish.d.ts.map +1 -1
  165. package/lib/dist/jira/auto-publish.js +54 -9
  166. package/lib/dist/jira/auto-publish.js.map +1 -1
  167. package/lib/dist/jira/board-first.d.ts +15 -2
  168. package/lib/dist/jira/board-first.d.ts.map +1 -1
  169. package/lib/dist/jira/board-first.js +16 -0
  170. package/lib/dist/jira/board-first.js.map +1 -1
  171. package/lib/dist/jira/ci-publish.d.ts +72 -0
  172. package/lib/dist/jira/ci-publish.d.ts.map +1 -0
  173. package/lib/dist/jira/ci-publish.js +162 -0
  174. package/lib/dist/jira/ci-publish.js.map +1 -0
  175. package/lib/dist/jira/publish.d.ts +23 -0
  176. package/lib/dist/jira/publish.d.ts.map +1 -1
  177. package/lib/dist/jira/publish.js +0 -0
  178. package/lib/dist/jira/publish.js.map +1 -1
  179. package/lib/dist/jira/regression-pack.d.ts.map +1 -1
  180. package/lib/dist/jira/regression-pack.js +7 -1
  181. package/lib/dist/jira/regression-pack.js.map +1 -1
  182. package/lib/dist/jira/repo-config.d.ts.map +1 -1
  183. package/lib/dist/jira/repo-config.js +8 -0
  184. package/lib/dist/jira/repo-config.js.map +1 -1
  185. package/lib/dist/jira/types.d.ts +8 -0
  186. package/lib/dist/jira/types.d.ts.map +1 -1
  187. package/lib/dist/jira/types.js.map +1 -1
  188. package/lib/dist/knowledge/enforce.d.ts.map +1 -1
  189. package/lib/dist/knowledge/enforce.js +6 -1
  190. package/lib/dist/knowledge/enforce.js.map +1 -1
  191. package/lib/dist/mcp/jira-tools.d.ts +5 -0
  192. package/lib/dist/mcp/jira-tools.d.ts.map +1 -1
  193. package/lib/dist/mcp/jira-tools.js +59 -4
  194. package/lib/dist/mcp/jira-tools.js.map +1 -1
  195. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  196. package/lib/dist/mcp/proxy.js +2 -1
  197. package/lib/dist/mcp/proxy.js.map +1 -1
  198. package/lib/dist/mcp/server-instructions.d.ts +16 -10
  199. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  200. package/lib/dist/mcp/server-instructions.js +69 -20
  201. package/lib/dist/mcp/server-instructions.js.map +1 -1
  202. package/lib/dist/mcp/session.d.ts +11 -0
  203. package/lib/dist/mcp/session.d.ts.map +1 -1
  204. package/lib/dist/mcp/session.js +43 -1
  205. package/lib/dist/mcp/session.js.map +1 -1
  206. package/lib/dist/mcp/tools.d.ts.map +1 -1
  207. package/lib/dist/mcp/tools.js +8 -0
  208. package/lib/dist/mcp/tools.js.map +1 -1
  209. package/lib/dist/reflect/apply.d.ts +2 -2
  210. package/lib/dist/reflect/apply.d.ts.map +1 -1
  211. package/lib/dist/reflect/apply.js +6 -5
  212. package/lib/dist/reflect/apply.js.map +1 -1
  213. package/lib/dist/reflect/miner.d.ts.map +1 -1
  214. package/lib/dist/reflect/miner.js +28 -15
  215. package/lib/dist/reflect/miner.js.map +1 -1
  216. package/lib/dist/reflect/session-outcomes.d.ts.map +1 -1
  217. package/lib/dist/reflect/session-outcomes.js +8 -3
  218. package/lib/dist/reflect/session-outcomes.js.map +1 -1
  219. package/lib/dist/reflect/targets.d.ts.map +1 -1
  220. package/lib/dist/reflect/targets.js +25 -5
  221. package/lib/dist/reflect/targets.js.map +1 -1
  222. package/lib/dist/reflect/types.d.ts +7 -0
  223. package/lib/dist/reflect/types.d.ts.map +1 -1
  224. package/lib/dist/resolution/spec-link-resolver.d.ts +14 -2
  225. package/lib/dist/resolution/spec-link-resolver.d.ts.map +1 -1
  226. package/lib/dist/resolution/spec-link-resolver.js +13 -3
  227. package/lib/dist/resolution/spec-link-resolver.js.map +1 -1
  228. package/lib/dist/server/canonical-tools.js +50 -0
  229. package/lib/dist/server/cli.js +2 -2
  230. package/lib/dist/server/host-profiles.js +39 -0
  231. package/lib/dist/server/ingest/index.js +2 -1
  232. package/lib/dist/server/ingest/ingestor.js +195 -76
  233. package/lib/dist/server/ingest/project-paths.js +8 -2
  234. package/lib/dist/server/ingest/recorded-projects.js +43 -0
  235. package/lib/dist/server/ingest/specship-classify.js +7 -2
  236. package/lib/dist/server/ingest/transcripts/claude-jsonl.js +54 -0
  237. package/lib/dist/server/ingest/transcripts/claude.js +64 -0
  238. package/lib/dist/server/ingest/transcripts/gemini.js +469 -0
  239. package/lib/dist/server/ingest/transcripts/index.js +14 -0
  240. package/lib/dist/server/ingest/{parser.js → transcripts/shared.js} +3 -49
  241. package/lib/dist/server/ingest/transcripts/types.js +4 -0
  242. package/lib/dist/server/ingest/watcher.js +31 -30
  243. package/lib/dist/server/routes/claude.js +27 -10
  244. package/lib/dist/server/routes/graph.js +64 -3
  245. package/lib/dist/server/routes/mcp.js +57 -15
  246. package/lib/dist/server/routes/memory.js +54 -35
  247. package/lib/dist/server/routes/projects.js +78 -7
  248. package/lib/dist/server/routes/spec.js +125 -0
  249. package/lib/dist/server/server.js +8 -2
  250. package/lib/dist/skills/design-md/SKILL.md +172 -0
  251. package/lib/dist/skills/design-md/references/authored-sections.md +90 -0
  252. package/lib/dist/skills/design-md/references/sources.md +71 -0
  253. package/lib/dist/skills/spec-author/SKILL.md +1 -1
  254. package/lib/dist/skills/spec-author/references/gap-questions.md +1 -1
  255. package/lib/dist/spec-lint/lint.d.ts +26 -1
  256. package/lib/dist/spec-lint/lint.d.ts.map +1 -1
  257. package/lib/dist/spec-lint/lint.js +96 -7
  258. package/lib/dist/spec-lint/lint.js.map +1 -1
  259. package/lib/dist/spec-quality/postcheck.d.ts +7 -1
  260. package/lib/dist/spec-quality/postcheck.d.ts.map +1 -1
  261. package/lib/dist/spec-quality/postcheck.js +31 -0
  262. package/lib/dist/spec-quality/postcheck.js.map +1 -1
  263. package/lib/dist/sync/worktree.d.ts +48 -0
  264. package/lib/dist/sync/worktree.d.ts.map +1 -1
  265. package/lib/dist/sync/worktree.js +109 -0
  266. package/lib/dist/sync/worktree.js.map +1 -1
  267. package/lib/dist/ui/assets/bricolage-latin-C23fTOVi.woff2 +0 -0
  268. package/lib/dist/ui/assets/bricolage-latin-ext-B82pxkPf.woff2 +0 -0
  269. package/lib/dist/ui/assets/index-54vorjyq.css +1 -0
  270. package/lib/dist/ui/assets/index-BZQonCVb.js +52 -0
  271. package/lib/dist/ui/assets/space-grotesk-latin-DPT1xrvW.woff2 +0 -0
  272. package/lib/dist/ui/assets/space-grotesk-latin-ext-wJGaI8U0.woff2 +0 -0
  273. package/lib/dist/ui/index.html +2 -2
  274. package/lib/dist/update/updater.d.ts +6 -0
  275. package/lib/dist/update/updater.d.ts.map +1 -1
  276. package/lib/dist/update/updater.js +13 -1
  277. package/lib/dist/update/updater.js.map +1 -1
  278. package/lib/dist/workflows/agents/claude.d.ts +9 -0
  279. package/lib/dist/workflows/agents/claude.d.ts.map +1 -1
  280. package/lib/dist/workflows/agents/claude.js +22 -3
  281. package/lib/dist/workflows/agents/claude.js.map +1 -1
  282. package/lib/dist/workflows/agents/gemini-version.d.ts +18 -0
  283. package/lib/dist/workflows/agents/gemini-version.d.ts.map +1 -0
  284. package/lib/dist/workflows/agents/gemini-version.js +81 -0
  285. package/lib/dist/workflows/agents/gemini-version.js.map +1 -0
  286. package/lib/dist/workflows/agents/gemini.d.ts +1 -1
  287. package/lib/dist/workflows/agents/gemini.d.ts.map +1 -1
  288. package/lib/dist/workflows/agents/gemini.js +12 -2
  289. package/lib/dist/workflows/agents/gemini.js.map +1 -1
  290. package/lib/dist/workflows/agents/index.d.ts +2 -0
  291. package/lib/dist/workflows/agents/index.d.ts.map +1 -1
  292. package/lib/dist/workflows/agents/index.js +5 -0
  293. package/lib/dist/workflows/agents/index.js.map +1 -1
  294. package/lib/dist/workflows/agents/types.d.ts +13 -0
  295. package/lib/dist/workflows/agents/types.d.ts.map +1 -1
  296. package/lib/dist/workflows/agents/types.js.map +1 -1
  297. package/lib/dist/workflows/condition-evaluator.d.ts +8 -0
  298. package/lib/dist/workflows/condition-evaluator.d.ts.map +1 -1
  299. package/lib/dist/workflows/condition-evaluator.js +7 -0
  300. package/lib/dist/workflows/condition-evaluator.js.map +1 -1
  301. package/lib/dist/workflows/defaults/claude-design-implement.yaml +44 -15
  302. package/lib/dist/workflows/defaults/spec-author.yaml +9 -9
  303. package/lib/dist/workflows/defaults/spec-fix.yaml +8 -8
  304. package/lib/dist/workflows/defaults/spec-implement.yaml +54 -23
  305. package/lib/dist/workflows/defaults/spec-relink.yaml +5 -5
  306. package/lib/dist/workflows/defaults/spec-verify.yaml +3 -3
  307. package/lib/dist/workflows/executor.d.ts +7 -0
  308. package/lib/dist/workflows/executor.d.ts.map +1 -1
  309. package/lib/dist/workflows/executor.js +22 -5
  310. package/lib/dist/workflows/executor.js.map +1 -1
  311. package/lib/node_modules/.package-lock.json +1 -1
  312. package/lib/package.json +3 -2
  313. package/package.json +1 -1
  314. package/lib/dist/installer/config-writer.d.ts.map +0 -1
  315. package/lib/dist/installer/config-writer.js.map +0 -1
  316. package/lib/dist/installer/gemini-commands.d.ts.map +0 -1
  317. package/lib/dist/installer/gemini-commands.js.map +0 -1
  318. package/lib/dist/ui/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
  319. package/lib/dist/ui/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
  320. package/lib/dist/ui/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
  321. package/lib/dist/ui/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
  322. package/lib/dist/ui/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
  323. package/lib/dist/ui/assets/index-BzuUWUAE.js +0 -50
  324. package/lib/dist/ui/assets/index-ezwX2EfG.css +0 -1
@@ -53,7 +53,9 @@ systemPromptAppend: |
53
53
 
54
54
  The fidelity principle: never paraphrase or summarise design content
55
55
  when capturing it. The snapshot HTML and tokens.css are the
56
- zero-loss reference layer; the spec captures contract only (behaviour,
56
+ zero-loss reference layer, and design.md states every value from them
57
+ verbatim in a fixed layout (written by `specship design extract`, never
58
+ transcribed by hand); the spec captures contract only (behaviour,
57
59
  accessibility, responsive, interaction states, data shape).
58
60
 
59
61
  There are two import shapes — exactly one source input is non-empty:
@@ -73,11 +75,12 @@ nodes:
73
75
  allowed_tools:
74
76
  - Read
75
77
  - Write
78
+ - Edit
76
79
  - Bash
77
- - mcp__specship__specship_explore
78
- - mcp__specship__specship_search
79
- - mcp__specship__designer_snapshot
80
- - mcp__specship__designer_handoff
80
+ - specship_explore
81
+ - specship_search
82
+ - designer_snapshot
83
+ - designer_handoff
81
84
  prompt: |
82
85
  File label: $INPUT.FILE_LABEL
83
86
  Slug: $INPUT.SLUG
@@ -128,7 +131,7 @@ nodes:
128
131
  ── BRANCH B — Source URL is set (live fetch) ──
129
132
 
130
133
  B1. Fetch the design content from $INPUT.CONNECTOR_URL. Try in order:
131
- a. The `designer` MCP — `mcp__specship__designer_snapshot`
134
+ a. The `designer` MCP — its `designer_snapshot` tool
132
135
  (reads the real rendered HTML over CDP from inside the
133
136
  cross-origin preview iframe). This is the only path that
134
137
  reliably returns the real design for a claude.ai/design URL.
@@ -160,7 +163,29 @@ nodes:
160
163
 
161
164
  ── BOTH BRANCHES ──
162
165
 
163
- 4. Extract CSS custom properties + literal token-like values
166
+ 4. Write the pixel-exact design reference (DESIGNMD-DOC). The values
167
+ come from the extractor, never from you:
168
+
169
+ specship design extract specs/$INPUT.SLUG/snapshot.html \
170
+ --out specs/$INPUT.SLUG/design.md --title "$INPUT.FILE_LABEL"
171
+
172
+ (If design.md already exists from an earlier import, use
173
+ `--update specs/$INPUT.SLUG/design.md` instead of `--out`.)
174
+ If the generated block reports a "Missing linked stylesheet",
175
+ copy that file next to the snapshot and re-run with `--update`.
176
+ Then fill design.md's authored sections — Screens & layout,
177
+ Components & states, Interactions & motion, Responsive behaviour,
178
+ Assets — following the design-md skill
179
+ ($AGENT_SKILLS_DIR/design-md/SKILL.md and its
180
+ references/authored-sections.md): every value copied verbatim
181
+ from the generated block with its selector, every styled state
182
+ listed, no approximate wording. Run
183
+
184
+ specship design check specs/$INPUT.SLUG/design.md
185
+
186
+ and fix findings until it passes.
187
+
188
+ 5. Extract CSS custom properties + literal token-like values
164
189
  (colors, spacing, font sizes, radii, transitions) from the
165
190
  snapshot to `specs/$INPUT.SLUG/tokens.css`. Use
166
191
  `specship_explore` first to find the project's existing token
@@ -175,6 +200,7 @@ nodes:
175
200
  - Any visible interaction or state cues in the CSS (`:hover`,
176
201
  `:focus`, `:disabled`, `[aria-*]` selectors) the spec
177
202
  author should be aware of.
203
+ - Whether `specship design check` passes on design.md.
178
204
  - For Branch A: note that source.md carries the verbatim decision
179
205
  record — the draft step should mine it for stated behaviour.
180
206
 
@@ -184,18 +210,19 @@ nodes:
184
210
  output_type: spec_markdown
185
211
  allowed_tools:
186
212
  - Read
187
- - mcp__specship__specship_explore
188
- - mcp__specship__specship_search
189
- - mcp__specship__specship_node
190
- - mcp__specship__specship_spec
213
+ - specship_explore
214
+ - specship_search
215
+ - specship_node
216
+ - specship_spec
191
217
  prompt: |
192
- Use the spec-author skill (~/.claude/skills/spec-author/SKILL.md
218
+ Use the spec-author skill ($AGENT_SKILLS_DIR/spec-author/SKILL.md
193
219
  and its references/) to draft a SpecShip-compatible spec for the
194
220
  Claude Design import. Inputs available on disk:
195
221
 
196
222
  - specs/$INPUT.SLUG/snapshot.html (visual + structural source)
197
223
  - specs/$INPUT.SLUG/tokens.css (design tokens)
198
224
  - specs/$INPUT.SLUG/source.md (audit record)
225
+ - specs/$INPUT.SLUG/design.md (pixel-exact design reference)
199
226
 
200
227
  Spec scope: $INPUT.FILE_LABEL component(s).
201
228
  Optional inputs: owner=$INPUT.OWNER priority=$INPUT.PRIORITY
@@ -236,6 +263,7 @@ nodes:
236
263
  source: specs/<SLUG>/source.md
237
264
  snapshot: specs/<SLUG>/snapshot.html
238
265
  tokens: specs/<SLUG>/tokens.css
266
+ design: specs/<SLUG>/design.md
239
267
  ---
240
268
  ```
241
269
 
@@ -322,14 +350,15 @@ nodes:
322
350
  1. The path of the spec file: `specs/$INPUT.SLUG.md`.
323
351
  2. The full list of REQ IDs the spec defines, one per line.
324
352
  3. The reference files the implementation phase should read:
353
+ - specs/$INPUT.SLUG/design.md (read first: every value verbatim)
325
354
  - specs/$INPUT.SLUG/snapshot.html
326
355
  - specs/$INPUT.SLUG/tokens.css
327
356
  - specs/$INPUT.SLUG/source.md
328
357
  4. The exact next command:
329
358
  /specship:spec implement <first REQ ID>
330
- 5. A one-line reminder that the implementation step should
331
- load the snapshot for visual fidelity — the spec covers
332
- contract only.
359
+ 5. A one-line reminder that the implementation step builds the UI
360
+ from design.md (values verbatim) — the spec covers contract
361
+ only.
333
362
 
334
363
  Keep the message ≤200 words. The user is about to switch from
335
364
  this workflow to the implement workflow; this is the bridge.
@@ -35,9 +35,9 @@ nodes:
35
35
  kind: prompt
36
36
  output_type: code_grounding
37
37
  allowed_tools:
38
- - mcp__specship__specship_explore
39
- - mcp__specship__specship_search
40
- - mcp__specship__specship_files
38
+ - specship_explore
39
+ - specship_search
40
+ - specship_files
41
41
  - Read
42
42
  prompt: |
43
43
  Feature: $INPUT.DESCRIPTION
@@ -64,9 +64,9 @@ nodes:
64
64
  depends_on: [ground]
65
65
  output_type: spec_draft
66
66
  allowed_tools:
67
- - mcp__specship__specship_spec
68
- - mcp__specship__specship_explore
69
- - mcp__specship__specship_node
67
+ - specship_spec
68
+ - specship_explore
69
+ - specship_node
70
70
  - Read
71
71
  prompt: |
72
72
  Feature: $INPUT.DESCRIPTION
@@ -146,9 +146,9 @@ nodes:
146
146
  depends_on: [incorporate]
147
147
  output_type: review_findings
148
148
  allowed_tools:
149
- - mcp__specship__specship_explore
150
- - mcp__specship__specship_node
151
- - mcp__specship__specship_search
149
+ - specship_explore
150
+ - specship_node
151
+ - specship_search
152
152
  - Read
153
153
  prompt: |
154
154
  Run the spec-author skill's `references/review-checklist.md` against
@@ -24,9 +24,9 @@ nodes:
24
24
  kind: prompt
25
25
  output_type: diagnosis
26
26
  allowed_tools:
27
- - mcp__specship__specship_spec
28
- - mcp__specship__specship_node
29
- - mcp__specship__specship_explore
27
+ - specship_spec
28
+ - specship_node
29
+ - specship_explore
30
30
  - Read
31
31
  prompt: |
32
32
  Spec ID: $INPUT.SPEC_ID
@@ -60,8 +60,8 @@ nodes:
60
60
  - Edit
61
61
  - Write
62
62
  - Bash
63
- - mcp__specship__specship_node
64
- - mcp__specship__specship_spec
63
+ - specship_node
64
+ - specship_spec
65
65
  prompt: |
66
66
  Apply the fix proposed in the diagnosis. Follow any guidance from
67
67
  the reviewer.
@@ -162,9 +162,9 @@ nodes:
162
162
  depends_on: [approve_links]
163
163
  output_type: link_summary
164
164
  allowed_tools:
165
- - mcp__specship__specship_spec
166
- - mcp__specship__specship_link_assert
167
- - mcp__specship__specship_link_verify
165
+ - specship_spec
166
+ - specship_link_assert
167
+ - specship_link_verify
168
168
  prompt: |
169
169
  The reviewer has approved updating link state for $INPUT.SPEC_ID.
170
170
 
@@ -18,6 +18,22 @@ systemPromptAppend: |
18
18
  `path:Symbol` bullet under the requirement's `implementations:` block in
19
19
  its spec file — links in the spec file survive any reindex.
20
20
 
21
+ Design-backed specs (REQ-DESIGNMD-006): if the spec file's frontmatter
22
+ carries a `design:` key, read that design.md before ANY UI edit and build
23
+ from it — every color, size, spacing, radius, shadow, font and duration
24
+ verbatim from its Generated reference, every state under Components &
25
+ states, every breakpoint under Responsive behaviour. Never round or
26
+ substitute a "close" value; reuse a project token only when its value is
27
+ exactly equal. Anything design.md doesn't state is a question, not a guess.
28
+ Keep it current (REQ-DESIGNMD-007): when your change alters the UI — a new
29
+ or changed component, state, layout, token or copy — update that design.md
30
+ in the same change: revise the authored sections that describe what moved,
31
+ add a dated Change log line naming $INPUT.SPEC_ID, and when the design
32
+ source itself changed run `specship design extract <sources> --update
33
+ <design.md>`. Then run `specship design check <design.md>`. The postcheck
34
+ fails a UI change whose design.md has no new Change log entry, and fails a
35
+ design.md that no longer passes the check.
36
+
21
37
  JIRA-backed specs (REQ-JIRAPUB-004): if the spec file's frontmatter
22
38
  carries a `jira_issue:` key, EVERY git commit message you write for this
23
39
  work MUST be prefixed with that key ("PROJ-123: ..."), so JIRA's
@@ -29,8 +45,8 @@ nodes:
29
45
  kind: prompt
30
46
  output_type: spec_summary
31
47
  allowed_tools:
32
- - mcp__specship__specship_spec
33
- - mcp__specship__specship_explore
48
+ - specship_spec
49
+ - specship_explore
34
50
  prompt: |
35
51
  Spec ID: $INPUT.SPEC_ID
36
52
 
@@ -68,9 +84,9 @@ nodes:
68
84
  depends_on: [fetch_spec, readiness]
69
85
  output_type: plan
70
86
  allowed_tools:
71
- - mcp__specship__specship_explore
72
- - mcp__specship__specship_node
73
- - mcp__specship__specship_spec
87
+ - specship_explore
88
+ - specship_node
89
+ - specship_spec
74
90
  - Read
75
91
  prompt: |
76
92
  Based on this spec summary, write a concrete implementation plan:
@@ -189,9 +205,9 @@ nodes:
189
205
  - Edit
190
206
  - Write
191
207
  - Bash
192
- - mcp__specship__specship_explore
193
- - mcp__specship__specship_node
194
- - mcp__specship__specship_spec
208
+ - specship_explore
209
+ - specship_node
210
+ - specship_spec
195
211
  prompt: |
196
212
  Implement the approved plan. Follow it closely.
197
213
 
@@ -285,8 +301,8 @@ nodes:
285
301
  - Edit
286
302
  - Write
287
303
  - Bash
288
- - mcp__specship__specship_explore
289
- - mcp__specship__specship_node
304
+ - specship_explore
305
+ - specship_node
290
306
  prompt: |
291
307
  Lint / typecheck result for the code you just wrote:
292
308
 
@@ -377,7 +393,7 @@ nodes:
377
393
  - Edit
378
394
  - Write
379
395
  - Bash
380
- - mcp__specship__specship_spec
396
+ - specship_spec
381
397
  prompt: |
382
398
  Mechanical post-implement check for $INPUT.SPEC_ID:
383
399
 
@@ -467,12 +483,25 @@ nodes:
467
483
  # REQ-AUTHG-004.A1 — the full diff, from git, into a run artifact. The
468
484
  # human gate and the adversarial reviewer read THIS; the implement node's
469
485
  # prose about what it believes it changed is not the change.
486
+ # REQ-WFINTEG-002 — diff against the commit the run started from (the
487
+ # readiness step records it), not HEAD: the implement step may commit,
488
+ # and a diff against HEAD would then be empty.
470
489
  # `git add -A -N` registers new files as intent-to-add so untracked work
471
- # appears in `git diff HEAD` without staging any content.
490
+ # appears in the diff without staging any content.
491
+ BASE=$(cat "$(git rev-parse --git-dir 2>/dev/null)/specship-run-base" 2>/dev/null)
492
+ if [ -z "$BASE" ] || ! git cat-file -e "$BASE^{commit}" 2>/dev/null; then
493
+ echo "HALT_CAUSE=the run's base commit was not recorded — cannot show the change this run made"
494
+ exit 1
495
+ fi
472
496
  git add -A -N >/dev/null 2>&1 || true
497
+ DIFF=$(git --no-pager diff "$BASE" | head -c 400000)
498
+ if [ -z "$DIFF" ] && [ -n "$(git status --porcelain --untracked-files=all 2>/dev/null | grep '^??')" ]; then
499
+ echo "HALT_CAUSE=the diff is empty but the worktree has files git did not include — refusing to review an empty change"
500
+ exit 1
501
+ fi
502
+ echo "DIFF_BASE=$BASE"
473
503
  echo "DIFF_BEGIN"
474
- git --no-pager diff HEAD | head -c 400000
475
- echo
504
+ printf '%s\n' "$DIFF"
476
505
  echo "DIFF_END"
477
506
 
478
507
  - id: diff_stat
@@ -484,8 +513,10 @@ nodes:
484
513
  # insertions/deletions counted by git. Its own small node so the approval
485
514
  # message carries the summary while the full diff stays in the `diff`
486
515
  # artifact.
516
+ # Same base as `diff` (REQ-WFINTEG-002), so the stat counts the whole run.
517
+ BASE=$(cat "$(git rev-parse --git-dir 2>/dev/null)/specship-run-base" 2>/dev/null)
487
518
  echo "DIFF_STAT_BEGIN"
488
- git --no-pager diff HEAD --stat
519
+ git --no-pager diff "${BASE:-HEAD}" --stat
489
520
  echo "DIFF_STAT_END"
490
521
 
491
522
  - id: verify
@@ -573,7 +604,7 @@ nodes:
573
604
  allowed_tools:
574
605
  - Read
575
606
  - Edit
576
- - mcp__specship__specship_spec
607
+ - specship_spec
577
608
  prompt: |
578
609
  Record spec→code links for the changes made in the implement step —
579
610
  durably, in the spec file (REQ-PIPETRUST-006). Do NOT call
@@ -652,10 +683,10 @@ nodes:
652
683
  allowed_tools:
653
684
  - Read
654
685
  - Grep
655
- - mcp__specship__specship_spec
656
- - mcp__specship__specship_explore
657
- - mcp__specship__specship_node
658
- - mcp__specship__specship_search
686
+ - specship_spec
687
+ - specship_explore
688
+ - specship_node
689
+ - specship_search
659
690
  prompt: |
660
691
  Adversarial review (REQ-AUTHG-005.A3). You are NOT the implementer — your
661
692
  job is to find what the implementation missed. This node is read-only:
@@ -698,7 +729,7 @@ nodes:
698
729
  - Read
699
730
  - Write
700
731
  - Bash
701
- - mcp__specship__specship_spec
732
+ - specship_spec
702
733
  prompt: |
703
734
  Try to BREAK the change for $INPUT.SPEC_ID (REQ-THRU-008). You are not
704
735
  the implementer. For EACH acceptance criterion write at least one small
@@ -742,8 +773,8 @@ nodes:
742
773
  allowed_tools:
743
774
  - Read
744
775
  - Write
745
- - mcp__specship__specship_spec
746
- - mcp__specship__specship_explore
776
+ - specship_spec
777
+ - specship_explore
747
778
  prompt: |
748
779
  Propose knowledge this change relied on, for a HUMAN to confirm
749
780
  (REQ-KNOW-004). Domain knowledge is human-confirmed, never
@@ -21,7 +21,7 @@ nodes:
21
21
  kind: prompt
22
22
  output_type: orphan_summary
23
23
  allowed_tools:
24
- - mcp__specship__specship_spec
24
+ - specship_spec
25
25
  prompt: |
26
26
  Spec ID: $INPUT.SPEC_ID
27
27
 
@@ -34,9 +34,9 @@ nodes:
34
34
  depends_on: [present_orphan]
35
35
  output_type: candidates
36
36
  allowed_tools:
37
- - mcp__specship__specship_search
38
- - mcp__specship__specship_explore
39
- - mcp__specship__specship_node
37
+ - specship_search
38
+ - specship_explore
39
+ - specship_node
40
40
  prompt: |
41
41
  The orphan(s):
42
42
  $present_orphan.output
@@ -67,7 +67,7 @@ nodes:
67
67
  depends_on: [approve_relink]
68
68
  output_type: link_summary
69
69
  allowed_tools:
70
- - mcp__specship__specship_link_assert
70
+ - specship_link_assert
71
71
  prompt: |
72
72
  The reviewer chose candidate #$approve_relink.output for spec
73
73
  $INPUT.SPEC_ID.
@@ -68,9 +68,9 @@ nodes:
68
68
  output_type: link_summary
69
69
  trigger_rule: all_done
70
70
  allowed_tools:
71
- - mcp__specship__specship_drifted
72
- - mcp__specship__specship_spec
73
- - mcp__specship__specship_link_verify
71
+ - specship_drifted
72
+ - specship_spec
73
+ - specship_link_verify
74
74
  prompt: |
75
75
  Test run completed. Output (truncated):
76
76
 
@@ -156,4 +156,11 @@ export declare function topoSort(nodes: DagNode[]): string[];
156
156
  * they are not re-run. Pure — returns a new metadata object.
157
157
  */
158
158
  export declare function resetFailedNodes(workflow: WorkflowDefinition, metadata: unknown): Record<string, unknown>;
159
+ /**
160
+ * Host-profile variables every step can reference (REQ-AGENTSWITCH-001), so a
161
+ * bundled workflow names the run's agent's paths instead of one host's:
162
+ * `$AGENT_SKILLS_DIR` is the agent's user skills directory. Caller-supplied
163
+ * variables win.
164
+ */
165
+ export declare function withAgentVariables(variables: Record<string, string> | undefined, agentId: string | undefined): Record<string, string>;
159
166
  //# sourceMappingURL=executor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/workflows/executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAMH,OAAO,EACL,kBAAkB,EAClB,OAAO,EAOR,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,WAAW,EACX,iBAAiB,EAGlB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,OAAO,EACL,UAAU,EAIX,MAAM,uBAAuB,CAAC;AAS/B,MAAM,WAAW,cAAc;IAC7B,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,uBAAuB;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,MAAM,MA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E;;;;OAIG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IA0C9C;;;;;;;;OAQG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAyC5C;;;;;OAKG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG;QAAE,eAAe,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE;YAoB1D,cAAc;YA4Jd,YAAY;IA2B1B,OAAO,CAAC,YAAY;IAuBpB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,eAAe;IAwDvB,OAAO,CAAC,uBAAuB;IAiB/B;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;YAsBb,QAAQ;YAgER,aAAa;IAyB3B,OAAO,CAAC,KAAK;CA4Bd;AAMD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,CA6BnD;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,kBAAkB,EAC5B,QAAQ,EAAE,OAAO,GAChB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAiCzB;AAUD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAC7C,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAGxB"}
@@ -52,6 +52,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
52
52
  exports.WorkflowExecutor = void 0;
53
53
  exports.topoSort = topoSort;
54
54
  exports.resetFailedNodes = resetFailedNodes;
55
+ exports.withAgentVariables = withAgentVariables;
55
56
  const fs = __importStar(require("fs"));
56
57
  const path = __importStar(require("path"));
57
58
  const os = __importStar(require("os"));
@@ -66,6 +67,7 @@ const script_1 = require("./runners/script");
66
67
  const approval_1 = require("./runners/approval");
67
68
  const cancel_1 = require("./runners/cancel");
68
69
  const agents_1 = require("./agents");
70
+ const hook_output_1 = require("../activation/hook-output");
69
71
  class WorkflowExecutor {
70
72
  specQueries;
71
73
  worktrees;
@@ -223,6 +225,7 @@ class WorkflowExecutor {
223
225
  const wasRejected = existing.status === 'rejected';
224
226
  if (wasRejected) {
225
227
  const meta = refreshed.metadata ?? {};
228
+ const revOpts = { ...opts, variables: withAgentVariables(opts.variables, runAgent(meta)) };
226
229
  const rejection = meta.rejection;
227
230
  const gate = rejection ? workflow.nodes.find((n) => n.id === rejection.nodeId) : undefined;
228
231
  const onReject = gate?.kind === 'approval' ? gate.on_reject : undefined;
@@ -261,7 +264,7 @@ class WorkflowExecutor {
261
264
  // Resolve $nodeId.output refs in the on_reject prompt against the
262
265
  // run's accumulated outputs, same as any other node; workflow-level
263
266
  // model/systemPromptAppend apply too (REQ-AUDFIX-005.A2).
264
- const revise = this.resolveNodeRefs(rawRevise, outputs, opts.inputs, opts.variables, workflow);
267
+ const revise = this.resolveNodeRefs(rawRevise, outputs, opts.inputs, revOpts.variables, workflow);
265
268
  this.event(runId, 'step_started', { stepId: reviseId, kind: 'prompt', revision: true });
266
269
  const runner = this.runners.get('prompt');
267
270
  result = runner
@@ -271,7 +274,7 @@ class WorkflowExecutor {
271
274
  logsDir,
272
275
  runId,
273
276
  inputs: opts.inputs,
274
- variables: opts.variables,
277
+ variables: revOpts.variables,
275
278
  outputs,
276
279
  verbose: opts.verbose,
277
280
  agent: runAgent(meta),
@@ -455,6 +458,7 @@ class WorkflowExecutor {
455
458
  const order = topoSort(workflow.nodes);
456
459
  const nodeById = new Map(workflow.nodes.map((n) => [n.id, n]));
457
460
  const meta = run.metadata ?? {};
461
+ opts = { ...opts, variables: withAgentVariables(opts.variables, runAgent(meta)) };
458
462
  const nodeStates = new Map(Object.entries(meta.nodeStates ?? {}));
459
463
  const outputs = new Map(Object.entries(meta.outputs ?? {}));
460
464
  // Initialize states for nodes the resume didn't already cover.
@@ -482,7 +486,7 @@ class WorkflowExecutor {
482
486
  }
483
487
  // Check when: condition.
484
488
  if (node.when !== undefined) {
485
- const ctx = this.makeSubstitutionContext(outputs, opts.inputs, opts.variables);
489
+ const ctx = this.makeSubstitutionContext(outputs, opts.inputs, opts.variables, workflow);
486
490
  const passes = (0, condition_evaluator_1.evaluateCondition)(node.when, ctx);
487
491
  if (!passes) {
488
492
  nodeStates.set(nodeId, 'skipped');
@@ -640,7 +644,7 @@ class WorkflowExecutor {
640
644
  * is the workflow value followed by the node value, joined by a blank line.
641
645
  */
642
646
  resolveNodeRefs(node, outputs, inputs, variables, workflow) {
643
- const ctx = this.makeSubstitutionContext(outputs, inputs, variables);
647
+ const ctx = this.makeSubstitutionContext(outputs, inputs, variables, workflow);
644
648
  switch (node.kind) {
645
649
  case 'prompt': {
646
650
  const p = node;
@@ -686,12 +690,15 @@ class WorkflowExecutor {
686
690
  }
687
691
  }
688
692
  }
689
- makeSubstitutionContext(outputs, inputs, variables) {
693
+ makeSubstitutionContext(outputs, inputs, variables, workflow) {
690
694
  return {
691
695
  outputs,
692
696
  inputs: inputs ?? {},
693
697
  variables: variables ?? {},
694
698
  spillDir: os.tmpdir(),
699
+ // The workflow's step ids, so shell text like `$i.md` is not taken for
700
+ // a step reference (REQ-WFINTEG-001).
701
+ ...(workflow?.nodes ? { nodeIds: new Set(workflow.nodes.map((n) => n.id)) } : {}),
695
702
  };
696
703
  }
697
704
  /**
@@ -910,6 +917,16 @@ function sanitizeFilename(s) {
910
917
  function sleep(ms) {
911
918
  return new Promise((resolve) => setTimeout(resolve, ms));
912
919
  }
920
+ /**
921
+ * Host-profile variables every step can reference (REQ-AGENTSWITCH-001), so a
922
+ * bundled workflow names the run's agent's paths instead of one host's:
923
+ * `$AGENT_SKILLS_DIR` is the agent's user skills directory. Caller-supplied
924
+ * variables win.
925
+ */
926
+ function withAgentVariables(variables, agentId) {
927
+ const traits = (0, hook_output_1.hostTraitsFor)(agentId ?? agents_1.DEFAULT_WORKFLOW_AGENT);
928
+ return { AGENT_SKILLS_DIR: `~/${traits.configDir}/skills`, ...(variables ?? {}) };
929
+ }
913
930
  /** The agent stored with a run; undefined for runs created before agents were recorded (→ default). */
914
931
  function runAgent(meta) {
915
932
  const a = meta[agents_1.RUN_AGENT_KEY];