@entelligentsia/forgecli 0.21.0 → 1.0.3

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 (364) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +31 -33
  3. package/dist/CHANGELOG-forge-plugin.md +142 -0
  4. package/dist/CHANGELOG-pi.md +24 -1
  5. package/dist/bin/forgecli.d.ts +2 -0
  6. package/dist/bin/forgecli.js +6 -0
  7. package/dist/bin/forgecli.js.map +1 -0
  8. package/dist/extensions/forgecli/add-pipeline.js +1 -1
  9. package/dist/extensions/forgecli/add-pipeline.js.map +1 -1
  10. package/dist/extensions/forgecli/add-task.js +1 -1
  11. package/dist/extensions/forgecli/add-task.js.map +1 -1
  12. package/dist/extensions/forgecli/approve.js +17 -2
  13. package/dist/extensions/forgecli/approve.js.map +1 -1
  14. package/dist/extensions/forgecli/audience-gate.js +1 -1
  15. package/dist/extensions/forgecli/audience-gate.js.map +1 -1
  16. package/dist/extensions/forgecli/calibrate.js +11 -8
  17. package/dist/extensions/forgecli/calibrate.js.map +1 -1
  18. package/dist/extensions/forgecli/collate.js +1 -1
  19. package/dist/extensions/forgecli/collate.js.map +1 -1
  20. package/dist/extensions/forgecli/commit.js +17 -2
  21. package/dist/extensions/forgecli/commit.js.map +1 -1
  22. package/dist/extensions/forgecli/enhance.js +1 -1
  23. package/dist/extensions/forgecli/enhance.js.map +1 -1
  24. package/dist/extensions/forgecli/fix-bug.d.ts +1 -2
  25. package/dist/extensions/forgecli/fix-bug.js +678 -609
  26. package/dist/extensions/forgecli/fix-bug.js.map +1 -1
  27. package/dist/extensions/forgecli/forge-artifact-tool.d.ts +6 -8
  28. package/dist/extensions/forgecli/forge-artifact-tool.js +94 -197
  29. package/dist/extensions/forgecli/forge-artifact-tool.js.map +1 -1
  30. package/dist/extensions/forgecli/forge-commands.js +57 -18
  31. package/dist/extensions/forgecli/forge-commands.js.map +1 -1
  32. package/dist/extensions/forgecli/forge-init/phase4-register.js +6 -7
  33. package/dist/extensions/forgecli/forge-init/phase4-register.js.map +1 -1
  34. package/dist/extensions/forgecli/forge-init/run-phases.d.ts +4 -0
  35. package/dist/extensions/forgecli/forge-init/run-phases.js +304 -0
  36. package/dist/extensions/forgecli/forge-init/run-phases.js.map +1 -0
  37. package/dist/extensions/forgecli/forge-init/verifiers.d.ts +14 -5
  38. package/dist/extensions/forgecli/forge-init/verifiers.js +79 -62
  39. package/dist/extensions/forgecli/forge-init/verifiers.js.map +1 -1
  40. package/dist/extensions/forgecli/forge-init.js +131 -76
  41. package/dist/extensions/forgecli/forge-init.js.map +1 -1
  42. package/dist/extensions/forgecli/forge-subagent.d.ts +26 -0
  43. package/dist/extensions/forgecli/forge-subagent.js +42 -18
  44. package/dist/extensions/forgecli/forge-subagent.js.map +1 -1
  45. package/dist/extensions/forgecli/forge-tools.d.ts +34 -4
  46. package/dist/extensions/forgecli/forge-tools.js +191 -79
  47. package/dist/extensions/forgecli/forge-tools.js.map +1 -1
  48. package/dist/extensions/forgecli/health-check.js +3 -3
  49. package/dist/extensions/forgecli/health-check.js.map +1 -1
  50. package/dist/extensions/forgecli/hook-dispatcher.d.ts +1 -1
  51. package/dist/extensions/forgecli/hooks/check-update.d.ts +8 -0
  52. package/dist/extensions/forgecli/hooks/check-update.js +29 -1
  53. package/dist/extensions/forgecli/hooks/check-update.js.map +1 -1
  54. package/dist/extensions/forgecli/hooks/post-init-hook.js +6 -6
  55. package/dist/extensions/forgecli/hooks/post-init-hook.js.map +1 -1
  56. package/dist/extensions/forgecli/hooks/post-sprint-hook.js +6 -6
  57. package/dist/extensions/forgecli/hooks/post-sprint-hook.js.map +1 -1
  58. package/dist/extensions/forgecli/hooks/triage-error.js +1 -0
  59. package/dist/extensions/forgecli/hooks/triage-error.js.map +1 -1
  60. package/dist/extensions/forgecli/implement.js +20 -2
  61. package/dist/extensions/forgecli/implement.js.map +1 -1
  62. package/dist/extensions/forgecli/index.js +39 -32
  63. package/dist/extensions/forgecli/index.js.map +1 -1
  64. package/dist/extensions/forgecli/lib/pipeline-guard.d.ts +41 -0
  65. package/dist/extensions/forgecli/lib/pipeline-guard.js +100 -0
  66. package/dist/extensions/forgecli/lib/pipeline-guard.js.map +1 -0
  67. package/dist/extensions/forgecli/loaders/persona-skill-loader.js +2 -2
  68. package/dist/extensions/forgecli/loaders/persona-skill-loader.js.map +1 -1
  69. package/dist/extensions/forgecli/migrate.d.ts +3 -0
  70. package/dist/extensions/forgecli/migrate.js +4 -2
  71. package/dist/extensions/forgecli/migrate.js.map +1 -1
  72. package/dist/extensions/forgecli/plan.js +21 -2
  73. package/dist/extensions/forgecli/plan.js.map +1 -1
  74. package/dist/extensions/forgecli/quiz-agent.js +7 -7
  75. package/dist/extensions/forgecli/quiz-agent.js.map +1 -1
  76. package/dist/extensions/forgecli/regenerate.js +49 -18
  77. package/dist/extensions/forgecli/regenerate.js.map +1 -1
  78. package/dist/extensions/forgecli/remove-command.js +1 -1
  79. package/dist/extensions/forgecli/remove-command.js.map +1 -1
  80. package/dist/extensions/forgecli/report-bug.js +1 -1
  81. package/dist/extensions/forgecli/report-bug.js.map +1 -1
  82. package/dist/extensions/forgecli/retrospective.js +9 -9
  83. package/dist/extensions/forgecli/retrospective.js.map +1 -1
  84. package/dist/extensions/forgecli/review-code.d.ts +13 -0
  85. package/dist/extensions/forgecli/review-code.js +62 -3
  86. package/dist/extensions/forgecli/review-code.js.map +1 -1
  87. package/dist/extensions/forgecli/review-plan.d.ts +13 -0
  88. package/dist/extensions/forgecli/review-plan.js +65 -3
  89. package/dist/extensions/forgecli/review-plan.js.map +1 -1
  90. package/dist/extensions/forgecli/run-task.js +461 -391
  91. package/dist/extensions/forgecli/run-task.js.map +1 -1
  92. package/dist/extensions/forgecli/session-registry.d.ts +12 -0
  93. package/dist/extensions/forgecli/session-registry.js +23 -0
  94. package/dist/extensions/forgecli/session-registry.js.map +1 -1
  95. package/dist/extensions/forgecli/skill-curator-subagent.d.ts +2 -1
  96. package/dist/extensions/forgecli/skill-curator-subagent.js +2 -1
  97. package/dist/extensions/forgecli/skill-curator-subagent.js.map +1 -1
  98. package/dist/extensions/forgecli/sprint-intake.js +6 -6
  99. package/dist/extensions/forgecli/sprint-intake.js.map +1 -1
  100. package/dist/extensions/forgecli/sprint-plan.js +9 -9
  101. package/dist/extensions/forgecli/sprint-plan.js.map +1 -1
  102. package/dist/extensions/forgecli/status-command.js +1 -1
  103. package/dist/extensions/forgecli/status-command.js.map +1 -1
  104. package/dist/extensions/forgecli/store-query.js +11 -11
  105. package/dist/extensions/forgecli/store-query.js.map +1 -1
  106. package/dist/extensions/forgecli/store-repair.js +7 -7
  107. package/dist/extensions/forgecli/store-repair.js.map +1 -1
  108. package/dist/extensions/forgecli/subagent/caller-context.d.ts +35 -11
  109. package/dist/extensions/forgecli/subagent/caller-context.js +49 -21
  110. package/dist/extensions/forgecli/subagent/caller-context.js.map +1 -1
  111. package/dist/extensions/forgecli/subagent/orchestrator-transcript.d.ts +66 -0
  112. package/dist/extensions/forgecli/subagent/orchestrator-transcript.js +66 -0
  113. package/dist/extensions/forgecli/subagent/orchestrator-transcript.js.map +1 -0
  114. package/dist/extensions/forgecli/subagent/phase-guard.d.ts +34 -0
  115. package/dist/extensions/forgecli/subagent/phase-guard.js +139 -0
  116. package/dist/extensions/forgecli/subagent/phase-guard.js.map +1 -0
  117. package/dist/extensions/forgecli/subagent/phase-summary-map.d.ts +1 -0
  118. package/dist/extensions/forgecli/subagent/phase-summary-map.js +22 -0
  119. package/dist/extensions/forgecli/subagent/phase-summary-map.js.map +1 -0
  120. package/dist/extensions/forgecli/thread-switcher.js +2 -2
  121. package/dist/extensions/forgecli/thread-switcher.js.map +1 -1
  122. package/dist/extensions/forgecli/validate.js +17 -2
  123. package/dist/extensions/forgecli/validate.js.map +1 -1
  124. package/dist/extensions/forgecli/viewport-events.d.ts +4 -0
  125. package/dist/extensions/forgecli/viewport-events.js +18 -1
  126. package/dist/extensions/forgecli/viewport-events.js.map +1 -1
  127. package/dist/extensions/forgecli/viewport-renderer.d.ts +12 -2
  128. package/dist/extensions/forgecli/viewport-renderer.js +8 -6
  129. package/dist/extensions/forgecli/viewport-renderer.js.map +1 -1
  130. package/dist/forge-payload/.base-pack/commands/check-agent.md +22 -0
  131. package/dist/forge-payload/.base-pack/commands/new-sprint.md +22 -0
  132. package/dist/forge-payload/.base-pack/commands/plan-sprint.md +22 -0
  133. package/dist/forge-payload/.base-pack/commands/quiz-agent.md +2 -18
  134. package/dist/forge-payload/.base-pack/commands/retro.md +22 -0
  135. package/dist/forge-payload/.base-pack/commands/retrospective.md +2 -18
  136. package/dist/forge-payload/.base-pack/commands/sprint-intake.md +2 -18
  137. package/dist/forge-payload/.base-pack/commands/sprint-plan.md +2 -18
  138. package/dist/forge-payload/.base-pack/workflows/_fragments/friction-emit.md +2 -2
  139. package/dist/forge-payload/.base-pack/workflows/_fragments/generation-instructions.md +4 -4
  140. package/dist/forge-payload/.base-pack/workflows/_fragments/iron-laws.md +1 -1
  141. package/dist/forge-payload/.base-pack/workflows/architect_approve.md +13 -1
  142. package/dist/forge-payload/.base-pack/workflows/commit_task.md +12 -1
  143. package/dist/forge-payload/.base-pack/workflows/enhance.md +6 -6
  144. package/dist/forge-payload/.base-pack/workflows/fix_bug.md +11 -29
  145. package/dist/forge-payload/.base-pack/workflows/implement_plan.md +14 -2
  146. package/dist/forge-payload/.base-pack/workflows/migrate_structural.md +2 -2
  147. package/dist/forge-payload/.base-pack/workflows/orchestrate_task.md +20 -4
  148. package/dist/forge-payload/.base-pack/workflows/plan_task.md +14 -2
  149. package/dist/forge-payload/.base-pack/workflows/review_code.md +37 -7
  150. package/dist/forge-payload/.base-pack/workflows/review_plan.md +36 -6
  151. package/dist/forge-payload/.base-pack/workflows/run_sprint.md +2 -2
  152. package/dist/forge-payload/.base-pack/workflows/triage.md +190 -0
  153. package/dist/forge-payload/.base-pack/workflows/validate_task.md +37 -7
  154. package/dist/forge-payload/.claude-plugin/plugin.json +1 -1
  155. package/dist/forge-payload/.schemas/config.schema.json +0 -5
  156. package/dist/forge-payload/.schemas/enum-catalog.json +9 -13
  157. package/dist/forge-payload/.schemas/migrations.json +63 -0
  158. package/dist/forge-payload/agents/tomoshibi.md +150 -6
  159. package/dist/forge-payload/commands/add-pipeline.md +1 -1
  160. package/dist/forge-payload/commands/add-task.md +1 -1
  161. package/dist/forge-payload/commands/calibrate.md +4 -350
  162. package/dist/forge-payload/commands/check-agent.md +38 -0
  163. package/dist/forge-payload/commands/config.md +3 -113
  164. package/dist/forge-payload/commands/enhance.md +5 -32
  165. package/dist/forge-payload/commands/health.md +155 -13
  166. package/dist/forge-payload/commands/init.md +25 -31
  167. package/dist/forge-payload/commands/migrate.md +6 -154
  168. package/dist/forge-payload/commands/quiz-agent.md +2 -34
  169. package/dist/forge-payload/commands/rebuild.md +664 -0
  170. package/dist/forge-payload/commands/regenerate.md +2 -774
  171. package/dist/forge-payload/commands/remove.md +10 -13
  172. package/dist/forge-payload/commands/repair.md +187 -0
  173. package/dist/forge-payload/commands/search.md +73 -0
  174. package/dist/forge-payload/commands/status.md +105 -0
  175. package/dist/forge-payload/commands/store-query.md +2 -69
  176. package/dist/forge-payload/commands/store-repair.md +2 -183
  177. package/dist/forge-payload/commands/update-tools.md +4 -50
  178. package/dist/forge-payload/commands/update.md +64 -58
  179. package/dist/forge-payload/hooks/check-update.cjs +1 -1
  180. package/dist/forge-payload/hooks/post-init.cjs +2 -2
  181. package/dist/forge-payload/hooks/post-sprint.cjs +2 -2
  182. package/dist/forge-payload/hooks/triage-error.cjs +11 -10
  183. package/dist/forge-payload/init/phases/phase-1-collect.md +138 -0
  184. package/dist/forge-payload/init/phases/phase-2-discover.md +127 -0
  185. package/dist/forge-payload/init/phases/phase-3-materialize.md +113 -0
  186. package/dist/forge-payload/init/phases/phase-4-register.md +159 -0
  187. package/dist/forge-payload/integrity.json +21 -24
  188. package/dist/forge-payload/meta/fragments/tool-discipline.md +41 -0
  189. package/dist/forge-payload/meta/templates/meta-retro.md +28 -0
  190. package/dist/forge-payload/meta/workflows/_fragments/friction-emit.md +2 -2
  191. package/dist/forge-payload/meta/workflows/_fragments/generation-instructions.md +4 -4
  192. package/dist/forge-payload/meta/workflows/_fragments/iron-laws.md +1 -1
  193. package/dist/forge-payload/meta/workflows/meta-approve.md +13 -1
  194. package/dist/forge-payload/meta/workflows/meta-bug-triage.md +210 -0
  195. package/dist/forge-payload/meta/workflows/meta-check-agent.md +138 -0
  196. package/dist/forge-payload/meta/workflows/meta-commit.md +12 -1
  197. package/dist/forge-payload/meta/workflows/meta-enhance.md +5 -5
  198. package/dist/forge-payload/meta/workflows/meta-fix-bug.md +11 -29
  199. package/dist/forge-payload/meta/workflows/meta-implement.md +13 -1
  200. package/dist/forge-payload/meta/workflows/meta-migrate.md +3 -3
  201. package/dist/forge-payload/meta/workflows/meta-new-sprint.md +84 -0
  202. package/dist/forge-payload/meta/workflows/meta-orchestrate.md +20 -4
  203. package/dist/forge-payload/meta/workflows/meta-plan-sprint.md +152 -0
  204. package/dist/forge-payload/meta/workflows/meta-plan-task.md +13 -1
  205. package/dist/forge-payload/meta/workflows/meta-retro.md +73 -0
  206. package/dist/forge-payload/meta/workflows/meta-review-implementation.md +37 -7
  207. package/dist/forge-payload/meta/workflows/meta-review-plan.md +36 -6
  208. package/dist/forge-payload/meta/workflows/meta-validate.md +37 -7
  209. package/dist/forge-payload/schemas/config.schema.json +0 -5
  210. package/dist/forge-payload/schemas/enum-catalog.json +9 -13
  211. package/dist/forge-payload/schemas/structure-manifest.json +25 -8
  212. package/dist/forge-payload/tools/artifact.cjs +324 -0
  213. package/dist/forge-payload/tools/banners.cjs +3 -4
  214. package/dist/forge-payload/tools/build-context-pack.cjs +1 -1
  215. package/dist/forge-payload/tools/check-structure.cjs +8 -3
  216. package/dist/forge-payload/tools/store-cli.cjs +67 -7
  217. package/dist/forge-payload/tools/substitute-placeholders.cjs +1 -1
  218. package/dist/forge-payload/tools/verify-apply.cjs +75 -0
  219. package/dist/forge-payload/tools/verify-phase.cjs +259 -0
  220. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  221. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +0 -17
  222. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  223. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +21 -38
  224. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
  225. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
  226. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +5 -4
  227. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
  228. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +2 -1
  229. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
  230. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +5 -2
  231. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
  232. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  233. package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +24 -1
  234. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/file-processor.d.ts.map +1 -1
  235. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/file-processor.js +2 -3
  236. package/node_modules/@earendil-works/pi-coding-agent/dist/cli/file-processor.js.map +1 -1
  237. package/node_modules/@earendil-works/pi-coding-agent/dist/core/output-guard.d.ts +1 -0
  238. package/node_modules/@earendil-works/pi-coding-agent/dist/core/output-guard.d.ts.map +1 -1
  239. package/node_modules/@earendil-works/pi-coding-agent/dist/core/output-guard.js +52 -22
  240. package/node_modules/@earendil-works/pi-coding-agent/dist/core/output-guard.js.map +1 -1
  241. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
  242. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +16 -4
  243. package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
  244. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts.map +1 -1
  245. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +45 -50
  246. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js.map +1 -1
  247. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.d.ts.map +1 -1
  248. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +43 -81
  249. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js.map +1 -1
  250. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
  251. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/file-mutation-queue.js +27 -12
  252. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/file-mutation-queue.js.map +1 -1
  253. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
  254. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js +2 -3
  255. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js.map +1 -1
  256. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.d.ts.map +1 -1
  257. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js +3 -3
  258. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js.map +1 -1
  259. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.d.ts.map +1 -1
  260. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +5 -5
  261. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js.map +1 -1
  262. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/path-utils.d.ts +2 -0
  263. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/path-utils.d.ts.map +1 -1
  264. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/path-utils.js +37 -0
  265. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/path-utils.js.map +1 -1
  266. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
  267. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +9 -8
  268. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js.map +1 -1
  269. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.d.ts.map +1 -1
  270. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js +20 -35
  271. package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js.map +1 -1
  272. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.d.ts +3 -0
  273. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  274. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js +64 -7
  275. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js.map +1 -1
  276. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  277. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +15 -3
  278. package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
  279. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard-native.d.ts +3 -1
  280. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard-native.d.ts.map +1 -1
  281. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard-native.js +14 -8
  282. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard-native.js.map +1 -1
  283. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.d.ts +30 -0
  284. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.d.ts.map +1 -0
  285. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.js +124 -0
  286. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.js.map +1 -0
  287. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.d.ts +2 -0
  288. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.d.ts.map +1 -0
  289. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.js +31 -0
  290. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.js.map +1 -0
  291. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.d.ts +7 -27
  292. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.d.ts.map +1 -1
  293. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.js +75 -115
  294. package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.js.map +1 -1
  295. package/node_modules/@earendil-works/pi-coding-agent/docs/terminal-setup.md +6 -0
  296. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
  297. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  298. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
  299. package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
  300. package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +12 -14
  301. package/node_modules/@earendil-works/pi-coding-agent/package.json +5 -5
  302. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +3 -0
  303. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -0
  304. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +53 -0
  305. package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -0
  306. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
  307. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +4 -1
  308. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
  309. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +2 -0
  310. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  311. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +13 -1
  312. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  313. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/darwin-modifiers.node +0 -0
  314. package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
  315. package/node_modules/@earendil-works/pi-tui/package.json +2 -2
  316. package/node_modules/@entelligentsia/forge-compress/dist/compressor.d.ts +6 -0
  317. package/node_modules/@entelligentsia/forge-compress/dist/compressor.js +137 -0
  318. package/node_modules/@entelligentsia/forge-compress/dist/entropy.d.ts +3 -0
  319. package/node_modules/@entelligentsia/forge-compress/dist/entropy.js +99 -0
  320. package/node_modules/@entelligentsia/forge-compress/dist/forge/entity.d.ts +8 -0
  321. package/node_modules/@entelligentsia/forge-compress/dist/forge/entity.js +149 -0
  322. package/node_modules/@entelligentsia/forge-compress/dist/forge/index.d.ts +7 -0
  323. package/node_modules/@entelligentsia/forge-compress/dist/forge/index.js +4 -0
  324. package/node_modules/@entelligentsia/forge-compress/dist/forge/markdown.d.ts +5 -0
  325. package/node_modules/@entelligentsia/forge-compress/dist/forge/markdown.js +92 -0
  326. package/node_modules/@entelligentsia/forge-compress/dist/forge/query.d.ts +7 -0
  327. package/node_modules/@entelligentsia/forge-compress/dist/forge/query.js +60 -0
  328. package/node_modules/@entelligentsia/forge-compress/dist/forge/validate.d.ts +1 -0
  329. package/node_modules/@entelligentsia/forge-compress/dist/forge/validate.js +82 -0
  330. package/node_modules/@entelligentsia/forge-compress/dist/index.d.ts +6 -0
  331. package/node_modules/@entelligentsia/forge-compress/dist/index.js +5 -0
  332. package/node_modules/@entelligentsia/forge-compress/dist/progressive.d.ts +1 -0
  333. package/node_modules/@entelligentsia/forge-compress/dist/progressive.js +108 -0
  334. package/node_modules/@entelligentsia/forge-compress/dist/strip.d.ts +4 -0
  335. package/node_modules/@entelligentsia/forge-compress/dist/strip.js +55 -0
  336. package/node_modules/@entelligentsia/forge-compress/dist/tokens.d.ts +2 -0
  337. package/node_modules/@entelligentsia/forge-compress/dist/tokens.js +17 -0
  338. package/node_modules/@entelligentsia/forge-compress/package.json +45 -0
  339. package/node_modules/@entelligentsia/forge-compress/src/__tests__/compress.test.ts +409 -0
  340. package/node_modules/@entelligentsia/forge-compress/src/compressor.ts +147 -0
  341. package/node_modules/@entelligentsia/forge-compress/src/entropy.ts +105 -0
  342. package/node_modules/@entelligentsia/forge-compress/src/forge/entity.ts +184 -0
  343. package/node_modules/@entelligentsia/forge-compress/src/forge/index.ts +10 -0
  344. package/node_modules/@entelligentsia/forge-compress/src/forge/markdown.ts +122 -0
  345. package/node_modules/@entelligentsia/forge-compress/src/forge/query.ts +105 -0
  346. package/node_modules/@entelligentsia/forge-compress/src/forge/validate.ts +86 -0
  347. package/node_modules/@entelligentsia/forge-compress/src/index.ts +22 -0
  348. package/node_modules/@entelligentsia/forge-compress/src/progressive.ts +123 -0
  349. package/node_modules/@entelligentsia/forge-compress/src/strip.ts +58 -0
  350. package/node_modules/@entelligentsia/forge-compress/src/tokens.ts +19 -0
  351. package/package.json +10 -15
  352. package/dist/extensions/forgecli/forge-init/phase-descriptors.d.ts +0 -72
  353. package/dist/extensions/forgecli/forge-init/phase-descriptors.js +0 -359
  354. package/dist/extensions/forgecli/forge-init/phase-descriptors.js.map +0 -1
  355. package/dist/extensions/forgecli/forge-init/prompts.d.ts +0 -10
  356. package/dist/extensions/forgecli/forge-init/prompts.js +0 -91
  357. package/dist/extensions/forgecli/forge-init/prompts.js.map +0 -1
  358. package/dist/extensions/forgecli/lib/store-error-remediation.d.ts +0 -65
  359. package/dist/extensions/forgecli/lib/store-error-remediation.js +0 -298
  360. package/dist/extensions/forgecli/lib/store-error-remediation.js.map +0 -1
  361. package/dist/forge-payload/hooks/check-update.js +0 -378
  362. package/dist/forge-payload/hooks/forge-permissions.js +0 -164
  363. package/dist/forge-payload/hooks/triage-error.js +0 -77
  364. package/dist/forge-payload/hooks/validate-write.js +0 -250
@@ -1,22 +1,6 @@
1
1
  ---
2
2
  name: sprint-intake
3
- description: Elicit and structure requirements for a new sprint
3
+ description: Renamed in v1.0 use /{{PREFIX}}:new-sprint
4
4
  ---
5
5
 
6
- # /{{PREFIX}}:sprint-intake
7
-
8
- Read the sprint-intake workflow and follow it.
9
-
10
- ## Locate the Forge plugin
11
-
12
- ```
13
- FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
14
- ```
15
-
16
- ## Execute
17
-
18
- Read `.forge/workflows/architect_sprint_intake.md` and follow it.
19
-
20
- ## Arguments
21
-
22
- $ARGUMENTS
6
+ × /{{PREFIX}}:sprint-intake was renamed to /{{PREFIX}}:new-sprint in v1.0.
@@ -1,22 +1,6 @@
1
1
  ---
2
2
  name: sprint-plan
3
- description: Decompose sprint requirements into tasks with dependencies
3
+ description: Renamed in v1.0 use /{{PREFIX}}:plan-sprint
4
4
  ---
5
5
 
6
- # /{{PREFIX}}:sprint-plan
7
-
8
- Read the sprint-plan workflow and follow it.
9
-
10
- ## Locate the Forge plugin
11
-
12
- ```
13
- FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
14
- ```
15
-
16
- ## Execute
17
-
18
- Read `.forge/workflows/architect_sprint_plan.md` and follow it.
19
-
20
- ## Arguments
21
-
22
- $ARGUMENTS
6
+ × /{{PREFIX}}:sprint-plan was renamed to /{{PREFIX}}:plan-sprint in v1.0.
@@ -1,6 +1,6 @@
1
1
  <!-- Canonical Friction Emit fragment.
2
2
  Referenced from meta-implement.md, meta-fix-bug.md, meta-validate.md,
3
- meta-plan-task.md, and meta-orchestrate.md. /forge:enhance --phase 2
3
+ meta-plan-task.md, and meta-orchestrate.md. /forge:rebuild --enrich (phase 2)
4
4
  greps generated workflows for `## Friction Emit` to discover the channel.
5
5
 
6
6
  PLAN-11 / SLICE-2 (2026-05-14): friction is now recorded via the
@@ -16,7 +16,7 @@ When the persona detects skill friction during the workflow — a referenced
16
16
  skill is unused, fails on invocation, is missing from the registry, has gone
17
17
  stale relative to current architecture, or is redundant with another skill —
18
18
  record a judgement-only friction signal. The orchestrator drains the
19
- signals and emits the corresponding events so `/forge:enhance --phase 2`
19
+ signals and emits the corresponding events so `/forge:rebuild --enrich` (phase 2)
20
20
  can act on them.
21
21
 
22
22
  ## Trigger conditions
@@ -33,8 +33,8 @@
33
33
  **`Persona Self-Load`** — *conditional*. Required when the generated workflow uses the
34
34
  Persona Self-Load pattern (the generated file must begin by reading a persona `.md` file
35
35
  before any other tool use). Specify the exact persona path. Used in: `meta-collate.md`,
36
- `meta-retrospective.md`, `meta-review-sprint-completion.md`, `meta-sprint-intake.md`,
37
- `meta-sprint-plan.md`. Omit for subagent-targeted workflows where the persona is loaded
36
+ `meta-retro.md`, `meta-review-sprint-completion.md`, `meta-new-sprint.md`,
37
+ `meta-plan-sprint.md`. Omit for subagent-targeted workflows where the persona is loaded
38
38
  by the orchestrator before dispatch.
39
39
 
40
40
  **`Workflow Structure`** — *required*. Names the generated file slug and asserts the
@@ -51,8 +51,8 @@ run inline, and mandates the `Agent` tool for sub-tasks.
51
51
  substitutions the generator must embed (stack commands, KB paths, template references,
52
52
  task ID format, etc.).
53
53
 
54
- **`Token Reporting`** — *required* (with one exception: `meta-quiz-agent.md` omits it
55
- because quiz-agent is an inline helper, not an orchestrated phase). Standard form: `See
54
+ **`Token Reporting`** — *required* (with one exception: `meta-check-agent.md` omits it
55
+ because check-agent is an inline helper, not an orchestrated phase). Standard form: `See
56
56
  \`_fragments/finalize.md\` — wire via \`file_ref:\`.` Expanded token-reporting prose is
57
57
  used in workflows where the generated file must mandate a specific sidecar-emit sequence
58
58
  (retrospective, sprint-intake, sprint-plan, review-sprint-completion) — in those cases,
@@ -52,7 +52,7 @@ into the standard three-bullet structure.
52
52
 
53
53
  Some workflows have no `## Iron Laws` section by design:
54
54
 
55
- - `meta-quiz-agent.md` — utility workflow; no store writes; no output contract.
55
+ - `meta-check-agent.md` — utility workflow; no store writes; no output contract.
56
56
  - `meta-review-sprint-completion.md` — read-only verification; no state transitions.
57
57
 
58
58
  Intentional omissions are documented with an inline comment before the `## Algorithm`
@@ -36,13 +36,25 @@ deps:
36
36
 
37
37
  ```
38
38
 
39
- 0. Pre-flight Gate Check:
39
+ 0a. Pre-flight Gate Check:
40
40
  - Resolve FORGE_ROOT (`node -e "console.log(require('./.forge/config.json').paths.forgeRoot)"`).
41
41
  - **Entity-mode resolution:** read the kickoff arguments. `--task {id}` → `entity_kind = "task"`, `record_id = {id}`. `--bug {id}` → `entity_kind = "bug"`, `record_id = {id}`. All store-cli calls below substitute `{entity_kind}` and `{record_id}` for the literal "task"/{taskId} placeholders.
42
42
  - Run: `node "$FORGE_ROOT/tools/preflight-gate.cjs" --phase approve --{entity_kind} {record_id}`
43
43
  - Exit 1 (gate failed) → print stderr and HALT. Do not proceed; do not attempt to produce the artifact.
44
44
  - Exit 2 (misconfiguration) → print stderr and HALT.
45
45
  - Exit 0 → continue.
46
+
47
+ 0b. Pipeline Step Guard (user-invoked state check):
48
+ - If `--force` is present in the invocation arguments, skip this step entirely.
49
+ - If `entity_kind == "bug"`, skip this step entirely (bug state is managed by meta-fix-bug.md).
50
+ - Read current task state:
51
+ `node "$FORGE_ROOT/tools/store-cli.cjs" read task {record_id} --json`
52
+ - Extract the `status` field from the JSON output.
53
+ - Allowed states for this phase: `review-approved`.
54
+ - If the current status is NOT in the allowed set:
55
+ Print the following and HALT (do not proceed):
56
+ `× Task {record_id} is in state '{status}' — /forge:review-code (or /forge:validate) must complete first. To run the full pipeline: /forge:run-task {record_id}`
57
+
46
58
  1. Load Context:
47
59
  - Read task prompt
48
60
  - Read final PLAN.md
@@ -36,7 +36,7 @@ deps:
36
36
 
37
37
  ```
38
38
 
39
- 0. Pre-flight Gate Check:
39
+ 0a. Pre-flight Gate Check:
40
40
  - Resolve FORGE_ROOT (`node -e "console.log(require('./.forge/config.json').paths.forgeRoot)"`).
41
41
  - **Entity-mode resolution:** read the kickoff arguments. `--task {id}` → `entity_kind = "task"`, `record_id = {id}`. `--bug {id}` → `entity_kind = "bug"`, `record_id = {id}`. All store-cli calls below substitute `{entity_kind}` and `{record_id}` for the literal "task"/{taskId} placeholders.
42
42
  - Run: `node "$FORGE_ROOT/tools/preflight-gate.cjs" --phase commit --{entity_kind} {record_id}`
@@ -44,6 +44,17 @@ deps:
44
44
  - Exit 2 (misconfiguration) → print stderr and HALT.
45
45
  - Exit 0 → continue.
46
46
 
47
+ 0b. Pipeline Step Guard (user-invoked state check):
48
+ - If `--force` is present in the invocation arguments, skip this step entirely.
49
+ - If `entity_kind == "bug"`, skip this step entirely (bug state is managed by meta-fix-bug.md).
50
+ - Read current task state:
51
+ `node "$FORGE_ROOT/tools/store-cli.cjs" read task {record_id} --json`
52
+ - Extract the `status` field from the JSON output.
53
+ - Allowed states for this phase: `approved`.
54
+ - If the current status is NOT in the allowed set:
55
+ Print the following and HALT (do not proceed):
56
+ `× Task {record_id} is in state '{status}' — /forge:approve must complete first. To run the full pipeline: /forge:run-task {record_id}`
57
+
47
58
  1. Load Context:
48
59
  - Read the record manifest (task or bug, per entity_kind).
49
60
  - Read ARCHITECT_APPROVAL.md from the record's artifact directory:
@@ -20,7 +20,7 @@ deps:
20
20
  ## Iron Laws
21
21
 
22
22
  - Orchestrator-only: this workflow runs with full tool access in the orchestrator session. NEVER delegate it to a subagent.
23
- - Read `.forge/personas/engineer.md` first; print the persona identity line to stdout before any other tool use.
23
+ - Read `.forge/personas/engineer.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
24
24
  - All store I/O via `forge_store` (or `node "$FORGE_ROOT/tools/store-cli.cjs"`). Never edit `.forge/store/*.json` directly.
25
25
  - Phase 1 only touches `{{KEY}}` token text; never rewrite persona prose, algorithm steps, or role definitions.
26
26
 
@@ -93,7 +93,7 @@ Receive the phase flag from the command invocation:
93
93
  |------|------|
94
94
  | `--phase 1` or `--auto` | Auto-apply: placeholder fills only — **use after** `/forge:init` completes to fill `{{KEY}}` placeholders from project signals |
95
95
  | `--phase 2` | Propose-diffs: sprint artifact + friction scan — **use after** a sprint completes to turn friction events into persona/skill enrichments |
96
- | `--phase 3` | Drift detection: full codebase vs structural-element comparison — **use on-demand** or after `/forge:calibrate` to detect stale references |
96
+ | `--phase 3` | Drift detection: full codebase vs structural-element comparison — **use on-demand** or after `/forge:health --fix` to detect stale references |
97
97
 
98
98
  Default to `--phase 3` if no phase flag is given.
99
99
 
@@ -115,7 +115,7 @@ Read `.forge/config.json`. Resolve:
115
115
 
116
116
  ### When to run
117
117
 
118
- Invoked by T09 post-init hook (`--auto`) or manually via `/forge:enhance --phase 1`.
118
+ Invoked by T09 post-init hook (`--auto`) or manually via `/forge:rebuild --enrich --phase 1`.
119
119
 
120
120
  ### Algorithm
121
121
 
@@ -196,7 +196,7 @@ Invoked by T09 post-init hook (`--auto`) or manually via `/forge:enhance --phase
196
196
 
197
197
  ### When to run
198
198
 
199
- Invoked by T09 post-sprint hook or manually via `/forge:enhance --phase 2`.
199
+ Invoked by T09 post-sprint hook or manually via `/forge:rebuild --enrich --phase 2`.
200
200
 
201
201
  ### Algorithm
202
202
 
@@ -584,8 +584,8 @@ Invoked by T09 post-sprint hook or manually via `/forge:enhance --phase 2`.
584
584
 
585
585
  ### When to run
586
586
 
587
- Invoked by `/forge:enhance --phase 3` (default when no phase given), or delegated by
588
- `/forge:calibrate` after its Step 4 drift categorization.
587
+ Invoked by `/forge:rebuild --enrich --phase 3` (default when no phase given), or delegated by
588
+ `/forge:health --fix` after its Step 4 drift categorization.
589
589
 
590
590
  ### Algorithm
591
591
 
@@ -23,7 +23,7 @@ Phases`):
23
23
 
24
24
  | Phase | Role | Persona | Workflow | Path A | Path B |
25
25
  |---|---|---|---|---|---|
26
- | triage | `triage` | bug-fixer | (inline algorithm) | yes | yes |
26
+ | triage | `triage` | bug-fixer | `triage.md` | yes | yes |
27
27
  | plan-fix | `plan` | engineer | `plan_task.md` (bug-mode) | no | yes |
28
28
  | review-plan | `review-plan` | supervisor | `review_plan.md` | no | yes |
29
29
  | implement | `implement` | engineer | `implement_plan.md` (bug-mode) | yes | yes |
@@ -93,24 +93,11 @@ The `route` field is required. Allowed values: `"A"` or `"B"`.
93
93
  > Triage subagents MUST NOT touch `bug.path` — that field is set at bug
94
94
  > creation and never modified by triage.
95
95
 
96
- ### Path A short-circuit (eligibility)
96
+ ### Path A / Path B eligibility
97
97
 
98
- Path A is **eligible only when ALL** of the following hold. Triage subagent
99
- must enumerate each in its findings:
100
-
101
- - `bug.severity ∈ {minor}`
102
- - Fix is contained in a single file
103
- - Estimated diff ≤ ~20 lines (judgement call; one screen)
104
- - No schema, API, migration, security, or build-system change
105
- - A regression test is obvious from the reproduction script (single short
106
- test case, no new fixtures, no test-harness change)
107
-
108
- If any criterion fails, the triage subagent MUST select Path B.
109
-
110
- ### Path B — full loop (default)
111
-
112
- Path B runs the same plan/review/implement/review/approve/commit shape as
113
- `meta-orchestrate.md`. It is the default. Any uncertainty defaults Path B.
98
+ See `triage.md § Path A / Path B Eligibility` for the criteria the triage
99
+ subagent applies. The criteria are single-sourced in the triage workflow;
100
+ this orchestrator only reads the resulting `summaries.triage.route` value.
114
101
 
115
102
  ### Pipeline selection by path
116
103
 
@@ -156,16 +143,11 @@ Differences are confined to the **triage** step and the **path branch**.
156
143
  b. If .forge/store/bugs/{BUG_ID}.json does NOT exist, write a fresh record
157
144
  via store-cli with status="reported".
158
145
  c. Read the now-guaranteed record.
159
- - Spawn the triage subagent (persona: bug-fixer). It MUST:
160
- Reproduce the bug (failing test or reproduction script).
161
- Confirm the root cause via codebase research.
162
- Decide Path A vs Path B by the criteria above.
163
- Write triage artifact:
164
- forge_artifact({ command:"write", entity:"bug", entityId:"{bugId}", artifact:"triage", content:"<markdown>" })
165
- • Write triage-summary artifact (JSON shape documented in § Triage Judgement):
166
- forge_artifact({ command:"write", entity:"bug", entityId:"{bugId}", artifact:"triage-summary", content:"<JSON>" })
167
- • Call set-bug-summary {bugId} triage via forge_store:
168
- forge_store({ command:"set-bug-summary", bugId:"{bugId}", phase:"triage", file:"TRIAGE-SUMMARY.json" })
146
+ - Spawn the triage subagent (workflow: `triage.md`, persona: bug-fixer).
147
+ It MUST write `TRIAGE.md` + `TRIAGE-SUMMARY.json` with a `route` field
148
+ (`"A"` or `"B"`) and call `set-bug-summary {bugId} triage` per
149
+ `triage.md`. The triage workflow is `audience: subagent`, `phase: triage`;
150
+ the orchestrator MUST NOT pass any other workflow body to this subagent.
169
151
  - On return, orchestrator transitions status:
170
152
  store-cli update-status bug {bugId} status triaged
171
153
  store-cli update-status bug {bugId} status in-progress
@@ -424,7 +406,7 @@ When the Bug Fixer, Supervisor, Architect, Engineer, or Collator detects skill
424
406
  friction during fix-bug — a referenced skill is unused, fails on invocation,
425
407
  is missing from the registry, has gone stale relative to current architecture,
426
408
  or is redundant with another skill — emit a `friction` event so
427
- `/forge:enhance --phase 2` can act on the signal.
409
+ `/forge:rebuild --enrich` (phase 2) can act on the signal.
428
410
 
429
411
  **Trigger conditions** (set `issue` to the matching token):
430
412
 
@@ -26,13 +26,25 @@ deps:
26
26
 
27
27
  ```
28
28
 
29
- 0. Pre-flight Gate Check:
29
+ 0a. Pre-flight Gate Check:
30
30
  - Resolve FORGE_ROOT (`node -e "console.log(require('./.forge/config.json').paths.forgeRoot)"`).
31
31
  - **Entity-mode resolution:** read the kickoff arguments. `--task {id}` → `entity_kind = "task"`, `record_id = {id}`. `--bug {id}` → `entity_kind = "bug"`, `record_id = {id}`. All store-cli calls below substitute `{entity_kind}` and `{record_id}` for the literal "task"/{taskId} placeholders.
32
32
  - Run: `node "$FORGE_ROOT/tools/preflight-gate.cjs" --phase implement --{entity_kind} {record_id}`
33
33
  - Exit 1 (gate failed) → print stderr and HALT. Do not proceed; do not attempt to produce the artifact.
34
34
  - Exit 2 (misconfiguration) → print stderr and HALT.
35
35
  - Exit 0 → continue.
36
+
37
+ 0b. Pipeline Step Guard (user-invoked state check):
38
+ - If `--force` is present in the invocation arguments, skip this step entirely.
39
+ - If `entity_kind == "bug"`, skip this step entirely (bug state is managed by meta-fix-bug.md).
40
+ - Read current task state:
41
+ `node "$FORGE_ROOT/tools/store-cli.cjs" read task {record_id} --json`
42
+ - Extract the `status` field from the JSON output.
43
+ - Allowed states for this phase: `plan-approved`.
44
+ - If the current status is NOT in the allowed set:
45
+ Print the following and HALT (do not proceed):
46
+ `× Task {record_id} is in state '{status}' — /forge:review-plan must complete first. To run the full pipeline: /forge:run-task {record_id}`
47
+
36
48
  1. Load Context:
37
49
  - Read `.forge/personas/engineer.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
38
50
  - store-cli verbs: `read` | `list` | `write` | `emit` | `update-status` | `set-summary` | `describe` | `nlp` | `query` | `delete` — there is no `get`/`set`/`find`. See `_fragments/store-cli-verbs.md` for full notes; run `--help` before improvising.
@@ -89,7 +101,7 @@ deps:
89
101
  ## Iron Laws
90
102
 
91
103
  - Follow the Algorithm step by step. Execute the approved PLAN.md exactly; do not invent scope or skip steps without updating the plan first.
92
- - Read `.forge/personas/engineer.md` first; print the persona identity line to stdout before any other tool use.
104
+ - Read `.forge/personas/engineer.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
93
105
  - All store I/O via `forge_store` (or `node "$FORGE_ROOT/tools/store-cli.cjs"`). Never edit `.forge/store/*.json` directly.
94
106
  - Run the full test suite before declaring the task implemented. Silent continuation past test failures is never acceptable.
95
107
 
@@ -52,7 +52,7 @@ ls .forge/structure-versions.json 2>/dev/null && echo "EXISTS" || echo "ABSENT"
52
52
 
53
53
  - If `structure-versions.json` EXISTS: this is a post-T05 install. Warn the
54
54
  user that structural migration is not needed and offer to run the standard
55
- store-schema migration (Steps 1–7 of `/forge:migrate`) instead. Stop.
55
+ store-schema migration (Steps 1–7 of `/forge:init --migrate`) instead. Stop.
56
56
  - If ABSENT: proceed (pre-T05 install confirmed).
57
57
 
58
58
  **0c. Check for in-progress sentinel (idempotency).**
@@ -277,7 +277,7 @@ node "$FORGE_ROOT/tools/substitute-placeholders.cjs" \
277
277
  ```
278
278
 
279
279
  This overwrites `.forge/personas/`, `.forge/skills/`, `.forge/workflows/`,
280
- `.forge/templates/`, and `.claude/commands/forge/` with the freshly substituted
280
+ `.forge/templates/`, and `.claude/commands/<prefix>/` with the freshly substituted
281
281
  base-pack.
282
282
 
283
283
  If `substitute-placeholders.cjs` exits non-zero: halt, report the error to the
@@ -167,7 +167,7 @@ and what capabilities it has. Two modes are supported, selected by the
167
167
  | `reference` | Compact summary from `.forge/cache/persona-pack.json`, plus a file_ref pointer to the full persona/skill definitions. | ✅ |
168
168
  | `inline` | Legacy: inject the full verbatim persona and skill file contents. Kept for one version as a rollback path. | |
169
169
 
170
- The pack is built by `/forge:regenerate` and `/forge:materialize` via
170
+ The pack is built by `/forge:rebuild` via
171
171
  `forge/tools/build-persona-pack.cjs`. It compiles YAML frontmatter from
172
172
  `$FORGE_ROOT/meta/personas/meta-*.md` and `$FORGE_ROOT/meta/skills/meta-*.md`
173
173
  into `.forge/cache/persona-pack.json`.
@@ -194,7 +194,7 @@ def compose_role_block(persona_noun):
194
194
  # regeneration bug and should be reported via /forge:report-bug.
195
195
  raise OrchestratorError(
196
196
  f"persona '{persona_noun}' not in persona-pack. "
197
- "Run /forge:regenerate to rebuild the pack."
197
+ "Run /forge:rebuild to rebuild the pack."
198
198
  )
199
199
 
200
200
  lines = [
@@ -430,6 +430,20 @@ for each task in dependency_sorted(tasks):
430
430
  # --- Load finalize fragment (token reporting contract) ---
431
431
  finalize_fragment = read_file(f"{FORGE_ROOT}/meta/workflows/_fragments/finalize.md") if file_exists(f"{FORGE_ROOT}/meta/workflows/_fragments/finalize.md") else ""
432
432
 
433
+ # --- Compose review loop context block (review-role phases only) ---
434
+ # Injected between summary_block and role_block so reviewers know their
435
+ # position in the revision loop at the moment they are spawned.
436
+ # `iteration` is the current attempt number (pre-spawn, not post-increment).
437
+ # `phase.maxIterations` is the configured limit (default 3).
438
+ if phase.role in ("review-plan", "review-code", "validate"):
439
+ review_loop_context = (
440
+ f"### Review Loop Context\n"
441
+ f"- Iteration: {iteration} of {phase.maxIterations}\n"
442
+ f"- Is final iteration: {iteration >= phase.maxIterations}\n\n"
443
+ )
444
+ else:
445
+ review_loop_context = ""
446
+
433
447
  spawn_kwargs = dict(
434
448
  prompt=(
435
449
  f"Append progress entries to {progress_log_path} via store-cli "
@@ -437,6 +451,7 @@ for each task in dependency_sorted(tasks):
437
451
  f"---\n\n"
438
452
  f"{architecture_block}"
439
453
  f"{summary_block}"
454
+ f"{review_loop_context}"
440
455
  f"{role_block}\n\n"
441
456
  f"### Project Context\n"
442
457
  f"{overlay_md}\n\n"
@@ -485,6 +500,7 @@ for each task in dependency_sorted(tasks):
485
500
  f"- Banner key: {banner_name}\n\n"
486
501
  f"Append progress entries as you work.\n\n"
487
502
  f"---\n\n"
503
+ f"{review_loop_context}"
488
504
  f"{role_block}\n\n"
489
505
  f"### Current Working Context\n"
490
506
  f"- Sprint Root: {sprint_root_path}\n"
@@ -875,7 +891,7 @@ Refer subagents to `.forge/schemas/event.schema.json` instead.
875
891
  <!-- See _fragments/generation-instructions.md for Generation Instructions template (orchestrate uses orchestrator-special long-form prose — cannot be reduced to standard subsections) -->
876
892
  ## Friction Emit
877
893
 
878
- When the Orchestrator detects skill friction during orchestrate-task — a referenced skill is unused, fails on invocation, is missing from the registry, has gone stale relative to current architecture, or is redundant with another skill — emit a `friction` event so `/forge:enhance --phase 2` can act on the signal. This is the writer side of the channel whose reader landed in S13-T08; the reader is empty without these emits.
894
+ When the Orchestrator detects skill friction during orchestrate-task — a referenced skill is unused, fails on invocation, is missing from the registry, has gone stale relative to current architecture, or is redundant with another skill — emit a `friction` event so `/forge:rebuild --enrich` (phase 2) can act on the signal. This is the writer side of the channel whose reader landed in S13-T08; the reader is empty without these emits.
879
895
 
880
896
  **Trigger conditions** (set `issue` to the matching token):
881
897
 
@@ -915,4 +931,4 @@ experimental `^x_[a-z_]+$`. Emit one record per distinct friction signal
915
931
  — do not coalesce.
916
932
 
917
933
  The generated `orchestrate_task.md` MUST carry this section verbatim —
918
- `/forge:enhance --phase 2` greps for it.
934
+ `/forge:rebuild --enrich` (phase 2) greps for it.
@@ -26,13 +26,25 @@ deps:
26
26
 
27
27
  ```
28
28
 
29
- 0. Pre-flight Gate Check:
29
+ 0a. Pre-flight Gate Check:
30
30
  - Resolve FORGE_ROOT (`node -e "console.log(require('./.forge/config.json').paths.forgeRoot)"`).
31
31
  - **Entity-mode resolution:** read the kickoff arguments. `--task {id}` → `entity_kind = "task"`, `record_id = {id}`. `--bug {id}` → `entity_kind = "bug"`, `record_id = {id}`. All store-cli calls below substitute `{entity_kind}` and `{record_id}` for the literal "task"/{taskId} placeholders.
32
32
  - Run: `node "$FORGE_ROOT/tools/preflight-gate.cjs" --phase plan --{entity_kind} {record_id}`
33
33
  - Exit 1 (gate failed) → print stderr and HALT. Do not proceed; do not attempt to produce the artifact.
34
34
  - Exit 2 (misconfiguration) → print stderr and HALT.
35
35
  - Exit 0 → continue.
36
+
37
+ 0b. Pipeline Step Guard (user-invoked state check):
38
+ - If `--force` is present in the invocation arguments, skip this step entirely.
39
+ - If `entity_kind == "bug"`, skip this step entirely (bug state is managed by meta-fix-bug.md).
40
+ - Read current task state:
41
+ `node "$FORGE_ROOT/tools/store-cli.cjs" read task {record_id} --json`
42
+ - Extract the `status` field from the JSON output.
43
+ - Allowed states for this phase: `draft`, `planned`, `plan-revision-required`.
44
+ - If the current status is NOT in the allowed set:
45
+ Print the following and HALT (do not proceed):
46
+ `× Task {record_id} is in state '{status}' — /forge:plan cannot run from this state; a reset or reassignment must complete first. To run the full pipeline: /forge:run-task {record_id}`
47
+
36
48
  1. Load Context:
37
49
  - Read `.forge/personas/architect.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
38
50
  - store-cli verbs: `read` | `list` | `write` | `emit` | `update-status` | `set-summary` | `describe` | `nlp` | `query` | `delete` — there is no `get`/`set`/`find`. See `_fragments/store-cli-verbs.md` for full notes; run `--help` before improvising.
@@ -100,7 +112,7 @@ deps:
100
112
  ## Iron Laws
101
113
 
102
114
  - Follow the Algorithm step by step. No code, pseudocode, or implementation sketches in the plan.
103
- - Read `.forge/personas/architect.md` first; print the persona identity line to stdout before any other tool use.
115
+ - Read `.forge/personas/architect.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
104
116
  - All store I/O via `forge_store` (or `node "$FORGE_ROOT/tools/store-cli.cjs"`). Never edit `.forge/store/*.json` directly.
105
117
 
106
118
  ## Store-Write Verification
@@ -36,43 +36,73 @@ deps:
36
36
 
37
37
  ```
38
38
 
39
- 0. Pre-flight Gate Check:
39
+ 0a. Pre-flight Gate Check:
40
40
  - Resolve FORGE_ROOT (`node -e "console.log(require('./.forge/config.json').paths.forgeRoot)"`).
41
41
  - **Entity-mode resolution:** read the kickoff arguments. `--task {id}` → `entity_kind = "task"`, `record_id = {id}`. `--bug {id}` → `entity_kind = "bug"`, `record_id = {id}`. All store-cli calls below substitute `{entity_kind}` and `{record_id}` for the literal "task"/{taskId} placeholders.
42
42
  - Run: `node "$FORGE_ROOT/tools/preflight-gate.cjs" --phase review-code --{entity_kind} {record_id}`
43
43
  - Exit 1 (gate failed) → print stderr and HALT. Do not proceed; do not attempt to produce the artifact.
44
44
  - Exit 2 (misconfiguration) → print stderr and HALT.
45
45
  - Exit 0 → continue.
46
- 1. Load Context:
46
+
47
+ 0b. Pipeline Step Guard (user-invoked state check):
48
+ - If `--force` is present in the invocation arguments, skip this step entirely.
49
+ - If `entity_kind == "bug"`, skip this step entirely (bug state is managed by meta-fix-bug.md).
50
+ - Read current task state:
51
+ `node "$FORGE_ROOT/tools/store-cli.cjs" read task {record_id} --json`
52
+ - Extract the `status` field from the JSON output.
53
+ - Allowed states for this phase: `implemented`, `implementing`.
54
+ - If the current status is NOT in the allowed set:
55
+ Print the following and HALT (do not proceed):
56
+ `× Task {record_id} is in state '{status}' — /forge:implement must complete first. To run the full pipeline: /forge:run-task {record_id}`
57
+
58
+ 1. Read Review Loop Context:
59
+ - Check the spawning prompt for a `### Review Loop Context` block.
60
+ - If present, extract:
61
+ - `Iteration: N of M` — current attempt number and the configured limit
62
+ - `Is final iteration: true/false`
63
+ - If absent (user-invoked, not orchestrated): treat as iteration 1 of M, where M is
64
+ read from `.forge/config.json` → `maxReviewIterations` (default 3 if field absent).
65
+ - Include `(iteration N of M)` in the opening line of the `CODE_REVIEW.md` artifact.
66
+ - If this is the final iteration (`N == M`) and the verdict is `Revision Required`,
67
+ append a `### Next Steps` section to the artifact showing:
68
+ ```
69
+ ### Next Steps
70
+ - Force-approve (bypass remaining reviews): `/forge:approve --force {task_id}`
71
+ - Increase iteration limit: edit `config.pipelines.{pipeline}.phases[review-code].maxIterations`
72
+ - Restart from review: `/forge:review-code {task_id}`
73
+ ```
74
+
75
+ 2. Load Context:
47
76
  - Read task prompt
48
77
  - Read approved PLAN.md
49
78
  - Read PROGRESS.md
50
79
 
51
80
  **Read mode: diff-first.** Read `git diff $(git merge-base HEAD origin/main)..HEAD -- <files-listed-in-PLAN>` first. Read full source files only when the diff context is insufficient to judge a finding (e.g., the change is an inversion of an invariant defined elsewhere). Do not pre-load full source — tool calls earn their tokens.
52
81
 
53
- 2. Review:
82
+ 3. Review:
54
83
  - Verify all plan steps were executed
55
84
  - Review code for quality, security, and architecture alignment
56
85
  - Verify test evidence in PROGRESS.md is authentic and complete
57
86
 
58
- 3. Verdict:
87
+ 4. Verdict:
59
88
  - Write the code review via forge_artifact:
60
89
  `forge_artifact({ command:"write", entity:"{entity_kind}", entityId:"{record_id}", artifact:"code-review", content:"<markdown>" })`
61
90
  Use the format:
62
91
  **Verdict:** [Approved | Revision Required]
63
92
  - If Revision Required: provide numbered, actionable items
64
93
  - If Approved: provide any advisory notes
94
+ - See step 1 for iteration header and final-iteration Next Steps requirements.
65
95
 
66
- 4. Knowledge Writeback:
96
+ 5. Knowledge Writeback:
67
97
  - Update stack-checklist.md if new patterns or pitfalls were discovered
68
98
 
69
- 5. Finalize:
99
+ 6. Finalize:
70
100
  - Transitions:
71
101
  - **Task mode** — Update status: `node "$FORGE_ROOT/tools/store-cli.cjs" update-status task {taskId} status review-approved` (if Approved) or `... status code-revision-required` (if Revision Required).
72
102
  - **Bug mode** — NO status write. The bug remains `in-progress`. The verdict signal travels through `summaries.code_review.verdict` (read by `read-verdict.cjs § BUG_PHASE_VERDICT_SOURCE`), not `bug.status`. Writing `bug.status` here violates `meta-fix-bug.md § Iron Laws #2`.
73
103
  - **Do NOT emit a phase event yourself.** The orchestrator (or kickoff handler) owns event emission — it composes the canonical event from runtime telemetry (model, provider, tokens, wall times) plus the SUMMARY you write in the next step. Subagents that call `store-cli emit` for phase events hallucinate runtime facts (see Plan 11 / Slice 2). Write the SUMMARY and return.
74
104
 
75
- 6. Emit Summary Sidecar:
105
+ 7. Emit Summary Sidecar:
76
106
  - Write the review summary via forge_artifact:
77
107
  `forge_artifact({ command:"write", entity:"{entity_kind}", entityId:"{record_id}", artifact:"review-impl-summary", content:"<JSON>" })`
78
108
  The JSON shape:
@@ -38,30 +38,60 @@ deps:
38
38
 
39
39
  ```
40
40
 
41
- 0. Pre-flight Gate Check:
41
+ 0a. Pre-flight Gate Check:
42
42
  - Resolve FORGE_ROOT (`node -e "console.log(require('./.forge/config.json').paths.forgeRoot)"`).
43
43
  - **Entity-mode resolution:** read the kickoff arguments. `--task {id}` → `entity_kind = "task"`, `record_id = {id}`. `--bug {id}` → `entity_kind = "bug"`, `record_id = {id}`. All store-cli calls below substitute `{entity_kind}` and `{record_id}` for the literal "task"/{taskId} placeholders.
44
44
  - Run: `node "$FORGE_ROOT/tools/preflight-gate.cjs" --phase review-plan --{entity_kind} {record_id}`
45
45
  - Exit 1 (gate failed) → print stderr and HALT. Do not proceed; do not attempt to produce the artifact.
46
46
  - Exit 2 (misconfiguration) → print stderr and HALT.
47
47
  - Exit 0 → continue.
48
- 1. Load Context:
48
+
49
+ 0b. Pipeline Step Guard (user-invoked state check):
50
+ - If `--force` is present in the invocation arguments, skip this step entirely.
51
+ - If `entity_kind == "bug"`, skip this step entirely (bug state is managed by meta-fix-bug.md).
52
+ - Read current task state:
53
+ `node "$FORGE_ROOT/tools/store-cli.cjs" read task {record_id} --json`
54
+ - Extract the `status` field from the JSON output.
55
+ - Allowed states for this phase: `planned`.
56
+ - If the current status is NOT in the allowed set:
57
+ Print the following and HALT (do not proceed):
58
+ `× Task {record_id} is in state '{status}' — /forge:plan must complete first. To run the full pipeline: /forge:run-task {record_id}`
59
+
60
+ 1. Read Review Loop Context:
61
+ - Check the spawning prompt for a `### Review Loop Context` block.
62
+ - If present, extract:
63
+ - `Iteration: N of M` — current attempt number and the configured limit
64
+ - `Is final iteration: true/false`
65
+ - If absent (user-invoked, not orchestrated): treat as iteration 1 of M, where M is
66
+ read from `.forge/config.json` → `maxReviewIterations` (default 3 if field absent).
67
+ - Include `(iteration N of M)` in the opening line of the `PLAN_REVIEW.md` artifact.
68
+ - If this is the final iteration (`N == M`) and the verdict is `Revision Required`,
69
+ append a `### Next Steps` section to the artifact showing:
70
+ ```
71
+ ### Next Steps
72
+ - Force-approve (bypass remaining reviews): `/forge:approve --force {task_id}`
73
+ - Increase iteration limit: edit `config.pipelines.{pipeline}.phases[review-plan].maxIterations`
74
+ - Restart from review: `/forge:review-plan {task_id}`
75
+ ```
76
+
77
+ 2. Load Context:
49
78
  - Read task prompt (source of truth)
50
79
  - Read PLAN.md (subject of review)
51
80
  - Read stack checklist if available
52
81
 
53
- 2. Review:
82
+ 3. Review:
54
83
  - Evaluate feasibility, completeness, security, architecture alignment, and testing strategy
55
84
  - Identify missing edge cases or failure modes
56
85
 
57
- 3. Verdict:
86
+ 4. Verdict:
58
87
  - Write the plan review via forge_artifact: forge_artifact({ command:"write", entity:"{entity_kind}", entityId:"{record_id}", artifact:"plan-review", content:"<markdown>" })
59
88
  Use the format:
60
89
  **Verdict:** [Approved | Revision Required]
61
90
  - If Revision Required: provide numbered, actionable items
62
91
  - If Approved: provide any advisory notes
92
+ - See step 1 for iteration header and final-iteration Next Steps requirements.
63
93
 
64
- 4. Finalize:
94
+ 5. Finalize:
65
95
  - Transitions:
66
96
  - **Task mode** — predecessor must be `planned`.
67
97
  - Approved → `plan-approved`
@@ -71,7 +101,7 @@ deps:
71
101
  - **Bug mode** — NO status write. The bug remains `in-progress`. The verdict signal travels through `summaries.review_plan.verdict` (read by `read-verdict.cjs § BUG_PHASE_VERDICT_SOURCE`), not `bug.status`. Writing `bug.status` here violates `meta-fix-bug.md § Iron Laws #2`.
72
102
  - **Do NOT emit a phase event yourself.** The orchestrator owns event emission — it composes the canonical event from runtime telemetry (model, provider, tokens, wall times) plus the SUMMARY you write in the next step. Subagents that call `store-cli emit` for phase events hallucinate runtime facts (see Plan 11 / Slice 2). Write the SUMMARY and return.
73
103
 
74
- 5. Emit Summary Sidecar:
104
+ 6. Emit Summary Sidecar:
75
105
  - Write the review-plan summary via forge_artifact: forge_artifact({ command:"write", entity:"{entity_kind}", entityId:"{record_id}", artifact:"review-plan-summary", content:"<JSON>" })
76
106
  The JSON must have the following shape:
77
107
  ```json
@@ -181,7 +181,7 @@ Once all tasks have reached a terminal status:
181
181
  ── Carried over / abandoned: N tasks
182
182
  ```
183
183
  3. Update sprint `status` to `completed` or `partially-completed`
184
- 4. Suggest: "Run `/forge:retrospective {SPRINT_ID}` to close out the sprint."
184
+ 4. Suggest: "Run `/forge:retro {SPRINT_ID}` to close out the sprint."
185
185
 
186
186
  ## Sprint Lifecycle Hooks
187
187
 
@@ -189,7 +189,7 @@ Once all tasks have reached a terminal status:
189
189
  |---|---|---|
190
190
  | `collate` | After all tasks terminal | Run `node "$FORGE_ROOT/tools/collate.cjs"` |
191
191
  | `report` | After collation | Print outcome summary (committed/escalated/carried-over counts) |
192
- | `suggest` | After report | Suggest `/forge:retrospective {SPRINT_ID}` |
192
+ | `suggest` | After report | Suggest `/forge:retro {SPRINT_ID}` |
193
193
 
194
194
  ## Resume Semantics
195
195