@entelligentsia/forgecli 1.0.10 → 1.0.14

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 (167) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/CHANGELOG-forge-plugin.md +150 -0
  3. package/dist/bin/forge.js +0 -0
  4. package/dist/extensions/forgecli/config-layer.d.ts +16 -0
  5. package/dist/extensions/forgecli/config-layer.js +5 -0
  6. package/dist/extensions/forgecli/config-layer.js.map +1 -1
  7. package/dist/extensions/forgecli/dashboard/component.d.ts +102 -0
  8. package/dist/extensions/forgecli/dashboard/component.js +882 -0
  9. package/dist/extensions/forgecli/dashboard/component.js.map +1 -0
  10. package/dist/extensions/forgecli/dashboard/register.d.ts +2 -0
  11. package/dist/extensions/forgecli/dashboard/register.js +45 -0
  12. package/dist/extensions/forgecli/dashboard/register.js.map +1 -0
  13. package/dist/extensions/forgecli/dashboard/view-model.d.ts +35 -0
  14. package/dist/extensions/forgecli/dashboard/view-model.js +54 -0
  15. package/dist/extensions/forgecli/dashboard/view-model.js.map +1 -0
  16. package/dist/extensions/forgecli/fix-bug.js +72 -7
  17. package/dist/extensions/forgecli/fix-bug.js.map +1 -1
  18. package/dist/extensions/forgecli/forge-cli-schema.json +4 -0
  19. package/dist/extensions/forgecli/forge-commands.js +1 -0
  20. package/dist/extensions/forgecli/forge-commands.js.map +1 -1
  21. package/dist/extensions/forgecli/forge-init/phase4-register.js +53 -0
  22. package/dist/extensions/forgecli/forge-init/phase4-register.js.map +1 -1
  23. package/dist/extensions/forgecli/forge-subagent.js +6 -4
  24. package/dist/extensions/forgecli/forge-subagent.js.map +1 -1
  25. package/dist/extensions/forgecli/index.js +5 -0
  26. package/dist/extensions/forgecli/index.js.map +1 -1
  27. package/dist/extensions/forgecli/lib/halt-advisor.d.ts +54 -0
  28. package/dist/extensions/forgecli/lib/halt-advisor.js +90 -0
  29. package/dist/extensions/forgecli/lib/halt-advisor.js.map +1 -0
  30. package/dist/extensions/forgecli/migration-engine.js +25 -12
  31. package/dist/extensions/forgecli/migration-engine.js.map +1 -1
  32. package/dist/extensions/forgecli/orchestrator-status-bar.d.ts +25 -0
  33. package/dist/extensions/forgecli/orchestrator-status-bar.js +183 -0
  34. package/dist/extensions/forgecli/orchestrator-status-bar.js.map +1 -0
  35. package/dist/extensions/forgecli/orchestrator-tree.d.ts +96 -0
  36. package/dist/extensions/forgecli/orchestrator-tree.js +390 -0
  37. package/dist/extensions/forgecli/orchestrator-tree.js.map +1 -0
  38. package/dist/extensions/forgecli/project-orientation.js +12 -8
  39. package/dist/extensions/forgecli/project-orientation.js.map +1 -1
  40. package/dist/extensions/forgecli/regenerate.d.ts +16 -0
  41. package/dist/extensions/forgecli/regenerate.js +110 -0
  42. package/dist/extensions/forgecli/regenerate.js.map +1 -1
  43. package/dist/extensions/forgecli/run-sprint.js +33 -3
  44. package/dist/extensions/forgecli/run-sprint.js.map +1 -1
  45. package/dist/extensions/forgecli/run-task.d.ts +32 -0
  46. package/dist/extensions/forgecli/run-task.js +185 -12
  47. package/dist/extensions/forgecli/run-task.js.map +1 -1
  48. package/dist/extensions/forgecli/thread-switcher.js +105 -764
  49. package/dist/extensions/forgecli/thread-switcher.js.map +1 -1
  50. package/dist/extensions/forgecli/viewport-events.js +32 -0
  51. package/dist/extensions/forgecli/viewport-events.js.map +1 -1
  52. package/dist/forge-payload/.base-pack/commands/fix-bug.md +1 -1
  53. package/dist/forge-payload/.base-pack/commands/run-sprint.md +1 -1
  54. package/dist/forge-payload/.base-pack/commands/run-task.md +1 -1
  55. package/dist/forge-payload/.base-pack/personas/architect.md +1 -1
  56. package/dist/forge-payload/.base-pack/personas/bug-fixer.md +1 -1
  57. package/dist/forge-payload/.base-pack/personas/collator.md +3 -3
  58. package/dist/forge-payload/.base-pack/personas/engineer.md +1 -1
  59. package/dist/forge-payload/.base-pack/personas/librarian.md +1 -1
  60. package/dist/forge-payload/.base-pack/personas/orchestrator.md +1 -1
  61. package/dist/forge-payload/.base-pack/personas/product-manager.md +1 -1
  62. package/dist/forge-payload/.base-pack/personas/qa-engineer.md +1 -1
  63. package/dist/forge-payload/.base-pack/personas/supervisor.md +1 -1
  64. package/dist/forge-payload/.base-pack/workflows/_fragments/event-emission-schema.md +1 -1
  65. package/dist/forge-payload/.base-pack/workflows/_fragments/friction-emit.md +1 -1
  66. package/dist/forge-payload/.base-pack/workflows/_fragments/iron-laws.md +1 -1
  67. package/dist/forge-payload/.base-pack/workflows/_fragments/progress-reporting.md +2 -2
  68. package/dist/forge-payload/.base-pack/workflows/_fragments/store-cli-verbs.md +11 -2
  69. package/dist/forge-payload/.base-pack/workflows/architect_approve.md +6 -7
  70. package/dist/forge-payload/.base-pack/workflows/architect_review_sprint_completion.md +2 -2
  71. package/dist/forge-payload/.base-pack/workflows/architect_sprint_intake.md +2 -2
  72. package/dist/forge-payload/.base-pack/workflows/architect_sprint_plan.md +5 -5
  73. package/dist/forge-payload/.base-pack/workflows/collator_agent.md +4 -6
  74. package/dist/forge-payload/.base-pack/workflows/commit_task.md +5 -6
  75. package/dist/forge-payload/.base-pack/workflows/enhance.md +5 -5
  76. package/dist/forge-payload/.base-pack/workflows/implement_plan.md +6 -7
  77. package/dist/forge-payload/.base-pack/workflows/migrate_structural.md +12 -13
  78. package/dist/forge-payload/.base-pack/workflows/plan_task.md +5 -6
  79. package/dist/forge-payload/.base-pack/workflows/review_code.md +8 -8
  80. package/dist/forge-payload/.base-pack/workflows/review_plan.md +8 -8
  81. package/dist/forge-payload/.base-pack/workflows/sprint_retrospective.md +3 -3
  82. package/dist/forge-payload/.base-pack/workflows/triage.md +12 -9
  83. package/dist/forge-payload/.base-pack/workflows/update_implementation.md +2 -2
  84. package/dist/forge-payload/.base-pack/workflows/update_plan.md +2 -2
  85. package/dist/forge-payload/.base-pack/workflows/validate_task.md +5 -6
  86. package/dist/forge-payload/.base-pack/workflows-js/wfl-fix-bug.js +490 -0
  87. package/dist/forge-payload/.base-pack/workflows-js/wfl-run-sprint.js +416 -0
  88. package/dist/forge-payload/.base-pack/workflows-js/wfl-run-task.js +608 -0
  89. package/dist/forge-payload/.claude-plugin/plugin.json +1 -1
  90. package/dist/forge-payload/.schemas/config.schema.json +2 -3
  91. package/dist/forge-payload/.schemas/enum-catalog.json +2 -2
  92. package/dist/forge-payload/.schemas/event.schema.json +16 -0
  93. package/dist/forge-payload/.schemas/migrations.json +236 -0
  94. package/dist/forge-payload/commands/health.md +29 -0
  95. package/dist/forge-payload/commands/rebuild.md +143 -15
  96. package/dist/forge-payload/commands/update.md +28 -27
  97. package/dist/forge-payload/hooks/preflight-session.cjs +99 -0
  98. package/dist/forge-payload/init/phases/phase-3-materialize.md +18 -5
  99. package/dist/forge-payload/integrity.json +7 -6
  100. package/dist/forge-payload/meta/fragments/tool-discipline.md +1 -1
  101. package/dist/forge-payload/meta/personas/meta-architect.md +1 -1
  102. package/dist/forge-payload/meta/personas/meta-bug-fixer.md +1 -1
  103. package/dist/forge-payload/meta/personas/meta-collator.md +7 -7
  104. package/dist/forge-payload/meta/personas/meta-engineer.md +1 -1
  105. package/dist/forge-payload/meta/personas/meta-orchestrator.md +1 -1
  106. package/dist/forge-payload/meta/personas/meta-supervisor.md +1 -1
  107. package/dist/forge-payload/meta/tool-specs/store-cli.spec.md +1 -1
  108. package/dist/forge-payload/meta/workflows/_fragments/event-emission-schema.md +1 -1
  109. package/dist/forge-payload/meta/workflows/_fragments/friction-emit.md +1 -1
  110. package/dist/forge-payload/meta/workflows/_fragments/iron-laws.md +1 -1
  111. package/dist/forge-payload/meta/workflows/_fragments/progress-reporting.md +2 -2
  112. package/dist/forge-payload/meta/workflows/_fragments/store-cli-verbs.md +11 -2
  113. package/dist/forge-payload/meta/workflows/meta-approve.md +6 -7
  114. package/dist/forge-payload/meta/workflows/meta-bug-triage.md +12 -9
  115. package/dist/forge-payload/meta/workflows/meta-collate.md +5 -7
  116. package/dist/forge-payload/meta/workflows/meta-commit.md +5 -6
  117. package/dist/forge-payload/meta/workflows/meta-enhance.md +5 -5
  118. package/dist/forge-payload/meta/workflows/meta-fix-bug.md +35 -11
  119. package/dist/forge-payload/meta/workflows/meta-implement.md +15 -7
  120. package/dist/forge-payload/meta/workflows/meta-migrate.md +13 -14
  121. package/dist/forge-payload/meta/workflows/meta-new-sprint.md +3 -3
  122. package/dist/forge-payload/meta/workflows/meta-orchestrate.md +138 -39
  123. package/dist/forge-payload/meta/workflows/meta-plan-sprint.md +6 -6
  124. package/dist/forge-payload/meta/workflows/meta-plan-task.md +12 -6
  125. package/dist/forge-payload/meta/workflows/meta-retro.md +4 -4
  126. package/dist/forge-payload/meta/workflows/meta-retrospective.md +4 -4
  127. package/dist/forge-payload/meta/workflows/meta-review-implementation.md +8 -8
  128. package/dist/forge-payload/meta/workflows/meta-review-plan.md +8 -8
  129. package/dist/forge-payload/meta/workflows/meta-review-sprint-completion.md +3 -3
  130. package/dist/forge-payload/meta/workflows/meta-sprint-intake.md +3 -3
  131. package/dist/forge-payload/meta/workflows/meta-sprint-plan.md +6 -6
  132. package/dist/forge-payload/meta/workflows/meta-update-implementation.md +2 -2
  133. package/dist/forge-payload/meta/workflows/meta-update-plan.md +2 -2
  134. package/dist/forge-payload/meta/workflows/meta-validate.md +5 -6
  135. package/dist/forge-payload/schemas/config.schema.json +2 -3
  136. package/dist/forge-payload/schemas/enum-catalog.json +2 -2
  137. package/dist/forge-payload/schemas/event.schema.json +16 -0
  138. package/dist/forge-payload/schemas/structure-manifest.json +75 -73
  139. package/dist/forge-payload/skills/refresh-kb-links/SKILL.md +14 -7
  140. package/dist/forge-payload/tools/banners.cjs +29 -10
  141. package/dist/forge-payload/tools/check-structure.cjs +88 -7
  142. package/dist/forge-payload/tools/collate.cjs +16 -2
  143. package/dist/forge-payload/tools/manage-config.cjs +5 -7
  144. package/dist/forge-payload/tools/parse-gates.cjs +73 -1
  145. package/dist/forge-payload/tools/postflight-gate.cjs +252 -0
  146. package/dist/forge-payload/tools/preflight-gate.cjs +47 -0
  147. package/dist/forge-payload/tools/substitute-placeholders.cjs +5 -4
  148. package/dist/forge-payload/tools/verify-phase.cjs +17 -0
  149. package/package.json +1 -1
  150. package/dist/bin/forgecli.d.ts +0 -2
  151. package/dist/bin/forgecli.js +0 -6
  152. package/dist/bin/forgecli.js.map +0 -1
  153. package/dist/extensions/forgecli/config-tui/index.d.ts +0 -5
  154. package/dist/extensions/forgecli/config-tui/index.js +0 -5
  155. package/dist/extensions/forgecli/config-tui/index.js.map +0 -1
  156. package/dist/extensions/forgecli/loaders/persona-skill-loader.d.ts +0 -45
  157. package/dist/extensions/forgecli/loaders/persona-skill-loader.js +0 -227
  158. package/dist/extensions/forgecli/loaders/persona-skill-loader.js.map +0 -1
  159. package/dist/extensions/forgecli/loaders/template-render.d.ts +0 -20
  160. package/dist/extensions/forgecli/loaders/template-render.js +0 -85
  161. package/dist/extensions/forgecli/loaders/template-render.js.map +0 -1
  162. package/dist/extensions/forgecli/loaders/workflow-loader.d.ts +0 -41
  163. package/dist/extensions/forgecli/loaders/workflow-loader.js +0 -164
  164. package/dist/extensions/forgecli/loaders/workflow-loader.js.map +0 -1
  165. package/dist/forge-payload/.base-pack/workflows/fix_bug.md +0 -446
  166. package/dist/forge-payload/.base-pack/workflows/orchestrate_task.md +0 -928
  167. package/dist/forge-payload/.base-pack/workflows/run_sprint.md +0 -225
@@ -55,8 +55,10 @@
55
55
  "task-approved",
56
56
  "task-validated",
57
57
  "task-committed",
58
+ "sprint-start",
58
59
  "sprint-complete",
59
60
  "sprint-halted",
61
+ "task-dispatch",
60
62
  "bug-fixed",
61
63
 
62
64
  "bug-triaged", "fix-planned", "fix-review-passed", "fix-review-failed",
@@ -135,6 +137,20 @@
135
137
  },
136
138
  "then": { "required": ["bugId", "phase", "iteration"] }
137
139
  },
140
+ {
141
+ "if": { "properties": { "type": { "const": "sprint-start" } }, "required": ["type"] },
142
+ "then": {
143
+ "required": [
144
+ "eventId", "sprintId", "role", "action",
145
+ "startTimestamp", "endTimestamp", "durationMinutes",
146
+ "model", "provider",
147
+ "taskCount"
148
+ ],
149
+ "properties": {
150
+ "taskCount": { "type": "integer", "minimum": 0 }
151
+ }
152
+ }
153
+ },
138
154
  {
139
155
  "if": { "properties": { "type": { "const": "sprint-complete" } }, "required": ["type"] },
140
156
  "then": {
@@ -1,4 +1,240 @@
1
1
  {
2
+ "1.2.13": {
3
+ "version": "1.2.14",
4
+ "date": "2026-06-03",
5
+ "notes": "Correct the set-summary / set-bug-summary call signature in the review and triage workflows. meta-review-implementation.md, meta-review-plan.md, and meta-bug-triage.md documented a forge_store invocation with named entity/id/phase fields (forge_store({ command:'set-summary', entity:'task', id:'{taskId}', phase:'code_review' })) — but the forge_store tool schema accepts only { command, args[] }. Subagents handed the non-existent named form mis-built args, landing the record id in the phase slot; the phase-ownership guard rejected it ('expected summary key code_review'), summaries.code_review was never written, and the orchestrator halted the task as 'verdict missing'. All sites now use the canonical positional form forge_store({ command:'set-summary', args:['{taskId}', 'code_review'] }) with a one-line signature reminder; the _fragments/store-cli-verbs.md cheat-sheet documents the forge_store { command, args[] } shape and the 'id in both slots' failure. Also fixed a forge_store read call in meta-bug-triage.md that used the same invalid named form.",
6
+ "target": "workflows:review_code workflows:review_plan workflows:bug-triage",
7
+ "regenerate": [
8
+ "workflows"
9
+ ],
10
+ "breaking": false,
11
+ "manual": [
12
+ "Run /forge:update, then /forge:rebuild workflows to refresh .forge/workflows/ (review_code.md, review_plan.md, triage.md, and the store-cli-verbs fragment) with the corrected set-summary signature. Prompt-text only — no tool or schema change."
13
+ ]
14
+ },
15
+ "1.2.12": {
16
+ "version": "1.2.13",
17
+ "date": "2026-06-03",
18
+ "notes": "Deterministic post-phase exit guard (FORGE-S26-T19). New parseOutputs() export in parse-gates.cjs handles ```outputs phase=X``` fence blocks with closed grammar (artifact + require directives; unknown throws). New postflight-gate.cjs evaluator runs post-phase; returns { phase, reasonCode, detail, remediation } with new output-missing and output-stub reasonCodes; no LLM in path. forge-cli run-task.ts now calls runPostflightGate() after runForgeSubagent returns and before FSM advance; on UNSATISFIED halts + calls existing runHaltAdvisor. wfl-run-task.js gets a #22 parity-seam comment. meta-plan-task.md and meta-implement.md: prose Tier-2 self-check replaced by declarative outputs blocks + thin pointer reminders.",
19
+ "target": "tools:parse-gates tools:postflight-gate",
20
+ "regenerate": ["workflows"],
21
+ "breaking": false,
22
+ "manual": [
23
+ "Run /forge:rebuild to pick up updated meta-workflow changes (meta-plan-task.md, meta-implement.md now include declarative outputs blocks). postflight-gate.cjs is additive — no-op for workflows without outputs blocks."
24
+ ]
25
+ },
26
+ "1.2.11": {
27
+ "version": "1.2.12",
28
+ "date": "2026-06-03",
29
+ "notes": "Rebuild/republish bump — no functional source change from 1.2.11. Cut to ship a fresh plugin manifest + integrity hashes and a corresponding forge-cli 1.0.12 build/install. Carries the 1.2.11 halt-recovery-advisor payload (FORGE-S26-T18) unchanged.",
30
+ "target": "release:rebuild",
31
+ "regenerate": [],
32
+ "breaking": false,
33
+ "manual": []
34
+ },
35
+ "1.2.10": {
36
+ "version": "1.2.11",
37
+ "date": "2026-06-03",
38
+ "notes": "Halt-recovery advisor (FORGE-S26-T18). preflight-gate.cjs now emits structured JSON on stdout on gate failure: { phase, reasonCode, detail, remediation }. reasonCode values: artifact-missing, predecessor-verdict-missing, illegal-status, tool-error. Both LLM orchestrators (meta-orchestrate.md, meta-fix-bug.md) parse and render the structured failure instead of raw stderr. forge-cli run-task and fix-bug upgraded to runPreflightGateWithData() which returns structured failure alongside the PreflightResult enum; on halt, the CLI spawns a read-only halt-recovery advisor subagent on the advisorModel config slot (or getAvailable()[0] fallback). New optional advisorModel field added to forge-cli layered config (L1 global / L2 project). Post-phase self-check guards added to meta-plan-task.md and meta-implement.md (Tier 2) to prevent false complete events when a phase subagent silently fails to write its primary output.",
39
+ "target": "tools:preflight-gate",
40
+ "regenerate": ["workflows"],
41
+ "breaking": false,
42
+ "manual": [
43
+ "Run /forge:rebuild to pick up updated meta-workflow changes (meta-orchestrate.md, meta-fix-bug.md, meta-plan-task.md, meta-implement.md). The structured JSON stdout from preflight-gate.cjs is additive — orchestrators that do not parse it still receive human-readable stderr and exit 1."
44
+ ]
45
+ },
46
+ "1.2.9": {
47
+ "version": "1.2.10",
48
+ "date": "2026-06-03",
49
+ "notes": "Fix incomplete .forge/tools/ vendored closure. generate-tools.md and rebuild.md copied tools via `*.cjs` globs only, silently skipping the two `.js` lib helpers (lib/result.js, lib/validate.js) and the top-level list-skills.js. Because store-cli.cjs does a top-level require('./lib/validate.js') and collate.cjs requires './lib/result.js', a freshly vendored .forge/tools/ left store-cli.cjs dead-on-arrival (ENOENT) and broke KB collation. Latent since the vendored-tools model landed; S29 made it fatal by moving tool execution off $FORGE_ROOT/tools/ onto the vendored copy. Both vendoring sites now copy `.cjs` and `.js` (find -maxdepth 1, excludes __tests__/) and record both in the generation manifest. New regression guard tools/__tests__/vendored-tools-closure.test.cjs ties the documented copy extensions to the actual require()-closure.",
50
+ "target": "tools:vendor-closure",
51
+ "regenerate": ["tools"],
52
+ "breaking": false,
53
+ "manual": [
54
+ "Run /forge:rebuild tools to re-vendor .forge/tools/ with the complete closure. Existing projects vendored by v1.2.4–v1.2.9 are missing .forge/tools/lib/result.js, .forge/tools/lib/validate.js, and .forge/tools/list-skills.js — store-cli and KB collation are broken until this re-vendor runs."
55
+ ]
56
+ },
57
+ "1.2.8": {
58
+ "version": "1.2.9",
59
+ "date": "2026-06-03",
60
+ "notes": "Finish the FORGE_ROOT retirement in the workflow/persona layer (vendored-path scope). Remove the vestigial 'Resolve FORGE_ROOT (config.paths.forgeRoot)' preamble bullet from meta-approve/review-plan/review-implementation/validate/commit/plan-task/implement/bug-triage (the gate calls already use node .forge/tools/preflight-gate.cjs). Switch persona identity banners to node .forge/tools/banners.cjs <id> at the generator (build-base-pack.cjs identityBlock) and in the three base-pack-only personas (librarian/orchestrator/product-manager); drop the broken paths.forgeRoot resolution. meta-collate/collator now invoke node .forge/tools/collate.cjs directly. meta-migrate resolves the plugin root from CLAUDE_PLUGIN_ROOT (plugin-side reads of init/base-pack are not vendored). Stale paths.forgeRoot doc references removed from store-cli.spec.md, meta-enhance config_fields, and tool-discipline.md. paths.forgeRoot is intentionally retained as a maintained convenience field (written by check-update.cjs) for skills/commands that resolve the plugin root — those are out of scope for this entry.",
61
+ "target": "workflows:forge-root-residual-cleanup",
62
+ "regenerate": ["workflows", "personas"],
63
+ "breaking": false,
64
+ "manual": [
65
+ "Run /forge:rebuild workflows personas to regenerate the updated workflow and persona files. The vendored banners/collate invocations require .forge/tools/ to be present — run /forge:rebuild tools first if it is absent (see the 1.2.7 migration)."
66
+ ]
67
+ },
68
+ "1.2.7": {
69
+ "version": "1.2.8",
70
+ "date": "2026-06-03",
71
+ "notes": "Remove all $FORGE_ROOT references from init/smoke-test.md. Switch tool exec check to node .forge/tools/validate-store.cjs, generation-manifest stamp to node .forge/tools/generation-manifest.cjs, version read to .forge/tools/.forge-tools-version, distribution detection to the distribution field in .forge-tools-version, and remove the forgeRoot field from update-check-cache.json stamp. Smoke-test runs only at init time — existing projects are not affected.",
72
+ "target": "init:smoke-test",
73
+ "regenerate": ["init"],
74
+ "breaking": false,
75
+ "manual": [
76
+ "Re-run /forge:init on new projects to pick up the updated smoke-test. Existing projects are unaffected — smoke-test runs only once at init time."
77
+ ]
78
+ },
79
+ "1.2.6": {
80
+ "version": "1.2.7",
81
+ "date": "2026-06-02",
82
+ "notes": "Remove paths.forgeRoot from config.schema.json required[] and properties. forge-preflight.cjs now resolves plugin root via forgeRef-based cache scan (mirrors manage-config.cjs Priority 2) instead of reading config.paths.forgeRoot. manage-config.cjs resolve-forge-root drops Priority 3 (forgeRoot fallback). generate-tools.md drops Step 1 (forgeRoot write). update.md removes forgeRoot refresh from Step 4 config section and fixes tools regenerate category to invoke /forge:rebuild tools instead of running schema refresh inline.",
83
+ "target": "config:forgeRoot",
84
+ "regenerate": ["tools"],
85
+ "breaking": false,
86
+ "manual": [
87
+ "Run /forge:rebuild tools to re-vendor .forge/tools/ on existing projects. Projects that have never run /forge:rebuild tools will have .forge/tools/ absent until this step."
88
+ ]
89
+ },
90
+ "1.2.5": {
91
+ "version": "1.2.6",
92
+ "date": "2026-06-02",
93
+ "notes": "Add vendored-tools integrity and staleness check to /forge:health. Exports checkToolsVersion(projectRoot) from check-structure.cjs: reads .forge/tools/.forge-tools-version marker and paths.forgeRef from config, returns { present, vendoredVersion, activeVersion, stale, reason }. generate-tools.md Step 2c now writes .forge/tools/.forge-tools-version after the tool copy loop. rebuild.md tools category now re-writes the marker after re-copy. health.md gains step 8b (vendored tools presence + staleness check, emitting 〇/△/× with /forge:rebuild tools recommendation). Closes the integrity gap for existing projects that ran /forge:rebuild tools in v1.2.4 without the marker.",
94
+ "target": "tools:health",
95
+ "regenerate": ["tools"],
96
+ "breaking": false,
97
+ "manual": [
98
+ "Run /forge:update, then /forge:rebuild tools to write .forge/tools/.forge-tools-version. Until this runs, /forge:health will report 'stale (marker absent)' — non-breaking."
99
+ ]
100
+ },
101
+ "1.2.4": {
102
+ "version": "1.2.5",
103
+ "date": "2026-06-02",
104
+ "notes": "Rewrite all ~159 node \"$FORGE_ROOT/tools/X.cjs\" call-sites in meta/workflows/*.md, meta/workflows/_fragments/*.md, and wfl-*.js drivers to use the fixed project-relative form node .forge/tools/X.cjs. Delete the FORGE_ROOT export preamble from all three JS drivers (wfl-run-task.js, wfl-run-sprint.js, wfl-fix-bug.js). Tools are now vendored in .forge/tools/ (added in v1.2.4), so no subagent needs to resolve a plugin root path at runtime. Drift test guard updated: asserts no $FORGE_ROOT remains in any driver source. Existing projects must regenerate workflows and workflows-js to pick up the new paths.",
105
+ "target": "workflows:*",
106
+ "regenerate": ["workflows", "workflows-js"],
107
+ "breaking": false,
108
+ "manual": [
109
+ "Run /forge:update, then run /forge:rebuild tools (if not done in v1.2.4 step), then /forge:rebuild workflows and /forge:rebuild workflows-js. Tools must be vendored in .forge/tools/ before running the rewritten workflows."
110
+ ]
111
+ },
112
+ "1.2.3": {
113
+ "version": "1.2.4",
114
+ "date": "2026-06-02",
115
+ "notes": "Add tools vendor category: copy plugin tools/*.cjs + tools/lib/*.cjs into .forge/tools/ at init and rebuild, mirroring the existing schemas copy. Adds tools namespace to structure-manifest.json (via build-manifest.cjs TOOLS_FILES constant), Step 2b to generate-tools.md (init copy), and tools/tools:<filename> category to rebuild.md (verbatim re-copy from $FORGE_ROOT/tools/). check-structure.cjs validateManifest now maps the tools namespace to forgeRoot/tools/ with recursive lib/ enumeration. Foundation for FORGE-S29 call-site rewrite (T02+). No existing call-sites changed in this task.",
116
+ "target": "tools",
117
+ "regenerate": ["tools"],
118
+ "breaking": false,
119
+ "manual": [
120
+ "Run /forge:update, then /forge:rebuild tools to materialise .forge/tools/."
121
+ ]
122
+ },
123
+ "1.2.2": {
124
+ "version": "1.2.3",
125
+ "date": "2026-06-02",
126
+ "notes": "Harden FORGE_ROOT / .forge/config.json resolution in the packaged JS workflow drivers. A friction trace of a real /fix-bug run showed phase subagents repeatedly probing ../.forge/config.json (the PARENT directory — 5 of 11 subagents) and one invoking `node \"$FORGE_ROOT/tools/preflight-gate.cjs\"` with an unexported $FORGE_ROOT that expands to '' → '/tools/preflight-gate.cjs' (Cannot find module). Root cause: the per-phase subagent prompt preamble said only 'Resolve FORGE_ROOT from .forge/config.json paths.forgeRoot' — no cwd anchor and no instruction to export $FORGE_ROOT, even though every subsequent command used $FORGE_ROOT as a shell variable. Replaced all ~23 preamble sites across wfl-run-task.js / wfl-run-sprint.js / wfl-fix-bug.js with a directive that (a) anchors the config to ./.forge/config.json in the current working directory ('never a parent directory'), (b) tells the agent to EXPORT FORGE_ROOT, and (c) STOPs if $FORGE_ROOT is empty or $FORGE_ROOT/tools is missing. Added a regression guard in workflows-js-drift.test.cjs. Prompt-text only — no orchestration-logic change.",
127
+ "target": "workflows-js:wfl-run-task",
128
+ "regenerate": [
129
+ "workflows-js:wfl-run-task",
130
+ "workflows-js:wfl-run-sprint",
131
+ "workflows-js:wfl-fix-bug"
132
+ ],
133
+ "breaking": false,
134
+ "manual": [
135
+ "Run /forge:update, then /forge:rebuild workflows-js to refresh .claude/workflows/wfl-*.js."
136
+ ]
137
+ },
138
+ "1.2.1": {
139
+ "version": "1.2.2",
140
+ "date": "2026-06-02",
141
+ "notes": "Fix three orchestration-logic edge-case bugs in the packaged JS workflow drivers (found by an adversarial review of the v1.2.1 packaged workflows). (S1) wfl-run-sprint.js re-dispatch passed { taskId, resumeFrom } but wfl:run-task parses only the task id, so resumeFrom was silently dropped — removed the misleading arg; the retry is a clean re-dispatch that resumes from store state. (S2) wfl-run-sprint.js treated a skipped child as non-terminal, so a legitimately `blocked` task (waiting on a dependency) was re-dispatched and then force-escalated; a skipped child is now terminal-acceptable. (F1) wfl-fix-bug.js had no null guard on the finalize dispatch — a skipped/errored finalize fell through and the run was reported bugStatus:'fixed', escalated:false even though collate + the finalize gate never ran; it now escalates on a null finalize while preserving bugStatus:'fixed'. Added text-contract regression guards in workflows-js-drift.test.cjs. Deferred (tracked for a follow-up): revision-counter/eventId attribution (wfl-run-task), count-bucket taxonomy + full-parallel dependency ordering (wfl-run-sprint), and two MINORs in wfl-fix-bug (phase('Pipeline') grouping, escalateBug bugId).",
142
+ "target": "workflows-js:wfl-run-sprint",
143
+ "regenerate": [
144
+ "workflows-js:wfl-run-sprint",
145
+ "workflows-js:wfl-fix-bug"
146
+ ],
147
+ "breaking": false,
148
+ "manual": [
149
+ "Run /forge:update, then /forge:rebuild workflows-js to refresh .claude/workflows/wfl-run-sprint.js and wfl-fix-bug.js."
150
+ ]
151
+ },
152
+ "1.2.0": {
153
+ "version": "1.2.1",
154
+ "date": "2026-06-02",
155
+ "notes": "Fix wfl-fix-bug.js invalid meta. The fix-bug JS driver declared its meta with `desc:` and `steps:` instead of `description:` and `phases:`, so the Workflow runtime rejected it ('meta.description must be a non-empty string') and the named-workflow registry silently skipped it — /forge:fix-bug (and any /<prefix>:fix-bug) could never launch wfl:fix-bug. This shipped latent since the driver was authored and was exposed by the v1.2.0 orchestration-prose retirement, which removed the fix_bug.md fallback. Renamed desc->description and steps->phases (adding the Resolve phase) to match wfl-run-task.js / wfl-run-sprint.js. Added a meta-contract regression guard (workflows-js-drift.test.cjs) that asserts every JS driver exposes name + non-empty description + phases.",
156
+ "target": "workflows-js:wfl-fix-bug",
157
+ "regenerate": [
158
+ "workflows-js:wfl-fix-bug"
159
+ ],
160
+ "breaking": false,
161
+ "manual": [
162
+ "Run /forge:update to receive the fix, then /forge:rebuild workflows-js to refresh .claude/workflows/wfl-fix-bug.js. /<prefix>:fix-bug will then launch wfl:fix-bug correctly."
163
+ ]
164
+ },
165
+ "1.1.2": {
166
+ "version": "1.2.0",
167
+ "date": "2026-06-02",
168
+ "notes": "Retire LLM orchestration prose. The deterministic JS drivers (.claude/workflows/wfl-run-task.js, wfl-run-sprint.js, wfl-fix-bug.js — category workflows-js) are now the only orchestration truth; /forge:run-task, /forge:run-sprint and /forge:fix-bug already dispatch to them via workflow(wfl:*). The prose orchestrators orchestrate_task.md, run_sprint.md and fix_bug.md are no longer built into the base-pack, no longer generated into .forge/workflows/, and no longer tested (the orchestrators-retired and orchestrator-base-pack-parity drift tests are removed; only the JS drivers are tested). meta-orchestrate.md and meta-fix-bug.md are kept in meta/ as reference specs only. build-base-pack and build-manifest drop the three workflow mappings; workflow-gen-plan.json goes 16->15; the rebuild orchestration-generation step and generate-orchestration.md rulebook are removed. The three retired prose files are added to /forge:update's delete-workflow scan so existing projects have the orphaned .forge/workflows/orchestrate_task.md, run_sprint.md and fix_bug.md removed (rebuild only regenerates and clears manifest entries; it does not delete files on disk).",
169
+ "target": "workflows-js:wfl-run-task",
170
+ "regenerate": [
171
+ "workflows",
172
+ "workflows-js"
173
+ ],
174
+ "breaking": false,
175
+ "manual": [
176
+ "Run /forge:update — it removes the retired orchestrate_task.md / run_sprint.md / fix_bug.md from .forge/workflows/ via its delete-workflow scan (prompts before deleting any you have hand-edited).",
177
+ "Orchestration now runs through .claude/workflows/wfl-*.js — no action needed for /forge:run-task, /forge:run-sprint, or /forge:fix-bug."
178
+ ]
179
+ },
180
+ "1.1.1": {
181
+ "version": "1.1.2",
182
+ "date": "2026-06-02",
183
+ "notes": "v1.1.2 — Fix collate.cjs resolveTaskDir: when a task store record's `path` field points at a file inside the task directory (e.g. .../FORGE-S22-T04/PLAN.md) rather than the directory itself, Case 1 returned basename('PLAN.md') instead of the task dir. Downstream, collate's existsSync(sprintDir/PLAN.md) check failed and the task's INDEX.md was silently never generated. Case 1 now verifies its candidate is a real directory on disk and otherwise falls through to the filesystem scan (which resolves the dir by taskId). Symptom: 18 task INDEX.md files across FORGE-S22/S23 were missing despite valid store records.",
184
+ "target": "tools:collate",
185
+ "regenerate": [
186
+ "tools:collate"
187
+ ],
188
+ "breaking": false,
189
+ "manual": [
190
+ "Run /forge:update to receive the fixed collate tool.",
191
+ "After update, run /forge:collate (or /forge:rebuild) to regenerate any task INDEX.md files that were skipped."
192
+ ]
193
+ },
194
+ "1.1.0": {
195
+ "version": "1.1.1",
196
+ "date": "2026-06-02",
197
+ "notes": "v1.1.1 — LOW-polish orchestration parity (FORGE-S28-T09). #19: emitSkip() agent helper emits a task-dispatch/action:skip event when the pre-task SKIP_STATUS guard fires, giving the event log a complete accounting of every task. #20: writeback step added to the hardcoded default pipeline prompt in wfl-run-task.js (orchestrate_task.md §3 full default: …approve → writeback → commit, writeback→update_implementation.md). #21: structural-limitation comment documents Progress-Monitor IPC as a host-layer concern (JS driver has no shell access, so the Pi/forge-cli TS layer must open the pipe). #22: BANNER_MAP constants added to both wfl-run-task.js and wfl-run-sprint.js; wfl-run-task phase-start log line now shows the persona label. #23: wfl-run-sprint.js adds an agent step to transition sprint status to 'active' before the wave loop begins, mirroring run_sprint.md Step 1. Also fixes pre-existing forge/package.json test regression (accidental 'dependencies' field removed; placeholder-coverage no-npm test passes).",
198
+ "target": "workflows-js:wfl-run-task",
199
+ "regenerate": [
200
+ "workflows-js:wfl-run-task",
201
+ "workflows-js:wfl-run-sprint"
202
+ ],
203
+ "breaking": false,
204
+ "manual": [
205
+ "Run /forge:update to receive the updated JS workflow orchestrators.",
206
+ "After update, run /forge:rebuild workflows-js to regenerate .claude/workflows/wfl-*.js in your project."
207
+ ]
208
+ },
209
+ "1.0.11": {
210
+ "version": "1.1.0",
211
+ "date": "2026-06-02",
212
+ "notes": "v1.1.0 — (1) New rebuild/update surface for the JS orchestration workflows: workflows-js is now a first-class /forge:rebuild category (verbatim copy of .claude/workflows/*.js from base-pack, no LLM/placeholder substitution) and a recognised /forge:update regenerate target; build-manifest.cjs declares a workflows-js namespace so /forge:health and check-structure cover .claude/workflows/*.js. Previously these files were materialised only at /forge:init and had no regeneration path. (2) Fix FORGE-BUG-041: wfl-run-task.js emitRetryEvent/mergeSidecar passed schema:{type:'string'} to agent(), an invalid StructuredOutput input_schema (Anthropic requires type:'object'); the subagent could never call StructuredOutput so the workflow threw after the nudge limit — every wfl:run-task task escalated immediately after its plan phase. Dropped the invalid schema option from both calls. With (1) in place, /forge:update now auto-delivers this fix via the workflows-js:wfl-run-task regenerate target.",
213
+ "target": "workflows-js:wfl-run-task",
214
+ "regenerate": [
215
+ "workflows-js:wfl-run-task"
216
+ ],
217
+ "breaking": false,
218
+ "manual": []
219
+ },
220
+ "1.0.10": {
221
+ "version": "1.0.11",
222
+ "date": "2026-05-31",
223
+ "notes": "v1.0.11 — Orchestration waste reduction (FORGE-S27 Track A, shipped tasks A1/A3/A4/NH1/NH2). New forge-preflight.cjs aggregates deterministic pre-dispatch glue into a single blob read, eliminating ~20 hand-run round-trips from the orchestrator preamble. New preflight-session.cjs SessionStart hook pre-warms the blob for run-task/fix-bug/run-sprint. banners.cjs gains --quiet flag; orchestrate_task loop uses it so verbose banner output does not accrete in the transcript. meta-orchestrate.md state-ledger compaction discipline: /compact retains the one-line [checkpoint] ledger and sheds raw tool output. meta-fix-bug.md: A1+A3 treatment ported (preflight cross-ref, --quiet flag, spurious cost bullet removed). token-forensics.cjs: message.id-dedup harness for correct through-model token accounting. A2 (context-pack/forge-compress port) remains escalated and is not included in this release.",
224
+ "target": "tools:forge-preflight",
225
+ "regenerate": [
226
+ "tools:forge-preflight",
227
+ "hooks:preflight-session",
228
+ "workflows:orchestrate_task",
229
+ "workflows:fix_bug",
230
+ "tools:banners",
231
+ "tools:token-forensics"
232
+ ],
233
+ "breaking": false,
234
+ "manual": [
235
+ "Run /forge:update to copy the updated tools and hooks into your project."
236
+ ]
237
+ },
2
238
  "1.0.9": {
3
239
  "version": "1.0.10",
4
240
  "date": "2026-05-31",
@@ -26,6 +26,7 @@ Assess the health and currency of the project's SDLC knowledge base.
26
26
  | **Concepts freshness** | `docs/concepts/*.md` pages older than `forge/meta/store-schema/` updates |
27
27
  | **Context pack freshness** | `source_hash` in `.forge/cache/context-pack.json` vs. current hash of `engineering/architecture/*.md` |
28
28
  | **Plugin integrity** | Plugin command and agent files modified since last release hash was recorded |
29
+ | **Vendored tools** | `.forge/tools/` present, file set matches structure-manifest, and version marker matches active plugin version |
29
30
 
30
31
  ## How to run
31
32
 
@@ -116,6 +117,32 @@ cd "$PROJECT_ROOT" && node "$FORGE_ROOT/tools/..."
116
117
  If the tool is absent (file not found), skip this check silently.
117
118
  Note: custom `paths.*` overrides in `.forge/config.json` are respected by
118
119
  check-structure.cjs. Projects using default paths will see no difference.
120
+ 8b. Check vendored tools integrity and staleness:
121
+ ```sh
122
+ node -e "
123
+ const { checkToolsVersion } = require('$FORGE_ROOT/tools/check-structure.cjs');
124
+ const result = checkToolsVersion('$PROJECT_ROOT');
125
+ console.log(JSON.stringify(result));
126
+ "
127
+ ```
128
+ Also read the structure-manifest to get the expected tools file count and count
129
+ how many are currently present in `.forge/tools/`:
130
+ ```sh
131
+ cd "$PROJECT_ROOT" && node "$FORGE_ROOT/tools/check-structure.cjs" --path "$PROJECT_ROOT"
132
+ ```
133
+ (The tools namespace output from the above `check-structure.cjs` call in step 8 already
134
+ covers file presence/completeness — use that result here for the tools namespace row.)
135
+
136
+ Based on the `checkToolsVersion` result and the tools namespace from step 8:
137
+ - If `.forge/tools/` is absent or the tools namespace shows missing files:
138
+ > × Vendored tools — missing or incomplete (N/M files present) — run `/forge:rebuild tools`
139
+ - If `.forge/tools/` is present and files are complete, but `stale=true`:
140
+ - If `reason='marker-absent'`:
141
+ > △ Vendored tools — stale (version marker absent; active: <activeVersion>) — run `/forge:rebuild tools`
142
+ - If `reason='version-mismatch'`:
143
+ > △ Vendored tools — stale (vendored: <vendoredVersion>, active: <activeVersion>) — run `/forge:rebuild tools`
144
+ - If present, complete, and `stale=false`:
145
+ > 〇 Vendored tools — <N>/<M> files present, version <vendoredVersion>
119
146
  9. Check skill gaps: run `node "$FORGE_ROOT/tools/list-skills.js"` to get the live
120
147
  installed skill list from `~/.claude/plugins/installed_plugins.json` (source of
121
148
  truth — not the config, which can be stale). Read `$FORGE_ROOT/meta/skill-recommendations.md`,
@@ -199,6 +226,7 @@ After step 16, emit a pass/fail summary grid. One row per check category; substi
199
226
  | Store integrity | 〇 |
200
227
  | Modified generated files | 〇 |
201
228
  | Generated file structure | 〇 |
229
+ | Vendored tools | 〇 |
202
230
  | Plugin integrity | 〇 |
203
231
  | Persona pack freshness | △ |
204
232
  | Context pack freshness | 〇 |
@@ -221,6 +249,7 @@ After the summary grid, emit a "Recommended Actions" section only if one or more
221
249
  | Store integrity errors | `/forge:repair` |
222
250
  | Modified generated files | `/forge:rebuild` |
223
251
  | Missing generated files | `/forge:update` |
252
+ | Vendored tools missing / stale | `/forge:rebuild tools` |
224
253
  | Plugin integrity modified | `/forge:update` |
225
254
  | Persona pack missing / stale | `/forge:rebuild` |
226
255
  | Context pack missing / stale | `/forge:rebuild` |
@@ -84,6 +84,12 @@ with a colon delimiter (both forms are equivalent).
84
84
  /forge:rebuild workflows plan_task # single workflow file only
85
85
  /forge:rebuild workflows:plan_task # same — colon form (from migration entries)
86
86
  /forge:rebuild workflows sprint_plan # single workflow file only
87
+ /forge:rebuild workflows-js # .claude/workflows/ JS orchestration workflows (verbatim copy)
88
+ /forge:rebuild workflows-js wfl-run-task # single JS workflow file only
89
+ /forge:rebuild workflows-js:wfl-run-task # same — colon form (from migration entries)
90
+ /forge:rebuild tools # .forge/tools/ verbatim re-copy from $FORGE_ROOT/tools/
91
+ /forge:rebuild tools store-cli # single tool file only (name with or without .cjs)
92
+ /forge:rebuild tools:store-cli # same — colon form (from migration entries)
87
93
  /forge:rebuild commands # .claude/commands/ slash command wrappers
88
94
  /forge:rebuild templates # document templates only
89
95
  /forge:rebuild templates PLAN_TEMPLATE # single template file only
@@ -311,14 +317,14 @@ write, record hash.
311
317
  --kb "$(node "$FORGE_ROOT/tools/manage-config.cjs" get paths.engineering 2>/dev/null || echo engineering)" \
312
318
  --out .forge/init-context.md --json-out .forge/init-context.json
313
319
  ```
314
- 2. Read `$FORGE_ROOT/init/workflow-gen-plan.json` (16-entry fan-out table).
320
+ 2. Read `$FORGE_ROOT/init/workflow-gen-plan.json` (15-entry fan-out table).
315
321
  Let `M_total` = the entry count.
316
322
 
317
323
  3. Render the workflows badge, then emit the count:
318
324
  ```sh
319
325
  node "$FORGE_ROOT/tools/banners.cjs" --badge ember
320
326
  ```
321
- Then emit: `Generating workflows (<N> atomic + orchestration, parallel)...`
327
+ Then emit: `Generating workflows (<N> atomic, parallel)...`
322
328
  4. Check each file for manual modifications before any clearing:
323
329
  ```sh
324
330
  node "$FORGE_ROOT/tools/generation-manifest.cjs" check .forge/workflows/{filename}.md
@@ -334,27 +340,143 @@ write, record hash.
334
340
  `$FORGE_ROOT/init/generation/generate-workflows.md` as the per-subagent rulebook
335
341
  (same fan-out pattern as `/forge:init` Phase 7d). Spawn one per entry.
336
342
  7. Collect results. Retry failures once in a single Agent call.
337
- 8. Spawn orchestration subagent:
338
- ```
339
- Read $FORGE_ROOT/init/generation/generate-orchestration.md and follow it.
340
- FORGE_ROOT: {FORGE_ROOT}
341
- Input: $FORGE_ROOT/meta/workflows/meta-orchestrate.md + .forge/workflows/
342
- Output: .forge/workflows/orchestrate_task.md and .forge/workflows/run_sprint.md
343
- ```
344
- 9. **Replay user enhancements** (forge#107 / Approach A):
343
+
344
+ > **LLM orchestration retired.** `orchestrate_task` / `run_sprint` / `fix_bug`
345
+ > are no longer generated. The deterministic JS drivers in
346
+ > `.claude/workflows/wfl-*.js` (category `workflows-js`) are the only
347
+ > orchestration truth; `/forge:run-task`, `/forge:run-sprint`, and
348
+ > `/forge:fix-bug` dispatch to them via `workflow(wfl:*)`. The prose specs
349
+ > `meta-orchestrate.md` / `meta-fix-bug.md` remain in `meta/` as reference
350
+ > docs only neither built into the base-pack nor regenerated here.
351
+
352
+ 8. **Replay user enhancements** (forge#107 / Approach A):
345
353
  ```sh
346
354
  node "$FORGE_ROOT/tools/manage-versions.cjs" replay --target workflows
347
355
  ```
348
356
  Walks snapshots; restores enhanced `workflows/<name>.md` files. Later
349
357
  snapshots win on collision.
350
- 10. For each written file: record hash `node "$FORGE_ROOT/tools/generation-manifest.cjs" record .forge/workflows/{filename}.md`
358
+ 9. For each written file: record hash `node "$FORGE_ROOT/tools/generation-manifest.cjs" record .forge/workflows/{filename}.md`
351
359
  (this runs AFTER replay so the recorded hash reflects the restored content).
352
- 11. Emit ` 〇 workflows — <N> files written`.
360
+ 10. Emit ` 〇 workflows — <N> files written`.
353
361
 
354
362
  **Do NOT touch:** `.claude/commands/`, `.forge/config.json`, or any knowledge base file.
355
363
 
356
364
  ---
357
365
 
366
+ ## Category: `workflows-js` — verbatim copy (full or single file)
367
+
368
+ Re-materialise the JS orchestration workflows in `.claude/workflows/` from the
369
+ plugin base-pack. Unlike the `workflows` category (LLM-generated `.forge/`
370
+ markdown with placeholder substitution and KB enrichment), the
371
+ `workflows-js` files are **deterministic verbatim copies** from
372
+ `$FORGE_ROOT/init/base-pack/workflows-js/` — no LLM, no placeholder
373
+ substitution, no enrichment. The output is byte-identical to the base-pack
374
+ source (enforced by `workflows-js-drift.test.cjs`), so this category mirrors
375
+ the `workflows:_fragments` copy pattern, not the generation pattern.
376
+
377
+ Render a badge, then proceed:
378
+
379
+ ```sh
380
+ node "$FORGE_ROOT/tools/banners.cjs" --badge ember
381
+ ```
382
+
383
+ **If a sub-target is provided** (e.g. `/forge:rebuild workflows-js wfl-run-task`
384
+ or the colon form `workflows-js:wfl-run-task`), copy only the single file. The
385
+ sub-target may be given with or without the `.js` extension; normalise to
386
+ `<sub-target>.js`.
387
+
388
+ 1. Verify `$FORGE_ROOT/init/base-pack/workflows-js/<sub-target>.js` exists. If
389
+ not, list the available files and exit cleanly.
390
+ 2. Ensure `.claude/workflows/` exists (create if absent).
391
+ 3. Copy verbatim (no substitution) to `.claude/workflows/<sub-target>.js`.
392
+ 4. Record a manifest hash:
393
+ ```sh
394
+ node "$FORGE_ROOT/tools/generation-manifest.cjs" record .claude/workflows/<sub-target>.js
395
+ ```
396
+ 5. Emit ` 〇 workflows-js:<sub-target> — copied`.
397
+
398
+ **If no sub-target** — full copy, directory fan-out:
399
+
400
+ 1. Enumerate all `.js` files in `$FORGE_ROOT/init/base-pack/workflows-js/`.
401
+ Let `N` = the count.
402
+ 2. Emit: `Copying workflows-js (<N> files)...`
403
+ 3. Ensure `.claude/workflows/` exists (create if absent).
404
+ 4. For each file, copy verbatim to `.claude/workflows/<filename>`, then record
405
+ a manifest hash:
406
+ ```sh
407
+ node "$FORGE_ROOT/tools/generation-manifest.cjs" record .claude/workflows/<filename>
408
+ ```
409
+ 5. Emit ` 〇 workflows-js — <N> files copied`.
410
+
411
+ > **Note:** Only the base-pack-sourced JS workflows (`wfl-*.js`) are written.
412
+ > Custom or project-specific files in `.claude/workflows/` are never
413
+ > overwritten or deleted. Verify with `ls .claude/workflows/`.
414
+
415
+ ---
416
+
417
+ ## Category: `tools` — verbatim copy (full or single file)
418
+
419
+ Re-materialise the vendored plugin tools in `.forge/tools/` from the installed
420
+ plugin. Unlike workflow and persona categories (LLM-generated with placeholder
421
+ substitution), tools files are **deterministic verbatim copies** from
422
+ `$FORGE_ROOT/tools/` — no LLM, no substitution, no enrichment. The output is
423
+ byte-identical to the plugin source.
424
+
425
+ **If a sub-target is provided** (e.g. `/forge:rebuild tools store-cli`
426
+ or the colon form `tools:store-cli`), copy only the single file. The sub-target
427
+ may be given with or without the `.cjs` extension; normalise to `<sub-target>.cjs`.
428
+ Sub-targets in the `lib/` namespace may be specified with the `lib/` prefix
429
+ (e.g. `tools:lib/schema-loader` or `tools:lib/schema-loader.cjs`).
430
+
431
+ **Single-file steps:**
432
+
433
+ 1. Resolve the source path: if the sub-target starts with `lib/`, look in
434
+ `$FORGE_ROOT/tools/lib/<name>.cjs`; otherwise look in `$FORGE_ROOT/tools/<name>.cjs`.
435
+ If the source does not exist, list the available files and exit cleanly.
436
+ 2. Ensure the target directory exists (`.forge/tools/` or `.forge/tools/lib/`).
437
+ 3. Copy verbatim to the resolved `.forge/tools/` path.
438
+ 4. Record a manifest hash:
439
+ ```sh
440
+ node "$FORGE_ROOT/tools/generation-manifest.cjs" record .forge/tools/<sub-target>.cjs
441
+ ```
442
+ 5. Emit ` 〇 tools:<sub-target> — copied`.
443
+
444
+ **If no sub-target** — full re-copy, directory fan-out:
445
+
446
+ 1. Enumerate all `*.cjs` **and `*.js`** files in `$FORGE_ROOT/tools/` (top-level
447
+ only, exclude `*.test.cjs`/`*.test.js`). Let `N_top` = the count.
448
+ Enumerate all `*.cjs` **and `*.js`** files in `$FORGE_ROOT/tools/lib/` (exclude
449
+ `*.test.cjs`/`*.test.js`). Let `N_lib` = the count.
450
+ Both extensions are required: e.g. `store-cli.cjs` loads `lib/validate.js` and
451
+ `collate.cjs` loads `lib/result.js`; a `.cjs`-only copy breaks them.
452
+ 2. Emit: `Copying tools (<N_top> tool files + <N_lib> lib files)...`
453
+ 3. Ensure `.forge/tools/` and `.forge/tools/lib/` exist (create if absent).
454
+ 4. For each top-level file, copy verbatim to `.forge/tools/<filename>`, then
455
+ record a manifest hash:
456
+ ```sh
457
+ node "$FORGE_ROOT/tools/generation-manifest.cjs" record .forge/tools/<filename>
458
+ ```
459
+ 5. For each lib file, copy verbatim to `.forge/tools/lib/<filename>`, then
460
+ record a manifest hash:
461
+ ```sh
462
+ node "$FORGE_ROOT/tools/generation-manifest.cjs" record .forge/tools/lib/<filename>
463
+ ```
464
+ 6. Write (or overwrite) the version marker so `/forge:health` can detect staleness:
465
+ ```sh
466
+ ACTIVE_VERSION=$(node -e "console.log(require('$FORGE_ROOT/.claude-plugin/plugin.json').version)")
467
+ node -e "
468
+ const fs = require('fs');
469
+ fs.writeFileSync('.forge/tools/.forge-tools-version', JSON.stringify({ version: '${ACTIVE_VERSION}' }) + '\n');
470
+ "
471
+ ```
472
+ 7. Emit ` 〇 tools — <N_top + N_lib> files copied`.
473
+
474
+ > **Note:** This is a full re-copy of the plugin tools at the installed
475
+ > `$FORGE_ROOT` version. Use `/forge:rebuild tools` after `/forge:update` to
476
+ > refresh `.forge/tools/` to the new plugin version.
477
+
478
+ ---
479
+
358
480
  ## Category: `commands` — full rebuild
359
481
 
360
482
  Re-generate `.claude/commands/` slash command wrappers from the current
@@ -549,7 +671,7 @@ are not yet represented in review checklist items.
549
671
 
550
672
  ## Default (no argument)
551
673
 
552
- Run all five categories respecting dependencies — with maximum parallelism:
674
+ Run all categories respecting dependencies — with maximum parallelism:
553
675
 
554
676
  1. **Build brief** (once, synchronous):
555
677
  ```sh
@@ -572,8 +694,14 @@ Run all five categories respecting dependencies — with maximum parallelism:
572
694
  Spawn orchestration and commands subagents in a **SINGLE Agent tool message**.
573
695
  Wait for both.
574
696
 
575
- This runs in 4 serial steps instead of 5 sequential category passes, with all
576
- fan-outs parallelised within each step.
697
+ 5. **workflows-js** (deterministic verbatim copy no LLM, independent):
698
+ Run the `workflows-js` category (full copy) as described above: copy every
699
+ `.js` file from `$FORGE_ROOT/init/base-pack/workflows-js/` into
700
+ `.claude/workflows/` and record manifest hashes. This step has no
701
+ dependencies and can run alongside step 4.
702
+
703
+ This runs in a handful of serial steps instead of sequential per-category
704
+ passes, with all fan-outs parallelised within each step.
577
705
 
578
706
  ## Flag: `--enrich`
579
707