@accelerator-mzq/forge 1.4.0
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/LICENSE +21 -0
- package/LICENSE-THIRD-PARTY.md +50 -0
- package/README.md +159 -0
- package/dist/cli/commands/ack.d.ts +7 -0
- package/dist/cli/commands/ack.d.ts.map +1 -0
- package/dist/cli/commands/ack.js +223 -0
- package/dist/cli/commands/ack.js.map +1 -0
- package/dist/cli/commands/archive.d.ts +44 -0
- package/dist/cli/commands/archive.d.ts.map +1 -0
- package/dist/cli/commands/archive.js +689 -0
- package/dist/cli/commands/archive.js.map +1 -0
- package/dist/cli/commands/backlog.d.ts +3 -0
- package/dist/cli/commands/backlog.d.ts.map +1 -0
- package/dist/cli/commands/backlog.js +55 -0
- package/dist/cli/commands/backlog.js.map +1 -0
- package/dist/cli/commands/config.d.ts +3 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +107 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/evidence.d.ts +7 -0
- package/dist/cli/commands/evidence.d.ts.map +1 -0
- package/dist/cli/commands/evidence.js +662 -0
- package/dist/cli/commands/evidence.js.map +1 -0
- package/dist/cli/commands/finding.d.ts +3 -0
- package/dist/cli/commands/finding.d.ts.map +1 -0
- package/dist/cli/commands/finding.js +93 -0
- package/dist/cli/commands/finding.js.map +1 -0
- package/dist/cli/commands/init.d.ts +3 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +126 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/legacy-bridge.d.ts +11 -0
- package/dist/cli/commands/legacy-bridge.d.ts.map +1 -0
- package/dist/cli/commands/legacy-bridge.js +586 -0
- package/dist/cli/commands/legacy-bridge.js.map +1 -0
- package/dist/cli/commands/migrate.d.ts +3 -0
- package/dist/cli/commands/migrate.d.ts.map +1 -0
- package/dist/cli/commands/migrate.js +34 -0
- package/dist/cli/commands/migrate.js.map +1 -0
- package/dist/cli/commands/monitor.d.ts +3 -0
- package/dist/cli/commands/monitor.d.ts.map +1 -0
- package/dist/cli/commands/monitor.js +113 -0
- package/dist/cli/commands/monitor.js.map +1 -0
- package/dist/cli/commands/preflight.d.ts +7 -0
- package/dist/cli/commands/preflight.d.ts.map +1 -0
- package/dist/cli/commands/preflight.js +63 -0
- package/dist/cli/commands/preflight.js.map +1 -0
- package/dist/cli/commands/scope.d.ts +3 -0
- package/dist/cli/commands/scope.d.ts.map +1 -0
- package/dist/cli/commands/scope.js +32 -0
- package/dist/cli/commands/scope.js.map +1 -0
- package/dist/cli/commands/stage-extensions.d.ts +45 -0
- package/dist/cli/commands/stage-extensions.d.ts.map +1 -0
- package/dist/cli/commands/stage-extensions.js +590 -0
- package/dist/cli/commands/stage-extensions.js.map +1 -0
- package/dist/cli/commands/update.d.ts +3 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.js +98 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/commands/upgrade.d.ts +3 -0
- package/dist/cli/commands/upgrade.d.ts.map +1 -0
- package/dist/cli/commands/upgrade.js +277 -0
- package/dist/cli/commands/upgrade.js.map +1 -0
- package/dist/cli/commands/validate.d.ts +3 -0
- package/dist/cli/commands/validate.d.ts.map +1 -0
- package/dist/cli/commands/validate.js +66 -0
- package/dist/cli/commands/validate.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +69 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/ack-log.d.ts +107 -0
- package/dist/core/ack-log.d.ts.map +1 -0
- package/dist/core/ack-log.js +197 -0
- package/dist/core/ack-log.js.map +1 -0
- package/dist/core/archive/ack-log-consistency.d.ts +15 -0
- package/dist/core/archive/ack-log-consistency.d.ts.map +1 -0
- package/dist/core/archive/ack-log-consistency.js +164 -0
- package/dist/core/archive/ack-log-consistency.js.map +1 -0
- package/dist/core/archive/fence.d.ts +66 -0
- package/dist/core/archive/fence.d.ts.map +1 -0
- package/dist/core/archive/fence.js +218 -0
- package/dist/core/archive/fence.js.map +1 -0
- package/dist/core/archive/index.d.ts +4 -0
- package/dist/core/archive/index.d.ts.map +1 -0
- package/dist/core/archive/index.js +6 -0
- package/dist/core/archive/index.js.map +1 -0
- package/dist/core/archive/legacy-exemption.d.ts +14 -0
- package/dist/core/archive/legacy-exemption.d.ts.map +1 -0
- package/dist/core/archive/legacy-exemption.js +82 -0
- package/dist/core/archive/legacy-exemption.js.map +1 -0
- package/dist/core/archive/lock.d.ts +46 -0
- package/dist/core/archive/lock.d.ts.map +1 -0
- package/dist/core/archive/lock.js +98 -0
- package/dist/core/archive/lock.js.map +1 -0
- package/dist/core/archive/pause-decisions-fence.d.ts +13 -0
- package/dist/core/archive/pause-decisions-fence.d.ts.map +1 -0
- package/dist/core/archive/pause-decisions-fence.js +384 -0
- package/dist/core/archive/pause-decisions-fence.js.map +1 -0
- package/dist/core/archive/process-evidence-fence.d.ts +110 -0
- package/dist/core/archive/process-evidence-fence.d.ts.map +1 -0
- package/dist/core/archive/process-evidence-fence.js +449 -0
- package/dist/core/archive/process-evidence-fence.js.map +1 -0
- package/dist/core/archive/process-evidence-rerun.d.ts +9 -0
- package/dist/core/archive/process-evidence-rerun.d.ts.map +1 -0
- package/dist/core/archive/process-evidence-rerun.js +238 -0
- package/dist/core/archive/process-evidence-rerun.js.map +1 -0
- package/dist/core/archive/recover-prompt.d.ts +10 -0
- package/dist/core/archive/recover-prompt.d.ts.map +1 -0
- package/dist/core/archive/recover-prompt.js +29 -0
- package/dist/core/archive/recover-prompt.js.map +1 -0
- package/dist/core/archive/recover.d.ts +83 -0
- package/dist/core/archive/recover.d.ts.map +1 -0
- package/dist/core/archive/recover.js +219 -0
- package/dist/core/archive/recover.js.map +1 -0
- package/dist/core/archive/resume-summary.d.ts +22 -0
- package/dist/core/archive/resume-summary.d.ts.map +1 -0
- package/dist/core/archive/resume-summary.js +82 -0
- package/dist/core/archive/resume-summary.js.map +1 -0
- package/dist/core/archive/summary-builder.d.ts +28 -0
- package/dist/core/archive/summary-builder.d.ts.map +1 -0
- package/dist/core/archive/summary-builder.js +287 -0
- package/dist/core/archive/summary-builder.js.map +1 -0
- package/dist/core/archive/summary-render.d.ts +8 -0
- package/dist/core/archive/summary-render.d.ts.map +1 -0
- package/dist/core/archive/summary-render.js +64 -0
- package/dist/core/archive/summary-render.js.map +1 -0
- package/dist/core/archive/three-level-fence.d.ts +10 -0
- package/dist/core/archive/three-level-fence.d.ts.map +1 -0
- package/dist/core/archive/three-level-fence.js +93 -0
- package/dist/core/archive/three-level-fence.js.map +1 -0
- package/dist/core/archive/transaction.d.ts +41 -0
- package/dist/core/archive/transaction.d.ts.map +1 -0
- package/dist/core/archive/transaction.js +184 -0
- package/dist/core/archive/transaction.js.map +1 -0
- package/dist/core/archive/verify-findings-fence.d.ts +11 -0
- package/dist/core/archive/verify-findings-fence.d.ts.map +1 -0
- package/dist/core/archive/verify-findings-fence.js +80 -0
- package/dist/core/archive/verify-findings-fence.js.map +1 -0
- package/dist/core/archive/version-retrograde-fence.d.ts +10 -0
- package/dist/core/archive/version-retrograde-fence.d.ts.map +1 -0
- package/dist/core/archive/version-retrograde-fence.js +103 -0
- package/dist/core/archive/version-retrograde-fence.js.map +1 -0
- package/dist/core/artifact-graph/builder.d.ts +16 -0
- package/dist/core/artifact-graph/builder.d.ts.map +1 -0
- package/dist/core/artifact-graph/builder.js +32 -0
- package/dist/core/artifact-graph/builder.js.map +1 -0
- package/dist/core/artifact-graph/index.d.ts +3 -0
- package/dist/core/artifact-graph/index.d.ts.map +1 -0
- package/dist/core/artifact-graph/index.js +4 -0
- package/dist/core/artifact-graph/index.js.map +1 -0
- package/dist/core/artifact-graph/types.d.ts +14 -0
- package/dist/core/artifact-graph/types.d.ts.map +1 -0
- package/dist/core/artifact-graph/types.js +2 -0
- package/dist/core/artifact-graph/types.js.map +1 -0
- package/dist/core/backlog/assets/backlog-readme.md +11 -0
- package/dist/core/backlog/index.d.ts +20 -0
- package/dist/core/backlog/index.d.ts.map +1 -0
- package/dist/core/backlog/index.js +60 -0
- package/dist/core/backlog/index.js.map +1 -0
- package/dist/core/backlog/render.d.ts +51 -0
- package/dist/core/backlog/render.d.ts.map +1 -0
- package/dist/core/backlog/render.js +196 -0
- package/dist/core/backlog/render.js.map +1 -0
- package/dist/core/bootstrap/index.d.ts +2 -0
- package/dist/core/bootstrap/index.d.ts.map +1 -0
- package/dist/core/bootstrap/index.js +5 -0
- package/dist/core/bootstrap/index.js.map +1 -0
- package/dist/core/canonical-json.d.ts +11 -0
- package/dist/core/canonical-json.d.ts.map +1 -0
- package/dist/core/canonical-json.js +43 -0
- package/dist/core/canonical-json.js.map +1 -0
- package/dist/core/git/utils.d.ts +27 -0
- package/dist/core/git/utils.d.ts.map +1 -0
- package/dist/core/git/utils.js +53 -0
- package/dist/core/git/utils.js.map +1 -0
- package/dist/core/harness-adapters/claude.d.ts +13 -0
- package/dist/core/harness-adapters/claude.d.ts.map +1 -0
- package/dist/core/harness-adapters/claude.js +53 -0
- package/dist/core/harness-adapters/claude.js.map +1 -0
- package/dist/core/harness-adapters/codex.d.ts +14 -0
- package/dist/core/harness-adapters/codex.d.ts.map +1 -0
- package/dist/core/harness-adapters/codex.js +60 -0
- package/dist/core/harness-adapters/codex.js.map +1 -0
- package/dist/core/harness-adapters/detector.d.ts +15 -0
- package/dist/core/harness-adapters/detector.d.ts.map +1 -0
- package/dist/core/harness-adapters/detector.js +45 -0
- package/dist/core/harness-adapters/detector.js.map +1 -0
- package/dist/core/harness-adapters/hash-compare.d.ts +21 -0
- package/dist/core/harness-adapters/hash-compare.d.ts.map +1 -0
- package/dist/core/harness-adapters/hash-compare.js +49 -0
- package/dist/core/harness-adapters/hash-compare.js.map +1 -0
- package/dist/core/harness-adapters/index.d.ts +8 -0
- package/dist/core/harness-adapters/index.d.ts.map +1 -0
- package/dist/core/harness-adapters/index.js +8 -0
- package/dist/core/harness-adapters/index.js.map +1 -0
- package/dist/core/harness-adapters/interface.d.ts +52 -0
- package/dist/core/harness-adapters/interface.d.ts.map +1 -0
- package/dist/core/harness-adapters/interface.js +3 -0
- package/dist/core/harness-adapters/interface.js.map +1 -0
- package/dist/core/harness-adapters/legacy-detector.d.ts +14 -0
- package/dist/core/harness-adapters/legacy-detector.d.ts.map +1 -0
- package/dist/core/harness-adapters/legacy-detector.js +83 -0
- package/dist/core/harness-adapters/legacy-detector.js.map +1 -0
- package/dist/core/harness-adapters/transaction.d.ts +12 -0
- package/dist/core/harness-adapters/transaction.d.ts.map +1 -0
- package/dist/core/harness-adapters/transaction.js +113 -0
- package/dist/core/harness-adapters/transaction.js.map +1 -0
- package/dist/core/harness-adapters/types.d.ts +45 -0
- package/dist/core/harness-adapters/types.d.ts.map +1 -0
- package/dist/core/harness-adapters/types.js +3 -0
- package/dist/core/harness-adapters/types.js.map +1 -0
- package/dist/core/hash/content.d.ts +10 -0
- package/dist/core/hash/content.d.ts.map +1 -0
- package/dist/core/hash/content.js +131 -0
- package/dist/core/hash/content.js.map +1 -0
- package/dist/core/hash/diff.d.ts +26 -0
- package/dist/core/hash/diff.d.ts.map +1 -0
- package/dist/core/hash/diff.js +40 -0
- package/dist/core/hash/diff.js.map +1 -0
- package/dist/core/hash/index.d.ts +6 -0
- package/dist/core/hash/index.d.ts.map +1 -0
- package/dist/core/hash/index.js +7 -0
- package/dist/core/hash/index.js.map +1 -0
- package/dist/core/hash/log.d.ts +7 -0
- package/dist/core/hash/log.d.ts.map +1 -0
- package/dist/core/hash/log.js +14 -0
- package/dist/core/hash/log.js.map +1 -0
- package/dist/core/hash/tasks.d.ts +9 -0
- package/dist/core/hash/tasks.d.ts.map +1 -0
- package/dist/core/hash/tasks.js +20 -0
- package/dist/core/hash/tasks.js.map +1 -0
- package/dist/core/legacy-bridge/ack.d.ts +30 -0
- package/dist/core/legacy-bridge/ack.d.ts.map +1 -0
- package/dist/core/legacy-bridge/ack.js +133 -0
- package/dist/core/legacy-bridge/ack.js.map +1 -0
- package/dist/core/legacy-bridge/anchors.d.ts +15 -0
- package/dist/core/legacy-bridge/anchors.d.ts.map +1 -0
- package/dist/core/legacy-bridge/anchors.js +119 -0
- package/dist/core/legacy-bridge/anchors.js.map +1 -0
- package/dist/core/legacy-bridge/budget.d.ts +39 -0
- package/dist/core/legacy-bridge/budget.d.ts.map +1 -0
- package/dist/core/legacy-bridge/budget.js +83 -0
- package/dist/core/legacy-bridge/budget.js.map +1 -0
- package/dist/core/legacy-bridge/conflict.d.ts +44 -0
- package/dist/core/legacy-bridge/conflict.d.ts.map +1 -0
- package/dist/core/legacy-bridge/conflict.js +105 -0
- package/dist/core/legacy-bridge/conflict.js.map +1 -0
- package/dist/core/legacy-bridge/diff-report.d.ts +14 -0
- package/dist/core/legacy-bridge/diff-report.d.ts.map +1 -0
- package/dist/core/legacy-bridge/diff-report.js +105 -0
- package/dist/core/legacy-bridge/diff-report.js.map +1 -0
- package/dist/core/legacy-bridge/encoding.d.ts +42 -0
- package/dist/core/legacy-bridge/encoding.d.ts.map +1 -0
- package/dist/core/legacy-bridge/encoding.js +104 -0
- package/dist/core/legacy-bridge/encoding.js.map +1 -0
- package/dist/core/legacy-bridge/excel.d.ts +32 -0
- package/dist/core/legacy-bridge/excel.d.ts.map +1 -0
- package/dist/core/legacy-bridge/excel.js +124 -0
- package/dist/core/legacy-bridge/excel.js.map +1 -0
- package/dist/core/legacy-bridge/hash-anchor.d.ts +23 -0
- package/dist/core/legacy-bridge/hash-anchor.d.ts.map +1 -0
- package/dist/core/legacy-bridge/hash-anchor.js +55 -0
- package/dist/core/legacy-bridge/hash-anchor.js.map +1 -0
- package/dist/core/legacy-bridge/indexer.d.ts +28 -0
- package/dist/core/legacy-bridge/indexer.d.ts.map +1 -0
- package/dist/core/legacy-bridge/indexer.js +145 -0
- package/dist/core/legacy-bridge/indexer.js.map +1 -0
- package/dist/core/legacy-bridge/mapper.d.ts +40 -0
- package/dist/core/legacy-bridge/mapper.d.ts.map +1 -0
- package/dist/core/legacy-bridge/mapper.js +241 -0
- package/dist/core/legacy-bridge/mapper.js.map +1 -0
- package/dist/core/legacy-bridge/quality-judge.d.ts +65 -0
- package/dist/core/legacy-bridge/quality-judge.d.ts.map +1 -0
- package/dist/core/legacy-bridge/quality-judge.js +277 -0
- package/dist/core/legacy-bridge/quality-judge.js.map +1 -0
- package/dist/core/legacy-bridge/redact.d.ts +28 -0
- package/dist/core/legacy-bridge/redact.d.ts.map +1 -0
- package/dist/core/legacy-bridge/redact.js +121 -0
- package/dist/core/legacy-bridge/redact.js.map +1 -0
- package/dist/core/legacy-bridge/regenerator.d.ts +50 -0
- package/dist/core/legacy-bridge/regenerator.d.ts.map +1 -0
- package/dist/core/legacy-bridge/regenerator.js +193 -0
- package/dist/core/legacy-bridge/regenerator.js.map +1 -0
- package/dist/core/legacy-bridge/resolve.d.ts +28 -0
- package/dist/core/legacy-bridge/resolve.d.ts.map +1 -0
- package/dist/core/legacy-bridge/resolve.js +75 -0
- package/dist/core/legacy-bridge/resolve.js.map +1 -0
- package/dist/core/legacy-bridge/sync-check.d.ts +47 -0
- package/dist/core/legacy-bridge/sync-check.d.ts.map +1 -0
- package/dist/core/legacy-bridge/sync-check.js +198 -0
- package/dist/core/legacy-bridge/sync-check.js.map +1 -0
- package/dist/core/legacy-bridge/types.d.ts +114 -0
- package/dist/core/legacy-bridge/types.d.ts.map +1 -0
- package/dist/core/legacy-bridge/types.js +4 -0
- package/dist/core/legacy-bridge/types.js.map +1 -0
- package/dist/core/markers/index.d.ts +3 -0
- package/dist/core/markers/index.d.ts.map +1 -0
- package/dist/core/markers/index.js +3 -0
- package/dist/core/markers/index.js.map +1 -0
- package/dist/core/markers/parse.d.ts +12 -0
- package/dist/core/markers/parse.d.ts.map +1 -0
- package/dist/core/markers/parse.js +31 -0
- package/dist/core/markers/parse.js.map +1 -0
- package/dist/core/markers/types.d.ts +142 -0
- package/dist/core/markers/types.d.ts.map +1 -0
- package/dist/core/markers/types.js +3 -0
- package/dist/core/markers/types.js.map +1 -0
- package/dist/core/migrate/ack.d.ts +13 -0
- package/dist/core/migrate/ack.d.ts.map +1 -0
- package/dist/core/migrate/ack.js +62 -0
- package/dist/core/migrate/ack.js.map +1 -0
- package/dist/core/migrate/archive-detect.d.ts +19 -0
- package/dist/core/migrate/archive-detect.d.ts.map +1 -0
- package/dist/core/migrate/archive-detect.js +89 -0
- package/dist/core/migrate/archive-detect.js.map +1 -0
- package/dist/core/migrate/budget.d.ts +7 -0
- package/dist/core/migrate/budget.d.ts.map +1 -0
- package/dist/core/migrate/budget.js +25 -0
- package/dist/core/migrate/budget.js.map +1 -0
- package/dist/core/migrate/conflict.d.ts +49 -0
- package/dist/core/migrate/conflict.d.ts.map +1 -0
- package/dist/core/migrate/conflict.js +99 -0
- package/dist/core/migrate/conflict.js.map +1 -0
- package/dist/core/migrate/index.d.ts +7 -0
- package/dist/core/migrate/index.d.ts.map +1 -0
- package/dist/core/migrate/index.js +389 -0
- package/dist/core/migrate/index.js.map +1 -0
- package/dist/core/migrate/markdown-aware.d.ts +27 -0
- package/dist/core/migrate/markdown-aware.d.ts.map +1 -0
- package/dist/core/migrate/markdown-aware.js +112 -0
- package/dist/core/migrate/markdown-aware.js.map +1 -0
- package/dist/core/migrate/quality.d.ts +66 -0
- package/dist/core/migrate/quality.d.ts.map +1 -0
- package/dist/core/migrate/quality.js +302 -0
- package/dist/core/migrate/quality.js.map +1 -0
- package/dist/core/migrate/regenerate.d.ts +24 -0
- package/dist/core/migrate/regenerate.d.ts.map +1 -0
- package/dist/core/migrate/regenerate.js +145 -0
- package/dist/core/migrate/regenerate.js.map +1 -0
- package/dist/core/migrate/report.d.ts +36 -0
- package/dist/core/migrate/report.d.ts.map +1 -0
- package/dist/core/migrate/report.js +154 -0
- package/dist/core/migrate/report.js.map +1 -0
- package/dist/core/migrate/sources/index.d.ts +4 -0
- package/dist/core/migrate/sources/index.d.ts.map +1 -0
- package/dist/core/migrate/sources/index.js +17 -0
- package/dist/core/migrate/sources/index.js.map +1 -0
- package/dist/core/migrate/sources/openspec.d.ts +14 -0
- package/dist/core/migrate/sources/openspec.d.ts.map +1 -0
- package/dist/core/migrate/sources/openspec.js +453 -0
- package/dist/core/migrate/sources/openspec.js.map +1 -0
- package/dist/core/migrate/sources/superpowers.d.ts +12 -0
- package/dist/core/migrate/sources/superpowers.d.ts.map +1 -0
- package/dist/core/migrate/sources/superpowers.js +310 -0
- package/dist/core/migrate/sources/superpowers.js.map +1 -0
- package/dist/core/migrate/types.d.ts +183 -0
- package/dist/core/migrate/types.d.ts.map +1 -0
- package/dist/core/migrate/types.js +5 -0
- package/dist/core/migrate/types.js.map +1 -0
- package/dist/core/migrate/utils.d.ts +2 -0
- package/dist/core/migrate/utils.d.ts.map +1 -0
- package/dist/core/migrate/utils.js +28 -0
- package/dist/core/migrate/utils.js.map +1 -0
- package/dist/core/monitor/artifact-observer.d.ts +9 -0
- package/dist/core/monitor/artifact-observer.d.ts.map +1 -0
- package/dist/core/monitor/artifact-observer.js +180 -0
- package/dist/core/monitor/artifact-observer.js.map +1 -0
- package/dist/core/monitor/config.d.ts +16 -0
- package/dist/core/monitor/config.d.ts.map +1 -0
- package/dist/core/monitor/config.js +48 -0
- package/dist/core/monitor/config.js.map +1 -0
- package/dist/core/monitor/divergence-map.d.ts +5 -0
- package/dist/core/monitor/divergence-map.d.ts.map +1 -0
- package/dist/core/monitor/divergence-map.js +92 -0
- package/dist/core/monitor/divergence-map.js.map +1 -0
- package/dist/core/monitor/exit-handler.d.ts +6 -0
- package/dist/core/monitor/exit-handler.d.ts.map +1 -0
- package/dist/core/monitor/exit-handler.js +27 -0
- package/dist/core/monitor/exit-handler.js.map +1 -0
- package/dist/core/monitor/health-verdict.d.ts +9 -0
- package/dist/core/monitor/health-verdict.d.ts.map +1 -0
- package/dist/core/monitor/health-verdict.js +55 -0
- package/dist/core/monitor/health-verdict.js.map +1 -0
- package/dist/core/monitor/report-renderer.d.ts +4 -0
- package/dist/core/monitor/report-renderer.d.ts.map +1 -0
- package/dist/core/monitor/report-renderer.js +82 -0
- package/dist/core/monitor/report-renderer.js.map +1 -0
- package/dist/core/monitor/trace-store.d.ts +39 -0
- package/dist/core/monitor/trace-store.d.ts.map +1 -0
- package/dist/core/monitor/trace-store.js +130 -0
- package/dist/core/monitor/trace-store.js.map +1 -0
- package/dist/core/monitor/types.d.ts +63 -0
- package/dist/core/monitor/types.d.ts.map +1 -0
- package/dist/core/monitor/types.js +26 -0
- package/dist/core/monitor/types.js.map +1 -0
- package/dist/core/parse/design.d.ts +14 -0
- package/dist/core/parse/design.d.ts.map +1 -0
- package/dist/core/parse/design.js +17 -0
- package/dist/core/parse/design.js.map +1 -0
- package/dist/core/parse/fenced-yaml.d.ts +18 -0
- package/dist/core/parse/fenced-yaml.d.ts.map +1 -0
- package/dist/core/parse/fenced-yaml.js +45 -0
- package/dist/core/parse/fenced-yaml.js.map +1 -0
- package/dist/core/parse/index.d.ts +7 -0
- package/dist/core/parse/index.d.ts.map +1 -0
- package/dist/core/parse/index.js +8 -0
- package/dist/core/parse/index.js.map +1 -0
- package/dist/core/parse/markdown.d.ts +30 -0
- package/dist/core/parse/markdown.d.ts.map +1 -0
- package/dist/core/parse/markdown.js +66 -0
- package/dist/core/parse/markdown.js.map +1 -0
- package/dist/core/parse/proposal.d.ts +18 -0
- package/dist/core/parse/proposal.d.ts.map +1 -0
- package/dist/core/parse/proposal.js +22 -0
- package/dist/core/parse/proposal.js.map +1 -0
- package/dist/core/parse/specs.d.ts +25 -0
- package/dist/core/parse/specs.d.ts.map +1 -0
- package/dist/core/parse/specs.js +58 -0
- package/dist/core/parse/specs.js.map +1 -0
- package/dist/core/parse/tasks.d.ts +33 -0
- package/dist/core/parse/tasks.d.ts.map +1 -0
- package/dist/core/parse/tasks.js +82 -0
- package/dist/core/parse/tasks.js.map +1 -0
- package/dist/core/parse/yaml.d.ts +13 -0
- package/dist/core/parse/yaml.d.ts.map +1 -0
- package/dist/core/parse/yaml.js +39 -0
- package/dist/core/parse/yaml.js.map +1 -0
- package/dist/core/process-evidence-freeze-warnings.d.ts +24 -0
- package/dist/core/process-evidence-freeze-warnings.d.ts.map +1 -0
- package/dist/core/process-evidence-freeze-warnings.js +153 -0
- package/dist/core/process-evidence-freeze-warnings.js.map +1 -0
- package/dist/core/schema/index.d.ts +5 -0
- package/dist/core/schema/index.d.ts.map +1 -0
- package/dist/core/schema/index.js +6 -0
- package/dist/core/schema/index.js.map +1 -0
- package/dist/core/schema/model-tiers-config.d.ts +41 -0
- package/dist/core/schema/model-tiers-config.d.ts.map +1 -0
- package/dist/core/schema/model-tiers-config.js +85 -0
- package/dist/core/schema/model-tiers-config.js.map +1 -0
- package/dist/core/schema/process-verification-config.d.ts +18 -0
- package/dist/core/schema/process-verification-config.d.ts.map +1 -0
- package/dist/core/schema/process-verification-config.js +74 -0
- package/dist/core/schema/process-verification-config.js.map +1 -0
- package/dist/core/schema/stage-extensions-config.d.ts +28 -0
- package/dist/core/schema/stage-extensions-config.d.ts.map +1 -0
- package/dist/core/schema/stage-extensions-config.js +228 -0
- package/dist/core/schema/stage-extensions-config.js.map +1 -0
- package/dist/core/schema/types.d.ts +262 -0
- package/dist/core/schema/types.d.ts.map +1 -0
- package/dist/core/schema/types.js +51 -0
- package/dist/core/schema/types.js.map +1 -0
- package/dist/core/schema/writing-plans-config.d.ts +11 -0
- package/dist/core/schema/writing-plans-config.d.ts.map +1 -0
- package/dist/core/schema/writing-plans-config.js +40 -0
- package/dist/core/schema/writing-plans-config.js.map +1 -0
- package/dist/core/schemas/archive-summary.d.ts +131 -0
- package/dist/core/schemas/archive-summary.d.ts.map +1 -0
- package/dist/core/schemas/archive-summary.js +31 -0
- package/dist/core/schemas/archive-summary.js.map +1 -0
- package/dist/core/schemas/process-evidence.d.ts +156 -0
- package/dist/core/schemas/process-evidence.d.ts.map +1 -0
- package/dist/core/schemas/process-evidence.js +12 -0
- package/dist/core/schemas/process-evidence.js.map +1 -0
- package/dist/core/schemas/scope-entries.d.ts +68 -0
- package/dist/core/schemas/scope-entries.d.ts.map +1 -0
- package/dist/core/schemas/scope-entries.js +47 -0
- package/dist/core/schemas/scope-entries.js.map +1 -0
- package/dist/core/schemas/severity.d.ts +58 -0
- package/dist/core/schemas/severity.d.ts.map +1 -0
- package/dist/core/schemas/severity.js +26 -0
- package/dist/core/schemas/severity.js.map +1 -0
- package/dist/core/scope/aggregator.d.ts +49 -0
- package/dist/core/scope/aggregator.d.ts.map +1 -0
- package/dist/core/scope/aggregator.js +141 -0
- package/dist/core/scope/aggregator.js.map +1 -0
- package/dist/core/scope/index.d.ts +2 -0
- package/dist/core/scope/index.d.ts.map +1 -0
- package/dist/core/scope/index.js +2 -0
- package/dist/core/scope/index.js.map +1 -0
- package/dist/core/specs-sync/apply.d.ts +8 -0
- package/dist/core/specs-sync/apply.d.ts.map +1 -0
- package/dist/core/specs-sync/apply.js +26 -0
- package/dist/core/specs-sync/apply.js.map +1 -0
- package/dist/core/specs-sync/deltas.d.ts +15 -0
- package/dist/core/specs-sync/deltas.d.ts.map +1 -0
- package/dist/core/specs-sync/deltas.js +27 -0
- package/dist/core/specs-sync/deltas.js.map +1 -0
- package/dist/core/specs-sync/index.d.ts +3 -0
- package/dist/core/specs-sync/index.d.ts.map +1 -0
- package/dist/core/specs-sync/index.js +4 -0
- package/dist/core/specs-sync/index.js.map +1 -0
- package/dist/core/stage-extensions/convergence-judge.d.ts +35 -0
- package/dist/core/stage-extensions/convergence-judge.d.ts.map +1 -0
- package/dist/core/stage-extensions/convergence-judge.js +47 -0
- package/dist/core/stage-extensions/convergence-judge.js.map +1 -0
- package/dist/core/stage-extensions/index.d.ts +13 -0
- package/dist/core/stage-extensions/index.d.ts.map +1 -0
- package/dist/core/stage-extensions/index.js +11 -0
- package/dist/core/stage-extensions/index.js.map +1 -0
- package/dist/core/stage-extensions/output-watcher.d.ts +93 -0
- package/dist/core/stage-extensions/output-watcher.d.ts.map +1 -0
- package/dist/core/stage-extensions/output-watcher.js +163 -0
- package/dist/core/stage-extensions/output-watcher.js.map +1 -0
- package/dist/core/stage-extensions/severity-mapper.d.ts +21 -0
- package/dist/core/stage-extensions/severity-mapper.d.ts.map +1 -0
- package/dist/core/stage-extensions/severity-mapper.js +26 -0
- package/dist/core/stage-extensions/severity-mapper.js.map +1 -0
- package/dist/core/stage-extensions/state-machine.d.ts +43 -0
- package/dist/core/stage-extensions/state-machine.d.ts.map +1 -0
- package/dist/core/stage-extensions/state-machine.js +19 -0
- package/dist/core/stage-extensions/state-machine.js.map +1 -0
- package/dist/core/stage-extensions/thread-map.d.ts +60 -0
- package/dist/core/stage-extensions/thread-map.d.ts.map +1 -0
- package/dist/core/stage-extensions/thread-map.js +107 -0
- package/dist/core/stage-extensions/thread-map.js.map +1 -0
- package/dist/core/stage-extensions/trend-analyzer.d.ts +29 -0
- package/dist/core/stage-extensions/trend-analyzer.d.ts.map +1 -0
- package/dist/core/stage-extensions/trend-analyzer.js +60 -0
- package/dist/core/stage-extensions/trend-analyzer.js.map +1 -0
- package/dist/core/stage-extensions/types.d.ts +39 -0
- package/dist/core/stage-extensions/types.d.ts.map +1 -0
- package/dist/core/stage-extensions/types.js +5 -0
- package/dist/core/stage-extensions/types.js.map +1 -0
- package/dist/core/staging-lock.d.ts +36 -0
- package/dist/core/staging-lock.d.ts.map +1 -0
- package/dist/core/staging-lock.js +122 -0
- package/dist/core/staging-lock.js.map +1 -0
- package/dist/core/templates/commands/ack-confirm.md +32 -0
- package/dist/core/templates/commands/apply.md +220 -0
- package/dist/core/templates/commands/archive.md +178 -0
- package/dist/core/templates/commands/brainstorm.md +58 -0
- package/dist/core/templates/commands/codex-adversarial.md +95 -0
- package/dist/core/templates/commands/explore.md +29 -0
- package/dist/core/templates/commands/index.d.ts +12 -0
- package/dist/core/templates/commands/index.d.ts.map +1 -0
- package/dist/core/templates/commands/index.js +26 -0
- package/dist/core/templates/commands/index.js.map +1 -0
- package/dist/core/templates/commands/propose.md +90 -0
- package/dist/core/templates/commands/review.md +105 -0
- package/dist/core/templates/commands/upgrade.md +58 -0
- package/dist/core/templates/commands/verify.md +186 -0
- package/dist/core/templates/index.d.ts +3 -0
- package/dist/core/templates/index.d.ts.map +1 -0
- package/dist/core/templates/index.js +5 -0
- package/dist/core/templates/index.js.map +1 -0
- package/dist/core/templates/skills/_shared/scope-category-guidance.md +40 -0
- package/dist/core/templates/skills/brainstorming.md +161 -0
- package/dist/core/templates/skills/dispatching-parallel-agents.md +209 -0
- package/dist/core/templates/skills/exploring.md +476 -0
- package/dist/core/templates/skills/finishing-a-development-branch.md +251 -0
- package/dist/core/templates/skills/index.d.ts +17 -0
- package/dist/core/templates/skills/index.d.ts.map +1 -0
- package/dist/core/templates/skills/index.js +53 -0
- package/dist/core/templates/skills/index.js.map +1 -0
- package/dist/core/templates/skills/process-evidence.md +146 -0
- package/dist/core/templates/skills/receiving-code-review.md +294 -0
- package/dist/core/templates/skills/requesting-code-review.md +108 -0
- package/dist/core/templates/skills/subagent-driven-development.md +405 -0
- package/dist/core/templates/skills/subagent-driven-discipline/references/codex-tools.md +72 -0
- package/dist/core/templates/skills/subagent-driven-discipline/references/opencode-tools.md +104 -0
- package/dist/core/templates/skills/subagent-driven-discipline.md +725 -0
- package/dist/core/templates/skills/systematic-debugging.md +297 -0
- package/dist/core/templates/skills/test-driven-development.md +402 -0
- package/dist/core/templates/skills/using-forge.md +163 -0
- package/dist/core/templates/skills/using-git-worktrees.md +229 -0
- package/dist/core/templates/skills/verification-before-completion.md +175 -0
- package/dist/core/templates/skills/verifying-three-dimensions.md +245 -0
- package/dist/core/templates/skills/writing-plans.md +259 -0
- package/dist/core/templates/skills/writing-skills.md +214 -0
- package/dist/core/test-reporters/index.d.ts +41 -0
- package/dist/core/test-reporters/index.d.ts.map +1 -0
- package/dist/core/test-reporters/index.js +39 -0
- package/dist/core/test-reporters/index.js.map +1 -0
- package/dist/core/test-reporters/junit.d.ts +8 -0
- package/dist/core/test-reporters/junit.d.ts.map +1 -0
- package/dist/core/test-reporters/junit.js +94 -0
- package/dist/core/test-reporters/junit.js.map +1 -0
- package/dist/core/test-reporters/tap.d.ts +18 -0
- package/dist/core/test-reporters/tap.d.ts.map +1 -0
- package/dist/core/test-reporters/tap.js +73 -0
- package/dist/core/test-reporters/tap.js.map +1 -0
- package/dist/core/test-reporters/vitest-json.d.ts +8 -0
- package/dist/core/test-reporters/vitest-json.d.ts.map +1 -0
- package/dist/core/test-reporters/vitest-json.js +56 -0
- package/dist/core/test-reporters/vitest-json.js.map +1 -0
- package/dist/core/upgrade/resign-markers.d.ts +14 -0
- package/dist/core/upgrade/resign-markers.d.ts.map +1 -0
- package/dist/core/upgrade/resign-markers.js +245 -0
- package/dist/core/upgrade/resign-markers.js.map +1 -0
- package/dist/core/validate/archive-summary-schema.d.ts +8 -0
- package/dist/core/validate/archive-summary-schema.d.ts.map +1 -0
- package/dist/core/validate/archive-summary-schema.js +186 -0
- package/dist/core/validate/archive-summary-schema.js.map +1 -0
- package/dist/core/validate/auto-findings.d.ts +36 -0
- package/dist/core/validate/auto-findings.d.ts.map +1 -0
- package/dist/core/validate/auto-findings.js +38 -0
- package/dist/core/validate/auto-findings.js.map +1 -0
- package/dist/core/validate/candidate-validators.d.ts +22 -0
- package/dist/core/validate/candidate-validators.d.ts.map +1 -0
- package/dist/core/validate/candidate-validators.js +46 -0
- package/dist/core/validate/candidate-validators.js.map +1 -0
- package/dist/core/validate/change.d.ts +3 -0
- package/dist/core/validate/change.d.ts.map +1 -0
- package/dist/core/validate/change.js +205 -0
- package/dist/core/validate/change.js.map +1 -0
- package/dist/core/validate/coverage-gap.d.ts +37 -0
- package/dist/core/validate/coverage-gap.d.ts.map +1 -0
- package/dist/core/validate/coverage-gap.js +181 -0
- package/dist/core/validate/coverage-gap.js.map +1 -0
- package/dist/core/validate/finding-hash.d.ts +14 -0
- package/dist/core/validate/finding-hash.d.ts.map +1 -0
- package/dist/core/validate/finding-hash.js +29 -0
- package/dist/core/validate/finding-hash.js.map +1 -0
- package/dist/core/validate/index.d.ts +15 -0
- package/dist/core/validate/index.d.ts.map +1 -0
- package/dist/core/validate/index.js +19 -0
- package/dist/core/validate/index.js.map +1 -0
- package/dist/core/validate/marker-integrity.d.ts +28 -0
- package/dist/core/validate/marker-integrity.d.ts.map +1 -0
- package/dist/core/validate/marker-integrity.js +170 -0
- package/dist/core/validate/marker-integrity.js.map +1 -0
- package/dist/core/validate/marker-schema.d.ts +10 -0
- package/dist/core/validate/marker-schema.d.ts.map +1 -0
- package/dist/core/validate/marker-schema.js +661 -0
- package/dist/core/validate/marker-schema.js.map +1 -0
- package/dist/core/validate/orphan-tmp.d.ts +13 -0
- package/dist/core/validate/orphan-tmp.d.ts.map +1 -0
- package/dist/core/validate/orphan-tmp.js +49 -0
- package/dist/core/validate/orphan-tmp.js.map +1 -0
- package/dist/core/validate/proposal.d.ts +4 -0
- package/dist/core/validate/proposal.d.ts.map +1 -0
- package/dist/core/validate/proposal.js +40 -0
- package/dist/core/validate/proposal.js.map +1 -0
- package/dist/core/validate/scope-entries.d.ts +23 -0
- package/dist/core/validate/scope-entries.d.ts.map +1 -0
- package/dist/core/validate/scope-entries.js +108 -0
- package/dist/core/validate/scope-entries.js.map +1 -0
- package/dist/core/validate/specs.d.ts +4 -0
- package/dist/core/validate/specs.d.ts.map +1 -0
- package/dist/core/validate/specs.js +74 -0
- package/dist/core/validate/specs.js.map +1 -0
- package/dist/core/validate/tasks.d.ts +4 -0
- package/dist/core/validate/tasks.d.ts.map +1 -0
- package/dist/core/validate/tasks.js +48 -0
- package/dist/core/validate/tasks.js.map +1 -0
- package/dist/core/validate/test-failure-stub.d.ts +23 -0
- package/dist/core/validate/test-failure-stub.d.ts.map +1 -0
- package/dist/core/validate/test-failure-stub.js +21 -0
- package/dist/core/validate/test-failure-stub.js.map +1 -0
- package/dist/core/validate/types.d.ts +33 -0
- package/dist/core/validate/types.d.ts.map +1 -0
- package/dist/core/validate/types.js +20 -0
- package/dist/core/validate/types.js.map +1 -0
- package/dist/core/worktree.d.ts +52 -0
- package/dist/core/worktree.d.ts.map +1 -0
- package/dist/core/worktree.js +145 -0
- package/dist/core/worktree.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 调 forge upgrade CLI(legacy adapter 清理 + marker resign)
|
|
3
|
+
argument-hint: '[--resign-markers <changeId>] [--recover] [--gc] [--dry-run]'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /forge:upgrade
|
|
7
|
+
|
|
8
|
+
包装 `forge upgrade` CLI(v0.3 / plan-9j 落地)。
|
|
9
|
+
|
|
10
|
+
## 用法 / 选项(v6 MINOR 4:option flag 形态,不是 subcommand)
|
|
11
|
+
|
|
12
|
+
- `forge upgrade`(无 flag,沿 v0.3):清理 legacy v0.2 harness adapter 产物
|
|
13
|
+
- `forge upgrade --resign-markers <changeId>`(plan-9j 新增 option):升级 v0.4 marker 到 v1.0 schema
|
|
14
|
+
|
|
15
|
+
## --resign-markers 用法(plan-9j Task 2 落地)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
forge upgrade --resign-markers add-oauth-refresh
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
行为:
|
|
22
|
+
|
|
23
|
+
- **S 简码** → 自动映射 CRITICAL
|
|
24
|
+
- **L 简码** → 自动映射 SUGGESTION
|
|
25
|
+
- **C 简码** → 写 pending file 到 `.evidence/pending-acks/`,exit 1 + 提示走 `forge ack confirm`
|
|
26
|
+
- **不自动填空** verify_findings / pause_decisions / process_evidence(违反 AI 反向加固)
|
|
27
|
+
- 改标 `process_evidence_unavailable_legacy: true` meta 字段
|
|
28
|
+
- 写 `ack-log.jsonl` action=resign 行
|
|
29
|
+
|
|
30
|
+
退出码(沿 master §3.12.3):
|
|
31
|
+
|
|
32
|
+
- 0:全部 marker resigned 或已是 v1.0
|
|
33
|
+
- 1:部分需 C 简码 confirm / 阶段事务失败
|
|
34
|
+
- 2:CI 模式拒绝(env CI=true)
|
|
35
|
+
|
|
36
|
+
## C 简码迁移协议(完整流程)
|
|
37
|
+
|
|
38
|
+
C 简码(clarification)不自动映射(沿 design §2.3.5):用户必须判断目标 severity:
|
|
39
|
+
|
|
40
|
+
1. 跑 `forge upgrade --resign-markers <changeId>` — 若含 C 简码,exit 1 + 写 pending file
|
|
41
|
+
2. 跑 `forge ack confirm <changeId> <findingId> --target-severity WARNING|SUGGESTION`(或走 `/forge:ack-confirm` slash)
|
|
42
|
+
3. 重跑 `forge upgrade --resign-markers <changeId>` 完成 resign
|
|
43
|
+
|
|
44
|
+
## sunset policy
|
|
45
|
+
|
|
46
|
+
`process_evidence_unavailable_legacy: true` 在 v2.0 sunset(沿 design §3.4.4.2):
|
|
47
|
+
|
|
48
|
+
- v1.0 / v1.1:合法
|
|
49
|
+
- v1.2:warning 加强
|
|
50
|
+
- v2.0:拒签,`forge migrate <change-id>` 自动触发 process_evidence 补录
|
|
51
|
+
|
|
52
|
+
## archive 行为(沿 plan-9j Task 3 / 4)
|
|
53
|
+
|
|
54
|
+
archive.ts 步骤 3.4 在 evidence 校验之前先跑 legacy-exemption + version-retrograde fence:
|
|
55
|
+
|
|
56
|
+
- legacy marker 缺 created_by_tool_version 字段或 `<1.0.0` → 走 legacy 路径(13 不变量精确豁免)
|
|
57
|
+
- **`legacy=true ⊥ (created_by_tool_version >= 1.0.0 且 resigned_by_tool_version 缺失)`** 互斥(沿 §3.4.4.1 + v6 选项 C resigned-aware):原生 v1.0 marker 不允许 legacy 标记;resigned 后 marker(含 resigned_by_tool_version 字段)允许 legacy + version 共存
|
|
58
|
+
- version retrograde(高版本 → 低版本)→ 拒签(沿 §3.4.4.3)
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 跑 forge validate + verification-before-completion + 三维度分析,产 verify_findings 写入 .verify-passed marker
|
|
3
|
+
argument-hint: '[--change-id <id>]'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are about to handle `/forge:verify $ARGUMENTS`.
|
|
7
|
+
|
|
8
|
+
解析:`--change-id <id>` 默认 `forge/changes/` 下唯一未归档的 change;若 >1,**报错并停止**列出选项。
|
|
9
|
+
|
|
10
|
+
## 步骤
|
|
11
|
+
|
|
12
|
+
1. **必须调用 `forge:verification-before-completion` skill**(证据先于声称的纪律)。
|
|
13
|
+
|
|
14
|
+
2. **跑 `forge validate <change-id>`**(plugin helper 走 `${CLAUDE_PLUGIN_ROOT}/scripts/run-forge.mjs validate`),拿到 validate 结果。validate 已产 `automated=true` CRITICAL `finding_hash`(沿 plan-9d Task 4)。
|
|
15
|
+
|
|
16
|
+
3. **若 validate 失败(exit 1 — CRITICAL findings 存在)**:
|
|
17
|
+
- 根据失败项构造 verify-failed YAML(`forge/changes/<id>/.verify-failed`):
|
|
18
|
+
```yaml
|
|
19
|
+
schema: forge-verify-failed/v1
|
|
20
|
+
failed_at: <ISO 8601>
|
|
21
|
+
reasons:
|
|
22
|
+
- <每个 CRITICAL finding 的 message>
|
|
23
|
+
fake_completions: []
|
|
24
|
+
appended_tasks:
|
|
25
|
+
- verify-fix-1
|
|
26
|
+
verify_findings: # plan-9d 新增 — validate CLI 产的 automated CRITICAL finding 直接合并
|
|
27
|
+
- id: 1
|
|
28
|
+
dimension: completeness
|
|
29
|
+
check_type: spec-files-missing
|
|
30
|
+
severity: CRITICAL
|
|
31
|
+
automated: true
|
|
32
|
+
finding_hash: <validate 输出的 hash>
|
|
33
|
+
evidence: <validate output>
|
|
34
|
+
recommendation: <validate output>
|
|
35
|
+
resolved: false
|
|
36
|
+
```
|
|
37
|
+
- **append 修复 task 到 `forge/changes/<id>/tasks.md`**(沿 v0.4 协议)
|
|
38
|
+
- **不要修改原已勾选 task**(维护 spec §3.3 不变量 2)
|
|
39
|
+
|
|
40
|
+
4. **若 validate 通过(exit 0)**:
|
|
41
|
+
|
|
42
|
+
4.1 **跑用户项目测试** — 读 `forge/config.yaml` 的 `test.test_command`,缺省 `pnpm test`,把 stdout 写到 `forge/changes/<id>/.evidence/test-output.log`,计算 `log_hash = sha256(test-output.log)`。**测试 pass 是 Completeness/task-completion 子项**(plan-9d 三维度协议)。字段路径以代码事实为准(`src/core/schema/types.ts:83` + `src/core/archive/fence.ts:146`)。
|
|
43
|
+
|
|
44
|
+
4.2 **三维度分析 — 必须调用 `forge:verifying-three-dimensions` skill**(plan-9d 落地):
|
|
45
|
+
- **Completeness**:对 spec 每个 Requirement,grep codebase 找实施证据;完全无证据 → 产 CRITICAL `coverage_gap` finding(automated=true,工具可独立验证;沿 §11.1bis — `evidence_missing` 仅指 evidence.log_path 文件缺失,语义不同)
|
|
46
|
+
- **Correctness**:对 spec 每个 Requirement 定位实施 file:line;WHEN/THEN scenario 覆盖检查 → WARNING/SUGGESTION findings(automated=false)
|
|
47
|
+
- **Coherence**:design.md `## Decision:` 段比对 codebase;命名 / pattern 比对项目惯例 → WARNING/SUGGESTION findings(automated=false)
|
|
48
|
+
- **每个 finding 必须填**:id / dimension / check_type / severity / automated / content_hash / git_head / evidence / recommendation / resolved + finding_hash(JCS SHA256 of 8 字段 payload,沿 9a)
|
|
49
|
+
- **`automated=true` 的 finding 必须由工具或 CLI 计算 finding_hash**(直接 grep 命中数等机器判定);AI 不能伪造此类 finding
|
|
50
|
+
- **`automated=false` 的 finding 由 AI 产**,需 `forge ack propose` 走两步流程才能降级或带未 ack archive(沿 9a)
|
|
51
|
+
- **AI 计算 finding_hash 必须用 `forge finding hash` helper**(v6 M-1 修订 + v7 N-1 修订:沿 plan-9d Task 4 step 12-13)— 防止 AI 自实现 JCS 易出错。示例**用 heredoc 避免单引号 shell 破损**(JSON 内换行 / 单引号 / 中文均安全):
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# 把 8 字段 payload 写成 JSON pipe 给 helper,helper 输出 64-hex finding_hash
|
|
55
|
+
cat <<'JSON' | forge finding hash
|
|
56
|
+
{
|
|
57
|
+
"content_hash": "sha256:abc123...",
|
|
58
|
+
"git_head": "d4e5f6...",
|
|
59
|
+
"dimension": "correctness",
|
|
60
|
+
"check_type": "requirement-mapping",
|
|
61
|
+
"severity": "WARNING",
|
|
62
|
+
"automated": false,
|
|
63
|
+
"evidence": "specs/auth/spec.md Requirement #2 在 src/auth/refresh.ts:42 实现 expiryHours=12,spec 默认 24h",
|
|
64
|
+
"recommendation": "改 expiryHours=24 或修订 spec"
|
|
65
|
+
}
|
|
66
|
+
JSON
|
|
67
|
+
# 输出:1234abcd5678ef90... (64-hex 裸 hex 沿 9a)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**关键约束**:
|
|
71
|
+
- **用 `<<'JSON'` heredoc(单引号 quoted)**:JSON 内部含单引号 / `$` / 反引号 / 中文均不会被 shell 解析(v7 N-1 修订:沿 bash heredoc quoted delimiter convention)
|
|
72
|
+
- **不能多传 extra keys**(id / resolved / finding_hash 自身)— helper 内部已显式构造 8 字段,extra keys 会被丢弃,但 AI 应该传干净 payload 避免混淆
|
|
73
|
+
- **JSON 内换行用真实换行**(不写 `\n`)— heredoc 保留原样换行;若 evidence/recommendation 内文要含 `\n` 字面值则写 `\\n` 双反斜杠(JSON 串 escape)
|
|
74
|
+
|
|
75
|
+
4.3 **写 `forge/changes/<id>/.verify-passed` YAML**(沿 design §2.2.5 schema superset):
|
|
76
|
+
|
|
77
|
+
```yaml
|
|
78
|
+
schema: forge-verify/v1
|
|
79
|
+
verified_at: <ISO 8601>
|
|
80
|
+
verified_by: ai-agent
|
|
81
|
+
tasks_hash: <sha256(tasks.md 已勾段)>
|
|
82
|
+
content_hash: <sha256(proposal+specs+design)>
|
|
83
|
+
evidence:
|
|
84
|
+
- scenario_id: project-tests
|
|
85
|
+
test_command: <config.yaml 的 test_command>
|
|
86
|
+
test_file: <实际跑的测试范围>
|
|
87
|
+
log_path: ./.evidence/test-output.log
|
|
88
|
+
log_hash: <log_hash>
|
|
89
|
+
pass: true
|
|
90
|
+
verify_findings: # plan-9d 新增 — validate CLI 自动 CRITICAL + skill 产 WARNING/SUGGESTION 合并数组
|
|
91
|
+
- id: 1
|
|
92
|
+
dimension: completeness
|
|
93
|
+
check_type: spec-coverage
|
|
94
|
+
severity: WARNING
|
|
95
|
+
automated: false
|
|
96
|
+
content_hash: <sha256>
|
|
97
|
+
git_head: <40-hex>
|
|
98
|
+
evidence: 'specs/auth/spec.md Requirement #2 在 src/auth/refresh.ts:42 实现 expiryHours=12,spec 默认 24h'
|
|
99
|
+
recommendation: '改 expiryHours=24 或修订 spec'
|
|
100
|
+
resolved: false
|
|
101
|
+
finding_hash: <sha256>
|
|
102
|
+
severity_acked_by: null # WARNING 必须 ack 才能 archive(在 archive 阶段走 ack)
|
|
103
|
+
severity_acked_at: null
|
|
104
|
+
# ... 其他 finding
|
|
105
|
+
pause_decisions: # apply 阶段累积的 pause 决策在写本 marker 时一并迁移(本 fix 补 lifecycle 注;沿 commands/apply.md "Marker 持久化" 段)
|
|
106
|
+
- id: 1
|
|
107
|
+
# ... 完整 schema 见 commands/apply.md "Marker 持久化" 段
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
4.3a **(本 fix 补缺):调 forge evidence record-verify 记录 verify 事件证据到 staging**
|
|
111
|
+
|
|
112
|
+
主代理在写完 .verify-passed YAML 后、freeze 之前,**必须**先调 record-verify 写 staging:
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
forge evidence record-verify <changeId> --task-refs <list> --scope <type> --report <path>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
这一步把 verify 事件(测试 pass/fail + 三维 findings 总览)写入 `.evidence/process-evidence.staging.yaml`,**freeze 必须前置 staging 才有 source 可以凝固**(沿 `src/cli/commands/evidence.ts:348/639`;helper list 权威 `commands/apply.md:179-182`)。
|
|
119
|
+
|
|
120
|
+
若漏调 record-verify 直接 freeze → exit 1 + 提示 "staging file not found ... 必须先调 forge evidence record-\*"(代码事实 `evidence.ts:639`)。
|
|
121
|
+
|
|
122
|
+
4.4 **(plan-9g 新增):调 forge evidence freeze 凝固 process_evidence**
|
|
123
|
+
|
|
124
|
+
主代理在 4.3a record-verify 后,**必须**调:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
forge evidence freeze <changeId> --kind verify
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
freeze 子命令做:
|
|
131
|
+
1. 读 `.evidence/process-evidence.staging.yaml` + 校验 staging_hash
|
|
132
|
+
2. 复制三数组(tdd_event_chain / verify_invocations / subagent_review_chain)到 marker.process_evidence
|
|
133
|
+
3. 写 marker.process_evidence_staging_hash + ack_log_tail_hash + ack_log_entry_count(五源 cross-check 用)
|
|
134
|
+
4. 算 freeze-time WARNING(不变量 7 + 10)→ 转 VerifyFinding 写 marker.verify_findings
|
|
135
|
+
5. 若 CRITICAL 11/12(tdd_exemption 缺 ack / mode 缺 ack)→ exit 1 + 提示先跑 forge ack
|
|
136
|
+
6. transaction(tmp + rename atomic)落 marker
|
|
137
|
+
|
|
138
|
+
详细 process_evidence 协议见 `skills/process-evidence/SKILL.md`。
|
|
139
|
+
|
|
140
|
+
4.5 **若产任何 WARNING + resolved=false**:提示用户 — archive 阶段必须先 `forge ack propose <finding-id>`(沿 9a 两步流程),否则 archive fence 拒签。
|
|
141
|
+
|
|
142
|
+
4.6 **若产任何 automated=true CRITICAL + resolved=false**:**不能 archive**(沿 design §2.2.4 fence)— 必须先实际修复让 finding resolved=true(改 code + 重跑 verify),不允许 ack 降级。
|
|
143
|
+
|
|
144
|
+
## 禁止行为
|
|
145
|
+
|
|
146
|
+
- 不允许在 verify 失败时回去把已勾 task 改回 `[ ]`(违反 spec §3.3 不变量 2)
|
|
147
|
+
- 不允许跳过证据 log 写入(verification-before-completion 要求证据先于声称)
|
|
148
|
+
- 不允许 pass=true 但 evidence 为空(archive 校验会拒绝)
|
|
149
|
+
- **不允许跳维度**(沿 plan-9d skill 红旗清单)— Completeness + Correctness + Coherence 三维度必须全跑,即使测试 pass
|
|
150
|
+
- **不允许伪造 automated=true finding**(沿 design §2.3.3 critical_candidate 协议)— automated=true 的 finding 必须由工具/grep 机器判定,不能 AI 自决
|
|
151
|
+
- **不允许 vague recommendation**("consider reviewing X" 类)— 必须给 file:line 或 spec:Requirement-id 具体证据(沿 plan-9d skill `## forge-specific 反向加固` §2)
|
|
152
|
+
- **不允许在 .verify-passed 写 severity_acked_by = "ai-agent" 自 ack**(必须走 `forge ack propose` 两步流程,沿 9a)
|
|
153
|
+
|
|
154
|
+
## (可选)Stage extensions hook — Tier 1 Claude Code only
|
|
155
|
+
|
|
156
|
+
> codex review 集成。AI 主代理在本 stage(`verify`)跑多轮收敛协议。
|
|
157
|
+
> Tier 2/3(Codex/OpenCode)见 [`docs/stage-extensions.md §未来 Tier 2/3 集成`](../docs/stage-extensions.md#未来-tier-23-集成)。
|
|
158
|
+
|
|
159
|
+
**Step A — 检查是否启用**:读 `forge/config.yaml#stage_extensions.verify`。无该字段 / 数组为空 / 全部 entry `enabled: false` → **跳过本段,流程结束**。
|
|
160
|
+
|
|
161
|
+
**Step B — 对每个 `enabled` entry 跑多轮收敛 loop**:
|
|
162
|
+
|
|
163
|
+
初始化 `round = 1`、`threadId = ''`、`roundHistory = []`、`roundLimit = null`(F1-v8 fix:`roundLimit` **不从 config 文件读** —— effective convergence 由 runner 输出,见 Step 3。AI 协议不碰 config 文件解析 / deep-merge,单一数据源是 runner JSON)。循环:
|
|
164
|
+
|
|
165
|
+
1. **跑单轮 runner**:
|
|
166
|
+
```bash
|
|
167
|
+
node "${CLAUDE_PLUGIN_ROOT}/scripts/run-forge.mjs" stage-extensions run \
|
|
168
|
+
--stage verify --change-id <change-id> --extension <entry-name> \
|
|
169
|
+
--round <round>${threadId:+ --thread-id $threadId}
|
|
170
|
+
```
|
|
171
|
+
2. **解析 stdout JSON 的 `kind`**:
|
|
172
|
+
- `converged` → 该 entry 收敛完成,**break loop**(codex 输出 verbatim 透传给用户)
|
|
173
|
+
- `failed` / `config_error` / `no_extension` → 该 entry 放弃,**break loop**(loose,不阻塞主流程)
|
|
174
|
+
- `unconverged` → 继续 3
|
|
175
|
+
3. **从 unconverged JSON 取状态**(F1-v8 fix:effective config 来自 runner 输出,runner 内 `validateStageExtensionsConfig` 已 normalize):
|
|
176
|
+
- `roundHistory.push({ round, block_count: <blockFindings.length> })`;`threadId = <JSON.threadId>`;codex finding verbatim 透传给用户
|
|
177
|
+
- 首轮:`roundLimit = <JSON.effectiveConvergence.max_rounds>`(后续轮 `roundLimit` 已设,不覆盖 —— 选项①的 `roundLimit += N` 增量须保留)
|
|
178
|
+
4. **若 `round >= roundLimit`**(F2-v7 fix:用可增长的 `roundLimit`):
|
|
179
|
+
- 若 `<JSON.effectiveConvergence.max_rounds_on_exceed>` 为 `force_end` → 把 blockFindings 写 `forge/changes/<id>/.evidence/codex-pending-findings.yaml`(backlog),**break loop**
|
|
180
|
+
- 否则跑 `node "${CLAUDE_PLUGIN_ROOT}/scripts/run-forge.mjs" stage-extensions analyze-trend --history '<roundHistory JSON>'` 拿 TrendAdvice,再 `AskUserQuestion` 三选项(默认推 `TrendAdvice.recommended_option`):**①再跑 N 轮**(F2-v7 fix:读用户输入的 `N`,执行 `roundLimit += N`,然后 `round++` 继续 loop —— 后续 `round >= roundLimit` 判定按新上限走,不会立刻又进 Step 4)/ **②放弃 codex**(break loop)/ **③接受当前**(blockFindings 写 backlog,break loop)
|
|
181
|
+
5. **否则(`round < roundLimit`)**:`AskUserQuestion` 三选项(默认推 `<JSON.userInteraction.block_unconverged>`):
|
|
182
|
+
- **①auto_fix** → 用 `Task` 工具 dispatch fresh fix subagent 修 blockFindings → `round++`,继续 loop
|
|
183
|
+
- **②manual_fix** → 等用户改完 → `round++`,继续 loop
|
|
184
|
+
- **③give_up** → break loop
|
|
185
|
+
|
|
186
|
+
**Step C — loose**:本段任何步骤(runner 调用 / AskUserQuestion / fix dispatch)失败都**不阻塞主流程 fence**。runner 永远 exit 0;AskUserQuestion harness 不支持时降级终端 prompt。
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { SKILL_NAMES, loadSkill, loadAllSkills, loadAllSharedDocs, type SkillName, type LoadedSkill, } from './skills/index.js';
|
|
2
|
+
export { COMMAND_NAMES, loadCommand, loadAllCommands, type CommandName, type LoadedCommand, } from './commands/index.js';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/templates/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,WAAW,EACX,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,WAAW,GACjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,aAAa,EACb,WAAW,EACX,eAAe,EACf,KAAK,WAAW,EAChB,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// templates 模块顶层导出 — Plan 4
|
|
2
|
+
// 把 skills + commands 两个 sub-registry 聚合成单一入口
|
|
3
|
+
export { SKILL_NAMES, loadSkill, loadAllSkills, loadAllSharedDocs, } from './skills/index.js';
|
|
4
|
+
export { COMMAND_NAMES, loadCommand, loadAllCommands, } from './commands/index.js';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/templates/index.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,8CAA8C;AAE9C,OAAO,EACL,WAAW,EACX,SAAS,EACT,aAAa,EACb,iBAAiB,GAGlB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,aAAa,EACb,WAAW,EACX,eAAe,GAGhB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Scope Category Guidance
|
|
3
|
+
description: AI 判定指引 — 找到一个"未实施项",该写到哪里(SUGGESTION / Future Work / Out of Scope / Non-Goal)
|
|
4
|
+
source-of-truth: forge v1.0 design §2.6.6
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Scope Category Guidance
|
|
8
|
+
|
|
9
|
+
> 此文档是 `skills/_shared/` 下的共用 reference,由 `forge:receiving-code-review` / `forge:verifying-three-dimensions` / `forge:exploring` 三 skill 引用。不要把这表抄到各 skill — 集中维护避免漂移。
|
|
10
|
+
|
|
11
|
+
## 决策表(沿 design §2.6.6)
|
|
12
|
+
|
|
13
|
+
当你识别出一个"未在本 change 实施的事项",按下表四选一,不要默认塞 SUGGESTION:
|
|
14
|
+
|
|
15
|
+
| 状态 | 写到 | 语义 | 判定指引(关键词) |
|
|
16
|
+
| ------------------------------ | --------------------------------------------------------------------------------------- | ---------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
17
|
+
| **应在本 change 做但低优先级** | `verify_findings` / `review_outcomes` 的 `SUGGESTION` finding | 本 change 内的 nice-to-have,可不做 | "可定位 + 可修复 + 不做也不影响本 change 核心目标"(例:补一处 log message 措辞 / 加一个 edge case 测试) |
|
|
18
|
+
| **本 change 不做,未来可能做** | `design.md` `## Future Work {#forge-future-work}` 段的 `forge-scope-entries/v1` YAML 块 | 跨 change 长期 backlog | "实施会扩 scope,但目标方向一致"(例:本 change 加 OAuth 基础,refresh-token-grace-period 留 future-work) |
|
|
19
|
+
| **本 change 不做,原则反对做** | `proposal.md` `## Non-Goals {#forge-non-goals}` 段的 YAML 块 | 反目标 | "实施会偏离项目方向 / 违反核心约束"(例:加密产品不接受"明文密码可选项") |
|
|
20
|
+
| **本 change 不做,无强烈意见** | `proposal.md` `## Out of Scope {#forge-oos}` 段的 YAML 块 | 中性 out-of-scope | "明显不属于本 change 但未来可能做也可能不做"(例:本 change 加 password-reset,SSO/SAML 不属于但不反对) |
|
|
21
|
+
|
|
22
|
+
## 常见误判 → 修正
|
|
23
|
+
|
|
24
|
+
| AI 倾向 | 修正 |
|
|
25
|
+
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
26
|
+
| 把所有"不做"塞 SUGGESTION 持挂 | SUGGESTION 应**只**用于"本 change 内 nice-to-have";跨 change 项必须走 out-of-scope/future-work/non-goal |
|
|
27
|
+
| 把"未来可能做"标 Non-Goal | Non-Goal 是**反对**做;不确定的项应走 Future Work 或 Out of Scope |
|
|
28
|
+
| 给 `## Out of Scope` 段填一句话不写 YAML 块 | OK — 但若有具体项,**必须**写 forge-scope-entries/v1 YAML 块带 reason(沿 plan-9b §2.6.3 reason 必填) |
|
|
29
|
+
| 编 entry 的 `reason` 为空 / 写"未来再说" | reason 是 forge 比 OpenSpec 强制升级的字段;空 reason 会被 `forge validate` 拒签为 CRITICAL |
|
|
30
|
+
| 用本地化标题就改 anchor ID | **anchor ID 是契约**,标题文字可改(`## 不做项 {#forge-oos}`),但 `{#forge-oos}` 不可改 |
|
|
31
|
+
|
|
32
|
+
## Fence 反向加固(`/forge:archive`)
|
|
33
|
+
|
|
34
|
+
archive 阶段若发现 SUGGESTION > 5 项 或 SUGGESTION 中含关键词(`future` / `later` / `outside scope` / `未来` / `后续` / `超出` / `另外`),给 deprecation warning 提示考虑推到 `## Future Work` / `## Out of Scope`。**仅 warning,不阻断**(沿 design §2.3 SUGGESTION 不要求 ack)。
|
|
35
|
+
|
|
36
|
+
## Cross-reference
|
|
37
|
+
|
|
38
|
+
- 数据 schema:`src/core/schemas/scope-entries.ts`(`forge-scope-entries/v1`)
|
|
39
|
+
- 锚点契约:`{#forge-oos}` / `{#forge-non-goals}` / `{#forge-future-work}`(沿 design §2.6.3)
|
|
40
|
+
- 跨 change 扫描:`forge scope scan-archived-followups <change-id>`(沿 design §2.6.5)
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forge:brainstorming
|
|
3
|
+
description: You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Brainstorming Ideas Into Designs
|
|
7
|
+
|
|
8
|
+
Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
|
|
9
|
+
|
|
10
|
+
Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
|
|
11
|
+
|
|
12
|
+
<HARD-GATE>
|
|
13
|
+
Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
|
|
14
|
+
</HARD-GATE>
|
|
15
|
+
|
|
16
|
+
## Anti-Pattern: "This Is Too Simple To Need A Design"
|
|
17
|
+
|
|
18
|
+
Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
|
|
19
|
+
|
|
20
|
+
## Pre-flight check — Git base assumption (P2 fix from v0.2 fixture testing)
|
|
21
|
+
|
|
22
|
+
**Before starting brainstorming flow**, verify the repo has a git base ready for `Write draft` step (Step 5):
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
git rev-parse HEAD 2>/dev/null && test -f .gitignore
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
If either fails(no commits yet, or no `.gitignore`):
|
|
29
|
+
|
|
30
|
+
- **Do NOT silently commit the draft later**. Ask the user explicitly first:
|
|
31
|
+
|
|
32
|
+
> "我注意到这是空 git repo / 缺 `.gitignore`。要不要先 `git init` + 加 `.gitignore`(标准 Node/Python/etc patterns)+ first commit 再继续 brainstorming?这样 draft commit 才有 base。"
|
|
33
|
+
|
|
34
|
+
- 用户确认 → 帮加 `.gitignore` + `git init`(若需)+ first commit
|
|
35
|
+
- 用户拒绝 → 跳过 Step 5 commit,只 Write draft 但不 commit;提示用户"draft 已写但未 commit,完成后请手动 commit 或先建 git base"
|
|
36
|
+
|
|
37
|
+
This pre-flight prevents the v0.2 fixture-test P2 issue: brainstorming silently committing draft on a half-initialized repo.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Checklist
|
|
42
|
+
|
|
43
|
+
You MUST create a task for each of these items and complete them in order:
|
|
44
|
+
|
|
45
|
+
1. **Pre-flight git base check** — see above section; gate before proceeding
|
|
46
|
+
2. **Explore project context** — check files, docs, recent commits
|
|
47
|
+
3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
|
|
48
|
+
4. **Propose 2-3 approaches** — with trade-offs and your recommendation
|
|
49
|
+
5. **Present design** — in sections scaled to their complexity, get user approval after each section
|
|
50
|
+
6. **Write draft** — save to `forge/drafts/YYYY-MM-DD-<topic>.md` and commit (skip commit step if pre-flight #1 declined). Do NOT save to forge/specs/(specs/ 仅由 archive 内部 sync 写入,见 spec §3.4).
|
|
51
|
+
7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
|
|
52
|
+
8. **User reviews written draft** — ask user to review the draft file before proceeding
|
|
53
|
+
9. **Transition to implementation** — invoke forge:writing-plans skill via /forge:propose <change-id> --from-draft <date>-<topic>
|
|
54
|
+
|
|
55
|
+
## Process Flow
|
|
56
|
+
|
|
57
|
+
```dot
|
|
58
|
+
digraph brainstorming {
|
|
59
|
+
"Explore project context" [shape=box];
|
|
60
|
+
"Ask clarifying questions" [shape=box];
|
|
61
|
+
"Propose 2-3 approaches" [shape=box];
|
|
62
|
+
"Present design sections" [shape=box];
|
|
63
|
+
"User approves design?" [shape=diamond];
|
|
64
|
+
"Write draft" [shape=box];
|
|
65
|
+
"Spec self-review\n(fix inline)" [shape=box];
|
|
66
|
+
"User reviews draft?" [shape=diamond];
|
|
67
|
+
"Invoke forge:writing-plans skill" [shape=doublecircle];
|
|
68
|
+
|
|
69
|
+
"Explore project context" -> "Ask clarifying questions";
|
|
70
|
+
"Ask clarifying questions" -> "Propose 2-3 approaches";
|
|
71
|
+
"Propose 2-3 approaches" -> "Present design sections";
|
|
72
|
+
"Present design sections" -> "User approves design?";
|
|
73
|
+
"User approves design?" -> "Present design sections" [label="no, revise"];
|
|
74
|
+
"User approves design?" -> "Write draft" [label="yes"];
|
|
75
|
+
"Write draft" -> "Spec self-review\n(fix inline)";
|
|
76
|
+
"Spec self-review\n(fix inline)" -> "User reviews draft?";
|
|
77
|
+
"User reviews draft?" -> "Write draft" [label="changes requested"];
|
|
78
|
+
"User reviews draft?" -> "Invoke forge:writing-plans skill" [label="approved"];
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**The terminal state is invoking forge:writing-plans via /forge:propose.** Do NOT invoke any other implementation skill. The ONLY skill you invoke after brainstorming is forge:writing-plans.
|
|
83
|
+
|
|
84
|
+
## The Process
|
|
85
|
+
|
|
86
|
+
**Understanding the idea:**
|
|
87
|
+
|
|
88
|
+
- Check out the current project state first (files, docs, recent commits)
|
|
89
|
+
- Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
|
|
90
|
+
- If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own draft → plan → implementation cycle.
|
|
91
|
+
- For appropriately-scoped projects, ask questions one at a time to refine the idea
|
|
92
|
+
- Prefer multiple choice questions when possible, but open-ended is fine too
|
|
93
|
+
- Only one question per message - if a topic needs more exploration, break it into multiple questions
|
|
94
|
+
- Focus on understanding: purpose, constraints, success criteria
|
|
95
|
+
|
|
96
|
+
**Exploring approaches:**
|
|
97
|
+
|
|
98
|
+
- Propose 2-3 different approaches with trade-offs
|
|
99
|
+
- Present options conversationally with your recommendation and reasoning
|
|
100
|
+
- Lead with your recommended option and explain why
|
|
101
|
+
|
|
102
|
+
**Presenting the design:**
|
|
103
|
+
|
|
104
|
+
- Once you believe you understand what you're building, present the design
|
|
105
|
+
- Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
|
|
106
|
+
- Ask after each section whether it looks right so far
|
|
107
|
+
- Cover: architecture, components, data flow, error handling, testing
|
|
108
|
+
- Be ready to go back and clarify if something doesn't make sense
|
|
109
|
+
|
|
110
|
+
**Design for isolation and clarity:**
|
|
111
|
+
|
|
112
|
+
- Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
|
|
113
|
+
- For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
|
|
114
|
+
- Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
|
|
115
|
+
- Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
|
|
116
|
+
|
|
117
|
+
**Working in existing codebases:**
|
|
118
|
+
|
|
119
|
+
- Explore the current structure before proposing changes. Follow existing patterns.
|
|
120
|
+
- Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
|
|
121
|
+
- Don't propose unrelated refactoring. Stay focused on what serves the current goal.
|
|
122
|
+
|
|
123
|
+
## After the Design
|
|
124
|
+
|
|
125
|
+
**Documentation:**
|
|
126
|
+
|
|
127
|
+
- Write the validated draft to `forge/drafts/YYYY-MM-DD-<topic>.md`
|
|
128
|
+
- (User preferences for draft location override this default)
|
|
129
|
+
- Commit the draft document to git
|
|
130
|
+
|
|
131
|
+
**Spec Self-Review:**
|
|
132
|
+
After writing the draft document, look at it with fresh eyes:
|
|
133
|
+
|
|
134
|
+
1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
|
|
135
|
+
2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
|
|
136
|
+
3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
|
|
137
|
+
4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
|
|
138
|
+
|
|
139
|
+
Fix any issues inline. No need to re-review — just fix and move on.
|
|
140
|
+
|
|
141
|
+
**User Review Gate:**
|
|
142
|
+
After the spec review loop passes, ask the user to review the written draft before proceeding:
|
|
143
|
+
|
|
144
|
+
> "Draft written and committed to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
|
|
145
|
+
|
|
146
|
+
Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.
|
|
147
|
+
|
|
148
|
+
**Implementation:**
|
|
149
|
+
|
|
150
|
+
- Invoke the forge:writing-plans skill via /forge:propose <change-id> --from-draft <date>-<topic> to create the change proposal + implementation plan. Do NOT invoke any other skill.
|
|
151
|
+
|
|
152
|
+
## Key Principles
|
|
153
|
+
|
|
154
|
+
- **One question at a time** - Don't overwhelm with multiple questions
|
|
155
|
+
- **Multiple choice preferred** - Easier to answer than open-ended when possible
|
|
156
|
+
- **YAGNI ruthlessly** - Remove unnecessary features from all designs
|
|
157
|
+
- **Explore alternatives** - Always propose 2-3 approaches before settling
|
|
158
|
+
- **Incremental validation** - Present design, get approval before moving on
|
|
159
|
+
- **Be flexible** - Go back and clarify when something doesn't make sense
|
|
160
|
+
|
|
161
|
+
<!-- Visual companion 在 forge v0.1 不提供,brainstorming 全程在终端做。 -->
|