@entelligentsia/forgecli 0.10.0 → 0.11.2

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 (188) hide show
  1. package/CHANGELOG.md +95 -0
  2. package/README.md +21 -3
  3. package/dist/CHANGELOG-forge-plugin.md +90 -0
  4. package/dist/bin/config.js +6 -0
  5. package/dist/bin/config.js.map +1 -1
  6. package/dist/extensions/forgecli/add-pipeline.d.ts +19 -0
  7. package/dist/extensions/forgecli/add-pipeline.js +143 -0
  8. package/dist/extensions/forgecli/add-pipeline.js.map +1 -0
  9. package/dist/extensions/forgecli/add-task.d.ts +20 -0
  10. package/dist/extensions/forgecli/add-task.js +154 -0
  11. package/dist/extensions/forgecli/add-task.js.map +1 -0
  12. package/dist/extensions/forgecli/calibrate.d.ts +61 -0
  13. package/dist/extensions/forgecli/calibrate.js +488 -0
  14. package/dist/extensions/forgecli/calibrate.js.map +1 -0
  15. package/dist/extensions/forgecli/fix-bug.d.ts +9 -1
  16. package/dist/extensions/forgecli/fix-bug.js +155 -45
  17. package/dist/extensions/forgecli/fix-bug.js.map +1 -1
  18. package/dist/extensions/forgecli/forge-commands.js +15 -22
  19. package/dist/extensions/forgecli/forge-commands.js.map +1 -1
  20. package/dist/extensions/forgecli/forge-subagent.d.ts +16 -1
  21. package/dist/extensions/forgecli/forge-subagent.js +45 -8
  22. package/dist/extensions/forgecli/forge-subagent.js.map +1 -1
  23. package/dist/extensions/forgecli/forge-update-command.d.ts +9 -0
  24. package/dist/extensions/forgecli/forge-update-command.js +106 -7
  25. package/dist/extensions/forgecli/forge-update-command.js.map +1 -1
  26. package/dist/extensions/forgecli/health-check.d.ts +22 -1
  27. package/dist/extensions/forgecli/health-check.js +177 -4
  28. package/dist/extensions/forgecli/health-check.js.map +1 -1
  29. package/dist/extensions/forgecli/hook-dispatcher.d.ts +25 -1
  30. package/dist/extensions/forgecli/hook-dispatcher.js +104 -9
  31. package/dist/extensions/forgecli/hook-dispatcher.js.map +1 -1
  32. package/dist/extensions/forgecli/hooks/check-update.d.ts +81 -0
  33. package/dist/extensions/forgecli/hooks/check-update.js +308 -0
  34. package/dist/extensions/forgecli/hooks/check-update.js.map +1 -0
  35. package/dist/extensions/forgecli/hooks/forge-permissions.d.ts +32 -0
  36. package/dist/extensions/forgecli/hooks/forge-permissions.js +119 -0
  37. package/dist/extensions/forgecli/hooks/forge-permissions.js.map +1 -0
  38. package/dist/extensions/forgecli/hooks/triage-error.d.ts +23 -0
  39. package/dist/extensions/forgecli/hooks/triage-error.js +62 -0
  40. package/dist/extensions/forgecli/hooks/triage-error.js.map +1 -0
  41. package/dist/extensions/forgecli/hooks/write-guard.d.ts +28 -0
  42. package/dist/extensions/forgecli/hooks/write-guard.js +225 -0
  43. package/dist/extensions/forgecli/hooks/write-guard.js.map +1 -0
  44. package/dist/extensions/forgecli/index.js +60 -0
  45. package/dist/extensions/forgecli/index.js.map +1 -1
  46. package/dist/extensions/forgecli/init-context.d.ts +1 -1
  47. package/dist/extensions/forgecli/init-context.js +21 -6
  48. package/dist/extensions/forgecli/init-context.js.map +1 -1
  49. package/dist/extensions/forgecli/materialize.d.ts +16 -0
  50. package/dist/extensions/forgecli/materialize.js +195 -0
  51. package/dist/extensions/forgecli/materialize.js.map +1 -0
  52. package/dist/extensions/forgecli/migrate.d.ts +19 -0
  53. package/dist/extensions/forgecli/migrate.js +258 -0
  54. package/dist/extensions/forgecli/migrate.js.map +1 -0
  55. package/dist/extensions/forgecli/migration-engine.d.ts +111 -0
  56. package/dist/extensions/forgecli/migration-engine.js +533 -0
  57. package/dist/extensions/forgecli/migration-engine.js.map +1 -0
  58. package/dist/extensions/forgecli/quiz-agent.d.ts +17 -0
  59. package/dist/extensions/forgecli/quiz-agent.js +98 -0
  60. package/dist/extensions/forgecli/quiz-agent.js.map +1 -0
  61. package/dist/extensions/forgecli/remove-command.d.ts +17 -0
  62. package/dist/extensions/forgecli/remove-command.js +124 -0
  63. package/dist/extensions/forgecli/remove-command.js.map +1 -0
  64. package/dist/extensions/forgecli/report-bug.d.ts +25 -0
  65. package/dist/extensions/forgecli/report-bug.js +159 -0
  66. package/dist/extensions/forgecli/report-bug.js.map +1 -0
  67. package/dist/extensions/forgecli/retrospective.d.ts +19 -0
  68. package/dist/extensions/forgecli/retrospective.js +156 -0
  69. package/dist/extensions/forgecli/retrospective.js.map +1 -0
  70. package/dist/extensions/forgecli/run-sprint.js +36 -3
  71. package/dist/extensions/forgecli/run-sprint.js.map +1 -1
  72. package/dist/extensions/forgecli/run-task.d.ts +9 -1
  73. package/dist/extensions/forgecli/run-task.js +66 -13
  74. package/dist/extensions/forgecli/run-task.js.map +1 -1
  75. package/dist/extensions/forgecli/session-registry.d.ts +40 -2
  76. package/dist/extensions/forgecli/session-registry.js +71 -1
  77. package/dist/extensions/forgecli/session-registry.js.map +1 -1
  78. package/dist/extensions/forgecli/status-command.d.ts +19 -0
  79. package/dist/extensions/forgecli/status-command.js +140 -0
  80. package/dist/extensions/forgecli/status-command.js.map +1 -0
  81. package/dist/extensions/forgecli/store-query.d.ts +22 -0
  82. package/dist/extensions/forgecli/store-query.js +107 -0
  83. package/dist/extensions/forgecli/store-query.js.map +1 -0
  84. package/dist/extensions/forgecli/store-repair.d.ts +17 -0
  85. package/dist/extensions/forgecli/store-repair.js +123 -0
  86. package/dist/extensions/forgecli/store-repair.js.map +1 -0
  87. package/dist/extensions/forgecli/test-orchestrate.js +1 -0
  88. package/dist/extensions/forgecli/test-orchestrate.js.map +1 -1
  89. package/dist/extensions/forgecli/thread-switcher.js +286 -41
  90. package/dist/extensions/forgecli/thread-switcher.js.map +1 -1
  91. package/dist/extensions/forgecli/transition-guard.js +7 -2
  92. package/dist/extensions/forgecli/transition-guard.js.map +1 -1
  93. package/dist/extensions/forgecli/update-tools.d.ts +23 -0
  94. package/dist/extensions/forgecli/update-tools.js +136 -0
  95. package/dist/extensions/forgecli/update-tools.js.map +1 -0
  96. package/dist/extensions/forgecli/viewport-events.js +10 -0
  97. package/dist/extensions/forgecli/viewport-events.js.map +1 -1
  98. package/dist/extensions/forgecli/viewport-renderer.d.ts +18 -0
  99. package/dist/extensions/forgecli/viewport-renderer.js +27 -0
  100. package/dist/extensions/forgecli/viewport-renderer.js.map +1 -1
  101. package/dist/extensions/forgecli/viewport-theme.js +4 -0
  102. package/dist/extensions/forgecli/viewport-theme.js.map +1 -1
  103. package/dist/extensions/forgecli/whats-new-widget.d.ts +13 -8
  104. package/dist/extensions/forgecli/whats-new-widget.js +111 -42
  105. package/dist/extensions/forgecli/whats-new-widget.js.map +1 -1
  106. package/dist/forge-payload/.base-pack/workflows/architect_approve.md +29 -3
  107. package/dist/forge-payload/.base-pack/workflows/commit_task.md +15 -8
  108. package/dist/forge-payload/.base-pack/workflows/fix_bug.md +327 -185
  109. package/dist/forge-payload/.base-pack/workflows/implement_plan.md +18 -10
  110. package/dist/forge-payload/.base-pack/workflows/plan_task.md +15 -9
  111. package/dist/forge-payload/.base-pack/workflows/review_code.md +14 -6
  112. package/dist/forge-payload/.base-pack/workflows/review_plan.md +18 -10
  113. package/dist/forge-payload/.claude-plugin/plugin.json +1 -1
  114. package/dist/forge-payload/.schemas/bug.schema.json +3 -2
  115. package/dist/forge-payload/.schemas/config.schema.json +83 -0
  116. package/dist/forge-payload/.schemas/migrations.json +2049 -0
  117. package/dist/forge-payload/commands/regenerate.md +17 -1
  118. package/dist/forge-payload/meta/personas/README.md +16 -0
  119. package/dist/forge-payload/meta/personas/meta-architect.md +70 -0
  120. package/dist/forge-payload/meta/personas/meta-bug-fixer.md +73 -0
  121. package/dist/forge-payload/meta/personas/meta-collator.md +72 -0
  122. package/dist/forge-payload/meta/personas/meta-engineer.md +70 -0
  123. package/dist/forge-payload/meta/personas/meta-orchestrator.md +71 -0
  124. package/dist/forge-payload/meta/personas/meta-product-manager.md +82 -0
  125. package/dist/forge-payload/meta/personas/meta-qa-engineer.md +91 -0
  126. package/dist/forge-payload/meta/personas/meta-supervisor.md +92 -0
  127. package/dist/forge-payload/meta/skill-recommendations.md +154 -0
  128. package/dist/forge-payload/meta/skills/meta-architect-skills.md +43 -0
  129. package/dist/forge-payload/meta/skills/meta-bug-fixer-skills.md +43 -0
  130. package/dist/forge-payload/meta/skills/meta-collator-skills.md +41 -0
  131. package/dist/forge-payload/meta/skills/meta-engineer-skills.md +43 -0
  132. package/dist/forge-payload/meta/skills/meta-generic-skills.md +58 -0
  133. package/dist/forge-payload/meta/skills/meta-qa-engineer-skills.md +46 -0
  134. package/dist/forge-payload/meta/skills/meta-supervisor-skills.md +43 -0
  135. package/dist/forge-payload/meta/store-schema/bug.schema.md +71 -0
  136. package/dist/forge-payload/meta/store-schema/event.schema.md +76 -0
  137. package/dist/forge-payload/meta/store-schema/feature.schema.md +65 -0
  138. package/dist/forge-payload/meta/store-schema/sprint.schema.md +64 -0
  139. package/dist/forge-payload/meta/store-schema/task.schema.md +78 -0
  140. package/dist/forge-payload/meta/templates/meta-code-review.md +26 -0
  141. package/dist/forge-payload/meta/templates/meta-plan-review.md +28 -0
  142. package/dist/forge-payload/meta/templates/meta-plan.md +28 -0
  143. package/dist/forge-payload/meta/templates/meta-progress.md +25 -0
  144. package/dist/forge-payload/meta/templates/meta-retrospective.md +28 -0
  145. package/dist/forge-payload/meta/templates/meta-sprint-manifest.md +26 -0
  146. package/dist/forge-payload/meta/templates/meta-sprint-requirements.md +91 -0
  147. package/dist/forge-payload/meta/templates/meta-task-prompt.md +26 -0
  148. package/dist/forge-payload/meta/tool-specs/collate.spec.md +88 -0
  149. package/dist/forge-payload/meta/tool-specs/generation-manifest.spec.md +139 -0
  150. package/dist/forge-payload/meta/tool-specs/manage-config.spec.md +143 -0
  151. package/dist/forge-payload/meta/tool-specs/seed-store.spec.md +91 -0
  152. package/dist/forge-payload/meta/tool-specs/store-cli.spec.md +328 -0
  153. package/dist/forge-payload/meta/tool-specs/validate-store.spec.md +191 -0
  154. package/dist/forge-payload/meta/workflows/_fragments/context-injection.md +75 -0
  155. package/dist/forge-payload/meta/workflows/_fragments/event-emission-schema.md +73 -0
  156. package/dist/forge-payload/meta/workflows/_fragments/finalize.md +13 -0
  157. package/dist/forge-payload/meta/workflows/_fragments/friction-emit.md +73 -0
  158. package/dist/forge-payload/meta/workflows/_fragments/progress-reporting.md +38 -0
  159. package/dist/forge-payload/meta/workflows/_fragments/store-cli-verbs.md +39 -0
  160. package/dist/forge-payload/meta/workflows/meta-approve.md +119 -0
  161. package/dist/forge-payload/meta/workflows/meta-collate.md +89 -0
  162. package/dist/forge-payload/meta/workflows/meta-commit.md +93 -0
  163. package/dist/forge-payload/meta/workflows/meta-enhance.md +286 -0
  164. package/dist/forge-payload/meta/workflows/meta-fix-bug.md +501 -0
  165. package/dist/forge-payload/meta/workflows/meta-implement.md +132 -0
  166. package/dist/forge-payload/meta/workflows/meta-migrate.md +455 -0
  167. package/dist/forge-payload/meta/workflows/meta-orchestrate.md +993 -0
  168. package/dist/forge-payload/meta/workflows/meta-plan-task.md +133 -0
  169. package/dist/forge-payload/meta/workflows/meta-quiz-agent.md +135 -0
  170. package/dist/forge-payload/meta/workflows/meta-retrospective.md +65 -0
  171. package/dist/forge-payload/meta/workflows/meta-review-implementation.md +119 -0
  172. package/dist/forge-payload/meta/workflows/meta-review-plan.md +108 -0
  173. package/dist/forge-payload/meta/workflows/meta-review-sprint-completion.md +65 -0
  174. package/dist/forge-payload/meta/workflows/meta-sprint-intake.md +76 -0
  175. package/dist/forge-payload/meta/workflows/meta-sprint-plan.md +147 -0
  176. package/dist/forge-payload/meta/workflows/meta-update-implementation.md +76 -0
  177. package/dist/forge-payload/meta/workflows/meta-update-plan.md +76 -0
  178. package/dist/forge-payload/meta/workflows/meta-validate.md +111 -0
  179. package/dist/forge-payload/tools/check-structure.cjs +344 -0
  180. package/dist/forge-payload/tools/collate.cjs +34 -9
  181. package/dist/forge-payload/tools/list-skills.js +76 -0
  182. package/dist/forge-payload/tools/parse-gates.cjs +8 -2
  183. package/dist/forge-payload/tools/store-cli.cjs +56 -11
  184. package/dist/forge-payload/tools/store.cjs +61 -0
  185. package/dist/forge-payload/tools/substitute-placeholders.cjs +60 -8
  186. package/dist/forge-payload/tools/validate-store.cjs +6 -2
  187. package/dist/forge-payload/tools/verify-integrity.cjs +86 -0
  188. package/package.json +2 -2
@@ -0,0 +1,65 @@
1
+ # Store Schema: Feature
2
+
3
+ ## File Location
4
+
5
+ `.forge/store/features/{FEATURE_ID}.json`
6
+
7
+ ## Fields
8
+
9
+ | Field | Type | Required | Description |
10
+ |-------|------|----------|-------------|
11
+ | `id` | string | yes | Format: `FEAT-NNN` |
12
+ | `title` | string | yes | Feature title |
13
+ | `description` | string | no | Feature description |
14
+ | `status` | enum | yes | See status values below |
15
+ | `requirements` | string[] | no | Plain-text requirement lines |
16
+ | `sprints` | string[] | no | Array of sprint IDs (back-refs) |
17
+ | `tasks` | string[] | no | Array of task IDs (back-refs) |
18
+ | `created_at` | string | yes | ISO date-time string |
19
+ | `updated_at` | string | no | ISO date-time string |
20
+
21
+ ## Relationship Notes
22
+
23
+ - The fields `description`, `requirements`, `sprints`, `tasks`, and `updated_at` are **optional**.
24
+ - The `id`, `title`, `status`, and `created_at` fields are **required**.
25
+ - `feature_id` on sprint and task manifests is nullable for backwards compatibility.
26
+
27
+ ## Status Values
28
+
29
+ ```mermaid
30
+ stateDiagram-v2
31
+ [*] --> draft
32
+ draft --> active
33
+ active --> shipped
34
+ active --> retired
35
+ shipped --> retired
36
+ ```
37
+
38
+ ## JSON Schema
39
+
40
+ This block is the canonical machine-readable definition embedded in `validate-store.cjs`.
41
+
42
+ ```json
43
+ {
44
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
45
+ "$id": "forge/feature.schema.json",
46
+ "title": "Feature",
47
+ "type": "object",
48
+ "required": ["id", "title", "status", "created_at"],
49
+ "properties": {
50
+ "id": { "type": "string" },
51
+ "title": { "type": "string" },
52
+ "description": { "type": "string" },
53
+ "status": {
54
+ "type": "string",
55
+ "enum": ["draft", "active", "shipped", "retired"]
56
+ },
57
+ "requirements": { "type": "array", "items": { "type": "string" } },
58
+ "sprints": { "type": "array", "items": { "type": "string" } },
59
+ "tasks": { "type": "array", "items": { "type": "string" } },
60
+ "created_at": { "type": "string", "format": "date-time" },
61
+ "updated_at": { "type": "string", "format": "date-time" }
62
+ },
63
+ "additionalProperties": false
64
+ }
65
+ ```
@@ -0,0 +1,64 @@
1
+ # Store Schema: Sprint
2
+
3
+ ## File Location
4
+
5
+ `.forge/store/sprints/{SPRINT_ID}.json`
6
+
7
+ ## Fields
8
+
9
+ | Field | Type | Required | Description |
10
+ |-------|------|----------|-------------|
11
+ | `sprintId` | string | yes | e.g. `S01` |
12
+ | `title` | string | yes | Sprint title |
13
+ | `description` | string | no | Sprint goals (prose) |
14
+ | `goal` | string | no | Sprint goal (single-sentence summary) |
15
+ | `status` | enum | yes | See status values below |
16
+ | `taskIds` | string[] | yes | Ordered list of task IDs in this sprint |
17
+ | `features` | string[] | no | Feature IDs this sprint contributes to |
18
+ | `feature_id` | string\|null | no | Primary feature linkage (nullable FK) |
19
+ | `dependencies` | object | no | Task dependency edges for wave computation |
20
+ | `executionMode` | enum | no | `sequential` / `wave-parallel` / `full-parallel` |
21
+ | `createdAt` | string | yes | ISO 8601 timestamp |
22
+ | `completedAt` | string | no | ISO 8601 timestamp |
23
+ | `path` | string | no | Relative path to sprint artifact directory |
24
+ | `humanEstimates` | object | no | `{ total: "Xh", breakdown: { taskId: "Yh" } }` |
25
+
26
+ ## Status Values
27
+
28
+ `planning` → `active` → `completed` → `retrospective-done`
29
+
30
+ Failed states: `blocked`, `partially-completed`, `abandoned`
31
+
32
+ ## JSON Schema
33
+
34
+ This block is the canonical machine-readable definition embedded in `validate-store.cjs`.
35
+
36
+ ```json
37
+ {
38
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
39
+ "$id": "forge/sprint.schema.json",
40
+ "title": "Sprint",
41
+ "type": "object",
42
+ "required": ["sprintId", "title", "status", "taskIds", "createdAt"],
43
+ "properties": {
44
+ "sprintId": { "type": "string" },
45
+ "title": { "type": "string" },
46
+ "description": { "type": "string" },
47
+ "status": {
48
+ "type": "string",
49
+ "enum": ["planning", "active", "completed", "retrospective-done", "blocked", "partially-completed", "abandoned"]
50
+ },
51
+ "goal": { "type": "string" },
52
+ "taskIds": { "type": "array", "items": { "type": "string" } },
53
+ "features": { "type": "array", "items": { "type": "string" } },
54
+ "feature_id": { "type": ["string", "null"] },
55
+ "dependencies": { "type": "object" },
56
+ "executionMode": { "type": "string", "enum": ["sequential", "wave-parallel", "full-parallel"] },
57
+ "createdAt": { "type": "string", "format": "date-time" },
58
+ "completedAt": { "type": "string", "format": "date-time" },
59
+ "path": { "type": "string" },
60
+ "humanEstimates": { "type": "object" }
61
+ },
62
+ "additionalProperties": false
63
+ }
64
+ ```
@@ -0,0 +1,78 @@
1
+ # Store Schema: Task
2
+
3
+ ## File Location
4
+
5
+ `.forge/store/tasks/{TASK_ID}.json`
6
+
7
+ ## Fields
8
+
9
+ | Field | Type | Required | Description |
10
+ |-------|------|----------|-------------|
11
+ | `taskId` | string | yes | e.g. `ACME-S01-T01` |
12
+ | `feature_id` | string\|null | no | Primary feature linkage (nullable FK) |
13
+ | `sprintId` | string | yes | e.g. `S01` |
14
+ | `title` | string | yes | Task title |
15
+ | `description` | string | no | Detailed description |
16
+ | `status` | enum | yes | See status values below |
17
+ | `path` | string | yes | Relative path to task artifact directory |
18
+ | `estimate` | enum | no | `S` / `M` / `L` / `XL` |
19
+ | `dependencies` | string[] | no | Task IDs this task depends on |
20
+ | `knowledgeUpdates` | object[] | no | Files updated during writeback |
21
+ | `planIterations` | integer | no | Number of plan review loops |
22
+ | `codeReviewIterations` | integer | no | Number of code review loops |
23
+ | `assignedModel` | string | no | Model used for implementation |
24
+ | `pipeline` | string | no | Named pipeline to use instead of `default`. Must match a key in `config.pipelines`. When absent, the orchestrator uses the `default` pipeline. |
25
+
26
+ ## Status Values
27
+
28
+ `draft` → `planned` → `plan-approved` → `implementing` → `implemented` → `review-approved` → `approved` → `committed`
29
+
30
+ Failed states: `plan-revision-required`, `code-revision-required`, `blocked`, `escalated`, `abandoned`
31
+
32
+ ## Knowledge Updates Schema
33
+
34
+ ```json
35
+ {
36
+ "file": "architecture/stack.md",
37
+ "section": "Celery Patterns",
38
+ "type": "addition | correction | removal"
39
+ }
40
+ ```
41
+
42
+ ## JSON Schema
43
+
44
+ This block is the canonical machine-readable definition embedded in `validate-store.cjs`.
45
+
46
+ ```json
47
+ {
48
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
49
+ "$id": "forge/task.schema.json",
50
+ "title": "Task",
51
+ "type": "object",
52
+ "required": ["taskId", "sprintId", "title", "status", "path"],
53
+ "properties": {
54
+ "taskId": { "type": "string" },
55
+ "feature_id": { "type": ["string", "null"] },
56
+ "sprintId": { "type": "string" },
57
+ "title": { "type": "string" },
58
+ "description": { "type": "string" },
59
+ "status": {
60
+ "type": "string",
61
+ "enum": [
62
+ "draft", "planned", "plan-approved", "implementing",
63
+ "implemented", "review-approved", "approved", "committed",
64
+ "plan-revision-required", "code-revision-required", "blocked", "escalated", "abandoned"
65
+ ]
66
+ },
67
+ "path": { "type": "string" },
68
+ "estimate": { "type": "string", "enum": ["S", "M", "L", "XL"] },
69
+ "dependencies": { "type": "array", "items": { "type": "string" } },
70
+ "knowledgeUpdates": { "type": "array" },
71
+ "planIterations": { "type": "integer", "minimum": 0 },
72
+ "codeReviewIterations": { "type": "integer", "minimum": 0 },
73
+ "assignedModel": { "type": "string" },
74
+ "pipeline": { "type": "string" }
75
+ },
76
+ "additionalProperties": false
77
+ }
78
+ ```
@@ -0,0 +1,26 @@
1
+ # Meta-Template: Code Review
2
+
3
+ ## Purpose
4
+
5
+ Defines the structure of CODE_REVIEW.md — the Supervisor's verdict on
6
+ the implementation.
7
+
8
+ ## Sections
9
+
10
+ ### Required
11
+ - **Verdict** — `Approved` / `Approved with supervisor corrections` / `Revision Required`
12
+ - **Review Summary** — overall assessment
13
+ - **Checklist Results** — stack-checklist.md items checked, with pass/fail
14
+ - **Issues Found** — numbered list with severity, file:line, description, fix suggestion
15
+
16
+ ### If Revision Required
17
+ - **Required Changes** — numbered, actionable items
18
+ - **Priority** — which items block approval
19
+
20
+ ### If Approved
21
+ - **Advisory Notes** — non-blocking observations for future consideration
22
+
23
+ ## Generation Instructions
24
+ - Load the project's stack-checklist.md as the review criteria source
25
+ - Include framework-specific review categories
26
+ - Reference the project's auth pattern in the security section
@@ -0,0 +1,28 @@
1
+ # Meta-Template: Plan Review
2
+
3
+ ## Purpose
4
+
5
+ Defines the structure of PLAN_REVIEW.md — the Supervisor's verdict on
6
+ the implementation plan.
7
+
8
+ ## Sections
9
+
10
+ ### Required
11
+ - **Verdict** — `Approved` / `Revision Required`
12
+ - **Review Summary** — overall assessment of the plan
13
+ - **Feasibility** — is the approach realistic and scoped correctly?
14
+ - **Security** — are auth and validation addressed?
15
+ - **Architecture Alignment** — does it follow established patterns?
16
+ - **Testing Strategy** — is the planned coverage adequate?
17
+
18
+ ### If Revision Required
19
+ - **Required Changes** — numbered, actionable items
20
+ - **Priority** — which items block approval
21
+
22
+ ### If Approved
23
+ - **Advisory Notes** — suggestions for implementation (non-blocking)
24
+
25
+ ## Generation Instructions
26
+ - Reference the project's architecture sub-docs for alignment checks
27
+ - Include stack-specific security considerations
28
+ - Reference the project's test expectations
@@ -0,0 +1,28 @@
1
+ # Meta-Template: Implementation Plan
2
+
3
+ ## Purpose
4
+
5
+ Defines the structure of PLAN.md — the Engineer's technical approach
6
+ document, reviewed by the Supervisor before implementation begins.
7
+
8
+ ## Sections
9
+
10
+ ### Required
11
+ - **Objective** — what this plan achieves
12
+ - **Approach** — high-level strategy
13
+ - **Files to Modify** — list of files with rationale
14
+ - **Testing Strategy** — what tests to write/modify
15
+ - **Acceptance Criteria** — copied from task prompt, mapped to implementation steps
16
+ - **Operational Impact** — deployment, migrations, monitoring
17
+
18
+ ### Stack-Specific (added based on detection)
19
+ - **Data Model** subsections per framework (Django Models, Prisma Schema, etc.)
20
+ - **API Layer** subsections (DRF Serializers/Views, Express Routes, etc.)
21
+ - **Frontend** subsections (React Components, Vue Components, etc.)
22
+ - **Task Queue** subsections (Celery Tasks, Sidekiq Jobs, etc.)
23
+ - **Database Migrations** with framework-specific verification command
24
+
25
+ ## Generation Instructions
26
+ - Add framework-specific subsections based on detected stack
27
+ - Test evidence section should expect output format of project's test runner
28
+ - Include the project's migration check command if applicable
@@ -0,0 +1,25 @@
1
+ # Meta-Template: Progress Report
2
+
3
+ ## Purpose
4
+
5
+ Defines the structure of PROGRESS.md — the Engineer's completion report
6
+ after implementation, reviewed by the Supervisor.
7
+
8
+ ## Sections
9
+
10
+ ### Required
11
+ - **Summary** — what was done
12
+ - **Testing Results** — copy of test output (must include actual output)
13
+ - **Files Changed** — manifest with brief description per file
14
+ - **Acceptance Criteria Status** — each criterion marked pass/fail
15
+
16
+ ### Optional
17
+ - **Build Output** — if frontend/build step was involved
18
+ - **Migration Status** — if database changes were made
19
+ - **Knowledge Updates** — what was written back to the knowledge base
20
+ - **Notes** — anything the reviewer should know
21
+
22
+ ## Generation Instructions
23
+ - Test evidence section should expect the project's specific test runner output
24
+ - Include build verification if the project has a build step
25
+ - Include migration verification if the project has a migration system
@@ -0,0 +1,28 @@
1
+ # Meta-Template: Sprint Retrospective
2
+
3
+ ## Purpose
4
+
5
+ Defines the structure of the sprint retrospective document — metrics,
6
+ learnings, and improvements.
7
+
8
+ ## Sections
9
+
10
+ ### Required
11
+ - **Sprint Summary** — tasks completed, failed, carried over
12
+ - **Metrics** — plan iterations, code review iterations, time per task
13
+ - **What Went Well** — patterns that worked
14
+ - **What to Improve** — friction points, recurring issues
15
+ - **Knowledge Base Updates** — what was confirmed, added, or removed
16
+ - **Stack Checklist Changes** — items added or pruned
17
+
18
+ ### Optional
19
+ - **Workflow Improvements** — proposed edits to workflow files
20
+ - **Bug Pattern Analysis** — recurring root cause categories
21
+ - **Merge Conflicts** — if parallel mode, what conflicted and why
22
+ - **Recommendations for Next Sprint** — scope, focus, mode
23
+
24
+ ## Generation Instructions
25
+ - Reference the project's sprint artifact paths for data gathering
26
+ - Reference the project's domain docs and stack checklist
27
+ - Include the project's workflow file paths for proposed edits
28
+ - Reference the project's specific tech debt areas
@@ -0,0 +1,26 @@
1
+ # Meta-Template: Sprint Manifest
2
+
3
+ ## Purpose
4
+
5
+ Defines the structure of the sprint planning output — the task breakdown,
6
+ estimates, and dependency graph for a sprint.
7
+
8
+ ## Sections
9
+
10
+ ### Required
11
+ - **Sprint ID** — using project prefix format
12
+ - **Sprint Title** — descriptive name
13
+ - **Goals** — what this sprint achieves
14
+ - **Task Table** — ID, title, estimate, dependencies, status
15
+ - **Dependency Graph** — Mermaid diagram showing task relationships
16
+ - **Execution Mode** — sequential / wave-parallel / full-parallel
17
+
18
+ ### Optional
19
+ - **Risks** — known risks for this sprint
20
+ - **Carry-Over** — items from previous sprint
21
+ - **Technical Debt** — planned debt repayment
22
+
23
+ ## Generation Instructions
24
+ - Use the project's ID format (PREFIX-S{NN}-T{NN})
25
+ - Reference the project's entity model for task scoping
26
+ - Include the project's operational impact categories
@@ -0,0 +1,91 @@
1
+ # Meta-Template: Sprint Requirements
2
+
3
+ ## Purpose
4
+
5
+ Defines the structure of `SPRINT_REQUIREMENTS.md` — the output of the sprint
6
+ intake interview. This document is the primary input to sprint planning.
7
+ Every field marked Required must be completed before planning begins.
8
+
9
+ ## Sections
10
+
11
+ ### Required
12
+
13
+ - **Sprint ID** — next sequential ID using project prefix (e.g. ACME-S03)
14
+ - **Sprint Goals** — 1–3 concrete outcomes; each stated as an observable result
15
+ - **In Scope** — itemised list of must-have features, fixes, or changes for this sprint
16
+ - **Out of Scope** — explicit list of things not being done this sprint
17
+ - **Acceptance Criteria** — per in-scope item: specific, testable conditions for approval
18
+
19
+ ### Conditional (include when raised during intake)
20
+
21
+ - **Nice-to-Have** — items to attempt only if must-haves are complete
22
+ - **Constraints** — technical, data, dependency, or timeline constraints
23
+ - **Risks** — identified unknowns or blockers with a brief mitigation note
24
+ - **Carry-Over** — items from the previous sprint with a note on their status
25
+
26
+ ### Metadata
27
+
28
+ - **Captured** — date and sprint number
29
+ - **Source** — "sprint-intake interview" (confirms document came from intake, not assumptions)
30
+
31
+ ## Document Shape
32
+
33
+ ```markdown
34
+ # Sprint Requirements — {SPRINT_ID}
35
+
36
+ **Captured:** {DATE}
37
+ **Source:** sprint-intake interview
38
+
39
+ ## Goals
40
+
41
+ 1. {GOAL_1}
42
+ 2. {GOAL_2}
43
+
44
+ ## In Scope
45
+
46
+ ### {ITEM_TITLE} [must-have]
47
+ {One-line description}
48
+
49
+ **Acceptance criteria:**
50
+ - {CRITERION_1}
51
+ - {CRITERION_2}
52
+
53
+ ### {ITEM_TITLE} [must-have]
54
+ ...
55
+
56
+ ## Out of Scope
57
+
58
+ - {EXPLICIT_EXCLUSION_1}
59
+ - {EXPLICIT_EXCLUSION_2}
60
+
61
+ ## Nice-to-Have (attempt if time allows)
62
+
63
+ - {ITEM}
64
+
65
+ ## Constraints
66
+
67
+ - **Technical:** {CONSTRAINT}
68
+ - **Data:** {CONSTRAINT}
69
+ - **Dependencies:** {CONSTRAINT}
70
+ - **Timeline:** {CONSTRAINT}
71
+
72
+ ## Risks
73
+
74
+ | Risk | Likelihood | Mitigation |
75
+ |---|---|---|
76
+ | {RISK} | High / Medium / Low | {MITIGATION} |
77
+
78
+ ## Carry-Over from {PREV_SPRINT_ID}
79
+
80
+ | Item | Status | Notes |
81
+ |---|---|---|
82
+ | {ITEM} | Partial / Blocked | {NOTE} |
83
+ ```
84
+
85
+ ## Generation Instructions
86
+
87
+ - Replace `{SPRINT_ID}` with the project's next sequential sprint ID
88
+ - Acceptance criteria must be concrete and testable — reject vague criteria
89
+ (e.g. "works well") during generation
90
+ - Include only sections relevant to this sprint — omit empty conditional sections
91
+ - The Carry-Over section requires reading the previous sprint's store entry
@@ -0,0 +1,26 @@
1
+ # Meta-Template: Task Prompt
2
+
3
+ ## Purpose
4
+
5
+ Defines the structure of a task prompt — the input document that starts
6
+ every task through the pipeline.
7
+
8
+ ## Sections
9
+
10
+ ### Required
11
+ - **Title** — one-line summary
12
+ - **Objective** — what the task achieves (user-facing value)
13
+ - **Acceptance Criteria** — numbered, testable conditions for completion
14
+ - **Context** — relevant background, links to related tasks/bugs
15
+
16
+ ### Optional (added based on stack detection)
17
+ - **Entities** — which business entities are involved
18
+ - **API Changes** — new/modified endpoints (if API project)
19
+ - **UI Changes** — new/modified components (if frontend project)
20
+ - **Data Model Changes** — schema/migration needs
21
+ - **Operational Impact** — deployment, monitoring, rollback considerations
22
+
23
+ ## Generation Instructions
24
+ - Add entity references from the project's business domain
25
+ - Add stack-specific acceptance criteria patterns
26
+ - Include the project's ID format in the template header
@@ -0,0 +1,88 @@
1
+ # Tool Spec: collate
2
+
3
+ ## Purpose
4
+
5
+ Regenerate markdown views from the JSON store. Deterministic — no AI needed.
6
+
7
+ ## Inputs
8
+
9
+ - `.forge/config.json` — project prefix, paths, description
10
+ - `.forge/store/sprints/*.json`
11
+ - `.forge/store/tasks/*.json`
12
+ - `.forge/store/bugs/*.json`
13
+ - `.forge/store/features/*.json`
14
+ - `.forge/store/events/{SPRINT_ID}/*.json`
15
+ - Existing `engineering/MASTER_INDEX.md` (to preserve static sections)
16
+
17
+ ## Outputs
18
+
19
+ 1. `engineering/MASTER_INDEX.md`
20
+ 2. `engineering/sprints/{SPRINT_ID}/TIMESHEET.md` (per sprint)
21
+ 3. `engineering/bugs/TIMESHEET.md`
22
+ 4. `engineering/features/INDEX.md` (feature registry)
23
+ 5. `engineering/features/{FEATURE_ID}/INDEX.md` (per-feature page)
24
+ 6. `INDEX.md` (per sprint, task, bug directory)
25
+ 7. `.forge/store/COLLATION_STATE.json`
26
+
27
+ ## CLI Interface
28
+
29
+ ```
30
+ <tool> collate # all sprints
31
+ <tool> collate S01 # single sprint + master index
32
+ <tool> collate --dry-run # preview only
33
+ ```
34
+
35
+ Exit 0 on success, 1 on validation error.
36
+
37
+ ## Error Handling
38
+
39
+ - Wrap the entire entry point in a top-level exception handler.
40
+ - On unexpected errors (missing store files, bad JSON, unhandled exceptions),
41
+ print a clear one-line message to stderr and exit 1.
42
+ - Never let the tool crash with an unhandled exception or stack trace visible
43
+ to the caller — all errors are caught and reported cleanly.
44
+ - Python pattern:
45
+ ```python
46
+ if __name__ == "__main__":
47
+ try:
48
+ sys.exit(main())
49
+ except Exception as e:
50
+ print(f"Error: {e}", file=sys.stderr)
51
+ sys.exit(1)
52
+ ```
53
+ - JS/TS pattern:
54
+ ```js
55
+ process.on('uncaughtException', (e) => {
56
+ process.stderr.write(`Error: ${e.message}\n`);
57
+ process.exit(1);
58
+ });
59
+ ```
60
+
61
+ ## Algorithm
62
+
63
+ 1. Read `.forge/config.json` for prefix, paths, project description
64
+ 2. Validate store: tasks/ has JSON files, required fields present
65
+ 3. Load all sprint JSON, sort by sprint number ascending
66
+ 4. Load all task JSON, group by sprintId
67
+ 5. Load all bug JSON, sort by bug number
68
+ 6. Load all feature JSON from `.forge/store/features/`
69
+ 7. Read existing `engineering/MASTER_INDEX.md`, extract preserved sections by `##` heading
70
+ 8. Build Feature Registry section: link to `features/INDEX.md` (or placeholder if none)
71
+ 9. Build Sprint Registry: table with progress (completed/total)
72
+ 10. Build Task Registry: grouped by sprint (most recent first)
73
+ 11. Build Bug Registry: open first (asc), then resolved (desc)
74
+ 12. Write `engineering/MASTER_INDEX.md`: config header → preserved → generated
75
+ - Generated sections order: Feature Registry → Sprint Registry → Task Registry → Bug Registry
76
+ 13. Write `engineering/features/INDEX.md`: table of all features (ID, title, status, sprint count, task count)
77
+ 14. For each feature: write `engineering/features/{FEATURE_ID}/INDEX.md` with detail page
78
+ 15. For each sprint: events → estimates table + activity log → TIMESHEET.md
79
+ 16. For each directory: discover artifacts → INDEX.md navigation hub
80
+ 17. Write `.forge/store/COLLATION_STATE.json`
81
+
82
+ ## Formatting Rules
83
+
84
+ - Markdown pipe tables
85
+ - Timestamps truncated to minutes
86
+ - Duration: <60m → "Nm", >=60m → "Nh Mm"
87
+ - IDs hyperlink to INDEX.md via relative paths
88
+ - Generated files start with `<!-- GENERATED -->` comment