@entelligentsia/forgecli 0.21.0 → 1.0.3
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 +44 -0
- package/README.md +31 -33
- package/dist/CHANGELOG-forge-plugin.md +142 -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/audience-gate.js +1 -1
- package/dist/extensions/forgecli/audience-gate.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 -2
- package/dist/extensions/forgecli/fix-bug.js +678 -609
- 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 +94 -197
- 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 +26 -0
- package/dist/extensions/forgecli/forge-subagent.js +42 -18
- package/dist/extensions/forgecli/forge-subagent.js.map +1 -1
- package/dist/extensions/forgecli/forge-tools.d.ts +34 -4
- package/dist/extensions/forgecli/forge-tools.js +191 -79
- 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.js +461 -391
- package/dist/extensions/forgecli/run-task.js.map +1 -1
- package/dist/extensions/forgecli/session-registry.d.ts +12 -0
- package/dist/extensions/forgecli/session-registry.js +23 -0
- package/dist/extensions/forgecli/session-registry.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/subagent/caller-context.d.ts +35 -11
- package/dist/extensions/forgecli/subagent/caller-context.js +49 -21
- package/dist/extensions/forgecli/subagent/caller-context.js.map +1 -1
- package/dist/extensions/forgecli/subagent/orchestrator-transcript.d.ts +66 -0
- package/dist/extensions/forgecli/subagent/orchestrator-transcript.js +66 -0
- package/dist/extensions/forgecli/subagent/orchestrator-transcript.js.map +1 -0
- package/dist/extensions/forgecli/subagent/phase-guard.d.ts +34 -0
- package/dist/extensions/forgecli/subagent/phase-guard.js +139 -0
- package/dist/extensions/forgecli/subagent/phase-guard.js.map +1 -0
- package/dist/extensions/forgecli/subagent/phase-summary-map.d.ts +1 -0
- package/dist/extensions/forgecli/subagent/phase-summary-map.js +22 -0
- package/dist/extensions/forgecli/subagent/phase-summary-map.js.map +1 -0
- package/dist/extensions/forgecli/thread-switcher.js +2 -2
- package/dist/extensions/forgecli/thread-switcher.js.map +1 -1
- package/dist/extensions/forgecli/validate.js +17 -2
- package/dist/extensions/forgecli/validate.js.map +1 -1
- package/dist/extensions/forgecli/viewport-events.d.ts +4 -0
- package/dist/extensions/forgecli/viewport-events.js +18 -1
- package/dist/extensions/forgecli/viewport-events.js.map +1 -1
- package/dist/extensions/forgecli/viewport-renderer.d.ts +12 -2
- package/dist/extensions/forgecli/viewport-renderer.js +8 -6
- package/dist/extensions/forgecli/viewport-renderer.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 +6 -6
- package/dist/forge-payload/.base-pack/workflows/fix_bug.md +11 -29
- 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/triage.md +190 -0
- 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 +63 -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 +41 -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-bug-triage.md +210 -0
- 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 +5 -5
- package/dist/forge-payload/meta/workflows/meta-fix-bug.md +11 -29
- 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 +25 -8
- package/dist/forge-payload/tools/artifact.cjs +324 -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/node_modules/@entelligentsia/forge-compress/dist/compressor.d.ts +6 -0
- package/node_modules/@entelligentsia/forge-compress/dist/compressor.js +137 -0
- package/node_modules/@entelligentsia/forge-compress/dist/entropy.d.ts +3 -0
- package/node_modules/@entelligentsia/forge-compress/dist/entropy.js +99 -0
- package/node_modules/@entelligentsia/forge-compress/dist/forge/entity.d.ts +8 -0
- package/node_modules/@entelligentsia/forge-compress/dist/forge/entity.js +149 -0
- package/node_modules/@entelligentsia/forge-compress/dist/forge/index.d.ts +7 -0
- package/node_modules/@entelligentsia/forge-compress/dist/forge/index.js +4 -0
- package/node_modules/@entelligentsia/forge-compress/dist/forge/markdown.d.ts +5 -0
- package/node_modules/@entelligentsia/forge-compress/dist/forge/markdown.js +92 -0
- package/node_modules/@entelligentsia/forge-compress/dist/forge/query.d.ts +7 -0
- package/node_modules/@entelligentsia/forge-compress/dist/forge/query.js +60 -0
- package/node_modules/@entelligentsia/forge-compress/dist/forge/validate.d.ts +1 -0
- package/node_modules/@entelligentsia/forge-compress/dist/forge/validate.js +82 -0
- package/node_modules/@entelligentsia/forge-compress/dist/index.d.ts +6 -0
- package/node_modules/@entelligentsia/forge-compress/dist/index.js +5 -0
- package/node_modules/@entelligentsia/forge-compress/dist/progressive.d.ts +1 -0
- package/node_modules/@entelligentsia/forge-compress/dist/progressive.js +108 -0
- package/node_modules/@entelligentsia/forge-compress/dist/strip.d.ts +4 -0
- package/node_modules/@entelligentsia/forge-compress/dist/strip.js +55 -0
- package/node_modules/@entelligentsia/forge-compress/dist/tokens.d.ts +2 -0
- package/node_modules/@entelligentsia/forge-compress/dist/tokens.js +17 -0
- package/node_modules/@entelligentsia/forge-compress/package.json +45 -0
- package/node_modules/@entelligentsia/forge-compress/src/__tests__/compress.test.ts +409 -0
- package/node_modules/@entelligentsia/forge-compress/src/compressor.ts +147 -0
- package/node_modules/@entelligentsia/forge-compress/src/entropy.ts +105 -0
- package/node_modules/@entelligentsia/forge-compress/src/forge/entity.ts +184 -0
- package/node_modules/@entelligentsia/forge-compress/src/forge/index.ts +10 -0
- package/node_modules/@entelligentsia/forge-compress/src/forge/markdown.ts +122 -0
- package/node_modules/@entelligentsia/forge-compress/src/forge/query.ts +105 -0
- package/node_modules/@entelligentsia/forge-compress/src/forge/validate.ts +86 -0
- package/node_modules/@entelligentsia/forge-compress/src/index.ts +22 -0
- package/node_modules/@entelligentsia/forge-compress/src/progressive.ts +123 -0
- package/node_modules/@entelligentsia/forge-compress/src/strip.ts +58 -0
- package/node_modules/@entelligentsia/forge-compress/src/tokens.ts +19 -0
- package/package.json +10 -15
- 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
|
@@ -1,356 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: calibrate
|
|
3
|
-
description:
|
|
3
|
+
description: REMOVED in v1.0 — use /forge:health --fix instead
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /forge:calibrate
|
|
6
|
+
# /forge:calibrate — Removed
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
by type, propose typed surgical patches as structured regeneration targets,
|
|
10
|
-
gate on explicit Architect approval, and write approved patches to the
|
|
11
|
-
calibration history.
|
|
8
|
+
× `/forge:calibrate` was removed in v1.0. KB drift detection and repair is now handled by `/forge:health --fix` (implemented in T04).
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Read `.forge/config.json`. If it does not exist, stop and tell the user to run
|
|
20
|
-
`/forge:init` first.
|
|
21
|
-
|
|
22
|
-
Resolve tools from the plugin:
|
|
23
|
-
```
|
|
24
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
All tool invocations in this command use `node "$FORGE_ROOT/tools/<tool>.cjs"`.
|
|
28
|
-
|
|
29
|
-
## Arguments
|
|
30
|
-
|
|
31
|
-
$ARGUMENTS
|
|
32
|
-
|
|
33
|
-
| Argument | Purpose |
|
|
34
|
-
|----------|---------|
|
|
35
|
-
| `--path <dir>` | Run calibration against a different project directory instead of the current working directory. Accepts an absolute path or a path relative to the current directory. |
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Step 0 — Structural-element readiness check
|
|
40
|
-
|
|
41
|
-
Before the KB drift check, verify that installed structural elements are current
|
|
42
|
-
with the active plugin version. This check is advisory — it does not block the
|
|
43
|
-
existing KB-level drift detection in Steps 2–8.
|
|
44
|
-
|
|
45
|
-
1. Read current plugin version from `$FORGE_ROOT/.claude-plugin/plugin.json` → `currentVersion`.
|
|
46
|
-
|
|
47
|
-
2. Check for `.forge/structure-versions.json` (relative to `PROJECT_ROOT` — defer
|
|
48
|
-
`PROJECT_ROOT` resolution to Step 1; for this step, assume current working directory
|
|
49
|
-
if `--path` was not yet parsed):
|
|
50
|
-
|
|
51
|
-
- **File present**: Read `basePackVersion` and `currentSnapshot` from the file.
|
|
52
|
-
|
|
53
|
-
- If `basePackVersion === currentVersion`, emit:
|
|
54
|
-
> 〇 Structural elements current — snapshot {currentSnapshot} (plugin v{basePackVersion})
|
|
55
|
-
|
|
56
|
-
- If `basePackVersion !== currentVersion`, emit:
|
|
57
|
-
> △ Structural element drift detected — installed elements were generated from plugin v{basePackVersion}; current plugin is v{currentVersion}. Run `/forge:update` to refresh structural elements.
|
|
58
|
-
|
|
59
|
-
- **File absent**: emit:
|
|
60
|
-
> ◇ structure-versions.json absent — project predates snapshot versioning. Run `/forge:update` to install the versioning system.
|
|
61
|
-
|
|
62
|
-
3. Continue to Step 1 regardless of the readiness check result. The check is informational only.
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## Step 1 — Locate plugin root and config
|
|
67
|
-
|
|
68
|
-
Resolve `$FORGE_ROOT` from `$CLAUDE_PLUGIN_ROOT`.
|
|
69
|
-
|
|
70
|
-
Parse `$ARGUMENTS` for `--path <dir>`:
|
|
71
|
-
- If present, `PROJECT_ROOT = <dir>` (absolute or relative to the current working directory — resolve to absolute).
|
|
72
|
-
- If absent, `PROJECT_ROOT = .` (current working directory).
|
|
73
|
-
|
|
74
|
-
All file paths below are relative to `PROJECT_ROOT`. All shell tool invocations
|
|
75
|
-
must be run from `PROJECT_ROOT`:
|
|
76
|
-
```sh
|
|
77
|
-
cd "$PROJECT_ROOT" && node "$FORGE_ROOT/tools/..."
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Read `$PROJECT_ROOT/.forge/config.json`. If absent, emit:
|
|
81
|
-
> △ No Forge instance found — run `/forge:init` to create one.
|
|
82
|
-
|
|
83
|
-
Exit early.
|
|
84
|
-
|
|
85
|
-
## Step 2 — Establish or verify calibration baseline
|
|
86
|
-
|
|
87
|
-
Read `calibrationBaseline` from `$PROJECT_ROOT/.forge/config.json`.
|
|
88
|
-
|
|
89
|
-
### If absent — auto-initialize
|
|
90
|
-
|
|
91
|
-
When `calibrationBaseline` is missing, compute and write the initial baseline
|
|
92
|
-
using the same algorithm as `/forge:init` Phase 5/6-b:
|
|
93
|
-
|
|
94
|
-
1. Read `$FORGE_ROOT/.claude-plugin/plugin.json` → `version`.
|
|
95
|
-
2. Resolve KB path:
|
|
96
|
-
```sh
|
|
97
|
-
cd "$PROJECT_ROOT" && node -e "const cfg=JSON.parse(require('fs').readFileSync('.forge/config.json','utf8')); console.log((cfg.paths&&cfg.paths.engineering)||'engineering')"
|
|
98
|
-
```
|
|
99
|
-
3. Compute `MASTER_INDEX.md` hash (strip blank lines + `<!--` lines, SHA-256):
|
|
100
|
-
```sh
|
|
101
|
-
cd "$PROJECT_ROOT" && node -e "const crypto=require('crypto'),fs=require('fs'); const cfg=JSON.parse(fs.readFileSync('.forge/config.json','utf8')); const engPath=(cfg.paths&&cfg.paths.engineering)||'engineering'; const lines=fs.readFileSync(engPath+'/MASTER_INDEX.md','utf8').split('\n').filter(l=>l.trim()&&!l.trim().startsWith('<!--')); console.log(crypto.createHash('sha256').update(lines.join('\n')).digest('hex'))"
|
|
102
|
-
```
|
|
103
|
-
4. List completed sprint IDs from `.forge/store/sprints/`:
|
|
104
|
-
```sh
|
|
105
|
-
cd "$PROJECT_ROOT" && node -e "const fs=require('fs'),p='.forge/store/sprints'; try{const files=fs.readdirSync(p).filter(f=>f.endsWith('.json')); const done=files.map(f=>JSON.parse(fs.readFileSync(p+'/'+f,'utf8'))).filter(s=>['done','retrospective-done'].includes(s.status)).map(s=>s.sprintId); console.log(JSON.stringify(done));}catch(e){console.log('[]')}"
|
|
106
|
-
```
|
|
107
|
-
5. Get current date: `date -u +"%Y-%m-%d"`
|
|
108
|
-
6. Write `calibrationBaseline` to config:
|
|
109
|
-
```sh
|
|
110
|
-
cd "$PROJECT_ROOT" && node -e "
|
|
111
|
-
const fs = require('fs');
|
|
112
|
-
const cfgPath = '.forge/config.json';
|
|
113
|
-
const cfg = JSON.parse(fs.readFileSync(cfgPath, 'utf8'));
|
|
114
|
-
cfg.calibrationBaseline = {
|
|
115
|
-
lastCalibrated: '<date>',
|
|
116
|
-
version: '<plugin version>',
|
|
117
|
-
masterIndexHash: '<hash>',
|
|
118
|
-
sprintsCovered: <sprint IDs array>
|
|
119
|
-
};
|
|
120
|
-
fs.writeFileSync(cfgPath, JSON.stringify(cfg, null, 2) + '\n');
|
|
121
|
-
"
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
Emit:
|
|
125
|
-
|
|
126
|
-
> 〇 Baseline established — calibration baseline written to config (version: `{version}`, sprints covered: {N})
|
|
127
|
-
|
|
128
|
-
Exit. The next `/forge:calibrate` run will use this baseline for drift detection.
|
|
129
|
-
|
|
130
|
-
### If present — proceed to drift detection
|
|
131
|
-
|
|
132
|
-
Continue to Step 3.
|
|
133
|
-
|
|
134
|
-
## Step 3 — Detect drift
|
|
135
|
-
|
|
136
|
-
Compute current `MASTER_INDEX.md` hash using the same algorithm as
|
|
137
|
-
`/forge:init` Phase 5:
|
|
138
|
-
|
|
139
|
-
```sh
|
|
140
|
-
cd "$PROJECT_ROOT" && node -e "const crypto=require('crypto'),fs=require('fs'); const cfg=JSON.parse(fs.readFileSync('.forge/config.json','utf8')); const engPath=(cfg.paths&&cfg.paths.engineering)||'engineering'; const lines=fs.readFileSync(engPath+'/MASTER_INDEX.md','utf8').split('\n').filter(l=>l.trim()&&!l.trim().startsWith('<!--')); console.log(crypto.createHash('sha256').update(lines.join('\n')).digest('hex'))"
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Compare against `calibrationBaseline.masterIndexHash` in config:
|
|
144
|
-
|
|
145
|
-
- **Match** — emit:
|
|
146
|
-
|
|
147
|
-
> 〇 KB calibrated — no drift since last calibration (last: `{calibrationBaseline.lastCalibrated}`, version: `{calibrationBaseline.version}`)
|
|
148
|
-
|
|
149
|
-
Exit. No further steps needed.
|
|
150
|
-
|
|
151
|
-
- **Mismatch** — proceed to Step 4.
|
|
152
|
-
|
|
153
|
-
## Step 4 — Categorize drift
|
|
154
|
-
|
|
155
|
-
Read `$PROJECT_ROOT/engineering/MASTER_INDEX.md` and identify which sections
|
|
156
|
-
changed by comparing content areas against the calibration baseline's
|
|
157
|
-
`sprintsCovered`. Read sprint task records from
|
|
158
|
-
`$PROJECT_ROOT/.forge/store/tasks/` and `$PROJECT_ROOT/.forge/store/sprints/`
|
|
159
|
-
to determine what changed since the last calibration.
|
|
160
|
-
|
|
161
|
-
Categorize each detected drift into one of four categories:
|
|
162
|
-
|
|
163
|
-
| Category | Detection Trigger | Regeneration Targets |
|
|
164
|
-
|---|---|---|
|
|
165
|
-
| **Technical** | Changes in stack, routing, database, deployment, processes, architecture, schemas, conventions, stack-checklist sections | `personas:engineer`, `skills:engineer-skills`, `skills:supervisor-skills` |
|
|
166
|
-
| **Business** | Changes in entity-model, domain, features, business-domain sections | `personas` (full rebuild — all personas need contextual awareness) |
|
|
167
|
-
| **Retrospective** | Iron-law learnings from completed sprints since last calibration | `personas:<role>` where role had the gap (user specifies at prompt) |
|
|
168
|
-
| **Acceptance criteria** | New acceptance criteria patterns from sprint outcomes | `personas:product-manager`, `skills:qa-engineer` |
|
|
169
|
-
|
|
170
|
-
For each detected category, build a structured patch entry:
|
|
171
|
-
|
|
172
|
-
```json
|
|
173
|
-
{
|
|
174
|
-
"category": "technical",
|
|
175
|
-
"detectedAt": "<ISO date>",
|
|
176
|
-
"targets": ["personas:engineer", "skills:engineer-skills", "skills:supervisor-skills"],
|
|
177
|
-
"evidence": "<brief description of what changed>"
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Step 5 — Propose patches
|
|
182
|
-
|
|
183
|
-
Present all detected drift categories and their proposed regeneration targets
|
|
184
|
-
to the user. Format:
|
|
185
|
-
|
|
186
|
-
```
|
|
187
|
-
## Calibration Drift Report
|
|
188
|
-
|
|
189
|
-
△ Drift detected — {N} categories since last calibration ({lastCalibrated})
|
|
190
|
-
|
|
191
|
-
### Category 1: Technical
|
|
192
|
-
Evidence: {what changed}
|
|
193
|
-
Proposed regeneration:
|
|
194
|
-
· personas:engineer
|
|
195
|
-
· skills:engineer-skills
|
|
196
|
-
· skills:supervisor-skills
|
|
197
|
-
|
|
198
|
-
### Category 2: Business
|
|
199
|
-
...
|
|
200
|
-
|
|
201
|
-
Apply patches? [Y] Apply all [r] Review individually [n] Skip
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
If no drift categories are detected (hash mismatch but no identifiable
|
|
205
|
-
section-level changes), emit:
|
|
206
|
-
|
|
207
|
-
> △ Drift detected in MASTER_INDEX.md but no specific category changes identified. Run `/forge:regenerate` to do a full rebuild.
|
|
208
|
-
|
|
209
|
-
Exit.
|
|
210
|
-
|
|
211
|
-
### Enhancement agent delegation (structural-element drift)
|
|
212
|
-
|
|
213
|
-
After presenting the KB-level patch proposals above, also offer enhancement agent Phase 3
|
|
214
|
-
for structural-element drift detection. This is an opt-in upgrade path:
|
|
215
|
-
|
|
216
|
-
```
|
|
217
|
-
── Enhancement agent available: run structural-element drift detection?
|
|
218
|
-
This compares .forge/ personas, skills, and workflows against the current codebase state.
|
|
219
|
-
[E] Run enhancement agent (Phase 3) [n] Skip
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
If the user selects `[E]`, read and follow `$FORGE_ROOT/meta/workflows/meta-enhance.md`
|
|
223
|
-
with `--phase 3` explicitly (do not rely on the default). Pass `$PROJECT_ROOT` context.
|
|
224
|
-
The enhancement workflow handles its own approval gate and snapshot creation — return
|
|
225
|
-
to this calibrate flow after it completes.
|
|
226
|
-
|
|
227
|
-
If `meta-enhance.md` is absent (older plugin version), emit:
|
|
228
|
-
|
|
229
|
-
> ◇ Enhancement agent not available — run `/forge:update` to install it.
|
|
230
|
-
|
|
231
|
-
## Step 6 — Architect approval gate
|
|
232
|
-
|
|
233
|
-
For each proposed patch, require explicit approval before any regeneration.
|
|
234
|
-
No changes are applied without Architect sign-off.
|
|
235
|
-
|
|
236
|
-
- **`[Y]`**: Approve all patches and proceed to Step 7.
|
|
237
|
-
- **`[r]`**: Walk through each patch, approve or skip individually.
|
|
238
|
-
- **`[n]`**: Exit without changes.
|
|
239
|
-
|
|
240
|
-
Build the list of approved patches (targets the user confirmed) and the list
|
|
241
|
-
of skipped patches (targets the user declined). Both lists are recorded in
|
|
242
|
-
Step 8.
|
|
243
|
-
|
|
244
|
-
## Step 7 — Execute approved patches
|
|
245
|
-
|
|
246
|
-
For each approved patch target, invoke `/forge:regenerate <category> <sub-target>`
|
|
247
|
-
by reading and following `$FORGE_ROOT/commands/regenerate.md`.
|
|
248
|
-
|
|
249
|
-
Execute in this order (matching the update command's regeneration order):
|
|
250
|
-
1. Personas (full rebuild or single file)
|
|
251
|
-
2. Skills (full rebuild or single file)
|
|
252
|
-
|
|
253
|
-
If any `/forge:regenerate` invocation fails:
|
|
254
|
-
- Record the patch as `applied: false` in the calibration history (Step 8).
|
|
255
|
-
- Emit: `△ Regeneration failed for <target> — skipping.`
|
|
256
|
-
- Continue with remaining approved patches.
|
|
257
|
-
|
|
258
|
-
After all patches are applied (or failed), run the generation manifest check:
|
|
259
|
-
|
|
260
|
-
```sh
|
|
261
|
-
cd "$PROJECT_ROOT" && node "$FORGE_ROOT/tools/check-structure.cjs" --path "$PROJECT_ROOT"
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
If the tool is absent (file not found), skip this check silently.
|
|
265
|
-
|
|
266
|
-
## Step 8 — Update calibration state
|
|
267
|
-
|
|
268
|
-
Recompute the calibration baseline (same algorithm as `/forge:init` Phase 5):
|
|
269
|
-
|
|
270
|
-
1. Compute new `MASTER_INDEX.md` hash:
|
|
271
|
-
```sh
|
|
272
|
-
cd "$PROJECT_ROOT" && node -e "const crypto=require('crypto'),fs=require('fs'); const cfg=JSON.parse(fs.readFileSync('.forge/config.json','utf8')); const engPath=(cfg.paths&&cfg.paths.engineering)||'engineering'; const lines=fs.readFileSync(engPath+'/MASTER_INDEX.md','utf8').split('\n').filter(l=>l.trim()&&!l.trim().startsWith('<!--')); console.log(crypto.createHash('sha256').update(lines.join('\n')).digest('hex'))"
|
|
273
|
-
```
|
|
274
|
-
2. List completed sprint IDs from `.forge/store/sprints/`:
|
|
275
|
-
```sh
|
|
276
|
-
cd "$PROJECT_ROOT" && node -e "const fs=require('fs'),p='.forge/store/sprints'; try{const files=fs.readdirSync(p).filter(f=>f.endsWith('.json')); const done=files.map(f=>JSON.parse(fs.readFileSync(p+'/'+f,'utf8'))).filter(s=>['done','retrospective-done'].includes(s.status)).map(s=>s.sprintId); console.log(JSON.stringify(done));}catch(e){console.log('[]')}"
|
|
277
|
-
```
|
|
278
|
-
3. Get current date: `date -u +"%Y-%m-%d"`
|
|
279
|
-
4. Get current plugin version: read `$FORGE_ROOT/.claude-plugin/plugin.json` → `version`
|
|
280
|
-
|
|
281
|
-
Update `$PROJECT_ROOT/.forge/config.json`:
|
|
282
|
-
1. Replace `calibrationBaseline` with the newly computed values:
|
|
283
|
-
```json
|
|
284
|
-
{
|
|
285
|
-
"lastCalibrated": "<ISO date>",
|
|
286
|
-
"version": "<plugin version>",
|
|
287
|
-
"masterIndexHash": "<new SHA-256 hash>",
|
|
288
|
-
"sprintsCovered": ["<sprint IDs>"]
|
|
289
|
-
}
|
|
290
|
-
```
|
|
291
|
-
2. Append the calibration run entry to the `calibrationHistory` array. If the
|
|
292
|
-
array does not exist yet, create it:
|
|
293
|
-
|
|
294
|
-
```json
|
|
295
|
-
{
|
|
296
|
-
"calibrationHistory": [
|
|
297
|
-
{
|
|
298
|
-
"date": "<ISO date>",
|
|
299
|
-
"version": "<plugin version>",
|
|
300
|
-
"categories": ["technical", "business"],
|
|
301
|
-
"patches": [
|
|
302
|
-
{"target": "personas:engineer", "type": "regenerate", "applied": true},
|
|
303
|
-
{"target": "skills:supervisor-skills", "type": "regenerate", "applied": true},
|
|
304
|
-
{"target": "skills:engineer-skills", "type": "regenerate", "applied": false}
|
|
305
|
-
]
|
|
306
|
-
}
|
|
307
|
-
]
|
|
308
|
-
}
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
Each patch entry records:
|
|
312
|
-
- `target`: the regeneration target (e.g. `personas:engineer`, `skills:supervisor-skills`)
|
|
313
|
-
- `type`: always `"regenerate"` (the only supported patch type)
|
|
314
|
-
- `applied`: `true` if the patch was approved and regeneration succeeded, `false` if skipped or failed
|
|
315
|
-
|
|
316
|
-
Write the updated config using the established pattern:
|
|
317
|
-
```sh
|
|
318
|
-
cd "$PROJECT_ROOT" && node -e "
|
|
319
|
-
const fs = require('fs');
|
|
320
|
-
const cfgPath = '.forge/config.json';
|
|
321
|
-
const cfg = JSON.parse(fs.readFileSync(cfgPath, 'utf8'));
|
|
322
|
-
cfg.calibrationBaseline = { /* new values */ };
|
|
323
|
-
if (!cfg.calibrationHistory) cfg.calibrationHistory = [];
|
|
324
|
-
cfg.calibrationHistory.push({ /* new entry */ });
|
|
325
|
-
fs.writeFileSync(cfgPath, JSON.stringify(cfg, null, 2) + '\n');
|
|
326
|
-
"
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
Alternatively, use `node "$FORGE_ROOT/tools/manage-config.cjs" set` if available.
|
|
330
|
-
|
|
331
|
-
## Step 9 — Summary
|
|
332
|
-
|
|
333
|
-
Emit the final summary:
|
|
334
|
-
|
|
335
|
-
```
|
|
336
|
-
## 〇 Calibration Complete
|
|
337
|
-
|
|
338
|
-
Patches applied: {N} of {M}
|
|
339
|
-
Regenerated: {list of successfully applied targets}
|
|
340
|
-
Baseline updated: {new lastCalibrated date}
|
|
341
|
-
|
|
342
|
-
── Run /forge:health to verify knowledge base currency.
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
If any patches failed, add:
|
|
346
|
-
|
|
347
|
-
```
|
|
348
|
-
△ Failed patches: {list of failed targets}
|
|
349
|
-
── Re-run /forge:calibrate or manually /forge:regenerate the failed targets.
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
## On error
|
|
353
|
-
|
|
354
|
-
If any step above fails unexpectedly, describe what went wrong and ask:
|
|
355
|
-
|
|
356
|
-
> "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
|
+
Run `/forge:health` to check overall knowledge base status.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: check-agent
|
|
3
|
+
description: Verify an agent has loaded and understood the project knowledge base — run a short factual quiz before starting high-stakes tasks
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /forge:check-agent
|
|
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:rebuild 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."
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: config
|
|
3
|
-
description: Inspect
|
|
3
|
+
description: Inspect Forge project configuration.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /forge:config
|
|
7
7
|
|
|
8
|
-
Read
|
|
9
|
-
(currently: `mode`). Other config keys remain managed by their respective
|
|
8
|
+
Read `.forge/config.json` values that are user-facing. Other config keys remain managed by their respective
|
|
10
9
|
commands (e.g. `paths.forgeRoot` is refreshed by `/forge:update`).
|
|
11
10
|
|
|
12
11
|
## Locate the Forge plugin
|
|
@@ -33,14 +32,10 @@ Parse the argument:
|
|
|
33
32
|
|
|
34
33
|
```
|
|
35
34
|
/forge:config # Print summary of .forge/config.json
|
|
36
|
-
/forge:config mode # Print current mode
|
|
37
|
-
/forge:config mode full # Promote fast → full
|
|
38
|
-
/forge:config mode fast # Refused (one-way transition)
|
|
39
35
|
```
|
|
40
36
|
|
|
41
37
|
The command shape is reserved for future expansion (e.g. `/forge:config kb
|
|
42
|
-
<path>`, `/forge:config paths <key> <value>`).
|
|
43
|
-
are implemented today.
|
|
38
|
+
<path>`, `/forge:config paths <key> <value>`).
|
|
44
39
|
|
|
45
40
|
---
|
|
46
41
|
|
|
@@ -52,10 +47,6 @@ For all subcommands, open with a single `north` badge (config = bearings):
|
|
|
52
47
|
node "$FORGE_ROOT/tools/banners.cjs" --badge north
|
|
53
48
|
```
|
|
54
49
|
|
|
55
|
-
Subcommands that change state (`mode full`) also render a `forge` badge
|
|
56
|
-
inside the promotion sequence; subcommands that are read-only just print
|
|
57
|
-
the summary after the badge.
|
|
58
|
-
|
|
59
50
|
`banners.cjs` strips ANSI in `NO_COLOR` / non-tty / `--plain` contexts.
|
|
60
51
|
|
|
61
52
|
---
|
|
@@ -66,7 +57,6 @@ Read `.forge/config.json`. Emit a summary block:
|
|
|
66
57
|
|
|
67
58
|
```
|
|
68
59
|
━━━ Forge Configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
69
|
-
mode: {mode | "unset"}
|
|
70
60
|
version: {version}
|
|
71
61
|
project: {project.name} ({project.prefix})
|
|
72
62
|
|
|
@@ -85,7 +75,6 @@ Read `.forge/config.json`. Emit a summary block:
|
|
|
85
75
|
Use these tool invocations:
|
|
86
76
|
|
|
87
77
|
```sh
|
|
88
|
-
node "$FORGE_ROOT/tools/manage-config.cjs" get mode 2>/dev/null || echo "unset"
|
|
89
78
|
node "$FORGE_ROOT/tools/manage-config.cjs" get version
|
|
90
79
|
node "$FORGE_ROOT/tools/manage-config.cjs" get project
|
|
91
80
|
node "$FORGE_ROOT/tools/manage-config.cjs" get paths
|
|
@@ -96,105 +85,6 @@ This subcommand is **read-only** — it never writes to disk.
|
|
|
96
85
|
|
|
97
86
|
---
|
|
98
87
|
|
|
99
|
-
## Subcommand: `/forge:config mode` — print current mode
|
|
100
|
-
|
|
101
|
-
Read the `mode` field. Print one of:
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
fast
|
|
105
|
-
full
|
|
106
|
-
unset
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Use:
|
|
110
|
-
```sh
|
|
111
|
-
node "$FORGE_ROOT/tools/manage-config.cjs" get mode 2>/dev/null || echo "unset"
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Read-only.
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
## Subcommand: `/forge:config mode full` — promote fast → full
|
|
119
|
-
|
|
120
|
-
Promote the project from fast mode to full mode. This is a one-way
|
|
121
|
-
transition: it materialises every deferred artifact and refreshes everything
|
|
122
|
-
that was already materialised, then writes `mode: full`.
|
|
123
|
-
|
|
124
|
-
### Promotion sequence
|
|
125
|
-
|
|
126
|
-
1. **Read current mode**:
|
|
127
|
-
```sh
|
|
128
|
-
CURRENT_MODE=$(node "$FORGE_ROOT/tools/manage-config.cjs" get mode 2>/dev/null || echo "unset")
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
2. **Short-circuit if already full**:
|
|
132
|
-
- If `CURRENT_MODE == "full"`: emit `〇 Already in full mode. Nothing to do.` and exit 0.
|
|
133
|
-
- If `CURRENT_MODE == "unset"`: treat as `full` (the project predates the
|
|
134
|
-
mode field — it is already a full install). Emit
|
|
135
|
-
`〇 mode is unset (legacy full install). Writing mode: full.`, then jump
|
|
136
|
-
to Step 5 (skip materialize + regenerate, just write the field).
|
|
137
|
-
|
|
138
|
-
3. **Emit promotion banner** (forge badge + em-dash separator):
|
|
139
|
-
```sh
|
|
140
|
-
node "$FORGE_ROOT/tools/banners.cjs" --badge forge
|
|
141
|
-
```
|
|
142
|
-
```
|
|
143
|
-
━━━ Promoting to Full Mode ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
4. **Run materialize-all**: read `$FORGE_ROOT/commands/materialize.md` and
|
|
147
|
-
follow the **Full warm-up** branch (no arguments). This fills any
|
|
148
|
-
missing or stubbed personas, skills, templates, and workflows.
|
|
149
|
-
|
|
150
|
-
This step is intentionally invoked by reading the rulebook — do not
|
|
151
|
-
inline its logic. If materialize errors, surface the error and stop;
|
|
152
|
-
do not write `mode: full`.
|
|
153
|
-
|
|
154
|
-
5. **Run default regenerate**: read `$FORGE_ROOT/commands/regenerate.md`
|
|
155
|
-
and follow the **Default (no argument)** branch. With everything now
|
|
156
|
-
materialised, every artifact gets refreshed against the current
|
|
157
|
-
meta-definitions.
|
|
158
|
-
|
|
159
|
-
If regenerate errors, surface the error and stop; do not write
|
|
160
|
-
`mode: full`.
|
|
161
|
-
|
|
162
|
-
6. **Write `mode: full`**:
|
|
163
|
-
```sh
|
|
164
|
-
node "$FORGE_ROOT/tools/manage-config.cjs" set mode full
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
7. **Emit completion**:
|
|
168
|
-
```
|
|
169
|
-
〇 Promoted to full mode.
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
### Invariant
|
|
173
|
-
|
|
174
|
-
This is the only code path in the Forge plugin that writes `mode: full`
|
|
175
|
-
after initial install. `regenerate` and `materialize` are
|
|
176
|
-
mode-neutral — they read mode but never write it.
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## Subcommand: `/forge:config mode fast` — refused
|
|
181
|
-
|
|
182
|
-
Read the current mode.
|
|
183
|
-
|
|
184
|
-
- If `CURRENT_MODE == "fast"` (or `unset`): emit
|
|
185
|
-
`〇 Already in fast mode.` and exit 0.
|
|
186
|
-
- Otherwise: emit and exit non-zero (status 1):
|
|
187
|
-
```
|
|
188
|
-
× Cannot downgrade full → fast. Use /forge:remove and re-init to reset.
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
There is no automatic full → fast transition — the artefacts that were
|
|
192
|
-
materialised in full mode are real files with content; "demoting" them
|
|
193
|
-
would mean deleting work without telling the user what was lost. The
|
|
194
|
-
remove-and-re-init path is the explicit, observable way to reset.
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
88
|
## On error
|
|
199
89
|
|
|
200
90
|
If any step above fails unexpectedly, describe what went wrong and ask:
|
|
@@ -1,38 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: enhance
|
|
3
|
-
description:
|
|
3
|
+
description: REMOVED in v1.0 — use /forge:rebuild --enrich instead
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /forge:enhance
|
|
6
|
+
# /forge:enhance — Removed
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
operates in three modes selected by the `--phase` flag.
|
|
8
|
+
× `/forge:enhance` was removed in v1.0. Enhancement is now a flag on `/forge:rebuild`:
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
FORGE_ROOT: !`echo "${CLAUDE_PLUGIN_ROOT}"`
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Read `$FORGE_ROOT/meta/workflows/meta-enhance.md` and follow it. Pass `$ARGUMENTS` through
|
|
18
|
-
so the workflow receives the phase flag and any other options.
|
|
19
|
-
|
|
20
|
-
## Arguments
|
|
21
|
-
|
|
22
|
-
$ARGUMENTS
|
|
23
|
-
|
|
24
|
-
| Flag | Purpose |
|
|
25
|
-
|------|---------|
|
|
26
|
-
| `--phase 1` | Auto-apply: fill unsubstituted `{{KEY}}` placeholders using codebase signals (post-init mode) |
|
|
27
|
-
| `--phase 2` | Propose diffs: scan sprint artifacts and friction events; propose persona/skill enrichments for user review |
|
|
28
|
-
| `--phase 3` | Drift detection: full codebase vs structural-element comparison; propose targeted patches |
|
|
29
|
-
| `--auto` | Synonym for `--phase 1` — used by the post-init hook (T09) |
|
|
30
|
-
|
|
31
|
-
Default: `--phase 3` when no flag is provided.
|
|
32
|
-
|
|
33
|
-
## On error
|
|
34
|
-
|
|
35
|
-
If the enhancement workflow is not found at `$FORGE_ROOT/meta/workflows/meta-enhance.md`,
|
|
36
|
-
emit:
|
|
37
|
-
|
|
38
|
-
> △ meta-enhance.md not found — your installed Forge version may predate the enhancement agent. Run `/forge:update` to upgrade.
|
|
10
|
+
- `/forge:rebuild --enrich` — runs the full enhancement workflow (Phase 2 KB enrichment + Phase 3 drift detection)
|
|
11
|
+
- Enhancement hooks (post-init `--auto`, post-sprint `--phase 2`) continue to fire automatically — no action needed
|