@entelligentsia/forgecli 0.20.3 → 1.0.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.
- package/CHANGELOG.md +40 -0
- package/README.md +31 -33
- package/dist/CHANGELOG-forge-plugin.md +118 -0
- package/dist/CHANGELOG-pi.md +24 -1
- package/dist/bin/forgecli.d.ts +2 -0
- package/dist/bin/forgecli.js +6 -0
- package/dist/bin/forgecli.js.map +1 -0
- package/dist/extensions/forgecli/add-pipeline.js +1 -1
- package/dist/extensions/forgecli/add-pipeline.js.map +1 -1
- package/dist/extensions/forgecli/add-task.js +1 -1
- package/dist/extensions/forgecli/add-task.js.map +1 -1
- package/dist/extensions/forgecli/approve.js +17 -2
- package/dist/extensions/forgecli/approve.js.map +1 -1
- package/dist/extensions/forgecli/calibrate.js +11 -8
- package/dist/extensions/forgecli/calibrate.js.map +1 -1
- package/dist/extensions/forgecli/collate.js +1 -1
- package/dist/extensions/forgecli/collate.js.map +1 -1
- package/dist/extensions/forgecli/commit.js +17 -2
- package/dist/extensions/forgecli/commit.js.map +1 -1
- package/dist/extensions/forgecli/enhance.js +1 -1
- package/dist/extensions/forgecli/enhance.js.map +1 -1
- package/dist/extensions/forgecli/fix-bug.d.ts +1 -1
- package/dist/extensions/forgecli/fix-bug.js +14 -6
- package/dist/extensions/forgecli/fix-bug.js.map +1 -1
- package/dist/extensions/forgecli/forge-artifact-tool.d.ts +6 -8
- package/dist/extensions/forgecli/forge-artifact-tool.js +80 -195
- package/dist/extensions/forgecli/forge-artifact-tool.js.map +1 -1
- package/dist/extensions/forgecli/forge-commands.js +57 -18
- package/dist/extensions/forgecli/forge-commands.js.map +1 -1
- package/dist/extensions/forgecli/forge-init/phase4-register.js +6 -7
- package/dist/extensions/forgecli/forge-init/phase4-register.js.map +1 -1
- package/dist/extensions/forgecli/forge-init/run-phases.d.ts +4 -0
- package/dist/extensions/forgecli/forge-init/run-phases.js +304 -0
- package/dist/extensions/forgecli/forge-init/run-phases.js.map +1 -0
- package/dist/extensions/forgecli/forge-init/verifiers.d.ts +14 -5
- package/dist/extensions/forgecli/forge-init/verifiers.js +79 -62
- package/dist/extensions/forgecli/forge-init/verifiers.js.map +1 -1
- package/dist/extensions/forgecli/forge-init.js +131 -76
- package/dist/extensions/forgecli/forge-init.js.map +1 -1
- package/dist/extensions/forgecli/forge-subagent.d.ts +9 -0
- package/dist/extensions/forgecli/forge-subagent.js +11 -6
- package/dist/extensions/forgecli/forge-subagent.js.map +1 -1
- package/dist/extensions/forgecli/forge-tools.d.ts +28 -4
- package/dist/extensions/forgecli/forge-tools.js +122 -73
- package/dist/extensions/forgecli/forge-tools.js.map +1 -1
- package/dist/extensions/forgecli/health-check.js +3 -3
- package/dist/extensions/forgecli/health-check.js.map +1 -1
- package/dist/extensions/forgecli/hook-dispatcher.d.ts +1 -1
- package/dist/extensions/forgecli/hooks/check-update.d.ts +8 -0
- package/dist/extensions/forgecli/hooks/check-update.js +29 -1
- package/dist/extensions/forgecli/hooks/check-update.js.map +1 -1
- package/dist/extensions/forgecli/hooks/post-init-hook.js +6 -6
- package/dist/extensions/forgecli/hooks/post-init-hook.js.map +1 -1
- package/dist/extensions/forgecli/hooks/post-sprint-hook.js +6 -6
- package/dist/extensions/forgecli/hooks/post-sprint-hook.js.map +1 -1
- package/dist/extensions/forgecli/hooks/triage-error.js +1 -0
- package/dist/extensions/forgecli/hooks/triage-error.js.map +1 -1
- package/dist/extensions/forgecli/implement.js +20 -2
- package/dist/extensions/forgecli/implement.js.map +1 -1
- package/dist/extensions/forgecli/index.js +39 -32
- package/dist/extensions/forgecli/index.js.map +1 -1
- package/dist/extensions/forgecli/lib/pipeline-guard.d.ts +41 -0
- package/dist/extensions/forgecli/lib/pipeline-guard.js +100 -0
- package/dist/extensions/forgecli/lib/pipeline-guard.js.map +1 -0
- package/dist/extensions/forgecli/loaders/persona-skill-loader.js +2 -2
- package/dist/extensions/forgecli/loaders/persona-skill-loader.js.map +1 -1
- package/dist/extensions/forgecli/migrate.d.ts +3 -0
- package/dist/extensions/forgecli/migrate.js +4 -2
- package/dist/extensions/forgecli/migrate.js.map +1 -1
- package/dist/extensions/forgecli/plan.js +21 -2
- package/dist/extensions/forgecli/plan.js.map +1 -1
- package/dist/extensions/forgecli/quiz-agent.js +7 -7
- package/dist/extensions/forgecli/quiz-agent.js.map +1 -1
- package/dist/extensions/forgecli/regenerate.js +49 -18
- package/dist/extensions/forgecli/regenerate.js.map +1 -1
- package/dist/extensions/forgecli/remove-command.js +1 -1
- package/dist/extensions/forgecli/remove-command.js.map +1 -1
- package/dist/extensions/forgecli/report-bug.js +1 -1
- package/dist/extensions/forgecli/report-bug.js.map +1 -1
- package/dist/extensions/forgecli/retrospective.js +9 -9
- package/dist/extensions/forgecli/retrospective.js.map +1 -1
- package/dist/extensions/forgecli/review-code.d.ts +13 -0
- package/dist/extensions/forgecli/review-code.js +62 -3
- package/dist/extensions/forgecli/review-code.js.map +1 -1
- package/dist/extensions/forgecli/review-plan.d.ts +13 -0
- package/dist/extensions/forgecli/review-plan.js +65 -3
- package/dist/extensions/forgecli/review-plan.js.map +1 -1
- package/dist/extensions/forgecli/run-task.d.ts +2 -1
- package/dist/extensions/forgecli/run-task.js +48 -4
- package/dist/extensions/forgecli/run-task.js.map +1 -1
- package/dist/extensions/forgecli/skill-curator-subagent.d.ts +2 -1
- package/dist/extensions/forgecli/skill-curator-subagent.js +2 -1
- package/dist/extensions/forgecli/skill-curator-subagent.js.map +1 -1
- package/dist/extensions/forgecli/sprint-intake.js +6 -6
- package/dist/extensions/forgecli/sprint-intake.js.map +1 -1
- package/dist/extensions/forgecli/sprint-plan.js +9 -9
- package/dist/extensions/forgecli/sprint-plan.js.map +1 -1
- package/dist/extensions/forgecli/status-command.js +1 -1
- package/dist/extensions/forgecli/status-command.js.map +1 -1
- package/dist/extensions/forgecli/store-query.js +11 -11
- package/dist/extensions/forgecli/store-query.js.map +1 -1
- package/dist/extensions/forgecli/store-repair.js +7 -7
- package/dist/extensions/forgecli/store-repair.js.map +1 -1
- package/dist/extensions/forgecli/validate.js +17 -2
- package/dist/extensions/forgecli/validate.js.map +1 -1
- package/dist/forge-payload/.base-pack/commands/check-agent.md +22 -0
- package/dist/forge-payload/.base-pack/commands/new-sprint.md +22 -0
- package/dist/forge-payload/.base-pack/commands/plan-sprint.md +22 -0
- package/dist/forge-payload/.base-pack/commands/quiz-agent.md +2 -18
- package/dist/forge-payload/.base-pack/commands/retro.md +22 -0
- package/dist/forge-payload/.base-pack/commands/retrospective.md +2 -18
- package/dist/forge-payload/.base-pack/commands/sprint-intake.md +2 -18
- package/dist/forge-payload/.base-pack/commands/sprint-plan.md +2 -18
- package/dist/forge-payload/.base-pack/workflows/_fragments/friction-emit.md +2 -2
- package/dist/forge-payload/.base-pack/workflows/_fragments/generation-instructions.md +4 -4
- package/dist/forge-payload/.base-pack/workflows/_fragments/iron-laws.md +1 -1
- package/dist/forge-payload/.base-pack/workflows/architect_approve.md +13 -1
- package/dist/forge-payload/.base-pack/workflows/commit_task.md +12 -1
- package/dist/forge-payload/.base-pack/workflows/enhance.md +40 -10
- package/dist/forge-payload/.base-pack/workflows/fix_bug.md +1 -1
- package/dist/forge-payload/.base-pack/workflows/implement_plan.md +14 -2
- package/dist/forge-payload/.base-pack/workflows/migrate_structural.md +2 -2
- package/dist/forge-payload/.base-pack/workflows/orchestrate_task.md +20 -4
- package/dist/forge-payload/.base-pack/workflows/plan_task.md +14 -2
- package/dist/forge-payload/.base-pack/workflows/review_code.md +37 -7
- package/dist/forge-payload/.base-pack/workflows/review_plan.md +36 -6
- package/dist/forge-payload/.base-pack/workflows/run_sprint.md +2 -2
- package/dist/forge-payload/.base-pack/workflows/validate_task.md +37 -7
- package/dist/forge-payload/.claude-plugin/plugin.json +1 -1
- package/dist/forge-payload/.schemas/config.schema.json +0 -5
- package/dist/forge-payload/.schemas/enum-catalog.json +9 -13
- package/dist/forge-payload/.schemas/migrations.json +65 -0
- package/dist/forge-payload/agents/tomoshibi.md +150 -6
- package/dist/forge-payload/commands/add-pipeline.md +1 -1
- package/dist/forge-payload/commands/add-task.md +1 -1
- package/dist/forge-payload/commands/calibrate.md +4 -350
- package/dist/forge-payload/commands/check-agent.md +38 -0
- package/dist/forge-payload/commands/config.md +3 -113
- package/dist/forge-payload/commands/enhance.md +5 -32
- package/dist/forge-payload/commands/health.md +155 -13
- package/dist/forge-payload/commands/init.md +25 -31
- package/dist/forge-payload/commands/migrate.md +6 -154
- package/dist/forge-payload/commands/quiz-agent.md +2 -34
- package/dist/forge-payload/commands/rebuild.md +664 -0
- package/dist/forge-payload/commands/regenerate.md +2 -774
- package/dist/forge-payload/commands/remove.md +10 -13
- package/dist/forge-payload/commands/repair.md +187 -0
- package/dist/forge-payload/commands/search.md +73 -0
- package/dist/forge-payload/commands/status.md +105 -0
- package/dist/forge-payload/commands/store-query.md +2 -69
- package/dist/forge-payload/commands/store-repair.md +2 -183
- package/dist/forge-payload/commands/update-tools.md +4 -50
- package/dist/forge-payload/commands/update.md +64 -58
- package/dist/forge-payload/hooks/check-update.cjs +1 -1
- package/dist/forge-payload/hooks/post-init.cjs +2 -2
- package/dist/forge-payload/hooks/post-sprint.cjs +2 -2
- package/dist/forge-payload/hooks/triage-error.cjs +11 -10
- package/dist/forge-payload/init/phases/phase-1-collect.md +138 -0
- package/dist/forge-payload/init/phases/phase-2-discover.md +127 -0
- package/dist/forge-payload/init/phases/phase-3-materialize.md +113 -0
- package/dist/forge-payload/init/phases/phase-4-register.md +159 -0
- package/dist/forge-payload/integrity.json +21 -24
- package/dist/forge-payload/meta/fragments/tool-discipline.md +22 -0
- package/dist/forge-payload/meta/templates/meta-retro.md +28 -0
- package/dist/forge-payload/meta/workflows/_fragments/friction-emit.md +2 -2
- package/dist/forge-payload/meta/workflows/_fragments/generation-instructions.md +4 -4
- package/dist/forge-payload/meta/workflows/_fragments/iron-laws.md +1 -1
- package/dist/forge-payload/meta/workflows/meta-approve.md +13 -1
- package/dist/forge-payload/meta/workflows/meta-check-agent.md +138 -0
- package/dist/forge-payload/meta/workflows/meta-commit.md +12 -1
- package/dist/forge-payload/meta/workflows/meta-enhance.md +39 -9
- package/dist/forge-payload/meta/workflows/meta-fix-bug.md +1 -1
- package/dist/forge-payload/meta/workflows/meta-implement.md +13 -1
- package/dist/forge-payload/meta/workflows/meta-migrate.md +3 -3
- package/dist/forge-payload/meta/workflows/meta-new-sprint.md +84 -0
- package/dist/forge-payload/meta/workflows/meta-orchestrate.md +20 -4
- package/dist/forge-payload/meta/workflows/meta-plan-sprint.md +152 -0
- package/dist/forge-payload/meta/workflows/meta-plan-task.md +13 -1
- package/dist/forge-payload/meta/workflows/meta-retro.md +73 -0
- package/dist/forge-payload/meta/workflows/meta-review-implementation.md +37 -7
- package/dist/forge-payload/meta/workflows/meta-review-plan.md +36 -6
- package/dist/forge-payload/meta/workflows/meta-validate.md +37 -7
- package/dist/forge-payload/schemas/config.schema.json +0 -5
- package/dist/forge-payload/schemas/enum-catalog.json +9 -13
- package/dist/forge-payload/schemas/structure-manifest.json +6 -8
- package/dist/forge-payload/tools/artifact.cjs +295 -0
- package/dist/forge-payload/tools/banners.cjs +3 -4
- package/dist/forge-payload/tools/build-context-pack.cjs +1 -1
- package/dist/forge-payload/tools/check-structure.cjs +8 -3
- package/dist/forge-payload/tools/store-cli.cjs +67 -7
- package/dist/forge-payload/tools/substitute-placeholders.cjs +1 -1
- package/dist/forge-payload/tools/verify-apply.cjs +75 -0
- package/dist/forge-payload/tools/verify-phase.cjs +259 -0
- package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +0 -17
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +21 -38
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +5 -4
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +5 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/CHANGELOG.md +24 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/file-processor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/file-processor.js +2 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/file-processor.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/output-guard.d.ts +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/output-guard.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/output-guard.js +52 -22
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/output-guard.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js +16 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/package-manager.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +45 -50
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +43 -81
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/file-mutation-queue.js +27 -12
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/file-mutation-queue.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js +2 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/find.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js +3 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/grep.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +5 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/path-utils.d.ts +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/path-utils.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/path-utils.js +37 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/path-utils.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +9 -8
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js +20 -35
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.d.ts +3 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js +64 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-client.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +15 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard-native.d.ts +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard-native.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard-native.js +14 -8
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard-native.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.d.ts +30 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.js +124 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-core.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.d.ts +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.js +31 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize-worker.js.map +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.d.ts +7 -27
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.js +75 -115
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/image-resize.js.map +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/docs/terminal-setup.md +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/sandbox/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/examples/extensions/with-deps/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +12 -14
- package/node_modules/@earendil-works/pi-coding-agent/package.json +5 -5
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +3 -0
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +53 -0
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +4 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +13 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/package.json +2 -2
- package/package.json +6 -6
- package/dist/extensions/forgecli/forge-init/phase-descriptors.d.ts +0 -72
- package/dist/extensions/forgecli/forge-init/phase-descriptors.js +0 -359
- package/dist/extensions/forgecli/forge-init/phase-descriptors.js.map +0 -1
- package/dist/extensions/forgecli/forge-init/prompts.d.ts +0 -10
- package/dist/extensions/forgecli/forge-init/prompts.js +0 -91
- package/dist/extensions/forgecli/forge-init/prompts.js.map +0 -1
- package/dist/extensions/forgecli/lib/store-error-remediation.d.ts +0 -65
- package/dist/extensions/forgecli/lib/store-error-remediation.js +0 -298
- package/dist/extensions/forgecli/lib/store-error-remediation.js.map +0 -1
- package/dist/forge-payload/hooks/check-update.js +0 -378
- package/dist/forge-payload/hooks/forge-permissions.js +0 -164
- package/dist/forge-payload/hooks/triage-error.js +0 -77
- package/dist/forge-payload/hooks/validate-write.js +0 -250
|
@@ -43,9 +43,9 @@ node "$FORGE_ROOT/tools/banners.cjs" --subtitle "Reading the project's pulse —
|
|
|
43
43
|
|
|
44
44
|
`banners.cjs` strips ANSI in `NO_COLOR` / non-tty / `--plain` contexts.
|
|
45
45
|
|
|
46
|
-
Parse `$ARGUMENTS` for
|
|
47
|
-
-
|
|
48
|
-
-
|
|
46
|
+
Parse `$ARGUMENTS` for:
|
|
47
|
+
- `--path <dir>` → `PROJECT_ROOT = <dir>` (absolute or relative to the current working directory — resolve to absolute). If absent, `PROJECT_ROOT = .` (current working directory).
|
|
48
|
+
- `--fix` → `FIX_MODE=true`. When present, run the Fix Phase (drift detection and patch application) after the standard diagnostics. Prompts for confirmation before applying any changes.
|
|
49
49
|
|
|
50
50
|
All file paths below are relative to `PROJECT_ROOT`. All shell tool invocations must be run from `PROJECT_ROOT`:
|
|
51
51
|
```sh
|
|
@@ -70,7 +70,7 @@ cd "$PROJECT_ROOT" && node "$FORGE_ROOT/tools/..."
|
|
|
70
70
|
Do **not** cascade into subsequent checks that may fail on incomplete config.
|
|
71
71
|
2. **KB freshness check** — Read `calibrationBaseline` from `$PROJECT_ROOT/.forge/config.json`.
|
|
72
72
|
- If `calibrationBaseline` is absent, emit:
|
|
73
|
-
> △ No calibration baseline found — run `/forge:
|
|
73
|
+
> △ No calibration baseline found — run `/forge:health --fix` to establish one.
|
|
74
74
|
Skip the freshness check and proceed to step 3.
|
|
75
75
|
- If `calibrationBaseline` exists, compute the current hash of `MASTER_INDEX.md` using the same algorithm as `/forge:init`:
|
|
76
76
|
```sh
|
|
@@ -85,7 +85,7 @@ cd "$PROJECT_ROOT" && node "$FORGE_ROOT/tools/..."
|
|
|
85
85
|
If changes are only in technical sections: emit "technical". If only in business sections: emit "business". If in both: emit "technical + business".
|
|
86
86
|
Emit:
|
|
87
87
|
> △ KB drifted — <category> changes detected since last calibration (last calibrated: `calibrationBaseline.lastCalibrated`)
|
|
88
|
-
> Run `/forge:
|
|
88
|
+
> Run `/forge:health --fix` to re-align the knowledge base.
|
|
89
89
|
3. Read the knowledge base files in `$PROJECT_ROOT/engineering/`
|
|
90
90
|
4. Read the store in `$PROJECT_ROOT/.forge/store/` for sprint/task history
|
|
91
91
|
5. Scan the codebase for entities not in the knowledge base (Grep for model/type definitions)
|
|
@@ -101,7 +101,7 @@ cd "$PROJECT_ROOT" && node "$FORGE_ROOT/tools/..."
|
|
|
101
101
|
If any modified or missing files are reported, include them in the health
|
|
102
102
|
report under **Modified generated files** with the note:
|
|
103
103
|
> These files were manually edited after generation. Regeneration will warn
|
|
104
|
-
> before overwriting them. Run `/forge:
|
|
104
|
+
> before overwriting them. Run `/forge:rebuild` to review and update.
|
|
105
105
|
If all files are pristine (or the tool is absent), omit this section.
|
|
106
106
|
8. Check generated file structure:
|
|
107
107
|
```sh
|
|
@@ -110,7 +110,7 @@ cd "$PROJECT_ROOT" && node "$FORGE_ROOT/tools/..."
|
|
|
110
110
|
If missing files are reported, include them in the health report under
|
|
111
111
|
**Generated file structure** with note:
|
|
112
112
|
> N expected file(s) are missing from generated output. Run `/forge:update` to
|
|
113
|
-
> regenerate missing files, or `/forge:
|
|
113
|
+
> regenerate missing files, or `/forge:rebuild <namespace>` for targeted repair.
|
|
114
114
|
If all files are present (exit 0), emit:
|
|
115
115
|
> 〇 Generated file structure — all expected files present.
|
|
116
116
|
If the tool is absent (file not found), skip this check silently.
|
|
@@ -134,15 +134,15 @@ cd "$PROJECT_ROOT" && node "$FORGE_ROOT/tools/..."
|
|
|
134
134
|
- If any concept doc is older than the newest schema change, emit a notice that it may be stale.
|
|
135
135
|
12. Check persona pack freshness:
|
|
136
136
|
- If `$PROJECT_ROOT/.forge/cache/persona-pack.json` does not exist, emit:
|
|
137
|
-
> △ Persona pack missing — run `/forge:
|
|
137
|
+
> △ Persona pack missing — run `/forge:rebuild` to build it.
|
|
138
138
|
(The pack is consumed by `meta-orchestrate` and `meta-fix-bug` when `FORGE_PROMPT_MODE=reference`.)
|
|
139
139
|
- Otherwise read the pack's `source_hash`, then compute the current hash:
|
|
140
140
|
```sh
|
|
141
141
|
CURRENT=$(node -e "const t=require('$FORGE_ROOT/tools/build-persona-pack.cjs'); console.log(t.computeSourceHash({personaDir:'$FORGE_ROOT/meta/personas', skillDir:'$FORGE_ROOT/meta/skills'}))")
|
|
142
|
-
STORED=$(node -e "console.log(require('$PROJECT_ROOT/.forge/cache/persona-pack.json').source_hash)")
|
|
142
|
+
STORED=$(node -e "try{console.log(require('$PROJECT_ROOT/.forge/cache/persona-pack.json').source_hash)}catch{console.log('MISSING')}")
|
|
143
143
|
```
|
|
144
144
|
If `CURRENT != STORED`, emit:
|
|
145
|
-
> △ Persona pack stale — meta/ has changed since last build. Run `/forge:
|
|
145
|
+
> △ Persona pack stale — meta/ has changed since last build. Run `/forge:rebuild` to refresh.
|
|
146
146
|
Otherwise emit:
|
|
147
147
|
> 〇 Persona pack fresh.
|
|
148
148
|
13. Check context pack freshness:
|
|
@@ -156,14 +156,14 @@ cd "$PROJECT_ROOT" && node "$FORGE_ROOT/tools/..."
|
|
|
156
156
|
```
|
|
157
157
|
- If `engineering/architecture/` does not exist, skip this check silently.
|
|
158
158
|
- If `.forge/cache/context-pack.json` does not exist, emit:
|
|
159
|
-
> △ Context pack missing — run `/forge:
|
|
159
|
+
> △ Context pack missing — run `/forge:rebuild` to build it.
|
|
160
160
|
(The pack is injected by `meta-orchestrate` and `meta-fix-bug` to reduce per-phase architecture reads.)
|
|
161
161
|
- Otherwise read `source_hash` from `.forge/cache/context-pack.json` and compare:
|
|
162
162
|
```sh
|
|
163
163
|
STORED=$(node -e "console.log(require('$PROJECT_ROOT/.forge/cache/context-pack.json').source_hash)")
|
|
164
164
|
```
|
|
165
165
|
If `CURRENT != STORED` (and `CURRENT != 'n/a'`), emit:
|
|
166
|
-
> △ Context pack stale — architecture docs have changed since last build. Run `/forge:
|
|
166
|
+
> △ Context pack stale — architecture docs have changed since last build. Run `/forge:rebuild` to rebuild.
|
|
167
167
|
Otherwise emit:
|
|
168
168
|
> 〇 Context pack fresh.
|
|
169
169
|
14. Check plugin integrity:
|
|
@@ -188,9 +188,150 @@ cd "$PROJECT_ROOT" && node "$FORGE_ROOT/tools/..."
|
|
|
188
188
|
If `--path` was used, open the report with: `Health report for: $PROJECT_ROOT`
|
|
189
189
|
16. Close the report with: `If you've found a bug in Forge itself, run /forge:report-bug`
|
|
190
190
|
|
|
191
|
+
## Health Summary
|
|
192
|
+
|
|
193
|
+
After step 16, emit a pass/fail summary grid. One row per check category; substitute actual check result for status. Omit rows for checks that were skipped (not applicable to the project).
|
|
194
|
+
|
|
195
|
+
| Check | Status |
|
|
196
|
+
|--------------------------------|--------|
|
|
197
|
+
| Config completeness | 〇 |
|
|
198
|
+
| KB freshness | △ |
|
|
199
|
+
| Store integrity | 〇 |
|
|
200
|
+
| Modified generated files | 〇 |
|
|
201
|
+
| Generated file structure | 〇 |
|
|
202
|
+
| Plugin integrity | 〇 |
|
|
203
|
+
| Persona pack freshness | △ |
|
|
204
|
+
| Context pack freshness | 〇 |
|
|
205
|
+
| Skill gaps | 〇 |
|
|
206
|
+
| Feature test coverage | 〇 |
|
|
207
|
+
| Stale docs / orphaned entities | 〇 |
|
|
208
|
+
| Writeback backlog | 〇 |
|
|
209
|
+
| Concepts freshness | 〇 |
|
|
210
|
+
|
|
211
|
+
(Replace each status symbol with the actual result observed: 〇 = pass, △ = warning, × = failure.)
|
|
212
|
+
|
|
213
|
+
## Recommended Actions
|
|
214
|
+
|
|
215
|
+
After the summary grid, emit a "Recommended Actions" section only if one or more checks have a non-passing result (△ or ×). Each finding maps to exactly one command. Use v1.0 command names only.
|
|
216
|
+
|
|
217
|
+
| Finding | Recommended Command |
|
|
218
|
+
|--------------------------------|--------------------------------------------------------------|
|
|
219
|
+
| No calibration baseline | `/forge:health --fix` |
|
|
220
|
+
| KB drifted | `/forge:health --fix` |
|
|
221
|
+
| Store integrity errors | `/forge:repair` |
|
|
222
|
+
| Modified generated files | `/forge:rebuild` |
|
|
223
|
+
| Missing generated files | `/forge:update` |
|
|
224
|
+
| Plugin integrity modified | `/forge:update` |
|
|
225
|
+
| Persona pack missing / stale | `/forge:rebuild` |
|
|
226
|
+
| Context pack missing / stale | `/forge:rebuild` |
|
|
227
|
+
| Skill gaps | `/plugin install <name>` |
|
|
228
|
+
| Features with zero tests | *(no command — note: add tests for the listed FEAT-NNN IDs)* |
|
|
229
|
+
| Stale docs | `/forge:rebuild` |
|
|
230
|
+
| Stale concepts | `/forge:rebuild knowledge-base` |
|
|
231
|
+
| Config incomplete | `/forge:init` |
|
|
232
|
+
|
|
233
|
+
Only emit rows for non-passing findings actually observed. If all checks pass, omit this section entirely.
|
|
234
|
+
|
|
235
|
+
## Fix Phase
|
|
236
|
+
|
|
237
|
+
When `FIX_MODE=true` (i.e. `--fix` was passed), run the following Fix Phase after the standard diagnostics and summary grid. The Fix Phase detects KB drift and applies surgical regeneration patches with user confirmation.
|
|
238
|
+
|
|
239
|
+
**Step 1 — Structural-element readiness check:**
|
|
240
|
+
Verify that the required structural elements for calibration exist:
|
|
241
|
+
- `engineering/MASTER_INDEX.md`
|
|
242
|
+
- `.forge/config.json` with `calibrationBaseline` section (or ready to create it)
|
|
243
|
+
- `$FORGE_ROOT` accessible
|
|
244
|
+
|
|
245
|
+
If any required element is missing, emit an error and stop the Fix Phase:
|
|
246
|
+
> × Fix Phase aborted — required structural elements missing. Run `/forge:init` to set up the project first.
|
|
247
|
+
|
|
248
|
+
**Step 2 — Establish or verify calibration baseline:**
|
|
249
|
+
Read `calibrationBaseline` from `.forge/config.json`.
|
|
250
|
+
- If absent, compute the current `MASTER_INDEX.md` hash (same algorithm as the KB freshness check in step 2 of diagnostics) and write it as the baseline. Emit:
|
|
251
|
+
> ✓ Calibration baseline established.
|
|
252
|
+
- If present and hash matches current, emit:
|
|
253
|
+
> 〇 Calibration baseline is current — no drift detected.
|
|
254
|
+
Skip to Step 9.
|
|
255
|
+
- If present and hash differs, proceed to Step 3.
|
|
256
|
+
|
|
257
|
+
**Step 3 — Detect drift:**
|
|
258
|
+
Compute the diff between the current `MASTER_INDEX.md` content and the version reflected by `calibrationBaseline.masterIndexHash`. Identify which sections have changed.
|
|
259
|
+
|
|
260
|
+
**Step 4 — Categorize drift:**
|
|
261
|
+
Categorize changed sections into four categories:
|
|
262
|
+
- **Technical** — stack, routing, database, deployment, processes, architecture, schemas, conventions, stack-checklist
|
|
263
|
+
- **Business** — entity-model, domain, features, acceptance criteria, business-domain
|
|
264
|
+
- **Retrospective** — sprint retrospectives, lessons learned
|
|
265
|
+
- **Acceptance criteria** — AC definitions, task prompts
|
|
266
|
+
|
|
267
|
+
**Step 5 — Propose patches:**
|
|
268
|
+
Print a **Calibration Drift Report**:
|
|
269
|
+
```
|
|
270
|
+
── Calibration Drift Report ──────────────────────────────
|
|
271
|
+
Drift category: <Technical | Business | Retrospective | Acceptance criteria | (combination)>
|
|
272
|
+
Sections changed: <list>
|
|
273
|
+
|
|
274
|
+
Proposed patches:
|
|
275
|
+
1. Regenerate <target> — <reason>
|
|
276
|
+
2. ...
|
|
277
|
+
|
|
278
|
+
Skipped (no change detected):
|
|
279
|
+
- <targets with no relevant drift>
|
|
280
|
+
──────────────────────────────────────────────────────────
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
Offer the enhancement agent opt-in:
|
|
284
|
+
> Would you like to run the enhancement agent on the regenerated targets? It detects skill gaps and proposes improvements based on the new content. (Optional — recommended for large drift sets.)
|
|
285
|
+
> [Y] Yes, run enhancement agent after patching [n] Skip
|
|
286
|
+
|
|
287
|
+
**Step 6 — Confirmation gate:**
|
|
288
|
+
Prompt the user before applying any changes:
|
|
289
|
+
```
|
|
290
|
+
Apply patches? [Y] Apply all [r] Review individually [n] Skip
|
|
291
|
+
```
|
|
292
|
+
- `Y` → apply all proposed patches
|
|
293
|
+
- `r` → walk through each patch individually, prompting `[Y/n]` per patch
|
|
294
|
+
- `n` → skip all patches and exit the Fix Phase without modifying any files
|
|
295
|
+
|
|
296
|
+
**Step 7 — Execute approved patches:**
|
|
297
|
+
For each approved patch, run:
|
|
298
|
+
```sh
|
|
299
|
+
/forge:rebuild <target>
|
|
300
|
+
```
|
|
301
|
+
where `<target>` is the regeneration target identified in Step 5 (e.g. `knowledge-base`, `workflows`, `personas`).
|
|
302
|
+
|
|
303
|
+
Report each patch as it is applied:
|
|
304
|
+
> ✓ Rebuilt <target>
|
|
305
|
+
|
|
306
|
+
**Step 8 — Update calibration state:**
|
|
307
|
+
After all patches are applied, update `.forge/config.json`:
|
|
308
|
+
- Recompute the current `MASTER_INDEX.md` hash
|
|
309
|
+
- Write the new hash to `calibrationBaseline.masterIndexHash`
|
|
310
|
+
- Update `calibrationBaseline.lastCalibrated` to today's date (ISO 8601, date only)
|
|
311
|
+
- Update `calibrationBaseline.version` to the current Forge plugin version (from `plugin.json`)
|
|
312
|
+
- Append a new entry to `calibrationHistory` with: `{ "date": "<today>", "drift": "<category>", "patchesApplied": <N> }`
|
|
313
|
+
|
|
314
|
+
```sh
|
|
315
|
+
# Use manage-config.cjs for atomic field writes:
|
|
316
|
+
cd "$PROJECT_ROOT" && node "$FORGE_ROOT/tools/manage-config.cjs" set calibrationBaseline.masterIndexHash "<new-hash>"
|
|
317
|
+
node "$FORGE_ROOT/tools/manage-config.cjs" set calibrationBaseline.lastCalibrated "<today>"
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
**Step 9 — Summary:**
|
|
321
|
+
Print the Calibration Complete block:
|
|
322
|
+
```
|
|
323
|
+
── Calibration Complete ──────────────────────────────────
|
|
324
|
+
Patches applied: <N>
|
|
325
|
+
Drift resolved: <category>
|
|
326
|
+
Baseline updated: <today>
|
|
327
|
+
─────────────────────────────────────────────────────────
|
|
328
|
+
```
|
|
329
|
+
Close with:
|
|
330
|
+
> ── Run `/forge:health` to verify knowledge base currency.
|
|
331
|
+
|
|
191
332
|
## Output
|
|
192
333
|
|
|
193
|
-
A health report to stdout — no files modified.
|
|
334
|
+
A health report to stdout — no files modified, unless `--fix` is passed and patches are approved.
|
|
194
335
|
|
|
195
336
|
After the report's findings, close with a single status line that
|
|
196
337
|
reflects the overall verdict (synthesized from check 12's findings):
|
|
@@ -217,6 +358,7 @@ $ARGUMENTS
|
|
|
217
358
|
| Argument | Purpose |
|
|
218
359
|
|----------|---------|
|
|
219
360
|
| `--path <dir>` | Run health check against a different project directory instead of the current working directory. Accepts an absolute path or a path relative to the current directory. |
|
|
361
|
+
| `--fix` | Run KB drift detection and patch application after diagnostics. Prompts for confirmation before applying any changes. |
|
|
220
362
|
|
|
221
363
|
## On error
|
|
222
364
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: init
|
|
3
|
-
description: Use when the current project has no Forge SDLC instance and you need to bootstrap one from scratch
|
|
3
|
+
description: Use when the current project has no Forge SDLC instance and you need to bootstrap one from scratch. Use --migrate to migrate an existing store to Forge format (replaces the removed /forge:migrate command).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /forge:init
|
|
@@ -82,21 +82,31 @@ just emit the phase banner for the resume target phase.
|
|
|
82
82
|
|
|
83
83
|
### Flag handling
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
`--fast` and `--full` are accepted as no-ops for backwards compatibility with
|
|
86
|
+
scripts and CI pipelines. Both flags proceed with the standard 4-phase base-pack
|
|
87
|
+
init. The fast/full distinction was removed in v0.40.0.
|
|
88
|
+
|
|
89
|
+
**`--migrate` flag:** When `$ARGUMENTS` contains `--migrate`, run the store migration
|
|
90
|
+
workflow instead of the standard init. This is the v1.0 replacement for the removed
|
|
91
|
+
`/forge:migrate` command.
|
|
91
92
|
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
1. Check that `.forge/config.json` exists. If it does not, stop and tell the user:
|
|
94
|
+
> "Forge has not been initialised in this project. Run `/forge:init` first, then come back to `/forge:init --migrate`."
|
|
94
95
|
|
|
95
|
-
|
|
96
|
-
-
|
|
96
|
+
2. Check for `--structural` sub-flag in `$ARGUMENTS`:
|
|
97
|
+
- If present, load and run the structural migration workflow:
|
|
98
|
+
Read `"$FORGE_ROOT/meta/workflows/meta-migrate.md"` and follow it.
|
|
99
|
+
- If absent, run the standard store schema migration (Steps 1–7 of the former `migrate.md`):
|
|
100
|
+
Read `"$FORGE_ROOT/meta/workflows/meta-migrate.md"` and follow it, passing
|
|
101
|
+
`--store-schema` so it runs the schema migration path (Steps 2–7).
|
|
97
102
|
|
|
98
|
-
|
|
99
|
-
|
|
103
|
+
3. If `--dry-run` is also present, pass it through so the migration runs Steps 1–4
|
|
104
|
+
only (no writes).
|
|
105
|
+
|
|
106
|
+
4. Do NOT proceed to the Pre-flight Plan when `--migrate` is present.
|
|
107
|
+
|
|
108
|
+
**Proceed directly to Pre-flight Plan** for all other invocations. There is no interactive mode prompt —
|
|
109
|
+
the 4-phase flow is the only flow.
|
|
100
110
|
|
|
101
111
|
### Pre-flight Plan
|
|
102
112
|
|
|
@@ -123,9 +133,8 @@ Start from Phase 1? [Y] or specify phase (1–4): ___
|
|
|
123
133
|
If the user specifies a valid phase (1–4), jump there directly.
|
|
124
134
|
Any other input (including 0, 5+, or non-numeric text) re-prompts with the same table.
|
|
125
135
|
|
|
126
|
-
If a `$ARGUMENTS` phase number
|
|
127
|
-
|
|
128
|
-
to the specified phase.
|
|
136
|
+
If a `$ARGUMENTS` phase number is provided (e.g. `3`), skip the pre-flight
|
|
137
|
+
table and go straight to the specified phase.
|
|
129
138
|
|
|
130
139
|
Read `$FORGE_ROOT/init/sdlc-init.md` — that document is your complete orchestration.
|
|
131
140
|
Follow it exactly. It defines 4 phases:
|
|
@@ -143,21 +152,6 @@ in the project.
|
|
|
143
152
|
|
|
144
153
|
$ARGUMENTS
|
|
145
154
|
|
|
146
|
-
### Mode flags (backwards compatibility)
|
|
147
|
-
|
|
148
|
-
`--fast` and `--full` are accepted for scripted and CI use. Both flags select the
|
|
149
|
-
new 4-phase base-pack init — the distinction between fast and full mode is
|
|
150
|
-
obsolete because base-pack template substitution is instant and always produces
|
|
151
|
-
fully functional (non-stub) workflows.
|
|
152
|
-
|
|
153
|
-
#### Conflicting flags
|
|
154
|
-
|
|
155
|
-
`--fast` and `--full` together halt the run before any write:
|
|
156
|
-
|
|
157
|
-
```
|
|
158
|
-
× Conflicting flags: --fast and --full cannot be combined.
|
|
159
|
-
```
|
|
160
|
-
|
|
161
155
|
## On error
|
|
162
156
|
|
|
163
157
|
If any step above fails unexpectedly, describe what went wrong and ask:
|
|
@@ -1,160 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: migrate
|
|
3
|
-
description:
|
|
3
|
+
description: REMOVED in v1.0 — use /forge:init --migrate instead
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /forge:migrate
|
|
6
|
+
# /forge:migrate — Removed
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
× `/forge:migrate` was removed in v1.0. Store migration is now a flag on `/forge:init`:
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
## Step 0 — Detect migration type
|
|
17
|
-
|
|
18
|
-
Check whether a structural migration (v0.x prose-heavy → v0.40 base-pack
|
|
19
|
-
format) is needed:
|
|
20
|
-
|
|
21
|
-
- If the user passed `--structural` explicitly, OR
|
|
22
|
-
- If `.forge/structure-versions.json` is absent (pre-T05 install detected):
|
|
23
|
-
|
|
24
|
-
→ Load and run the structural migration workflow:
|
|
25
|
-
Read `"$FORGE_ROOT/meta/workflows/meta-migrate.md"` and follow it.
|
|
26
|
-
→ Do NOT proceed to Step 1 of this command.
|
|
27
|
-
|
|
28
|
-
If neither condition applies (post-T05 install and no `--structural` flag):
|
|
29
|
-
continue to Step 1 (store schema migration).
|
|
30
|
-
|
|
31
|
-
## Step 1 — Verify forge:init has run
|
|
32
|
-
|
|
33
|
-
Check that `.forge/config.json` exists. If it does not, stop and tell the user:
|
|
34
|
-
|
|
35
|
-
> "Forge has not been initialised in this project. Run `/forge:init` first, then come back to `/forge:migrate`."
|
|
36
|
-
|
|
37
|
-
Read `.forge/config.json` to get `paths.store` (default: `.forge/store`).
|
|
38
|
-
|
|
39
|
-
## Step 2 — Scan for non-Forge values
|
|
40
|
-
|
|
41
|
-
Read every JSON file under `{paths.store}/sprints/`, `{paths.store}/tasks/`, and `{paths.store}/bugs/`.
|
|
42
|
-
|
|
43
|
-
Collect the distinct values present in each `status` field and `severity` field (bugs only), grouped by record type. Cross-reference against the known Forge enums:
|
|
44
|
-
|
|
45
|
-
**Sprint status:** `planning`, `active`, `completed`, `retrospective-done`, `blocked`, `partially-completed`, `abandoned`
|
|
46
|
-
|
|
47
|
-
**Task status:** `draft`, `planned`, `plan-approved`, `implementing`, `implemented`, `review-approved`, `approved`, `committed`, `plan-revision-required`, `code-revision-required`, `blocked`, `escalated`, `abandoned`
|
|
48
|
-
|
|
49
|
-
**Bug status:** `reported`, `triaged`, `in-progress`, `fixed`, `verified`
|
|
50
|
-
|
|
51
|
-
**Bug severity:** `critical`, `major`, `minor`
|
|
52
|
-
|
|
53
|
-
Report only the values that are **not** already valid Forge enums. If all values are already valid, tell the user:
|
|
54
|
-
|
|
55
|
-
> "Store is already fully Forge-compatible — no migration needed. Run `node \"$FORGE_ROOT/tools/validate-store.cjs\"` to confirm."
|
|
56
|
-
|
|
57
|
-
Then exit.
|
|
58
|
-
|
|
59
|
-
## Step 3 — Interview the user
|
|
60
|
-
|
|
61
|
-
Present the unrecognised values grouped by record type. For each value, ask the user to choose the Forge equivalent (or mark it as custom/skip):
|
|
62
|
-
|
|
63
|
-
```
|
|
64
|
-
Found values not in Forge format. Please map each one:
|
|
65
|
-
|
|
66
|
-
Sprint status:
|
|
67
|
-
"✅ Complete" → ? (Forge options: planning / active / completed / retrospective-done / blocked / partially-completed / abandoned)
|
|
68
|
-
"🔵 In Progress" → ?
|
|
69
|
-
|
|
70
|
-
Task status:
|
|
71
|
-
"✅ Complete" → ?
|
|
72
|
-
"📋 Prompt Ready" → ?
|
|
73
|
-
...
|
|
74
|
-
|
|
75
|
-
Bug severity:
|
|
76
|
-
"Major" → ? (Forge options: critical / major / minor)
|
|
77
|
-
|
|
78
|
-
For each value above, enter the Forge equivalent. Type "skip" to leave that value unchanged (it will remain invalid and fail validate-store).
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Wait for the user to provide the full mapping before proceeding.
|
|
82
|
-
|
|
83
|
-
## Step 4 — Preview changes
|
|
84
|
-
|
|
85
|
-
Count how many records will be affected per type. Show a preview table:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
Migration preview:
|
|
89
|
-
|
|
90
|
-
Sprints: N records — M values will change
|
|
91
|
-
Tasks: N records — M values will change
|
|
92
|
-
Bugs: N records — M values will change
|
|
93
|
-
|
|
94
|
-
Example changes:
|
|
95
|
-
sprints/S01.json status: "✅ Complete" → "completed"
|
|
96
|
-
tasks/WI-T001.json status: "✅ Complete" → "committed"
|
|
97
|
-
bugs/WI-BUG-01.json severity: "Major" → "major"
|
|
98
|
-
|
|
99
|
-
Apply? [Y/n]
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
If the user declines, exit without changes.
|
|
103
|
-
|
|
104
|
-
## Step 5 — Apply migration
|
|
105
|
-
|
|
106
|
-
For each affected record, apply the migration via the store custodian:
|
|
107
|
-
|
|
108
|
-
```sh
|
|
109
|
-
export FORGE_ROOT
|
|
110
|
-
node "$FORGE_ROOT/tools/store-cli.cjs" write <entity> '{updated-json}'
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
where `<entity>` is `sprint`, `task`, or `bug` as appropriate, and
|
|
114
|
-
`'{updated-json}'` is the full record with the mapped field values applied.
|
|
115
|
-
Construct the JSON by reading the current record (using the Read tool or
|
|
116
|
-
`/forge:store read <entity> <id>`), applying only the agreed mapping, and
|
|
117
|
-
passing the complete updated record to the custodian.
|
|
118
|
-
|
|
119
|
-
**Error handling:** If the custodian exits with code 1, read stderr for the
|
|
120
|
-
validation error, fix the data, and retry (max 2 retries). If the command still
|
|
121
|
-
fails after retries, report the validation error to the user and stop. **Never
|
|
122
|
-
fall back to writing store files directly.**
|
|
123
|
-
|
|
124
|
-
Do not modify any field that was not part of the agreed mapping. Do not add or remove fields.
|
|
125
|
-
|
|
126
|
-
## Step 6 — Verify
|
|
127
|
-
|
|
128
|
-
Run:
|
|
129
|
-
|
|
130
|
-
```sh
|
|
131
|
-
export FORGE_ROOT
|
|
132
|
-
node "$FORGE_ROOT/tools/validate-store.cjs" --dry-run
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Report the result. If errors remain (e.g. values the user chose to skip), list them clearly so the user knows what still needs attention.
|
|
136
|
-
|
|
137
|
-
## Step 7 — Close
|
|
138
|
-
|
|
139
|
-
Report a summary:
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
Migration complete:
|
|
143
|
-
N sprint(s) updated
|
|
144
|
-
N task(s) updated
|
|
145
|
-
N bug(s) updated
|
|
146
|
-
|
|
147
|
-
Run /forge:health to check overall knowledge base status.
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## Arguments
|
|
151
|
-
|
|
152
|
-
$ARGUMENTS
|
|
153
|
-
|
|
154
|
-
If the user passes `--dry-run`, run Steps 1–4 only (no writes).
|
|
155
|
-
|
|
156
|
-
## On error
|
|
157
|
-
|
|
158
|
-
If any step above fails unexpectedly, describe what went wrong and ask:
|
|
159
|
-
|
|
160
|
-
> "This looks like a Forge bug. Would you like to file a report to help improve it? Run `/forge:report-bug` — I'll pre-fill the report from this conversation."
|
|
10
|
+
- `/forge:init --migrate` — interviews you to map existing store values to Forge format (equivalent to the old `forge:migrate`)
|
|
11
|
+
- `/forge:init --migrate --structural` — runs structural migration for pre-v0.40 stores
|
|
12
|
+
- `/forge:init --migrate --dry-run` — preview changes without applying them
|
|
@@ -1,38 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: quiz-agent
|
|
3
|
-
description:
|
|
3
|
+
description: Renamed in v1.0 — use /forge:check-agent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Verify that the active agent has correctly read and understood this project's
|
|
9
|
-
knowledge base before beginning a high-stakes task (schema changes, migrations,
|
|
10
|
-
release engineering, significant refactors).
|
|
11
|
-
|
|
12
|
-
## Locate plugin root
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## Arguments
|
|
19
|
-
|
|
20
|
-
$ARGUMENTS
|
|
21
|
-
|
|
22
|
-
## How to Run
|
|
23
|
-
|
|
24
|
-
Read `.forge/workflows/quiz_agent.md` and follow it exactly.
|
|
25
|
-
|
|
26
|
-
Pass `$ARGUMENTS` to the workflow so the agent can include task context in its
|
|
27
|
-
responses if provided.
|
|
28
|
-
|
|
29
|
-
## On error
|
|
30
|
-
|
|
31
|
-
If `.forge/workflows/quiz_agent.md` does not exist, tell the user:
|
|
32
|
-
|
|
33
|
-
> △ The quiz_agent workflow is missing. Run `/forge:regenerate workflows` to
|
|
34
|
-
> regenerate it, then retry.
|
|
35
|
-
|
|
36
|
-
If any other step fails unexpectedly, describe what went wrong and ask:
|
|
37
|
-
|
|
38
|
-
> "This looks like a Forge bug. Would you like to file a report to help improve it? Run `/forge:report-bug` — I'll pre-fill the report from this conversation."
|
|
6
|
+
× /forge:quiz-agent was renamed to /forge:check-agent in v1.0.
|