@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.
- package/CHANGELOG.md +49 -0
- package/dist/CHANGELOG-forge-plugin.md +150 -0
- package/dist/bin/forge.js +0 -0
- package/dist/extensions/forgecli/config-layer.d.ts +16 -0
- package/dist/extensions/forgecli/config-layer.js +5 -0
- package/dist/extensions/forgecli/config-layer.js.map +1 -1
- package/dist/extensions/forgecli/dashboard/component.d.ts +102 -0
- package/dist/extensions/forgecli/dashboard/component.js +882 -0
- package/dist/extensions/forgecli/dashboard/component.js.map +1 -0
- package/dist/extensions/forgecli/dashboard/register.d.ts +2 -0
- package/dist/extensions/forgecli/dashboard/register.js +45 -0
- package/dist/extensions/forgecli/dashboard/register.js.map +1 -0
- package/dist/extensions/forgecli/dashboard/view-model.d.ts +35 -0
- package/dist/extensions/forgecli/dashboard/view-model.js +54 -0
- package/dist/extensions/forgecli/dashboard/view-model.js.map +1 -0
- package/dist/extensions/forgecli/fix-bug.js +72 -7
- package/dist/extensions/forgecli/fix-bug.js.map +1 -1
- package/dist/extensions/forgecli/forge-cli-schema.json +4 -0
- package/dist/extensions/forgecli/forge-commands.js +1 -0
- package/dist/extensions/forgecli/forge-commands.js.map +1 -1
- package/dist/extensions/forgecli/forge-init/phase4-register.js +53 -0
- package/dist/extensions/forgecli/forge-init/phase4-register.js.map +1 -1
- package/dist/extensions/forgecli/forge-subagent.js +6 -4
- package/dist/extensions/forgecli/forge-subagent.js.map +1 -1
- package/dist/extensions/forgecli/index.js +5 -0
- package/dist/extensions/forgecli/index.js.map +1 -1
- package/dist/extensions/forgecli/lib/halt-advisor.d.ts +54 -0
- package/dist/extensions/forgecli/lib/halt-advisor.js +90 -0
- package/dist/extensions/forgecli/lib/halt-advisor.js.map +1 -0
- package/dist/extensions/forgecli/migration-engine.js +25 -12
- package/dist/extensions/forgecli/migration-engine.js.map +1 -1
- package/dist/extensions/forgecli/orchestrator-status-bar.d.ts +25 -0
- package/dist/extensions/forgecli/orchestrator-status-bar.js +183 -0
- package/dist/extensions/forgecli/orchestrator-status-bar.js.map +1 -0
- package/dist/extensions/forgecli/orchestrator-tree.d.ts +96 -0
- package/dist/extensions/forgecli/orchestrator-tree.js +390 -0
- package/dist/extensions/forgecli/orchestrator-tree.js.map +1 -0
- package/dist/extensions/forgecli/project-orientation.js +12 -8
- package/dist/extensions/forgecli/project-orientation.js.map +1 -1
- package/dist/extensions/forgecli/regenerate.d.ts +16 -0
- package/dist/extensions/forgecli/regenerate.js +110 -0
- package/dist/extensions/forgecli/regenerate.js.map +1 -1
- package/dist/extensions/forgecli/run-sprint.js +33 -3
- package/dist/extensions/forgecli/run-sprint.js.map +1 -1
- package/dist/extensions/forgecli/run-task.d.ts +32 -0
- package/dist/extensions/forgecli/run-task.js +185 -12
- package/dist/extensions/forgecli/run-task.js.map +1 -1
- package/dist/extensions/forgecli/thread-switcher.js +105 -764
- package/dist/extensions/forgecli/thread-switcher.js.map +1 -1
- package/dist/extensions/forgecli/viewport-events.js +32 -0
- package/dist/extensions/forgecli/viewport-events.js.map +1 -1
- package/dist/forge-payload/.base-pack/commands/fix-bug.md +1 -1
- package/dist/forge-payload/.base-pack/commands/run-sprint.md +1 -1
- package/dist/forge-payload/.base-pack/commands/run-task.md +1 -1
- package/dist/forge-payload/.base-pack/personas/architect.md +1 -1
- package/dist/forge-payload/.base-pack/personas/bug-fixer.md +1 -1
- package/dist/forge-payload/.base-pack/personas/collator.md +3 -3
- package/dist/forge-payload/.base-pack/personas/engineer.md +1 -1
- package/dist/forge-payload/.base-pack/personas/librarian.md +1 -1
- package/dist/forge-payload/.base-pack/personas/orchestrator.md +1 -1
- package/dist/forge-payload/.base-pack/personas/product-manager.md +1 -1
- package/dist/forge-payload/.base-pack/personas/qa-engineer.md +1 -1
- package/dist/forge-payload/.base-pack/personas/supervisor.md +1 -1
- package/dist/forge-payload/.base-pack/workflows/_fragments/event-emission-schema.md +1 -1
- package/dist/forge-payload/.base-pack/workflows/_fragments/friction-emit.md +1 -1
- package/dist/forge-payload/.base-pack/workflows/_fragments/iron-laws.md +1 -1
- package/dist/forge-payload/.base-pack/workflows/_fragments/progress-reporting.md +2 -2
- package/dist/forge-payload/.base-pack/workflows/_fragments/store-cli-verbs.md +11 -2
- package/dist/forge-payload/.base-pack/workflows/architect_approve.md +6 -7
- package/dist/forge-payload/.base-pack/workflows/architect_review_sprint_completion.md +2 -2
- package/dist/forge-payload/.base-pack/workflows/architect_sprint_intake.md +2 -2
- package/dist/forge-payload/.base-pack/workflows/architect_sprint_plan.md +5 -5
- package/dist/forge-payload/.base-pack/workflows/collator_agent.md +4 -6
- package/dist/forge-payload/.base-pack/workflows/commit_task.md +5 -6
- package/dist/forge-payload/.base-pack/workflows/enhance.md +5 -5
- package/dist/forge-payload/.base-pack/workflows/implement_plan.md +6 -7
- package/dist/forge-payload/.base-pack/workflows/migrate_structural.md +12 -13
- package/dist/forge-payload/.base-pack/workflows/plan_task.md +5 -6
- package/dist/forge-payload/.base-pack/workflows/review_code.md +8 -8
- package/dist/forge-payload/.base-pack/workflows/review_plan.md +8 -8
- package/dist/forge-payload/.base-pack/workflows/sprint_retrospective.md +3 -3
- package/dist/forge-payload/.base-pack/workflows/triage.md +12 -9
- package/dist/forge-payload/.base-pack/workflows/update_implementation.md +2 -2
- package/dist/forge-payload/.base-pack/workflows/update_plan.md +2 -2
- package/dist/forge-payload/.base-pack/workflows/validate_task.md +5 -6
- package/dist/forge-payload/.base-pack/workflows-js/wfl-fix-bug.js +490 -0
- package/dist/forge-payload/.base-pack/workflows-js/wfl-run-sprint.js +416 -0
- package/dist/forge-payload/.base-pack/workflows-js/wfl-run-task.js +608 -0
- package/dist/forge-payload/.claude-plugin/plugin.json +1 -1
- package/dist/forge-payload/.schemas/config.schema.json +2 -3
- package/dist/forge-payload/.schemas/enum-catalog.json +2 -2
- package/dist/forge-payload/.schemas/event.schema.json +16 -0
- package/dist/forge-payload/.schemas/migrations.json +236 -0
- package/dist/forge-payload/commands/health.md +29 -0
- package/dist/forge-payload/commands/rebuild.md +143 -15
- package/dist/forge-payload/commands/update.md +28 -27
- package/dist/forge-payload/hooks/preflight-session.cjs +99 -0
- package/dist/forge-payload/init/phases/phase-3-materialize.md +18 -5
- package/dist/forge-payload/integrity.json +7 -6
- package/dist/forge-payload/meta/fragments/tool-discipline.md +1 -1
- package/dist/forge-payload/meta/personas/meta-architect.md +1 -1
- package/dist/forge-payload/meta/personas/meta-bug-fixer.md +1 -1
- package/dist/forge-payload/meta/personas/meta-collator.md +7 -7
- package/dist/forge-payload/meta/personas/meta-engineer.md +1 -1
- package/dist/forge-payload/meta/personas/meta-orchestrator.md +1 -1
- package/dist/forge-payload/meta/personas/meta-supervisor.md +1 -1
- package/dist/forge-payload/meta/tool-specs/store-cli.spec.md +1 -1
- package/dist/forge-payload/meta/workflows/_fragments/event-emission-schema.md +1 -1
- package/dist/forge-payload/meta/workflows/_fragments/friction-emit.md +1 -1
- package/dist/forge-payload/meta/workflows/_fragments/iron-laws.md +1 -1
- package/dist/forge-payload/meta/workflows/_fragments/progress-reporting.md +2 -2
- package/dist/forge-payload/meta/workflows/_fragments/store-cli-verbs.md +11 -2
- package/dist/forge-payload/meta/workflows/meta-approve.md +6 -7
- package/dist/forge-payload/meta/workflows/meta-bug-triage.md +12 -9
- package/dist/forge-payload/meta/workflows/meta-collate.md +5 -7
- package/dist/forge-payload/meta/workflows/meta-commit.md +5 -6
- package/dist/forge-payload/meta/workflows/meta-enhance.md +5 -5
- package/dist/forge-payload/meta/workflows/meta-fix-bug.md +35 -11
- package/dist/forge-payload/meta/workflows/meta-implement.md +15 -7
- package/dist/forge-payload/meta/workflows/meta-migrate.md +13 -14
- package/dist/forge-payload/meta/workflows/meta-new-sprint.md +3 -3
- package/dist/forge-payload/meta/workflows/meta-orchestrate.md +138 -39
- package/dist/forge-payload/meta/workflows/meta-plan-sprint.md +6 -6
- package/dist/forge-payload/meta/workflows/meta-plan-task.md +12 -6
- package/dist/forge-payload/meta/workflows/meta-retro.md +4 -4
- package/dist/forge-payload/meta/workflows/meta-retrospective.md +4 -4
- package/dist/forge-payload/meta/workflows/meta-review-implementation.md +8 -8
- package/dist/forge-payload/meta/workflows/meta-review-plan.md +8 -8
- package/dist/forge-payload/meta/workflows/meta-review-sprint-completion.md +3 -3
- package/dist/forge-payload/meta/workflows/meta-sprint-intake.md +3 -3
- package/dist/forge-payload/meta/workflows/meta-sprint-plan.md +6 -6
- package/dist/forge-payload/meta/workflows/meta-update-implementation.md +2 -2
- package/dist/forge-payload/meta/workflows/meta-update-plan.md +2 -2
- package/dist/forge-payload/meta/workflows/meta-validate.md +5 -6
- package/dist/forge-payload/schemas/config.schema.json +2 -3
- package/dist/forge-payload/schemas/enum-catalog.json +2 -2
- package/dist/forge-payload/schemas/event.schema.json +16 -0
- package/dist/forge-payload/schemas/structure-manifest.json +75 -73
- package/dist/forge-payload/skills/refresh-kb-links/SKILL.md +14 -7
- package/dist/forge-payload/tools/banners.cjs +29 -10
- package/dist/forge-payload/tools/check-structure.cjs +88 -7
- package/dist/forge-payload/tools/collate.cjs +16 -2
- package/dist/forge-payload/tools/manage-config.cjs +5 -7
- package/dist/forge-payload/tools/parse-gates.cjs +73 -1
- package/dist/forge-payload/tools/postflight-gate.cjs +252 -0
- package/dist/forge-payload/tools/preflight-gate.cjs +47 -0
- package/dist/forge-payload/tools/substitute-placeholders.cjs +5 -4
- package/dist/forge-payload/tools/verify-phase.cjs +17 -0
- package/package.json +1 -1
- package/dist/bin/forgecli.d.ts +0 -2
- package/dist/bin/forgecli.js +0 -6
- package/dist/bin/forgecli.js.map +0 -1
- package/dist/extensions/forgecli/config-tui/index.d.ts +0 -5
- package/dist/extensions/forgecli/config-tui/index.js +0 -5
- package/dist/extensions/forgecli/config-tui/index.js.map +0 -1
- package/dist/extensions/forgecli/loaders/persona-skill-loader.d.ts +0 -45
- package/dist/extensions/forgecli/loaders/persona-skill-loader.js +0 -227
- package/dist/extensions/forgecli/loaders/persona-skill-loader.js.map +0 -1
- package/dist/extensions/forgecli/loaders/template-render.d.ts +0 -20
- package/dist/extensions/forgecli/loaders/template-render.js +0 -85
- package/dist/extensions/forgecli/loaders/template-render.js.map +0 -1
- package/dist/extensions/forgecli/loaders/workflow-loader.d.ts +0 -41
- package/dist/extensions/forgecli/loaders/workflow-loader.js +0 -164
- package/dist/extensions/forgecli/loaders/workflow-loader.js.map +0 -1
- package/dist/forge-payload/.base-pack/workflows/fix_bug.md +0 -446
- package/dist/forge-payload/.base-pack/workflows/orchestrate_task.md +0 -928
- package/dist/forge-payload/.base-pack/workflows/run_sprint.md +0 -225
|
@@ -26,7 +26,7 @@ deps:
|
|
|
26
26
|
|
|
27
27
|
- Commit only the artifacts produced for this task; do not sweep unrelated working-tree changes into the commit. The commit boundary mirrors the task boundary.
|
|
28
28
|
- Read `.forge/personas/engineer.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
|
|
29
|
-
- All store I/O via `forge_store` (or `node
|
|
29
|
+
- All store I/O via `forge_store` (or `node .forge/tools/store-cli.cjs`). Never edit `.forge/store/*.json` directly.
|
|
30
30
|
|
|
31
31
|
## Store-Write Verification
|
|
32
32
|
|
|
@@ -37,9 +37,8 @@ deps:
|
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
0a. Pre-flight Gate Check:
|
|
40
|
-
- Resolve FORGE_ROOT (`node -e "console.log(require('./.forge/config.json').paths.forgeRoot)"`).
|
|
41
40
|
- **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
|
-
- Run: `node
|
|
41
|
+
- Run: `node .forge/tools/preflight-gate.cjs --phase commit --{entity_kind} {record_id}`
|
|
43
42
|
- Exit 1 (gate failed) → print stderr and HALT. Do not proceed; do not attempt to produce the artifact.
|
|
44
43
|
- Exit 2 (misconfiguration) → print stderr and HALT.
|
|
45
44
|
- Exit 0 → continue.
|
|
@@ -48,7 +47,7 @@ deps:
|
|
|
48
47
|
- If `--force` is present in the invocation arguments, skip this step entirely.
|
|
49
48
|
- If `entity_kind == "bug"`, skip this step entirely (bug state is managed by meta-fix-bug.md).
|
|
50
49
|
- Read current task state:
|
|
51
|
-
`node
|
|
50
|
+
`node .forge/tools/store-cli.cjs read task {record_id} --json`
|
|
52
51
|
- Extract the `status` field from the JSON output.
|
|
53
52
|
- Allowed states for this phase: `approved`.
|
|
54
53
|
- If the current status is NOT in the allowed set:
|
|
@@ -74,8 +73,8 @@ deps:
|
|
|
74
73
|
|
|
75
74
|
4. Store Finalization:
|
|
76
75
|
- Transitions:
|
|
77
|
-
- **Task mode** — `approved → committed` (terminal): `node
|
|
78
|
-
- **Bug mode** — `in-progress → fixed` (terminal): `node
|
|
76
|
+
- **Task mode** — `approved → committed` (terminal): `node .forge/tools/store-cli.cjs update-status task {taskId} status committed`
|
|
77
|
+
- **Bug mode** — `in-progress → fixed` (terminal): `node .forge/tools/store-cli.cjs update-status bug {bugId} status fixed`. This is the ONLY phase in the bug pipeline that writes `bug.status` post-triage (see `meta-fix-bug.md § Iron Laws #2`). Do NOT write `approved` or `verified` — those values are vestigial enum members slated for removal.
|
|
79
78
|
|
|
80
79
|
5. Finalize:
|
|
81
80
|
- **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.
|
|
@@ -10,7 +10,7 @@ deps:
|
|
|
10
10
|
templates: []
|
|
11
11
|
sub_workflows: []
|
|
12
12
|
kb_docs: []
|
|
13
|
-
config_fields: [paths.engineering
|
|
13
|
+
config_fields: [paths.engineering]
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
|
|
@@ -21,7 +21,7 @@ deps:
|
|
|
21
21
|
|
|
22
22
|
- Orchestrator-only: this workflow runs with full tool access in the orchestrator session. NEVER delegate it to a subagent.
|
|
23
23
|
- Read `.forge/personas/engineer.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
|
|
24
|
-
- All store I/O via `forge_store` (or `node
|
|
24
|
+
- All store I/O via `forge_store` (or `node .forge/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
|
|
|
27
27
|
<!-- See _fragments/store-write-verification.md — NOTE: this file uses an intentionally abbreviated
|
|
@@ -129,7 +129,7 @@ Invoked by T09 post-init hook (`--auto`) or manually via `/forge:rebuild --enric
|
|
|
129
129
|
|
|
130
130
|
2. **Skip runtime passthrough keys** — keys used at runtime (e.g., `{{TASK_ID}}`, `{{SPRINT_ID}}`,
|
|
131
131
|
`{{ARGUMENTS}}`) are intentional and must not be substituted. Read
|
|
132
|
-
|
|
132
|
+
`.forge/tools/substitute-placeholders.cjs` to identify the RUNTIME_PASSTHROUGH_KEYS list.
|
|
133
133
|
Exclude them from the fill candidates.
|
|
134
134
|
|
|
135
135
|
3. **Derive values from codebase signals** — for each remaining `{{KEY}}`, attempt to derive a
|
|
@@ -161,7 +161,7 @@ Invoked by T09 post-init hook (`--auto`) or manually via `/forge:rebuild --enric
|
|
|
161
161
|
|
|
162
162
|
6. **Snapshot gate** — if at least one fill was applied:
|
|
163
163
|
```sh
|
|
164
|
-
node
|
|
164
|
+
node .forge/tools/manage-versions.cjs add-snapshot \
|
|
165
165
|
--source post-init \
|
|
166
166
|
--enhanced-elements "<comma-separated list of relative .forge/ paths that were modified>"
|
|
167
167
|
```
|
|
@@ -169,7 +169,7 @@ Invoked by T09 post-init hook (`--auto`) or manually via `/forge:rebuild --enric
|
|
|
169
169
|
|
|
170
170
|
7. **Emit enhancement event** to the store:
|
|
171
171
|
```sh
|
|
172
|
-
node
|
|
172
|
+
node .forge/tools/store-cli.cjs emit enhancement '{
|
|
173
173
|
"eventId": "<ISO timestamp slug>_enhance_phase1",
|
|
174
174
|
"taskId": "enhancement",
|
|
175
175
|
"sprintId": "enhancement",
|
|
@@ -27,9 +27,8 @@ deps:
|
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
0a. Pre-flight Gate Check:
|
|
30
|
-
- Resolve FORGE_ROOT (`node -e "console.log(require('./.forge/config.json').paths.forgeRoot)"`).
|
|
31
30
|
- **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
|
-
- Run: `node
|
|
31
|
+
- Run: `node .forge/tools/preflight-gate.cjs --phase implement --{entity_kind} {record_id}`
|
|
33
32
|
- Exit 1 (gate failed) → print stderr and HALT. Do not proceed; do not attempt to produce the artifact.
|
|
34
33
|
- Exit 2 (misconfiguration) → print stderr and HALT.
|
|
35
34
|
- Exit 0 → continue.
|
|
@@ -38,7 +37,7 @@ deps:
|
|
|
38
37
|
- If `--force` is present in the invocation arguments, skip this step entirely.
|
|
39
38
|
- If `entity_kind == "bug"`, skip this step entirely (bug state is managed by meta-fix-bug.md).
|
|
40
39
|
- Read current task state:
|
|
41
|
-
`node
|
|
40
|
+
`node .forge/tools/store-cli.cjs read task {record_id} --json`
|
|
42
41
|
- Extract the `status` field from the JSON output.
|
|
43
42
|
- Allowed states for this phase: `plan-approved`.
|
|
44
43
|
- If the current status is NOT in the allowed set:
|
|
@@ -79,10 +78,10 @@ deps:
|
|
|
79
78
|
- Out-of-band escapes (any state): `plan-revision-required`, `code-revision-required`, `blocked`, `escalated`, `abandoned`
|
|
80
79
|
Update status — check current state first:
|
|
81
80
|
- If predecessor is `planned` or `implementing`:
|
|
82
|
-
`node
|
|
81
|
+
`node .forge/tools/store-cli.cjs update-status task {taskId} status implemented`
|
|
83
82
|
- If predecessor is `plan-approved` (two-step mandatory — FSM forbids skipping `implementing`):
|
|
84
|
-
`node
|
|
85
|
-
`node
|
|
83
|
+
`node .forge/tools/store-cli.cjs update-status task {taskId} status implementing`
|
|
84
|
+
`node .forge/tools/store-cli.cjs update-status task {taskId} status implemented`
|
|
86
85
|
- **Bug mode** — NO status write. The bug remains `in-progress` until the commit phase transitions it to `fixed`. Writing `bug.status` here violates `meta-fix-bug.md § Iron Laws #2`.
|
|
87
86
|
- **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.
|
|
88
87
|
|
|
@@ -103,7 +102,7 @@ deps:
|
|
|
103
102
|
|
|
104
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.
|
|
105
104
|
- Read `.forge/personas/engineer.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
|
|
106
|
-
- All store I/O via `forge_store` (or `node
|
|
105
|
+
- All store I/O via `forge_store` (or `node .forge/tools/store-cli.cjs`). Never edit `.forge/store/*.json` directly.
|
|
107
106
|
- Run the full test suite before declaring the task implemented. Silent continuation past test failures is never acceptable.
|
|
108
107
|
|
|
109
108
|
## Store-Write Verification
|
|
@@ -19,15 +19,18 @@ deps:
|
|
|
19
19
|
|
|
20
20
|
- Migration operations are reversible and user-confirmed before any destructive writes. Do not skip the Phase 2 confirmation gate — proceed only after the user explicitly accepts the migration plan.
|
|
21
21
|
- Read `.forge/personas/engineer.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
|
|
22
|
-
- All store I/O via `forge_store` (or `node
|
|
22
|
+
- All store I/O via `forge_store` (or `node .forge/tools/store-cli.cjs`). Never edit `.forge/store/*.json` directly.
|
|
23
23
|
|
|
24
24
|
## Pre-conditions
|
|
25
25
|
|
|
26
26
|
- `/forge:init` has run: `.forge/config.json` exists and is readable.
|
|
27
27
|
- `.forge/structure-versions.json` is absent OR `--structural` was passed.
|
|
28
|
-
- The Forge plugin root is resolvable
|
|
28
|
+
- The Forge plugin root is resolvable. Migration reads plugin source
|
|
29
|
+
(`$FORGE_ROOT/init/base-pack`, `$FORGE_ROOT/.claude-plugin/plugin.json`)
|
|
30
|
+
that is not vendored into `.forge/`, so resolve the active plugin install
|
|
31
|
+
root from `CLAUDE_PLUGIN_ROOT` (this workflow runs plugin-side):
|
|
29
32
|
```sh
|
|
30
|
-
export FORGE_ROOT
|
|
33
|
+
export FORGE_ROOT="${CLAUDE_PLUGIN_ROOT}"
|
|
31
34
|
```
|
|
32
35
|
|
|
33
36
|
---
|
|
@@ -42,7 +45,7 @@ Check that `.forge/config.json` exists. If it does not, stop:
|
|
|
42
45
|
|
|
43
46
|
> "Forge has not been initialised in this project. Run `/forge:init` first."
|
|
44
47
|
|
|
45
|
-
|
|
48
|
+
Resolve `FORGE_ROOT` from `${CLAUDE_PLUGIN_ROOT}` (the active plugin install root).
|
|
46
49
|
|
|
47
50
|
**0b. Detect install generation.**
|
|
48
51
|
|
|
@@ -257,8 +260,7 @@ Write `.forge/project-context.json` with the synthesised content.
|
|
|
257
260
|
|
|
258
261
|
Validate via the store tool:
|
|
259
262
|
```sh
|
|
260
|
-
|
|
261
|
-
node "$FORGE_ROOT/tools/validate-store.cjs" --dry-run
|
|
263
|
+
node .forge/tools/validate-store.cjs --dry-run
|
|
262
264
|
```
|
|
263
265
|
|
|
264
266
|
If this exits non-zero, report the validation errors to the user and HALT. Do
|
|
@@ -268,7 +270,7 @@ NOT remove the sentinel — the user can fix the issue and re-run.
|
|
|
268
270
|
|
|
269
271
|
```sh
|
|
270
272
|
export FORGE_ROOT
|
|
271
|
-
node
|
|
273
|
+
node .forge/tools/substitute-placeholders.cjs \
|
|
272
274
|
--forge-root "$FORGE_ROOT" \
|
|
273
275
|
--base-pack "$FORGE_ROOT/init/base-pack" \
|
|
274
276
|
--config ".forge/config.json" \
|
|
@@ -286,8 +288,7 @@ user. Do NOT remove the sentinel (preserves ability to re-run after fixing).
|
|
|
286
288
|
#### Step 3d — Register snapshot (T05)
|
|
287
289
|
|
|
288
290
|
```sh
|
|
289
|
-
|
|
290
|
-
node "$FORGE_ROOT/tools/manage-versions.cjs" init
|
|
291
|
+
node .forge/tools/manage-versions.cjs init
|
|
291
292
|
```
|
|
292
293
|
|
|
293
294
|
`manage-versions init` is idempotent. Since `.forge/structure-versions.json`
|
|
@@ -331,9 +332,8 @@ rm .forge/archive/pre-migration/.migration-in-progress
|
|
|
331
332
|
**Verification (CLI-accessible only — do NOT invoke `/forge:health` here):**
|
|
332
333
|
|
|
333
334
|
```sh
|
|
334
|
-
export FORGE_ROOT
|
|
335
335
|
# 1. Validate the store
|
|
336
|
-
node
|
|
336
|
+
node .forge/tools/validate-store.cjs --dry-run
|
|
337
337
|
|
|
338
338
|
# 2. Verify substitution outputs are non-empty
|
|
339
339
|
ls .forge/personas/*.md .forge/skills/*.md .forge/workflows/*.md .forge/templates/*.md
|
|
@@ -359,9 +359,8 @@ Read that file and extract the `sprintId` field. If no sprint files exist, use
|
|
|
359
359
|
`"migration"` as the `sprintId` placeholder.
|
|
360
360
|
|
|
361
361
|
```sh
|
|
362
|
-
export FORGE_ROOT
|
|
363
362
|
MIGRATION_END=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
364
|
-
node
|
|
363
|
+
node .forge/tools/store-cli.cjs emit "{projectSprintId}" '{
|
|
365
364
|
"eventId": "migration-'"$(date -u +%Y%m%dT%H%M%SZ)"'",
|
|
366
365
|
"taskId": "migration",
|
|
367
366
|
"sprintId": "{projectSprintId}",
|
|
@@ -27,9 +27,8 @@ deps:
|
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
0a. Pre-flight Gate Check:
|
|
30
|
-
- Resolve FORGE_ROOT (`node -e "console.log(require('./.forge/config.json').paths.forgeRoot)"`).
|
|
31
30
|
- **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
|
-
- Run: `node
|
|
31
|
+
- Run: `node .forge/tools/preflight-gate.cjs --phase plan --{entity_kind} {record_id}`
|
|
33
32
|
- Exit 1 (gate failed) → print stderr and HALT. Do not proceed; do not attempt to produce the artifact.
|
|
34
33
|
- Exit 2 (misconfiguration) → print stderr and HALT.
|
|
35
34
|
- Exit 0 → continue.
|
|
@@ -38,7 +37,7 @@ deps:
|
|
|
38
37
|
- If `--force` is present in the invocation arguments, skip this step entirely.
|
|
39
38
|
- If `entity_kind == "bug"`, skip this step entirely (bug state is managed by meta-fix-bug.md).
|
|
40
39
|
- Read current task state:
|
|
41
|
-
`node
|
|
40
|
+
`node .forge/tools/store-cli.cjs read task {record_id} --json`
|
|
42
41
|
- Extract the `status` field from the JSON output.
|
|
43
42
|
- Allowed states for this phase: `draft`, `planned`, `plan-revision-required`.
|
|
44
43
|
- If the current status is NOT in the allowed set:
|
|
@@ -51,7 +50,7 @@ deps:
|
|
|
51
50
|
- Read task prompt (source of truth)
|
|
52
51
|
- Query the store for this task and any related entities:
|
|
53
52
|
```sh
|
|
54
|
-
node
|
|
53
|
+
node .forge/tools/store-cli.cjs nlp "{taskId} with sprint with feature"
|
|
55
54
|
```
|
|
56
55
|
Use store results directly if they include title, status, sprint, and excerpt.
|
|
57
56
|
- Read the architecture summary from your injected context (if present).
|
|
@@ -82,7 +81,7 @@ deps:
|
|
|
82
81
|
5. Finalize:
|
|
83
82
|
- Transitions:
|
|
84
83
|
- **Task mode** — legal target from this step: `draft → planned`. Out-of-band escapes (any state): `plan-revision-required`, `code-revision-required`, `blocked`, `escalated`, `abandoned`.
|
|
85
|
-
Update status: `node
|
|
84
|
+
Update status: `node .forge/tools/store-cli.cjs update-status task {taskId} status planned`
|
|
86
85
|
- **Bug mode** — NO status write. The bug remains `in-progress` until the commit phase transitions it to `fixed`. Writing `bug.status` here violates `meta-fix-bug.md § Iron Laws #2`.
|
|
87
86
|
- **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.
|
|
88
87
|
|
|
@@ -113,7 +112,7 @@ deps:
|
|
|
113
112
|
|
|
114
113
|
- Follow the Algorithm step by step. No code, pseudocode, or implementation sketches in the plan.
|
|
115
114
|
- Read `.forge/personas/architect.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
|
|
116
|
-
- All store I/O via `forge_store` (or `node
|
|
115
|
+
- All store I/O via `forge_store` (or `node .forge/tools/store-cli.cjs`). Never edit `.forge/store/*.json` directly.
|
|
117
116
|
|
|
118
117
|
## Store-Write Verification
|
|
119
118
|
|
|
@@ -26,7 +26,7 @@ deps:
|
|
|
26
26
|
|
|
27
27
|
- Evaluate the code against the approved PLAN.md and the original task prompt. Do not accept "it works" as a substitute for "it is correct and maintainable."
|
|
28
28
|
- Read `.forge/personas/supervisor.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
|
|
29
|
-
- All store I/O via `forge_store` (or `node
|
|
29
|
+
- All store I/O via `forge_store` (or `node .forge/tools/store-cli.cjs`). Never edit `.forge/store/*.json` directly.
|
|
30
30
|
|
|
31
31
|
## Store-Write Verification
|
|
32
32
|
|
|
@@ -37,9 +37,8 @@ deps:
|
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
0a. Pre-flight Gate Check:
|
|
40
|
-
- Resolve FORGE_ROOT (`node -e "console.log(require('./.forge/config.json').paths.forgeRoot)"`).
|
|
41
40
|
- **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
|
-
- Run: `node
|
|
41
|
+
- Run: `node .forge/tools/preflight-gate.cjs --phase review-code --{entity_kind} {record_id}`
|
|
43
42
|
- Exit 1 (gate failed) → print stderr and HALT. Do not proceed; do not attempt to produce the artifact.
|
|
44
43
|
- Exit 2 (misconfiguration) → print stderr and HALT.
|
|
45
44
|
- Exit 0 → continue.
|
|
@@ -48,7 +47,7 @@ deps:
|
|
|
48
47
|
- If `--force` is present in the invocation arguments, skip this step entirely.
|
|
49
48
|
- If `entity_kind == "bug"`, skip this step entirely (bug state is managed by meta-fix-bug.md).
|
|
50
49
|
- Read current task state:
|
|
51
|
-
`node
|
|
50
|
+
`node .forge/tools/store-cli.cjs read task {record_id} --json`
|
|
52
51
|
- Extract the `status` field from the JSON output.
|
|
53
52
|
- Allowed states for this phase: `implemented`, `implementing`.
|
|
54
53
|
- If the current status is NOT in the allowed set:
|
|
@@ -98,7 +97,7 @@ deps:
|
|
|
98
97
|
|
|
99
98
|
6. Finalize:
|
|
100
99
|
- Transitions:
|
|
101
|
-
- **Task mode** — Update status: `node
|
|
100
|
+
- **Task mode** — Update status: `node .forge/tools/store-cli.cjs update-status task {taskId} status review-approved` (if Approved) or `... status code-revision-required` (if Revision Required).
|
|
102
101
|
- **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`.
|
|
103
102
|
- **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.
|
|
104
103
|
|
|
@@ -116,10 +115,11 @@ deps:
|
|
|
116
115
|
}
|
|
117
116
|
```
|
|
118
117
|
- Call (task mode):
|
|
119
|
-
`forge_store({ command:"set-summary",
|
|
118
|
+
`forge_store({ command:"set-summary", args:["{taskId}", "code_review"] })`
|
|
120
119
|
Or (bug mode):
|
|
121
|
-
`forge_store({ command:"set-bug-summary",
|
|
122
|
-
|
|
120
|
+
`forge_store({ command:"set-bug-summary", args:["{bugId}", "code_review"] })`
|
|
121
|
+
`args[1]` is the LITERAL phase key `code_review`, never the record id; `forge_store` has no `entity`/`id`/`phase` field (see `_fragments/store-cli-verbs.md`).
|
|
122
|
+
- If set-summary exits non-zero, `args[1]` was wrong — fix it to `code_review` and retry. Do not return without a valid summary; the orchestrator halts as "verdict missing" if `summaries.code_review` is absent.
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
<!-- See _fragments/generation-instructions.md for Generation Instructions template -->
|
|
@@ -28,7 +28,7 @@ deps:
|
|
|
28
28
|
|
|
29
29
|
- Evaluate the plan against what the task actually requires, not against what the plan claims to deliver. Plans routinely understate complexity, omit edge cases, or skip security steps. Your job is adversarial review, not approval.
|
|
30
30
|
- Read `.forge/personas/supervisor.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
|
|
31
|
-
- All store I/O via `forge_store` (or `node
|
|
31
|
+
- All store I/O via `forge_store` (or `node .forge/tools/store-cli.cjs`). Never edit `.forge/store/*.json` directly.
|
|
32
32
|
|
|
33
33
|
## Store-Write Verification
|
|
34
34
|
|
|
@@ -39,9 +39,8 @@ deps:
|
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
0a. Pre-flight Gate Check:
|
|
42
|
-
- Resolve FORGE_ROOT (`node -e "console.log(require('./.forge/config.json').paths.forgeRoot)"`).
|
|
43
42
|
- **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
|
-
- Run: `node
|
|
43
|
+
- Run: `node .forge/tools/preflight-gate.cjs --phase review-plan --{entity_kind} {record_id}`
|
|
45
44
|
- Exit 1 (gate failed) → print stderr and HALT. Do not proceed; do not attempt to produce the artifact.
|
|
46
45
|
- Exit 2 (misconfiguration) → print stderr and HALT.
|
|
47
46
|
- Exit 0 → continue.
|
|
@@ -50,7 +49,7 @@ deps:
|
|
|
50
49
|
- If `--force` is present in the invocation arguments, skip this step entirely.
|
|
51
50
|
- If `entity_kind == "bug"`, skip this step entirely (bug state is managed by meta-fix-bug.md).
|
|
52
51
|
- Read current task state:
|
|
53
|
-
`node
|
|
52
|
+
`node .forge/tools/store-cli.cjs read task {record_id} --json`
|
|
54
53
|
- Extract the `status` field from the JSON output.
|
|
55
54
|
- Allowed states for this phase: `planned`.
|
|
56
55
|
- If the current status is NOT in the allowed set:
|
|
@@ -97,7 +96,7 @@ deps:
|
|
|
97
96
|
- Approved → `plan-approved`
|
|
98
97
|
- Revision Required → `plan-revision-required`
|
|
99
98
|
- Out-of-band escapes (any state): `code-revision-required`, `blocked`, `escalated`, `abandoned`
|
|
100
|
-
Update status: `node
|
|
99
|
+
Update status: `node .forge/tools/store-cli.cjs update-status task {taskId} status plan-approved` (if Approved) or `... status plan-revision-required` (if Revision Required)
|
|
101
100
|
- **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`.
|
|
102
101
|
- **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.
|
|
103
102
|
|
|
@@ -115,13 +114,14 @@ deps:
|
|
|
115
114
|
```
|
|
116
115
|
- Call (task mode):
|
|
117
116
|
```
|
|
118
|
-
forge_store({ command:"set-summary",
|
|
117
|
+
forge_store({ command:"set-summary", args:["{record_id}", "review_plan"] })
|
|
119
118
|
```
|
|
120
119
|
Or (bug mode):
|
|
121
120
|
```
|
|
122
|
-
forge_store({ command:"set-bug-summary",
|
|
121
|
+
forge_store({ command:"set-bug-summary", args:["{record_id}", "review_plan"] })
|
|
123
122
|
```
|
|
124
|
-
|
|
123
|
+
`args[1]` is the LITERAL phase key `review_plan`, never the record id; `forge_store` has no `entity`/`id`/`phase` field (see `_fragments/store-cli-verbs.md`).
|
|
124
|
+
- If set-summary exits non-zero (guard: `expected summary key 'review_plan'`), `args[1]` was wrong — fix it to `review_plan` and retry. Do not return without a valid summary; the orchestrator halts as "verdict missing" if `summaries.review_plan` is absent.
|
|
125
125
|
```
|
|
126
126
|
|
|
127
127
|
<!-- See _fragments/generation-instructions.md for Generation Instructions template -->
|
|
@@ -18,7 +18,7 @@ deps:
|
|
|
18
18
|
|
|
19
19
|
- Never mutate JSON records during retrospective; the store is the source of truth and retrospective flows downstream from it. Retrospective operations read store data and write markdown views only.
|
|
20
20
|
- Read `.forge/personas/architect.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
|
|
21
|
-
- All store I/O via `forge_store` (or `node
|
|
21
|
+
- All store I/O via `forge_store` (or `node .forge/tools/store-cli.cjs`). Never edit `.forge/store/*.json` directly.
|
|
22
22
|
|
|
23
23
|
## Algorithm
|
|
24
24
|
|
|
@@ -40,8 +40,8 @@ deps:
|
|
|
40
40
|
|
|
41
41
|
4. Finalize:
|
|
42
42
|
- Write SPRINT_RETROSPECTIVE.md
|
|
43
|
-
- Update sprint status via `node
|
|
44
|
-
- Run `node
|
|
43
|
+
- Update sprint status via `node .forge/tools/store-cli.cjs update-status sprint {sprintId} status retrospective-done`
|
|
44
|
+
- Run `node .forge/tools/collate.cjs {sprintId} --purge-events`
|
|
45
45
|
This single deterministic step: generates COST_REPORT.md from all
|
|
46
46
|
accumulated events, then deletes `.forge/store/events/{sprintId}/`.
|
|
47
47
|
COST_REPORT.md is the durable record; the raw event files are not
|
|
@@ -28,7 +28,7 @@ deps:
|
|
|
28
28
|
reproduction has no business going to plan-fix or implement.
|
|
29
29
|
- Read `.forge/personas/bug-fixer.md` first; print the persona identity
|
|
30
30
|
line (emoji, name, tagline) to stdout before any other tool use.
|
|
31
|
-
- All store I/O via `forge_store` (or `node
|
|
31
|
+
- All store I/O via `forge_store` (or `node .forge/tools/store-cli.cjs`).
|
|
32
32
|
Never edit `.forge/store/*.json` directly.
|
|
33
33
|
- **Triage NEVER writes `bug.status`.** The orchestrator (`meta-fix-bug.md`)
|
|
34
34
|
owns the `reported → triaged` and `triaged → in-progress` transitions.
|
|
@@ -51,8 +51,7 @@ deps:
|
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
0. Pre-flight Gate Check:
|
|
54
|
-
-
|
|
55
|
-
- Run: `node "$FORGE_ROOT/tools/preflight-gate.cjs" --phase triage --bug {bugId}`
|
|
54
|
+
- Run: `node .forge/tools/preflight-gate.cjs --phase triage --bug {bugId}`
|
|
56
55
|
- Exit 1 (gate failed) → print stderr and HALT. Do not proceed.
|
|
57
56
|
- Exit 2 (misconfiguration) → print stderr and HALT.
|
|
58
57
|
- Exit 0 → continue.
|
|
@@ -61,7 +60,7 @@ deps:
|
|
|
61
60
|
- Read `.forge/personas/bug-fixer.md` first; print the persona identity
|
|
62
61
|
line to stdout before any other tool use.
|
|
63
62
|
- Read the bug record:
|
|
64
|
-
`forge_store({ command:"read",
|
|
63
|
+
`forge_store({ command:"read", args:["bug", "{bugId}"] })`
|
|
65
64
|
- Read business domain docs relevant to the reported symptom.
|
|
66
65
|
- store-cli verbs: `read` | `list` | `write` | `emit` |
|
|
67
66
|
`update-status` | `set-summary` | `set-bug-summary` | `describe` |
|
|
@@ -129,13 +128,17 @@ deps:
|
|
|
129
128
|
|
|
130
129
|
- Call:
|
|
131
130
|
```
|
|
132
|
-
forge_store({ command:"set-bug-summary",
|
|
133
|
-
id:"{bugId}", phase:"triage" })
|
|
131
|
+
forge_store({ command:"set-bug-summary", args:["{bugId}", "triage"] })
|
|
134
132
|
// sidecar path auto-resolved from the bug record's `path` — never pass it
|
|
135
133
|
```
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
134
|
+
`forge_store` has only `command` + `args` (positional) — no
|
|
135
|
+
`entity`/`id`/`phase` field. `args[0]` is the bug id, `args[1]` is the
|
|
136
|
+
LITERAL phase key `triage` (never the bug id, never a path). See
|
|
137
|
+
`_fragments/store-cli-verbs.md`.
|
|
138
|
+
- If the set-bug-summary call exits non-zero (phase-ownership guard:
|
|
139
|
+
`expected summary key 'triage'`), `args[1]` was wrong — set it to `triage`
|
|
140
|
+
and retry (up to 3 attempts per the Store-Write Verification rule). Do not
|
|
141
|
+
proceed without a valid summary.
|
|
139
142
|
|
|
140
143
|
> **Field-naming caution — runtime-tested.** The route field is named
|
|
141
144
|
> `route`, never `path`. The bug schema's top-level `path` field is the
|
|
@@ -26,7 +26,7 @@ deps:
|
|
|
26
26
|
|
|
27
27
|
- Address every "Revision Required" item from the review artifact at the correct code location; do not paper over them with comments. If a finding is wrong, escalate rather than ignore.
|
|
28
28
|
- Read `.forge/personas/engineer.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
|
|
29
|
-
- All store I/O via `forge_store` (or `node
|
|
29
|
+
- All store I/O via `forge_store` (or `node .forge/tools/store-cli.cjs`). Never edit `.forge/store/*.json` directly.
|
|
30
30
|
|
|
31
31
|
## Store-Write Verification
|
|
32
32
|
|
|
@@ -50,7 +50,7 @@ deps:
|
|
|
50
50
|
- Update PROGRESS.md with a summary of the revisions
|
|
51
51
|
|
|
52
52
|
4. Finalize:
|
|
53
|
-
- Update task status via `node
|
|
53
|
+
- Update task status via `node .forge/tools/store-cli.cjs update-status task {taskId} status implemented`
|
|
54
54
|
- **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.
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -26,7 +26,7 @@ deps:
|
|
|
26
26
|
|
|
27
27
|
- Address every numbered finding in the review artifact. Do not silently drop items; if a finding is wrong, note the reason in the revised plan rather than ignoring it.
|
|
28
28
|
- Read `.forge/personas/architect.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
|
|
29
|
-
- All store I/O via `forge_store` (or `node
|
|
29
|
+
- All store I/O via `forge_store` (or `node .forge/tools/store-cli.cjs`). Never edit `.forge/store/*.json` directly.
|
|
30
30
|
|
|
31
31
|
## Store-Write Verification
|
|
32
32
|
|
|
@@ -50,7 +50,7 @@ deps:
|
|
|
50
50
|
- Update the "Operational Impact" or "Testing Strategy" if the revision changed them
|
|
51
51
|
|
|
52
52
|
4. Finalize:
|
|
53
|
-
- Update task status via `node
|
|
53
|
+
- Update task status via `node .forge/tools/store-cli.cjs update-status task {taskId} status planned`
|
|
54
54
|
- **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.
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -26,7 +26,7 @@ deps:
|
|
|
26
26
|
|
|
27
27
|
- Validate against the acceptance criteria as written; do not soften, expand, or reinterpret them. The validator's job is to catch what the implementer optimistically considered "done".
|
|
28
28
|
- Read `.forge/personas/qa-engineer.md` first; print the persona identity line (emoji, name, tagline) to stdout before any other tool use.
|
|
29
|
-
- All store I/O via `forge_store` (or `node
|
|
29
|
+
- All store I/O via `forge_store` (or `node .forge/tools/store-cli.cjs`). Never edit `.forge/store/*.json` directly.
|
|
30
30
|
|
|
31
31
|
## Store-Write Verification
|
|
32
32
|
|
|
@@ -37,9 +37,8 @@ deps:
|
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
0a. Pre-flight Gate Check:
|
|
40
|
-
- Resolve FORGE_ROOT (`node -e "console.log(require('./.forge/config.json').paths.forgeRoot)"`).
|
|
41
40
|
- **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
|
-
- Run: `node
|
|
41
|
+
- Run: `node .forge/tools/preflight-gate.cjs --phase validate --{entity_kind} {record_id}`
|
|
43
42
|
- Exit 1 (gate failed) → print stderr and HALT. Do not proceed; do not attempt to produce the artifact.
|
|
44
43
|
- Exit 2 (misconfiguration) → print stderr and HALT.
|
|
45
44
|
- Exit 0 → continue.
|
|
@@ -48,7 +47,7 @@ deps:
|
|
|
48
47
|
- If `--force` is present in the invocation arguments, skip this step entirely.
|
|
49
48
|
- If `entity_kind == "bug"`, skip this step entirely (bug state is managed by meta-fix-bug.md).
|
|
50
49
|
- Read current task state:
|
|
51
|
-
`node
|
|
50
|
+
`node .forge/tools/store-cli.cjs read task {record_id} --json`
|
|
52
51
|
- Extract the `status` field from the JSON output.
|
|
53
52
|
- Allowed states for this phase: `implemented`, `review-approved`.
|
|
54
53
|
- If the current status is NOT in the allowed set:
|
|
@@ -94,7 +93,7 @@ deps:
|
|
|
94
93
|
- See step 1 for iteration header and final-iteration Next Steps requirements.
|
|
95
94
|
|
|
96
95
|
5. Finalize:
|
|
97
|
-
- Update task status via `node
|
|
96
|
+
- Update task status via `node .forge/tools/store-cli.cjs update-status task {taskId} status review-approved` (if Approved) or `node .forge/tools/store-cli.cjs update-status task {taskId} status code-revision-required` (if Revision Required)
|
|
98
97
|
- **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.
|
|
99
98
|
|
|
100
99
|
6. Emit Summary Sidecar:
|
|
@@ -112,7 +111,7 @@ deps:
|
|
|
112
111
|
```
|
|
113
112
|
- Call (the sidecar path is auto-resolved from the task record's `path` — never pass it):
|
|
114
113
|
```
|
|
115
|
-
node
|
|
114
|
+
node .forge/tools/store-cli.cjs set-summary {task_id} validation
|
|
116
115
|
```
|
|
117
116
|
- If set-summary exits non-zero, fix the sidecar JSON and retry. Do not proceed without a valid summary.
|
|
118
117
|
```
|