@entelligentsia/forgecli 1.0.21 → 1.0.36
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 +346 -0
- package/README.md +2 -0
- package/dist/CHANGELOG-forge-plugin.md +281 -0
- package/dist/bin/argv.d.ts +2 -2
- package/dist/bin/argv.js +25 -0
- package/dist/bin/argv.js.map +1 -1
- package/dist/bin/forge.js +12 -0
- package/dist/bin/forge.js.map +1 -1
- package/dist/bin/init.d.ts +23 -0
- package/dist/bin/init.js +123 -0
- package/dist/bin/init.js.map +1 -0
- package/dist/bin/uninstall.d.ts +20 -0
- package/dist/bin/uninstall.js +141 -0
- package/dist/bin/uninstall.js.map +1 -0
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.d.ts +40 -0
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js +593 -0
- package/dist/extensions/forgecli/claude-bootstrap/bootstrap.js.map +1 -0
- package/dist/extensions/forgecli/claude-bootstrap/settings-merge.d.ts +46 -0
- package/dist/extensions/forgecli/claude-bootstrap/settings-merge.js +245 -0
- package/dist/extensions/forgecli/claude-bootstrap/settings-merge.js.map +1 -0
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.d.ts +23 -0
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.js +215 -0
- package/dist/extensions/forgecli/claude-bootstrap/uninstall.js.map +1 -0
- package/dist/extensions/forgecli/dashboard/component.js +10 -7
- package/dist/extensions/forgecli/dashboard/component.js.map +1 -1
- package/dist/extensions/forgecli/forge-tools.d.ts +1 -0
- package/dist/extensions/forgecli/forge-tools.js +73 -0
- package/dist/extensions/forgecli/forge-tools.js.map +1 -1
- package/dist/extensions/forgecli/lib/forge-root.d.ts +5 -0
- package/dist/extensions/forgecli/lib/forge-root.js +14 -1
- package/dist/extensions/forgecli/lib/forge-root.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/bug/bug-body.d.ts +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-body.js +65 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-body.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-id.d.ts +23 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-id.js +140 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-id.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phase-dispatch.d.ts +54 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phase-dispatch.js +349 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phase-dispatch.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.d.ts +8 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js +60 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-phases.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-state.d.ts +14 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-state.js +100 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-state.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-triage-routing.d.ts +72 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-triage-routing.js +204 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-triage-routing.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.d.ts +38 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js +166 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict-loop.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict.d.ts +3 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict.js +55 -0
- package/dist/extensions/forgecli/orchestrators/bug/bug-verdict.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-command.d.ts +7 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-command.js +293 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-command.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.d.ts +2 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js +501 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-pipeline.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-types.d.ts +41 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-types.js +5 -0
- package/dist/extensions/forgecli/orchestrators/bug/run-bug-types.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-entry.d.ts +43 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-entry.js +85 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-entry.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-misc.d.ts +8 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-misc.js +37 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-misc.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-notify.d.ts +28 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-notify.js +45 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-notify.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-transcript-session.d.ts +26 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-transcript-session.js +75 -0
- package/dist/extensions/forgecli/orchestrators/common/orchestrator-transcript-session.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/common/summary-recovery.d.ts +24 -0
- package/dist/extensions/forgecli/orchestrators/common/summary-recovery.js +37 -0
- package/dist/extensions/forgecli/orchestrators/common/summary-recovery.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/fix-bug.d.ts +9 -92
- package/dist/extensions/forgecli/orchestrators/fix-bug.js +23 -1695
- package/dist/extensions/forgecli/orchestrators/fix-bug.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/run-sprint.d.ts +3 -12
- package/dist/extensions/forgecli/orchestrators/run-sprint.js +97 -270
- package/dist/extensions/forgecli/orchestrators/run-sprint.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/run-task.d.ts +10 -214
- package/dist/extensions/forgecli/orchestrators/run-task.js +31 -1481
- package/dist/extensions/forgecli/orchestrators/run-task.js.map +1 -1
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-ceremony.d.ts +33 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-ceremony.js +135 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-ceremony.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-state.d.ts +18 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-state.js +55 -0
- package/dist/extensions/forgecli/orchestrators/sprint/sprint-state.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-command.d.ts +9 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-command.js +174 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-command.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.d.ts +2 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js +494 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-pipeline.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-types.d.ts +62 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-types.js +5 -0
- package/dist/extensions/forgecli/orchestrators/task/run-task-types.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-body.d.ts +4 -0
- package/dist/extensions/forgecli/orchestrators/task/task-body.js +48 -0
- package/dist/extensions/forgecli/orchestrators/task/task-body.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-events.d.ts +63 -0
- package/dist/extensions/forgecli/orchestrators/task/task-events.js +185 -0
- package/dist/extensions/forgecli/orchestrators/task/task-events.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-gates.d.ts +34 -0
- package/dist/extensions/forgecli/orchestrators/task/task-gates.js +78 -0
- package/dist/extensions/forgecli/orchestrators/task/task-gates.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phase-dispatch.d.ts +42 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phase-dispatch.js +370 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phase-dispatch.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.d.ts +14 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.js +26 -0
- package/dist/extensions/forgecli/orchestrators/task/task-phases.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-record.d.ts +9 -0
- package/dist/extensions/forgecli/orchestrators/task/task-record.js +58 -0
- package/dist/extensions/forgecli/orchestrators/task/task-record.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-state.d.ts +14 -0
- package/dist/extensions/forgecli/orchestrators/task/task-state.js +35 -0
- package/dist/extensions/forgecli/orchestrators/task/task-state.js.map +1 -0
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.d.ts +36 -0
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js +152 -0
- package/dist/extensions/forgecli/orchestrators/task/task-verdict-loop.js.map +1 -0
- package/dist/extensions/forgecli/update/forge-update-command.js +10 -7
- package/dist/extensions/forgecli/update/forge-update-command.js.map +1 -1
- package/dist/forge-payload/.base-pack/commands/approve.md +2 -2
- package/dist/forge-payload/.base-pack/commands/check-agent.md +2 -2
- package/dist/forge-payload/.base-pack/commands/collate.md +2 -2
- package/dist/forge-payload/.base-pack/commands/commit.md +2 -2
- package/dist/forge-payload/.base-pack/commands/enhance.md +2 -2
- package/dist/forge-payload/.base-pack/commands/fix-bug.md +2 -2
- package/dist/forge-payload/.base-pack/commands/implement.md +2 -2
- package/dist/forge-payload/.base-pack/commands/init.md +278 -0
- package/dist/forge-payload/.base-pack/commands/new-sprint.md +2 -2
- package/dist/forge-payload/.base-pack/commands/plan-sprint.md +2 -2
- package/dist/forge-payload/.base-pack/commands/plan.md +2 -2
- package/dist/forge-payload/.base-pack/commands/retro.md +2 -2
- package/dist/forge-payload/.base-pack/commands/review-code.md +2 -2
- package/dist/forge-payload/.base-pack/commands/review-plan.md +2 -2
- package/dist/forge-payload/.base-pack/commands/run-sprint.md +2 -2
- package/dist/forge-payload/.base-pack/commands/run-task.md +2 -2
- package/dist/forge-payload/.base-pack/commands/validate.md +2 -2
- package/dist/forge-payload/.base-pack/workflows/_fragments/event-emission-schema.md +4 -0
- package/dist/forge-payload/.base-pack/workflows/_fragments/event-vocabulary.md +88 -0
- package/dist/forge-payload/.base-pack/workflows/collator_agent.md +5 -6
- package/dist/forge-payload/.base-pack/workflows/commit_task.md +41 -38
- package/dist/forge-payload/.base-pack/workflows/implement_plan.md +3 -3
- package/dist/forge-payload/.base-pack/workflows/migrate_structural.md +1 -1
- package/dist/forge-payload/.base-pack/workflows-js/wfl-fix-bug.js +42 -6
- package/dist/forge-payload/.base-pack/workflows-js/wfl-init.js +449 -0
- package/dist/forge-payload/.base-pack/workflows-js/wfl-run-task.js +32 -1
- package/dist/forge-payload/.claude-plugin/plugin.json +1 -1
- package/dist/forge-payload/.schemas/enum-catalog.json +2 -2
- package/dist/forge-payload/.schemas/event.schema.json +8 -3
- package/dist/forge-payload/.schemas/migrations.json +141 -0
- package/dist/forge-payload/commands/add-pipeline.md +1 -1
- package/dist/forge-payload/commands/add-task.md +3 -3
- package/dist/forge-payload/commands/ask.md +1 -1
- package/dist/forge-payload/commands/check-agent.md +1 -1
- package/dist/forge-payload/commands/config.md +1 -1
- package/dist/forge-payload/commands/health.md +1 -1
- package/dist/forge-payload/commands/init.md +62 -7
- package/dist/forge-payload/commands/rebuild.md +3 -3
- package/dist/forge-payload/commands/remove.md +1 -1
- package/dist/forge-payload/commands/repair.md +1 -1
- package/dist/forge-payload/commands/report-bug.md +1 -1
- package/dist/forge-payload/commands/status.md +1 -1
- package/dist/forge-payload/commands/update.md +3 -3
- package/dist/forge-payload/hooks/lib/common.cjs +228 -0
- package/dist/forge-payload/hooks/lib/plugin-detection.cjs +106 -0
- package/dist/forge-payload/hooks/lib/update-msg.cjs +23 -0
- package/dist/forge-payload/hooks/lib/update-url.cjs +46 -0
- package/dist/forge-payload/hooks/lib/write-registry.js +53 -0
- package/dist/forge-payload/init/discovery/discover-database.md +32 -0
- package/dist/forge-payload/init/discovery/discover-processes.md +31 -0
- package/dist/forge-payload/init/discovery/discover-routing.md +31 -0
- package/dist/forge-payload/init/discovery/discover-stack.md +33 -0
- package/dist/forge-payload/init/discovery/discover-testing.md +34 -0
- package/dist/forge-payload/init/generation/generate-commands.md +171 -0
- package/dist/forge-payload/init/generation/generate-kb-doc.md +60 -0
- package/dist/forge-payload/init/generation/generate-knowledge-base.md +56 -0
- package/dist/forge-payload/init/generation/generate-persona.md +73 -0
- package/dist/forge-payload/init/generation/generate-personas.md +54 -0
- package/dist/forge-payload/init/generation/generate-skill.md +66 -0
- package/dist/forge-payload/init/generation/generate-skills.md +36 -0
- package/dist/forge-payload/init/generation/generate-template.md +60 -0
- package/dist/forge-payload/init/generation/generate-templates.md +39 -0
- package/dist/forge-payload/init/generation/generate-tools.md +133 -0
- package/dist/forge-payload/init/generation/generate-workflows.md +78 -0
- package/dist/forge-payload/init/phases/phase-1-collect.md +10 -2
- package/dist/forge-payload/init/phases/phase-3-materialize.md +1 -1
- package/dist/forge-payload/init/phases/phase-4-register.md +8 -0
- package/dist/forge-payload/init/workflow-gen-plan.json +17 -0
- package/dist/forge-payload/integrity.json +16 -16
- package/dist/forge-payload/meta/store-schema/event.schema.md +7 -0
- package/dist/forge-payload/meta/workflows/_fragments/event-emission-schema.md +4 -0
- package/dist/forge-payload/meta/workflows/_fragments/event-vocabulary.md +88 -0
- package/dist/forge-payload/meta/workflows/meta-collate.md +5 -6
- package/dist/forge-payload/meta/workflows/meta-commit.md +46 -43
- package/dist/forge-payload/meta/workflows/meta-fix-bug.md +7 -2
- package/dist/forge-payload/meta/workflows/meta-implement.md +3 -3
- package/dist/forge-payload/meta/workflows/meta-migrate.md +1 -1
- package/dist/forge-payload/meta/workflows/meta-orchestrate.md +4 -1
- package/dist/forge-payload/schemas/enum-catalog.json +2 -2
- package/dist/forge-payload/schemas/event.schema.json +8 -3
- package/dist/forge-payload/schemas/structure-manifest.json +5 -12
- package/dist/forge-payload/tools/commit-task.cjs +218 -0
- package/dist/forge-payload/tools/forge-preflight.cjs +268 -0
- package/dist/forge-payload/tools/lib/paths.cjs +12 -11
- package/dist/forge-payload/tools/lib/pricing.cjs +31 -11
- package/dist/forge-payload/tools/query-logger.cjs +34 -0
- package/dist/forge-payload/tools/store-cli.cjs +6 -1
- package/dist/forge-payload/tools/substitute-placeholders.cjs +5 -6
- package/package.json +2 -2
|
@@ -3,14 +3,14 @@ name: new-sprint
|
|
|
3
3
|
description: Elicit and structure requirements for a new sprint
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /
|
|
6
|
+
# /forge:new-sprint
|
|
7
7
|
|
|
8
8
|
Read the new-sprint workflow and follow it.
|
|
9
9
|
|
|
10
10
|
## Locate the Forge plugin
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT:-$(pwd)/.forge}"`
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Execute
|
|
@@ -3,14 +3,14 @@ name: plan-sprint
|
|
|
3
3
|
description: Decompose sprint requirements into tasks with dependencies
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /
|
|
6
|
+
# /forge:plan-sprint
|
|
7
7
|
|
|
8
8
|
Read the plan-sprint workflow and follow it.
|
|
9
9
|
|
|
10
10
|
## Locate the Forge plugin
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT:-$(pwd)/.forge}"`
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Execute
|
|
@@ -3,14 +3,14 @@ name: plan
|
|
|
3
3
|
description: Design and document the implementation plan for a task
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /
|
|
6
|
+
# /forge:plan
|
|
7
7
|
|
|
8
8
|
Read the plan workflow and follow it.
|
|
9
9
|
|
|
10
10
|
## Locate the Forge plugin
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT:-$(pwd)/.forge}"`
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Execute
|
|
@@ -3,14 +3,14 @@ name: retro
|
|
|
3
3
|
description: Produce sprint retrospective and lessons-learned document
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /
|
|
6
|
+
# /forge:retro
|
|
7
7
|
|
|
8
8
|
Read the retro workflow and follow it.
|
|
9
9
|
|
|
10
10
|
## Locate the Forge plugin
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT:-$(pwd)/.forge}"`
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Execute
|
|
@@ -3,14 +3,14 @@ name: review-code
|
|
|
3
3
|
description: Code quality review of a completed task implementation
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /
|
|
6
|
+
# /forge:review-code
|
|
7
7
|
|
|
8
8
|
Read the review-code workflow and follow it.
|
|
9
9
|
|
|
10
10
|
## Locate the Forge plugin
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT:-$(pwd)/.forge}"`
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Execute
|
|
@@ -3,14 +3,14 @@ name: review-plan
|
|
|
3
3
|
description: Architectural review of a task implementation plan
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /
|
|
6
|
+
# /forge:review-plan
|
|
7
7
|
|
|
8
8
|
Read the review-plan workflow and follow it.
|
|
9
9
|
|
|
10
10
|
## Locate the Forge plugin
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT:-$(pwd)/.forge}"`
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Execute
|
|
@@ -3,14 +3,14 @@ name: run-sprint
|
|
|
3
3
|
description: Execute all tasks in a sprint (sequential or parallel)
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /
|
|
6
|
+
# /forge:run-sprint
|
|
7
7
|
|
|
8
8
|
Read the run-sprint workflow and follow it.
|
|
9
9
|
|
|
10
10
|
## Locate the Forge plugin
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT:-$(pwd)/.forge}"`
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Execute
|
|
@@ -3,14 +3,14 @@ name: run-task
|
|
|
3
3
|
description: Orchestrate the full plan→implement→review→approve pipeline for a task
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /
|
|
6
|
+
# /forge:run-task
|
|
7
7
|
|
|
8
8
|
Read the run-task workflow and follow it.
|
|
9
9
|
|
|
10
10
|
## Locate the Forge plugin
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT:-$(pwd)/.forge}"`
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Execute
|
|
@@ -3,14 +3,14 @@ name: validate
|
|
|
3
3
|
description: Validate that a task implementation satisfies acceptance criteria
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /
|
|
6
|
+
# /forge:validate
|
|
7
7
|
|
|
8
8
|
Read the validate workflow and follow it.
|
|
9
9
|
|
|
10
10
|
## Locate the Forge plugin
|
|
11
11
|
|
|
12
12
|
```
|
|
13
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
13
|
+
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT:-$(pwd)/.forge}"`
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Execute
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
orchestrator stitches runtime telemetry + judgement into the canonical
|
|
5
5
|
event and emits it. Referenced by meta-orchestrate.md and meta-fix-bug.md.
|
|
6
6
|
|
|
7
|
+
Companion: _fragments/event-vocabulary.md owns the `type` token
|
|
8
|
+
vocabulary (phase→type tables for task/bug/sprint events). This fragment
|
|
9
|
+
owns WHO emits; that one owns WHAT token.
|
|
10
|
+
|
|
7
11
|
PLAN-11 / SLICE-2 (2026-05-14): the LLM no longer hand-builds event JSON.
|
|
8
12
|
Runtime facts (model, provider, eventId, timestamps, iteration, tokens)
|
|
9
13
|
are owned by the orchestrator, never the subagent. The subagent only
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Fragment: Event Type Vocabulary
|
|
2
|
+
|
|
3
|
+
<!-- Canonical phase→type vocabulary for store events (forge-engineering#39).
|
|
4
|
+
This fragment OWNS the `type` token vocabulary; `schemas/event.schema.json`
|
|
5
|
+
mirrors it. Any vocabulary change lands here first, then in the schema enum
|
|
6
|
+
(test-first via tools/__tests__/event-schema-variants.test.cjs), then in
|
|
7
|
+
emitters (forge-cli orchestrators, wfl JS drivers, meta workflows).
|
|
8
|
+
|
|
9
|
+
Companion: _fragments/event-emission-schema.md owns WHO emits (orchestrator
|
|
10
|
+
vs subagent field ownership). This fragment owns WHAT token each phase emits.
|
|
11
|
+
|
|
12
|
+
Invariant: every token emitted by any surface MUST appear in the schema
|
|
13
|
+
enum, and every enum token MUST have a named emitter below. Dead tokens are
|
|
14
|
+
removed (bug-fixed was retired by forge-engineering#39 — defined, never
|
|
15
|
+
emitted by anything). -->
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
|
|
19
|
+
1. **Emitted tokens ⊆ schema enum.** An emitter never invents a token. If a new
|
|
20
|
+
phase outcome needs a token, add it here + the schema enum first.
|
|
21
|
+
2. **`type` is optional** on events. An untyped event is valid (task-pipeline
|
|
22
|
+
events from forge-cli run-task are currently untyped). When a `type` IS set,
|
|
23
|
+
it must come from the tables below.
|
|
24
|
+
3. **Kebab-case for lifecycle tokens.** Underscore names are reserved for the
|
|
25
|
+
`friction` and `skill_usage` event families.
|
|
26
|
+
4. **Conditional fields.** Typed events trigger schema conditionals — see the
|
|
27
|
+
"Requires" column. Driver-emitted skip events have no model/provider; emit
|
|
28
|
+
the literal `"n/a"` for both (never guess a model string — see
|
|
29
|
+
`_fragments/event-emission-schema.md` §Why no example record here).
|
|
30
|
+
5. **Skip reasons ride in `notes`.** `reason` is not a declared event property
|
|
31
|
+
(`additionalProperties: false` rejects it).
|
|
32
|
+
|
|
33
|
+
## Task pipeline (orchestrate_task / run-task / wfl:run-task)
|
|
34
|
+
|
|
35
|
+
| Phase | Pass token | Fail token | Requires |
|
|
36
|
+
|---|---|---|---|
|
|
37
|
+
| plan | `task-planned` | `task-planned` | taskId, phase, iteration |
|
|
38
|
+
| review-plan | `plan-approved` | `review-failed` | taskId, phase, iteration |
|
|
39
|
+
| implement | `task-implemented` | `task-implemented` | taskId, phase, iteration |
|
|
40
|
+
| review-code | `review-passed` | `review-failed` | taskId, phase, iteration |
|
|
41
|
+
| validate | `task-validated` | `review-failed` | taskId, phase, iteration |
|
|
42
|
+
| approve | `task-approved` | `review-failed` | taskId, phase, iteration |
|
|
43
|
+
| commit | `task-committed` | `task-committed` | taskId, phase, iteration |
|
|
44
|
+
|
|
45
|
+
`plan-complete` is a legacy alias accepted by the enum for plan-phase events;
|
|
46
|
+
new emitters use `task-planned`.
|
|
47
|
+
|
|
48
|
+
## Bug pipeline (fix_bug / fix-bug / wfl:fix-bug)
|
|
49
|
+
|
|
50
|
+
| Phase | Pass token | Fail token | Requires |
|
|
51
|
+
|---|---|---|---|
|
|
52
|
+
| pre-loop skip | `bug-skipped` | — | bugId (no phase/iteration; model/provider `"n/a"`) |
|
|
53
|
+
| triage | `bug-triaged` | `bug-triaged` | bugId, phase, iteration |
|
|
54
|
+
| plan-fix | `fix-planned` | `fix-planned` | bugId, phase, iteration |
|
|
55
|
+
| review-plan | `fix-review-passed` | `fix-review-failed` | bugId, phase, iteration |
|
|
56
|
+
| implement | `fix-implemented` | `fix-implemented` | bugId, phase, iteration |
|
|
57
|
+
| review-code | `fix-code-review-passed` | `fix-code-review-failed` | bugId, phase, iteration |
|
|
58
|
+
| approve | `fix-approved` | `fix-revision-requested` | bugId, phase, iteration |
|
|
59
|
+
| commit | `bug-committed` | `bug-commit-failed` | bugId, phase, iteration |
|
|
60
|
+
|
|
61
|
+
Non-review phases emit their single token regardless of outcome (the verdict
|
|
62
|
+
field carries the judgement); review phases (review-plan, review-code, approve)
|
|
63
|
+
select pass/fail on `verdict == "revision"`.
|
|
64
|
+
|
|
65
|
+
## Sprint grain (run_sprint / run-sprint / wfl:run-sprint)
|
|
66
|
+
|
|
67
|
+
| Moment | Token | Requires |
|
|
68
|
+
|---|---|---|
|
|
69
|
+
| before wave loop | `sprint-start` | sprintId (taskCount optional) |
|
|
70
|
+
| before each task dispatch | `task-dispatch` | taskId (convention; phase/iteration carried but not schema-enforced) |
|
|
71
|
+
| sprint finished | `sprint-complete` | taskCount, completedTaskIds, verdict |
|
|
72
|
+
| sprint aborted | `sprint-halted` | haltedAtTaskIndex, haltedAtTaskId, lastError |
|
|
73
|
+
|
|
74
|
+
## Other families
|
|
75
|
+
|
|
76
|
+
| Token | Emitter | Spec |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| `friction` | any persona, drained by orchestrator | `_fragments/friction-emit.md` |
|
|
79
|
+
| `skill_usage` | forge-cli skill-curation telemetry | `event.schema.json` skill_usage conditional |
|
|
80
|
+
|
|
81
|
+
## Out of scope (known follow-ups)
|
|
82
|
+
|
|
83
|
+
- **Feature events** have no lifecycle tokens; feature-related events are
|
|
84
|
+
emitted untyped. Defining a feature vocabulary is a future change to this
|
|
85
|
+
fragment + the enum.
|
|
86
|
+
- **Task-pipeline typed emission in forge-cli** — run-task currently emits
|
|
87
|
+
untyped events (valid under Rule 2); adopting the task table above is
|
|
88
|
+
forward work tracked in forge-engineering#39 step 3.
|
|
@@ -75,12 +75,11 @@ Never set `FORGE_SKIP_WRITE_VALIDATION=1` — operator-only emergency switch.
|
|
|
75
75
|
}
|
|
76
76
|
```
|
|
77
77
|
The orchestrator reads this file directly to compose the collation event narrative. Do NOT call `set-summary` to register it — that would mutate the store in violation of Iron Law 1.
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
```
|
|
78
|
+
- KB link refresh (best-effort; skip if unavailable):
|
|
79
|
+
When running standalone in the Claude Code TUI, invoke via the Skill tool
|
|
80
|
+
(`skill: "forge:refresh-kb-links"`).
|
|
81
|
+
When running as a subagent within forge-cli (Pi runtime), the TS orchestrator
|
|
82
|
+
calls `runRefreshKbLinks` directly after this phase — skip this step.
|
|
84
83
|
```
|
|
85
84
|
|
|
86
85
|
<!-- See _fragments/generation-instructions.md for Generation Instructions template -->
|
|
@@ -27,6 +27,8 @@ deps:
|
|
|
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
29
|
- All store I/O via `forge_store` (or `node .forge/tools/store-cli.cjs`). Never edit `.forge/store/*.json` directly.
|
|
30
|
+
- **Never run `git add`/`git commit`/`git reset` yourself** — `commit-task.cjs` owns staging, boundary checks, committing, and the terminal transition (#40). Your judgement input is the message.
|
|
31
|
+
- **Commit writes NO summary** (`commit` ∉ `VALID_SUMMARY_PHASES` — any `set-summary` is rejected); the tool's terminal `update-status` is this phase's only store write.
|
|
30
32
|
|
|
31
33
|
## Store-Write Verification
|
|
32
34
|
|
|
@@ -36,48 +38,49 @@ deps:
|
|
|
36
38
|
|
|
37
39
|
```
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
- Run: `node .forge/tools/preflight-gate.cjs --phase commit --{entity_kind} {record_id}`
|
|
42
|
-
- Exit 1 (gate failed) → print stderr and HALT. Do not proceed; do not attempt to produce the artifact.
|
|
43
|
-
- Exit 2 (misconfiguration) → print stderr and HALT.
|
|
44
|
-
- Exit 0 → continue.
|
|
41
|
+
0. Entity-mode resolution:
|
|
42
|
+
- Read the kickoff arguments. `--task {id}` → `entity_kind = "task"`, `record_id = {id}`. `--bug {id}` → `entity_kind = "bug"`, `record_id = {id}`.
|
|
45
43
|
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
`node .forge/tools/store-cli.cjs read task {record_id} --json`
|
|
51
|
-
- Extract the `status` field from the JSON output.
|
|
52
|
-
- Allowed states for this phase: `approved`.
|
|
53
|
-
- If the current status is NOT in the allowed set:
|
|
54
|
-
Print the following and HALT (do not proceed):
|
|
55
|
-
`× Task {record_id} is in state '{status}' — /forge:approve must complete first. To run the full pipeline: /forge:run-task {record_id}`
|
|
44
|
+
1. Inspect ONCE (message material only — #40 batched-inspection rule):
|
|
45
|
+
- One `git diff --stat`; at most ONE combined `git diff` if the message needs detail.
|
|
46
|
+
Never per-file diffs, never repeated `git status` — each extra turn re-pays full context.
|
|
47
|
+
- Staging is NOT your decision — the tool derives it from the store record.
|
|
56
48
|
|
|
57
|
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
`
|
|
49
|
+
2. Craft the commit message:
|
|
50
|
+
- Follow project conventions; include the record ID ({taskId} / {bugId}) in the subject.
|
|
51
|
+
- `Co-authored-by:` trailer from the host runtime: Claude Code →
|
|
52
|
+
`Co-authored-by: Claude <noreply@anthropic.com>`; pi / Ollama / other →
|
|
53
|
+
`Co-authored-by: {modelId} <noreply@{provider}.ai>` from the session's `provider` and
|
|
54
|
+
`modelId`; if unresolvable, omit rather than guess. Never hardcode
|
|
55
|
+
`Claude Opus 4.6 <noreply@anthropic.com>` (forge#82 regression).
|
|
56
|
+
- Git's configured `user.name`/`user.email` own authorship; never `--author`.
|
|
61
57
|
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
-
|
|
58
|
+
3. Commit via the tool — ONE call:
|
|
59
|
+
- If the `forge_commit` named tool is available (forgecli): call it —
|
|
60
|
+
`forge_commit({ entity:"{entity_kind}", id:"{record_id}", message:"<message>", trailer:"<line>" })`.
|
|
61
|
+
Never pass the message through a bash string when the typed tool exists.
|
|
62
|
+
- Otherwise (Claude Code): `node .forge/tools/commit-task.cjs --{entity_kind} {record_id} --message "<message>" [--trailer "<Co-authored-by line>"]`
|
|
63
|
+
- The tool owns the choreography: preflight gate (`preflight-gate.cjs --phase commit`
|
|
64
|
+
internally), status precondition (task `approved` / bug `in-progress` — wrong-state runs
|
|
65
|
+
halt with `× {record_id} is in state '{status}' …; /forge:approve must complete first`),
|
|
66
|
+
staging (artifact dir + `summaries.implementation.files_changed` provenance),
|
|
67
|
+
commit-boundary guard (aborts on a pre-staged index), `git commit`, terminal transition
|
|
68
|
+
(task → `committed`; bug → `fixed`, the ONLY post-triage `bug.status` write).
|
|
69
|
+
- On `no files_changed provenance` warning: ONE `git status --porcelain`, then re-run the
|
|
70
|
+
tool with `--also <path>` per source file. Never manual `git add`.
|
|
71
|
+
- Success → JSON with `ok:true`. `committed:true` carries `sha` + `staged`;
|
|
72
|
+
`committed:false, reason:"nothing-to-commit"` is ALSO success (fix already at HEAD /
|
|
73
|
+
staging set clean — the tool still sealed the record's terminal status). Do not
|
|
74
|
+
"fix" a no-op by staging things yourself.
|
|
75
|
+
- Failure (exit 1 / ok:false) → print stderr and HALT — no manual staging, no
|
|
76
|
+
`git reset`, no `--force` retry (operator-gated). Tool file missing → HALT;
|
|
77
|
+
instruct `/forge:update` + `/forge:rebuild tools`.
|
|
78
|
+
- NEVER commit before the tool reports `ok: true` — the premature-commit/reset/redo loop
|
|
79
|
+
is forbidden.
|
|
67
80
|
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
- Append a `Co-authored-by:` trailer crediting the AI assistant that actually ran the session. Resolve the identity from the host runtime: on Claude Code use `Co-authored-by: Claude <noreply@anthropic.com>`; on pi / Ollama / any other runtime use `Co-authored-by: {modelId} <noreply@{provider}.ai>` derived from the session's `provider` and `modelId` (e.g. `Co-authored-by: glm-5.1:cloud <noreply@ollama.ai>`); if neither is resolvable, omit the trailer rather than guess. Do NOT hardcode `Claude Opus 4.6 <noreply@anthropic.com>` — that literal is rejected as a regression of forge#82 (commits authored under the wrong model).
|
|
72
|
-
- Let git's configured `user.name` / `user.email` own the commit author; never pass `--author` to override it.
|
|
73
|
-
|
|
74
|
-
4. Store Finalization:
|
|
75
|
-
- Transitions:
|
|
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.
|
|
78
|
-
|
|
79
|
-
5. Finalize:
|
|
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.
|
|
81
|
+
4. Finalize:
|
|
82
|
+
- No summary, no `set-summary` (see Iron Laws). **Do NOT emit a phase event yourself** —
|
|
83
|
+
the orchestrator owns event emission. Return the tool's JSON result as your phase output.
|
|
81
84
|
```
|
|
82
85
|
|
|
83
86
|
<!-- See _fragments/generation-instructions.md for Generation Instructions template -->
|
|
@@ -83,13 +83,13 @@ deps:
|
|
|
83
83
|
`node .forge/tools/store-cli.cjs update-status task {taskId} status implementing`
|
|
84
84
|
`node .forge/tools/store-cli.cjs update-status task {taskId} status implemented`
|
|
85
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`.
|
|
86
|
-
- **Do NOT emit a phase event yourself.** The orchestrator owns event emission — it composes the canonical event from runtime telemetry
|
|
86
|
+
- **Do NOT emit a phase event yourself.** The orchestrator owns event emission — it composes the canonical event from runtime telemetry plus the SUMMARY you write next. Subagents that call `store-cli emit` for phase events hallucinate runtime facts (Plan 11 / Slice 2). Write the SUMMARY and return.
|
|
87
87
|
|
|
88
88
|
7. Emit Summary Sidecar:
|
|
89
89
|
- Write `IMPLEMENTATION-SUMMARY.json` via `forge_artifact`:
|
|
90
90
|
`forge_artifact({ command:"write", entity:"{entity_kind}", entityId:"{record_id}", artifact:"implementation-summary", content:"<JSON>" })`
|
|
91
|
-
JSON shape: `{"objective":"<one sentence>", "key_changes":["<up to 12 bullets>"], "verdict":"n/a", "written_at":"<ISO 8601>", "artifact_ref":"PROGRESS.md"}`
|
|
92
|
-
|
|
91
|
+
JSON shape: `{"objective":"<one sentence>", "key_changes":["<up to 12 bullets>"], "files_changed":["<path>"], "verdict":"n/a", "written_at":"<ISO 8601>", "artifact_ref":"PROGRESS.md"}`
|
|
92
|
+
- `files_changed`: every repo path this phase changed (one `git status --porcelain`); `commit-task.cjs` stages from it.
|
|
93
93
|
- Then link sidecar to store (task mode):
|
|
94
94
|
`forge_store({ command:"set-summary", args:["{taskId}", "implementation"] })`
|
|
95
95
|
Or (bug mode):
|
|
@@ -279,7 +279,7 @@ node .forge/tools/substitute-placeholders.cjs \
|
|
|
279
279
|
```
|
|
280
280
|
|
|
281
281
|
This overwrites `.forge/personas/`, `.forge/skills/`, `.forge/workflows/`,
|
|
282
|
-
`.forge/templates/`, and `.claude/commands
|
|
282
|
+
`.forge/templates/`, and `.claude/commands/forge/` with the freshly substituted
|
|
283
283
|
base-pack.
|
|
284
284
|
|
|
285
285
|
If `substitute-placeholders.cjs` exits non-zero: halt, report the error to the
|
|
@@ -66,6 +66,22 @@ const SKIP_STATUS = ['blocked', 'escalated', 'fixed', 'abandoned']
|
|
|
66
66
|
// non-review phase (the approve workflow self-escalates if it rejects).
|
|
67
67
|
const REVIEW_ROLES = ['review-plan', 'review-code']
|
|
68
68
|
|
|
69
|
+
// Bug-phase `type` tokens — verbatim port of the canonical table in
|
|
70
|
+
// .forge/workflows/_fragments/event-vocabulary.md § Bug pipeline
|
|
71
|
+
// (forge-engineering#39). The COMPLETE event carries the pass token (or the
|
|
72
|
+
// fail token when a review phase's verdict is "revision"); the START event is
|
|
73
|
+
// always untyped. Keyed by phase ROLE (matches PHASES_A/PHASES_B role names;
|
|
74
|
+
// triage is keyed separately since it runs outside the phase loop).
|
|
75
|
+
const BUG_TYPE_TOKENS = {
|
|
76
|
+
'triage': { pass: 'bug-triaged', fail: 'bug-triaged' },
|
|
77
|
+
'plan': { pass: 'fix-planned', fail: 'fix-planned' },
|
|
78
|
+
'review-plan': { pass: 'fix-review-passed', fail: 'fix-review-failed' },
|
|
79
|
+
'implement': { pass: 'fix-implemented', fail: 'fix-implemented' },
|
|
80
|
+
'review-code': { pass: 'fix-code-review-passed', fail: 'fix-code-review-failed' },
|
|
81
|
+
'approve': { pass: 'fix-approved', fail: 'fix-revision-requested' },
|
|
82
|
+
'commit': { pass: 'bug-committed', fail: 'bug-commit-failed' },
|
|
83
|
+
}
|
|
84
|
+
|
|
69
85
|
// Per-phase model tier — verbatim port of fix_bug.md § Role-to-Tier Mapping.
|
|
70
86
|
// Passed as the `model` opt to agent(); the host resolves the tier name to a model.
|
|
71
87
|
const ROLE_TIER = {
|
|
@@ -160,6 +176,16 @@ function revisionTarget(phases, reviewIdx) {
|
|
|
160
176
|
// The subagent owns ALL shell-dependent side-effects for this phase.
|
|
161
177
|
function runBugPhase(bugId, phase, iter) {
|
|
162
178
|
const sprintId = 'bugs' // virtual sprint dir for all emit/sidecar/progress
|
|
179
|
+
// forge-engineering#39: explicit type-token guidance per
|
|
180
|
+
// .forge/workflows/_fragments/event-vocabulary.md § Bug pipeline. Without
|
|
181
|
+
// it, subagents guessed and leaked the action value into `type`
|
|
182
|
+
// ("start"/"complete" — schema-rejected store residue in events/bugs/).
|
|
183
|
+
const typeTokens = BUG_TYPE_TOKENS[phase.role]
|
|
184
|
+
const typeTokenLine = typeTokens
|
|
185
|
+
? (REVIEW_ROLES.includes(phase.role)
|
|
186
|
+
? 'set type="' + typeTokens.pass + '" when your verdict is Approved, type="' + typeTokens.fail + '" when it is Revision Required.'
|
|
187
|
+
: 'set type="' + typeTokens.pass + '".')
|
|
188
|
+
: 'omit the "type" field entirely (untyped events are valid; this role has no table entry).'
|
|
163
189
|
return agent(
|
|
164
190
|
[
|
|
165
191
|
`You are running a SINGLE pipeline phase for Forge bug ${bugId} (sprint bugs).`,
|
|
@@ -175,11 +201,14 @@ function runBugPhase(bugId, phase, iter) {
|
|
|
175
201
|
' 3a. BEFORE running the phase workflow: note the start timestamp (startTimestamp = new Date().toISOString()).',
|
|
176
202
|
' Emit a start event via `node .forge/tools/store-cli.cjs emit bugs \'{event-json}\'`',
|
|
177
203
|
' with action="start", role="' + phase.role + '", iteration=' + iter + ', startTimestamp and endTimestamp both equal to startTimestamp (0-duration placeholder).',
|
|
204
|
+
' The start event MUST NOT include a "type" field.',
|
|
178
205
|
' 3b. AFTER the phase workflow completes: note the end timestamp (endTimestamp = new Date().toISOString()).',
|
|
179
206
|
' Compute durationMinutes = (new Date(endTimestamp) - new Date(startTimestamp)) / 60000.',
|
|
180
207
|
' Emit a complete event via `node .forge/tools/store-cli.cjs emit bugs \'{event-json}\'`',
|
|
181
|
-
' conforming to `.forge/schemas/event.schema.json` (role, action="complete", phase, iteration=' + iter + ',',
|
|
208
|
+
' conforming to `.forge/schemas/event.schema.json` (role, action="complete", phase, iteration=' + iter + ', bugId,',
|
|
182
209
|
' startTimestamp, endTimestamp, durationMinutes, plus your own model/provider/token usage — do NOT invent placeholder model strings).',
|
|
210
|
+
' COMPLETE-event type (per .forge/workflows/_fragments/event-vocabulary.md): ' + typeTokenLine,
|
|
211
|
+
' NEVER copy the action value ("start"/"complete") into "type" — those tokens are schema-rejected and the event would be dropped.',
|
|
183
212
|
' If `/cost` data is available, also write the token sidecar via the `--sidecar` form. Best-effort; skip silently if unavailable.',
|
|
184
213
|
' Then drain any `.forge/cache/FRICTION-*.jsonl` friction records you produced and emit them as type "friction".',
|
|
185
214
|
phase.role && REVIEW_ROLES.includes(phase.role)
|
|
@@ -230,14 +259,18 @@ const resolved = await agent(
|
|
|
230
259
|
|
|
231
260
|
if (!resolved) throw new Error(`Could not resolve bug record for ${bugId}`)
|
|
232
261
|
|
|
233
|
-
// Pre-loop status guard — fix_bug.md: skip at pre-loop with one
|
|
262
|
+
// Pre-loop status guard — fix_bug.md: skip at pre-loop with one bug-skipped event.
|
|
263
|
+
// Token + payload per _fragments/event-vocabulary.md (forge-engineering#39):
|
|
264
|
+
// bug-skipped requires bugId but no phase/iteration; driver-emitted skips carry
|
|
265
|
+
// model/provider "n/a"; the skip reason rides in "notes" (declared property).
|
|
234
266
|
if (SKIP_STATUS.includes(resolved.bugStatus)) {
|
|
235
267
|
log(`⚠ ${bugId} — status is ${resolved.bugStatus}, skipping run.`)
|
|
236
|
-
// Emit
|
|
268
|
+
// Emit bug-skipped event (not a silent return — Iron Law 3).
|
|
237
269
|
await agent(
|
|
238
270
|
[
|
|
239
|
-
`Emit a
|
|
240
|
-
`Run \`node .forge/tools/store-cli.cjs emit bugs '{"type":"
|
|
271
|
+
`Emit a bug-skipped event for ${bugId}.`,
|
|
272
|
+
`Run \`node .forge/tools/store-cli.cjs emit bugs '{"eventId":"<uuid-v4>","type":"bug-skipped","sprintId":"bugs","bugId":"${bugId}","role":"orchestrator","action":"skipped","notes":"status=${resolved.bugStatus}","startTimestamp":"'$(date -u +%Y-%m-%dT%H:%M:%S.%3NZ)'","endTimestamp":"'$(date -u +%Y-%m-%dT%H:%M:%S.%3NZ)'","durationMinutes":0,"model":"n/a","provider":"n/a"}'\`.`,
|
|
273
|
+
'Replace <uuid-v4> with a UUID v4 string (e.g. crypto.randomUUID()). Do NOT modify any other store records.',
|
|
241
274
|
`Best-effort. Return taskStatus="${resolved.bugStatus}", gatePassed=true, verdict="none", escalated=false, phase="skip", role="orchestrator".`,
|
|
242
275
|
].join(' '),
|
|
243
276
|
{ label: `${bugId}:skip`, phase: 'Skip', schema: BUG_PHASE_RESULT_SCHEMA, model: 'haiku' }
|
|
@@ -268,11 +301,14 @@ let triageResult = await agent(
|
|
|
268
301
|
' 3a. BEFORE running the triage workflow: note the start timestamp (startTimestamp = new Date().toISOString()).',
|
|
269
302
|
' Emit a start event via `node .forge/tools/store-cli.cjs emit bugs \'{event-json}\'`',
|
|
270
303
|
' with action="start", role="triage", iteration=1, startTimestamp and endTimestamp both equal to startTimestamp (0-duration placeholder).',
|
|
304
|
+
' The start event MUST NOT include a "type" field.',
|
|
271
305
|
' 3b. AFTER the triage workflow completes: note the end timestamp (endTimestamp = new Date().toISOString()).',
|
|
272
306
|
' Compute durationMinutes = (new Date(endTimestamp) - new Date(startTimestamp)) / 60000.',
|
|
273
307
|
' Emit a complete event via `node .forge/tools/store-cli.cjs emit bugs \'{event-json}\'`',
|
|
274
|
-
' conforming to `.forge/schemas/event.schema.json` (role, action="complete", phase, iteration=1,',
|
|
308
|
+
' conforming to `.forge/schemas/event.schema.json` (role, action="complete", phase, iteration=1, bugId,',
|
|
275
309
|
' startTimestamp, endTimestamp, durationMinutes, plus your own model/provider/token usage — do NOT invent placeholder model strings).',
|
|
310
|
+
' COMPLETE-event type (per .forge/workflows/_fragments/event-vocabulary.md): set type="bug-triaged".',
|
|
311
|
+
' NEVER copy the action value ("start"/"complete") into "type" — those tokens are schema-rejected and the event would be dropped.',
|
|
276
312
|
' If `/cost` data is available, also write the token sidecar via the `--sidecar` form. Best-effort; skip silently if unavailable.',
|
|
277
313
|
'4. NON-REVIEW phase: return verdict="none".',
|
|
278
314
|
'5. Read `.forge/store/bugs/' + bugId + '.json` and return its final status as taskStatus, plus a one-line note.',
|