peaks-loop 3.0.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/.claude-plugin/marketplace.json +51 -0
- package/CHANGELOG.md +3136 -0
- package/LICENSE +21 -0
- package/README-en.md +281 -0
- package/README.md +365 -0
- package/agents/karpathy-reviewer.md +229 -0
- package/bin/peaks.js +2 -0
- package/dist/src/cli/cli-helpers.d.ts +25 -0
- package/dist/src/cli/cli-helpers.js +78 -0
- package/dist/src/cli/commands/agent-commands.d.ts +20 -0
- package/dist/src/cli/commands/agent-commands.js +48 -0
- package/dist/src/cli/commands/audit-commands.d.ts +28 -0
- package/dist/src/cli/commands/audit-commands.js +437 -0
- package/dist/src/cli/commands/capability-commands.d.ts +16 -0
- package/dist/src/cli/commands/capability-commands.js +45 -0
- package/dist/src/cli/commands/capability-worker-config-sc-commands.d.ts +3 -0
- package/dist/src/cli/commands/capability-worker-config-sc-commands.js +10 -0
- package/dist/src/cli/commands/classify-classify-commands.d.ts +19 -0
- package/dist/src/cli/commands/classify-classify-commands.js +151 -0
- package/dist/src/cli/commands/code-review-commands.d.ts +34 -0
- package/dist/src/cli/commands/code-review-commands.js +83 -0
- package/dist/src/cli/commands/codegraph-commands.d.ts +3 -0
- package/dist/src/cli/commands/codegraph-commands.js +99 -0
- package/dist/src/cli/commands/complexity-commands.d.ts +9 -0
- package/dist/src/cli/commands/complexity-commands.js +34 -0
- package/dist/src/cli/commands/config-commands.d.ts +3 -0
- package/dist/src/cli/commands/config-commands.js +220 -0
- package/dist/src/cli/commands/context-builder-commands.d.ts +11 -0
- package/dist/src/cli/commands/context-builder-commands.js +85 -0
- package/dist/src/cli/commands/context-commands.d.ts +21 -0
- package/dist/src/cli/commands/context-commands.js +254 -0
- package/dist/src/cli/commands/contract-commands.d.ts +26 -0
- package/dist/src/cli/commands/contract-commands.js +114 -0
- package/dist/src/cli/commands/core/artifacts-command.d.ts +3 -0
- package/dist/src/cli/commands/core/artifacts-command.js +62 -0
- package/dist/src/cli/commands/core/binding-commands.d.ts +3 -0
- package/dist/src/cli/commands/core/binding-commands.js +58 -0
- package/dist/src/cli/commands/core/doctor-command.d.ts +11 -0
- package/dist/src/cli/commands/core/doctor-command.js +204 -0
- package/dist/src/cli/commands/core/memory-command.d.ts +3 -0
- package/dist/src/cli/commands/core/memory-command.js +98 -0
- package/dist/src/cli/commands/core/profile-command.d.ts +3 -0
- package/dist/src/cli/commands/core/profile-command.js +9 -0
- package/dist/src/cli/commands/core/proxy-command.d.ts +3 -0
- package/dist/src/cli/commands/core/proxy-command.js +26 -0
- package/dist/src/cli/commands/core/session-command.d.ts +3 -0
- package/dist/src/cli/commands/core/session-command.js +213 -0
- package/dist/src/cli/commands/core/skill-command.d.ts +3 -0
- package/dist/src/cli/commands/core/skill-command.js +275 -0
- package/dist/src/cli/commands/core/standards-command.d.ts +3 -0
- package/dist/src/cli/commands/core/standards-command.js +95 -0
- package/dist/src/cli/commands/core-artifact-commands.d.ts +15 -0
- package/dist/src/cli/commands/core-artifact-commands.js +31 -0
- package/dist/src/cli/commands/dispatch-commands.d.ts +10 -0
- package/dist/src/cli/commands/dispatch-commands.js +351 -0
- package/dist/src/cli/commands/dispatch-from-dag.d.ts +3 -0
- package/dist/src/cli/commands/dispatch-from-dag.js +251 -0
- package/dist/src/cli/commands/doc-commands.d.ts +11 -0
- package/dist/src/cli/commands/doc-commands.js +65 -0
- package/dist/src/cli/commands/feedback-commands.d.ts +18 -0
- package/dist/src/cli/commands/feedback-commands.js +145 -0
- package/dist/src/cli/commands/final-review-commands.d.ts +31 -0
- package/dist/src/cli/commands/final-review-commands.js +161 -0
- package/dist/src/cli/commands/fixture-commands.d.ts +32 -0
- package/dist/src/cli/commands/fixture-commands.js +91 -0
- package/dist/src/cli/commands/fork-commands.d.ts +16 -0
- package/dist/src/cli/commands/fork-commands.js +163 -0
- package/dist/src/cli/commands/gate-commands.d.ts +3 -0
- package/dist/src/cli/commands/gate-commands.js +117 -0
- package/dist/src/cli/commands/heartbeat-commands.d.ts +3 -0
- package/dist/src/cli/commands/heartbeat-commands.js +135 -0
- package/dist/src/cli/commands/hook-handle.d.ts +17 -0
- package/dist/src/cli/commands/hook-handle.js +157 -0
- package/dist/src/cli/commands/hooks-commands.d.ts +3 -0
- package/dist/src/cli/commands/hooks-commands.js +156 -0
- package/dist/src/cli/commands/impact-commands.d.ts +15 -0
- package/dist/src/cli/commands/impact-commands.js +62 -0
- package/dist/src/cli/commands/legacy-commands.d.ts +11 -0
- package/dist/src/cli/commands/legacy-commands.js +32 -0
- package/dist/src/cli/commands/log-commands.d.ts +17 -0
- package/dist/src/cli/commands/log-commands.js +64 -0
- package/dist/src/cli/commands/loop-commands.d.ts +21 -0
- package/dist/src/cli/commands/loop-commands.js +128 -0
- package/dist/src/cli/commands/loop-eval-commands.d.ts +20 -0
- package/dist/src/cli/commands/loop-eval-commands.js +526 -0
- package/dist/src/cli/commands/memory-commands.d.ts +23 -0
- package/dist/src/cli/commands/memory-commands.js +129 -0
- package/dist/src/cli/commands/migrate-1-4-1-command.d.ts +11 -0
- package/dist/src/cli/commands/migrate-1-4-1-command.js +34 -0
- package/dist/src/cli/commands/migrate-v2-10-to-v2-11-command.d.ts +20 -0
- package/dist/src/cli/commands/migrate-v2-10-to-v2-11-command.js +52 -0
- package/dist/src/cli/commands/mut-commands.d.ts +20 -0
- package/dist/src/cli/commands/mut-commands.js +239 -0
- package/dist/src/cli/commands/observability-commands.d.ts +22 -0
- package/dist/src/cli/commands/observability-commands.js +201 -0
- package/dist/src/cli/commands/openspec-commands.d.ts +3 -0
- package/dist/src/cli/commands/openspec-commands.js +237 -0
- package/dist/src/cli/commands/perf-audit-commands.d.ts +22 -0
- package/dist/src/cli/commands/perf-audit-commands.js +132 -0
- package/dist/src/cli/commands/perf-commands.d.ts +3 -0
- package/dist/src/cli/commands/perf-commands.js +41 -0
- package/dist/src/cli/commands/playwright-commands.d.ts +95 -0
- package/dist/src/cli/commands/playwright-commands.js +432 -0
- package/dist/src/cli/commands/prd-blocks-commands.d.ts +18 -0
- package/dist/src/cli/commands/prd-blocks-commands.js +50 -0
- package/dist/src/cli/commands/prd-commands.d.ts +18 -0
- package/dist/src/cli/commands/prd-commands.js +141 -0
- package/dist/src/cli/commands/preferences-commands.d.ts +2 -0
- package/dist/src/cli/commands/preferences-commands.js +197 -0
- package/dist/src/cli/commands/project-commands.d.ts +3 -0
- package/dist/src/cli/commands/project-commands.js +248 -0
- package/dist/src/cli/commands/qa-business-review-commands.d.ts +17 -0
- package/dist/src/cli/commands/qa-business-review-commands.js +148 -0
- package/dist/src/cli/commands/qa-commands.d.ts +94 -0
- package/dist/src/cli/commands/qa-commands.js +271 -0
- package/dist/src/cli/commands/release-commands.d.ts +24 -0
- package/dist/src/cli/commands/release-commands.js +231 -0
- package/dist/src/cli/commands/request-commands.d.ts +3 -0
- package/dist/src/cli/commands/request-commands.js +509 -0
- package/dist/src/cli/commands/retrospective-commands.d.ts +12 -0
- package/dist/src/cli/commands/retrospective-commands.js +175 -0
- package/dist/src/cli/commands/reviewer-commands.d.ts +14 -0
- package/dist/src/cli/commands/reviewer-commands.js +64 -0
- package/dist/src/cli/commands/role-commands.d.ts +13 -0
- package/dist/src/cli/commands/role-commands.js +85 -0
- package/dist/src/cli/commands/sc-commands.d.ts +3 -0
- package/dist/src/cli/commands/sc-commands.js +45 -0
- package/dist/src/cli/commands/scan-commands.d.ts +3 -0
- package/dist/src/cli/commands/scan-commands.js +445 -0
- package/dist/src/cli/commands/security-audit-commands.d.ts +23 -0
- package/dist/src/cli/commands/security-audit-commands.js +132 -0
- package/dist/src/cli/commands/session-checkpoint-command.d.ts +10 -0
- package/dist/src/cli/commands/session-checkpoint-command.js +100 -0
- package/dist/src/cli/commands/session-resume-command.d.ts +11 -0
- package/dist/src/cli/commands/session-resume-command.js +83 -0
- package/dist/src/cli/commands/share-commands.d.ts +17 -0
- package/dist/src/cli/commands/share-commands.js +296 -0
- package/dist/src/cli/commands/skill-conformance-commands.d.ts +9 -0
- package/dist/src/cli/commands/skill-conformance-commands.js +39 -0
- package/dist/src/cli/commands/slice-commands.d.ts +24 -0
- package/dist/src/cli/commands/slice-commands.js +492 -0
- package/dist/src/cli/commands/slice-integrate-commands.d.ts +11 -0
- package/dist/src/cli/commands/slice-integrate-commands.js +74 -0
- package/dist/src/cli/commands/slice-review-commands.d.ts +23 -0
- package/dist/src/cli/commands/slice-review-commands.js +162 -0
- package/dist/src/cli/commands/smoke-commands.d.ts +21 -0
- package/dist/src/cli/commands/smoke-commands.js +203 -0
- package/dist/src/cli/commands/solo-commands.d.ts +80 -0
- package/dist/src/cli/commands/solo-commands.js +435 -0
- package/dist/src/cli/commands/sop-commands.d.ts +3 -0
- package/dist/src/cli/commands/sop-commands.js +215 -0
- package/dist/src/cli/commands/statusline-commands.d.ts +3 -0
- package/dist/src/cli/commands/statusline-commands.js +169 -0
- package/dist/src/cli/commands/sub-agent-commands.d.ts +22 -0
- package/dist/src/cli/commands/sub-agent-commands.js +19 -0
- package/dist/src/cli/commands/sub-agent-dispatch-guard.d.ts +55 -0
- package/dist/src/cli/commands/sub-agent-dispatch-guard.js +57 -0
- package/dist/src/cli/commands/sub-agent-shared.d.ts +99 -0
- package/dist/src/cli/commands/sub-agent-shared.js +67 -0
- package/dist/src/cli/commands/test-commands.d.ts +47 -0
- package/dist/src/cli/commands/test-commands.js +204 -0
- package/dist/src/cli/commands/understand-commands.d.ts +3 -0
- package/dist/src/cli/commands/understand-commands.js +112 -0
- package/dist/src/cli/commands/upgrade-commands.d.ts +23 -0
- package/dist/src/cli/commands/upgrade-commands.js +119 -0
- package/dist/src/cli/commands/user-touchpoint-commands.d.ts +18 -0
- package/dist/src/cli/commands/user-touchpoint-commands.js +78 -0
- package/dist/src/cli/commands/verdict-aggregate-command.d.ts +14 -0
- package/dist/src/cli/commands/verdict-aggregate-command.js +106 -0
- package/dist/src/cli/commands/worker-commands.d.ts +3 -0
- package/dist/src/cli/commands/worker-commands.js +52 -0
- package/dist/src/cli/commands/workflow-commands.d.ts +3 -0
- package/dist/src/cli/commands/workflow-commands.js +535 -0
- package/dist/src/cli/commands/workflow-plan-commands.d.ts +39 -0
- package/dist/src/cli/commands/workflow-plan-commands.js +163 -0
- package/dist/src/cli/commands/workspace/clean-command.d.ts +14 -0
- package/dist/src/cli/commands/workspace/clean-command.js +49 -0
- package/dist/src/cli/commands/workspace/helpers.d.ts +28 -0
- package/dist/src/cli/commands/workspace/helpers.js +87 -0
- package/dist/src/cli/commands/workspace/init-command.d.ts +121 -0
- package/dist/src/cli/commands/workspace/init-command.js +436 -0
- package/dist/src/cli/commands/workspace/migrate-command.d.ts +11 -0
- package/dist/src/cli/commands/workspace/migrate-command.js +91 -0
- package/dist/src/cli/commands/workspace/reconcile-command.d.ts +14 -0
- package/dist/src/cli/commands/workspace/reconcile-command.js +103 -0
- package/dist/src/cli/commands/workspace-commands.d.ts +18 -0
- package/dist/src/cli/commands/workspace-commands.js +50 -0
- package/dist/src/cli/index.d.ts +1 -0
- package/dist/src/cli/index.js +30 -0
- package/dist/src/cli/program.d.ts +5 -0
- package/dist/src/cli/program.js +336 -0
- package/dist/src/hooks/pre-tool-use-sub-agent.d.ts +28 -0
- package/dist/src/hooks/pre-tool-use-sub-agent.js +105 -0
- package/dist/src/lib/render/message-renderer.d.ts +20 -0
- package/dist/src/lib/render/message-renderer.js +80 -0
- package/dist/src/services/agent/ecc-agent-service.d.ts +47 -0
- package/dist/src/services/agent/ecc-agent-service.js +143 -0
- package/dist/src/services/artifacts/artifact-lint-service.d.ts +23 -0
- package/dist/src/services/artifacts/artifact-lint-service.js +99 -0
- package/dist/src/services/artifacts/artifact-prerequisites.d.ts +78 -0
- package/dist/src/services/artifacts/artifact-prerequisites.js +491 -0
- package/dist/src/services/artifacts/artifact-service.d.ts +43 -0
- package/dist/src/services/artifacts/artifact-service.js +98 -0
- package/dist/src/services/artifacts/artifact-templates.d.ts +30 -0
- package/dist/src/services/artifacts/artifact-templates.js +302 -0
- package/dist/src/services/artifacts/repair-cycle-service.d.ts +23 -0
- package/dist/src/services/artifacts/repair-cycle-service.js +52 -0
- package/dist/src/services/artifacts/request-artifact-service.d.ts +116 -0
- package/dist/src/services/artifacts/request-artifact-service.js +451 -0
- package/dist/src/services/artifacts/request-artifact-state-helpers.d.ts +51 -0
- package/dist/src/services/artifacts/request-artifact-state-helpers.js +114 -0
- package/dist/src/services/artifacts/workspace-service.d.ts +34 -0
- package/dist/src/services/artifacts/workspace-service.js +272 -0
- package/dist/src/services/audit/artifact-writer.d.ts +93 -0
- package/dist/src/services/audit/artifact-writer.js +303 -0
- package/dist/src/services/audit/audit-goal-service.d.ts +35 -0
- package/dist/src/services/audit/audit-goal-service.js +75 -0
- package/dist/src/services/audit/audit-goal-types.d.ts +40 -0
- package/dist/src/services/audit/audit-goal-types.js +15 -0
- package/dist/src/services/audit/backing-detector.d.ts +24 -0
- package/dist/src/services/audit/backing-detector.js +59 -0
- package/dist/src/services/audit/classifier.d.ts +38 -0
- package/dist/src/services/audit/classifier.js +134 -0
- package/dist/src/services/audit/decision-writer.d.ts +76 -0
- package/dist/src/services/audit/decision-writer.js +217 -0
- package/dist/src/services/audit/enforcers/active-skill-resolver.d.ts +29 -0
- package/dist/src/services/audit/enforcers/active-skill-resolver.js +71 -0
- package/dist/src/services/audit/enforcers/design-draft-confirm.d.ts +24 -0
- package/dist/src/services/audit/enforcers/design-draft-confirm.js +58 -0
- package/dist/src/services/audit/enforcers/lint-audit-regression.d.ts +21 -0
- package/dist/src/services/audit/enforcers/lint-audit-regression.js +86 -0
- package/dist/src/services/audit/enforcers/lint-catalog-governance.d.ts +32 -0
- package/dist/src/services/audit/enforcers/lint-catalog-governance.js +48 -0
- package/dist/src/services/audit/enforcers/lint-cli-back.d.ts +16 -0
- package/dist/src/services/audit/enforcers/lint-cli-back.js +35 -0
- package/dist/src/services/audit/enforcers/lint-output-style.d.ts +11 -0
- package/dist/src/services/audit/enforcers/lint-output-style.js +94 -0
- package/dist/src/services/audit/enforcers/lint-reference-integrity.d.ts +6 -0
- package/dist/src/services/audit/enforcers/lint-reference-integrity.js +83 -0
- package/dist/src/services/audit/enforcers/lint-reference-shape.d.ts +30 -0
- package/dist/src/services/audit/enforcers/lint-reference-shape.js +272 -0
- package/dist/src/services/audit/enforcers/lint-style.d.ts +49 -0
- package/dist/src/services/audit/enforcers/lint-style.js +173 -0
- package/dist/src/services/audit/enforcers/lint-workflow-shape.d.ts +4 -0
- package/dist/src/services/audit/enforcers/lint-workflow-shape.js +100 -0
- package/dist/src/services/audit/enforcers/login-gate.d.ts +23 -0
- package/dist/src/services/audit/enforcers/login-gate.js +40 -0
- package/dist/src/services/audit/enforcers/mock-placement.d.ts +25 -0
- package/dist/src/services/audit/enforcers/mock-placement.js +48 -0
- package/dist/src/services/audit/enforcers/no-root-pollution.d.ts +21 -0
- package/dist/src/services/audit/enforcers/no-root-pollution.js +56 -0
- package/dist/src/services/audit/enforcers/pre-rd-scan.d.ts +22 -0
- package/dist/src/services/audit/enforcers/pre-rd-scan.js +23 -0
- package/dist/src/services/audit/enforcers/prototype-fidelity.d.ts +25 -0
- package/dist/src/services/audit/enforcers/prototype-fidelity.js +75 -0
- package/dist/src/services/audit/enforcers/resume-detection.d.ts +21 -0
- package/dist/src/services/audit/enforcers/resume-detection.js +52 -0
- package/dist/src/services/audit/enforcers/solo-code-ban.d.ts +23 -0
- package/dist/src/services/audit/enforcers/solo-code-ban.js +27 -0
- package/dist/src/services/audit/enforcers/sub-agent-sid.d.ts +25 -0
- package/dist/src/services/audit/enforcers/sub-agent-sid.js +63 -0
- package/dist/src/services/audit/prose-ratio-calculator.d.ts +45 -0
- package/dist/src/services/audit/prose-ratio-calculator.js +52 -0
- package/dist/src/services/audit/red-line-catalog-p2-a.d.ts +21 -0
- package/dist/src/services/audit/red-line-catalog-p2-a.js +229 -0
- package/dist/src/services/audit/red-line-catalog-p2-b.d.ts +19 -0
- package/dist/src/services/audit/red-line-catalog-p2-b.js +225 -0
- package/dist/src/services/audit/red-line-catalog.d.ts +51 -0
- package/dist/src/services/audit/red-line-catalog.js +195 -0
- package/dist/src/services/audit/red-lines-service.d.ts +23 -0
- package/dist/src/services/audit/red-lines-service.js +464 -0
- package/dist/src/services/audit/scanners/openspec-scanner.d.ts +15 -0
- package/dist/src/services/audit/scanners/openspec-scanner.js +55 -0
- package/dist/src/services/audit/scanners/rules-tree-scanner.d.ts +16 -0
- package/dist/src/services/audit/scanners/rules-tree-scanner.js +56 -0
- package/dist/src/services/audit/scanners/skills-tree-scanner.d.ts +17 -0
- package/dist/src/services/audit/scanners/skills-tree-scanner.js +46 -0
- package/dist/src/services/audit/static-service.d.ts +60 -0
- package/dist/src/services/audit/static-service.js +130 -0
- package/dist/src/services/audit/types.d.ts +86 -0
- package/dist/src/services/audit/types.js +13 -0
- package/dist/src/services/audit-independent/perf-audit-service.d.ts +151 -0
- package/dist/src/services/audit-independent/perf-audit-service.js +316 -0
- package/dist/src/services/audit-independent/security-audit-service.d.ts +155 -0
- package/dist/src/services/audit-independent/security-audit-service.js +316 -0
- package/dist/src/services/classify/classify-service.d.ts +42 -0
- package/dist/src/services/classify/classify-service.js +122 -0
- package/dist/src/services/classify/classify-types.d.ts +79 -0
- package/dist/src/services/classify/classify-types.js +90 -0
- package/dist/src/services/code-review/ecc-bridge.d.ts +148 -0
- package/dist/src/services/code-review/ecc-bridge.js +242 -0
- package/dist/src/services/code-review/ocr-service.d.ts +129 -0
- package/dist/src/services/code-review/ocr-service.js +369 -0
- package/dist/src/services/codegraph/codegraph-process-runner.d.ts +2 -0
- package/dist/src/services/codegraph/codegraph-process-runner.js +93 -0
- package/dist/src/services/codegraph/codegraph-service.d.ts +43 -0
- package/dist/src/services/codegraph/codegraph-service.js +160 -0
- package/dist/src/services/complexity/complexity-estimator.d.ts +34 -0
- package/dist/src/services/complexity/complexity-estimator.js +64 -0
- package/dist/src/services/config/config-migration.d.ts +45 -0
- package/dist/src/services/config/config-migration.js +154 -0
- package/dist/src/services/config/config-restore.d.ts +10 -0
- package/dist/src/services/config/config-restore.js +47 -0
- package/dist/src/services/config/config-rollback.d.ts +13 -0
- package/dist/src/services/config/config-rollback.js +26 -0
- package/dist/src/services/config/config-safety.d.ts +40 -0
- package/dist/src/services/config/config-safety.js +359 -0
- package/dist/src/services/config/config-service.d.ts +69 -0
- package/dist/src/services/config/config-service.js +814 -0
- package/dist/src/services/config/config-types.d.ts +119 -0
- package/dist/src/services/config/config-types.js +18 -0
- package/dist/src/services/config/model-routing.d.ts +4 -0
- package/dist/src/services/config/model-routing.js +17 -0
- package/dist/src/services/config/provider-service.d.ts +48 -0
- package/dist/src/services/config/provider-service.js +143 -0
- package/dist/src/services/config/proxy-service.d.ts +21 -0
- package/dist/src/services/config/proxy-service.js +44 -0
- package/dist/src/services/config/sidecar-store.d.ts +25 -0
- package/dist/src/services/config/sidecar-store.js +61 -0
- package/dist/src/services/config/workspace-state-service.d.ts +30 -0
- package/dist/src/services/config/workspace-state-service.js +142 -0
- package/dist/src/services/context/artifact-meta.d.ts +72 -0
- package/dist/src/services/context/artifact-meta.js +105 -0
- package/dist/src/services/context/auto-compact-dispatcher.d.ts +37 -0
- package/dist/src/services/context/auto-compact-dispatcher.js +190 -0
- package/dist/src/services/context/auto-compact-reader.d.ts +51 -0
- package/dist/src/services/context/auto-compact-reader.js +164 -0
- package/dist/src/services/context/auto-compact-types.d.ts +143 -0
- package/dist/src/services/context/auto-compact-types.js +36 -0
- package/dist/src/services/context/collector.d.ts +24 -0
- package/dist/src/services/context/collector.js +133 -0
- package/dist/src/services/context/context-builder.d.ts +30 -0
- package/dist/src/services/context/context-builder.js +78 -0
- package/dist/src/services/context/context-guard.d.ts +49 -0
- package/dist/src/services/context/context-guard.js +91 -0
- package/dist/src/services/context/context-schema.d.ts +415 -0
- package/dist/src/services/context/context-schema.js +73 -0
- package/dist/src/services/context/dispatch-context-guard.d.ts +27 -0
- package/dist/src/services/context/dispatch-context-guard.js +192 -0
- package/dist/src/services/context/doc-retriever.d.ts +26 -0
- package/dist/src/services/context/doc-retriever.js +51 -0
- package/dist/src/services/context/headroom-client.d.ts +34 -0
- package/dist/src/services/context/headroom-client.js +117 -0
- package/dist/src/services/context/headroom-fetcher.d.ts +6 -0
- package/dist/src/services/context/headroom-fetcher.js +28 -0
- package/dist/src/services/context/headroom-prefs.d.ts +46 -0
- package/dist/src/services/context/headroom-prefs.js +34 -0
- package/dist/src/services/context/index.d.ts +7 -0
- package/dist/src/services/context/index.js +6 -0
- package/dist/src/services/context/main-session-monitor.d.ts +77 -0
- package/dist/src/services/context/main-session-monitor.js +130 -0
- package/dist/src/services/context/renderer.d.ts +20 -0
- package/dist/src/services/context/renderer.js +30 -0
- package/dist/src/services/context/shared-channel.d.ts +93 -0
- package/dist/src/services/context/shared-channel.js +308 -0
- package/dist/src/services/context/threshold.d.ts +35 -0
- package/dist/src/services/context/threshold.js +76 -0
- package/dist/src/services/context/tokenizer.d.ts +12 -0
- package/dist/src/services/context/tokenizer.js +43 -0
- package/dist/src/services/context/types.d.ts +93 -0
- package/dist/src/services/context/types.js +9 -0
- package/dist/src/services/dashboard/project-dashboard-service.d.ts +91 -0
- package/dist/src/services/dashboard/project-dashboard-service.js +147 -0
- package/dist/src/services/dispatch/batch-counter.d.ts +27 -0
- package/dist/src/services/dispatch/batch-counter.js +102 -0
- package/dist/src/services/dispatch/contract-store.d.ts +63 -0
- package/dist/src/services/dispatch/contract-store.js +157 -0
- package/dist/src/services/dispatch/dispatch-record-writer.d.ts +138 -0
- package/dist/src/services/dispatch/dispatch-record-writer.js +460 -0
- package/dist/src/services/dispatch/heartbeat-truncator.d.ts +26 -0
- package/dist/src/services/dispatch/heartbeat-truncator.js +13 -0
- package/dist/src/services/dispatch/leak-detector.d.ts +11 -0
- package/dist/src/services/dispatch/leak-detector.js +72 -0
- package/dist/src/services/dispatch/slice-dag.d.ts +81 -0
- package/dist/src/services/dispatch/slice-dag.js +238 -0
- package/dist/src/services/dispatch/sub-agent-dispatcher.d.ts +239 -0
- package/dist/src/services/dispatch/sub-agent-dispatcher.js +382 -0
- package/dist/src/services/dispatch/test-tool-detection.d.ts +36 -0
- package/dist/src/services/dispatch/test-tool-detection.js +46 -0
- package/dist/src/services/doc/doc-generator.d.ts +38 -0
- package/dist/src/services/doc/doc-generator.js +122 -0
- package/dist/src/services/doctor/doctor-service.d.ts +149 -0
- package/dist/src/services/doctor/doctor-service.js +929 -0
- package/dist/src/services/feedback/feedback-promotion-service.d.ts +123 -0
- package/dist/src/services/feedback/feedback-promotion-service.js +300 -0
- package/dist/src/services/filesystem/file-lock.d.ts +11 -0
- package/dist/src/services/filesystem/file-lock.js +129 -0
- package/dist/src/services/final-review/final-review-service.d.ts +12 -0
- package/dist/src/services/final-review/final-review-service.js +52 -0
- package/dist/src/services/final-review/final-review-types.d.ts +42 -0
- package/dist/src/services/final-review/final-review-types.js +18 -0
- package/dist/src/services/fixture/fixture-capture-service.d.ts +87 -0
- package/dist/src/services/fixture/fixture-capture-service.js +317 -0
- package/dist/src/services/fixture/fixture-sanitize-service.d.ts +117 -0
- package/dist/src/services/fixture/fixture-sanitize-service.js +161 -0
- package/dist/src/services/fixture/index.d.ts +8 -0
- package/dist/src/services/fixture/index.js +8 -0
- package/dist/src/services/fork/fork-sync-state.d.ts +85 -0
- package/dist/src/services/fork/fork-sync-state.js +130 -0
- package/dist/src/services/fuzzy-matching/fuzzy-match-service.d.ts +15 -0
- package/dist/src/services/fuzzy-matching/fuzzy-match-service.js +56 -0
- package/dist/src/services/fuzzy-matching/fzf-pick-service.d.ts +68 -0
- package/dist/src/services/fuzzy-matching/fzf-pick-service.js +158 -0
- package/dist/src/services/fuzzy-matching/types.d.ts +20 -0
- package/dist/src/services/fuzzy-matching/types.js +1 -0
- package/dist/src/services/handoff/handoff-parser.d.ts +28 -0
- package/dist/src/services/handoff/handoff-parser.js +69 -0
- package/dist/src/services/handoff/handoff-types.d.ts +39 -0
- package/dist/src/services/handoff/handoff-types.js +19 -0
- package/dist/src/services/handoff/handoff-writer.d.ts +23 -0
- package/dist/src/services/handoff/handoff-writer.js +30 -0
- package/dist/src/services/hooks/output.d.ts +92 -0
- package/dist/src/services/hooks/output.js +111 -0
- package/dist/src/services/hooks/presence-marker-detector.d.ts +16 -0
- package/dist/src/services/hooks/presence-marker-detector.js +105 -0
- package/dist/src/services/ide/adapters/claude-code-adapter.d.ts +18 -0
- package/dist/src/services/ide/adapters/claude-code-adapter.js +91 -0
- package/dist/src/services/ide/adapters/codex-adapter.d.ts +46 -0
- package/dist/src/services/ide/adapters/codex-adapter.js +97 -0
- package/dist/src/services/ide/adapters/cursor-adapter.d.ts +36 -0
- package/dist/src/services/ide/adapters/cursor-adapter.js +84 -0
- package/dist/src/services/ide/adapters/hermes-adapter.d.ts +21 -0
- package/dist/src/services/ide/adapters/hermes-adapter.js +51 -0
- package/dist/src/services/ide/adapters/openclaw-adapter.d.ts +14 -0
- package/dist/src/services/ide/adapters/openclaw-adapter.js +42 -0
- package/dist/src/services/ide/adapters/trae-adapter.d.ts +42 -0
- package/dist/src/services/ide/adapters/trae-adapter.js +83 -0
- package/dist/src/services/ide/hook-protocol.d.ts +47 -0
- package/dist/src/services/ide/hook-protocol.js +74 -0
- package/dist/src/services/ide/hook-translator.d.ts +72 -0
- package/dist/src/services/ide/hook-translator.js +128 -0
- package/dist/src/services/ide/ide-detector.d.ts +10 -0
- package/dist/src/services/ide/ide-detector.js +19 -0
- package/dist/src/services/ide/ide-registry.d.ts +14 -0
- package/dist/src/services/ide/ide-registry.js +60 -0
- package/dist/src/services/ide/ide-types.d.ts +230 -0
- package/dist/src/services/ide/ide-types.js +2 -0
- package/dist/src/services/ide/resource-profile.d.ts +52 -0
- package/dist/src/services/ide/resource-profile.js +33 -0
- package/dist/src/services/ide/shared/atomic-json.d.ts +15 -0
- package/dist/src/services/ide/shared/atomic-json.js +58 -0
- package/dist/src/services/ide/shared/safe-path.d.ts +11 -0
- package/dist/src/services/ide/shared/safe-path.js +29 -0
- package/dist/src/services/impact/impact-scan-service.d.ts +66 -0
- package/dist/src/services/impact/impact-scan-service.js +197 -0
- package/dist/src/services/legacy/legacy-detector.d.ts +34 -0
- package/dist/src/services/legacy/legacy-detector.js +111 -0
- package/dist/src/services/log/log-commands-service.d.ts +54 -0
- package/dist/src/services/log/log-commands-service.js +83 -0
- package/dist/src/services/log/logger.d.ts +103 -0
- package/dist/src/services/log/logger.js +224 -0
- package/dist/src/services/log/redact.d.ts +32 -0
- package/dist/src/services/log/redact.js +89 -0
- package/dist/src/services/log/retention.d.ts +34 -0
- package/dist/src/services/log/retention.js +78 -0
- package/dist/src/services/loop/evaluator-dispatcher.d.ts +50 -0
- package/dist/src/services/loop/evaluator-dispatcher.js +551 -0
- package/dist/src/services/loop/monotonic-guard.d.ts +80 -0
- package/dist/src/services/loop/monotonic-guard.js +215 -0
- package/dist/src/services/loop/monotonic-runner.d.ts +55 -0
- package/dist/src/services/loop/monotonic-runner.js +197 -0
- package/dist/src/services/loop/run-driver.d.ts +70 -0
- package/dist/src/services/loop/run-driver.js +379 -0
- package/dist/src/services/loop/spec-service.d.ts +90 -0
- package/dist/src/services/loop/spec-service.js +497 -0
- package/dist/src/services/memory/llm-reranker.d.ts +174 -0
- package/dist/src/services/memory/llm-reranker.js +284 -0
- package/dist/src/services/memory/memory-search-service.d.ts +93 -0
- package/dist/src/services/memory/memory-search-service.js +117 -0
- package/dist/src/services/memory/project-context-service.d.ts +11 -0
- package/dist/src/services/memory/project-context-service.js +148 -0
- package/dist/src/services/memory/project-memory-service.d.ts +167 -0
- package/dist/src/services/memory/project-memory-service.js +817 -0
- package/dist/src/services/migration/v2-10-to-v2-11-service.d.ts +44 -0
- package/dist/src/services/migration/v2-10-to-v2-11-service.js +190 -0
- package/dist/src/services/migration/v2-10-to-v2-11-types.d.ts +41 -0
- package/dist/src/services/migration/v2-10-to-v2-11-types.js +23 -0
- package/dist/src/services/mode/bypass-tracker.d.ts +4 -0
- package/dist/src/services/mode/bypass-tracker.js +31 -0
- package/dist/src/services/mode/mode-enforcement.d.ts +14 -0
- package/dist/src/services/mode/mode-enforcement.js +84 -0
- package/dist/src/services/mut/assert-scanner.d.ts +6 -0
- package/dist/src/services/mut/assert-scanner.js +116 -0
- package/dist/src/services/mut/index.d.ts +8 -0
- package/dist/src/services/mut/index.js +7 -0
- package/dist/src/services/mut/mut-runner.d.ts +39 -0
- package/dist/src/services/mut/mut-runner.js +29 -0
- package/dist/src/services/mut/production-stryker.d.ts +7 -0
- package/dist/src/services/mut/production-stryker.js +66 -0
- package/dist/src/services/mut/report-builder.d.ts +11 -0
- package/dist/src/services/mut/report-builder.js +110 -0
- package/dist/src/services/mut/report-loader.d.ts +31 -0
- package/dist/src/services/mut/report-loader.js +78 -0
- package/dist/src/services/mut/thresholds.d.ts +21 -0
- package/dist/src/services/mut/thresholds.js +22 -0
- package/dist/src/services/mut/types.d.ts +336 -0
- package/dist/src/services/mut/types.js +59 -0
- package/dist/src/services/observability/aggregation.d.ts +64 -0
- package/dist/src/services/observability/aggregation.js +217 -0
- package/dist/src/services/observability/jsonl-store.d.ts +59 -0
- package/dist/src/services/observability/jsonl-store.js +120 -0
- package/dist/src/services/observability/observability-service.d.ts +95 -0
- package/dist/src/services/observability/observability-service.js +119 -0
- package/dist/src/services/observability/report-formatter.d.ts +42 -0
- package/dist/src/services/observability/report-formatter.js +156 -0
- package/dist/src/services/openspec/openspec-archive-service.d.ts +12 -0
- package/dist/src/services/openspec/openspec-archive-service.js +28 -0
- package/dist/src/services/openspec/openspec-bridge-service.d.ts +16 -0
- package/dist/src/services/openspec/openspec-bridge-service.js +76 -0
- package/dist/src/services/openspec/openspec-init-service.d.ts +23 -0
- package/dist/src/services/openspec/openspec-init-service.js +122 -0
- package/dist/src/services/openspec/openspec-propose-from-doctor-service.d.ts +31 -0
- package/dist/src/services/openspec/openspec-propose-from-doctor-service.js +95 -0
- package/dist/src/services/openspec/openspec-render-service.d.ts +38 -0
- package/dist/src/services/openspec/openspec-render-service.js +130 -0
- package/dist/src/services/openspec/openspec-scan-service.d.ts +6 -0
- package/dist/src/services/openspec/openspec-scan-service.js +123 -0
- package/dist/src/services/openspec/openspec-types.d.ts +39 -0
- package/dist/src/services/openspec/openspec-types.js +1 -0
- package/dist/src/services/openspec/openspec-validate-service.d.ts +27 -0
- package/dist/src/services/openspec/openspec-validate-service.js +77 -0
- package/dist/src/services/perf/perf-baseline-service.d.ts +70 -0
- package/dist/src/services/perf/perf-baseline-service.js +214 -0
- package/dist/src/services/prd/handoff-auto-regen.d.ts +22 -0
- package/dist/src/services/prd/handoff-auto-regen.js +73 -0
- package/dist/src/services/prd/handoff-service.d.ts +54 -0
- package/dist/src/services/prd/handoff-service.js +142 -0
- package/dist/src/services/prd/handoff-types.d.ts +64 -0
- package/dist/src/services/prd/handoff-types.js +22 -0
- package/dist/src/services/prd/prd-blocks-checker.d.ts +51 -0
- package/dist/src/services/prd/prd-blocks-checker.js +130 -0
- package/dist/src/services/prd/project-scan-reader.d.ts +24 -0
- package/dist/src/services/prd/project-scan-reader.js +150 -0
- package/dist/src/services/prd/project-scan-sediment.d.ts +97 -0
- package/dist/src/services/prd/project-scan-sediment.js +445 -0
- package/dist/src/services/prd/project-scan-types.d.ts +66 -0
- package/dist/src/services/prd/project-scan-types.js +20 -0
- package/dist/src/services/preferences/preferences-service.d.ts +38 -0
- package/dist/src/services/preferences/preferences-service.js +198 -0
- package/dist/src/services/preferences/preferences-types.d.ts +148 -0
- package/dist/src/services/preferences/preferences-types.js +53 -0
- package/dist/src/services/profiles/profile-service.d.ts +6 -0
- package/dist/src/services/profiles/profile-service.js +19 -0
- package/dist/src/services/progress/progress-service.d.ts +125 -0
- package/dist/src/services/progress/progress-service.js +192 -0
- package/dist/src/services/providers/minimax-provider-service.d.ts +24 -0
- package/dist/src/services/providers/minimax-provider-service.js +143 -0
- package/dist/src/services/providers/minimax-worker-service.d.ts +21 -0
- package/dist/src/services/providers/minimax-worker-service.js +83 -0
- package/dist/src/services/proxy/proxy-service.d.ts +7 -0
- package/dist/src/services/proxy/proxy-service.js +31 -0
- package/dist/src/services/qa/browser-event-logger.d.ts +40 -0
- package/dist/src/services/qa/browser-event-logger.js +54 -0
- package/dist/src/services/qa/browser-restart-detector.d.ts +74 -0
- package/dist/src/services/qa/browser-restart-detector.js +138 -0
- package/dist/src/services/qa/browser-reuse-hint.d.ts +18 -0
- package/dist/src/services/qa/browser-reuse-hint.js +18 -0
- package/dist/src/services/qa/browser-wrapper-service.d.ts +37 -0
- package/dist/src/services/qa/browser-wrapper-service.js +88 -0
- package/dist/src/services/qa/qa-business-review-state.d.ts +47 -0
- package/dist/src/services/qa/qa-business-review-state.js +96 -0
- package/dist/src/services/rd/ast-gate.d.ts +19 -0
- package/dist/src/services/rd/ast-gate.js +71 -0
- package/dist/src/services/rd/impl.d.ts +9 -0
- package/dist/src/services/rd/impl.js +57 -0
- package/dist/src/services/rd/rd-service.d.ts +129 -0
- package/dist/src/services/rd/rd-service.js +438 -0
- package/dist/src/services/rd/reviewer-dispatch-policy.d.ts +122 -0
- package/dist/src/services/rd/reviewer-dispatch-policy.js +148 -0
- package/dist/src/services/rd/standards-diagnostic.d.ts +76 -0
- package/dist/src/services/rd/standards-diagnostic.js +166 -0
- package/dist/src/services/rd/strategic-stage.d.ts +4 -0
- package/dist/src/services/rd/strategic-stage.js +15 -0
- package/dist/src/services/rd/strategy.d.ts +13 -0
- package/dist/src/services/rd/strategy.js +60 -0
- package/dist/src/services/rd/tactical-stage.d.ts +33 -0
- package/dist/src/services/rd/tactical-stage.js +62 -0
- package/dist/src/services/rd/types.d.ts +252 -0
- package/dist/src/services/rd/types.js +47 -0
- package/dist/src/services/recommendations/capability-availability.d.ts +5 -0
- package/dist/src/services/recommendations/capability-availability.js +40 -0
- package/dist/src/services/recommendations/capability-map-service.d.ts +7 -0
- package/dist/src/services/recommendations/capability-map-service.js +131 -0
- package/dist/src/services/recommendations/capability-seed-items.d.ts +2 -0
- package/dist/src/services/recommendations/capability-seed-items.js +140 -0
- package/dist/src/services/recommendations/capability-seed-mappings.d.ts +2 -0
- package/dist/src/services/recommendations/capability-seed-mappings.js +54 -0
- package/dist/src/services/recommendations/capability-seed-sources.d.ts +2 -0
- package/dist/src/services/recommendations/capability-seed-sources.js +35 -0
- package/dist/src/services/recommendations/recommendation-service.d.ts +8 -0
- package/dist/src/services/recommendations/recommendation-service.js +106 -0
- package/dist/src/services/recommendations/recommendation-types.d.ts +129 -0
- package/dist/src/services/recommendations/recommendation-types.js +1 -0
- package/dist/src/services/recommendations/seed-capability-catalog.d.ts +3 -0
- package/dist/src/services/recommendations/seed-capability-catalog.js +3 -0
- package/dist/src/services/refactor/refactor-service.d.ts +9 -0
- package/dist/src/services/refactor/refactor-service.js +36 -0
- package/dist/src/services/release/release-state.d.ts +70 -0
- package/dist/src/services/release/release-state.js +140 -0
- package/dist/src/services/retrospective/retrospective-index.d.ts +37 -0
- package/dist/src/services/retrospective/retrospective-index.js +110 -0
- package/dist/src/services/retrospective/retrospective-search-service.d.ts +55 -0
- package/dist/src/services/retrospective/retrospective-search-service.js +107 -0
- package/dist/src/services/retrospective/retrospective-show.d.ts +40 -0
- package/dist/src/services/retrospective/retrospective-show.js +109 -0
- package/dist/src/services/reviewer/model-family.d.ts +18 -0
- package/dist/src/services/reviewer/model-family.js +70 -0
- package/dist/src/services/reviewer/providers/anthropic.d.ts +2 -0
- package/dist/src/services/reviewer/providers/anthropic.js +61 -0
- package/dist/src/services/reviewer/providers/ollama.d.ts +26 -0
- package/dist/src/services/reviewer/providers/ollama.js +38 -0
- package/dist/src/services/reviewer/providers/openai.d.ts +2 -0
- package/dist/src/services/reviewer/providers/openai.js +63 -0
- package/dist/src/services/reviewer/reviewer-config.d.ts +34 -0
- package/dist/src/services/reviewer/reviewer-config.js +100 -0
- package/dist/src/services/reviewer/reviewer-service.d.ts +56 -0
- package/dist/src/services/reviewer/reviewer-service.js +263 -0
- package/dist/src/services/reviewer/selection-strategies.d.ts +27 -0
- package/dist/src/services/reviewer/selection-strategies.js +53 -0
- package/dist/src/services/role/role-registry.d.ts +38 -0
- package/dist/src/services/role/role-registry.js +83 -0
- package/dist/src/services/sc/index.d.ts +1 -0
- package/dist/src/services/sc/index.js +1 -0
- package/dist/src/services/sc/sc-service.d.ts +131 -0
- package/dist/src/services/sc/sc-service.js +552 -0
- package/dist/src/services/scan/acceptance-coverage-service.d.ts +42 -0
- package/dist/src/services/scan/acceptance-coverage-service.js +140 -0
- package/dist/src/services/scan/api-surface-service.d.ts +69 -0
- package/dist/src/services/scan/api-surface-service.js +239 -0
- package/dist/src/services/scan/archetype-service.d.ts +5 -0
- package/dist/src/services/scan/archetype-service.js +242 -0
- package/dist/src/services/scan/diff-scope-service.d.ts +40 -0
- package/dist/src/services/scan/diff-scope-service.js +198 -0
- package/dist/src/services/scan/existing-system-service.d.ts +7 -0
- package/dist/src/services/scan/existing-system-service.js +300 -0
- package/dist/src/services/scan/file-size-scan.d.ts +23 -0
- package/dist/src/services/scan/file-size-scan.js +68 -0
- package/dist/src/services/scan/karpathy-service.d.ts +60 -0
- package/dist/src/services/scan/karpathy-service.js +228 -0
- package/dist/src/services/scan/libraries-service.d.ts +24 -0
- package/dist/src/services/scan/libraries-service.js +419 -0
- package/dist/src/services/scan/libraries-types.d.ts +59 -0
- package/dist/src/services/scan/libraries-types.js +9 -0
- package/dist/src/services/scan/orphan-service.d.ts +76 -0
- package/dist/src/services/scan/orphan-service.js +538 -0
- package/dist/src/services/scan/scan-types.d.ts +59 -0
- package/dist/src/services/scan/scan-types.js +1 -0
- package/dist/src/services/scan/type-sanity-service.d.ts +23 -0
- package/dist/src/services/scan/type-sanity-service.js +116 -0
- package/dist/src/services/security/safe-settings-path.d.ts +12 -0
- package/dist/src/services/security/safe-settings-path.js +104 -0
- package/dist/src/services/session/binding-status-service.d.ts +56 -0
- package/dist/src/services/session/binding-status-service.js +106 -0
- package/dist/src/services/session/binding-store.d.ts +161 -0
- package/dist/src/services/session/binding-store.js +509 -0
- package/dist/src/services/session/caller-binding-service.d.ts +70 -0
- package/dist/src/services/session/caller-binding-service.js +148 -0
- package/dist/src/services/session/caller-id-types.d.ts +77 -0
- package/dist/src/services/session/caller-id-types.js +46 -0
- package/dist/src/services/session/getSessionDir.d.ts +1 -0
- package/dist/src/services/session/getSessionDir.js +27 -0
- package/dist/src/services/session/index.d.ts +6 -0
- package/dist/src/services/session/index.js +7 -0
- package/dist/src/services/session/platform-fallbacks.d.ts +31 -0
- package/dist/src/services/session/platform-fallbacks.js +35 -0
- package/dist/src/services/session/resolve-caller-id.d.ts +57 -0
- package/dist/src/services/session/resolve-caller-id.js +88 -0
- package/dist/src/services/session/session-binding-bridge.d.ts +76 -0
- package/dist/src/services/session/session-binding-bridge.js +247 -0
- package/dist/src/services/session/session-checkpoint-service.d.ts +57 -0
- package/dist/src/services/session/session-checkpoint-service.js +143 -0
- package/dist/src/services/session/session-manager.d.ts +168 -0
- package/dist/src/services/session/session-manager.js +502 -0
- package/dist/src/services/session/session-resume-service.d.ts +25 -0
- package/dist/src/services/session/session-resume-service.js +101 -0
- package/dist/src/services/signal/cancel-handler.d.ts +14 -0
- package/dist/src/services/signal/cancel-handler.js +76 -0
- package/dist/src/services/skill/resume-detector.d.ts +54 -0
- package/dist/src/services/skill/resume-detector.js +334 -0
- package/dist/src/services/skill/skill-scheduler.d.ts +40 -0
- package/dist/src/services/skill/skill-scheduler.js +53 -0
- package/dist/src/services/skills/hooks-settings-service.d.ts +137 -0
- package/dist/src/services/skills/hooks-settings-service.js +396 -0
- package/dist/src/services/skills/skill-conformance-service.d.ts +40 -0
- package/dist/src/services/skills/skill-conformance-service.js +136 -0
- package/dist/src/services/skills/skill-presence-service.d.ts +158 -0
- package/dist/src/services/skills/skill-presence-service.js +474 -0
- package/dist/src/services/skills/skill-registry.d.ts +17 -0
- package/dist/src/services/skills/skill-registry.js +40 -0
- package/dist/src/services/skills/skill-runbook-service.d.ts +11 -0
- package/dist/src/services/skills/skill-runbook-service.js +128 -0
- package/dist/src/services/skills/skill-statusline-renderer.d.ts +6 -0
- package/dist/src/services/skills/skill-statusline-renderer.js +55 -0
- package/dist/src/services/skills/skill-statusline-service.d.ts +24 -0
- package/dist/src/services/skills/skill-statusline-service.js +110 -0
- package/dist/src/services/skills/statusline-settings-service.d.ts +59 -0
- package/dist/src/services/skills/statusline-settings-service.js +141 -0
- package/dist/src/services/skills/sync-service.d.ts +86 -0
- package/dist/src/services/skills/sync-service.js +271 -0
- package/dist/src/services/slice/calibration-store.d.ts +39 -0
- package/dist/src/services/slice/calibration-store.js +68 -0
- package/dist/src/services/slice/cross-pass-edge-merger.d.ts +53 -0
- package/dist/src/services/slice/cross-pass-edge-merger.js +246 -0
- package/dist/src/services/slice/granularity-decider.d.ts +37 -0
- package/dist/src/services/slice/granularity-decider.js +40 -0
- package/dist/src/services/slice/llm-arbitrator.d.ts +35 -0
- package/dist/src/services/slice/llm-arbitrator.js +63 -0
- package/dist/src/services/slice/multi-pass-orchestrator.d.ts +67 -0
- package/dist/src/services/slice/multi-pass-orchestrator.js +225 -0
- package/dist/src/services/slice/schema-router.d.ts +44 -0
- package/dist/src/services/slice/schema-router.js +61 -0
- package/dist/src/services/slice/slice-archive-service.d.ts +20 -0
- package/dist/src/services/slice/slice-archive-service.js +111 -0
- package/dist/src/services/slice/slice-benchmark-service.d.ts +19 -0
- package/dist/src/services/slice/slice-benchmark-service.js +60 -0
- package/dist/src/services/slice/slice-check-service.d.ts +2 -0
- package/dist/src/services/slice/slice-check-service.js +459 -0
- package/dist/src/services/slice/slice-check-types.d.ts +104 -0
- package/dist/src/services/slice/slice-check-types.js +28 -0
- package/dist/src/services/slice/slice-decompose-runners.d.ts +23 -0
- package/dist/src/services/slice/slice-decompose-runners.js +174 -0
- package/dist/src/services/slice/slice-decompose-service.d.ts +24 -0
- package/dist/src/services/slice/slice-decompose-service.js +532 -0
- package/dist/src/services/slice/slice-decompose-types.d.ts +263 -0
- package/dist/src/services/slice/slice-decompose-types.js +30 -0
- package/dist/src/services/slice/slice-integration.d.ts +43 -0
- package/dist/src/services/slice/slice-integration.js +106 -0
- package/dist/src/services/slice/slice-pick-service.d.ts +32 -0
- package/dist/src/services/slice/slice-pick-service.js +75 -0
- package/dist/src/services/slice/slice-review-state.d.ts +70 -0
- package/dist/src/services/slice/slice-review-state.js +109 -0
- package/dist/src/services/slice/slice-topology-types.d.ts +115 -0
- package/dist/src/services/slice/slice-topology-types.js +20 -0
- package/dist/src/services/smoke/smoke-paths-state.d.ts +73 -0
- package/dist/src/services/smoke/smoke-paths-state.js +117 -0
- package/dist/src/services/solo/auto-compact-orchestrator.d.ts +98 -0
- package/dist/src/services/solo/auto-compact-orchestrator.js +343 -0
- package/dist/src/services/solo/batch-heartbeat-poller.d.ts +51 -0
- package/dist/src/services/solo/batch-heartbeat-poller.js +88 -0
- package/dist/src/services/solo/dag-orchestrator.d.ts +128 -0
- package/dist/src/services/solo/dag-orchestrator.js +304 -0
- package/dist/src/services/solo/mode-gate.d.ts +163 -0
- package/dist/src/services/solo/mode-gate.js +212 -0
- package/dist/src/services/solo/post-compact-detector.d.ts +61 -0
- package/dist/src/services/solo/post-compact-detector.js +240 -0
- package/dist/src/services/solo/status-line-renderer.d.ts +34 -0
- package/dist/src/services/solo/status-line-renderer.js +55 -0
- package/dist/src/services/solo/user-touchpoint-classifier.d.ts +44 -0
- package/dist/src/services/solo/user-touchpoint-classifier.js +145 -0
- package/dist/src/services/sop/gate-enforce-service.d.ts +33 -0
- package/dist/src/services/sop/gate-enforce-service.js +168 -0
- package/dist/src/services/sop/sop-advance-service.d.ts +74 -0
- package/dist/src/services/sop/sop-advance-service.js +115 -0
- package/dist/src/services/sop/sop-check-service.d.ts +45 -0
- package/dist/src/services/sop/sop-check-service.js +181 -0
- package/dist/src/services/sop/sop-paths.d.ts +62 -0
- package/dist/src/services/sop/sop-paths.js +92 -0
- package/dist/src/services/sop/sop-registry-service.d.ts +46 -0
- package/dist/src/services/sop/sop-registry-service.js +89 -0
- package/dist/src/services/sop/sop-service.d.ts +55 -0
- package/dist/src/services/sop/sop-service.js +222 -0
- package/dist/src/services/sop/sop-types.d.ts +95 -0
- package/dist/src/services/sop/sop-types.js +11 -0
- package/dist/src/services/standards/ide-aware-standards-service.d.ts +94 -0
- package/dist/src/services/standards/ide-aware-standards-service.js +89 -0
- package/dist/src/services/standards/migrate-claude-rules-service.d.ts +19 -0
- package/dist/src/services/standards/migrate-claude-rules-service.js +193 -0
- package/dist/src/services/standards/migrate-service.d.ts +63 -0
- package/dist/src/services/standards/migrate-service.js +193 -0
- package/dist/src/services/standards/missing-standards-detector.d.ts +79 -0
- package/dist/src/services/standards/missing-standards-detector.js +132 -0
- package/dist/src/services/standards/project-context.d.ts +24 -0
- package/dist/src/services/standards/project-context.js +314 -0
- package/dist/src/services/standards/project-standards-service.d.ts +114 -0
- package/dist/src/services/standards/project-standards-service.js +574 -0
- package/dist/src/services/tech/tech-service.d.ts +69 -0
- package/dist/src/services/tech/tech-service.js +299 -0
- package/dist/src/services/test-cache/test-cache-service.d.ts +70 -0
- package/dist/src/services/test-cache/test-cache-service.js +175 -0
- package/dist/src/services/understand/understand-scan-service.d.ts +28 -0
- package/dist/src/services/understand/understand-scan-service.js +170 -0
- package/dist/src/services/understand/understand-types.d.ts +50 -0
- package/dist/src/services/understand/understand-types.js +1 -0
- package/dist/src/services/upgrade/1x-detector-service.d.ts +7 -0
- package/dist/src/services/upgrade/1x-detector-service.js +94 -0
- package/dist/src/services/upgrade/gitignore-migrate-service.d.ts +56 -0
- package/dist/src/services/upgrade/gitignore-migrate-service.js +170 -0
- package/dist/src/services/upgrade/upgrade-service.d.ts +47 -0
- package/dist/src/services/upgrade/upgrade-service.js +381 -0
- package/dist/src/services/verdict/envelopes.d.ts +93 -0
- package/dist/src/services/verdict/envelopes.js +349 -0
- package/dist/src/services/verdict/verdict-aggregator.d.ts +94 -0
- package/dist/src/services/verdict/verdict-aggregator.js +112 -0
- package/dist/src/services/workflow/artifact-paths.d.ts +59 -0
- package/dist/src/services/workflow/artifact-paths.js +166 -0
- package/dist/src/services/workflow/autonomous-resume-writer.d.ts +16 -0
- package/dist/src/services/workflow/autonomous-resume-writer.js +170 -0
- package/dist/src/services/workflow/pipeline-verify-service.d.ts +90 -0
- package/dist/src/services/workflow/pipeline-verify-service.js +449 -0
- package/dist/src/services/workflow/plan-reader.d.ts +29 -0
- package/dist/src/services/workflow/plan-reader.js +174 -0
- package/dist/src/services/workflow/plan-refresher.d.ts +32 -0
- package/dist/src/services/workflow/plan-refresher.js +353 -0
- package/dist/src/services/workflow/plan-trigger-detector.d.ts +55 -0
- package/dist/src/services/workflow/plan-trigger-detector.js +142 -0
- package/dist/src/services/workflow/workflow-autonomous-resume-helpers.d.ts +19 -0
- package/dist/src/services/workflow/workflow-autonomous-resume-helpers.js +300 -0
- package/dist/src/services/workflow/workflow-autonomous-service.d.ts +100 -0
- package/dist/src/services/workflow/workflow-autonomous-service.js +306 -0
- package/dist/src/services/workflow/workflow-loader.d.ts +63 -0
- package/dist/src/services/workflow/workflow-loader.js +168 -0
- package/dist/src/services/workflow/workflow-router-service.d.ts +85 -0
- package/dist/src/services/workflow/workflow-router-service.js +227 -0
- package/dist/src/services/workflow/workflow-skip-service.d.ts +106 -0
- package/dist/src/services/workflow/workflow-skip-service.js +209 -0
- package/dist/src/services/workflow/workflow-spec.d.ts +116 -0
- package/dist/src/services/workflow/workflow-spec.js +431 -0
- package/dist/src/services/workflow/workflow-state-store.d.ts +27 -0
- package/dist/src/services/workflow/workflow-state-store.js +95 -0
- package/dist/src/services/workspace/claude-settings-template.d.ts +96 -0
- package/dist/src/services/workspace/claude-settings-template.js +215 -0
- package/dist/src/services/workspace/migrate-1-4-1-service.d.ts +44 -0
- package/dist/src/services/workspace/migrate-1-4-1-service.js +195 -0
- package/dist/src/services/workspace/migrate-service.d.ts +2 -0
- package/dist/src/services/workspace/migrate-service.js +613 -0
- package/dist/src/services/workspace/migrate-types.d.ts +127 -0
- package/dist/src/services/workspace/migrate-types.js +21 -0
- package/dist/src/services/workspace/reconcile-service.d.ts +188 -0
- package/dist/src/services/workspace/reconcile-service.js +683 -0
- package/dist/src/services/workspace/reconcile-types.d.ts +130 -0
- package/dist/src/services/workspace/reconcile-types.js +13 -0
- package/dist/src/services/workspace/sid-naming-guard.d.ts +17 -0
- package/dist/src/services/workspace/sid-naming-guard.js +34 -0
- package/dist/src/services/workspace/workspace-claude-settings-materializer.d.ts +45 -0
- package/dist/src/services/workspace/workspace-claude-settings-materializer.js +194 -0
- package/dist/src/services/workspace/workspace-clean-service.d.ts +28 -0
- package/dist/src/services/workspace/workspace-clean-service.js +46 -0
- package/dist/src/services/workspace/workspace-service.d.ts +177 -0
- package/dist/src/services/workspace/workspace-service.js +432 -0
- package/dist/src/services/workspace/workspace-state-service.d.ts +7 -0
- package/dist/src/services/workspace/workspace-state-service.js +43 -0
- package/dist/src/shared/format-md-compact.d.ts +32 -0
- package/dist/src/shared/format-md-compact.js +297 -0
- package/dist/src/shared/frontmatter.d.ts +6 -0
- package/dist/src/shared/frontmatter.js +165 -0
- package/dist/src/shared/fs-utils.d.ts +4 -0
- package/dist/src/shared/fs-utils.js +16 -0
- package/dist/src/shared/fs.d.ts +4 -0
- package/dist/src/shared/fs.js +26 -0
- package/dist/src/shared/incrementing-number.d.ts +23 -0
- package/dist/src/shared/incrementing-number.js +68 -0
- package/dist/src/shared/json-schema-mini.d.ts +10 -0
- package/dist/src/shared/json-schema-mini.js +113 -0
- package/dist/src/shared/path-safety.d.ts +21 -0
- package/dist/src/shared/path-safety.js +54 -0
- package/dist/src/shared/path-utils.d.ts +13 -0
- package/dist/src/shared/path-utils.js +56 -0
- package/dist/src/shared/paths.d.ts +6 -0
- package/dist/src/shared/paths.js +50 -0
- package/dist/src/shared/planner-response.d.ts +21 -0
- package/dist/src/shared/planner-response.js +26 -0
- package/dist/src/shared/platform.d.ts +6 -0
- package/dist/src/shared/platform.js +11 -0
- package/dist/src/shared/process.d.ts +5 -0
- package/dist/src/shared/process.js +12 -0
- package/dist/src/shared/result.d.ts +22 -0
- package/dist/src/shared/result.js +46 -0
- package/dist/src/shared/stale-policy.d.ts +67 -0
- package/dist/src/shared/stale-policy.js +85 -0
- package/dist/src/shared/version.d.ts +1 -0
- package/dist/src/shared/version.js +1 -0
- package/output-styles/peaks-skill-swarm.md +132 -0
- package/package.json +101 -0
- package/schemas/approval-record.schema.json +14 -0
- package/schemas/artifact-manifest.schema.json +16 -0
- package/schemas/artifact-retention-report.schema.json +38 -0
- package/schemas/artifact-workspace.schema.json +22 -0
- package/schemas/capability-availability.schema.json +36 -0
- package/schemas/capability-item.schema.json +37 -0
- package/schemas/capability-source.schema.json +30 -0
- package/schemas/change-impact.schema.json +15 -0
- package/schemas/context-capsule.schema.json +16 -0
- package/schemas/context.schema.json +360 -0
- package/schemas/decomposition-v1.json +194 -0
- package/schemas/decomposition-v2.json +193 -0
- package/schemas/doctor-report.schema.json +34 -0
- package/schemas/library-breaking-changes.data.json +141 -0
- package/schemas/library-breaking-changes.meta.json +6 -0
- package/schemas/library-breaking-changes.schema.json +50 -0
- package/schemas/mcp-apply-result.schema.json +46 -0
- package/schemas/mcp-install-plan.schema.json +71 -0
- package/schemas/mcp-install-spec.schema.json +29 -0
- package/schemas/mcp-server.schema.json +29 -0
- package/schemas/openspec-change-summary.schema.json +68 -0
- package/schemas/openspec-render-request.schema.json +61 -0
- package/schemas/openspec-validation-result.schema.json +36 -0
- package/schemas/recommendation-plan.schema.json +37 -0
- package/schemas/refactor-slice-spec.schema.json +19 -0
- package/schemas/replay-fixture.schema.json +158 -0
- package/schemas/reviewer-envelope.schema.json +79 -0
- package/schemas/sop-manifest.schema.json +52 -0
- package/scripts/clean-dist.mjs +8 -0
- package/scripts/install-skills.mjs +1202 -0
- package/scripts/sync-version.mjs +12 -0
- package/scripts/watch.mjs +389 -0
- package/skills/peaks-audit/SKILL.md +151 -0
- package/skills/peaks-audit/references/6-dimensions.md +141 -0
- package/skills/peaks-doctor/SKILL.md +59 -0
- package/skills/peaks-doctor/references/doctor-check-catalog.md +31 -0
- package/skills/peaks-doctor/references/from-doctor-flow.md +64 -0
- package/skills/peaks-doctor/test_prompts.json +17 -0
- package/skills/peaks-final-review/SKILL.md +157 -0
- package/skills/peaks-final-review/references/4-dimensions.md +117 -0
- package/skills/peaks-ide/SKILL.md +161 -0
- package/skills/peaks-ide/references/audit-log-helper.md +52 -0
- package/skills/peaks-perf-audit/SKILL.md +166 -0
- package/skills/peaks-perf-audit/references/audit-protocol.md +173 -0
- package/skills/peaks-prd/SKILL.md +319 -0
- package/skills/peaks-prd/references/artifact-contracts.md +7 -0
- package/skills/peaks-prd/references/artifact-per-request.md +78 -0
- package/skills/peaks-prd/references/command-migration.md +3 -0
- package/skills/peaks-prd/references/prd-for-multi-pass.md +49 -0
- package/skills/peaks-prd/references/workflow.md +43 -0
- package/skills/peaks-qa/SKILL.md +240 -0
- package/skills/peaks-qa/references/artifact-contracts.md +7 -0
- package/skills/peaks-qa/references/artifact-per-request.md +25 -0
- package/skills/peaks-qa/references/browser-validation-contracts.md +51 -0
- package/skills/peaks-qa/references/codegraph-regression-focus.md +5 -0
- package/skills/peaks-qa/references/command-migration.md +3 -0
- package/skills/peaks-qa/references/external-capability-guidance.md +9 -0
- package/skills/peaks-qa/references/openspec-validation-gate.md +55 -0
- package/skills/peaks-qa/references/qa-compact-handoff.md +3 -0
- package/skills/peaks-qa/references/qa-context-governance.md +24 -0
- package/skills/peaks-qa/references/qa-fanout-contract.md +158 -0
- package/skills/peaks-qa/references/qa-gstack-integration.md +7 -0
- package/skills/peaks-qa/references/qa-local-artifacts.md +3 -0
- package/skills/peaks-qa/references/qa-matt-pocock-integration.md +9 -0
- package/skills/peaks-qa/references/qa-perf-test-plan.md +67 -0
- package/skills/peaks-qa/references/qa-refactor-role.md +3 -0
- package/skills/peaks-qa/references/qa-runbook.md +72 -0
- package/skills/peaks-qa/references/qa-security-test-plan.md +73 -0
- package/skills/peaks-qa/references/qa-skill-presence.md +22 -0
- package/skills/peaks-qa/references/qa-standards-preflight.md +8 -0
- package/skills/peaks-qa/references/qa-sub-agent-dispatch.md +46 -0
- package/skills/peaks-qa/references/qa-transition-gates.md +86 -0
- package/skills/peaks-qa/references/reading-handoff-frontmatter.md +30 -0
- package/skills/peaks-qa/references/regression-gates.md +24 -0
- package/skills/peaks-qa/references/requirement-boundary-recheck.md +9 -0
- package/skills/peaks-qa/references/test-case-generation.md +27 -0
- package/skills/peaks-qa/references/test-report-output.md +14 -0
- package/skills/peaks-rd/SKILL.md +279 -0
- package/skills/peaks-rd/references/artifact-and-standards-output.md +9 -0
- package/skills/peaks-rd/references/artifact-contracts.md +7 -0
- package/skills/peaks-rd/references/artifact-per-request.md +112 -0
- package/skills/peaks-rd/references/browser-action-wrapper.md +39 -0
- package/skills/peaks-rd/references/browser-self-test-contracts.md +29 -0
- package/skills/peaks-rd/references/code-reviewer-4dim-hint.md +72 -0
- package/skills/peaks-rd/references/codegraph-project-analysis.md +5 -0
- package/skills/peaks-rd/references/command-migration.md +3 -0
- package/skills/peaks-rd/references/compact-handoff.md +3 -0
- package/skills/peaks-rd/references/external-references.md +11 -0
- package/skills/peaks-rd/references/frontend-project-generation.md +11 -0
- package/skills/peaks-rd/references/karpathy-reviewer-prompt.md +2 -0
- package/skills/peaks-rd/references/library-version-awareness.md +30 -0
- package/skills/peaks-rd/references/mandatory-perf-baseline.md +42 -0
- package/skills/peaks-rd/references/matt-pocock-integration.md +11 -0
- package/skills/peaks-rd/references/mock-data-placement.md +40 -0
- package/skills/peaks-rd/references/ocr-integration.md +229 -0
- package/skills/peaks-rd/references/openspec-cli.md +62 -0
- package/skills/peaks-rd/references/parallel-review-fanout.md +90 -0
- package/skills/peaks-rd/references/rd-context-governance.md +36 -0
- package/skills/peaks-rd/references/rd-fanout-contracts.md +216 -0
- package/skills/peaks-rd/references/rd-gstack-integration.md +16 -0
- package/skills/peaks-rd/references/rd-runbook.md +190 -0
- package/skills/peaks-rd/references/rd-standards-preflight.md +8 -0
- package/skills/peaks-rd/references/rd-sub-agent-dispatch.md +111 -0
- package/skills/peaks-rd/references/rd-transition-gates.md +148 -0
- package/skills/peaks-rd/references/reading-v2-slice-results.md +54 -0
- package/skills/peaks-rd/references/refactor-workflow.md +39 -0
- package/skills/peaks-rd/references/skill-presence-and-title.md +22 -0
- package/skills/peaks-rd/references/v2-12-fanout-collapse.md +64 -0
- package/skills/peaks-rd/references/writing-handoff-frontmatter.md +68 -0
- package/skills/peaks-reviewer/SKILL.md +76 -0
- package/skills/peaks-reviewer/references/reviewer-prompt.md +50 -0
- package/skills/peaks-reviewer/references/reviewer-schema.md +49 -0
- package/skills/peaks-sc/SKILL.md +166 -0
- package/skills/peaks-sc/references/artifact-contracts.md +3 -0
- package/skills/peaks-sc/references/artifact-retention.md +14 -0
- package/skills/peaks-sc/references/command-migration.md +3 -0
- package/skills/peaks-sc/references/openspec-commit-boundaries.md +33 -0
- package/skills/peaks-security-audit/SKILL.md +167 -0
- package/skills/peaks-security-audit/references/audit-protocol.md +175 -0
- package/skills/peaks-slice-decompose/SKILL.md +111 -0
- package/skills/peaks-slice-decompose/references/cross-pass-edge-interpretation.md +158 -0
- package/skills/peaks-slice-decompose/references/granularity-decision.md +129 -0
- package/skills/peaks-slice-decompose/references/v2-schema.md +156 -0
- package/skills/peaks-solo/SKILL.md +316 -0
- package/skills/peaks-solo/references/a2a-artifact-mapping.md +115 -0
- package/skills/peaks-solo/references/anchoring-and-session-info.md +34 -0
- package/skills/peaks-solo/references/artifact-contracts.md +65 -0
- package/skills/peaks-solo/references/boundaries.md +21 -0
- package/skills/peaks-solo/references/browser-workflow.md +127 -0
- package/skills/peaks-solo/references/checkpoint-resume.md +70 -0
- package/skills/peaks-solo/references/codegraph-orchestration.md +5 -0
- package/skills/peaks-solo/references/command-migration.md +3 -0
- package/skills/peaks-solo/references/completion-handoff.md +18 -0
- package/skills/peaks-solo/references/context-governance.md +204 -0
- package/skills/peaks-solo/references/cross-date-session-check.md +67 -0
- package/skills/peaks-solo/references/dag-orchestrator.md +56 -0
- package/skills/peaks-solo/references/envelope-contract.md +130 -0
- package/skills/peaks-solo/references/existing-system-extraction.md +78 -0
- package/skills/peaks-solo/references/external-references.md +17 -0
- package/skills/peaks-solo/references/external-skill-invocation.md +72 -0
- package/skills/peaks-solo/references/fanout-mandatory.md +109 -0
- package/skills/peaks-solo/references/fast-mode.md +23 -0
- package/skills/peaks-solo/references/frontend-only-mode.md +87 -0
- package/skills/peaks-solo/references/gstack-integration.md +7 -0
- package/skills/peaks-solo/references/headroom-integration.md +107 -0
- package/skills/peaks-solo/references/local-artifact-workspace.md +79 -0
- package/skills/peaks-solo/references/micro-cycle.md +316 -0
- package/skills/peaks-solo/references/mode-selection-with-stale-presence.md +124 -0
- package/skills/peaks-solo/references/mode-selection.md +21 -0
- package/skills/peaks-solo/references/openspec-workflow.md +81 -0
- package/skills/peaks-solo/references/periodic-checkpoint.md +71 -0
- package/skills/peaks-solo/references/playwright-mcp-multi-terminal.md +114 -0
- package/skills/peaks-solo/references/project-memory-loading.md +17 -0
- package/skills/peaks-solo/references/project-scan-checklist.md +136 -0
- package/skills/peaks-solo/references/quality-gate-cheatsheet.md +13 -0
- package/skills/peaks-solo/references/refactor-mode.md +24 -0
- package/skills/peaks-solo/references/resume-detection.md +63 -0
- package/skills/peaks-solo/references/runbook.md +188 -0
- package/skills/peaks-solo/references/skill-presence-and-title.md +31 -0
- package/skills/peaks-solo/references/standards-preflight.md +23 -0
- package/skills/peaks-solo/references/step-0-55-1x-detection.md +82 -0
- package/skills/peaks-solo/references/sub-agent-dispatch.md +334 -0
- package/skills/peaks-solo/references/swarm-dispatch-contract.md +230 -0
- package/skills/peaks-solo/references/workflow-gates-and-types.md +186 -0
- package/skills/peaks-solo/references/workflow.md +38 -0
- package/skills/peaks-solo-resume/SKILL.md +81 -0
- package/skills/peaks-solo-status/SKILL.md +120 -0
- package/skills/peaks-solo-test/SKILL.md +84 -0
- package/skills/peaks-sop/SKILL.md +209 -0
- package/skills/peaks-sop/references/sop-authoring.md +161 -0
- package/skills/peaks-txt/SKILL.md +303 -0
- package/skills/peaks-txt/references/artifact-contracts.md +7 -0
- package/skills/peaks-txt/references/command-migration.md +3 -0
- package/skills/peaks-txt/references/context-capsule.md +21 -0
- package/skills/peaks-ui/SKILL.md +369 -0
- package/skills/peaks-ui/references/artifact-contracts.md +3 -0
- package/skills/peaks-ui/references/artifact-per-request.md +71 -0
- package/skills/peaks-ui/references/command-migration.md +3 -0
- package/skills/peaks-ui/references/workflow.md +27 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,3136 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [Unreleased] — 2026-06-29 — change-id shim (cleanup post v2.17.0 hard-kill)
|
|
4
|
+
|
|
5
|
+
**MINOR bump target: v2.19.0**. Full removal of the peaks-cli change-id axis (filesystem axis, code shim, envelope JSON slug, CLI flags). OpenSpec's independent `openspec/changes/<change-id>/` vocabulary (L4) is preserved untouched. One cleanup slice that retires the v2.17.0 shim half-life.
|
|
6
|
+
|
|
7
|
+
### Removed — change-id shim (cleanup post v2.17.0 hard-kill)
|
|
8
|
+
|
|
9
|
+
- `src/shared/change-id.ts` deleted (257 lines); `isUnsafePathInput` / `isUnsafeArtifactPath` / `isPathInsideArtifactRoot` migrated to the new `src/shared/path-safety.ts` (the only exports the file retained after the v2.17.0 hard-kill).
|
|
10
|
+
- `peaks workspace migrate-change-scope` subcommand removed (its on-disk target `.peaks/_runtime/change/<id>/` was already hard-killed in v2.17.0). The legacy `DEPRECATION_LEGACY_PATH_USED` violations now surface "move the file into the canonical location; the legacy `peaks workspace migrate-change-scope` helper was removed in v2.19.0; use `peaks workspace migrate` to relocate misplaced content" instead of pointing at the deleted CLI.
|
|
11
|
+
- `--change-id` CLI flag removed from all commands: `peaks fixture capture`, `peaks workflow verify-pipeline`, `peaks tech plan`, `peaks tech status`, `peaks workflow route`, `peaks workflow autonomous`, `peaks swarm plan`, `peaks workflow autonomous-resume init`, `peaks workspace init`. The flag was a no-op post-v2.17.0 anyway — its removal aligns the CLI with the new single-axis contract.
|
|
12
|
+
- `validateChangeIdOrThrow` / `getCurrentChangeId` / `setCurrentChangeId` / `buildArtifactRelativePath` / `buildArtifactRelativePathInRoot` / `LegacyChangeIdBindingError` / `LegacyChangeIdSiblingError` deleted. The sibling-dir guard (`LegacyChangeIdSiblingError`) is preserved inline in `initWorkspace` as a `lstatSync` check on `.peaks/<changeId>/` to keep the 2.8.3 hard-ban enforceable.
|
|
13
|
+
- `data.changeId` envelope JSON slug removed from RD/QA/PRD writer outputs (the change-id is preserved as a metadata-only filename slug in the artifact body, but no longer rides in the `data.changeId` envelope key).
|
|
14
|
+
- 26 SKILL.md files updated: `## Two-axis naming convention` headers renamed to `## Single-scope-axis naming convention`; `.peaks/_runtime/change/<changeId>/` examples in skill MD prose rewritten to `.peaks/_runtime/<sessionId>/<role>/...`. OpenSpec `<change-id>` references in skill MDs preserved untouched.
|
|
15
|
+
- `tests/unit/workspace/top-level-change-id-guard.test.ts` retargeted to ban `<YYYY-MM-DD-*>` sibling dirs (the same invariant the change-id sibling ban protected, but now date-stamped and change-id-agnostic).
|
|
16
|
+
- 15 src files + 6 test files migrated off the `shared/change-id` shim. The `change-scope-service.ts` helper still validates the change-id shape when callers pass an explicit one (e.g. `getChangeScopeDirAbs(workspace, changeId)`); the validation is now at the writer boundary, not the planner boundary.
|
|
17
|
+
|
|
18
|
+
### Additional removals — change-id round 2
|
|
19
|
+
|
|
20
|
+
- `src/services/artifacts/change-scope-service.ts` deleted (entire L1 filesystem axis runtime — `getChangeScopeDirAbs`, `ensureChangeScopeDir`, `isSafeChangeScopeId`, `ChangeScopeIdValidationError`, `CHANGE_SCOPE_RELATIVE_PARTS` all removed). Callers now resolve the session-axis dir via the canonical `getSessionDir` from `src/services/session/getSessionDir.ts`.
|
|
21
|
+
- `src/services/artifacts/artifact-templates.ts` rewritten: the 4 path-formatters (`formatHandoffPath`, `formatCommitBoundaryPath`, `formatSkillUsageLessonsPath`, `formatChangeScopePath`) now take `sessionId` and return `.peaks/_runtime/<sessionId>/...` paths. `formatChangeScopePath` removed entirely (no callers after the change-scope-service deletion).
|
|
22
|
+
- `src/services/sc/sc-service.ts` `resolveCurrentChangeId` removed (dead code reading the deleted `.peaks/_runtime/current-change` binding file); `getCurrentArtifactDir` now resolves the active session via `getSessionId`.
|
|
23
|
+
- `src/cli/commands/workspace/init-command.ts` cleaned: dropped leftover `options.changeId` arg, `changeId?: string` type field, and `--change-id` text from the `workspace init` description. The legacy sibling-dir migration message no longer points at a deleted `--change-id` flag.
|
|
24
|
+
- 4 envelope writers (`prd-commands`, `request-commands`, `init-command`) no longer emit `data.changeId` / `data.changeIdAction` in the JSON envelope. The `peaks workspace init` JSON output is now a clean `sessionId`/`sessionRoot`/`bound` shape.
|
|
25
|
+
- 12 JSDoc references to the deleted `src/shared/change-id.ts` file scrubbed across `src/services/session/session-binding-bridge.ts`, `src/services/session/session-manager.ts`, `src/shared/path-safety.ts`, `tests/unit/session-manager.test.ts`, `tests/vitest.setup.ts`. The 3 pre-slim `tests/fixtures/skills/pre-slim/*.SKILL.md` fixtures preserve the historical reference per the FROZEN EVIDENCE rule.
|
|
26
|
+
- 2 weakened `tests/unit/rd/repair-cycle-2-cli-wiring.test.ts` cases restored with real assertions: the test now bootstraps a real session via `peaks workspace init` then drives `peaks swarm plan` end-to-end, asserting `standardsErrorCode`, `standardsDiagnostic`, and `process.exitCode` (no `expect(true).toBe(true)`, no `.skip`).
|
|
27
|
+
|
|
28
|
+
### Round 3 — change-id彻底根治
|
|
29
|
+
|
|
30
|
+
- All 275 internal `changeId` field references in `src/` renamed to `sessionId` across 35 source files (cli/commands, services/workflow, services/tech, services/workspace, services/sc, services/rd, services/prd, services/audit, services/fixture, services/slice, services/mut, services/providers, services/artifacts, services/openspec-adjacent callers). The 65 remaining `changeId` hits are EXCLUSIVELY in `src/cli/commands/openspec-commands.ts` and `src/services/openspec/*.ts` — L4 OpenSpec vocabulary (positional `<change-id>` arg, `openspec/changes/<change-id>/` dir name, OpenSpec spec/proposal markdown tokens). The rename preserves L4 per PRD §Non-Goals.
|
|
31
|
+
- `WorkspaceInitOptions.changeId?: string` field REMOVED entirely (was a no-op post-v2.17.0; the slice deletes the binding-file legacy and the inline lstatSync guard now scopes the v2.8.3 hard-ban to date-stamped top-level siblings at `.peaks/<YYYY-MM-DD-*>/` only).
|
|
32
|
+
- `peaks workspace init --json` runtime output confirmed clean — zero `changeId` / `changeIdAction` keys in the `data` envelope (AC-10 PASS at runtime + AC-15 PASS at the binary level: `node bin/peaks.js workspace migrate-change-scope` returns `error: unknown command`).
|
|
33
|
+
- 518 `changeId` field references renamed to `sessionId` in 46 test files (unit tests across cli, services, fixtures, observability). A subset of tests that asserted on `changeId` as a separate durable-scope field (distinct from `sessionId`) were updated to expect the merged semantics: in the post-v2.17.0 single-axis world, the durable scope IS the session id, so `changeId` and `sessionId` collapse.
|
|
34
|
+
- New `tests/unit/workspace/sibling-date-dir-guard.test.ts` (8 cases) covers the v2.8.3 hard-ban on `.peaks/<YYYY-MM-DD-*>/` date-stamped top-level siblings directly. The test exercises the inline `lstatSync` guard in `initWorkspace` with 8 scenarios (top-level date, runtime date, canonical session, non-date, bare date, mixed-case date, writer-shaped, writer-shape + non-writer). 8/8 PASS.
|
|
35
|
+
- Env fix: `@jridgewell/trace-mapping@0.3.31` reinstalled via `pnpm install --force` to unblock `vitest run` (the prior `.pnpm/` store had a broken symlink target). AC-14 environment now runs.
|
|
36
|
+
- `pnpm build` regenerates `dist/` cleanly (exit 0). The remaining `migrate-change-scope` mentions in `dist/src/services/workflow/*.js` are JSDoc comments explaining the v2.19.0 removal — no command registration.
|
|
37
|
+
- `tests/unit/workspace/top-level-change-id-guard.test.ts` (deleted in RD-1) is semantically replaced by `tests/unit/workspace/sibling-date-dir-guard.test.ts` + `tests/unit/workspace/banned-path-directive-guard.test.ts`. Both green.
|
|
38
|
+
- Final grep `changeId` in `src/cli/ src/services/ src/shared/` = 65 lines, all in `openspec-commands.ts` + `src/services/openspec/*.ts` (L4 OpenSpec keep, justified per PRD §L4 (OpenSpec vocabulary) — KEEP UNCHANGED).
|
|
39
|
+
- AC-14 status: full `pnpm test:unit` completes with 4908 pass + 65 fail + 17 skipped. The 65 failures are concentrated in tests that exercised the legacy v2.8.0-era `.peaks/_runtime/<changeId>/` sibling-dir semantics — those tests assert on a behavior (legacy sibling-dir detection on `_runtime/<changeId>/`) that was intentionally removed in the single-axis round-3 design (the guard now scopes to `.peaks/<YYYY-MM-DD-*>/` at the top level only, NOT at `.peaks/_runtime/<YYYY-MM-DD-*>/` because that IS the canonical session dir). These tests need a follow-up slice to rewrite against the new semantics; the new `sibling-date-dir-guard.test.ts` is the contract that future tests should follow.
|
|
40
|
+
- 11 v2.18.4 promotion artifacts moved from `.peaks/memory/` to `.peaks/memory/promotions/` to satisfy `memory-shape-guard.test.ts` AC-1 (no top-level `.json` files except `index.json`). The `ALLOWED_TOP_LEVEL_SUBDIRS` set in the test now also accepts `promotions/`.
|
|
41
|
+
- `pnpm build` regenerated `dist/` to drop the dead `migrate-change-scope` JS. AC-15 (`node bin/peaks.js workspace migrate-change-scope`) now reports `error: unknown command 'migrate-change-scope'`.
|
|
42
|
+
|
|
43
|
+
### Round 4 — change-id full root-out (fix 55 test regressions)
|
|
44
|
+
- Fixed 55 unit tests failing across 15 files (regressions from round-3 rename script + incomplete code paths).
|
|
45
|
+
- `peaks request *` dry-run mode no longer creates `.peaks/_runtime/<sid>/` dir eagerly (test updated to assert the canonical single-axis scope dir at apply-time only).
|
|
46
|
+
- Observability event hook restored on `peaks request transition` (3 tests): root cause was `readSummary` returning the scope fragment (`_runtime/<sid>`) as the bare session id, so `emitObservabilityEvent` landed at `.peaks/_runtime/_runtime/<sid>/metrics/slices.jsonl`. Fix strips the `_runtime[\\/]` prefix when storing the summary's sessionId.
|
|
47
|
+
- Reverted OpenSpec-context renames back to `changeId` (L4-keep preservation): the rename script correctly left OpenSpec files untouched in `src/`, but several test files that originally read the same fixtures had a renamed secondary field — verified clean.
|
|
48
|
+
- `src/services/workspace/workspace-service.ts` `getCurrentArtifactDir` now resolves the canonical single-axis scope at `.peaks/_runtime/<sid>/` (round-3 still emitted `.peaks/<sid>/`). SC retention slice dirs at `.peaks/<sliceId>/` preserved (shipped slices).
|
|
49
|
+
- `src/services/scan/acceptance-coverage-service.ts` test-cases lookup now resolves via `.peaks/_runtime/<sid>/qa/test-cases/` (was `.peaks/<sid>/qa/test-cases/`).
|
|
50
|
+
- `src/cli/commands/worker-commands.ts` `--change-id` flag renamed to `--session-id` (the interface field was already `sessionId` post-rename, so the CLI parser was dropping the value silently).
|
|
51
|
+
- `src/cli/commands/prd-commands.ts` `peaks prd handoff init` `--change-id` flag removed (the `initHandoff()` call never used a `changeId` field).
|
|
52
|
+
- `src/services/workflow/autonomous-resume-writer.ts` re-introduced the path-traversal guard via `isUnsafePathInput(sessionId)` (Round-3 dropped the structural check when removing the change-scope-service; the safe-input test caught the regression).
|
|
53
|
+
- `tests/unit/migrate-service.test.ts` updated: the file-plan's extracted change-id is now asserted via `targetSessionId` (the source-session-id field on `MigrateFilePlan` is the SCOPE, not the change-id; pre-rename the field was `changeId`, post-rename the two-field distinction was lost).
|
|
54
|
+
- `tests/unit/session-workspace-service.test.ts` updated: sibling-dir names are now date-stamped (the v2.8.3 hard-ban shape) and the orphan-session binding is written to `.peaks/_runtime/session.json` (post-slice canonical binding path).
|
|
55
|
+
- `tests/unit/fixture/fixture-capture-service.test.ts` updated: the source `sessionId` is now the on-disk session dir name (`test-session-001`), not the now-deleted `changeId` (`test-change`).
|
|
56
|
+
- `tests/unit/sc-service.test.ts` updated: `current-change` binding file references replaced with `.peaks/_runtime/session.json`; the `.peaks/<sid>/` sibling-dir shape replaced with `.peaks/_runtime/<sid>/` for the ACTIVE session; retention slice dirs at `.peaks/<sliceId>/` preserved.
|
|
57
|
+
- `tests/unit/cli/commands/request-commands.test.ts` updated: dry-run test now uses a fresh session id (the pre-created `STABLE_SESSION` made the assertion vacuous); scope-dir assertion matches the canonical single-axis shape.
|
|
58
|
+
- `tests/unit/workspace/workspace-init-claude-hooks.test.ts` updated: case-C session id is now a valid date-prefixed string (the pre-slice `changeId` was `2.0.1-bug3-...`, post-slice the field is a date-prefixed session id per the validator).
|
|
59
|
+
- `tests/unit/rd/repair-cycle-2-cli-wiring.test.ts` updated: `parseAsync(args)` no longer passes the spurious `{ from: 'user' }` source-string arg (commander v12 rejects unknown source types with "unknown command 'node'" — the arg was a Round-3 copy-paste artifact).
|
|
60
|
+
- `tests/unit/cli/prd-handoff-command.test.ts` updated: removed the `--change-id <CID>` CLI arg and the `sessionId: <CID>` frontmatter assertion (CID was a change-id; round-3 removed the field).
|
|
61
|
+
- `tests/unit/autonomous-resume-writer.test.ts` updated: artifact paths changed from `.peaks/_runtime/change/<sid>/...` (legacy change-id root) to `.peaks/_runtime/<sid>/...` (canonical single-axis).
|
|
62
|
+
- `tests/unit/cli-program.stateful.test.ts` updated: `--change-id` replaced with `--session-id` across 7 `runCommand` invocations (CLI flag rename in `worker-commands.ts`).
|
|
63
|
+
- Full `pnpm test:unit` → 4973 pass + 0 fail + 17 skipped (the 17 skipped are intentional pre-existing `.skip`s in the suite, NOT Round-4 regressions). All 16 ACs verified PASS.
|
|
64
|
+
|
|
65
|
+
### Behavior preserved
|
|
66
|
+
|
|
67
|
+
- `peaks workspace init` still creates `.peaks/_runtime/<sessionId>/session.json`; the change-id option is gone but the session binding is intact.
|
|
68
|
+
- `peaks binding status` returns the binding-store v2 schema unchanged.
|
|
69
|
+
- OpenSpec commands (`peaks openspec *`) unchanged in CLI surface; the `<change-id>` positional argument still works (L4 OpenSpec vocabulary).
|
|
70
|
+
- Existing RD/QA artifacts in `.peaks/_runtime/<sid>/<role>/` remain readable; the planner no longer requires a change-id, and the change-id (if any) is embedded only as a filename slug.
|
|
71
|
+
- The 2.8.3 hard-ban on `.peaks/_runtime/<YYYY-MM-DD-*>/` sibling directories is still enforced via the rewritten guard test and the inline `lstatSync` in `initWorkspace`.
|
|
72
|
+
|
|
73
|
+
## [2.18.4] — 2026-06-29 — peaks-solo first-run step gates: hard-pause 1.x→2.0 upgrade + make `--mode` optional on Step 1
|
|
74
|
+
|
|
75
|
+
**PATCH bump from 2.18.3**. Resolves the user-reported "新项目第一次使用 peaks-solo 时初始化完不按流程走、开发效果差、再开 session 后才正常" defect. Two surgical fixes to the first-run Solo gates (3 source files, 1 new test file, 2 test-regression updates; no schema change, no new dependencies, no public API change).
|
|
76
|
+
|
|
77
|
+
### Bugfix — `step-0.55-1x-upgrade` always pauses, even in `full-auto` (P0)
|
|
78
|
+
|
|
79
|
+
The 1.x → 2.0 upgrade is an irreversible external side effect (rewrites `~/.peaks/config.json` + the on-disk cache schema). Pre-fix, `peaks solo should-pause --step step-0.55-1x-upgrade --mode full-auto` returned `shouldPause: false` because the step was declared in `GATED_STEPS` but missing from the `HARD_PAUSE_STEPS` `Set` that already covered `step-0.5-openspec-opt-in` and `step-0.7-resume-detection`. In `full-auto` mode, the `shouldAutoProceed` branch silently auto-proceeded the upgrade without user consent. The result: 1.x → 2.0 downgrade (or stale 1.x standards/config residue) on the very first Solo run of a fresh project. Post-fix, the step pauses with `gateKind: 'mode-selection-itself'` and the LLM-side caller presents an `AskUserQuestion` to the user.
|
|
80
|
+
|
|
81
|
+
- **Modified (2):** `src/services/solo/mode-gate.ts` (added 1 entry to `HARD_PAUSE_STEPS`), `src/services/solo/user-touchpoint-classifier.ts` (reclassified the row from `tech/business-only` with `fullAutoCanProceed: true` to `commit-floor/always` with `fullAutoCanProceed: false`).
|
|
82
|
+
- **User-observed symptom (now fixed):** "首次启动后开发效果差" — caused by 1.x standards/config residue silently surviving `full-auto` and contaminating subsequent RD/QA artifact contracts.
|
|
83
|
+
|
|
84
|
+
### Bugfix — `--mode` is optional on `peaks solo should-pause` (P1, Step 1 chicken-and-egg)
|
|
85
|
+
|
|
86
|
+
`peaks solo should-pause --step step-1-mode-select` (no `--mode` flag) failed pre-fix with `error: required option --mode <mode> not specified`. Step 1's SEMANTIC is "ask the user what mode to use" — requiring `--mode` to ask mode is a chicken-and-egg. Post-fix, `--mode` is `.option()` (not `.requiredOption()`); the action handler resolves `const mode = opts.mode ?? 'full-auto'` once at the top. All 5 downstream `opts.mode` references inside the same action body now use the local `mode` const. Existing `--mode <x>` callers are unaffected (backward-compatible). The service-layer `shouldPauseAtGate` still requires a resolved mode — defaulting is at the CLI boundary, which is the correct layer for ergonomics.
|
|
87
|
+
|
|
88
|
+
- **Modified (1):** `src/cli/commands/solo-commands.ts` (option() + `mode` const + 5 reference rewrites inside the same action handler).
|
|
89
|
+
- **User-observed symptom (now fixed):** "再开 session 后才正常" — the first session's failed Step 1 caused the LLM-side caller to fall back to a sticky default mode; the second session's retry landed in the "right" mode by accident.
|
|
90
|
+
|
|
91
|
+
### Test surface
|
|
92
|
+
|
|
93
|
+
- **Created (1):** `tests/unit/services/solo/first-run-step-gates.test.ts` — 20 vitest cases (4 modes × `step-0.55-1x-upgrade` pause guard; default-mode vs explicit-mode Step 1; AC-3 backward-compat byte-equality; 8 regression guards on the other 2 hard-pause steps; cross-check that non-hard-pause steps still auto-proceed).
|
|
94
|
+
- **Modified (2, regression-data extension):** `tests/unit/services/solo/mode-gate.test.ts` (added `step-0.55-1x-upgrade` to the local `HARD_PAUSE_STEP_SET` test fixture), `tests/unit/services/solo/stale-presence-detection.test.ts` (added the new step to the case-#5 non-Step-1 filter — these existing tests encoded the BUG behavior, so leaving them stale would have caused a false-positive green).
|
|
95
|
+
- **Updated (1):** `package.json` + `src/shared/version.ts` (2.18.3 → 2.18.4).
|
|
96
|
+
|
|
97
|
+
### Why this is the simplest fix
|
|
98
|
+
|
|
99
|
+
- 1-line addition to `HARD_PAUSE_STEPS` + 5-line row replacement in the classifier + 5-line command-arg change with 5 mechanical reference rewrites = 3 source edits. No new abstractions, no new env vars, no new schemas, no CLI surface change beyond the `--mode` defaulting.
|
|
100
|
+
- 800-line file cap respected: largest modified file is `solo-commands.ts` (well below the 800 cap).
|
|
101
|
+
- Karpathy #3 surgical: 6 files touched, all justified (3 source + 1 new test + 2 test-regression updates because the existing tests encoded the BUG behavior).
|
|
102
|
+
|
|
103
|
+
### Verification (QA cycle 1, verdict pass)
|
|
104
|
+
|
|
105
|
+
- AC-1: `peaks solo should-pause --step step-0.55-1x-upgrade --mode full-auto` → `ok: true, shouldPause: true, gateKind: "mode-selection-itself"` ✅
|
|
106
|
+
- AC-2: `peaks solo should-pause --step step-1-mode-select` (no `--mode`) → `ok: true, shouldPause: true` (no "required option" error) ✅
|
|
107
|
+
- AC-3: `peaks solo should-pause --step step-1-mode-select --mode full-auto` → byte-identical to AC-2 ✅
|
|
108
|
+
- Cross-mode 4×2 matrix (full-auto / assisted / strict / swarm × step-0.55 / step-1): 8/8 pause ✅
|
|
109
|
+
- `peaks-solo` first-run sequence (skill presence:check-stale + upgrade --detect-1x + 4 should-pause steps): 6/6 clean ✅
|
|
110
|
+
- vitest 527/527 passed (27 files, 0 failed, 22.61s wallclock)
|
|
111
|
+
- 5-way fanout audit: code-reviewer PASS / karpathy-reviewer PASS (4 guidelines) / security-reviewer PASS / perf-baseline-reviewer PASS / qa-test-cases-writer PASS (21 TCs)
|
|
112
|
+
- QA verdict: `pass` (`verdict-2026-06-29-fix-first-run-step-gates.md`)
|
|
113
|
+
|
|
114
|
+
### Files
|
|
115
|
+
|
|
116
|
+
- 3 source modifications
|
|
117
|
+
- 1 new test file
|
|
118
|
+
- 2 test-regression updates
|
|
119
|
+
- 1 version bump (this release)
|
|
120
|
+
|
|
121
|
+
### Dispatch / artifacts
|
|
122
|
+
|
|
123
|
+
- Request id: `2026-06-29-fix-first-run-step-gates`
|
|
124
|
+
- RD artifact: `.peaks/_runtime/2026-06-29-session-9cac8e/rd/requests/001-2026-06-29-fix-first-run-step-gates.md`
|
|
125
|
+
- Bug analysis: `.peaks/_runtime/2026-06-29-session-9cac8e/rd/bug-analysis.md`
|
|
126
|
+
- Code review: `.peaks/_runtime/2026-06-29-session-9cac8e/rd/code-review.md`
|
|
127
|
+
- Karpathy review: `.peaks/_runtime/2026-06-29-session-9cac8e/rd/karpathy-review.md`
|
|
128
|
+
- Security audit: `.peaks/_runtime/2026-06-29-session-9cac8e/audit/security.md`
|
|
129
|
+
- Perf audit: `.peaks/_runtime/2026-06-29-session-9cac8e/audit/perf.md`
|
|
130
|
+
- QA test plan: `.peaks/_runtime/2026-06-29-session-9cac8e/qa/test-cases/2026-06-29-fix-first-run-step-gates.md`
|
|
131
|
+
- QA verdict: `.peaks/_runtime/2026-06-29-session-9cac8e/qa/verdict-2026-06-29-fix-first-run-step-gates.md`
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## [2.18.2] — 2026-06-29 — `peaks doctor --rebuild-binding` + `peaks binding status` CLI (2 follow-up enhancements)
|
|
136
|
+
|
|
137
|
+
> **⚠️ Non-strict-SemVer.** This PATCH bump (2.18.1 → 2.18.2) lands 2 user-facing CLI additions under a PATCH version per the user convention: `peaks doctor --rebuild-binding` (new flag) and `peaks binding status` (new command). Strict SemVer would have called for a MINOR bump. The convention is documented in `CLAUDE.md` and matches the v2.18.1 PATCH precedent.
|
|
138
|
+
|
|
139
|
+
**PATCH bump from 2.18.1**. Resolves 2 v2.18.0 follow-up enhancements deferred from the v2.18.0 release (CHANGELOG §"Out of scope (deferred)" #1 and #2). No regression fix, no public schema change, no new dependencies. Both additions are surgical: under 200 LOC of production code each, no refactors of existing doctor or binding-store code.
|
|
140
|
+
|
|
141
|
+
### Feature — `peaks doctor --rebuild-binding` (follow-up #1)
|
|
142
|
+
|
|
143
|
+
- `src/services/session/binding-store.ts:425-548` — new `rebuildBindingFromLegacy(projectRoot)` function rewrites pre-v2.18.0 binding files in place so every existing `callerId` gets the `${envSignal}#${pid}` suffix introduced in v2.18.0. The pid used is the binding's stored `pid` field (the pid of the process that originally registered the instance), NOT `process.pid` — preserving the original instance identity across the rewrite.
|
|
144
|
+
- Atomic write: `writeFileSync(<path>.tmp.<pid>)` + `renameSync(<path>.tmp.<pid>, canonical)` so a crash mid-write cannot leave a partial binding on disk.
|
|
145
|
+
- Concurrent invocation guard: a `.peaks/_runtime/.rebuild-binding.lock` file is acquired via `O_EXCL` (`openSync` with `wx`) at the start of the function. A second concurrent invocation returns a noop with an explanatory error in `errors[]`. The lock is best-effort released (close + unlink) in a `finally` block; a stale lock is treated as held (safer default).
|
|
146
|
+
- `callerId="unknown"` (CI fallback, no identity to preserve) is skipped and reported in `errors[]` so the user can decide what to do with it. Re-encoding `unknown#${pid}` would be a misleading claim about process-uniqueness (any two no-env processes share the `unknown` signal).
|
|
147
|
+
- `src/cli/commands/core/doctor-command.ts:91-101` — new `--rebuild-binding` flag. Short-circuits the rest of the doctor surface (no point running 30+ checks when the user is asking for a single targeted migration). Mutually exclusive semantics with `--cleanup-stale` to avoid confusion: rebuild = structural change, cleanup-stale = TTL-based prune.
|
|
148
|
+
- 8 new test cases in `tests/unit/services/session/binding-rebuild.test.ts`:
|
|
149
|
+
- **AC #1.1:** v2.16.0-shape binding (callerId without `#pid`) gets rewritten with the suffix and `ownerHint` is normalized.
|
|
150
|
+
- **AC #1.2:** v2.18.0+ binding (callerId with `#pid`) is preserved (no double-suffix, `noop: true`).
|
|
151
|
+
- **AC #1.3:** missing binding file returns `{ rewritten: 0, preserved: 0, errors: [], noop: true }` gracefully.
|
|
152
|
+
- **AC #1.4:** `callerId="unknown"` is skipped (preserved) with an explanatory error in `errors[]`.
|
|
153
|
+
- **AC #1.5:** mixed binding (some legacy, some v2.18.0+) — only legacy entries are rewritten.
|
|
154
|
+
- **AC #1.6:** concurrent invocation guard — manually-held lock returns a noop with `errors[0]` matching `/lock held/`.
|
|
155
|
+
- **AC #1.7:** idempotency — re-running on an already-rebuilt file is a noop (`noop: true`).
|
|
156
|
+
- **AC #1.8:** atomic write — no leftover `session.json.tmp.*` files after a successful rebuild.
|
|
157
|
+
|
|
158
|
+
### Feature — `peaks binding status` CLI (follow-up #2)
|
|
159
|
+
|
|
160
|
+
- `src/services/session/binding-status-service.ts` (NEW, 116 LOC) — read-only introspection helper. `loadBindingStatus(projectRoot)` reads the binding from disk and assembles a `BindingStatusView` (binding, source, projectRoot, stale flag, outerSessionId). `formatTable` and `formatJson` render the view in either ASCII-table or JSON form. The service is intentionally side-effect-free: no `registerInstance`, no `heartbeat`, no `dropInstance` calls.
|
|
161
|
+
- `src/cli/commands/core/binding-commands.ts` (NEW, 75 LOC) — `peaks binding status [--project <path>] [--json] [--format table|json]`. Default format is `table` (greppable, pipeable, no ANSI colour). `--json` and `--format json` both force JSON output. `--project` overrides the project root (useful when checking a sibling worktree without switching cwd).
|
|
162
|
+
- Staleness check (v2.15.0 sticky-mode contract): when the binding's `callerId`s do not include the current `outerSessionId` (`PEAKS_OUTER_SESSION_ID` with `CLAUDE_CODE_SESSION_ID` fallback), the command prints a stderr warning (`current outer-session-id (X) does not match any binding callerId; this binding is stale`) and surfaces `stale: true` in the JSON envelope. The warning is non-fatal (does not set `process.exitCode = 1`).
|
|
163
|
+
- Empty binding handling: when no binding exists, the table mode prints `(binding has no instances)` and the JSON mode returns `{ binding: null, source: "none", ... }` with a `note` field suggesting `peaks workspace init`.
|
|
164
|
+
- 13 new test cases in `tests/unit/services/session/binding-status-service.test.ts`:
|
|
165
|
+
- **AC #2.1:** empty project → `binding: null, source: "none"`.
|
|
166
|
+
- **AC #2.2:** populated binding → `source: "canonical"`, instances present.
|
|
167
|
+
- **AC #2.3:** read-only invariant — `loadBindingStatus` does not mutate the on-disk binding.
|
|
168
|
+
- **AC #2.4:** empty binding (no instances) → `formatTable` returns empty string (no header row).
|
|
169
|
+
- **AC #2.5:** single instance → 1-row table with columns `sid | callerId | pid | roles | lastHeartbeat`.
|
|
170
|
+
- **AC #2.6:** multiple instances → N data rows in insertion order.
|
|
171
|
+
- **AC #2.7:** empty binding → `formatJson` payload has `binding: null, source: "none"`.
|
|
172
|
+
- **AC #2.8:** populated binding → `formatJson` payload shape matches `BindingSchema`.
|
|
173
|
+
- **AC #2.9:** staleness fires when outer-session-id does not match any callerId.
|
|
174
|
+
- **AC #2.10:** staleness suppressed when outer-session-id matches a callerId prefix.
|
|
175
|
+
- **AC #2.11:** empty binding → `stale: false` (no instances to compare against).
|
|
176
|
+
- **AC #2.12:** `--project` flag resolution — an unrelated project root MUST NOT see project A's binding.
|
|
177
|
+
|
|
178
|
+
### Verification
|
|
179
|
+
|
|
180
|
+
- `pnpm exec tsc --noEmit`: clean (0 errors)
|
|
181
|
+
- `pnpm exec vitest run tests/unit/services/session/binding-rebuild.test.ts tests/unit/services/session/binding-status-service.test.ts`: **2 files, 21 / 21 pass** (8 binding-rebuild + 13 binding-status-service)
|
|
182
|
+
- `peaks scan file-size --project .`: 0 NEW violations across the 5 changed/new files (4 of the 5 files are under 200 LOC; `binding-store.ts` is at the v2.18.0-baseline LOC + ~140 LOC net for the new function)
|
|
183
|
+
- `peaks request lint`: 0 violations
|
|
184
|
+
- B-class banned-path directive guard: 0 violations (the new `peaks binding status` command does not embed the banned `<sessionId>` placeholder)
|
|
185
|
+
|
|
186
|
+
### Behavior changes (user-visible)
|
|
187
|
+
|
|
188
|
+
- `peaks doctor --rebuild-binding` — new flag. Single targeted migration. Idempotent. Safe to run repeatedly.
|
|
189
|
+
- `peaks binding status [--project <path>] [--json] [--format table|json]` — new command. Read-only. Useful for verifying a binding is in the expected shape, debugging multi-Claude-instance scenarios, and inspecting sibling worktree bindings.
|
|
190
|
+
|
|
191
|
+
### Out of scope (deferred, unchanged from v2.18.0)
|
|
192
|
+
|
|
193
|
+
- **#3** `src/shared/change-id.ts:182` pre-existing lint violation (silent catch) — backlog.
|
|
194
|
+
- **#4** Two-Claude-windows CI integration test (true multi-process dogfood) — backlog.
|
|
195
|
+
- **#7** 4 high-pressure near-cap files (`request-artifact-service.ts` 783 / `slice-decompose-service.ts` 775 / `workflow-autonomous-service.ts` 774 / `workspace-service.ts` 742) — backlog, deferred to v2.18.3.
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## [2.18.3] — 2026-06-29 — 4 high-pressure near-cap files split (Karpathy 800-line cap restore)
|
|
200
|
+
|
|
201
|
+
> **⚠️ Non-strict-SemVer.** This PATCH bump (2.18.2 → 2.18.3) lands a pure refactor (4 file splits + re-export shims) under a PATCH version per the user convention. Strict SemVer would have called for no version change at all (pure refactor). The convention is documented in `CLAUDE.md` and matches the v2.18.1 / v2.18.2 PATCH precedent.
|
|
202
|
+
|
|
203
|
+
**PATCH bump from 2.18.2**. Resolves backlog item #7 (deferred from v2.18.0): splits 4 high-pressure near-cap files (742-783 LOC) into 8 files (4 originals + 4 new siblings), each well below the Karpathy 800-line HARD cap. No behavioural change, no public API change, no CLI surface change, no schema change, no new dependencies. Every external import path is preserved by a re-export shim; every existing test continues to pass with zero regressions. Function signatures and bodies are verbatim moves (no refactoring "while we're in there").
|
|
204
|
+
|
|
205
|
+
### Refactor — 4 file splits via verbatim-move + re-export shim
|
|
206
|
+
|
|
207
|
+
The split methodology follows the v2.18.0 `session-binding-bridge.ts` pattern: identify a natural seam (state/helpers vs business logic, types vs impl, etc.), extract the chosen section into a new sibling file, and re-export the moved symbols from the original module so external imports are unchanged. Internal references are routed through a local `import { ... }` so the body of the original module continues to compile and behave identically.
|
|
208
|
+
|
|
209
|
+
| # | File | Before | After (orig + sibling) | New sibling | Seam |
|
|
210
|
+
|---|------|-------:|-----------------------:|-------------|------|
|
|
211
|
+
| 1 | `src/services/artifacts/request-artifact-service.ts` | 783 | 649 + 153 | `request-artifact-state-helpers.ts` | `RequestArtifactState` type, `ALLOWED_STATES_PER_ROLE`, `allowedStatesForRole`, 4 transition error classes, `updateStatusBlock` frontmatter mutator |
|
|
212
|
+
| 2 | `src/services/slice/slice-decompose-service.ts` | 775 | 632 + 178 | `slice-decompose-runners.ts` | 3 default runner factories (`defaultCodegraphRunner`, `defaultUnderstandRunner`, `defaultImportEdgeRunner`) + `runCodegraph` shell-out helper |
|
|
213
|
+
| 3 | `src/services/workflow/workflow-autonomous-service.ts` | 774 | 465 + 337 | `workflow-autonomous-resume-helpers.ts` | Resume validation pipeline (`getResumeRequiredArtifacts`, `readResumeArtifact`, `stripChangeScopePrefix`, JSON / frontmatter parsers, `getResumeArtifactsStatus`, `createResumePlan`) + `MAX_RESUME_ARTIFACT_BYTES` const |
|
|
214
|
+
| 4 | `src/services/workspace/workspace-service.ts` | 742 | 550 + 217 | `workspace-claude-settings-materializer.ts` | Consumer `.claude/settings.local.json` materialization (`materializeClaudeSettingsLocal`, `writeOfflineTemplateCopy`, `upsertPeaksGitignoreSnippet`) + `PEAKS_GITIGNORE_*` constants |
|
|
215
|
+
|
|
216
|
+
The original 4 files land at 465-649 LOC (well below the 800 cap; target range 600-650). The 4 new sibling files are 153-337 LOC. Total LOC across the 8 files is unchanged (3074) — this is a structural refactor only, not a deletion or compression.
|
|
217
|
+
|
|
218
|
+
### Re-export shim (Karpathy #3 surgical)
|
|
219
|
+
|
|
220
|
+
Each original file gets a sibling `import { ... } from './X-helpers.js'` + `export { ... } from './X-helpers.js'` pair. The shim is type-transparent: `import { Foo } from './original.js'` resolves to the SAME function reference as `import { Foo } from './original-helpers.js'`. A 4-test re-export identity suite (`tests/unit/file-split-reexport-identity.test.ts`) locks this against accidental re-implementation in future refactors.
|
|
221
|
+
|
|
222
|
+
### Touch surface
|
|
223
|
+
|
|
224
|
+
- **Modified (4):** the 4 original service files (extraction + re-export shim, no signature change).
|
|
225
|
+
- **Created (4):** the 4 new sibling files (verbatim moves).
|
|
226
|
+
- **Created (1):** `tests/unit/file-split-reexport-identity.test.ts` (4 re-export identity tests).
|
|
227
|
+
- **Updated (1):** `tests/unit/skills/karpathy-prompt-injection.test.ts` — the AC-2 test was file-path-coupled to `request-artifact-service.ts`; updated to also accept the sibling file (the karpathy-guidelines message is the public-surface anchor, and the message is now in the sibling).
|
|
228
|
+
- **Updated (1):** `package.json` + `src/shared/version.ts` (2.18.2 → 2.18.3).
|
|
229
|
+
|
|
230
|
+
### Why this is the simplest fix
|
|
231
|
+
|
|
232
|
+
- Verbatim move: no signature change, no caller change, no new abstractions.
|
|
233
|
+
- Re-export shim preserves the public surface — every existing test continues to import the same path.
|
|
234
|
+
- 4 new sibling files total ~885 LOC; max 337 LOC (well below the 800 cap).
|
|
235
|
+
- No new dependencies, no new env vars, no new schema fields, no CLI surface change.
|
|
236
|
+
|
|
237
|
+
### Verification
|
|
238
|
+
|
|
239
|
+
- `pnpm exec tsc --noEmit`: clean (0 errors)
|
|
240
|
+
- `pnpm exec vitest run tests/unit/file-split-reexport-identity.test.ts`: **4 / 4 pass** (4 re-export identity tests, one per split)
|
|
241
|
+
- `pnpm exec vitest run`: 4968 passed (4965 v2.18.2 baseline + 4 new re-export identity tests - 1 pre-existing test that was file-path-coupled and now covers both files), 17 skipped, **0 failed**
|
|
242
|
+
- `node scripts/lint/silent-warning-detector.mjs`: 0 violations across 426 files
|
|
243
|
+
- `pnpm run build`: rebuilt `bin/peaks.js` + `dist/` (per QA cycle 3 process observation)
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## [2.18.1] — 2026-06-29 — verify-pipeline path-axis + prd check-blocks ESM fix (2 P0 toolchain bugs)
|
|
248
|
+
|
|
249
|
+
**PATCH bump from 2.18.0**. Resolves 2 P0 peaks-cli toolchain bugs deferred from the v2.18.0 release (CHANGELOG §"Out of scope (deferred)" #5 and #6). No CLI surface change, no new commands, no schema change. Both fixes are surgical: under 10 lines of production-code change each, no refactors.
|
|
250
|
+
|
|
251
|
+
### Feature — `peaks workflow verify-pipeline` session-axis fix (P0 audit #5)
|
|
252
|
+
|
|
253
|
+
- `src/services/workflow/pipeline-verify-service.ts` — evidence-file path resolver now uses the v2.17.0 canonical session-axis layout `.peaks/_runtime/<sessionId>/<role>/<file>` instead of the v2.16.0/v2.17.0-era change-axis `.peaks/_runtime/change/<changeId>/<role>/<file>` that v2.17.0 hard-killed. Pre-fix: any RID whose artifacts lived under the session axis (the post-v2.17.0 default) returned `PIPELINE_INCOMPLETE` because the resolver was looking under the dead `change/` axis. Post-fix: session-axis artifacts resolve as canonical (no `DEPRECATION_LEGACY_PATH_USED` warning), with the pre-v2.16.0 misplaced forms (`.peaks/<changeId>/...`, `.peaks/_runtime/change/<changeId>/...`) preserved as back-compat fallbacks that emit the deprecation warning.
|
|
254
|
+
- `src/services/workflow/artifact-paths.ts` — same fix applied to the QA findings resolver (`resolveSecurityFindingsPath`, `resolvePerformanceFindingsPath`). The canonical QA dir is now `.peaks/_runtime/<sessionId>/qa/`; the change-axis form is a `legacy` fallback.
|
|
255
|
+
- `src/cli/commands/workflow-commands.ts` — `verify-pipeline` CLI help-text rewritten to describe the v2.17.0 session-axis canonical layout (without the banned `<sessionId>` directive placeholder that would trigger the B-class banned-path guard).
|
|
256
|
+
- `data.changeId` slug still appears in the output envelope for traceability — it is metadata, not the filesystem scope key (matches the v2.17.0 hard-kill contract in `src/shared/change-id.ts:30-37`).
|
|
257
|
+
- 2 new test cases in `tests/unit/workflow/pipeline-verify-canonical-path.test.ts`:
|
|
258
|
+
- **AC #5.1:** RD + QA artifacts and evidence under the v2.17.0 session-axis layout resolve as canonical (no deprecation warning, `usedCanonicalPath: true`, `complete: true`).
|
|
259
|
+
- **AC #5.2:** RID with NO artifacts returns `PIPELINE_INCOMPLETE` with clear violations (`RD phase skipped`, `QA phase skipped`), no `ReferenceError` or undefined-error throw.
|
|
260
|
+
|
|
261
|
+
### Feature — `peaks prd check-blocks` ESM fix (P0 audit #6)
|
|
262
|
+
|
|
263
|
+
- `src/services/prd/prd-blocks-checker.ts:71` — replaced mid-file `const { readdirSync, statSync } = require('node:fs')` with top-level ESM `import { ..., readdirSync, statSync } from 'node:fs'`. Pre-fix: any `findPrdArtifact` call that fell through to the runtime-scan branch threw `ReferenceError: require is not defined` at the CLI level (since `package.json:8` is `"type": "module"` and `require` is undefined in ESM). Post-fix: the runtime-scan branch executes successfully and returns `null` when no artifact is found anywhere on disk.
|
|
264
|
+
- 4 new test cases in `tests/unit/services/prd/prd-blocks-checker.test.ts`:
|
|
265
|
+
- **AC #6.1:** well-formed PRD handoff (all 4 mandatory blocks present, min lengths satisfied, 业务禁区 sub-section present) passes all blocks with `issues: []`.
|
|
266
|
+
- **AC #6.2:** PRD missing the 业务场景 block fails with a clear `Missing required block: 业务场景` issue (no `ReferenceError`).
|
|
267
|
+
- **AC #6.3:** JSON envelope shape `{ ok, blocks: { 业务场景, 边界 case, UI 装配意图 } }` is stable for the pass case.
|
|
268
|
+
- **AC #6.4:** `findPrdArtifact` returns `null` (not throw) when a session-axis dir exists with no matching artifact — exercises the previously-broken runtime-scan branch.
|
|
269
|
+
|
|
270
|
+
### Verification
|
|
271
|
+
|
|
272
|
+
- `pnpm exec tsc --noEmit`: clean (0 errors)
|
|
273
|
+
- `pnpm exec vitest run`: **413 files, 4939 / 4939 pass** (0 fail, 17 skipped) — baseline 4933 + 6 new (2 verify-pipeline + 4 prd-blocks-checker)
|
|
274
|
+
- `peaks scan file-size --project .`: 0 violations across 4 changed files (`pipeline-verify-service.ts` 542 → 543 LOC, `prd-blocks-checker.ts` 163 LOC unchanged, `artifact-paths.ts` 191 → 194 LOC, `workflow-commands.ts` LOC delta: 1)
|
|
275
|
+
- `peaks request lint`: 0 violations
|
|
276
|
+
- B-class banned-path directive guard: 0 violations (the rewritten `verify-pipeline` help-text uses the abstract "v2.17.0 canonical session-axis layout" wording instead of the banned `.peaks/_runtime/<id>/` literal placeholder)
|
|
277
|
+
|
|
278
|
+
### Behavior changes (user-visible)
|
|
279
|
+
|
|
280
|
+
- `peaks workflow verify-pipeline` no longer returns `PIPELINE_INCOMPLETE` for RIDs whose artifacts live under `.peaks/_runtime/<sessionId>/<role>/`. Pre-v2.18.1 false-positive resolved.
|
|
281
|
+
- `peaks prd check-blocks` no longer crashes with `ReferenceError: require is not defined`. Pre-v2.18.1 false-negative resolved.
|
|
282
|
+
|
|
283
|
+
### Dogfood
|
|
284
|
+
|
|
285
|
+
| # | Scenario | Verdict | Evidence |
|
|
286
|
+
|---|---|---|---|
|
|
287
|
+
| A | v2.18.1 verify-pipeline happy-path (session-axis) | PASS | `.peaks/_runtime/2026-06-29-session-9cac8e/{rd,qa}/...` resolves as canonical; `data.changeId` slug preserved in envelope |
|
|
288
|
+
| B | v2.18.1 verify-pipeline missing-evidence | PASS | Clear `RD evidence missing: ...` violations, no `ReferenceError` |
|
|
289
|
+
| C | v2.18.1 prd check-blocks well-formed PRD | PASS | `report.ok: true`, all 4 blocks pass, JSON envelope `{ 业务场景: 'pass', 边界 case: 'pass', UI 装配意图: 'pass' }` |
|
|
290
|
+
| D | v2.18.1 prd check-blocks missing 业务场景 block | PASS | `report.ok: false`, `issues: ["Missing required block: 业务场景"]`, no `ReferenceError` |
|
|
291
|
+
|
|
292
|
+
### Commits
|
|
293
|
+
|
|
294
|
+
```
|
|
295
|
+
<fix(workflow): verify-pipeline uses v2.17.0 session-axis (P0 bug #5)>
|
|
296
|
+
<fix(prd): check-blocks replaces mid-file require with ESM import (P0 bug #6)>
|
|
297
|
+
<chore(test): pin verify-pipeline + prd-blocks-checker to v2.18.1 contract>
|
|
298
|
+
<chore(release): v2.18.1 version bump + CHANGELOG entry>
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
(Commit hashes populated at commit-time by the human per `sub-agent-no-commit-rule.md`.)
|
|
302
|
+
|
|
303
|
+
### Out of scope (deferred, unchanged from v2.18.0)
|
|
304
|
+
|
|
305
|
+
- **#1** Legacy v2.16.0 binding callerId rewrite — defer to v2.18.2 `peaks doctor --rebuild-binding` slice.
|
|
306
|
+
- **#2** `peaks binding status` CLI — defer to v2.19 RD.
|
|
307
|
+
- **#7** 4 high-pressure near-cap files (`request-artifact-service.ts` 783 / `slice-decompose-service.ts` 775 / `workflow-autonomous-service.ts` 774 / `workspace-service.ts` 742) — backlog unchanged.
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## [2.18.0] — 2026-06-29 — ownerHint collision P0 fix + dead-code cleanup + Karpathy 800-line cap restore
|
|
312
|
+
|
|
313
|
+
**MINOR bump from 2.17.0**. Audit-driven release: closes a behavioral P0 bug discovered in the v2.17.0 binding-store sentinel, deletes confirmed dead-code from v2.16.0-alpha, and restores headroom against the Karpathy 800-line file cap in preparation for the D1/D2 runner integration slice. No CLI surface change, no on-disk path change, no public schema change.
|
|
314
|
+
|
|
315
|
+
### Feature — ownerHint collision P0 fix (P0 audit finding)
|
|
316
|
+
|
|
317
|
+
- `src/services/session/binding-store.ts:88-91` — new `getCurrentCallerId()` helper returns `${envSignal}#${process.pid}`. The pid suffix is the real collision key; the env signal (CLAUDE_CODE_SESSION_ID / PEAKS_OUTER_SESSION_ID) is now advisory metadata only.
|
|
318
|
+
- `src/services/session/binding-store.ts:259` — `ownerHint` field is now `${envSignal}#${pid}` (was bare env signal). Preserves the existing v2.17.0 field shape; only the value format changes.
|
|
319
|
+
- `registerInstance` distinguishes instances by `(callerId, pid)` tuple, not by `ownerHint` alone. Same pid + same callerId → auto-resume (D2 Claude-instance-level hard-exclusive sid preserved); same callerId + different pid → distinct sids.
|
|
320
|
+
- `/compact` resume: same outer-session-id + same pid → reuses sid (verified by new Case B test). Different pid (rare, but possible if the harness restarts) → new sid (safe default, not a stale resume).
|
|
321
|
+
- Sub-agent dispatch: sub-agents inherit parent's `CLAUDE_CODE_SESSION_ID` but run in the same Node process → same pid → same callerId → same sid (D2 sid-aggregation across peaks-* skill activations preserved).
|
|
322
|
+
- 6 new test cases in `tests/unit/services/session/binding-store.test.ts:151-242`:
|
|
323
|
+
- **Case A:** 2 instances, same `callerId`, different `pid` → 2 distinct sids
|
|
324
|
+
- **Case B:** 2 instances, same `callerId`, same `pid`, same outer-session-id → 1 sid (auto-resume)
|
|
325
|
+
- **Case C:** 2 instances, same `callerId`, same `pid`, different outer-session-id → 1 sid (caller+pid is the real key)
|
|
326
|
+
- **Case D:** 2 instances, `callerId='unknown'` (CI fallback), different `pid` → 2 distinct sids (no sentinel collision)
|
|
327
|
+
- **Case E:** cross-pid isolation (pid-source-equals-process-pid assertion)
|
|
328
|
+
- **Case F:** empty callerId fallback defaults to `getCurrentCallerId()` (not bare 'unknown' sentinel)
|
|
329
|
+
|
|
330
|
+
### Removed — conflict-detection-service dead-code (P1 audit finding)
|
|
331
|
+
|
|
332
|
+
- **Deleted** `src/services/session/conflict-detection-service.ts` (205 lines). Confirmed 0 importers in `src/` or `tests/`, 0 references in any `skills/*/SKILL.md`, not in `package.json` exports. The CHANGELOG self-described it as "modules exist but are not yet called from the runner entry points" — Karpathy #2 "no speculative features" was violated; the 205 lines shipped in every npm release without ever executing.
|
|
333
|
+
- No replacement. The D1 conflict detection surface (cross-Claude-instance file-write collisions) is **still deferred** to a future slice that will design it against actual observed collisions (now that v2.18.0 makes multi-Claude-instance scenarios safely distinguishable).
|
|
334
|
+
|
|
335
|
+
### Refactor — session-binding-bridge extraction (P1 Karpathy 800-line cap)
|
|
336
|
+
|
|
337
|
+
- `src/services/session/session-manager.ts`: 710 → **557 lines** (-153). Karpathy 800 cap pressure reduced from high (90 headroom) to low (243 headroom). Next binding-store integration slice has room for the planned +65 LOC glue code.
|
|
338
|
+
- `src/services/session/session-binding-bridge.ts` (NEW, 312 lines) — verbatim move of `ensureSession` (lines 446-495 in pre-v2.18.0) and `ensureSessionWithRotation` (lines 496-572 in pre-v2.18.0) plus the local `getCurrentOuterSessionId` helper and 5 small read/write helpers they depend on.
|
|
339
|
+
- `src/services/session/session-manager.ts:414-419` — re-export shim `export { ensureSession, ensureSessionWithRotation } from './session-binding-bridge';` preserves the 5 external caller import paths (zero changes to `request-artifact-service.ts:6`, `upgrade-commands.ts:25`, `init-command.ts:24`, `session-manager.test.ts:14`, `session-rotation-on-outer-mismatch.test.ts:20`). Karpathy #3 surgical — no caller signature changes.
|
|
340
|
+
- 9 new test cases in `tests/unit/services/session/session-binding-bridge.test.ts` covering happy path + the re-export identity contract (asserts `ensureSessionViaShim === ensureSession` and `ensureSessionWithRotationViaShim === ensureSessionWithRotation` to lock the shim against accidental re-implementation).
|
|
341
|
+
|
|
342
|
+
### Behavior changes (user-visible)
|
|
343
|
+
|
|
344
|
+
- **None at the CLI surface.** No new commands, no removed commands, no flag changes. Existing `peaks solo`, `peaks doctor`, `peaks request lint`, `peaks scan file-size` all behave identically.
|
|
345
|
+
- **Binding file format change (additive only):** on-disk binding files now carry a `#<pid>` suffix in `callerId` and `ownerHint`. Old v2.16.0 / v2.17.0 files without the suffix are still readable via `BindingSchema.safeParse` (v2.18.0 read path is forward-compatible); no automatic rewrite (write-amplification risk deferred to a future `peaks doctor --rebuild-binding` slice).
|
|
346
|
+
- **Multi-Claude parallel fix (user-visible in the dogfood scenarios):** opening 2 Claude Code windows in the same project and running `peaks solo` in each now yields 2 distinct sids (was: 1 collided sid, per the v2.17.0 changelog dogfood scenario 1).
|
|
347
|
+
- **`/compact` resume (user-visible, no change):** same outer-session-id still reuses the same sid. Verified by dogfood.
|
|
348
|
+
|
|
349
|
+
### Verification
|
|
350
|
+
|
|
351
|
+
- `pnpm exec tsc --noEmit`: clean (0 errors)
|
|
352
|
+
- `pnpm lint:silent-warning`: 0 new violations from v2.18.0 changed files (1 pre-existing violation in `src/shared/change-id.ts:182` carried over from v2.17.0 commit 83241d4, deferred to v2.18.1 cleanup PR per `process.stderr.write` pattern established in `binding-store.ts:106-107`)
|
|
353
|
+
- `pnpm exec vitest run`: **411 files, 4927 / 4927 pass** (0 fail, 17 skipped) — baseline 4912 + 15 new (6 ownerHint + 9 bridge)
|
|
354
|
+
- `peaks scan file-size --project .`: 0 violations across 5 changed files
|
|
355
|
+
- `peaks workflow verify-pipeline`: returns `PIPELINE_INCOMPLETE` (environmental, not v2.18.0 — CLI looks under v2.16.0-era change axis that v2.17.0 hard-killed; see Follow-up #5)
|
|
356
|
+
|
|
357
|
+
### Dogfood (ice-cola NestJS project, 2026-06-29-session-2e81dc)
|
|
358
|
+
|
|
359
|
+
| # | Scenario | Verdict | Evidence |
|
|
360
|
+
|---|---|---|---|
|
|
361
|
+
| A | P0 fix verification (binding file format) | PASS | `callerId: 5fa8a7d8-...#13472` matches shell pid 13472; pre-existing instance pid 3876 ≠ current shell — fix works in production-shape data |
|
|
362
|
+
| B | peaks doctor stale-binding scan | PASS | 0 stale bindings, ttl=300000ms, v2.16.0 schema surface intact |
|
|
363
|
+
| C | peaks solo smoke (4 sub-commands) | PARTIAL | 3/4 pass; `peaks request lint --project .` is invalid syntax (needs `<rid>` + `--role`); not a v2.18.0 regression |
|
|
364
|
+
| D | env-collision simulation (single shell, 2 envs) | PASS | `fake-session-A#20984` + `fake-session-B#20984` → 2 distinct sids (fupv8b / xnntb1); transposed axis (same pid, different env) verified; primary 2-Claude-windows scenario needs CI integration test with 2 child node processes |
|
|
365
|
+
|
|
366
|
+
**Dogfood verdict:** 3.5 / 4 pass; `recommend_v2.18.0_commit: true`.
|
|
367
|
+
|
|
368
|
+
### Commits
|
|
369
|
+
|
|
370
|
+
```
|
|
371
|
+
<refactor(session): extract session-binding-bridge from session-manager (710→557 LOC)>
|
|
372
|
+
<feat(binding-store): ownerHint collision P0 fix — callerId now includes #${process.pid} suffix>
|
|
373
|
+
<chore(deps): delete dead-code conflict-detection-service (205 LOC)>
|
|
374
|
+
<chore(release): v2.18.0 version bump + CHANGELOG entry>
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
(Commit hashes populated at commit-time by the human per `sub-agent-no-commit-rule.md`.)
|
|
378
|
+
|
|
379
|
+
### Out of scope (deferred)
|
|
380
|
+
|
|
381
|
+
- **#1** Legacy v2.16.0 binding callerId rewrite — defer to `peaks doctor --rebuild-binding` slice. v2.18.0 read path is forward-compatible; active rewrite would create write-amplification loops.
|
|
382
|
+
- **#2** `peaks binding status` CLI (PRD §3.4 nice-to-have) — defer to v2.19 RD.
|
|
383
|
+
- **#5** `peaks workflow verify-pipeline` CLI bug (looks for v2.16.0-era change axis) — defer to peaks-cli toolchain fix slice, NOT a v2.18.0 regression.
|
|
384
|
+
- **#6** `peaks prd check-blocks` CLI bug (`require is not defined`, ESM/CJS mix) — defer to peaks-cli toolchain fix slice, NOT a v2.18.0 regression.
|
|
385
|
+
- **#7** 4 high-pressure near-cap files (`request-artifact-service.ts` 783 / `slice-decompose-service.ts` 775 / `workflow-autonomous-service.ts` 774 / `workspace-service.ts` 742) — out of v2.18.0 scope; backlog unchanged from v2.15.x.
|
|
386
|
+
|
|
387
|
+
### Redo additions (v2.18.0 REDO)
|
|
388
|
+
|
|
389
|
+
The first v2.18.0 release deferred two open items to a redo slice; both are now resolved in this v2.18.0 REDO commit set (no version bump — redo slots into the same v2.18.0 line):
|
|
390
|
+
|
|
391
|
+
- **#3 (fixed)** `src/shared/change-id.ts:182` — pre-existing silent-catch lint violation resolved. The `catch { return null; }` branch now writes `[change-id] safeReadBinding failed: <message>` to `process.stderr` before returning null, matching the established hardening pattern in `binding-store.ts:106-107`. 4 new unit tests in `tests/unit/shared/change-id.test.ts` (happy path, no-binding, perm-denied POSIX → stderr fires, `..` value → silent validation path stays silent). `pnpm lint:silent-warning` now reports 0 violations across 420 files.
|
|
392
|
+
- **#4 (added)** Two-Claude-windows CI integration test — `tests/integration/binding-store/multi-process.test.ts` spawns 2 child Node processes sharing the same `CLAUDE_CODE_SESSION_ID` and asserts: (a) distinct pids, (b) distinct callerIds (`<envSignal>#<pid>`), (c) distinct sids in the shared binding file's `instances` map. Driven by `scripts/fixtures/ci-binding-driver.mjs` which imports the BUILT `dist/src/services/session/binding-store.js`. Wired into `.github/workflows/ci.yml` as a separate `binding-store-multi-process` job gated to `ubuntu-latest` (Windows ACL semantics add non-determinism; keeping the main matrix small).
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## [2.17.0] — 2026-06-29 — Change-id axis hard-kill + binding-store sentinel
|
|
397
|
+
|
|
398
|
+
**MINOR bump from 2.16.0-alpha**. Removes the change-id axis (filesystem scope + binding) and replaces it with the binding-store sentinel shipped in v2.16.0-alpha. The change-id becomes a metadata-only slug; reviewable artifacts key off `.peaks/_runtime/<sessionId>/<role>/` exclusively. Backward-compatible shims preserve the old API surface so existing user commands do not change.
|
|
399
|
+
|
|
400
|
+
### Feature — binding-store v2 sentinel (v2.16.0-alpha + v2.17.0)
|
|
401
|
+
|
|
402
|
+
- `src/services/session/binding-store.ts` — zod-validated multi-instance binding schema with auto-migration from legacy `{ sessionId, createdAt, projectRoot }`. New shape: `{ ownerHint, pid, lastHeartbeat, scope, instances: Record<sid, InstanceRecord> }`.
|
|
403
|
+
- `InstanceRecord` = `{ startedAt, roles: string[], callerId, lastHeartbeat }` — `roles` accumulates as the Claude instance activates multiple peaks-* skills (solos → rd → qa all share one sid).
|
|
404
|
+
- Auto-resume: same callerId reuses the same sid; different callers get different sids in the same `instances` map.
|
|
405
|
+
- `dropStale(projectRoot, ttlMs)` for Doctor integration.
|
|
406
|
+
|
|
407
|
+
### Feature — D1 cross-Claude-instance conflict detection (runner wiring deferred)
|
|
408
|
+
|
|
409
|
+
- `src/services/session/conflict-detection-service.ts` — `coarseScan` (1.5s static grep budget) + `fineScan` (codegraph required + understand optional with `understandDowngrade` flag in report).
|
|
410
|
+
- Conflict report path: `.peaks/_runtime/<sid>/audit-goal/conflict-report.json`.
|
|
411
|
+
- Runner integration into `peaks workspace init` (Step 0) and `peaks audit-goal` (Step 0.6) is **deferred to a future slice** — the modules exist but are not yet called from the runner entry points.
|
|
412
|
+
|
|
413
|
+
### Feature — D2 Claude-instance-level hard-exclusive sid
|
|
414
|
+
|
|
415
|
+
- Same Claude instance keeps one sid across multiple peaks-* skill activations (peaks-solo → peaks-rd → peaks-qa).
|
|
416
|
+
- `/compact` resume: same outer-session-id reuses the same sid (post-compact-resume v2.11.0 D7 alignment).
|
|
417
|
+
|
|
418
|
+
### Feature — Doctor stale-binding scan (AC-10)
|
|
419
|
+
|
|
420
|
+
- `peaks doctor` now scans the project-level binding for instances with `lastHeartbeat > 5 minutes` and surfaces a warning.
|
|
421
|
+
- `--cleanup-stale` flag drops stale entries (manual confirm path).
|
|
422
|
+
- `--stale-ttl-ms <ms>` flag overrides the default 5-minute TTL.
|
|
423
|
+
|
|
424
|
+
### Removed — change-id axis (Q1 hard-kill)
|
|
425
|
+
|
|
426
|
+
- `src/shared/change-id.ts`: 470 → ~210 lines. The substantive logic (change-id validation + path builders + symlink/file binding + LegacyChangeIdBindingError) is **retained as shims** that match the old contract; only the filesystem scope semantics changed.
|
|
427
|
+
- `--change-id` option is preserved on 13 CLI commands as a metadata-only slug (does not affect CLI behavior).
|
|
428
|
+
- `tests/unit/change-id.test.ts` (270 lines) and `tests/unit/workspace/workspace-init-change-id-redirect.test.ts` (441 lines) deleted.
|
|
429
|
+
- 12 change-id-related memories archived under `.peaks/memory/archived/` (recoverable; documented in `peaks-cli-archive` policy).
|
|
430
|
+
|
|
431
|
+
### Behavior changes (user-visible)
|
|
432
|
+
|
|
433
|
+
- **`--change-id <slug>`** is now a metadata-only slug, not a filesystem scope identifier. Existing commands that accept `--change-id` continue to work; the slug appears in envelope `data.changeId` for traceability.
|
|
434
|
+
- **On-disk artifact paths** unchanged from a CLI user's perspective — reviewable artifacts still appear at the locations `peaks solo` / `peaks qa` write them. Internally they key off session id, not change-id.
|
|
435
|
+
- **`peaks doctor` exit code**: now exits 1 when stale bindings are present (in addition to its existing failure conditions).
|
|
436
|
+
|
|
437
|
+
### Verification
|
|
438
|
+
|
|
439
|
+
- `pnpm exec tsc --noEmit`: clean
|
|
440
|
+
- `pnpm lint:silent-warning`: 0 violations
|
|
441
|
+
- `pnpm exec vitest run`: **4912 / 4912 pass** (0 fail)
|
|
442
|
+
- `peaks scan file-size --project .`: 0 violations (no new 800+ line files)
|
|
443
|
+
|
|
444
|
+
### Dogfood guidance
|
|
445
|
+
|
|
446
|
+
Recommended scenarios before next release (see `peaks/_runtime/2026-06-29-session-88411f/txt/handoff-2026-06-29-v2-17-0.md` for details):
|
|
447
|
+
|
|
448
|
+
1. **Multi-Claude parallel提速**: open 2 Claude instances in the same project, run `peaks solo <different goal>` in each. Verify both bindings coexist with distinct sids.
|
|
449
|
+
2. **D1 conflict detection**: 2 instances both targeting the same source file. Verify each writes to its own session-scoped artifact directory.
|
|
450
|
+
3. **`/compact` resume**: run `peaks solo <goal>`, `/compact`, continue. Verify same sid reused.
|
|
451
|
+
4. **Doctor stale**: kill -9 a Claude instance, run `peaks doctor`, verify stale binding listed + `--cleanup-stale` works.
|
|
452
|
+
|
|
453
|
+
### Commits
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
83241d4 feat: v2.17.0 — change-id axis hard-kill
|
|
457
|
+
8bab94e feat: v2.16.0-alpha — binding-store v2 schema + conflict detection + Doctor stale scan
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
### Out of scope (deferred)
|
|
461
|
+
|
|
462
|
+
- Runner wiring for D1/D2 in `peaks workspace init` + `peaks audit-goal` (modules exist, not yet called).
|
|
463
|
+
- 800-line cap backlog (`session-manager.ts` 710, `solo/` and `verdict/` modules) — unchanged from v2.15.x.
|
|
464
|
+
- Final removal of `change-id.ts` shims (would require rewriting the 11 src services that still reference them).
|
|
465
|
+
|
|
466
|
+
---
|
|
467
|
+
|
|
468
|
+
## [2.15.1] — 2026-06-28 — 12 Gaps CLI 全套落地 + ice-cola dogfood 验证
|
|
469
|
+
|
|
470
|
+
**PATCH bump from 2.15.0**. Follow-up ship for the 12 Gaps positioning memory (peaks-cli 真实定位 + 全套 15 个 Gap CLI 落地). No breaking changes. All new commands are additive top-level (no conflict with existing `peaks solo` / `peaks qa` / `peaks slice` role commands).
|
|
471
|
+
|
|
472
|
+
### Feature — slice DAG layered parallelism + foundation/upstreamSync/complexity 字段
|
|
473
|
+
|
|
474
|
+
- `src/services/dispatch/slice-dag.ts` — `SliceNode` 加 3 optional 字段 (`foundation?: boolean` / `upstreamSync?: boolean` / `complexity?: 'trivial'|'simple'|'complex'`). `validateDag` 加字段合法性校验 + foundation-only-depends-on-foundation 防御性规则. `topologicalLevels` 同层内 priority 排序 (foundation > upstreamSync > id asc). 老 DAG hash 稳定.
|
|
475
|
+
- `src/services/solo/dag-orchestrator.ts` — 新增 `runLayeredDag` (业务 slice 不等所有 foundation,只等其 dependsOn 子集). cancel-on-fail 保留.
|
|
476
|
+
- `src/cli/commands/dispatch-from-dag.ts` — 切到 `runLayeredDag` + envelope 加 `sliceMeta` 字段.
|
|
477
|
+
|
|
478
|
+
### Feature — G11/13/14/15 CLI 全套落地 (10 commands)
|
|
479
|
+
|
|
480
|
+
- **G11 fork** (5 cmds): `peaks fork status` / `upstream-check` / `sync-plan` / `sync` / `sync-verify` — 持久化 `.peaks/fork-state.json` (baseline + history)
|
|
481
|
+
- **G13 impact** (2 cmds): `peaks impact scan` / `peaks impact must-check` — glob-based 影响面 + 业务流识别 + must-check 列表
|
|
482
|
+
- **G14 smoke** (4 cmds): `peaks smoke define` / `run` / `run-and-repair` / `add-path` — critical-paths 持久化 + 5 个 source + 3 个 status
|
|
483
|
+
- **G15 release** (7 cmds): `peaks release plan` / `canary` / `promote` / `watch` / `done` / `rollback` / `hotfix` — 8 阶段状态机 + 24h 倒计时 + hotfix 强制 rollback
|
|
484
|
+
|
|
485
|
+
### Feature — G1/G3/G4/G5 user-touchpoint CLI (16 commands, 40+ tests)
|
|
486
|
+
|
|
487
|
+
- **G1 slice review** (4 cmds): `peaks slice-review` / `slice-score` / `slice-accept` / `slice-reject` — 4 项业务清单 + 12 Gaps 阈值 (avg >= 3 + no item <= 2)
|
|
488
|
+
- **G3 prd blocks** (1 cmd): `peaks prd check-blocks` — 4 必填块校验 (业务场景 / 边界 / UI 装配 / 上游基线) + 业务禁区子节
|
|
489
|
+
- **G4 user touchpoint** (3 cmds): `peaks gate-classify` / `user-touchpoints` / `commit-boundary-actions` — 14 Solo gate 静态分类 (business / tech / mode-selection / commit-boundary / commit-floor)
|
|
490
|
+
- **G5 qa business** (4 cmds): `peaks qa-business-review` / `-score` / `-accept` / `-reject` — 6 项业务清单 + 同一阈值
|
|
491
|
+
|
|
492
|
+
### Feature — G6/G7/G8/G9/G10 CLI (10 commands, 30+ tests)
|
|
493
|
+
|
|
494
|
+
- **G6 slice integrate** (1 cmd): `peaks slice-integrate` — 跨 slice 公共契约验证 (重复 export / signature drift)
|
|
495
|
+
- **G7 doc** (2 cmds): `peaks doc generate-skill` / `changelog-suggest` — 扫描 program.command() 自动生成 SKILL.md + git log → [Unreleased] 块
|
|
496
|
+
- **G8 legacy** (1 cmd): `peaks legacy-detect` — TODO/FIXME/HACK/console.log/any-type/large-file/ts-ignore 启发式扫描
|
|
497
|
+
- **G9 role** (4 cmds): `peaks role list/add/grant/check` — 4 命令 + `--preset senior-fe` 一键预置 12 Gaps 高级前端权限
|
|
498
|
+
- **G10 complexity** (1 cmd): `peaks complexity-estimate` — 按 LOC + exports + async 估算 trivial/simple/complex
|
|
499
|
+
|
|
500
|
+
### Documentation
|
|
501
|
+
|
|
502
|
+
- 6 new memory files: `peaks-cli-24h-ai-programmer-positioning` / `user-role-and-tech-decision` / `prd-template-design` / `slice-review-and-qa-perspective` / `fork-sync-and-layered-parallel` / `fast-iteration-quality-loop`
|
|
503
|
+
- 4 SKILL.md 校准注: peaks-solo / peaks-prd / peaks-rd / peaks-qa 加 2026-06-28 校准 anchor
|
|
504
|
+
- 12 Gaps 完整定位: 24h 程序员场景 / 唯一蜂群 / 反伪选择 / 业务审阅 / 轻量回归 / 上线观察期等
|
|
505
|
+
|
|
506
|
+
### Fix
|
|
507
|
+
|
|
508
|
+
- `src/services/feedback/feedback-promotion-service.ts:88,138` — silent catch 修 throw with cause + console.warn (silent-warning-detector violation 修复)
|
|
509
|
+
- `tests/unit/services/context/tokenizer.test.ts:23` — `fetchedAt` fixture 改 `new Date()` 避免 60 天衰减误报
|
|
510
|
+
- 6 个 TS build 错误修复 (types / readonly mutable mismatch)
|
|
511
|
+
- 1 个 pre-existing flaky: timeDecayScore 0.886 < 0.9 期望值(算法正确,fixture 修了)
|
|
512
|
+
|
|
513
|
+
### Test results
|
|
514
|
+
|
|
515
|
+
- **触动区域 100% 通过**: 触动 service 区域 100+ tests 全过
|
|
516
|
+
- **全量 vitest 4953 cases**: 4934 passed, 2 failed (pre-existing 并发 race,非本 session 引入)
|
|
517
|
+
- **npm run build**: 0 error
|
|
518
|
+
- **dogfood 验证(ice-cola NestJS)**:
|
|
519
|
+
- peaks legacy-detect: 164 文件, smells=high, 406 any-type, 15 large-file
|
|
520
|
+
- peaks role add senior-fe + role check: granted/not 行为正确
|
|
521
|
+
- peaks complexity-estimate: auth files → complex (LOC + async)
|
|
522
|
+
- peaks doc changelog-suggest: 12 commits → [Unreleased] 块
|
|
523
|
+
- peaks impact scan: overallRisk=high, 3 个 must-check P0
|
|
524
|
+
- peaks gate-classify + user-touchpoints: 9 user 必审 / 6 AI 自决
|
|
525
|
+
- peaks slice-review + slice-score: 4 项业务清单创建 + 打分
|
|
526
|
+
|
|
527
|
+
### Out-of-scope(后续切片)
|
|
528
|
+
|
|
529
|
+
- 真实 git fetch + merge(G11)
|
|
530
|
+
- 真实 Playwright 路径执行(G14)
|
|
531
|
+
- 真实 k8s rollout / LB config / 监控集成(G15)
|
|
532
|
+
- 2 个 pre-existing 全量并发 race test 留后续
|
|
533
|
+
|
|
534
|
+
## [2.15.0] — 2026-06-28 — Sticky-mode forced re-ask + user-feedback → peaks-cli enforcement (slice 002)
|
|
535
|
+
|
|
536
|
+
**MINOR bump from 2.14.2** (slice `2026-06-28-sticky-mode-and-feedback-promotion`). Closes defect A (sticky-mode) and defect B (advisory-only feedback) from PRD-002. Two system-level fixes ship together because both are triggered by the same root cause: user-given rules were not machine-enforced.
|
|
537
|
+
|
|
538
|
+
### Feature — Sticky-mode forced re-ask (defect A fix)
|
|
539
|
+
|
|
540
|
+
- **`peaks skill presence:check-stale --project <path> --json`** (NEW) — Detects whether the recorded skill presence's `outerSessionId` matches the current outer (Claude / harness) session id. Returns `{ stale: boolean, reason: "outer-session-mismatch" | "no-presence" | null }`. Pure read-only; does NOT clear the presence.
|
|
541
|
+
- **`peaks skill presence --check-stale`** (NEW flag, default false for back-compat) — Pair the standard presence read with the staleness check in a single CLI call. Statusline + sub-agent dispatch consume this.
|
|
542
|
+
- **`peaks workspace init`** (MODIFIED) — When an outer-session-mismatch rotation fires, the CLI now calls `clearStalePresenceOnRotation` to clear the stale presence. Two guards prevent accidental destruction of user-explicit mode choices:
|
|
543
|
+
- **Reconnect guard** — recorded outer id matches the NEW outer id → do NOT clear (reconnect).
|
|
544
|
+
- **Live-different-outer guard** — recorded outer id belongs to a different LIVE outer session → do NOT clear (would destroy another user's mode).
|
|
545
|
+
- **`peaks solo should-pause --step step-1-mode-select`** (MODIFIED) — Now consults `presence:check-stale` automatically. When the presence is stale, returns `shouldPause: true, reason: 'stale-presence — re-ask Step 1'`. The hard-pause on Step 1 itself is preserved (defect #1 from slice 2026-06-28-solo-mode-bypass-fix).
|
|
546
|
+
- **`skills/peaks-solo/SKILL.md` Step 1** (MODIFIED) — Wording changed from "if user did not name a profile, AskUserQuestion" to "if user did not name a profile OR presence is stale, AskUserQuestion". Cross-references the new `references/mode-selection-with-stale-presence.md`.
|
|
547
|
+
- **`skills/peaks-solo/references/mode-selection-with-stale-presence.md`** (NEW) — Detection protocol + worked example (88b27d defect) + ACL.
|
|
548
|
+
- **`src/services/skills/skill-presence-service.ts`** — New exports: `checkStalePresence`, `clearStalePresenceOnRotation`, types `StalenessCheck`, `StaleReason`.
|
|
549
|
+
|
|
550
|
+
### Feature — User-feedback → peaks-cli enforcement (defect B fix)
|
|
551
|
+
|
|
552
|
+
- **`sops/feedback-promotion-sop.md`** (NEW) — SOP that requires every feedback memory (`.peaks/memory/<name>.md` with `metadata.type === 'feedback'`) to be promoted to at least one enforcement layer: A (peaks-sop gate), B (peaks-hooks PreToolUse), or C (mode-gate hardFloorCategory). When a rule spans multiple layers, promote to ALL of them.
|
|
553
|
+
- **`peaks feedback promote <memory-file> [--layer A|B|C] [--dry-run]`** (NEW) — Reads the feedback memory, generates a code stub for the chosen layer, writes the promotion marker (HTML comment + `.promotion.json` sidecar), and writes the envelope at `.peaks/_runtime/<sid>/rd/feedback-promote-<name>.json`.
|
|
554
|
+
- **`peaks feedback check-unpromoted --project <path> [--strict]`** (NEW) — Scans `.peaks/memory/*.md` for feedback memories without a promotion marker. Default: dry-run (exit 0, just warn). `--strict`: fail with exit code 1 (used by Gate H).
|
|
555
|
+
- **`peaks workflow verify-pipeline` Gate H "feedback-promotion"** (NEW) — Runs `feedback check-unpromoted --strict`. Failures block `complete: true` and surface as `gateH: 'fail'` in the verification envelope.
|
|
556
|
+
- **`src/services/feedback/feedback-promotion-service.ts`** (NEW) — Parses feedback memories, detects promotion markers (comment OR sidecar), generates layer stubs, writes the promotion envelope.
|
|
557
|
+
|
|
558
|
+
### Feature — Commit-boundary hard-floor (full-auto boundary = commit only)
|
|
559
|
+
|
|
560
|
+
- **`src/services/solo/mode-gate.ts`** — New `HardFloorCategory` value: `'commit-boundary-side-effect'`. New `CommitBoundaryActionId` union with 5 actions: `git-push`, `git-tag`, `npm-publish`, `npm-install-global`, `peaks-global-install`. New function `detectCommitBoundaryAction(command)` matches the patterns. New `shouldPauseAtGate({ commitBoundaryAction: true })` flag — when true, ALWAYS pauses regardless of mode (overrides full-auto / swarm auto-proceed).
|
|
561
|
+
- **Per the user-given rule** `.peaks/memory/2026-06-28-full-auto-boundary.md`: "full-auto 只做到 commit 就是,push 不用". The commit-boundary hard-floor is the machine enforcement of that advisory rule.
|
|
562
|
+
|
|
563
|
+
### Test results
|
|
564
|
+
- 4 new test files: `presence-staleness.test.ts` (12), `stale-presence-detection.test.ts` (9), `feedback-promotion.test.ts` (18), `commit-boundary-hard-floor.test.ts` (247). Total new cases: **286**.
|
|
565
|
+
- Existing solo tests (mode-gate × 81, post-compact × 11) pass unchanged.
|
|
566
|
+
- Full unit suite baseline 4394 → 4680 passing (286 added). 0 new failures; pre-existing 7 unrelated failures unchanged.
|
|
567
|
+
|
|
568
|
+
### Out-of-scope
|
|
569
|
+
- Push / tag / npm publish — full-auto boundary = commit only; the commit-boundary hard-floor now BLOCKS these in full-auto (was advisory). User must explicitly confirm via AskUserQuestion to proceed.
|
|
570
|
+
- `peaks hooks install` — slice is code-only. Hooks remain user-only.
|
|
571
|
+
- Cleaning the 88b27d session's stale presence on disk — slice ships the detection + auto-clear, does NOT proactively touch the live tree.
|
|
572
|
+
|
|
573
|
+
### Feature — slice DAG layered parallelism + foundation/upstreamSync/complexity 标记 (2026-06-28 follow-up)
|
|
574
|
+
|
|
575
|
+
slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 + 业务并行(节省 2-3 天 wall time);fork 场景 = 上游 tag 断点同步;复杂度分流 = user-attended vs overnight 排程。
|
|
576
|
+
|
|
577
|
+
- **`src/services/dispatch/slice-dag.ts`** — `SliceNode` 加 3 可选字段(`foundation?: boolean` / `upstreamSync?: boolean` / `complexity?: 'trivial'|'simple'|'complex'`)。`validateDag` 加新字段合法性校验 + 防御性规则(foundation slice 不可 dependsOn 非 foundation)。`topologicalLevels` 同层内 priority 排序: foundation > upstreamSync > id asc。`serializeDag` / `hashDag` 含新字段,**老 DAG hash 稳定**。
|
|
578
|
+
- **`src/services/solo/dag-orchestrator.ts`** — 新增 `runLayeredDag` 函数。同 `runDag` 语义 + 业务 slice 不等所有 foundation,只等其 `dependsOn` 子集。cancel-on-fail 保留。`runDag` 保留(向后兼容,内部走 priority-sorted levels)。
|
|
579
|
+
- **`src/cli/commands/dispatch-from-dag.ts`** — 切到 `runLayeredDag`。envelope 加 `sliceMeta` 字段(per-slice foundation/upstreamSync/complexity)。
|
|
580
|
+
- **2 new test files** — `tests/unit/dispatch/slice-dag-foundation.test.ts` (19 cases) + `tests/unit/solo/dag-orchestrator-layered.test.ts` (5 cases) = **24 new tests, 0 regression**。
|
|
581
|
+
- **dispatch + solo tests**: 215/215 通过(单跑)。
|
|
582
|
+
- **全量 vitest** 4843 cases: 4824 passed / 2 failed(并发 race,pre-existing)。
|
|
583
|
+
|
|
584
|
+
**不触动:** transition gates / hard contracts / Karpathy 4 / sub-agent 协议 / 老 DAG 兼容性。
|
|
585
|
+
|
|
586
|
+
### Feature — G11/13/14/15 CLI 全套落地 (2026-06-28 follow-up)
|
|
587
|
+
|
|
588
|
+
4 个 PRD + 4 个 service + 4 个 CLI 文件 + 4 个 test 文件,共 **17 个新命令 + 63 个新测试通过**。
|
|
589
|
+
|
|
590
|
+
**G11 上游 tag 同步**(slice-2026-06-28-fork-cli):
|
|
591
|
+
- 5 commands: `peaks fork status` / `upstream-check` / `sync-plan` / `sync` / `sync-verify`
|
|
592
|
+
- 持久化 `.peaks/fork-state.json` (baseline + history)
|
|
593
|
+
- `recommendStableTags` 过滤 pre-release 标签(alpha/beta/rc/dev/preview)
|
|
594
|
+
- 15 tests pass
|
|
595
|
+
|
|
596
|
+
**G13 存量影响面扫描**(slice-2026-06-28-impact-cli):
|
|
597
|
+
- 2 commands: `peaks impact scan --files <list>` / `peaks impact must-check --files <list>`
|
|
598
|
+
- 手写 glob 匹配(`**` / `*`),无 AST 依赖
|
|
599
|
+
- 10 个默认业务流(用户管理 / 权限校验 / 登录流程 / Skill 权限 / 数据列表 / API 网关 / DB schema / ...)
|
|
600
|
+
- 风险等级: auth/schema/migrations = high;services/api/components = medium
|
|
601
|
+
- 13 tests pass
|
|
602
|
+
|
|
603
|
+
**G14 轻量回归 critical-paths**(slice-2026-06-28-smoke-cli):
|
|
604
|
+
- 4 commands: `peaks smoke define` / `run` / `run-and-repair` / `add-path`
|
|
605
|
+
- 持久化 `.peaks/smoke-paths.json`
|
|
606
|
+
- 5 个 source (prd-business-scenario / boss-stated / historical-incident / impact-must-check / manual)
|
|
607
|
+
- 3 个 status (pending / pass / fail),history 保留最近 5 次
|
|
608
|
+
- 16 tests pass
|
|
609
|
+
|
|
610
|
+
**G15 上线观察期状态机**(slice-2026-06-28-release-cli):
|
|
611
|
+
- 7 commands: `peaks release plan` / `canary` / `promote` / `watch` / `done` / `rollback` / `hotfix`
|
|
612
|
+
- 8 阶段状态机: planned → canary-10 → canary-50 → promoted → watching → done
|
|
613
|
+
- side branches: → rolled-back (from any pre-done), → hotfixed (from watching)
|
|
614
|
+
- 24h 观察期倒计时(从 promotedAt 起)
|
|
615
|
+
- `hotfix` 强制 rollback 旧 release + 跳过 planned 阶段
|
|
616
|
+
- 19 tests pass
|
|
617
|
+
|
|
618
|
+
**触动:** 新增 4 个 service / 4 个 CLI / 4 个 test 文件 = **12 个新文件**。CLI 注册全在 `src/cli/program.ts`,**不触动** transition gates / hard contracts / Karpathy 4 / sub-agent 协议 / mode-gate。
|
|
619
|
+
|
|
620
|
+
**已知未实现**(后续切片):
|
|
621
|
+
- 真实 git fetch + merge(G11)
|
|
622
|
+
- 真实 Playwright 路径执行(G14)
|
|
623
|
+
- 真实 k8s rollout / LB config / 监控集成(G15)
|
|
624
|
+
|
|
625
|
+
### Feature — G1/G3/G4/G5 user-touchpoint CLI 全套落地 (2026-06-28 follow-up)
|
|
626
|
+
|
|
627
|
+
4 个 service + 4 个 CLI 文件 + 4 个 test 文件,共 **16 个新命令 + 40+ 个新测试通过**。所有 CLI 都遵循 12 Gaps 核心原则: user 在循环里 = 业务/产品审阅,不参与技术决策。
|
|
628
|
+
|
|
629
|
+
**G3 prd 4 必填块**(slice-2026-06-28-prd-blocks):
|
|
630
|
+
- `peaks prd check-blocks <rid>` — 验证 4 必填块(业务场景/边界/UI 装配/上游基线)+ 业务禁区子节
|
|
631
|
+
- 上游基线仅在 fork 项目上 required(检测 `.peaks/fork-state.json`)
|
|
632
|
+
- 8 tests pass
|
|
633
|
+
|
|
634
|
+
**G4 user touchpoint classifier**(slice-2026-06-28-user-touchpoints):
|
|
635
|
+
- 3 commands: `peaks solo gate-classify` / `peaks solo user-touchpoints` / `peaks solo commit-boundary-actions`
|
|
636
|
+
- 14 个 Solo gate 静态分类: business / tech / mode-selection / commit-boundary / commit-floor
|
|
637
|
+
- `userShouldReview`: always / business-only / never
|
|
638
|
+
- 7 tests pass
|
|
639
|
+
|
|
640
|
+
**G1 slice 业务审阅**(slice-2026-06-28-slice-review):
|
|
641
|
+
- 4 commands: `peaks slice review` / `score` / `accept` / `reject`
|
|
642
|
+
- 4 个默认 review item: business-match / boundary-cases / ui-assembly / mergeable
|
|
643
|
+
- 12 Gaps 阈值: avg >= 3 AND no item <= 2 → accepted
|
|
644
|
+
- 16 tests pass
|
|
645
|
+
|
|
646
|
+
**G5 QA 业务视角验收**(slice-2026-06-28-qa-business):
|
|
647
|
+
- 4 commands: `peaks qa business-review` / `business-score` / `business-accept` / `business-reject`
|
|
648
|
+
- 6 个默认 review item: business-flow / req-coverage / boundary-cases / ui-assembly / exception-tone / mergeable
|
|
649
|
+
- 同一阈值(avg >= 3, no item <= 2)
|
|
650
|
+
- 12 tests pass
|
|
651
|
+
|
|
652
|
+
**不触动:** transition gates / hard contracts / Karpathy 4 / sub-agent 协议。**新增 8 个新文件**(4 services + 4 CLIs + 4 tests)。
|
|
653
|
+
|
|
654
|
+
### Feature — G6/G7/G8/G9/G10 CLI 全套落地 (2026-06-28 follow-up)
|
|
655
|
+
|
|
656
|
+
5 个 PRD 一次性收尾剩余 5 个 Gaps。每 G 一个 service + CLI + test,**10 个新文件 + 30+ 个新测试通过**。
|
|
657
|
+
|
|
658
|
+
**G6 跨 slice 集成**(slice-2026-06-28-slice-integrate):
|
|
659
|
+
- `peaks slice-integrate --slices <id1,id2,...>` — 验证多个 slice 的公共契约不冲突(重复 export / signature drift)
|
|
660
|
+
- 5 tests pass
|
|
661
|
+
|
|
662
|
+
**G7 文档自动化**(slice-2026-06-28-doc):
|
|
663
|
+
- `peaks doc generate-skill --name --from <commands-dir>` — 扫描 program.command() 自动生成 SKILL.md skeleton
|
|
664
|
+
- `peaks doc changelog-suggest --since <ref>` — git log 解析 conventional commit + 生成 [Unreleased] 块
|
|
665
|
+
- 6 tests pass
|
|
666
|
+
|
|
667
|
+
**G8 存量代码 smell 扫描**(slice-2026-06-28-legacy):
|
|
668
|
+
- `peaks legacy-detect --dir <path>` — TODO/FIXME/HACK/console.log/any-type/large-file/ts-ignore 启发式扫描
|
|
669
|
+
- 5 tests pass
|
|
670
|
+
|
|
671
|
+
**G9 角色 RBAC**(slice-2026-06-28-role):
|
|
672
|
+
- `peaks role list/add/grant/check` — 4 命令,持久化 .peaks/role-registry.json
|
|
673
|
+
- `--preset senior-fe` 一键预置 12 Gaps 高级前端权限
|
|
674
|
+
- 5 tests pass
|
|
675
|
+
|
|
676
|
+
**G10 复杂度估算**(slice-2026-06-28-complexity):
|
|
677
|
+
- `peaks complexity-estimate --files <list>` — 按 LOC + exports + async 估算 trivial/simple/complex
|
|
678
|
+
- 与 G2 字段(complexity tier)对齐,驱动 user-attended vs overnight 排程
|
|
679
|
+
- 5 tests pass
|
|
680
|
+
|
|
681
|
+
**Dogfood 验证(ice-cola NestJS 项目):**
|
|
682
|
+
- peaks legacy-detect (164 文件, smells=high, 406 个 any-type, 15 个 large-file)
|
|
683
|
+
- peaks role add senior-fe --preset senior-fe + role list + role check (granted/not)
|
|
684
|
+
- peaks complexity-estimate (auth files → complex, 41 lines + hasAsync)
|
|
685
|
+
- peaks doc changelog-suggest (12 commits parsed into [Unreleased])
|
|
686
|
+
- peaks doc generate-skill (peaks-cli 自己 75+ commands 扫到)
|
|
687
|
+
- peaks slice-integrate (no contracts → graceful empty, 正确路径)
|
|
688
|
+
|
|
689
|
+
**不触动:** transition gates / hard contracts / Karpathy 4 / sub-agent 协议。**新增 10 个新文件**(5 services + 5 CLIs + 5 tests)。
|
|
690
|
+
|
|
691
|
+
### Documentation — peaks-cli 真实定位 + 12 Gaps 沉淀 (2026-06-28 follow-up)
|
|
692
|
+
|
|
693
|
+
会话期间从资深前端 + 后端半盲 + 极致工期 + 24h AI 程序员 + 存量无 UT 的真实场景,沉淀 6 个 memory 文件 + 索引 + 4 个 SKILL.md 校准注。**核心叙事:** `90% 效率 + 80% 质量` > `80% 效率 + 90% 质量`;user 在循环里 = 业务/产品审阅者不参与技术决策;主路径 = 唯一蜂群模式;prd 质量前置 = 4 必填块;QA = 业务视角 + 轻量回归 + 上线观察期。
|
|
694
|
+
|
|
695
|
+
- **6 new memory files** — `.peaks/memory/peaks-cli-{24h-ai-programmer-positioning, user-role-and-tech-decision, prd-template-design, slice-review-and-qa-perspective, fork-sync-and-layered-parallel, fast-iteration-quality-loop}.md` (warm.project index 18 → 24)
|
|
696
|
+
- **4 SKILL.md 校准注** — peaks-solo / peaks-prd / peaks-rd / peaks-qa 各加精简 anchor(均通过 25KB cap,只引用 memory 不重复内容)
|
|
697
|
+
- **不触动** transition gates / hard contracts / Karpathy 4 / 模式枚举 / mode-gate.ts / sub-agent 协议
|
|
698
|
+
|
|
699
|
+
### Fix — 2 pre-existing bugs (2026-06-28 follow-up)
|
|
700
|
+
|
|
701
|
+
- `src/services/feedback/feedback-promotion-service.ts:88` — `catch` 改 `throw with cause`(silent-warning-detector 报 catch-return-null,让 caller 区分 IO 失败)
|
|
702
|
+
- `src/services/feedback/feedback-promotion-service.ts:138` — `catch {}` 改 `console.warn`(silent-warning-detector 报 empty-catch,malformed sidecar 不再静默)
|
|
703
|
+
- `tests/unit/services/context/tokenizer.test.ts:23` — `fetchedAt` 硬编码 `2026-06-21` 距今 7 天触发 `timeDecayScore 0.886 < 0.9` 期望,改 `new Date().toISOString()` 符合"fresh fetch"测试意图
|
|
704
|
+
|
|
705
|
+
**测试结果:**
|
|
706
|
+
- silent-warning-detector: 2 violations → 0
|
|
707
|
+
- `tests/unit/services/context/`: 49/50 → 50/50
|
|
708
|
+
- 全量 vitest 4819 tests:3 failed → 2 failed(剩下 2 个是并发 race condition,单跑 context 50/50 全过,pre-existing)
|
|
709
|
+
|
|
710
|
+
---
|
|
711
|
+
|
|
712
|
+
## [2.14.2] — 2026-06-28 — peaks-companion dead skill removal + minimax provider migration
|
|
713
|
+
|
|
714
|
+
**PATCH bump from 2.14.1** (slice `2026-06-28-tilde-peaks-p3p4`). Closes P3 + P4 from `.peaks/memory/2026-06-28-tilde-peaks-inventory.md`.
|
|
715
|
+
|
|
716
|
+
### Cleanup
|
|
717
|
+
- **`skills/peaks-companion/`** — REMOVED. Skill was dead: SKILL.md documented `peaks companion status/install/setup/start` but no CLI implementation existed (`src/services/companion/` not present, `peaks --help` had no companion entry). Empty `~/.peaks/companion/` directory is no longer expected to receive `cc-connect.log` writes.
|
|
718
|
+
- **`tests/unit/skills/peaks-companion.test.ts`** — REMOVED (9 cases). The companion skill-count assertion (19 → 18 skills) is now verified by `tests/unit/skills/skill-count.test.ts` (already covers the meta count, not companion specifically).
|
|
719
|
+
- **`.peaks/memory/peaks-companion-*.md`** — REMOVED (4 files: `cc-connect-dogfood-2026-06-15`, `qr-autoopen-2026-06-15`, `qr-inline-display-2026-06-15`, `watcher-ecs-url-config`). Historical dogfood records, no longer relevant.
|
|
720
|
+
|
|
721
|
+
### Refactor
|
|
722
|
+
- **`~/.peaks/providers.json`** (NEW sidecar) — MiniMax provider config migrated from deprecated `~/.peaks/config.json.providers` to canonical `~/.peaks/providers.json` per `provider-service.ts` schema. The slim `config.json` (per `config-types.ts`) no longer carries the `providers` field.
|
|
723
|
+
- **MiniMax model field preserved** — `~/.peaks/providers.json.providers.minimax.model = "minimax-2.7"`; `peaks config provider minimax get/status` continue to report correctly via the back-compat fallback in `provider-service.ts`.
|
|
724
|
+
|
|
725
|
+
### Test results
|
|
726
|
+
- `pnpm vitest run tests/unit/doctor.test.ts` — 50/50 pass
|
|
727
|
+
- `pnpm vitest run` full unit suite — `peaks-companion.test.ts` no longer runs; total cases drop from 4418 → 4409. Pre-existing failures (`doctor.test.ts` × 0, `tokenizer.test.ts` × 1, `35-checks-aggregate.test.ts` × 1) unchanged.
|
|
728
|
+
|
|
729
|
+
### Out-of-scope
|
|
730
|
+
- Push / tag / npm publish — full-auto mode boundary = commit only; user-only.
|
|
731
|
+
- Re-implementing peaks-companion CLI — user chose delete over revive.
|
|
732
|
+
- Cleaning `~/.peaks/companion/` empty dir — left in place; harmless.
|
|
733
|
+
|
|
734
|
+
---
|
|
735
|
+
|
|
736
|
+
## [2.14.1] — 2026-06-28 — Prepublish Windows ENOENT + npm 11.x https_proxy deprecation
|
|
737
|
+
|
|
738
|
+
**PATCH bump from 2.14.0** (carry-forward from v2.13.3 AC-2 partial fix + npm 11.x config rename).
|
|
739
|
+
|
|
740
|
+
### Bug fixes
|
|
741
|
+
- `scripts/prepublish-build.mjs` — use `execFileSync('pnpm', ['run', 'build'])` (no shell) with Windows fallback to `prepublish-build.ps1` (proven dogfood). Eliminates the v2.13.4 partial-fix `spawnSync cmd.exe ENOENT` on Node 22 + Windows native.
|
|
742
|
+
- `.npmrc` (NEW, repo-local template) — documents that `https_proxy` (underscore) is NO LONGER VALID in npm 11.x; use `https-proxy` or `proxy`. User-global `~/.npmrc` may still have `https_proxy`; npm 11.x warns, npm 12 will error.
|
|
743
|
+
|
|
744
|
+
### Test results
|
|
745
|
+
- `tests/unit/scripts/prepublish-build.test.ts` (NEW, 6 cases) — covers execFile happy path + Windows ps1 fallback + error propagation + version validation + ENOENT regression
|
|
746
|
+
- `node scripts/prepublish-build.mjs` end-to-end: `[prepublish-build] build OK` exit 0 (verified on this Windows session)
|
|
747
|
+
|
|
748
|
+
### Out-of-scope
|
|
749
|
+
- Do NOT modify user-global `~/.npmrc` (user-only boundary); user must run `npm config delete https_proxy` themselves if they want to silence the warning before npm 12.
|
|
750
|
+
|
|
751
|
+
---
|
|
752
|
+
|
|
753
|
+
All notable changes to peaks-cli are documented here.
|
|
754
|
+
|
|
755
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
756
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
757
|
+
|
|
758
|
+
---
|
|
759
|
+
|
|
760
|
+
## [2.14.0] — 2026-06-28 — Anti-fake-green hardening (5-line defense in depth)
|
|
761
|
+
|
|
762
|
+
**MINOR bump from 2.13.4** (slice `v2-14-0-anti-fake-green-hardening`, 5 production-grade defenses against single-LLM self-dogfood blind spots).
|
|
763
|
+
|
|
764
|
+
### Features
|
|
765
|
+
|
|
766
|
+
- G1 fixture-replay: 32 real-shipment fixtures + `peaks fixture capture` CLI + `pnpm test:replay` CI gate
|
|
767
|
+
- G2 silent-warning lint: AST-based detector catches 4 anti-patterns (empty catch / catch-return-null / Promise-reject-no-cause / console-error-no-env); `pnpm lint:silent-warning` exits 1 by default with `// TODO(g2):` grace markers; 142 baseline sites pre-marked
|
|
768
|
+
- G3 prose-only ≤5%: 89 prose-only entries → 6 promoted to enforcers (prose ratio 60.1% → 0%); `pnpm audit:prose-ratio` CI gate
|
|
769
|
+
- G4 third-party reviewer: `skills/peaks-reviewer/` with `~/.peaks/config.json` provider pool; 35/35 new tests; `THIRD_PARTY_REVIEW` prereq (soft-warn skipped in v2.14.0, hard-fail in v2.15.0)
|
|
770
|
+
- G5 race-detector: 4 fuzz-hardened modules + fixed `share-commands.test.ts` LWW timing flake via `uniqueBatch()`; `pnpm test:race` (--repeat=20 --no-file-parallelism) in 4.7s
|
|
771
|
+
|
|
772
|
+
### Test results
|
|
773
|
+
|
|
774
|
+
- 4502 pass + 3 pre-existing failures (artifact-prereq x2, tokenizer x1 — NOT introduced)
|
|
775
|
+
- 25/25 ACs pass; 10/10 QA gates pass
|
|
776
|
+
- tsc clean; prepublish-build OK
|
|
777
|
+
|
|
778
|
+
### Known limitations (NOT a guarantee — see NG5)
|
|
779
|
+
|
|
780
|
+
- Self-dogfood blind spots still exist by construction (any single-LLM evaluator shares blind spots with the code author). The 5-line defense reduces the probability of undetected regressions but does not eliminate it.
|
|
781
|
+
|
|
782
|
+
---
|
|
783
|
+
|
|
784
|
+
## [2.14.0-alpha.1] — 2026-06-28 — Slice B G4 third-party reviewer (anti-fake-green hardening)
|
|
785
|
+
|
|
786
|
+
**MINOR bump from 2.13.4** (slice `2026-06-28-session-75d5f0`, slice-b-1-g4-third-party-reviewer).
|
|
787
|
+
|
|
788
|
+
Slice B of the v2.14.0 anti-fake-green hardening PRD (`v2-14-0-anti-fake-green-hardening`, R6 sub-slice plan). This slice introduces the `peaks-reviewer` skill — a third-party independent reviewer that runs **in parallel** to the existing `karpathy-reviewer`. The intent is structural: when the RD-side karpathy reviewer and the QA-side dogfood both run on the same model family, "single-LLM self-dogfood" blind spots can survive 49/49 unit-test pass + tsc clean (the v2.13.1 + v2.13.2 ship bugs were real cases). peaks-reviewer adds an out-of-band perspective from a guaranteed-distinct model family.
|
|
789
|
+
|
|
790
|
+
> ⚠️ **Important honesty note (per A4.5):** peaks-reviewer is a structural mitigation, NOT a guarantee. The release notes MUST NOT claim "no more fake green". Two reviewers from different families reduce — they do not eliminate — the single-LLM blind-spot class. v2.14.0 ships the G4 mitigation in a 1-minor-release soft-warning window; hard-fail (when `reviewer.providers` is configured but `rd/third-party-review.md` is absent) lands in v2.15.0.
|
|
791
|
+
|
|
792
|
+
### Features
|
|
793
|
+
|
|
794
|
+
- **`skills/peaks-reviewer/SKILL.md` + `references/reviewer-prompt.md` + `references/reviewer-schema.md`** — new skill family (19 → 20 skills) with a 5-step prompt, ReviewerEnvelope shape, and the A4.4 modelFamily distinctness gate contract.
|
|
795
|
+
- **`schemas/reviewer-envelope.schema.json`** — JSON Schema for the ReviewerEnvelope (reviewerId / modelId / modelFamily / passed / violations[] / gateAction / reason). Free-form LLM JSON is rejected at parse time.
|
|
796
|
+
- **`peaks reviewer run --rid <rid> [--json]`** + **`peaks reviewer status [--json]`** — CLI surface. `run` returns the schema-validated envelope; `status` shows whether the reviewer is configured (providers / selection / fallback policy).
|
|
797
|
+
- **`~/.peaks/config.json` `reviewer` section** — `providers[]` (≥2 entries; ollama / anthropic / openai supported), `selection` (`round-robin` | `hash(rid)` | `random`), `rdProviderName`, `requireDistinctModelFamily`, `fallbackOnError` (`skip` | `error`), `schemaPath`. Missing section → reviewer skipped (no CLI prompt, transition still passes, envelope records `skipped: no-reviewer-config`).
|
|
798
|
+
- **THIRD_PARTY_REVIEW prereq** — wired into `rd:qa-handoff` for FEATURE / BUGFIX / REFACTOR slices. v2.14.0 ships with a 1-minor-release soft-warning window (`backCompat: true`); v2.15.0 will hard-fail when `reviewer.providers` is configured but the artifact is absent.
|
|
799
|
+
- **CLI flag `--reviewer-model` REMOVED** — A4.1 explicitly demotes the model selection to config-file-only. Users edit `~/.peaks/config.json` and the change takes effect without any CLI intervention.
|
|
800
|
+
|
|
801
|
+
### Service layer
|
|
802
|
+
|
|
803
|
+
- **`src/services/reviewer/reviewer-service.ts`** — orchestrator. `runReviewer({ rid, context, state?, fetchImpl?, rng? })` returns `{ ok, envelope, nextState? }`. Stamps `modelFamily` from the actual `modelId` we called (LLM cannot lie about its family — A4.4 hard gate).
|
|
804
|
+
- **`src/services/reviewer/reviewer-config.ts`** — strict loader for the `reviewer` section. <2 providers → `no-reviewer-config`. NEVER throws on missing file.
|
|
805
|
+
- **`src/services/reviewer/model-family.ts`** — `deriveModelFamily(modelId)` → `claude | gpt-4o | gpt-4 | gpt-3.5 | gpt-5 | o1 | o3 | azure-openai | bedrock-llama | bedrock-mistral | llama | mistral | qwen | deepseek | gemini | unknown-<sha256-prefix>`. Pure, deterministic, total.
|
|
806
|
+
- **`src/services/reviewer/selection-strategies.ts`** — `selectRoundRobin` (cycles + `initialState()` reset) / `selectHash(rid)` (stable per rid, sha256-of-rid) / `selectRandom(rid, rng)` (injected RNG for testability).
|
|
807
|
+
- **`src/services/reviewer/providers/ollama.ts` / `anthropic.ts` / `openai.ts`** — pure `fetch` + manual JSON parse; NO SDK (A4 prohibition). 30s timeout, `AbortController`-backed. Missing env var → `{ ok: false, error: 'missing env <NAME>' }`.
|
|
808
|
+
|
|
809
|
+
### Internal
|
|
810
|
+
|
|
811
|
+
- `src/services/artifacts/artifact-prerequisites.ts` — `THIRD_PARTY_REVIEW` added to FEATURE/BUGFIX/REFACTOR rd:qa-handoff tables; mirrors the MUT_REPORT back-compat pattern (1-minor-release soft-warning; v2.15.0 hard cut).
|
|
812
|
+
- `src/cli/program.ts` — registers `registerReviewerCommands`.
|
|
813
|
+
- `tests/unit/reviewer/{model-family,selection-strategies,reviewer-service}.test.ts` — 35 new test cases (10 / 12 / 13 across the three files). All pass; `tsc -p tsconfig.json --noEmit` clean; 99/99 cli-program + 28/28 artifact-prereq regressions still green.
|
|
814
|
+
|
|
815
|
+
### Honesty clauses preserved
|
|
816
|
+
|
|
817
|
+
- The karpathy-reviewer skill (`andrej-karpathy-skills:karpathy-guidelines` + `src/services/scan/karpathy-service.ts`) is **unchanged** (NG4 — parallel reviewer, not replacement).
|
|
818
|
+
- No new dependencies added — pure `fetch` + node:crypto + zod-equivalent manual schema guard.
|
|
819
|
+
- The 5 existing envelope parsers (v2.13.3 territory: `audit/security.md`, `audit/perf.md`, `prd/handoff.md`, `mut-report.json`, `mutants.json`) are **byte-stable**.
|
|
820
|
+
- No tests deleted or renamed; only additions.
|
|
821
|
+
|
|
822
|
+
---
|
|
823
|
+
|
|
824
|
+
## [2.13.4] — 2026-06-28 — Solo mode gate + verify-pipeline canonical path + auto-compact main target
|
|
825
|
+
|
|
826
|
+
**PATCH bump from 2.13.3** (slice `2026-06-28-solo-mode-bypass-fix`, 4 production defects reported by user in solo session 2026-06-28).
|
|
827
|
+
|
|
828
|
+
The four defects all stem from the v2.13.0 two-axis convention landing debt: the canonical evidence location is `.peaks/_runtime/change/<changeId>/<role>/...` (per `change-scope-service.ts`), but v2.13.0's mode-gate, verify-pipeline, and auto-compact dispatcher all referenced the pre-1.3.0 sibling-of-`_runtime/` form. v2.13.4 also adds the user-requested economy-vs-concurrency separation (per direction 2026-06-28: "效率比省钱更重要,是在效率达到最大值的时候,再去考虑经济问题").
|
|
829
|
+
|
|
830
|
+
### Bug fixes
|
|
831
|
+
|
|
832
|
+
- **Step 1 AskUserQuestion is no longer auto-defaulted to `mode: full-auto`** (defect #1) — `src/services/solo/mode-gate.ts:104-196` now treats `step-1-mode-select` (and `step-0.5-openspec-opt-in`, `step-0.7-resume-detection`) as a `HARD_PAUSE_STEPS` set: even `full-auto` mode pauses for the user to pick the mode. A new `gateKind: 'mode-selection-itself' | 'mode-driven' | 'hard-floor'` discriminator lets the LLM-side runner distinguish "you paused because the user must choose" from "you paused because the user already chose assisted/strict" from "you paused because a hard-floor category always wins". Dogfood-verified: a new session no longer writes `mode: "full-auto"` to `.peaks/_runtime/active-skill.json` on the first tool call without surfacing the Step 1 AskUserQuestion. 14 new test cases in `tests/unit/solo/mode-gate-step-1-hard-pause.test.ts` cover the four-mode matrix + hard-floor precedence. The pre-existing `tests/unit/services/solo/mode-gate.test.ts` (77 cases) was also updated for the new `gateKind` field — 77/77 still pass.
|
|
833
|
+
- **`peaks workflow verify-pipeline` now resolves the canonical evidence path** (defect #3) — `src/services/workflow/pipeline-verify-service.ts:216,219,260,288,295` rebuilds evidence paths as `.peaks/_runtime/change/<changeId>/<role>/...` (was `.peaks/<changeId>/<role>/...`, the SKILL.md 2.8.3 hard-ban shape). `src/services/workflow/artifact-paths.ts:67,148` gets the same fix in the security/performance findings resolver. A 1-minor-release deprecation window accepts the legacy `.peaks/<changeId>/...` and `.peaks/_runtime/<changeId>/...` forms with a `DEPRECATION_LEGACY_PATH_USED` warning so un-migrated workspaces still resolve. `PipelineVerification.usedCanonicalPath: boolean` is added to the return envelope so QA / TXT can surface the deprecation state. The CLI help-text at `src/cli/commands/workflow-commands.ts:448` is updated to cite the canonical path. 4 new test cases in `tests/unit/workflow/pipeline-verify-canonical-path.test.ts` cover canonical / legacy misplaced / top-level fallback / absent. The pre-existing `tests/unit/pipeline-verify-service.test.ts` (60 cases) was updated to write evidence at both paths so the deprecation contract is exercised end-to-end — 60/60 still pass.
|
|
834
|
+
- **`auto-compact` now targets the main-session context, not a sub-agent shell** (defect #4) — `src/services/context/auto-compact-dispatcher.ts` and `src/services/solo/auto-compact-orchestrator.ts` accept a new `target: 'main' | 'sub-agent'` parameter (default `'main'`). For `target='main' + ide='claude-code'`, the dispatcher returns the `llm-self-compress` pathway and the orchestrator writes `.peaks/_runtime/<sessionId>/txt/auto-compact-pending.json` (with `pending: true, target: 'main', ratio, redLine`) so the next main-session LLM turn fires `/compact` in-band rather than spawning a detached `sh -c /compact` (which previously only compressed the sub-agent shell). For `target='sub-agent'`, the legacy shell-spawn behavior is preserved. Non-claude-code IDEs + `target='main'` return `noop` with a "main-session target unsupported" reason. 6 new test cases in `tests/unit/context/auto-compact-main-target.test.ts` cover the dispatch matrix + the orchestrator's intent-file write.
|
|
835
|
+
|
|
836
|
+
### Features
|
|
837
|
+
|
|
838
|
+
- **`peaks workspace migrate-change-scope --project <path> [--apply] [--json]`** — slice 2026-06-28-solo-mode-bypass-fix migration tool. Dry-run by default; `--apply` atomically renames misplaced `.peaks/_runtime/<changeId>/` (and `.peaks/<changeId>/`) entries into the canonical `.peaks/_runtime/change/<changeId>/` location, writes a `.peaks-migration.json` marker (with `from:`, `slice:`, `tool:`, `migratedAt:`) for audit. **Refusal conditions** (defense-in-depth, both pre-slice audit + new): entries that look like date-stamped session ids (`YYYY-MM-DD-session-X`) are refused to avoid destroying the session workspace (`MIGRATION_REFUSED_SESSION_ID_COLLISION`); entries whose target dir exists with non-byte-equal contents are refused to avoid clobbering (`MIGRATION_REFUSED_TARGET_NOT_EMPTY`); a hard-coded `PEAKS_TOP_LEVEL_DENY` / `RUNTIME_DENY` whitelist + `looksLikeChangeScopeId` structural check ensures `.peaks/memory`, `.peaks/standards`, `.peaks/retrospective`, `.peaks/sc`, `.peaks/sops`, `.peaks/project-scan`, `.peaks/_sub_agents` are **never** treated as misplaced change-ids. **Idempotent**: re-running on a clean workspace reports no work. Dogfood-verified: the actual misplaced `.peaks/_runtime/2026-06-27-verdict-aggregator-v2-12-debt/` (8 files) was migrated end-to-end; subsequent `peaks workflow verify-pipeline --rid 2026-06-27-verdict-aggregator-v2-12-debt --change-id 2026-06-27-verdict-aggregator-v2-12-debt --project .` reports `usedCanonicalPath: true` (was `false`) and zero `DEPRECATION_LEGACY_PATH_USED` warnings. 5 new test cases in `tests/unit/workspace/migrate-change-scope.test.ts` cover dry-run, apply, idempotency, session-id refusal, and target-not-empty refusal; a 6th case locks the `.peaks/<project-data>` whitelist contract.
|
|
839
|
+
|
|
840
|
+
### Internal
|
|
841
|
+
|
|
842
|
+
- `src/services/solo/mode-gate.ts` (+28/-4 lines) — `HARD_PAUSE_STEPS` set + `GateKind` union + `gateKind` field on `GateDecision`.
|
|
843
|
+
- `src/services/solo/auto-compact-orchestrator.ts` (+24/-2 lines) — `target` parameter, `writeMainSessionCompactIntent` helper, surface `target` in return envelope.
|
|
844
|
+
- `src/services/context/auto-compact-dispatcher.ts` (+38/-5 lines) — `CompactTarget` type, `target` parameter, reordered non-claude-code refusal, `shell-exec + main` → `llm-self-compress` rewrite.
|
|
845
|
+
- `src/services/context/auto-compact-types.ts` (+6 lines) — `target?: 'main' | 'sub-agent'` on `AutoCompactResult.data`.
|
|
846
|
+
- `src/services/preferences/preferences-types.ts` (+13 lines) — explicit doc-comments on `economyMode` (model selection only, NOT concurrency) and `swarmMode` (controls subgraph shape, NOT fan-out). Fan-out is governed by `fanout.defaultMode: 'fan-out'` (hard constraint per slice 2026-06-24-audit-5th-p2).
|
|
847
|
+
- `src/services/workflow/pipeline-verify-service.ts` (+58/-22 lines) — canonical-path lookup + 1-minor-release deprecation fallback + `usedCanonicalPath` + `findRequestFile` strips legacy `_runtime/` scope prefix.
|
|
848
|
+
- `src/services/workflow/artifact-paths.ts` (+31/-5 lines) — `canonicalQaDir` / `legacyQaDir` / `legacyTopLevelQaDir` helpers + extended legacy fallback chain in `resolveFindingsPath`.
|
|
849
|
+
- `src/cli/commands/workflow-commands.ts` (+1/-1 line) — CLI help-text now cites canonical path.
|
|
850
|
+
- `src/cli/commands/workspace-commands.ts` (+3 lines) — register `migrate-change-scope` sub-command.
|
|
851
|
+
- `src/cli/commands/workspace/migrate-change-scope-command.ts` (NEW, 230 lines) — `migrateChangeScope()` core + `migrateOne()` per-entry handler with the deny-list + `shallowContentEqual` (1-level recursion) + 3 refusal conditions.
|
|
852
|
+
- `tests/unit/workspace/banned-path-directive-guard.test.ts` (+11 lines) — added `KEEP_DESCRIPTIONS` anchor for the new help-text so the AC-2.2 banned-path-guard still passes.
|
|
853
|
+
- `tests/unit/pipeline-verify-service.test.ts` (+24/-12 lines) — `writeRdEvidence` / `writeQaEvidence` now write at canonical + legacy paths; `isResolvedChangeId` updated for the bare-id contract.
|
|
854
|
+
- `tests/unit/services/solo/mode-gate.test.ts` (linter-updated) — assertions for the new `gateKind` field on every `GateDecision` return.
|
|
855
|
+
- 5 new test files: `tests/unit/solo/mode-gate-step-1-hard-pause.test.ts` (14 cases), `tests/unit/workflow/pipeline-verify-canonical-path.test.ts` (4 cases), `tests/unit/workflow/artifact-paths-canonical.test.ts` (4 cases), `tests/unit/context/auto-compact-main-target.test.ts` (6 cases), `tests/unit/workspace/migrate-change-scope.test.ts` (6 cases) — 34 new cases total, all pass.
|
|
856
|
+
|
|
857
|
+
### Test results
|
|
858
|
+
|
|
859
|
+
- `pnpm vitest run` on the 4 affected module areas (solo/workflow/context/workspace): **181/181 pass** (5 new test files + pre-existing suites).
|
|
860
|
+
- Full unit suite: 4394/4418 pass (7 pre-existing failures unrelated to this slice — `doctor.test.ts` version-mismatch × 5, `tokenizer.test.ts` time-decay flake × 1, `35-checks-aggregate.test.ts` × 1).
|
|
861
|
+
- `pnpm tsc --noEmit`: clean.
|
|
862
|
+
|
|
863
|
+
---
|
|
864
|
+
|
|
865
|
+
## [2.13.3] — 2026-06-28 — Verdict aggregator parser fix + publish pipeline + CLI warnings
|
|
866
|
+
|
|
867
|
+
**PATCH bump from 2.13.2** (slice `2026-06-27-verdict-aggregator-v2-12-debt`, red-line scope 7 source files + 3 test files modified + 3 new scripts + 1 package.json hook).
|
|
868
|
+
|
|
869
|
+
2.13.2 dogfood surfaced 4 bugs that all stem from v2.12.0 envelope-schema落地 debt: the v2.12.0 audit artifacts (`audit/security.md`, `audit/perf.md`) are YAML-frontmatter + markdown, but v2.13.2's `parseSecurityEnvelope` / `parsePerfEnvelope` used `JSON.parse` (which is the wrong shape). v2.13.3 also fixes a cross-version publish-pipeline issue (`bin/peaks.js` was shipping a Jun 13 stale dist because `prepublishOnly` was never wired) and adds a soft-block-warning surface in the CLI so users can see v2.13.2's `mut-report-missing-deprecated-in-v2.14.0` warning instead of having it silently downgraded in service-layer.
|
|
870
|
+
|
|
871
|
+
### Bug fixes
|
|
872
|
+
|
|
873
|
+
- **`parseSecurityEnvelope` / `parsePerfEnvelope` now parse v2.12.0 markdown** (AC-1) — both parsers now try `JSON.parse` first and fall back to a markdown parser that extracts the YAML frontmatter `verdict:` line + parses `## Findings` bullets in 2 real v2.12.0 shapes (`- [SEV] dim @ file:line — hint` and `- HIGH: hint in file:line`). Dogfood-verified: a real `audit/security.md` with a HIGH `hardcoded password in src/auth.ts:42` now returns `parseSecurityEnvelope(...) === { verdict: 'warn', violations: [{ severity: 'HIGH', file: 'src/auth.ts', line: 42, hint: 'hardcoded password' }], summary: '...' }`. The CLI's inline `parseSecurityFromMarkdown` / `parsePerfFromMarkdown` were removed (strict-improvement refactor; canonical parser in `src/services/verdict/envelopes.ts` now owns the markdown path; CLI delegates). 4 new test cases (H/I/J/K) bring the envelope suite to 11/11.
|
|
874
|
+
- **`peaks verdict aggregate` returns real violations** (AC-1 end-to-end) — dogfood with a real v2.12.0 fixture now returns `{ verdict: 'warn', reasons: [{ source: 'security-audit', severity: 'HIGH', file: 'src/auth.ts', line: 42, hint: 'hardcoded password' }], sources: { security: 'present', perf: 'present', karpathy: 'present', mut: 'missing', qa: 'present' } }` — 2.13.2's silent `reasons: []` is gone.
|
|
875
|
+
- **`prd/handoff.md` frontmatter now has `sha256:` field** (AC-4) — `autoRegenPrdHandoff` was writing `handoffHash:` but `artifact-prerequisites.ts:158` requires `mustContain: ['schemaVersion: 2', 'sha256:']`. v2.13.3 writes `sha256: <hex>` as the primary field and keeps `handoffHash: <hex>` as an alias for backward compatibility. 1 new test case (E: prereq regression pin) brings the handoff suite to 5/5.
|
|
876
|
+
- **CLI surfaces `PrerequisiteCheckResult.warnings`** (AC-3) — `PrerequisitesNotSatisfiedError` now carries a `warnings` field (always present, possibly empty). The `code: PREREQUISITES_MISSING` error response now includes `data.warnings: [...]` plus a per-warning `Soft-blocked (v2.13.3 back-compat window): <path> — <message>` next-action line. This makes the v2.13.2 `MUT_REPORT` soft-block window visible to users instead of being silently downgraded in service-layer. 3 new test cases bring the request-commands suite to 8/8.
|
|
877
|
+
|
|
878
|
+
### Features
|
|
879
|
+
|
|
880
|
+
- **`prepublishOnly` build hook** (AC-2) — `package.json` adds `"prepublishOnly": "node scripts/prepublish-build.mjs"` which runs `pnpm run build` before every `npm publish`. Cross-platform dispatch via `scripts/prepublish-build.mjs` (Node entry), with equivalent `scripts/prepublish-build.sh` (git-bash / Linux) and `scripts/prepublish-build.ps1` (PowerShell) for direct invocation. The `prepublish-build.mjs` uses `shell: isWindows` to work around the Node 22 + Windows + .cmd-shim `EINVAL` (POSIX is a no-op). This is the cross-version publish-pipeline fix that prevents the 2.13.2 `bin/peaks.js → dist/src/cli/index.js (Jun 13 stale dist)` incident from recurring. The `.sh` path has been independently dogfood-verified to run `pnpm build` end-to-end with exit code 0.
|
|
881
|
+
|
|
882
|
+
### Internal
|
|
883
|
+
|
|
884
|
+
- `src/services/verdict/envelopes.ts` (+192/-18 lines) — `parseSecurityEnvelope` / `parsePerfEnvelope` markdown fallback (frontmatter + `## Findings` shape B bullets).
|
|
885
|
+
- `src/cli/commands/verdict-aggregate-command.ts` (+13/-31 lines) — removed inline `parseSecurityFromMarkdown` / `parsePerfFromMarkdown`; delegates to canonical parser.
|
|
886
|
+
- `src/services/prd/handoff-auto-regen.ts` (+8 lines) — `sha256:` primary + `handoffHash:` alias.
|
|
887
|
+
- `src/services/artifacts/request-artifact-service.ts` (+18/-7 lines) — `PrerequisitesNotSatisfiedError.warnings` field (defaulted param).
|
|
888
|
+
- `src/cli/commands/request-commands.ts` (+13/-1 lines) — surface `data.warnings` in PREREQUISITES_MISSING + per-warning next-action.
|
|
889
|
+
- `scripts/prepublish-build.mjs` (NEW) — cross-platform Node dispatch (8 lines of code).
|
|
890
|
+
- `scripts/prepublish-build.sh` (NEW) — bash variant for git-bash / Linux.
|
|
891
|
+
- `scripts/prepublish-build.ps1` (NEW) — PowerShell variant for Windows native.
|
|
892
|
+
- `package.json` (+1 line) — `prepublishOnly` hook.
|
|
893
|
+
- `README.md` (+1 line, 30-second onboarding block) — publish note: "v2.13.3 起 `npm publish` 会在 publish 前自动跑 `pnpm run build` (prepublishOnly hook 走 scripts/prepublish-build.mjs), 确保 bin/peaks.js 永远带最新 dist. 发布前不要手动跳过这一步 — 2.13.2 dogfood 抓过 bin/peaks.js 指 Jun 13 旧 dist 的事故."
|
|
894
|
+
- `tests/unit/services/verdict/envelopes.test.ts` (+112 lines) — 4 new cases (H/I/J/K).
|
|
895
|
+
- `tests/unit/services/prd/handoff-auto-regen.test.ts` (+62 lines) — 1 new case (E: prereq regression pin).
|
|
896
|
+
- `tests/unit/cli/commands/request-commands.test.ts` (+183 lines) — 3 new cases (warnings surface).
|
|
897
|
+
|
|
898
|
+
### Decision records
|
|
899
|
+
|
|
900
|
+
- NEW `.peaks/memory/2026-06-27-v2-13-3-verdict-aggregator-v2-12-debt.md` — ship state (162/162 PRD-targeted tests pass, 4363/4364 full unit suite pass with 1 pre-existing tokenizer.test.ts flake, tsc 0 errors, 6 AC all green, 4 dogfood scenarios 0-2-tychetes passed).
|
|
901
|
+
- UPDATED `.peaks/memory/2026-06-27-v2-13-2-verdict-aggregator-fixes.md` — 2.13.2 ship state amended with the dogfood that motivated v2.13.3 (this slice is the canonical example of "v2.13.1's BLOCKER led to v2.13.2, v2.13.2's dogfood led to v2.13.3 — the loop continues until 2.14.0 when envelopes get unified").
|
|
902
|
+
|
|
903
|
+
### Multi-CC commit boundaries
|
|
904
|
+
|
|
905
|
+
| Commit tag | Scope |
|
|
906
|
+
|---|---|
|
|
907
|
+
| v2.13.3 | 4 bug fixes (parser / publish pipeline / CLI warnings / handoff sha256) + 3 new scripts + 4 new test cases + package.json prepublishOnly + README publish note + CHANGELOG + version bump + ship-state memory |
|
|
908
|
+
|
|
909
|
+
### Verified (peaks solo dogfood + QA on this session)
|
|
910
|
+
|
|
911
|
+
- AC-1 (parser fix): `tests/unit/services/verdict/envelopes.test.ts` → **11/11 pass** (was 7/7 in v2.13.2, +4 markdown fallback cases H/I/J/K). Dogfood script confirms: real `audit/security.md` with HIGH violation → `parseSecurityEnvelope` returns non-null envelope; `peaks verdict aggregate` returns `reasons: [{severity: HIGH, file: src/auth.ts:42}]`.
|
|
912
|
+
- AC-2 (publish pipeline): `scripts/prepublish-build.sh` end-to-end via git-bash: `[prepublish-build] build OK — proceeding to publish` (exit 0). The `prepublishOnly` hook in `package.json` (line 47) is wired to `node scripts/prepublish-build.mjs`.
|
|
913
|
+
- AC-3 (CLI warnings): `tests/unit/cli/commands/request-commands.test.ts` → **8/8 pass** (was 5/5 in v2.13.2, +3 warnings-surface cases). Dogfood: `rd:qa-handoff` with `mut-report.json` deleted → response `data.warnings[0].code = 'mut-report-missing-deprecated-in-v2.14.0'` ✓.
|
|
914
|
+
- AC-4 (handoff sha256): `tests/unit/services/prd/handoff-auto-regen.test.ts` → **5/5 pass** (was 4/4 in v2.13.2, +1 prereq regression pin E). Dogfood: delete `prd/handoff.md` + re-transition → frontmatter contains both `sha256: <hex>` and `handoffHash: <hex>` (alias); subsequent transition no longer reports `missing section(s): sha256:`.
|
|
915
|
+
- AC-5 (零回归): 2.13.2 baseline 149 + 2.13.3 new 13 = **162/162 pass** on PRD-targeted scope. Full unit suite: **4363/4364 pass + 17 skipped** (1 pre-existing `tokenizer.test.ts` timeDecayScore flake confirmed on clean HEAD `1aac7e2` after stashing v2.13.3 changes; not introduced by v2.13.3).
|
|
916
|
+
- AC-6 (scope): 10 modified + 3 untracked (scripts). All in expected territory (src/ + tests/ + scripts/ + package.json prepublishOnly + README publish note). CHANGELOG / version.ts / ship-state memory: release territory, RD correctly excluded.
|
|
917
|
+
- `tsc --noEmit` → **0 errors**.
|
|
918
|
+
|
|
919
|
+
### Out-of-scope (NOT changed — Karpathy §3 surgical-change discipline)
|
|
920
|
+
|
|
921
|
+
- v2.12.0 audit envelope file format (YAML frontmatter + markdown body) — preserved (the contract that 2.13.3 now correctly parses)
|
|
922
|
+
- v2.13.1 `## Verdict reasoning (v2.13.1)` section in `micro-cycle.md` — preserved
|
|
923
|
+
- v2.13.2 commit `1aac7e2` — preserved (v2.13.3 adds on top)
|
|
924
|
+
- `peaks-qa` verdict protocol (`pass | return-to-rd | blocked`) — preserved
|
|
925
|
+
- `peaks-final-review` 4-dim interface — preserved
|
|
926
|
+
- 5 verdict strings — preserved
|
|
927
|
+
- `aggregateVerdict()` signature — preserved
|
|
928
|
+
- Envelope file contents (parsers updated; on-disk schemas unchanged)
|
|
929
|
+
- Weighted scoring / RFC voting — explicitly out of scope
|
|
930
|
+
|
|
931
|
+
### Known limitations (carry-forward to v2.14.0)
|
|
932
|
+
|
|
933
|
+
- **`scripts/prepublish-build.mjs` Windows EINVAL workaround is partial** — the `shell: isWindows` fix is a no-op on POSIX but on Windows native + git-bash there is still a residual `spawnSync` `EINVAL` / `ENOENT` interaction with `cmd.exe` / `pnpm.cmd` shims. The `.sh` path is git-bash / Linux correct (dogfood-verified end-to-end with `pnpm build OK` and exit 0); npm publish in a real Linux / CI environment uses the mjs path correctly. v2.14.0 should consider replacing the mjs spawn with a `cross-spawn` library or a pure-Node `child_process.execFile` fallback to fully abstract the platform differences.
|
|
934
|
+
- **MUT_REPORT hard-fail still pending** — v2.13.3 only surfaces the soft-block warning in CLI; the actual hard-fail conversion to throw-on-missing happens in v2.14.0.
|
|
935
|
+
- **pre-existing `tokenizer.test.ts` timeDecayScore flake** — confirmed pre-existing on clean HEAD `1aac7e2` after stashing v2.13.3 changes. Out of scope for this slice; documented in `.peaks/memory/2026-06-27-v2-13-2-verdict-aggregator-fixes.md`.
|
|
936
|
+
- **No 2.13.3 dogfood of `prepublish-build.ps1`** — the PowerShell variant was added per AC-2 cross-platform but not dogfood-verified end-to-end (git-bash tests the .sh path). A v2.14.0 follow-up should run the .ps1 path in Windows native to confirm parity.
|
|
937
|
+
|
|
938
|
+
---
|
|
939
|
+
|
|
940
|
+
## [2.13.2] — 2026-06-27 — Verdict aggregator bug fix + CLI surface + envelope unification
|
|
941
|
+
|
|
942
|
+
**PATCH bump from 2.13.1** (slice `2026-06-27-verdict-aggregator-fixes`, red-line scope 3 src files + 3 test files modified + 3 new src files + 4 new test files).
|
|
943
|
+
|
|
944
|
+
v2.13.1 shipped with a BLOCKER bug found via post-release dogfood: `aggregateVerdict()`'s `pushFix` used `${source}|${file}|${line}|${hint}` as the dedup key, which violated the `.peaks/project-scan/audit-output-schema.md:73` rule that identical `(file, line, hint)` tuples from different audits must be merged into a single entry. The v2.13.1 unit-test suite (13 cases) did not exercise the cross-source scenario, so the bug slipped through CI. v2.13.2 fixes the bug, surfaces the aggregator as a CLI subcommand, unifies envelope schemas behind a discriminated-union type, adds `prd/handoff.md` auto-regeneration on `prd:handed-off`, and introduces a 1-minor-release soft-block window for `MUT_REPORT` to ease the 2.13.1→2.14.0 transition.
|
|
945
|
+
|
|
946
|
+
### Bug fixes
|
|
947
|
+
|
|
948
|
+
- **`aggregateVerdict()` cross-source dedup** (AC-1) — `pushFix` key changed from `${source}|${file}|${line}|${hint}` to `${file}|${line}|${hint}` per audit-output-schema.md:73. `VerdictReason` gained a required `sources: ReadonlyArray<VerdictSource>` field that lists every source that reported the same `(file, line, hint)` tuple. Merging happens via a per-key `Map<key, VerdictReason>` that appends sources when a hit is found. Dogfood-verified: `aggregateVerdict({security: {verdict:'warn', violations:[{file:'a.ts', line:1, hint:'same', severity:'HIGH'}]}, perf: {verdict:'warn', violations:[{file:'a.ts', line:1, hint:'same', severity:'HIGH'}]}})` now returns `reasons.length === 1, sources === ['security-audit', 'perf-audit']`. 3 new test cases (I cross-source-dedup, J single-source-no-merge, K single-source-unique-no-merge) bring the aggregator test suite to 16/16.
|
|
949
|
+
|
|
950
|
+
### Features
|
|
951
|
+
|
|
952
|
+
- **`peaks verdict aggregate --from-rid <rid>`** (AC-2) — CLI surface for the aggregator. Reads 5 envelope files from `.peaks/_runtime/<sessionId>/`, calls `aggregateVerdict()`, and returns a JSON envelope `{ verdict, reasons, sources: { security|perf|karpathy|mut|qa: 'present'|'missing' } }`. Missing envelopes are reported as `missing` in the `sources` map (aggregator treats undefined as "not run" per v2.13.1 all-empty→'pass' 退化). 4-case test covers 5-inputs-present / 1-missing / all-missing / JSON-shape. CLI is 168 lines, ≤ 200 budget.
|
|
953
|
+
- **Envelope unification** (AC-3) — new `src/services/verdict/envelopes.ts` (200 lines) provides `AnyEnvelope` discriminated union + 5 parser funcs (`parseSecurityEnvelope` / `parsePerfEnvelope` / `parseKarpathyEnvelope` / `parseMutEnvelope` / `parseQaEnvelope`) + an `envelopesToAggregatorInput` adapter. Re-uses the existing `isSecurityAuditEnvelope` / `isPerfAuditEnvelope` strict-shape guards from `src/services/audit-independent/` — no schema duplication. `aggregateVerdict()` signature is **unchanged** (backward compatible); the parsers are additive. 7-case test covers 5 happy paths + 1 malformed rejection + 1 adapter. On-disk envelope files are **not modified** (schemas remain in-file self-describing).
|
|
954
|
+
- **`prd/handoff.md` auto-regeneration** (AC-4) — when `peaks request transition --role prd --state handed-off` succeeds and `prd/handoff.md` is missing, peaks-prd auto-writes the handoff capsule (`schemaVersion: 2` + `handoffHash: <sha256>`) before the transition is committed. If handoff already exists, it is **not** overwritten. The auto-regen fires **only** on `prd:handed-off`; 11 other transitions are untouched (Karpathy §3 surgical-change discipline). 4-case test includes a guard case for non-prd roles.
|
|
955
|
+
|
|
956
|
+
### Internal
|
|
957
|
+
|
|
958
|
+
- `src/services/verdict/verdict-aggregator.ts` (+79/-21 lines) — `pushFix` key fix + `VerdictReason.sources` field + `indexByKey: Map<string, VerdictReason>` for cross-source merge.
|
|
959
|
+
- `src/services/verdict/envelopes.ts` (NEW, 200 lines) — discriminated union + 5 parsers + adapter.
|
|
960
|
+
- `src/services/prd/handoff-auto-regen.ts` (NEW) — `autoRegenPrdHandoff()` helper; reuses `sha256OfBody` from existing handoff-service.
|
|
961
|
+
- `src/cli/commands/verdict-aggregate-command.ts` (NEW, 168 lines) — `peaks verdict aggregate` subcommand.
|
|
962
|
+
- `src/cli/commands/request-commands.ts` (+28 lines) — `prd:handed-off` auto-regen hook (1 branch, ≤ 30 lines).
|
|
963
|
+
- `src/cli/program.ts` (+3 lines) — `registerVerdictAggregateCommands()` registration.
|
|
964
|
+
- `src/services/artifacts/artifact-prerequisites.ts` (+39/-5 lines) — `MUT_REPORT.backCompat = true` flag + `PrerequisiteCheckResult.warnings: Warning[]` field + soft-block branch in `checkPrerequisites()`.
|
|
965
|
+
- `tests/unit/services/verdict/verdict-aggregator.test.ts` (+78 lines) — 3 new dedup cases (I/J/K) bringing total to 16.
|
|
966
|
+
- `tests/unit/services/verdict/envelopes.test.ts` (NEW, 7 cases).
|
|
967
|
+
- `tests/unit/cli/commands/verdict-aggregate-command.test.ts` (NEW, 4 cases).
|
|
968
|
+
- `tests/unit/services/prd/handoff-auto-regen.test.ts` (NEW, 4 cases).
|
|
969
|
+
- `tests/unit/artifact-prerequisites-v2-13-2-soft-block.test.ts` (NEW, 2 cases).
|
|
970
|
+
- `tests/unit/artifact-prerequisites.test.ts` (5 lines) + `tests/unit/artifact-prerequisites-typed.test.ts` (10 lines) + `tests/unit/artifact-prerequisites/mut-report-prereq.test.ts` (8 lines) — updated for soft-block behavior.
|
|
971
|
+
|
|
972
|
+
### Deprecations / soft-block windows
|
|
973
|
+
|
|
974
|
+
- **`MUT_REPORT` soft-block window (v2.13.2 → v2.14.0)** (AC-5) — mirroring the v2.12.0 audit 1-minor-release back-compat pattern, missing `mut-report.json` at `rd:qa-handoff` now produces a `warnings[]` entry with code `mut-report-missing-deprecated-in-v2.14.0` instead of throwing `PREREQUISITES_MISSING`. **`passed: false` still throws** (2.14.0 is the hard-fail target). Slices that explicitly run `peaks mut run` and get `passed: false` are still blocked; only the missing-file case is softened. v2.14.0 will convert the soft-block to hard-fail.
|
|
975
|
+
|
|
976
|
+
### Decision records
|
|
977
|
+
|
|
978
|
+
- NEW `.peaks/memory/2026-06-27-v2-13-2-verdict-aggregator-fixes.md` — ship state (149/149 PRD-targeted tests pass, 4355/4356 full suite pass with 1 pre-existing tokenizer flake, tsc 0 errors, 7 AC all green).
|
|
979
|
+
- UPDATED `.peaks/memory/2026-06-27-v2-13-1-verdict-aggregator.md` — v2.13.1 ship state amended with the dogfood finding that motivated v2.13.2 (this slice is the canonical example of why post-release dogfood matters: 13-case unit suite missed the cross-source scenario).
|
|
980
|
+
|
|
981
|
+
### Multi-CC commit boundaries
|
|
982
|
+
|
|
983
|
+
| Commit tag | Scope |
|
|
984
|
+
|---|---|
|
|
985
|
+
| v2.13.2 | `aggregateVerdict()` dedup bug fix + `peaks verdict aggregate` CLI + `envelopes.ts` unification + `prd/handoff.md` auto-regen + `MUT_REPORT` soft-block window + 4 new test files + 4 updated test files + CHANGELOG + version bump + ship-state memory |
|
|
986
|
+
|
|
987
|
+
### Verified (peaks solo dogfood + QA on this session)
|
|
988
|
+
|
|
989
|
+
- AC-1 (BLOCKER fix): `tests/unit/services/verdict/verdict-aggregator.test.ts` → **16/16 pass** (was 13/13 in v2.13.1, +3 cross-source cases). Dogfood script confirms: `reasons.length = 1, sources = ["security-audit","perf-audit"], verdict = warn`.
|
|
990
|
+
- AC-2 (CLI surface): `tests/unit/cli/commands/verdict-aggregate-command.test.ts` → **4/4 pass**. Real CLI: `peaks verdict aggregate --help` shows `--from-rid/--sid/--project/--json` options correctly.
|
|
991
|
+
- AC-3 (envelope unification): `tests/unit/services/verdict/envelopes.test.ts` → **7/7 pass** (5 parser happy paths + 1 malformed rejection + 1 adapter).
|
|
992
|
+
- AC-4 (handoff auto-regen): `tests/unit/services/prd/handoff-auto-regen.test.ts` → **4/4 pass** (3 happy paths + 1 non-prd-role guard).
|
|
993
|
+
- AC-5 (soft-block): `tests/unit/artifact-prerequisites-v2-13-2-soft-block.test.ts` → **2/2 pass** (missing→warning / passed:false→throw).
|
|
994
|
+
- AC-6 (零回归): 2.13.1 既有 90 测试 + 2.13.2 新 33 测试 = **149/149 pass** on PRD-targeted scope. Full unit suite: **4355/4356 pass + 17 skipped** (1 pre-existing `tokenizer.test.ts` flake confirmed on clean HEAD `571f92b` after stashing v2.13.2 changes; not introduced by v2.13.2).
|
|
995
|
+
- AC-7 (文档同步): RD correctly excluded CHANGELOG / package.json / src/shared/version.ts / README / ship-state memory from its diff. `git status` confirms only `src/` + `tests/` paths in the working tree.
|
|
996
|
+
- `tsc --noEmit` → **0 errors**.
|
|
997
|
+
|
|
998
|
+
### Out-of-scope (NOT changed — Karpathy §3 surgical-change discipline)
|
|
999
|
+
|
|
1000
|
+
- v2.12.0 audit envelope schemas (security / perf) — preserved
|
|
1001
|
+
- v2.13.1 `## Verdict reasoning (v2.13.1)` section in `micro-cycle.md` — preserved
|
|
1002
|
+
- `peaks-qa` verdict protocol (`pass | return-to-rd | blocked`) — preserved
|
|
1003
|
+
- `peaks-final-review` 4-dim interface — preserved
|
|
1004
|
+
- 5 verdict strings — preserved
|
|
1005
|
+
- 2.13.1 on-disk release (commit `571f92b`) — **not** reverted; this is a PATCH bump per the user's "2.13.1 我发完了" instruction
|
|
1006
|
+
- Envelope file contents (only TS types changed; in-file schemas are still self-describing)
|
|
1007
|
+
- Weighted scoring / RFC voting — explicitly out of scope
|
|
1008
|
+
|
|
1009
|
+
### Known limitations (carry-forward to v2.14.0)
|
|
1010
|
+
|
|
1011
|
+
- **`MUT_REPORT` hard-fail transition** — v2.14.0 must convert the soft-block to hard-fail (missing `mut-report.json` → throw). v2.13.2 ships a `backCompat: true` flag for graceful migration; the deprecation window is 1 minor release.
|
|
1012
|
+
- **`bin/peaks.js` references old dist/** — the smoke test of `peaks verdict aggregate --help` ran via `./node_modules/.bin/tsx ./bin/peaks.js` because the published `bin/peaks.js` points at a stale `dist/` build (Jun 13). v2.14.0 should ship a `pnpm run build` step before `npm publish` to refresh the dist.
|
|
1013
|
+
- **`prefs.fanout.defaultMode` migration** (out of v2.13.2 scope) — the 2.8.4 hard-constraint migration to `fan-out` (per `references/fanout-mandatory.md`) is still pending for projects that may have `serial` in their `.peaks/preferences.json`. v2.14.0 should add a runtime migration warning.
|
|
1014
|
+
- **CLI help-text for new commands** — `peaks verdict aggregate --help` is wired correctly; CLI list also shows it under the top-level `verdict` group. The CLI smoke test in this slice used tsx directly (not the published dist), so the published `bin/peaks.js` will not reflect the new command until the next `pnpm run build` + `npm publish` cycle.
|
|
1015
|
+
|
|
1016
|
+
---
|
|
1017
|
+
|
|
1018
|
+
## [2.13.1] — 2026-06-27 — Verdict reasoning layer (multi-signal convergence for peaks-solo)
|
|
1019
|
+
|
|
1020
|
+
**PATCH bump from 2.13.0** (slice `2026-06-27-verdict-aggregator`, red-line scope 3 source files + 4 new test files + 2 updated test files).
|
|
1021
|
+
|
|
1022
|
+
peaks-solo previously received 5 heterogeneous signals (security-audit, perf-audit, karpathy-reviewer, peaks-mut, peaks-qa) but had no convergence layer. The v2.12.0 audit-output schema documented 4 aggregation rules (`.peaks/project-scan/audit-output-schema.md:66-78`) but they were never implemented; the `mut-report.json` was consumed by peaks-qa internally with `loadMutReport() === null → gate=skipped` (soft consumption), and `micro-cycle.md` had no verdict-reasoning surface. v2.13.1 fills the gap without unifying envelope schemas (deferred to v2.14) and without changing any verdict string.
|
|
1023
|
+
|
|
1024
|
+
### Features
|
|
1025
|
+
|
|
1026
|
+
- **`aggregateVerdict()` service** (AC-2) — new `src/services/verdict/verdict-aggregator.ts` (223 lines, < 250 cap). Pure function (no I/O, no clock, no fs). Accepts 5 envelope inputs (`security` / `perf` / `karpathy` / `mut` / `qa`) and returns `{ verdict, reasons[] }`. Hard precedence: `block > return-to-rd > warn > pass`. Implements all 4 audit-output-schema rules: verdict precedence, CRITICAL count accumulation, `(file, line, hint)` dedup via `Set<string>` keyed on `${source}|${file}|${line}|${hint}`, handoff hash consistency (handled upstream by audit skills). All-empty input → `verdict: 'pass'` 退化 (no spurious block on missing signals). 13 test cases (8 AC-2 behaviors A-H + 5 precedence/regression cases).
|
|
1027
|
+
- **`MUT_REPORT` prerequisite** (AC-1) — `mut-report.json` now blocks `peaks request transition --role rd --state qa-handoff` for `feat` / `bugfix` / `refactor` (REFACTOR inherits via FEATURE_TABLE reference) when missing or `passed: false`. `config` / `docs` / `chore` remain exempt. `mustContainAny: ['"passed": true', '"passed":true']` admits `passed:true` and rejects `passed:false`. `peaks-qa` internal `loadMutReport() === null → gate=skipped` path is preserved (back-compat). 4-case test pins all 4 paths.
|
|
1028
|
+
- **`## Verdict reasoning` section in `micro-cycle.md`** (AC-3) — the 6-step RD↔QA repair loop now has a verdict-reasoning section that (a) shows a re-run output JSON example with `re-run reason: { source, signal, severity, file, line, hint }` payload, (b) provides a 4-row decision table mapping verdict → repair-loop action (`return-to-rd` → re-run RD, `block` → blocked TXT, `warn` → re-run with reasons, `pass` → exit loop), (c) gives a 4-step runbook integration. The 6-step cycle body is byte-stable (only the new section is added). 4-case test pins the section existence + 3 behavior cases.
|
|
1029
|
+
|
|
1030
|
+
### Internal
|
|
1031
|
+
|
|
1032
|
+
- `src/services/verdict/verdict-aggregator.ts` (NEW, 223 lines) — pure `aggregateVerdict()` + locally-defined `KarpathyEnvelope` / `MutEnvelope` / `QaEnvelope` types (surgeon scope; v2.14 will move them to shared if a unification pass lands).
|
|
1033
|
+
- `src/services/artifacts/artifact-prerequisites.ts` — added `MUT_REPORT` constant (32 lines) + wired into `FEATURE_TABLE['rd:qa-handoff']` (line 276) and `BUGFIX_TABLE['rd:qa-handoff']` (line 303); `REFACTOR_TABLE` inherits via reference (line 312); `MINIMAL_TABLE` / `CONFIG_TABLE` exempt.
|
|
1034
|
+
- `skills/peaks-solo/references/micro-cycle.md` — added `## Verdict reasoning (v2.13.1)` section (91 lines) after the unchanged repair-cycle cap rule.
|
|
1035
|
+
- `tests/unit/artifact-prerequisites/mut-report-prereq.test.ts` (NEW, 4 cases).
|
|
1036
|
+
- `tests/unit/services/verdict/verdict-aggregator.test.ts` (NEW, 13 cases).
|
|
1037
|
+
- `tests/unit/skills/solo/micro-cycle-verdict-reasoning.test.ts` (NEW, 4 cases).
|
|
1038
|
+
- `tests/unit/artifact-prerequisites.test.ts` (UPDATED, +25 lines) — seeded `mut-report.json` in 3 pass-path tests; added to negative-path missing-list.
|
|
1039
|
+
- `tests/unit/artifact-prerequisites-typed.test.ts` (UPDATED, +20 lines) — same across bugfix + feature + refactor.
|
|
1040
|
+
|
|
1041
|
+
### Decision records
|
|
1042
|
+
|
|
1043
|
+
- NEW `.peaks/memory/2026-06-27-v2-13-1-verdict-aggregator.md` — ship state (90/90 tests pass, tsc 0 errors, 5 AC all green).
|
|
1044
|
+
|
|
1045
|
+
### Multi-CC commit boundaries
|
|
1046
|
+
|
|
1047
|
+
| Commit tag | Scope |
|
|
1048
|
+
|---|---|
|
|
1049
|
+
| v2.13.1 | MUT_REPORT prereq + `aggregateVerdict()` service + `## Verdict reasoning` section + 4 new test files + 2 updated test files + CHANGELOG + version bump + ship-state memory |
|
|
1050
|
+
|
|
1051
|
+
### Verified (peaks solo dogfood on this session)
|
|
1052
|
+
|
|
1053
|
+
- AC-1 (MUT_REPORT prereq): `tests/unit/artifact-prerequisites/mut-report-prereq.test.ts` → 4/4 pass; `tests/unit/artifact-prerequisites.test.ts` → 9/9 pass; `tests/unit/artifact-prerequisites-typed.test.ts` → 19/19 pass.
|
|
1054
|
+
- AC-2 (verdict-aggregator): `tests/unit/services/verdict/verdict-aggregator.test.ts` → 13/13 pass; 8 AC-2 behaviors (A all-pass, B security-block, C mut-block, D qa-return-to-rd, E mixed-warn, F all-empty, G precedence block-dominant, H CRITICAL accumulation) all asserted.
|
|
1055
|
+
- AC-3 (micro-cycle reasoning): `tests/unit/skills/solo/micro-cycle-verdict-reasoning.test.ts` → 4/4 pass; 6-step cycle body byte-stable.
|
|
1056
|
+
- AC-4 (零回归): `tests/unit/parallel-fan-out.test.ts` → 18/18 pass (v2.12.0 stability pin); `tests/unit/rd/karpathy-skip-on-config-docs-chore.test.ts` → 11/11 pass; `tests/unit/rd/deprecated-reviewer-back-compat.test.ts` → 12/12 pass.
|
|
1057
|
+
- Total: 8 test files, **90/90** tests pass, duration 1.27s.
|
|
1058
|
+
- `./node_modules/.bin/tsc --noEmit` → 0 errors.
|
|
1059
|
+
|
|
1060
|
+
### Out-of-scope (NOT changed)
|
|
1061
|
+
|
|
1062
|
+
- v2.12.0 audit envelope schemas (`SecurityAuditEnvelope`, `PerfAuditEnvelope`) — preserved
|
|
1063
|
+
- `peaks-qa` verdict protocol (`pass | return-to-rd | blocked`) — preserved
|
|
1064
|
+
- `peaks-final-review` 4-dim interface (functional-completeness / problem-resolution / no-new-bugs / existing-functionality-intact) — preserved
|
|
1065
|
+
- `peaks-rd` SKILL.md main body — preserved
|
|
1066
|
+
- Envelope schema unification — deferred to v2.14
|
|
1067
|
+
- Weighted scoring / RFC voting — explicitly out of scope
|
|
1068
|
+
- CLI subcommand for `aggregateVerdict()` (only consumed by unit tests + micro-cycle reference in v2.13.1) — deferred to v2.14
|
|
1069
|
+
|
|
1070
|
+
### Known limitations (carry-forward to v2.14)
|
|
1071
|
+
|
|
1072
|
+
- **No CLI surface for `aggregateVerdict()`** — the aggregator is consumed by unit tests and referenced in `micro-cycle.md` as the re-run reason payload source, but no CLI subcommand exposes it directly. v2.14 should add `peaks verdict aggregate --from-rid <rid>` that reads all 5 envelope artifacts and prints the aggregated verdict + reasons.
|
|
1073
|
+
- **Envelope schema heterogeneity persists** — the 5 envelopes still have 3 distinct shapes (`{verdict, violations, summary}` for security/perf, `{passed, violations, gateAction}` for karpathy, `{verdict}` for qa, `{passed, killRate, weakRate, violations}` for mut). v2.13.1 ships precedence aggregation; v2.14 should add a `services/verdict/envelopes.ts` shared module with discriminated-union type and parser funcs.
|
|
1074
|
+
- **`prd/handoff.md` is not auto-regenerated by v2.13.1** — the AUDIT_REQUIRES_HANDOFF prereq still requires an existing handoff capsule; v2.13.1 does not change this. v2.14 should consider making peaks-prd write the handoff on every `prd:handed-off` transition.
|
|
1075
|
+
|
|
1076
|
+
---
|
|
1077
|
+
|
|
1078
|
+
## [2.13.0] — 2026-06-27 — Zero-human-intervention auto-compact (peaks-cli drives context compression on any AI CLI)
|
|
1079
|
+
|
|
1080
|
+
**MINOR bump from 2.12.0** (slice `v2-13-0-auto-compact-protocol`, 5-sub-task plan AC-1..AC-5, red-line scope ~6 source files + 2 IDE adapter fields).
|
|
1081
|
+
|
|
1082
|
+
peaks-solo now autonomously drives context compaction so the LLM-runner stays alive with context < 95% on **any AI CLI**, with **zero human / zero LLM intervention**. Two-tier threshold model:
|
|
1083
|
+
|
|
1084
|
+
- **85% pre-compact zone** — peaks-cli writes a pre-compact checkpoint + convergence plan + auto-decisions log + IDE-side compact dispatch (async-friendly).
|
|
1085
|
+
- **95% RED LINE** — peaks-cli refuses sub-agent dispatch and forces synchronous IDE compact; mandatory, LLM cannot opt out.
|
|
1086
|
+
|
|
1087
|
+
Adapter-driven protocol (no hard-coded IDE names): `IdeAdapter.compact?: IdeCompactProfile` is a 4-field per-IDE profile (`envVarForContextPercent` + `compactCommand` + `compactPathway` + `postCompactDetectCommand`). Claude Code is the MVP fill; trae / codex / cursor / qoder / tongyi-lingma / hermes / openclaw ship without `compact` and fall through to the conservative-zero probe (no auto-fire on missing signal).
|
|
1088
|
+
|
|
1089
|
+
### Features
|
|
1090
|
+
|
|
1091
|
+
- **`peaks solo context-now`** (AC-1) — auto-probes the active IDE adapter's context-fill % without requiring the LLM to pass `--prompt-size <bytes>` manually. Adapter-driven: reads `IdeAdapter.compact.envVarForContextPercent` (Claude Code MVP: `CLAUDE_CONTEXT_USAGE_PERCENT`). Returns a verdict (`ok` / `soft-warn` / `pre-compact` / `red-line`) plus source-tagged probe (`claude-code-env` / `statusline-poll` / `conservative-fallback`). When no IDE-specific signal is available, returns `ratio: 0` with `source: 'conservative-fallback'` so the orchestrator never auto-fires on a missing signal.
|
|
1092
|
+
- **`peaks solo auto-compact`** (AC-4) — 0-intervention loop. Honors D6.e in-flight-batch deferral for the pre-compact zone; forces synchronous dispatch at red-line. `--force` and `--bypass-red-line` are test seams (never `true` in production).
|
|
1093
|
+
- **Convergence toolkit** (AC-2) — `src/services/solo/auto-compact-orchestrator.ts` `evaluateCompactTrigger` (pure) + `runAutoCompact` (side effects: `writePreCompactCheckpoint` + `appendAutoDecisionLog` + `dispatchIdeCompact`). Checkpoints land at `.peaks/_runtime/<sessionId>/checkpoints/{pre-compact,red-line}-<ISO>.json`; the LLM-readable decision log lands at `.peaks/_runtime/<sessionId>/txt/auto-decisions.md` so D7's post-compact-detect picks it up unchanged.
|
|
1094
|
+
- **IDE-aware compact dispatcher** (AC-3) — `src/services/context/auto-compact-dispatcher.ts` reads `IdeAdapter.compact` and dispatches via the adapter-declared pathway. `shell-exec` (Claude Code MVP) spawns the compact command via `child_process.spawn`. `ide-native` is reserved for a future slice. `llm-self-compress` returns success + instructs the LLM to summarize on next turn. `noop` returns explicit failure for legacy adapters.
|
|
1095
|
+
|
|
1096
|
+
### Internal
|
|
1097
|
+
|
|
1098
|
+
- `src/services/context/auto-compact-types.ts` (NEW) — types + 3 constants: `AUTO_COMPACT_SOFT_WARN_RATIO = 0.5`, `AUTO_COMPACT_PRE_COMPACT_RATIO = 0.85`, `AUTO_COMPACT_RED_LINE_RATIO = 0.95`.
|
|
1099
|
+
- `src/services/context/auto-compact-reader.ts` (NEW) — `readContextPercent` (AC-1 probe).
|
|
1100
|
+
- `src/services/context/auto-compact-dispatcher.ts` (NEW) — `dispatchIdeCompact` (AC-3 IDE dispatch).
|
|
1101
|
+
- `src/services/solo/auto-compact-orchestrator.ts` (NEW) — `evaluateCompactTrigger` + `runAutoCompact` (AC-2 + AC-4 core).
|
|
1102
|
+
- `src/services/ide/ide-types.ts` — `IdeAdapter.compact?: IdeCompactProfile` + `IdeCompactProfile` interface.
|
|
1103
|
+
- `src/services/ide/adapters/claude-code-adapter.ts` — MVP `compact` profile: `CLAUDE_CONTEXT_USAGE_PERCENT` + `claude --compact` + `shell-exec`.
|
|
1104
|
+
- `src/cli/commands/solo-commands.ts` — `peaks solo context-now` + `peaks solo auto-compact` subcommands.
|
|
1105
|
+
- `package.json` + `src/shared/version.ts` — `2.12.0 → 2.13.0`.
|
|
1106
|
+
|
|
1107
|
+
### Decision records
|
|
1108
|
+
|
|
1109
|
+
- NEW `.peaks/memory/2026-06-27-auto-compact-design.md` — full design rationale + two-tier threshold + adapter-driven protocol + open follow-ups (L2-dogfood per-IDE profiles, `ide-native` pathway, statusline integration, hook-based prompt injection).
|
|
1110
|
+
|
|
1111
|
+
### Multi-CC commit boundaries
|
|
1112
|
+
|
|
1113
|
+
| Commit tag | Scope |
|
|
1114
|
+
|---|---|
|
|
1115
|
+
| v2.13.0-alpha.1 (`edffc33`) | Two-tier threshold + auto-compact types + reader + dispatcher + orchestrator + Claude Code MVP adapter + `peaks solo context-now` + `peaks solo auto-compact` CLI |
|
|
1116
|
+
| `a8b9804` | In-session dogfood limitation documented (current ad-hoc Claude Code session cannot be externally compacted — reserved for follow-up PreToolUse-hook slice) |
|
|
1117
|
+
|
|
1118
|
+
### Verified (peaks solo dogfood on this session)
|
|
1119
|
+
|
|
1120
|
+
- `context-now` boundary tests: `0.30 = ok` / `0.50 = soft-warn` / `0.84 = soft-warn` / `0.85 = pre-compact` / `0.949 = pre-compact` / `0.95 = red-line` / `1.0 = red-line` ✓
|
|
1121
|
+
- `auto-compact @ 1.0` (red-line): dispatched (shell-exec ok), `red-line` checkpoint written at `.peaks/_runtime/<sessionId>/checkpoints/red-line-<ISO>.json`, convergence plan + auto-decisions.md appended, `redLineGated: true` ✓
|
|
1122
|
+
- `auto-compact @ 0.87 + --in-flight-batch`: `decision: in-flight-batch`, no checkpoint write (D6.e honored) ✓
|
|
1123
|
+
- `auto-compact @ 0.85`: pre-compact dispatched (shell-exec ok), pre-compact checkpoint + convergence plan + auto-decisions.md written ✓
|
|
1124
|
+
- `post-compact-detect` after pre-compact: `shouldAutoResume: true`, `reason: post-compact-match` ✓
|
|
1125
|
+
- Trae IDE (no `compact` profile): `ratio: 0` + `source: conservative-fallback` + `below-threshold` (no auto-fire on missing signal — by design) ✓
|
|
1126
|
+
- `pnpm tsc --noEmit`: clean
|
|
1127
|
+
- `pnpm vitest run` (full suite): `4317 / 4317` pass + 17 skipped (2 pre-existing baseline failures on session-checkpoint + _archive-removal-guard unchanged)
|
|
1128
|
+
|
|
1129
|
+
### Out-of-scope (NOT changed)
|
|
1130
|
+
|
|
1131
|
+
- `src/services/code-review/ecc-bridge.ts` + `src/services/dispatch/sub-agent-dispatcher.ts` + `src/services/agent/ecc-agent-service.ts` + `src/services/prd/handoff-service.ts` + `project-scan-reader.ts` + `src/services/rd/{strategic,tactical,strategy,impl,ast-gate,types}.ts` + `peaks-qa/` + `peaks-solo/SKILL.md` main flow + `peaks-prd/SKILL.md` main body — all untouched per the v2.13.0 red-line scope.
|
|
1132
|
+
|
|
1133
|
+
### Known limitations (carry-forward to v2.13.1)
|
|
1134
|
+
|
|
1135
|
+
- **Ad-hoc Claude Code runner cannot be externally compacted.** The v2.13.0-alpha.1 shell-exec pathway spawns the IDE's compact command via `child_process.spawn` — a separate child process. The current Claude Code runner that invoked `auto-compact` is unaffected; its own context window stays at 100% until that runner's own compact logic kicks in (Claude Code's own auto-compact or a user-issued `/compact` slash command). Follow-up slice: register a PreToolUse hook via `peaks hooks install` that intercepts the next Bash call and writes a stderr hint when ratio ≥ 0.95 — fills the already-reserved `ide-native` compact pathway.
|
|
1136
|
+
- **`peaks-solo` Step N+2 prose update** — `skills/peaks-solo/SKILL.md` should mention `peaks solo context-now` + `auto-compact` so LLM sessions invoke the autonomous loop instead of `--prompt-size` hand-passing.
|
|
1137
|
+
|
|
1138
|
+
---
|
|
1139
|
+
|
|
1140
|
+
## [2.12.0] — 2026-06-27 — Independent security + perf audit skills (RD fan-out collapse 5→3)
|
|
1141
|
+
|
|
1142
|
+
**MINOR bump from 2.11.2** (slice `v2-12-independent-security-perf-audit`, 9-tier plan, multi-CC Group A→E, red-line scope ~40-45 files).
|
|
1143
|
+
|
|
1144
|
+
peaks-rd's parallel review fan-out collapsed from **5 sub-agents** to **3 sub-agents** by moving `security-reviewer` + `perf-baseline-reviewer` out of the fan-out into two new standalone audit skills (`peaks-security-audit` + `peaks-perf-audit`). The two removed slots are exposed as `RD_DEPRECATED_REVIEWERS` for the 1-minor-release back-compat window (v2.13.0 hard-deletes the legacy paths).
|
|
1145
|
+
|
|
1146
|
+
### Features
|
|
1147
|
+
|
|
1148
|
+
- **`peaks-security-audit` skill** (Group A — Tier 2) — standalone security audit skill. CLI: `peaks security-audit run`. Consumes the immutable peaks-prd handoff (`prd/handoff.md`) + the project-scoped audit template `.peaks/project-scan/security-template.md`. Writes `.peaks/_runtime/<sessionId>/audit/security.md`. Returns 3-state verdict (`pass` / `mitigated` / `blocked`). 6 unit-test cases.
|
|
1149
|
+
- **`peaks-perf-audit` skill** (Group A — Tier 3) — standalone perf audit skill. CLI: `peaks perf-audit run`. Consumes the immutable handoff + `.peaks/project-scan/perf-template.md`. Writes `.peaks/_runtime/<sessionId>/audit/perf.md`. 6 unit-test cases.
|
|
1150
|
+
- **Audit template files** (Group A — Tier 1, NEW) — `.peaks/project-scan/security-template.md` (4,285 bytes) + `.peaks/project-scan/perf-template.md` (4,337 bytes) + `.peaks/project-scan/audit-output-schema.md` (4,410 bytes). Git-tracked source of truth for the audit skill output shape.
|
|
1151
|
+
- **RD fan-out collapse** (Group B — Tier 4) — `src/services/rd/reviewer-dispatch-policy.ts` `RD_FANOUT_REVIEWERS` is now a 3-element tuple (`code-reviewer` + `qa-test-cases-writer` + `karpathy-reviewer`). The 2 removed slots are exposed as `RD_DEPRECATED_REVIEWERS`; `isDeprecatedReviewer(name)` routes any legacy dispatch record to the new audit skill. 8 back-compat test cases.
|
|
1152
|
+
- **Artifact prereq migration** (Group B — Tier 5) — `src/services/artifacts/artifact-prerequisites.ts` replaces `SECURITY_REVIEW` + `PERF_BASELINE` prereqs with `AUDIT_SECURITY` + `AUDIT_PERF` + `AUDIT_REQUIRES_HANDOFF`. The new prereqs mechanically gate `peaks request transition --state qa-handoff` until the audit outputs are written and the handoff frontmatter (sha256 + schemaVersion: 2) is verified.
|
|
1153
|
+
- **peaks-txt sediment extension** (Group C — Tier 6) — `src/services/prd/project-scan-sediment.ts` adds 3 new public functions (`appendSecurityPattern` + `appendPerfPattern` + `appendAuditSchemaVariant`) wrapping a generic internal helper. Append-only inventory operations idempotent on `(value, sourceRid)`. 7 new test cases.
|
|
1154
|
+
- **Fan-out SKILL.md updates** (Group D — Tier 7) — `skills/peaks-rd/SKILL.md` + `skills/peaks-rd/references/parallel-review-fanout.md` + `skills/peaks-rd/references/rd-fanout-contracts.md` + NEW `skills/peaks-rd/references/v2-12-fanout-collapse.md` reflect the v2.12.0 3-way fan-out shape. SKILL.md stays under the 24K byte cap.
|
|
1155
|
+
|
|
1156
|
+
### Back-compat window (v2.12.0 → v2.13.0)
|
|
1157
|
+
|
|
1158
|
+
The 1-minor-release window keeps the legacy paths readable via `mustContainAny`:
|
|
1159
|
+
|
|
1160
|
+
- Legacy `rd/security-review.md` → accepted via `AUDIT_SECURITY.mustContainAny`.
|
|
1161
|
+
- Legacy `rd/perf-baseline.md` → accepted via `AUDIT_PERF.mustContainAny`.
|
|
1162
|
+
- Legacy `RD_FANOUT_REVIEWERS`-slot dispatch records (`.peaks/_sub_agents/<sessionId>/dispatch/{security-reviewer,perf-baseline-reviewer}.json`) → routed via `isDeprecatedReviewer(name)` to the new audit skill.
|
|
1163
|
+
|
|
1164
|
+
v2.13.0 hard-deletes the legacy paths.
|
|
1165
|
+
|
|
1166
|
+
### Decision records
|
|
1167
|
+
|
|
1168
|
+
- NEW `.peaks/memory/2026-06-27-v2-12-independent-security-perf-audit.md` — parent decision (v2.12.0 collapse architecture + multi-CC Group A→E split).
|
|
1169
|
+
- NEW `.peaks/memory/2026-06-27-v2-12-fanout-3way.md` — fan-out shape decision (3-element tuple, pinned by 8 tests across 4 files).
|
|
1170
|
+
- APPEND `.peaks/project-scan/business-knowledge.md` — `D2'` row (3-way fan-out) + `G1'` row (peaks-txt sediment extension).
|
|
1171
|
+
- APPEND `.peaks/memory/security-perf-plan-result-split.md` — "Reverse 2026-06-27" section (how the v2.12.0 collapse reverses the slice-025 plan/result split).
|
|
1172
|
+
|
|
1173
|
+
### Internal
|
|
1174
|
+
|
|
1175
|
+
- `src/services/rd/reviewer-dispatch-policy.ts` — `RD_FANOUT_REVIEWERS` (3-element) + `RD_DEPRECATED_REVIEWERS` (2-element back-compat) + `isDeprecatedReviewer(name)`.
|
|
1176
|
+
- `src/services/artifacts/artifact-prerequisites.ts` — `AUDIT_SECURITY` + `AUDIT_PERF` + `AUDIT_REQUIRES_HANDOFF` prereqs (with `mustContainAny` for back-compat).
|
|
1177
|
+
- `src/services/prd/project-scan-sediment.ts` — `appendSecurityPattern` + `appendPerfPattern` + `appendAuditSchemaVariant` + generic `appendAuditPatternInventory` helper.
|
|
1178
|
+
- `src/services/audit-independent/{security-audit-service,perf-audit-service}.ts` — new service layer.
|
|
1179
|
+
- `src/cli/commands/{security-audit-commands,perf-audit-commands}.ts` — new CLI subcommands wired into `program.ts`.
|
|
1180
|
+
- `package.json` + `src/shared/version.ts` — `2.11.2 → 2.12.0` version bump.
|
|
1181
|
+
|
|
1182
|
+
### Multi-CC commit boundaries
|
|
1183
|
+
|
|
1184
|
+
| Group | Tiers | Commit tag | Scope |
|
|
1185
|
+
|---|---|---|---|
|
|
1186
|
+
| A | 1+2+3 | v2.12.0-alpha.1 | Templates + new skills (fa082f5) |
|
|
1187
|
+
| B | 4+5 | v2.12.0-alpha.2 | 5→3 fanout collapse + prereq migration (6485f1c) |
|
|
1188
|
+
| C | 6 | v2.12.0-alpha.3 | peaks-txt sediment extension (ab2757b) |
|
|
1189
|
+
| D | 7 | v2.12.0-alpha.4 | fan-out SKILL.md updates (b6c4fae) |
|
|
1190
|
+
| E | 8+9 | v2.12.0 (release) | Decision records + migration + CHANGELOG + version bump (this commit) |
|
|
1191
|
+
|
|
1192
|
+
### Zero regression (verified per group)
|
|
1193
|
+
|
|
1194
|
+
Each Group A→D ran the full RD→QA loop independently. Group C final QA: 14/14 sediment tests pass + 39/39 prd service tests pass; 9 pre-existing baseline failures unchanged (doctor / _archive-removal-guard / request-commands / observability / session-checkpoint / tech-service / workflow-autonomous-resume / jsonl-store / 35-checks-aggregate — all unrelated to v2.12.0). Group D final QA: 35/35 fan-out SKILL.md contract tests pass; same 9 pre-existing baseline failures.
|
|
1195
|
+
|
|
1196
|
+
### Out-of-scope (NOT changed)
|
|
1197
|
+
|
|
1198
|
+
`src/services/code-review/ecc-bridge.ts` + `src/services/dispatch/sub-agent-dispatcher.ts` + `src/services/agent/ecc-agent-service.ts` + `src/services/prd/handoff-service.ts` + `project-scan-reader.ts` + `src/services/rd/{strategic,tactical,strategy,impl,ast-gate,types}.ts` + `peaks-qa/` + `peaks-solo/SKILL.md` main flow + `peaks-prd/SKILL.md` main body — all untouched per the v2.12.0 red-line scope.
|
|
1199
|
+
|
|
1200
|
+
---
|
|
1201
|
+
|
|
1202
|
+
## [2.11.2] — 2026-06-26 — Slice topology observability (read-only supplement to v2.11.0)
|
|
1203
|
+
|
|
1204
|
+
**PATCH bump from 2.11.0** (slice `v2-11-2-slice-topology-observability`, 5-slice plan A→E, red-line scope ~18 files).
|
|
1205
|
+
|
|
1206
|
+
Read-only observability layer on top of the v2.11.0 slice topology + 10/90 paradigm. New `peaks observability <subcommand>` family for querying slice success rate, fanout cost, repair-cycle count, and D5/D6/D7 auto-proceed events. Persists metrics locally at `.peaks/_runtime/<sessionId>/metrics/slices.jsonl` (append-only JSONL, mtime-pruned to 10 sessions). No new dependencies. No changes to v2.11.0 ship behavior.
|
|
1207
|
+
|
|
1208
|
+
### Features
|
|
1209
|
+
|
|
1210
|
+
- **`peaks observability status`** (AC-1) — aggregate metrics for active session: total slices, success count, fail count, fanout cost total, repair-cycle peak.
|
|
1211
|
+
- **`peaks observability slices`** (AC-2) — per-slice list with rid, state, fanout count, repair-cycle count, duration (ms).
|
|
1212
|
+
- **`peaks observability fanout`** (AC-3) — fanout cost breakdown per sub-agent role (rd / qa / code-reviewer / security-reviewer / karpathy-reviewer).
|
|
1213
|
+
- **`peaks observability repair-cycles`** (AC-4) — RD→QA repair-cycle count per slice; cap = 3 (peaks-solo repair-loop contract); capHit flag.
|
|
1214
|
+
- **`peaks observability report --period day|week|month`** (AC-5) — markdown summary (header + status + slice table + fanout table + repair-cycle table + top-5 slowest) suitable for paste into PR descriptions or `.peaks/PROJECT.md` timeline entries.
|
|
1215
|
+
- **JSONL persistence** (AC-6) — append-only `.peaks/_runtime/<sessionId>/metrics/slices.jsonl`; zod schema v1; cross-session prune to last 10 session files by mtime.
|
|
1216
|
+
- **Hook integration** (AC-7) — metrics emitted from 7 sites: `peaks request transition` (Slice A), `peaks sub-agent dispatch`, `peaks session checkpoint`, D5 mode-gate, D6 context-trigger, D7 post-compact, `peaks request transition` RD→QA prereq (Slice C). All emits fire-and-forget per PRD Q4 (full-auto must never fail-loud).
|
|
1217
|
+
- **Zero regression** (AC-8) — `npm run build` clean + vitest passes; 6 doctor.test.ts / 35-checks-aggregate failures are pre-existing on main (verified via `git stash`); 0 new regressions from this slice.
|
|
1218
|
+
- **Coverage** (AC-9) — observability source files have 100% public-function coverage (jsonl-store, observability-service, aggregation, report-formatter); vitest `--coverage` blocked by pre-existing pnpm `@ampproject/remapping` resolution issue (unrelated to this slice).
|
|
1219
|
+
- **peaks-txt handoff integration** (AC-10) — handoff capsule includes 1-line observability summary via `peaks observability status`.
|
|
1220
|
+
|
|
1221
|
+
### Internal
|
|
1222
|
+
|
|
1223
|
+
- New: `src/services/observability/jsonl-store.ts` (133 LoC) — pure I/O, mtime prune.
|
|
1224
|
+
- New: `src/services/observability/observability-service.ts` (139 LoC) — zod schema v1 + `emitObservabilityEvent`.
|
|
1225
|
+
- New: `src/services/observability/aggregation.ts` (207 LoC) — `aggregateStatus` / `aggregateSlices` / `aggregateFanout` / `aggregateRepairCycles` / period rollup helpers.
|
|
1226
|
+
- New: `src/services/observability/report-formatter.ts` (135 LoC) — markdown renderer (pure).
|
|
1227
|
+
- New: `src/cli/commands/observability-commands.ts` (250+ LoC) — 5 subcommands via commander.
|
|
1228
|
+
- Modified: `src/services/artifacts/request-artifact-service.ts` (hook #1/7).
|
|
1229
|
+
- Modified: `src/cli/commands/dispatch-commands.ts` (hook #2/7).
|
|
1230
|
+
- Modified: `src/services/session/session-checkpoint-service.ts` (hook #3/7).
|
|
1231
|
+
- Modified: `src/cli/commands/solo-commands.ts` (hook #4/7).
|
|
1232
|
+
- Modified: `src/cli/commands/context-commands.ts` (hook #5/7).
|
|
1233
|
+
- Modified: `src/services/solo/post-compact-detector.ts` (hook #6/7).
|
|
1234
|
+
- Modified: `src/services/artifacts/artifact-prerequisites.ts` (hook #7/7).
|
|
1235
|
+
- Modified: `src/cli/program.ts` (+1 line: registerObservabilityCommands).
|
|
1236
|
+
- Modified: `src/shared/version.ts` (CLI_VERSION 2.11.0 → 2.11.1).
|
|
1237
|
+
- Tests: `tests/unit/services/observability/*.test.ts` (5 files, 78 cases) + `tests/unit/cli/observability-commands.test.ts` (8 cases). 0 regressions.
|
|
1238
|
+
|
|
1239
|
+
---
|
|
1240
|
+
|
|
1241
|
+
## [2.11.0] — 2026-06-26 — Remove rd/tech-doc.md + immutable peaks-prd handoff + ECC code-review + runtime friction
|
|
1242
|
+
|
|
1243
|
+
**MINOR bump from 2.10.0** (slice `v2-11-rm-rd-techdoc-immutable-handoff`, 6 multi-CC groups A-F, plan at `.peaks/memory/2026-06-26-v2-11-rm-rd-techdoc-immutable-handoff.md`).
|
|
1244
|
+
|
|
1245
|
+
Implements the "metering is value" + "10/90 paradigm" alignment: peaks-prd produces a single immutable handoff that all downstream consumers share; peaks-rd's parallel audit fan-out (now 5-way with ECC code-review + karpathy-reviewer hard gate) owns security/perf review; peaks-qa is trimmed to business-test-only; peaks-txt sediments business knowledge; peaks-solo removes runtime friction (auto-proceed, context monitor, post-compact resume).
|
|
1246
|
+
|
|
1247
|
+
### Features
|
|
1248
|
+
|
|
1249
|
+
- **Tier 1+2 (Group A — `2be2842`)** — remove `rd/tech-doc.md` enforcers; replace with immutable peaks-prd handoff references (`skills/peaks-rd/references/parallel-review-fanout.md`, `rd-fanout-contracts.md`, `rd-sub-agent-dispatch.md`, `writing-handoff-frontmatter.md`, `artifact-per-request.md`; `src/services/audit/enforcers/lint-workflow-shape.ts`, `red-line-catalog.ts`, `red-lines-service.ts`; `src/services/artifacts/artifact-prerequisites.ts`, `request-artifact-service.ts`).
|
|
1250
|
+
- **Tier 3+4 (Group B — `3f832f0`)** — `peaks prd handoff init|verify|show` (sha256-locked frontmatter, schemaVersion: 2); `peaks project knowledge` CLI; `.peaks/project-scan/{project-scan.md, business-knowledge.md}` bootstrap; peaks-prd SKILL.md Step 0.8 + Step 5.5.
|
|
1251
|
+
- **Tier 5+6 (Group C — `9fea8eb`)** — peaks-txt sediment step (`appendBusinessConcept`, idempotent on (concept, sourceRid), 7 tests); peaks-qa trim (removed `qa/security-findings.md` + `qa/performance-findings.md` from Gate D prerequisites).
|
|
1252
|
+
- **Tier 7 (Group D — `cd427f6`)** — ECC code-review bridge (`src/services/code-review/ecc-bridge.ts`): envelope validator `isEccEnvelope` + `adaptEccEnvelopeToRdCodeReview` + 5-state `detectEcc` + `runEccCodeReview` aggregator; 17 tests.
|
|
1253
|
+
- **Tier 8 (Group E — this CC)** — migration codemod `peaks migrate v2-10-to-v2-11` (deprecates historical `rd/tech-doc.md` files with a YAML banner frontmatter; text-only, idempotent).
|
|
1254
|
+
- **Tier 9 (Group F — commit `9e3ef49`)** — D5 self-decision (`src/services/solo/mode-gate.ts` + `peaks solo should-pause`); D6 context monitor (`src/services/context/main-session-monitor.ts` + `peaks context check`); D7 post-compact resume (`src/services/solo/post-compact-detector.ts` + `peaks solo post-compact-detect`); SKILL.md new Step N+2 + Step 0.7 D7 branch. +111 tests.
|
|
1255
|
+
|
|
1256
|
+
### Migration
|
|
1257
|
+
|
|
1258
|
+
- `peaks migrate v2-10-to-v2-11 --project <repo>` (default dry-run; pass `--apply` to write) — tags all pre-v2.11.0 `rd/tech-doc.md` files with `deprecated: historical` banner pointing to the new peaks-prd handoff as the source of truth. Idempotent. See `.peaks/memory/2026-06-26-v2-11-rm-rd-techdoc-immutable-handoff.md` for the design rationale.
|
|
1259
|
+
- Historical `qa/security-findings.md` / `qa/performance-findings.md` files are NOT auto-migrated (they are no longer required by Gate D, but pre-v2.11.0 sessions still produced them — leave in place).
|
|
1260
|
+
|
|
1261
|
+
### Tests
|
|
1262
|
+
|
|
1263
|
+
- 33 new tests (Group B): handoff-service (11) + project-scan-reader (13) + prd-handoff-command (9)
|
|
1264
|
+
- 7 new tests (Group C): sediment service (7) — on the 3987 baseline
|
|
1265
|
+
- 17 new tests (Group D): ecc-bridge (17) — on the 3987 baseline
|
|
1266
|
+
- (Group F counts pending — estimated 100+ tests for mode-gate + main-session-monitor + post-compact-detector)
|
|
1267
|
+
|
|
1268
|
+
### Risks / gaps carried forward
|
|
1269
|
+
|
|
1270
|
+
- **ECC envelope validation** assumes the `everything-claude-code` plugin is installed and exposes a `code-review` agent with the `{ passed, violations[], gateAction }` shape. If the plugin is absent, peaks-rd falls back to inline review (5-state detector + `code-review-ecc-degraded-to-inline` TXT note).
|
|
1271
|
+
- **D5 hard-floor categories** (irreversible external side effects / auth-credential / multi-day investment) still pause for AskUserQuestion regardless of mode.
|
|
1272
|
+
- **D7 post-compact resume** requires re-invoking `/peaks-solo` in fresh context (Option A — no SessionStart hook in v2.11.0; Option B deferred).
|
|
1273
|
+
- **Migration scope** is text-only — historical `rd/tech-doc.md` files coexist with the new `prd/handoff.md`; prune is a future slice.
|
|
1274
|
+
|
|
1275
|
+
---
|
|
1276
|
+
|
|
1277
|
+
## [2.10.0] — 2026-06-26 — Slice topology multi-pass + 10/90 paradigm
|
|
1278
|
+
|
|
1279
|
+
**MINOR bump from 2.9.0** (slice `add-slice-topology-multipass`, 63 commits ahead of `develop`, 8 waves W1-W8-b, plan at `docs/superpowers/plans/2026-06-25-slice-topology-multipass.md`).
|
|
1280
|
+
|
|
1281
|
+
Implements the 10/90 paradigm foundation: 10% human / 90% LLM autonomous workflow with structured multi-pass slice decomposition, audit gates, and final-review gates. v2 schema is breaking vs v1; v1 remains readable via `SchemaRouter`.
|
|
1282
|
+
|
|
1283
|
+
### Features
|
|
1284
|
+
|
|
1285
|
+
- **Multi-pass slice decomposition** (`peaks slice decompose --granularity=service|file|both|auto`, slice W2/W3): produces a v2 hierarchical topology (`DecompositionResultV2` with `passes[].slices[]` and `granularity` / `parentSliceId` fields) that supports peaks-solo fan-out RD. v1 envelopes continue to read via `SchemaRouter` (`src/services/slice/schema-router.ts`).
|
|
1286
|
+
- **LLMArbitrator** (W2 T5): content-hash SHA-256 cache (`<cacheDir>/<hash>.json`), budget cap (`resetArbitratorBudget()`), live/cache/failure-path callId routing.
|
|
1287
|
+
- **GranularityDecider** (W2 T6): stop-condition + tie-break for file-vs-service subdivision.
|
|
1288
|
+
- **CrossPassEdgeMerger** (W2 T7): static detection (type-shares / fixture-shares / re-exports / import-binding) + LLM fallback; static detection runs UNCONDITIONALLY (W6 fix #1) so it works without an `llmRunner`.
|
|
1289
|
+
- **MultiPassOrchestrator** (W2 T9): reuses existing 6-stage algorithm; populates `internalEdges` from v1 `dependencyDAG.edges` (W6 fix #2); emits enriched `LlmArbitration` shape with `promptHash/input/output/confidence` (W6 fix #3).
|
|
1290
|
+
- **peaks audit goal CLI** (W5 M1): `peaks audit goal <rid>` wraps `auditGoalService` for human-readable goal inspection.
|
|
1291
|
+
- **peaks prepare-final-review CLI** (W5 M2): `peaks prepare-final-review <rid>` wraps `finalReviewService` for 4-dim evidence prep.
|
|
1292
|
+
- **peaks slice plan PickedFileRouter** (W6 CC-β): `parsePickedFile()` helper replaces raw `JSON.parse(...)` for `-picked.json` envelope; new `PICKED_ENVELOPE_INVALID` error code on validation failure.
|
|
1293
|
+
- **3 new skills** (W4): `peaks-slice-decompose` (v2 schema references), `peaks-audit` (6-dim reference), `peaks-final-review` (4-dim reference).
|
|
1294
|
+
- **5 existing skill updates** (W7 CC-α):
|
|
1295
|
+
- `peaks-solo` — new Step 0.6 (Audit + Goal gate) and Step N+1 (Final Review gate) between Step 0.5 and Step 0.7.
|
|
1296
|
+
- `peaks-rd` — new references: `reading-v2-slice-results.md` (SchemaRouter dual-read), `writing-handoff-frontmatter.md` (frontmatter fields + canonical path).
|
|
1297
|
+
- `peaks-qa` — new reference: `reading-handoff-frontmatter.md` (cross-check `decisions[]` vs `tests/`, `risks[]` vs `tests/unit/security/`).
|
|
1298
|
+
- `peaks-prd` — new reference: `prd-for-multi-pass.md` (AC tagging `[pass-1]` / `[pass-2]`).
|
|
1299
|
+
- `peaks-sc` — first step in slice planning references `peaks-slice-decompose`.
|
|
1300
|
+
|
|
1301
|
+
### Bugfixes — W6 flaw repair pass (4 of 5 W1-W4 flaws)
|
|
1302
|
+
|
|
1303
|
+
- **#1 cross-pass edges gated on `opts.llmRunner`** (W2 deviation #4) — dropped the guard; static detection now fires unconditionally when `passes.length > 1`.
|
|
1304
|
+
- **#2 internal edges defaulted to `[]`** (W2 concern #3) — populated from `decomposeSlices().dependencyDAG.edges` at all 3 `PassResult` constructions; `EdgeKind === InternalEdgeKind` identity mapping; `isSemantic: boolean → confidence: 'semantic' | 'structural'`.
|
|
1305
|
+
- **#3 LlmArbitration shape gap** (W2 deviation #5) — enriched `LlmCallTrace` with `promptHash/input/output/confidence`; captured in `runLlmFallback` (medium for cache/live, low for failure).
|
|
1306
|
+
- **#4 raw `JSON.parse` for `-picked.json`** (W3 silent-failure) — extracted `parsePickedFile()` helper (lines 359-419 of `src/cli/commands/slice-commands.ts`) with schema validation; split catch into `PICKED_ENVELOPE_INVALID` (envelope) vs `SLICE_PLAN_FAILED` (other).
|
|
1307
|
+
|
|
1308
|
+
### Tests
|
|
1309
|
+
|
|
1310
|
+
- 3974 passed / 0 failed / 17 skipped at release time (354 test files, ~80s smoke / ~310s full).
|
|
1311
|
+
- New: 3 e2e integration tests in `tests/integration/slice-topology-e2e.test.ts` (multi-pass, service-only, file-only against real `src/services/config/`); 10 picked-envelope validation tests in `tests/unit/cli/commands/slice-commands.test.ts`; 4 LlmArbitration shape tests + 1 internalEdges test in `tests/unit/slice/multi-pass-orchestrator.test.ts` and `cross-pass-edge-merger.test.ts`.
|
|
1312
|
+
- **3 mutation probes pass** (W7 T21, `.peaks/memory/2026-06-25-mutation-probes-w7-t21.md`): Probe A (comment-out type-shares), Probe B (`>` → `>=` in `shouldSubdivide`), Probe C (cache short-circuit disabled) — all 3 mutations cause the corresponding test to fail, then revert to green.
|
|
1313
|
+
|
|
1314
|
+
### Bugfixes — W8 / W8-b stabilization (slice `add-slice-topology-multipass`, post-W7 follow-up)
|
|
1315
|
+
|
|
1316
|
+
- **W8 CC-α** (commit `56a9d9e`): stabilize 3 pre-existing flaky tests — `tests/unit/cli-program.workflow.test.ts` per-file timeout raised from vitest default 5000ms → 10000ms (`vi.setConfig({ testTimeout: 10000 })`); `tests/unit/dispatch-cli-latency-benchmark.test.ts` 250ms → 300ms threshold (median + min) with description + inline-comment updates for Karpathy #3 honesty.
|
|
1317
|
+
- **W8-b CC-α** (commits `e17f868` + `30f9b51`): fix 3 newly-surfaced state-bound pre-existing failures — `tests/unit/package.test.ts` `beforeAll` runs `scripts/sync-version.mjs` so the version-source assertion is deterministic without `pnpm build`; `tests/unit/cli-program.core.test.ts` + `tests/unit/project-commands.test.ts` use `vi.hoisted` + `vi.mock` to isolate from real-project filesystem state (synthetic passing doctor report + `vi.importActual` passthrough with default `doctorReport`/`runbookHealth` injection); `src/shared/version.ts` synced to `2.10.0` (W7-solo T22 missed this; W8-b surfaced it via the `beforeAll` sync-version run).
|
|
1318
|
+
- Net effect: full suite `3974 / 0 failed / 17 skipped` (was `3974 / 3 failed / 17 skipped` after W7 due to the 3 state-bound failures, and 3974 / 0 / 17 was timing-flaky due to the 3 W8 targets).
|
|
1319
|
+
|
|
1320
|
+
### Risks / gaps carried forward
|
|
1321
|
+
|
|
1322
|
+
- **peaks slice pick only supports v1 envelopes** (W3 T11) — explicitly documented in W4 T12 SKILL.md. v2-pick is a future-slice candidate.
|
|
1323
|
+
- **No CLI for `peaks audit-goal` discovered via auto-audit** (W4 T13) — `auditGoal()` is a service consumed by `final-review-service`, `slice/llm-arbitrator`, `slice/multi-pass-orchestrator` via direct import. CLI registration is a future-slice candidate.
|
|
1324
|
+
|
|
1325
|
+
---
|
|
1326
|
+
|
|
1327
|
+
## [2.9.0] — 2026-06-25 — Path canonicalization + fan-out mandatory + test-tool-detection
|
|
1328
|
+
|
|
1329
|
+
**MINOR bump from 2.8.4** (supersedes the unpublished 2.9.1 / 2.9.2 intermediate work; those entries below are kept as historical context only).
|
|
1330
|
+
|
|
1331
|
+
### Features
|
|
1332
|
+
|
|
1333
|
+
- **Sub-agent fan-out is mandatory** (slice `2026-06-24-audit-5th-p2`): `preferences.fanout.defaultMode = 'serial'` opt-out removed. When the slice DAG has ≥ 2 leaves at one topological level, the orchestrator MUST use `peaks sub-agent dispatch --from-dag <dag-file> --batch-id <id>`. No preference, env-var, or CLI flag overrides this. `FANOUT_MODES = ['fan-out']` only; legacy `serial` values auto-migrate via `peaks preferences migrate --write`.
|
|
1334
|
+
- **4-policy bundle (slice `2026-06-24-efficiency-4p-bundle`)**: (a) default fan-out via `--from-dag`; (b) periodic checkpoint frequency locked at 20 tool calls (no `~` approximation, no `--periodic-every` override); (c) Karpathy reviewer skipped for `config | docs | chore` request types (5-way review otherwise); (d) `swarmSpeculative.maxConcurrent` default bumped 2 → 3.
|
|
1335
|
+
- **Test-tool-detection block** (slice `2026-06-24-test-tool-detection-injection`): Every sub-agent dispatched by Solo (`peaks-rd`, `peaks-qa`, `peaks-ui`, `peaks-txt`, `peaks-sc`, `peaks-general-purpose`, single + DAG) receives a hard "Test Tool Detection (mandatory)" block at the top of its prompt: read `package.json#scripts.test`, use project-local runner (`./node_modules/.bin/<runner>` or `pnpm test --`), NEVER `npx <runner>`. Wired at both `dispatch-commands.ts` and `dag-orchestrator.ts` chokepoints; envelope version bumped to `2.2.0`.
|
|
1336
|
+
|
|
1337
|
+
### Bugfixes — handoff path canonicalization (v1 + v2 + v3 + v4 + v5 + v6 + v7)
|
|
1338
|
+
|
|
1339
|
+
LLM was creating top-level `.peaks/_runtime/<change-id>/` siblings of `.peaks/_runtime/`, violating the 2.8.3 hard ban. Sweep across all surfaces:
|
|
1340
|
+
|
|
1341
|
+
- **v1 (`9893d3a`)**: 20 hardcoded `.peaks/_runtime/${changeId}/` template strings in the 5 render functions of `src/services/artifacts/artifact-templates.ts` (split from `request-artifact-service.ts`). 4-helper API: `formatHandoffPath`, `formatCommitBoundaryPath`, `formatSkillUsageLessonsPath`, `formatChangeScopePath`.
|
|
1342
|
+
- **v2-v5 (`9afb702`, `41ad7a5`, `70bb568`, `83f23b2`, `975d9fc`)**: 11 B-class LLM/CLI directive strings in `src/cli/commands/` + `src/services/{refactor,sc,slice}/`, 71 B-class strings in `skills/`, 5 `.peaks/` project metadata files, 8 remaining SKILL.md literals. Plus R3 hotfix on `request-artifact-service.ts:515` runtime error message.
|
|
1343
|
+
- **File split**: `core-artifact-commands.ts` 889 → 39 lines + 8 new `core/*-command.ts` modules (each ≤ 800 lines), preserving public API.
|
|
1344
|
+
- **Regression test**: `tests/unit/workspace/banned-path-directive-guard.test.ts` — 7 directive-context patterns, 3-entry KEEP allow-list, covers `src/` + `skills/`.
|
|
1345
|
+
- **v7 (`b4d666b`)**: `migrateWorkspace` updated to discover sessions under canonical `.peaks/_runtime/<sid>/` (was only walking the legacy top-level path).
|
|
1346
|
+
|
|
1347
|
+
### Tests
|
|
1348
|
+
|
|
1349
|
+
- 3873 passed / 0 failed / 17 skipped at release time.
|
|
1350
|
+
- New: `dispatch-fanout-mandatory.test.ts` (11), `karpathy-skip-on-config-docs-chore.test.ts` (11), `checkpoint-periodic-frequency.test.ts` (6), `test-tool-detection.test.ts` (6) + injection test + docs test, `banned-path-directive-guard.test.ts` (2), `reviewer-dispatch-policy.test.ts` (11).
|
|
1351
|
+
- New reviewable artifact helpers tested in `request-artifact-handoff-path.test.ts` (21 total now).
|
|
1352
|
+
|
|
1353
|
+
### Pre-existing violations preserved as-is
|
|
1354
|
+
|
|
1355
|
+
6 ban-explanation memory files under `.peaks/memory/`, 28 historic session files under `.peaks/_runtime/2026-06-*/`, 5 historic dispatch records under `.peaks/_sub_agents/`, `.peaks/.gitignore` (gitignore contract), `tests/fixtures/skills/pre-slim/*.md` (slim-evidence baseline) — all explicitly labeled historical.
|
|
1356
|
+
|
|
1357
|
+
---
|
|
1358
|
+
|
|
1359
|
+
## [2.9.2] — 2026-06-25 — Handoff path canonicalization v2 (INTERMEDIATE, SUPERSEDED BY 2.9.0)
|
|
1360
|
+
|
|
1361
|
+
**Bugfix.** v1 (2.9.1, commit 9893d3a) fixed 20 hardcoded `.peaks/_runtime/${changeId}/` template strings in the 5 render functions of `src/services/artifacts/artifact-templates.ts`. User review then surfaced 11 additional B-class (LLM/CLI directive) hits across `src/cli/commands/`, `src/services/{refactor,sc,slice}/`, and 71 hits in `skills/` SKILL.md/references that the LLM would read as write instructions. v2 cleans all of them.
|
|
1362
|
+
|
|
1363
|
+
- **11 B-class string edits** in 8 source files (CLI descriptions, `nextActions.push`, service-emit `warnings:` / `helpLines:` / `hardGates`, `slice-check` gate descriptions)
|
|
1364
|
+
- **1 R3 hotfix**: `src/services/artifacts/request-artifact-service.ts:515` runtime error message path
|
|
1365
|
+
- **1 C-class back-compat comment** on `src/services/audit/enforcers/design-draft-confirm.ts:38-41` design-draft read path
|
|
1366
|
+
- **71 B-class edits** across 15 skills/ files (SKILL.md + references/)
|
|
1367
|
+
- **5 .peaks/ project metadata files** updated (PROJECT.md, retrospective index, project-scan, 2 memory entries)
|
|
1368
|
+
- **File split**: `src/cli/commands/core-artifact-commands.ts` 889 → 39 lines (orchestrator) + 8 new `src/cli/commands/core/*.ts` modules (each ≤ 800 lines), preserving the public API (`registerCoreAndArtifactCommands`, `DoctorLogsSection`, `BindingSource`)
|
|
1369
|
+
- **4 new tests** in `request-artifact-handoff-path.test.ts` (21 total now)
|
|
1370
|
+
- **1 new regression test**: `tests/unit/workspace/banned-path-directive-guard.test.ts` (2 tests, 7 directive-context patterns, 3-entry KEEP allow-list for explicit legacy/canonical contrast descriptions; covers `src/` and `skills/` directive contexts)
|
|
1371
|
+
- **1 test sync**: `tests/unit/sc-service.test.ts:151` updated to match the production warning string at `src/services/sc/sc-service.ts:567`
|
|
1372
|
+
- Bumps `package.json#version` from 2.9.1 to 2.9.2
|
|
1373
|
+
|
|
1374
|
+
**Pre-existing violations preserved as-is** (intentional historical/forbidden documentation, all explicitly labeled):
|
|
1375
|
+
- 6 ban-explanation memory files under `.peaks/memory/` (slice 005 / 2.8.3 / 2.7.1 lessons)
|
|
1376
|
+
- 28 historic session files under `.peaks/_runtime/2026-06-*/`
|
|
1377
|
+
- 5 historic dispatch records under `.peaks/_sub_agents/`
|
|
1378
|
+
- `.peaks/.gitignore` (gitignore contract)
|
|
1379
|
+
- `tests/fixtures/skills/pre-slim/*.md` (slim-evidence baseline)
|
|
1380
|
+
|
|
1381
|
+
---
|
|
1382
|
+
|
|
1383
|
+
## [2.9.1] — 2026-06-24 — Handoff path canonicalization
|
|
1384
|
+
|
|
1385
|
+
**Bugfix.** Sub-agents were still creating `.peaks/_runtime/<change-id>/` at the top level of `.peaks/`, which is hard-banned by 2.8.3+. Root cause: 20 hardcoded `.peaks/_runtime/${changeId}/...` template strings in `src/services/artifacts/request-artifact-service.ts` were emitted into artifact markdown and read by sub-agents as handoff write instructions.
|
|
1386
|
+
|
|
1387
|
+
Replaced all 20 with a 4-helper API at `src/services/artifacts/artifact-templates.ts:31,36,41,46` (`formatHandoffPath`, `formatCommitBoundaryPath`, `formatSkillUsageLessonsPath`, `formatChangeScopePath`); the public surface is re-exported from `request-artifact-service.ts:28`. The service file was also split — 5 render functions + dispatcher moved to the new sibling module — bringing it from 1101 lines down to 788, satisfying the 800-line cap (Karpathy #2 Simplicity First).
|
|
1388
|
+
|
|
1389
|
+
- New module: `src/services/artifacts/artifact-templates.ts` (333 lines; 4 helpers + 5 render fns + dispatcher)
|
|
1390
|
+
- `src/services/artifacts/request-artifact-service.ts` — re-exports only, 1101 → 788 lines
|
|
1391
|
+
- New test: `tests/unit/artifacts/request-artifact-handoff-path.test.ts` (17 assertions: 4 helper shapes, 5× role-path-prefix, 1 source-grep, 1 line-count cap, 1 lazy-load guard)
|
|
1392
|
+
- Hard ban (2.8.3+) regression-tested: zero hardcoded `.peaks/_runtime/${changeId}/` strings in either file
|
|
1393
|
+
- Also bumps `package.json#version` from 2.8.4 to 2.9.1 (closing the slice 006 gap where CHANGELOG was bumped to 2.9.0 but package.json was not)
|
|
1394
|
+
|
|
1395
|
+
---
|
|
1396
|
+
|
|
1397
|
+
## [2.9.0] — 2026-06-24 — Test Tool Detection injection
|
|
1398
|
+
|
|
1399
|
+
**Added.** Sub-agent dispatch (both single + DAG paths, all roles rd/qa/ui/txt/sc/general-purpose) now prepends a `## Test Tool Detection (mandatory)` block to every sub-agent prompt. The block tells the sub-agent to read `package.json#scripts.test` first and use the project-local runner (`./node_modules/.bin/<runner>` or `pnpm test -- <file>`) — never `npx <runner>`. Runtime introspection: `peaks test --json`.
|
|
1400
|
+
|
|
1401
|
+
- New module: `src/services/dispatch/test-tool-detection.ts` (47 lines; exports `TEST_TOOL_DETECTION_BLOCK` + `formatTestToolDetection()`)
|
|
1402
|
+
- Dispatch chokepoints updated: `src/cli/commands/dispatch-commands.ts:187`, `src/services/solo/dag-orchestrator.ts:157,182-183`
|
|
1403
|
+
- Dispatch envelope bumped: `envelopeVersion: '2.1.0'` → `'2.2.0'` (consumers can detect the new prompt shape)
|
|
1404
|
+
- New tests: `tests/unit/dispatch/test-tool-detection.test.ts` (6), `tests/unit/dispatch/test-tool-detection-injection.test.ts` (9), `tests/unit/skills/test-tool-detection-docs.test.ts` (4) — 19 new assertions
|
|
1405
|
+
- Block size: 749 bytes UTF-8 (≤800 cap)
|
|
1406
|
+
|
|
1407
|
+
---
|
|
1408
|
+
|
|
1409
|
+
## [2.8.4] — 2026-06-24
|
|
1410
|
+
|
|
1411
|
+
**Breaking change.** Single-sub-agent dispatch is no longer permitted when the slice DAG has ≥ 2 leaves at one topological level. The 2.8.3-era `preferences.fanout.defaultMode = 'serial'` opt-out was removed by user directive ("禁止单 sub-agent").
|
|
1412
|
+
|
|
1413
|
+
### Changed
|
|
1414
|
+
|
|
1415
|
+
- **`FanoutMode` closed set narrowed to `['fan-out']`.** The `'serial'` member is gone from `src/services/preferences/preferences-types.ts`; any preferences.json file carrying `defaultMode = 'serial'` (or any non-fan-out value) now throws `PREFERENCES_FANOUT_INVALID` at load. The `migratePreferences` path silently rewrites legacy `'serial'` → `'fan-out'` for 2.8.3-era files and surfaces the change in the migration envelope's `changes[]`.
|
|
1416
|
+
- **SKILL.md contract flipped.** `peaks-solo` SKILL.md now states "Hard constraint: fan-out is mandatory"; the previous "Fan-out opt-out" subsection is removed.
|
|
1417
|
+
- **Reference docs reorganized.** `references/fanout-opt-out.md` (escape hatch) → `references/fanout-mandatory.md` (hard constraint + migration contract). `references/swarm-dispatch-contract.md` opt-out callout removed.
|
|
1418
|
+
- **Test surface refreshed.** `tests/unit/solo/skills-solo-fanout-opt-out.test.ts` → `tests/unit/solo/skills-solo-fanout-mandatory.test.ts`; pins the new hard constraint and verifies the opt-out file is deleted.
|
|
1419
|
+
|
|
1420
|
+
### Migration
|
|
1421
|
+
|
|
1422
|
+
Run `peaks preferences migrate --write` once. The CLI will rewrite `serial` → `fan-out` in your `.peaks/preferences.json` and surface the change in stdout. Manual recovery: delete the `fanout` block from `.peaks/preferences.json`.
|
|
1423
|
+
|
|
1424
|
+
### Slice
|
|
1425
|
+
|
|
1426
|
+
`2026-06-24-audit-5th-p2` — removes the 2.8.3 serial opt-out entirely. Compatible with the 2.8.4 release tag; no DB migration required.
|
|
1427
|
+
|
|
1428
|
+
---
|
|
1429
|
+
|
|
1430
|
+
## [2.8.3] — 2026-06-22
|
|
1431
|
+
|
|
1432
|
+
### ⚠ BREAKING — `peaks workspace init --change-id` no longer creates `.peaks/_runtime/<change-id>/` sibling dir
|
|
1433
|
+
|
|
1434
|
+
The 2.8.0-era `peaks workspace init --change-id <id>` flow wrote a
|
|
1435
|
+
top-level sibling dir `.peaks/_runtime/<changeId>/` next to `.peaks/_runtime/`.
|
|
1436
|
+
That path is **forbidden** under the 2.8.0+ two-axis convention
|
|
1437
|
+
(change-id is a logical identifier, NOT a sibling filesystem dir).
|
|
1438
|
+
|
|
1439
|
+
In 2.8.3 the CLI redirects `--change-id` to a **file-form binding** at
|
|
1440
|
+
`.peaks/_runtime/current-change` (plain text file containing the
|
|
1441
|
+
change-id as its sole content). NO directory is created at
|
|
1442
|
+
`.peaks/_runtime/<changeId>/` at top level. Reviewable artifacts still land
|
|
1443
|
+
under `.peaks/_runtime/<changeId>/<role>/`, but that dir is created **lazily**
|
|
1444
|
+
by the writer, not by `init`.
|
|
1445
|
+
|
|
1446
|
+
If a 2.8.0-era legacy sibling dir `.peaks/_runtime/<changeId>/` already exists
|
|
1447
|
+
at top level, `peaks workspace init --change-id <id>` aborts with a
|
|
1448
|
+
new `LegacyChangeIdSiblingError` (envelope code
|
|
1449
|
+
`LEGACY_CHANGE_ID_SIBLING`) carrying a 4-step migration message:
|
|
1450
|
+
|
|
1451
|
+
1. Inspect `.peaks/_runtime/<changeId>/` for user-authored content worth keeping.
|
|
1452
|
+
2. Move desired files into `.peaks/_runtime/<sessionId>/<role>/`.
|
|
1453
|
+
3. Delete the orphan `.peaks/_runtime/<changeId>/` dir.
|
|
1454
|
+
4. Re-run `peaks workspace init --change-id <id>`.
|
|
1455
|
+
|
|
1456
|
+
This is a **deliberate breaking change** — the 2.8.0→2.8.3 transition
|
|
1457
|
+
required the redirect because the legacy sibling-dir layout was the
|
|
1458
|
+
root cause of `.peaks/_runtime/<YYYY-MM-DD-*>/` orphans at the project root.
|
|
1459
|
+
Users on 2.8.2 with an existing `.peaks/_runtime/<changeId>/` sibling dir see a
|
|
1460
|
+
one-time migration error on next `peaks workspace init`. The CLI surfaces
|
|
1461
|
+
the four-step recipe; no data is lost.
|
|
1462
|
+
|
|
1463
|
+
### Fixed
|
|
1464
|
+
|
|
1465
|
+
- **Top-level `.peaks/_runtime/<YYYY-MM-DD-*>/` ban** — the 2.8.0-era legacy path
|
|
1466
|
+
`.peaks/_runtime/<change-id>/<role>/` (sibling of `.peaks/_runtime/`) is now
|
|
1467
|
+
**forbidden** under the 2.8.0+ two-axis convention. This slice is the
|
|
1468
|
+
final root-out of a 2.8.0-era orphan (`.peaks/2026-06-22-cc-connect-orphan-cleanup/`,
|
|
1469
|
+
4 files, 28 KB, untracked) and pins the rule across FOUR layers so a
|
|
1470
|
+
regression cannot survive:
|
|
1471
|
+
1. **`.gitignore` fnmatch rule** —
|
|
1472
|
+
`.peaks/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-*/` blocks any
|
|
1473
|
+
future untracked date-prefix sibling at `.peaks/_runtime/<seg>/`. Path-anchored
|
|
1474
|
+
so it does not over-match (`.peaks/_runtime/<date>/` is still ignored
|
|
1475
|
+
by the existing `.peaks/_runtime/` rule, not this one).
|
|
1476
|
+
2. **Vitest guard** at
|
|
1477
|
+
`tests/unit/workspace/top-level-change-id-guard.test.ts` (8 cases)
|
|
1478
|
+
pins the gitignore rule literal, asserts fnmatch matches a synthetic
|
|
1479
|
+
candidate, asserts it does NOT match `.peaks/_runtime/-nested`
|
|
1480
|
+
candidates, scans the live working tree for orphan date-prefix
|
|
1481
|
+
siblings, scans `git ls-files` for tracked escapes, asserts both
|
|
1482
|
+
`CLAUDE.md` and `.peaks/PROJECT.md` carry the ban wording, AND
|
|
1483
|
+
asserts the CLI help text (`init-command.ts`) teaches the
|
|
1484
|
+
`.peaks/_runtime/current-change` binding path + the four
|
|
1485
|
+
migration verbs (inspect / move / delete / unlink / re-run).
|
|
1486
|
+
3. **Source-code redirect** —
|
|
1487
|
+
`src/shared/change-id.ts#setCurrentChangeId` now defaults to
|
|
1488
|
+
`{ form: 'file' }` (was `'symlink'`); the file form writes ONLY
|
|
1489
|
+
`.peaks/_runtime/current-change` and never creates
|
|
1490
|
+
`.peaks/_runtime/<changeId>/`. The legacy `'symlink'` form is kept for
|
|
1491
|
+
back-compat reads but is no longer written by `peaks workspace init`.
|
|
1492
|
+
`src/services/workspace/workspace-service.ts#initWorkspace`
|
|
1493
|
+
pre-flights the existence of `.peaks/_runtime/<changeId>/` and throws
|
|
1494
|
+
`LegacyChangeIdSiblingError` if found.
|
|
1495
|
+
4. **CLI help-text guard** — `src/cli/commands/workspace/init-command.ts`
|
|
1496
|
+
rewrites the `init` command description and `--change-id` option
|
|
1497
|
+
description so an LLM reading `peaks workspace init --help` is
|
|
1498
|
+
taught the correct path (`.peaks/_runtime/current-change`) instead
|
|
1499
|
+
of the legacy `.peaks/_runtime/<change-id>/` sibling dir. A new catch block
|
|
1500
|
+
surfaces `LegacyChangeIdSiblingError` with the 4-step migration
|
|
1501
|
+
recipe in the JSON envelope.
|
|
1502
|
+
- **`CLI_VERSION`** sync bumped 2.8.2 → 2.8.3 (regenerated via
|
|
1503
|
+
`scripts/sync-version.mjs` from `package.json#version`).
|
|
1504
|
+
|
|
1505
|
+
### Added
|
|
1506
|
+
|
|
1507
|
+
- **`LegacyChangeIdSiblingError`** (exported from
|
|
1508
|
+
`src/services/workspace/workspace-service.ts`) — thrown by
|
|
1509
|
+
`initWorkspace` when a 2.8.0-era legacy sibling dir
|
|
1510
|
+
`.peaks/_runtime/<changeId>/` already exists at top level. Carries
|
|
1511
|
+
`code: 'LEGACY_CHANGE_ID_SIBLING'`, `changeId`, and `legacyPath`.
|
|
1512
|
+
The CLI catch block surfaces the error in the JSON envelope with a
|
|
1513
|
+
3-item `nextActions` list (inspect → migrate → re-run).
|
|
1514
|
+
- **`tests/unit/workspace/workspace-init-change-id-redirect.test.ts`** —
|
|
1515
|
+
8 vitest cases pinning the new init behavior:
|
|
1516
|
+
(1) no `.peaks/_runtime/<changeId>/` created; (2) `.peaks/_runtime/current-change`
|
|
1517
|
+
written; (3) `LegacyChangeIdSiblingError` fires when legacy sibling
|
|
1518
|
+
exists; (4) no `--change-id` leaves binding untouched; (5) idempotent
|
|
1519
|
+
re-init; (6) error envelope data fields + 4-step recipe ordering;
|
|
1520
|
+
(7) `LegacyChangeIdBindingError` fires when a legacy 2.8.0-era
|
|
1521
|
+
symlink is found at the binding path (silent-replace defense);
|
|
1522
|
+
(8/8b) `ChangeIdValidationError` fires for `--change-id '../'` / '.'
|
|
1523
|
+
before any path join.
|
|
1524
|
+
- **`top-level-change-id-guard.test.ts` AC7** — pins the CLI help text
|
|
1525
|
+
in `init-command.ts` so a future refactor cannot silently revert to
|
|
1526
|
+
the forbidden sibling-dir phrasing. Also pins all four migration
|
|
1527
|
+
verbs (inspect / move / delete / unlink / re-run) so the CLI catch
|
|
1528
|
+
block's wording stays in sync with the runtime error messages.
|
|
1529
|
+
|
|
1530
|
+
### Audit followup (post-2.8.3, pre-publish) — multi-dimensional remediation
|
|
1531
|
+
|
|
1532
|
+
A multi-dimensional audit (Karpathy + security + silent-failure +
|
|
1533
|
+
migration) of the 2.8.3 release surfaced 13 findings, all addressed in
|
|
1534
|
+
a single followup commit:
|
|
1535
|
+
|
|
1536
|
+
- **HIGH silent failure**: `setCurrentChangeId({ form: 'file' })`
|
|
1537
|
+
silently replaced a 2.8.0-era symlink at the binding path
|
|
1538
|
+
(`unlinkSync` + `writeFileSync` with no log / envelope signal).
|
|
1539
|
+
Fixed: detect the symlink via `lstatSync` BEFORE the read attempt
|
|
1540
|
+
and throw a new `LegacyChangeIdBindingError` (envelope code
|
|
1541
|
+
`LEGACY_CHANGE_ID_BINDING`) with a 3-step migration recipe
|
|
1542
|
+
(inspect / unlink / re-run). The CLI catch block surfaces the
|
|
1543
|
+
error in the JSON envelope with `bindingPath` + `symlinkTarget` +
|
|
1544
|
+
`changeId` fields plus a 3-item `nextActions` list. Live state at
|
|
1545
|
+
the time of audit: this repo's own `.peaks/_runtime/current-change`
|
|
1546
|
+
was a legacy symlink pointing at the now-deleted
|
|
1547
|
+
`.peaks/014-full-dogfood/` — the fix prevented data loss on the
|
|
1548
|
+
next `peaks workspace init --change-id` invocation.
|
|
1549
|
+
- **MEDIUM path-validation ordering**: `initWorkspace` joined the
|
|
1550
|
+
unvalidated `--change-id` and ran `existsSync` before
|
|
1551
|
+
`validateChangeIdOrThrow`. Fixed: `validateChangeIdOrThrow` is now
|
|
1552
|
+
called BEFORE any path join / `existsSync` probe.
|
|
1553
|
+
- **MEDIUM bare-existsSync guard**: the legacy-sibling guard used
|
|
1554
|
+
bare `existsSync` which conflates files / broken symlinks /
|
|
1555
|
+
escaping symlinks / EACCES into one error. Fixed: use
|
|
1556
|
+
`lstatSync` + try/catch on `ENOENT` so the guard distinguishes
|
|
1557
|
+
path types. (All non-existent paths fall through; the legacy
|
|
1558
|
+
sibling dir of any kind still throws `LegacyChangeIdSiblingError`.)
|
|
1559
|
+
- **INFO defense-in-depth**: `writeFileSync` on the binding file now
|
|
1560
|
+
uses `mode: 0o600` (the binding file contains a per-user change-id,
|
|
1561
|
+
not a team-shared file — restricting read/write to the owner defends
|
|
1562
|
+
against multi-user hosts).
|
|
1563
|
+
- **Test count**: `workspace-init-change-id-redirect.test.ts` extended
|
|
1564
|
+
from 6 to 8 cases (AC7 symlink-at-binding-path + AC8 / AC8b
|
|
1565
|
+
validation); `top-level-change-id-guard.test.ts` AC7 extended with
|
|
1566
|
+
4-verb pin. Total test count: 8 + 8 = 16 cases pinning the
|
|
1567
|
+
top-level change-id ban (previously stated as "5 cases" in the
|
|
1568
|
+
memory file and "(7 cases)" in the "Vitest guard" bullet above —
|
|
1569
|
+
both have been corrected to reflect the final 8-case state).
|
|
1570
|
+
- **Dead-code cleanup**: removed the unused `track` helper from
|
|
1571
|
+
`workspace-init-change-id-redirect.test.ts`.
|
|
1572
|
+
- **Doc cleanup**:
|
|
1573
|
+
`.peaks/memory/2026-06-22-top-level-change-id-cleanup.md` updated
|
|
1574
|
+
to describe the full 4-layer defense (was 3-layer) and the 8-case
|
|
1575
|
+
final state (was 5-case). `.peaks/memory/index.json` entry
|
|
1576
|
+
description + `updatedAt` timestamp updated to 2026-06-23.
|
|
1577
|
+
`CLAUDE.md` Hard ban section clarifies the binding vs artifact
|
|
1578
|
+
path distinction. `.peaks/PROJECT.md` second convention bullet
|
|
1579
|
+
expanded to describe all 4 enforcement layers. The
|
|
1580
|
+
`.peaks/_sub_agents/unknown-sid/` followup is marked
|
|
1581
|
+
**tolerated** (gitignored ephemeral, no action needed).
|
|
1582
|
+
- **CLI help text** mentions `LegacyChangeIdBindingError` alongside
|
|
1583
|
+
`LegacyChangeIdSiblingError` so an LLM reading
|
|
1584
|
+
`peaks workspace init --help` learns about both error classes.
|
|
1585
|
+
|
|
1586
|
+
Verification: `pnpm tsc --noEmit` clean, `pnpm vitest run` 3638/3640
|
|
1587
|
+
pass (the 2 pre-existing ast-gate-cross-version STRAT.sig failures
|
|
1588
|
+
are unchanged by this release), `pnpm build` clean.
|
|
1589
|
+
|
|
1590
|
+
### Notes
|
|
1591
|
+
|
|
1592
|
+
- No npm dependencies added or removed.
|
|
1593
|
+
- CLI surface change: the `init` command description and `--change-id`
|
|
1594
|
+
option description text are rewritten to teach the correct path.
|
|
1595
|
+
`peaks workspace init --help` is now a slightly longer message — no
|
|
1596
|
+
flag names changed, no exit codes changed.
|
|
1597
|
+
- The orphan `.peaks/2026-06-22-cc-connect-orphan-cleanup/` contained a
|
|
1598
|
+
redundant duplicate of work already promoted to
|
|
1599
|
+
`.peaks/_runtime/2026-06-22-session-14216e/rd/requests/002-2026-06-22-cc-connect-orphan-cleanup.md`
|
|
1600
|
+
per the 2.8.0+ two-axis convention. Audit confirmed no other orphan
|
|
1601
|
+
date-prefix `.peaks/` siblings exist anywhere in the working tree or git
|
|
1602
|
+
tracking, and zero `src/` / `skills/` / `tests/` paths reference the
|
|
1603
|
+
deleted orphan as a live location.
|
|
1604
|
+
- The pre-existing `STRAT.sig` test failure in
|
|
1605
|
+
`tests/integration/rd/ast-gate-cross-version.test.ts` is out of scope
|
|
1606
|
+
and filed separately (unchanged by this release).
|
|
1607
|
+
- Consumer-projects upgrading from 2.8.0/2.8.1/2.8.2: if you have an
|
|
1608
|
+
existing `.peaks/_runtime/<change-id>/` dir at top level from a prior
|
|
1609
|
+
`peaks workspace init --change-id <id>` call, run the migration
|
|
1610
|
+
steps surfaced by `LegacyChangeIdSiblingError` (inspect → migrate →
|
|
1611
|
+
delete → re-init). No data is lost. After migration, future
|
|
1612
|
+
`peaks workspace init` calls write only `.peaks/_runtime/current-change`
|
|
1613
|
+
and never create the sibling dir.
|
|
1614
|
+
|
|
1615
|
+
---
|
|
1616
|
+
|
|
1617
|
+
## [2.8.2] — 2026-06-22
|
|
1618
|
+
|
|
1619
|
+
### Removed
|
|
1620
|
+
|
|
1621
|
+
- **cc-connect package + `peaks companion` command family** — the
|
|
1622
|
+
`cc-connect` dependency (and its postinstall Go-binary download) is
|
|
1623
|
+
gone from `package.json#dependencies`, and the entire 12-file
|
|
1624
|
+
`src/services/companion/*` module + `src/cli/commands/companion.ts`
|
|
1625
|
+
CLI + 14 `tests/unit/companion/*` test files are removed
|
|
1626
|
+
(~7,700 lines deleted, 0 added). The `peaks companion install|setup|
|
|
1627
|
+
start|stop|bind|status|restart|verify|token|qr` command tree is gone
|
|
1628
|
+
along with the `peaks scan companion-binary` sub-command and the
|
|
1629
|
+
`capability:companion-binary-resolution` doctor check. Companion
|
|
1630
|
+
types (`CompanionConfig`, `CompanionWeixinConfig`, `CompanionChannel`,
|
|
1631
|
+
`CompanionBinarySource`) and the `~/.peaks/config.json#companion`
|
|
1632
|
+
block are also removed.
|
|
1633
|
+
- **Orphan npm dependencies** — `qrcode ^1.5.4`, `qrcode-terminal ^0.12.0` (runtime), `@types/qrcode ^1.5.6` (dev). These were only consumed by the now-deleted `src/services/companion/*` module; the ambient declaration `src/types/qrcode-terminal.d.ts` (no consumer) was deleted in the same hunk. `pnpm-lock.yaml` regenerated; verified 0 `cc-connect` and 0 `qrcode` entries.
|
|
1634
|
+
- **Stale `'companion'` entry in `PARENT_COMMANDS`** static set in `src/services/scan/orphan-service.ts`. The `peaks companion` command was deleted in 2.8.2; its presence in the static set caused orphan-detection false negatives (a stray `companion` directory would be silently skipped).
|
|
1635
|
+
|
|
1636
|
+
Rationale: `cc-connect@1.3.1`'s postinstall script runs
|
|
1637
|
+
`node scripts/install.js` which downloads a Go binary from
|
|
1638
|
+
`github.com/alibaba/open-code-review/releases` via HTTPS. This was
|
|
1639
|
+
the dominant cause of slow `npm i -g peaks-cli` installs in
|
|
1640
|
+
restricted/proxied environments; `peaks companion` itself is also
|
|
1641
|
+
low-traffic (no Claude Code / Trae workflows depend on it). The
|
|
1642
|
+
`peaks-companion` skill directory remains in `skills/` for users
|
|
1643
|
+
who still have cc-connect installed locally — it is now opt-in and
|
|
1644
|
+
no longer wired into any `peaks` subcommand.
|
|
1645
|
+
|
|
1646
|
+
Action for users with existing `~/.peaks/config.json`: the loader
|
|
1647
|
+
silently strips the legacy `companion` block on next read and
|
|
1648
|
+
rewrites the file in slim form. No data loss.
|
|
1649
|
+
|
|
1650
|
+
### Changed
|
|
1651
|
+
|
|
1652
|
+
- **`@alibaba-group/open-code-review` is now a peer dependency** —
|
|
1653
|
+
moved from `optionalDependencies` to `peerDependencies` with
|
|
1654
|
+
`peerDependenciesMeta."@alibaba-group/open-code-review".optional =
|
|
1655
|
+
true`. The peer hint lets npm skip the optional resolution entirely
|
|
1656
|
+
during global install; users who want second-opinion reviews via
|
|
1657
|
+
`peaks code-review run-ocr` install it manually with
|
|
1658
|
+
`npm i -g @alibaba-group/open-code-review`. Install hint copy in
|
|
1659
|
+
`ocr-service.ts` and `code-review-commands.ts` updated to reflect
|
|
1660
|
+
the peer-dependency status. `pnpm.onlyBuiltDependencies` is now an
|
|
1661
|
+
empty array (no peaks-cli dep needs postinstall approval).
|
|
1662
|
+
- **Refreshed stale JSDoc** on `src/services/config/config-service.ts#hasLegacyGlobalFields` to describe the current 2.0 schema (`version` + `ocr`) — the old comment still described the deleted `companion` block from slice 2026-06-14-cc-connect-weixin.
|
|
1663
|
+
- **Removed dead `commander.invalidArgument` channel-not-supported block** in `src/cli/index.ts` — the only path that raised this exact error was the now-deleted `peaks companion` command.
|
|
1664
|
+
|
|
1665
|
+
### Notes
|
|
1666
|
+
|
|
1667
|
+
- `skills/peaks-companion/` and `tests/unit/skills/peaks-companion.test.ts` are intentionally retained as a tombstone for users who still have `cc-connect` installed locally. They are not loaded by the runtime CLI.
|
|
1668
|
+
- The pre-existing `STRAT.sig-chain` test failure in `tests/integration/rd/ast-gate-cross-version.test.ts` is out of scope and filed separately.
|
|
1669
|
+
|
|
1670
|
+
---
|
|
1671
|
+
|
|
1672
|
+
## [2.8.1] — 2026-06-22
|
|
1673
|
+
|
|
1674
|
+
### Fixed
|
|
1675
|
+
|
|
1676
|
+
- **H8 STRAT.sig chain enforcement (Plan 5 R1-W2 HIGH)** — `runTacticalStage`
|
|
1677
|
+
now refuses to write `impl.json` when `inputSig` does not equal the
|
|
1678
|
+
upstream `STRAT.sig` for the same project dir, instead of trusting any
|
|
1679
|
+
64-hex string. Backed by a process-local `STRAT_SIG_REGISTRY` keyed by
|
|
1680
|
+
`dirname(out)` and the explicit invariant phrase
|
|
1681
|
+
`"STRAT.sig chain broken"`. Catches a class of orchestrator bugs that
|
|
1682
|
+
could fabricate impl.json authority from a non-existent strategy.
|
|
1683
|
+
|
|
1684
|
+
- **Defense-in-depth comment cites H6 verbatim (Plan 5 R1-W3 MED)** —
|
|
1685
|
+
`src/services/rd/impl.ts` defense-in-depth check now cites spec H6
|
|
1686
|
+
(CLI 计算裁决) directly. The accompanying `docs/superpowers/specs/
|
|
1687
|
+
2026-06-21-context-audit-redesign-design.md` gained a new §4.3
|
|
1688
|
+
*战术审计* subsection that consolidates §3.2 / §3.3 / H6 / H8 / Phase 3
|
|
1689
|
+
AC-2 into a single canonical anchor (previous code references to
|
|
1690
|
+
`§4.2` updated to `§4.3`).
|
|
1691
|
+
|
|
1692
|
+
### Tests
|
|
1693
|
+
|
|
1694
|
+
- **Orphan-test traceability (Plan 5 R1-W1 MED)** — the side-effect-only
|
|
1695
|
+
import test in `tests/unit/services/rd/ast-gate.test.ts` now carries an
|
|
1696
|
+
explicit `R2-EXTRA` comment tag so future audit rounds can locate it
|
|
1697
|
+
in the round-2 boundary_coverage table.
|
|
1698
|
+
|
|
1699
|
+
- **v1 regex-limitation test names (Plan 5 R1-W4 LOW)** — namespace-import
|
|
1700
|
+
and default-import tests renamed from "is NOT linked to dep" to
|
|
1701
|
+
"v1 passes namespace/default import (limitation, R2-W3)" so the verdict
|
|
1702
|
+
is in the test name, not just the body.
|
|
1703
|
+
|
|
1704
|
+
- **Atomic-write crash test (Plan 5 R1-W5 LOW)** — new test
|
|
1705
|
+
*unlinks .tmp when rename throws* pins the catch→unlink fallback in
|
|
1706
|
+
`writeImpl` (EISDIR-triggered real-rename failure). Mutation probe
|
|
1707
|
+
KILLED: commenting out the unlink makes the test fail at the
|
|
1708
|
+
`existsSync(tmp)` assertion.
|
|
1709
|
+
|
|
1710
|
+
- **1-element boundary (Plan 5 R2A-L1 LOW)** — `externalApiCalls` array
|
|
1711
|
+
now asserts that `[]` / `[x]` / `[x,y,z]` produce three distinct sigs,
|
|
1712
|
+
pinning the empty-vs-single-vs-multi collapse class.
|
|
1713
|
+
|
|
1714
|
+
- **Uppercase-hex schema pin (Plan 5 R2A-L2 LOW)** — `StrategyOutputSchema`
|
|
1715
|
+
now rejects `'A'.repeat(64)` explicitly, defending against a
|
|
1716
|
+
case-insensitive regex widening mutation.
|
|
1717
|
+
|
|
1718
|
+
- **Multi-entry sig-distinction caveat (Plan 5 R3-W1 LOW)** — the
|
|
1719
|
+
`produces distinct sig for multi-entry externalApiCalls` test now
|
|
1720
|
+
documents in its comment that the named sig assertion is best-effort
|
|
1721
|
+
(because `generatedAt` is non-deterministic) and that the load-bearing
|
|
1722
|
+
guards are the on-disk length + element-order assertions.
|
|
1723
|
+
|
|
1724
|
+
---
|
|
1725
|
+
|
|
1726
|
+
## [2.7.0] — 2026-06-18
|
|
1727
|
+
|
|
1728
|
+
### Added
|
|
1729
|
+
|
|
1730
|
+
- **Slice DAG dependency analysis + parallel sub-agent dispatch (slice 1.2)** —
|
|
1731
|
+
the `peaks-cli` repo now ships a typed DAG model for slicing work across
|
|
1732
|
+
parallel sub-agents. `src/services/dispatch/slice-dag.ts` exports
|
|
1733
|
+
`validateDag` (cycle detection with path-in-error-message),
|
|
1734
|
+
`topologicalLevels` (linear / diamond / parallel DAGs), and
|
|
1735
|
+
`sliceReadyToRun(dag, completed)` (next-layer fan-out query). Node IDs are
|
|
1736
|
+
globally unique, node roles are whitelisted, and DAG serialization is
|
|
1737
|
+
SHA-256 hash-stable on key-sorted serialization. The new
|
|
1738
|
+
`peaks sub-agent dispatch --from-dag <file>` flag and the new
|
|
1739
|
+
`peaks sub-agent await --batch <id> [--timeout <ms>]` subcommand wrap the
|
|
1740
|
+
model. The `dispatch <role>` single-sub-agent path is byte-stable zero-change.
|
|
1741
|
+
- **Contract broadcast for downstream slices (slice 1.2)** —
|
|
1742
|
+
`src/services/dispatch/contract-store.ts` persists each completed slice's
|
|
1743
|
+
public surface (`exports` / `types` / `publicSignatures`) to
|
|
1744
|
+
`.peaks/_runtime/<sessionId>/dispatch/contracts/<slice-id>.json`. The B/C/D
|
|
1745
|
+
dispatch prompts auto-inject A's contract under a `slice A contract:`
|
|
1746
|
+
segment so downstream slices see the dependency without re-reading source.
|
|
1747
|
+
- **Solo DAG orchestrator with cancel-on-fail (slice 1.2)** —
|
|
1748
|
+
`src/services/solo/dag-orchestrator.ts` exports `runDag(dag, opts)`:
|
|
1749
|
+
topological-layer fan-out, per-layer join barrier, 任一叶子失败整组回退
|
|
1750
|
+
(any leaf failure → in-flight sub-agents receive cancel signal → RD
|
|
1751
|
+
returns to repair). peaks-solo SKILL.md references the orchestrator.
|
|
1752
|
+
- **5-IDE `awaitBatch` real implementation (slices 1.2 + 1.3 + 1.4)** —
|
|
1753
|
+
`SubAgentDispatcher.awaitBatch(batchId, opts): Promise<BatchResult[]>`
|
|
1754
|
+
is now implemented across **all 5 IDEs**: claude-code (1.2 MVP) +
|
|
1755
|
+
trae + trae-cn + codex + cursor (1.3 expansion). The 4 non-claude-code
|
|
1756
|
+
IDEs share `pollDispatchRecords()` core (cross-platform file-polling via
|
|
1757
|
+
`homedir() + join()`); per-IDE `notePrefix` attributes the surfaced note.
|
|
1758
|
+
Per-IDE timeout defaults: trae 30s / trae-cn 30s / cursor 30s /
|
|
1759
|
+
codex 45s / claude-code 60s. Uniform 120_000ms clamp ceiling.
|
|
1760
|
+
- **5-IDE end-to-end dogfood (slice 1.4)** —
|
|
1761
|
+
`tests/unit/dispatch/slice-dag-dispatcher-5ide-dogfood.test.ts` runs the
|
|
1762
|
+
same 5-node mock DAG (4 done + 1 failed at idx 2) through every IDE's
|
|
1763
|
+
`awaitBatch`. Cross-IDE envelope dimensions are byte-stable
|
|
1764
|
+
(length=5 / dispatchIndex 0..4 / status array / recordPath unique /
|
|
1765
|
+
durationMs >= 0). The `note` label is per-IDE attributed as documented
|
|
1766
|
+
divergence (claude-code reads raw outcome; trae/trae-cn/codex/cursor
|
|
1767
|
+
prefix with `${notePrefix} — ${outcome}`). Zero IDE-specific differences
|
|
1768
|
+
required production code fixes — the differences are design-driven.
|
|
1769
|
+
- **RD tech-doc `## Slice DAG` section + enforcer (slice 1.2)** —
|
|
1770
|
+
`skills/peaks-rd/references/mandatory-tech-doc.md` gains a new
|
|
1771
|
+
`## Slice DAG` section (visual + text) alongside § Architecture /
|
|
1772
|
+
§ Component / § Data flow / § Dependencies. The enforcer
|
|
1773
|
+
(`tech-doc-mandatory-sections.ts`) treats it as a required heading;
|
|
1774
|
+
missing section → `TECH_DOC_MISSING_SECTION` gate failure.
|
|
1775
|
+
- **UT 4-dimension split convention (proposal 2, slice 2.1)** —
|
|
1776
|
+
`.peaks/standards/typescript/testing.md` codifies the 4 orthogonal test
|
|
1777
|
+
dimensions: **render** (output shape) / **behavior** (state transitions)
|
|
1778
|
+
/ **integration** (boundary mocks) / **a11y** (human-facing signal).
|
|
1779
|
+
Each `describe(...)` block maps to exactly one dimension; no test case
|
|
1780
|
+
spans dimensions. The convention has both a frontend and a CLI/non-UI
|
|
1781
|
+
reading. Promotion is via the code-reviewer sub-agent hint at
|
|
1782
|
+
`skills/peaks-rd/references/code-reviewer-4dim-hint.md` (a verbatim
|
|
1783
|
+
block appended to the code-reviewer prompt at dispatch time). **No lint
|
|
1784
|
+
rule introduced**, no retroactive refactor of existing 3500+ test cases —
|
|
1785
|
+
the convention applies to NEW test files only.
|
|
1786
|
+
|
|
1787
|
+
### Changed
|
|
1788
|
+
|
|
1789
|
+
- `package.json` and `src/shared/version.ts` bumped 2.6.1 → 2.7.0.
|
|
1790
|
+
- `SubAgentDispatcher` interface (5 implementations) gains
|
|
1791
|
+
`awaitBatch(batchId, opts): Promise<BatchResult[]>` (type-only extension).
|
|
1792
|
+
- `peaks sub-agent dispatch` and `peaks sub-agent await` gain DAG-aware
|
|
1793
|
+
flags (`--from-dag`, `--batch-id`) and the new subcommand respectively.
|
|
1794
|
+
Single-sub-agent `dispatch <role>` envelope shape is byte-stable zero-change.
|
|
1795
|
+
- `karpathy-reviewer` prompt-injection context remains in
|
|
1796
|
+
`references/rd-sub-agent-dispatch.md`; the new 4-dim hint is appended
|
|
1797
|
+
after the Karpathy block.
|
|
1798
|
+
|
|
1799
|
+
### Fixed
|
|
1800
|
+
|
|
1801
|
+
- **Cross-platform path discipline (slice 1.3)** —
|
|
1802
|
+
`tests/unit/dispatch/sub-agent-dispatcher-cross-platform.test.ts` pins
|
|
1803
|
+
the `homedir() + join()` construction so a Windows user gets
|
|
1804
|
+
`C:\Users\name\.trae\agents` and a Mac user gets
|
|
1805
|
+
`/Users/name/.trae/agents`. No hardcoded `/Users/...` or `C:\...` in
|
|
1806
|
+
any 5-IDE `awaitBatch` path. The 4 new IDE paths (`trae / trae-cn /
|
|
1807
|
+
codex / cursor`) follow the same discipline.
|
|
1808
|
+
- **`runDag` cancel-on-fail correctness (slice 1.2.c)** — when any leaf
|
|
1809
|
+
fails, in-flight sub-agents in the same batch receive a cancel signal
|
|
1810
|
+
at the envelope level; the orchestrator no longer waits for them to
|
|
1811
|
+
finish naturally. Pinned by `tests/unit/solo/dag-orchestrator.test.ts`.
|
|
1812
|
+
|
|
1813
|
+
### Security
|
|
1814
|
+
|
|
1815
|
+
- No new attack surface in 2.7.0. The contract-broadcast path writes
|
|
1816
|
+
JSON to `.peaks/_runtime/<sessionId>/dispatch/contracts/` (project-local,
|
|
1817
|
+
gitignored); no cross-user / cross-process access pattern was added.
|
|
1818
|
+
The 4-dim convention does not introduce eval / dynamic-import / unsafe
|
|
1819
|
+
code paths.
|
|
1820
|
+
|
|
1821
|
+
---
|
|
1822
|
+
|
|
1823
|
+
## [2.7.1] — 2026-06-18
|
|
1824
|
+
|
|
1825
|
+
### Changed
|
|
1826
|
+
|
|
1827
|
+
- **Project-root artifact pollution remediation** — the 2.7.0 release
|
|
1828
|
+
shipped a `getChangeArtifactRoot(projectRoot, changeId)` helper that
|
|
1829
|
+
returned `.peaks/_runtime/<changeId>/` and was the source of the user-reported
|
|
1830
|
+
project-root pollution: reviewable artifacts (RD `tech-doc.md`, QA
|
|
1831
|
+
`test-cases/`, PRD, txt) were being written next to the project root
|
|
1832
|
+
rather than under the canonical session home. As of 2.7.1 this
|
|
1833
|
+
helper is **removed** (and its only remaining import cleaned up).
|
|
1834
|
+
All artifact writes flow through
|
|
1835
|
+
`.peaks/_runtime/<sessionId>/<role>/<artifact>` per the F3 / 2.7.0
|
|
1836
|
+
canonical-session model. The `changeId` survives as a logical
|
|
1837
|
+
identifier in artifact frontmatter (read via `getCurrentChangeId`),
|
|
1838
|
+
but no longer maps to a filesystem directory under `.peaks/`.
|
|
1839
|
+
- `package.json` and `src/shared/version.ts` bumped 2.7.0 → 2.7.1.
|
|
1840
|
+
|
|
1841
|
+
### Fixed
|
|
1842
|
+
|
|
1843
|
+
- **`peaks request transition --allow-incomplete` bypass counter wrote
|
|
1844
|
+
to the project root** — `src/cli/commands/request-commands.ts` was
|
|
1845
|
+
building `sessionRoot` as `join('.peaks', resolvedSessionId)` for
|
|
1846
|
+
`recordBypass` / `isBypassLimitReached`, which produced
|
|
1847
|
+
`.peaks/2026-06-17-session-1baf0a/.bypass-count.json` files at
|
|
1848
|
+
the project root. The path formula is now
|
|
1849
|
+
`join('.peaks/_runtime', resolvedSessionId)`, matching the
|
|
1850
|
+
canonical home that `peaks session info --active` already resolves.
|
|
1851
|
+
Pinned by `tests/unit/bypass-tracker.test.ts` (new
|
|
1852
|
+
`2.7.1 root-pollution regression` describe).
|
|
1853
|
+
|
|
1854
|
+
### Security
|
|
1855
|
+
|
|
1856
|
+
- No new attack surface. The bypass-count path is now
|
|
1857
|
+
`.peaks/_runtime/<sessionId>/.bypass-count.json` (project-local,
|
|
1858
|
+
gitignored via the existing `.peaks/_runtime/` rule on
|
|
1859
|
+
`.gitignore:9`); no cross-user / cross-process access pattern was
|
|
1860
|
+
added or removed.
|
|
1861
|
+
|
|
1862
|
+
---
|
|
1863
|
+
|
|
1864
|
+
## [2.6.1] — 2026-06-18
|
|
1865
|
+
|
|
1866
|
+
### Added
|
|
1867
|
+
|
|
1868
|
+
- **Multi-IDE agent install (Slice 2.6.1.E)** — the `karpathy-reviewer`
|
|
1869
|
+
sub-agent now auto-installs on `npm i -g peaks-cli@latest` to **5
|
|
1870
|
+
platforms** instead of 1. Previously only `~/.claude/agents/`
|
|
1871
|
+
(claude-code) was populated; 2.6.1 extends to `~/.trae/agents/`,
|
|
1872
|
+
`~/.trae-cn/agents/`, `~/.codex/agents/`, and `~/.cursor/agents/`.
|
|
1873
|
+
The new `trae-cn` profile is opt-in via the existing
|
|
1874
|
+
`IDE_DETECTION_DIRS` table (presence of `~/.trae-cn/` triggers
|
|
1875
|
+
detection). All `agentsDir` paths go through `homedir() + join()` —
|
|
1876
|
+
the new `agentsDir paths are derived from homedir()` vitest pins
|
|
1877
|
+
the construction so a Windows user gets `C:\Users\name\.trae\agents`
|
|
1878
|
+
and a Mac user gets `/Users/name/.trae/agents`, not a hardcoded
|
|
1879
|
+
Unix literal.
|
|
1880
|
+
|
|
1881
|
+
### Fixed
|
|
1882
|
+
|
|
1883
|
+
- **orphan-service false-positive reductions (Slice 2.6.1.A)** —
|
|
1884
|
+
`peaks scan orphan` had been reporting 77 `cliSubcommandOrphans` for
|
|
1885
|
+
the peaks-cli repo. Four surgical fixes bring this down to 35
|
|
1886
|
+
(54% reduction):
|
|
1887
|
+
1. The `usageCount` algorithm now excludes the declaration file
|
|
1888
|
+
itself, so the threshold is "wired iff referenced in any other
|
|
1889
|
+
file" rather than "wired iff 2+ total string-literal matches
|
|
1890
|
+
(declaration + elsewhere)".
|
|
1891
|
+
2. `DEFAULT_DIRS` now includes `tests/` — test files often reference
|
|
1892
|
+
subcommands and were previously invisible to the scanner.
|
|
1893
|
+
3. `PARENT_COMMANDS` (35 known top-level command names) skips
|
|
1894
|
+
subcommand-orphan detection for the parent commands themselves.
|
|
1895
|
+
4. `scanExportsInFile` now matches `export default function name()`
|
|
1896
|
+
and `export default class Name`; `importedNameCount` now treats
|
|
1897
|
+
re-exports (`export { x } from './y'`, `export type { T } from
|
|
1898
|
+
'./y'`) as consumer references.
|
|
1899
|
+
Bonus: `OrphanScanOptions.baseRef` lets the scan diff against an
|
|
1900
|
+
arbitrary git ref (default: `HEAD`) for branch-vs-main reviews.
|
|
1901
|
+
- **karpathy-service code-fence skip (Slice 2.6.1.B)** — `peaks scan
|
|
1902
|
+
karpathy` no longer flags anti-pattern phrases (TODO, "should be
|
|
1903
|
+
fine", "maybe", "probably") when they appear inside fenced markdown
|
|
1904
|
+
code blocks. Illustrative code snippets were eroding trust in the
|
|
1905
|
+
structural scanner. The 4 guideline-marker tests
|
|
1906
|
+
(`tests/unit/karpathy-service-fence.test.ts`) pin the contract:
|
|
1907
|
+
inside-fence lines are skipped, outside-fence prose is still
|
|
1908
|
+
flagged, unclosed fences at EOF don't crash.
|
|
1909
|
+
|
|
1910
|
+
### Security
|
|
1911
|
+
|
|
1912
|
+
- **markdown escape in `formatKarpathyMarkdown` (Slice 2.6.1.C)** —
|
|
1913
|
+
the L1 LOW (`--project` value interpolated into markdown without
|
|
1914
|
+
escaping) is fixed via a new `escapeMarkdown(value: string)` helper
|
|
1915
|
+
that neutralises `\\`, `` ` ``, `[`, `]` in user-controlled strings
|
|
1916
|
+
before they hit the markdown report. Applied at 7 interpolation
|
|
1917
|
+
sites: `projectRoot`, `reviewFile`, `scannedAt`, `v.snippet`,
|
|
1918
|
+
`v.hint`, `warnings[].message`, and the gate header (which is
|
|
1919
|
+
static but routed through the helper for consistency). New vitest
|
|
1920
|
+
file `tests/unit/karpathy-service-escape.test.ts` (7 cases)
|
|
1921
|
+
covers the contract; AC-6 no-regression pins clean-ASCII output as
|
|
1922
|
+
byte-identical.
|
|
1923
|
+
- **KARPATHY_REVIEW heading-anchored gate (Slice 2.6.1.F)** — the L3
|
|
1924
|
+
LOW (the 4 guideline `mustContain` substring markers could be
|
|
1925
|
+
spoofed by any file that just *mentioned* the marker names as
|
|
1926
|
+
prose) is fixed by a new `headingMustContain: string[]` field on
|
|
1927
|
+
`ArtifactPrerequisite`. `KARPATHY_REVIEW` now requires each of
|
|
1928
|
+
the 4 guidelines to appear as an actual markdown heading
|
|
1929
|
+
(`#`–`###` line prefix), not just as prose. The `## Karpathy-Gate`
|
|
1930
|
+
header remains a substring match (it is the file's own gate
|
|
1931
|
+
header, not a section anchor). New vitest file
|
|
1932
|
+
`tests/unit/heading-must-contain.test.ts` (4 cases) covers:
|
|
1933
|
+
AC-1 valid headings pass, AC-2 prose-only fails, AC-3 partial
|
|
1934
|
+
headings fail with the missing marker named, AC-4 code-fence
|
|
1935
|
+
headings (regex is strict, not fence-aware) — documented as a
|
|
1936
|
+
known limitation pinned by the test.
|
|
1937
|
+
|
|
1938
|
+
### Internal
|
|
1939
|
+
|
|
1940
|
+
- **L2-install dogfood verification (Slice 2.6.1.D)** — confirmed
|
|
1941
|
+
end-to-end on a temp HOME that the 2.6.0 tarball's `postinstall`
|
|
1942
|
+
creates `~/.claude/agents/karpathy-reviewer.md` (15.4 KB, mode
|
|
1943
|
+
0600) and the matching `.peaks-managed` marker (245 bytes, JSON
|
|
1944
|
+
with `version`, `kind`, `agentName`, `sourcePath`, `contentSha256`).
|
|
1945
|
+
The 8-platform skill fan-out also confirmed (codex, cursor, trae,
|
|
1946
|
+
trae-cn, qoder, tongyi-lingma, hermes, openclaw). After Slice E,
|
|
1947
|
+
the agent install fans out to 4 of those platforms as well.
|
|
1948
|
+
|
|
1949
|
+
---
|
|
1950
|
+
|
|
1951
|
+
## [2.6.0] — 2026-06-18
|
|
1952
|
+
|
|
1953
|
+
### Added (karpathy-enforcement program — slices 1–5)
|
|
1954
|
+
|
|
1955
|
+
- **`peaks-rd` 4-way → 5-way fanout with karpathy-reviewer sub-agent** (slice
|
|
1956
|
+
1+5) — every RD implementation now spawns 5 parallel reviewers
|
|
1957
|
+
(`code-reviewer` + `security-reviewer` + `perf-baseline-reviewer` +
|
|
1958
|
+
`qa-test-cases-writer` + `karpathy-reviewer`). The 5th sub-agent emits a
|
|
1959
|
+
compact JSON envelope `{passed, violations, gateAction}` against the 4
|
|
1960
|
+
Karpathy guidelines (Think Before Coding / Simplicity First / Surgical
|
|
1961
|
+
Changes / Goal-Driven Execution). Contract slot at
|
|
1962
|
+
`skills/peaks-rd/references/rd-fanout-contracts.md` §"karpathy-reviewer
|
|
1963
|
+
contract (Slice 5/6)". Karpathy-guidelines context block injected into
|
|
1964
|
+
every RD sub-agent prompt via `rd-sub-agent-dispatch.md` (4-section
|
|
1965
|
+
verbatim).
|
|
1966
|
+
- **Hard Karpathy-Gate (Slice 5/6)** — new `KARPATHY_REVIEW` prereq in
|
|
1967
|
+
`src/services/artifacts/artifact-prerequisites.ts` blocks
|
|
1968
|
+
`peaks request transition --state qa-handoff` when `rd/karpathy-review.md`
|
|
1969
|
+
is missing or doesn't contain the `## Karpathy-Gate` header + 4
|
|
1970
|
+
title-case section markers (Think Before Coding / Simplicity First /
|
|
1971
|
+
Surgical Changes / Goal-Driven Execution). CLI error code
|
|
1972
|
+
`PREREQUISITES_MISSING`. Escape hatch: `peaks request transition
|
|
1973
|
+
--allow-incomplete --confirm` (assisted mode).
|
|
1974
|
+
- **Karpathy prompt-injection across the full RD surface** (slice 1) —
|
|
1975
|
+
4-layer guard: SKILL.md body + 3 reference docs
|
|
1976
|
+
(`mandatory-tech-doc.md`, `rd-fanout-contracts.md`,
|
|
1977
|
+
`rd-sub-agent-dispatch.md`) + 1 sub-agent dispatch context. Regression
|
|
1978
|
+
test `tests/unit/skills/karpathy-prompt-injection.test.ts` (9 cases)
|
|
1979
|
+
asserts the 4-section guidelines block is present in all 4 layers.
|
|
1980
|
+
- **`peaks scan karpathy` CLI** (slice 5) — structural scanner for
|
|
1981
|
+
`rd/karpathy-review.md`; markdown + JSON output; 4 guideline
|
|
1982
|
+
classification + section coverage + violation counts. Companion to
|
|
1983
|
+
the karpathy-reviewer sub-agent (regex / file-presence vs semantic
|
|
1984
|
+
review). New service `src/services/scan/karpathy-service.ts` (330
|
|
1985
|
+
lines).
|
|
1986
|
+
- **Tech-doc 3 mandatory sections + Gate C enforcer** (slice 2) —
|
|
1987
|
+
`Architecture` / `Existing API or Component Inventory` / `Trade-offs`
|
|
1988
|
+
sections now required in every RD `tech-doc.md`. Enforced at
|
|
1989
|
+
spec-locked gate. New service
|
|
1990
|
+
`src/services/audit/enforcers/tech-doc-mandatory-sections.ts`.
|
|
1991
|
+
- **`peaks scan api-surface` CLI** (slice 3) — identifies existing API
|
|
1992
|
+
endpoints / components / stores / mocks in the consumer project
|
|
1993
|
+
before any new code is written. `--project --format --scope --max-per-kind`
|
|
1994
|
+
options; output feeds the tech-doc's `## Existing API or Component
|
|
1995
|
+
Inventory` section. New service
|
|
1996
|
+
`src/services/scan/api-surface-service.ts` (~280 lines).
|
|
1997
|
+
- **`peaks scan orphan` CLI** (slice 4) — 4-kind orphan detection
|
|
1998
|
+
(exportOrphan / importOrphan / cliSubcommandOrphan /
|
|
1999
|
+
docEndpointOrphan). `--project --format --scope --strict` options;
|
|
2000
|
+
aligns with karpathy §3 Surgical Changes "remove what your changes
|
|
2001
|
+
made unused". New service `src/services/scan/orphan-service.ts`
|
|
2002
|
+
(~330 lines).
|
|
2003
|
+
- **Slice 1-4 + Slice 5 all converged at `state: verdict-issued`** with
|
|
2004
|
+
cumulative **86/86** vitest pass, 0 tsc errors, 0 lint findings, 0
|
|
2005
|
+
diff-vs-scope violations, 0 unclassified files, 0 repair cycles.
|
|
2006
|
+
|
|
2007
|
+
### Added (Slice 6/6 + Slice 7/7 — karpathy-reviewer sub-agent prompt + auto-install)
|
|
2008
|
+
|
|
2009
|
+
- **`karpathy-reviewer` LLM sub-agent prompt** (slice 6) — full system
|
|
2010
|
+
prompt at `agents/karpathy-reviewer.md` (15.1 KB, 229 lines). 10
|
|
2011
|
+
sections covering role boundary, 4 input contracts, 4 violation
|
|
2012
|
+
detection rules (one per Karpathy guideline), JSON envelope schema
|
|
2013
|
+
(`passed` / `violations[]` / `gateAction`), file-write contract
|
|
2014
|
+
(title-case `## Karpathy-Gate` + 4 guideline sections), 8 hard
|
|
2015
|
+
prohibitions, 5 anti-patterns. Project-internal 2-line pointer at
|
|
2016
|
+
`skills/peaks-rd/references/karpathy-reviewer-prompt.md` (peaks-cli
|
|
2017
|
+
2.0 rules convention).
|
|
2018
|
+
- **Auto-install on `npm i -g peaks-cli@latest`** (slice 7) — the
|
|
2019
|
+
`peaks-cli` postinstall (`scripts/install-skills.mjs`) now copies
|
|
2020
|
+
bundled agents from the tarball to `~/.claude/agents/` with
|
|
2021
|
+
content-hash drift detection (`.peaks-managed` marker + SHA-256).
|
|
2022
|
+
Mirrors the existing `output-styles` install contract. New function
|
|
2023
|
+
`installBundledAgents` + per-platform fan-out
|
|
2024
|
+
`installBundledAgentsForAllPlatforms` (claude-code is the only
|
|
2025
|
+
platform with `agentsDir` today; future platforms opt in by adding
|
|
2026
|
+
the field to their `IDE_SKILL_INSTALL_PROFILES` entry).
|
|
2027
|
+
- **Escape hatch** (slice 7) — `PEAKS_SKIP_AGENT_INSTALL=1` (skip
|
|
2028
|
+
agent install in CI / sandboxed environments);
|
|
2029
|
+
`PEAKS_CLAUDE_AGENTS_DIR=/custom/path` (per-IDE env-var override,
|
|
2030
|
+
parallel to `PEAKS_CLAUDE_SKILLS_DIR` and
|
|
2031
|
+
`PEAKS_CLAUDE_OUTPUT_STYLES_DIR`).
|
|
2032
|
+
- **Tarball coverage** (slice 7) — `package.json#files` adds
|
|
2033
|
+
`"agents/**"` alongside the existing `"skills/**"` and
|
|
2034
|
+
`"output-styles/**"`. `npm pack --dry-run` confirms
|
|
2035
|
+
`agents/karpathy-reviewer.md` (15.8 kB) ships in the tarball.
|
|
2036
|
+
|
|
2037
|
+
### Security
|
|
2038
|
+
|
|
2039
|
+
- All 4 karpathy sub-agent review surfaces (RD main loop + 5-way
|
|
2040
|
+
fanout) explicitly **MUST NOT install hooks, agents, MCP, or
|
|
2041
|
+
settings** — the global peaks-rd red line, restated as a
|
|
2042
|
+
hard prohibition in the karpathy-reviewer prompt.
|
|
2043
|
+
- `installBundledAgents` uses the same TOCTOU-safe atomic write
|
|
2044
|
+
pattern as `installBundledOutputStyles`:
|
|
2045
|
+
`writeFileExclusively` (O_EXCL + O_NOFOLLOW, 0o600 mode, file
|
|
2046
|
+
identity check after write) + `.peaks-managed` marker with
|
|
2047
|
+
SHA-256 hash. Drift detection refuses to overwrite user-authored
|
|
2048
|
+
files (no marker) or stale markers (different source path).
|
|
2049
|
+
- The `PEAKS_CLAUDE_AGENTS_DIR` env-var override is documented but
|
|
2050
|
+
not security-sensitive (it points the install at a user-chosen
|
|
2051
|
+
dir; no escalation path).
|
|
2052
|
+
- The 3 LOW security findings documented in `qa/security-findings.md`
|
|
2053
|
+
(markdown injection via `--project` value interpolation, path
|
|
2054
|
+
traversal via arbitrary paths, KARPATHY_REVIEW prereq marker
|
|
2055
|
+
spoof) are all non-blocking by design (RD-authored input only,
|
|
2056
|
+
read-only file IO, drift detection prevents tamper).
|
|
2057
|
+
|
|
2058
|
+
### Tests
|
|
2059
|
+
|
|
2060
|
+
- **141/141 vitest pass** (was 86 in 2.5.0; +55 across the 7 slices):
|
|
2061
|
+
- 9 new `karpathy-prompt-injection.test.ts` (slice 1)
|
|
2062
|
+
- 7 new `tech-doc-mandatory-sections.test.ts` (slice 2)
|
|
2063
|
+
- 8 new `api-surface-scan.test.ts` (slice 3)
|
|
2064
|
+
- 8 new `orphan-scan.test.ts` (slice 4)
|
|
2065
|
+
- 14 new `karpathy-5way-fanout.test.ts` (slice 5)
|
|
2066
|
+
- 9 new `karpathy-6-agent-prompt.test.ts` (slice 6)
|
|
2067
|
+
- 8 new `installBundledAgents` cases in `install-skills-script.test.ts`
|
|
2068
|
+
(slice 7)
|
|
2069
|
+
- **Zero regression** across the 86 prior cases (slices 1-5) and
|
|
2070
|
+
the 38 prior `install-skills-script.test.ts` cases (slice 7's
|
|
2071
|
+
new agents branch).
|
|
2072
|
+
- Hard Karpathy-Gate verified end-to-end:
|
|
2073
|
+
`peaks request transition --state qa-handoff` with
|
|
2074
|
+
`rd/karpathy-review.md` present → `state: qa-handoff`; without it
|
|
2075
|
+
→ `code: PREREQUISITES_MISSING, missing: rd/karpathy-review.md`.
|
|
2076
|
+
- End-to-end postinstall verified against a temp HOME:
|
|
2077
|
+
`Peaks agents installed across 1 platforms (1 total files)`;
|
|
2078
|
+
`~/.claude/agents/karpathy-reviewer.md` (15,786 bytes, mode 0600);
|
|
2079
|
+
`~/.claude/agents/karpathy-reviewer.md.peaks-managed` (224 bytes,
|
|
2080
|
+
valid JSON marker with SHA-256).
|
|
2081
|
+
|
|
2082
|
+
### L2 dogfood (deferred)
|
|
2083
|
+
|
|
2084
|
+
- **L2-install test for Slice 7** — the auto-install path is
|
|
2085
|
+
L1-verified (vitest + end-to-end postinstall against a temp HOME)
|
|
2086
|
+
but not yet L2-verified on a real consumer machine. A real
|
|
2087
|
+
`npm i -g peaks-cli@2.6.0` + postinstall + content-hash drift
|
|
2088
|
+
check + uninstall + reinstall cycle is the next L2 step (Slice 8
|
|
2089
|
+
follow-up if issues surface).
|
|
2090
|
+
- **Trae / Codex / Cursor / Qoder / Tongyi Lingma / Hermes /
|
|
2091
|
+
OpenClaw agent install** — only `claude-code` has `agentsDir`
|
|
2092
|
+
populated in `IDE_SKILL_INSTALL_PROFILES`. Future slices can add
|
|
2093
|
+
the field per-platform once each IDE's agent directory convention
|
|
2094
|
+
is confirmed.
|
|
2095
|
+
- **Slice 6 user-handoff doc** — `rd/karpathy-reviewer-agent-handoff.md`
|
|
2096
|
+
is now the auto-install verification doc (the original user-cp
|
|
2097
|
+
design was superseded by Slice 7). L1-verified via the
|
|
2098
|
+
`karpathy-6-agent-prompt.test.ts` AC-7 + AC-8 assertions; L2
|
|
2099
|
+
verification deferred to the first real npm publish.
|
|
2100
|
+
|
|
2101
|
+
---
|
|
2102
|
+
|
|
2103
|
+
## [2.5.0] — 2026-06-17
|
|
2104
|
+
|
|
2105
|
+
### Fixed (realworld-fixes slice 014)
|
|
2106
|
+
|
|
2107
|
+
- **Context-overflow guidance now visible in SKILL.md body** (sub-fix A) — slice
|
|
2108
|
+
011 added `peaks session checkpoint` / `peaks session resume` CLIs plus
|
|
2109
|
+
`references/checkpoint-resume.md` + `references/periodic-checkpoint.md`, but
|
|
2110
|
+
SKILL.md body only mentioned them in a single line. New Claude Code sessions
|
|
2111
|
+
that load SKILL.md never learned the optimization existed. `### Peaks-Cli
|
|
2112
|
+
Step 0.75: Resume from checkpoint` and `### Peaks-Cli Step N: Periodic
|
|
2113
|
+
checkpoint` headings are now in the body (≥ 5 lines each), with explicit
|
|
2114
|
+
`peaks session checkpoint` / `peaks session resume` CLI mentions and
|
|
2115
|
+
reference-doc pointers. Byte cap bumped 22K → 24K (precedent: 18K → 20K → 22K).
|
|
2116
|
+
- **`peaks test <pattern...>` CLI with smart cache** (sub-fix B) — new CLI
|
|
2117
|
+
auto-detects jest / vitest / mocha from consumer `package.json`, runs with
|
|
2118
|
+
`--cache` (NOT `--no-cache`, overriding the consumer's `test` script).
|
|
2119
|
+
Per-test fingerprint cache at `.peaks/_runtime/test-cache/<hash>.json` with
|
|
2120
|
+
schema `{ fileMtime, fileSha256, testName, status, durationMs, lastRun }`
|
|
2121
|
+
skips unchanged tests on re-run. Options: `--changed`, `--clear-cache`,
|
|
2122
|
+
`--no-cache-result`, `--passthrough`, `--all`. Exits 0 if all pass/skip,
|
|
2123
|
+
1 if any fail. This is a NEW top-level subcommand (peaks-test exception
|
|
2124
|
+
per G16; not a pure wrapper because of smart-cache value-add).
|
|
2125
|
+
- **Playwright MCP multi-terminal conflict resolution** (sub-fix C) — new
|
|
2126
|
+
`peaks playwright start | ls | stop` CLI. `start` walks default port 8931
|
|
2127
|
+
→ 8949, spawns `playwright-mcp` via `npx` (not bundled), writes
|
|
2128
|
+
`.peaks/_runtime/playwright-sessions/<terminal-id>.json` with
|
|
2129
|
+
`{ port, userDataDir, startedAt, pid }`. Terminal ID: `TERM_SESSION_ID` ||
|
|
2130
|
+
`WT_SESSION` || hash(`ppid` + `SSH_TTY`). Conflict detection emits a
|
|
2131
|
+
clear "port in use; pick --port or --reuse" message.
|
|
2132
|
+
|
|
2133
|
+
### Security
|
|
2134
|
+
|
|
2135
|
+
- `peaks playwright start` uses `spawn` with array argv (no shell concat) to
|
|
2136
|
+
eliminate command-injection risk.
|
|
2137
|
+
- Terminal IDs are sanitized (`[^a-zA-Z0-9_.-]` → `_`) before becoming
|
|
2138
|
+
filenames.
|
|
2139
|
+
- Port walk range is bounded 8931-8949 (19 ports) to prevent scanning the
|
|
2140
|
+
full port space.
|
|
2141
|
+
|
|
2142
|
+
### Tests
|
|
2143
|
+
|
|
2144
|
+
- 81 new vitest assertions across `test-cache-service.test.ts` (19),
|
|
2145
|
+
`test-command.test.ts` (17), `playwright-command.test.ts` (18), and the
|
|
2146
|
+
bumped skill-slim-content-coverage test (now 18 cases under 24K cap).
|
|
2147
|
+
- Argv contract: `peaks test` defaults include `--cache`; `--no-cache` is
|
|
2148
|
+
only added when the user explicitly passes it (or `--passthrough`).
|
|
2149
|
+
|
|
2150
|
+
### L2 dogfood (deferred)
|
|
2151
|
+
|
|
2152
|
+
- None — all 3 sub-fixes are L1-only; no real-install / real-consumer
|
|
2153
|
+
dogfood required for 2.5.0.
|
|
2154
|
+
|
|
2155
|
+
---
|
|
2156
|
+
|
|
2157
|
+
## [2.4.0] — 2026-06-17
|
|
2158
|
+
|
|
2159
|
+
### Added
|
|
2160
|
+
|
|
2161
|
+
- **`CURSOR_ADAPTER`** (slice 012) — Cursor IDE registration on the existing
|
|
2162
|
+
`IdeAdapter` shape. 12 required fields filled: `id: 'cursor'`,
|
|
2163
|
+
`settings.dirName: '.cursor'`, `settingsFileName: 'settings.json'`,
|
|
2164
|
+
`envVar: 'CURSOR_PROJECT_DIR'` (UNVERIFIED),
|
|
2165
|
+
`hookEvent: 'beforeShellExecution'` (UNVERIFIED),
|
|
2166
|
+
`toolMatcher: 'Bash'`, `promptSizeAware: true`, `statusline: true`.
|
|
2167
|
+
`standardsProfile` and `skillInstall` left UNVERIFIED — falls back to
|
|
2168
|
+
the legacy Claude Code path with stderr warning per slice #011 framework.
|
|
2169
|
+
- **`CODEX_ADAPTER`** (slice 013) — OpenAI Codex CLI registration. 12
|
|
2170
|
+
required fields: `id: 'codex'`, `settings.dirName: '.codex'`,
|
|
2171
|
+
`settingsFileName: 'settings.json'`,
|
|
2172
|
+
`envVar: 'CODEX_PROJECT_DIR'` (UNVERIFIED),
|
|
2173
|
+
`hookEvent: 'pre_tool_use'` (UNVERIFIED),
|
|
2174
|
+
`toolMatcher: 'shell'`, `promptSizeAware: false` (Codex hook semantics
|
|
2175
|
+
differ from Claude's), `statusline: false` (Codex CLI has no statusline
|
|
2176
|
+
UI). `standardsProfile` and `skillInstall` left UNVERIFIED — same
|
|
2177
|
+
legacy fallback.
|
|
2178
|
+
- **`HOOK_COMMAND_BY_IDE` dispatch table** (slice 012+013 infrastructure)
|
|
2179
|
+
— `src/services/skills/hooks-settings-service.ts::resolveHookSpec`
|
|
2180
|
+
refactored from hardcoded if/else into a per-IDE dispatch table.
|
|
2181
|
+
Byte-stable for `claude-code` and `trae` (AC8 / AC15 ✓). New adapters
|
|
2182
|
+
join the table without per-IDE branch rewrites.
|
|
2183
|
+
|
|
2184
|
+
### Security
|
|
2185
|
+
|
|
2186
|
+
- UNVERIFIED annotations on `envVar` / `hookEvent` for Cursor and Codex
|
|
2187
|
+
carry the same risk profile as the slice #009 Trae UNVERIFIED state —
|
|
2188
|
+
the per-IDE field values are not yet confirmed against real installs.
|
|
2189
|
+
Until L2 dogfood closes, `peaks hooks install --ide cursor|codex`
|
|
2190
|
+
will write hook entries that follow each IDE's most-likely hook
|
|
2191
|
+
schema; if the IDE rejects the entry, the install returns a non-zero
|
|
2192
|
+
exit code with the schema mismatch surfaced in stderr.
|
|
2193
|
+
- Bundled-skills postinstall for Cursor / Codex writes to
|
|
2194
|
+
`~/.claude/skills/` (legacy Claude Code fallback), NOT to
|
|
2195
|
+
`~/.cursor/skills/` or `~/.codex/skills/`. This is the slice #011
|
|
2196
|
+
framework's intentional fallback for adapters whose `skillInstall` is
|
|
2197
|
+
UNVERIFIED; AC16 is 3-layer-verified.
|
|
2198
|
+
|
|
2199
|
+
### Performance
|
|
2200
|
+
|
|
2201
|
+
- `detectIdeFromContext` cwd-fallback path stays linear in adapter count.
|
|
2202
|
+
Slice #2 memory anchor: 2 adapters ≈ 27µs; this release: 6 adapters
|
|
2203
|
+
≈ 67µs (extrapolated; well under 1ms budget).
|
|
2204
|
+
- `HOOK_COMMAND_BY_IDE` dispatch is a `Map.get` lookup — O(1) per hook
|
|
2205
|
+
install, no per-IDE if/else branch overhead.
|
|
2206
|
+
|
|
2207
|
+
### Tests
|
|
2208
|
+
|
|
2209
|
+
- 48 new vitest cases across `cursor-adapter.test.ts` (24) and
|
|
2210
|
+
`codex-adapter.test.ts` (24). **182/182 pass** in
|
|
2211
|
+
`tests/unit/ide/` (was 134; +48).
|
|
2212
|
+
- AC6 / AC13 explicitly assert `<projectRoot>/.<ide>/settings.json` for
|
|
2213
|
+
`scope=project` (L1 default); AC7 explicitly asserts
|
|
2214
|
+
`~/<ide>/settings.json` for `scope=global`.
|
|
2215
|
+
- AC16 (UNVERIFIED skillInstall fallback) verified at three layers:
|
|
2216
|
+
(1) adapter field is `undefined`; (2) `getSkillInstall('cursor')` and
|
|
2217
|
+
`getSkillInstall('codex')` return `null`; (3) `install-skills.mjs:474-484`
|
|
2218
|
+
emits stderr "falling back to the legacy Claude Code path
|
|
2219
|
+
(~/.claude/skills + ~/.claude/output-styles)" and writes to
|
|
2220
|
+
`~/.claude/skills/`.
|
|
2221
|
+
- Byte-stability: `git diff
|
|
2222
|
+
src/services/ide/adapters/{claude-code,trae}-adapter.ts` returns
|
|
2223
|
+
empty (AC8 / AC15 ✓). Dispatch chokepoints `resource-profile.ts` /
|
|
2224
|
+
`ide-aware-standards-service.ts` / `install-skills.mjs` untouched
|
|
2225
|
+
(R6 inverse rule ✓).
|
|
2226
|
+
|
|
2227
|
+
### L2 dogfood (deferred)
|
|
2228
|
+
|
|
2229
|
+
- Real-install dogfood for Cursor 1.x — fill `CURSOR_ADAPTER.envVar` and
|
|
2230
|
+
`CURSOR_ADAPTER.hookEvent` from real payload, remove UNVERIFIED
|
|
2231
|
+
annotations. Follow the slice #009 Trae-dogfood pattern
|
|
2232
|
+
(`tests/fixtures/cursor/cursor-1x-payload.json` + 5+ dogfood paths on
|
|
2233
|
+
a real install once available).
|
|
2234
|
+
- Real-install dogfood for Codex — same pattern as Cursor.
|
|
2235
|
+
- `standardsProfile` + `skillInstall` filling for both adapters is
|
|
2236
|
+
gated on the env/hook dogfood landing first.
|
|
2237
|
+
- Qoder + Tongyi Lingma adapters (slice #3+ backlog) remain deferred.
|
|
2238
|
+
|
|
2239
|
+
### Notes
|
|
2240
|
+
|
|
2241
|
+
- Pipeline layout caveat: `peaks workflow verify-pipeline` expects
|
|
2242
|
+
artifacts under `.peaks/_runtime/<change-id>/...` (per-change layout) but this
|
|
2243
|
+
session writes under `.peaks/_runtime/<session-id>/...` (per-session
|
|
2244
|
+
runtime layout). The pipeline may report `gateC: fail` despite a
|
|
2245
|
+
PASS verdict; reconcile in a future slice (peaks-cli tooling fix,
|
|
2246
|
+
not a 2.4.0 blocker).
|
|
2247
|
+
|
|
2248
|
+
---
|
|
2249
|
+
|
|
2250
|
+
## [2.3.0] — 2026-06-17
|
|
2251
|
+
|
|
2252
|
+
### Added
|
|
2253
|
+
|
|
2254
|
+
- **`peaks workspace consolidate`** (slice 011) — atomic cross-date session retirement.
|
|
2255
|
+
Dry-run by default; `--apply` moves `.peaks/_runtime/<sessionId>/` to
|
|
2256
|
+
`.peaks/_archive/retrospective-<date>/<sessionId>/` with `manifest.json`.
|
|
2257
|
+
Supports `--keep <sessionId>...` and `--older-than <days>`. Invoked by skill,
|
|
2258
|
+
not by user.
|
|
2259
|
+
- **`peaks session checkpoint`** (slice 011) — JSON snapshot of session state
|
|
2260
|
+
for context-overflow recovery. 11 fields (sessionId, lastActivity, currentPlan,
|
|
2261
|
+
openQuestions[], recentDecisions[], recentArtifactPaths[], gitStatus,
|
|
2262
|
+
skillsActive, todoState, reason, createdAt). Max 10 retained, oldest auto-pruned.
|
|
2263
|
+
- **`peaks session resume`** (slice 011) — reads checkpoint JSON, emits structured
|
|
2264
|
+
markdown block for skill to prepend on session restart.
|
|
2265
|
+
- **peaks-solo Step 0.5** (slice 011) — cross-date session check.
|
|
2266
|
+
IDE-agnostic; lives in `skills/peaks-solo/references/cross-date-session-check.md`.
|
|
2267
|
+
- **peaks-solo Step 0.75** (slice 011) — checkpoint resume probe.
|
|
2268
|
+
- **peaks-solo Step N** (slice 011) — periodic checkpoint guidance.
|
|
2269
|
+
|
|
2270
|
+
### Security
|
|
2271
|
+
|
|
2272
|
+
- Path-traversal guard on `consolidate` destination (rejects `..`).
|
|
2273
|
+
- `checkpoint` writes only inside `.peaks/_runtime/<sessionId>/checkpoints/`.
|
|
2274
|
+
- `resume` reads only from `.peaks/_runtime/<sessionId>/checkpoints/*.json`.
|
|
2275
|
+
|
|
2276
|
+
### Performance
|
|
2277
|
+
|
|
2278
|
+
- 50-session `consolidate` plan+apply completes in <500ms (warm cache).
|
|
2279
|
+
- `checkpoint` write <100ms per call.
|
|
2280
|
+
- 12th checkpoint prunes oldest (MAX_CHECKPOINTS=10).
|
|
2281
|
+
|
|
2282
|
+
### Tests
|
|
2283
|
+
|
|
2284
|
+
- 25 new unit tests (12 consolidate + 8 checkpoint + 5 resume) — all green.
|
|
2285
|
+
- 112/112 slice-relevant tests pass; 9 pre-existing baseline failures on
|
|
2286
|
+
`26a4bab` are unrelated and out of scope.
|
|
2287
|
+
|
|
2288
|
+
### L2 dogfood (deferred)
|
|
2289
|
+
|
|
2290
|
+
- Cross-IDE dogfood for Trae deferred to follow-up — see
|
|
2291
|
+
`.peaks/_runtime/2026-06-16-session-aaf8c7/qa/dogfood/2026-06-17-cross-ide.md`.
|
|
2292
|
+
- slice #2 adapter registry contains only `claude-code` + `trae`; Cursor / Codex /
|
|
2293
|
+
Qoder / Tongyi Lingma are slice #3+ scope.
|
|
2294
|
+
|
|
2295
|
+
## [2.2.1] — 2026-06-14
|
|
2296
|
+
|
|
2297
|
+
### Fixed
|
|
2298
|
+
|
|
2299
|
+
- **Removed the `Bash` matcher from the consumer-project
|
|
2300
|
+
`.claude/settings.local.json` template** (`TEMPLATE_VERSION` 1.1.0 →
|
|
2301
|
+
1.2.0). The Bash matcher was emitting `process.exit(1)` with no
|
|
2302
|
+
stderr on every non-`peaks` Bash call, producing
|
|
2303
|
+
`Failed with non-blocking status code: No stderr output` noise in
|
|
2304
|
+
the Claude Code UI even though the underlying tool call still
|
|
2305
|
+
proceeded (per Claude Code's hook contract, `exit 1` is a
|
|
2306
|
+
non-blocking error, not a block — only `exit 2` blocks; only the
|
|
2307
|
+
absence of a downstream `[Fact-Forcing Gate]` turned the exit-1
|
|
2308
|
+
into pure noise). The `[Fact-Forcing Gate]` is an Edit/Write
|
|
2309
|
+
concern (it forces the LLM to quote user instructions before any
|
|
2310
|
+
file write), and the Bash matcher was unrelated to that purpose.
|
|
2311
|
+
Bash command enforcement is now owned by `peaks gate enforce`,
|
|
2312
|
+
which `peaks hooks install` injects into `.claude/settings.json`
|
|
2313
|
+
and which exits 0 silently for any command not guarded by a
|
|
2314
|
+
registered SOP gate.
|
|
2315
|
+
|
|
2316
|
+
Concrete changes:
|
|
2317
|
+
- `src/services/workspace/claude-settings-template.ts` — deleted
|
|
2318
|
+
`PEAKS_SUBCOMMAND_ALLOWLIST`, `buildBashHookCommand()`. The
|
|
2319
|
+
template now emits only the `Write|Edit|MultiEdit` matcher.
|
|
2320
|
+
- `TEMPLATE_VERSION` bumped to `1.2.0`. The offline-template
|
|
2321
|
+
self-heal (`peaks workspace init` re-run; comparator
|
|
2322
|
+
`templateContentMatches` sees the dropped entry) refreshes
|
|
2323
|
+
`.peaks/.claude-settings-template.json` and the consumer's
|
|
2324
|
+
`.claude/settings.local.json` on the next `peaks workspace init`.
|
|
2325
|
+
- The `peaks workspace init` install prompt for the project-level
|
|
2326
|
+
`.claude/settings.json` still installs the `peaks gate enforce`
|
|
2327
|
+
hook for Bash (unchanged).
|
|
2328
|
+
|
|
2329
|
+
### Tests
|
|
2330
|
+
|
|
2331
|
+
- `tests/unit/workspace/claude-settings-template.test.ts` — added
|
|
2332
|
+
`template only emits the Write|Edit|MultiEdit matcher` assertion.
|
|
2333
|
+
Removed four Bash-specific tests (hook command contract, embedded
|
|
2334
|
+
double-quote escaping, `process.argv[1]` reading for the Bash
|
|
2335
|
+
hook, `peaks workspace init` allow / `npm install foo` deny).
|
|
2336
|
+
`templateContentMatches returns false when entry length differs`
|
|
2337
|
+
now uses an empty `PreToolUse` array to keep the test name
|
|
2338
|
+
accurate.
|
|
2339
|
+
- `tests/unit/workspace/workspace-init-claude-hooks.test.ts` — case A
|
|
2340
|
+
(default-flags init) assertion changed from
|
|
2341
|
+
`expect(matchers).toContain('Bash')` to
|
|
2342
|
+
`expect(matchers).toEqual(['Write|Edit|MultiEdit'])`. File-level
|
|
2343
|
+
AC description updated to reflect the one-matcher shape.
|
|
2344
|
+
|
|
2345
|
+
Full suite: **2957 passed, 12 skipped, 0 failed**.
|
|
2346
|
+
`peaks doctor`: **70 passed, 0 failed**.
|
|
2347
|
+
|
|
2348
|
+
---
|
|
2349
|
+
|
|
2350
|
+
## [2.2.0] — 2026-06-14
|
|
2351
|
+
|
|
2352
|
+
### Added
|
|
2353
|
+
|
|
2354
|
+
- **Generic fzf binary picker** — `src/services/fuzzy-matching/fzf-pick-service.ts` exposes
|
|
2355
|
+
`pickFromList<T>({ items, formatLine, parseLine, outputPath, meta, fzfBin, preview, overrideStdin, projectRoot, multi, prompt })`.
|
|
2356
|
+
Promoted from `slice-pick-service.ts`; the algorithm is fzf-free, the binary is the consumer.
|
|
2357
|
+
|
|
2358
|
+
- **`peaks memory list`** — new subcommand. Reads `.peaks/memory/index.json`, applies optional
|
|
2359
|
+
`--kind` filter, returns the full entry set as the standard envelope. Mirrors
|
|
2360
|
+
`peaks retrospective index`.
|
|
2361
|
+
|
|
2362
|
+
- **`peaks memory list --pick`** and **`peaks retrospective index --pick`** — both spawn fzf
|
|
2363
|
+
for interactive multi-select. Picked subset is written to `.peaks/memory/picked.json` or
|
|
2364
|
+
`.peaks/retrospective/picked.json` respectively. Exit code 127 on missing/old fzf.
|
|
2365
|
+
|
|
2366
|
+
- **`headroom-ai` preferences resolver** — `src/services/context/headroom-prefs.ts` with
|
|
2367
|
+
`resolveHeadroomOptions` and `shouldCompressResults` (pure functions, no IO). Sub-agent
|
|
2368
|
+
dispatch now reads `loadPreferences().headroom` and:
|
|
2369
|
+
- Hard-blocks `--use-headroom` when `headroom.enabled = false` (new error code
|
|
2370
|
+
`HEADROOM_DISABLED_BY_PREFERENCE`, exit 1).
|
|
2371
|
+
- Respects `--headroom-mode <m>` CLI override > `perTouchpoint.subAgentDispatch` >
|
|
2372
|
+
`defaultMode` precedence.
|
|
2373
|
+
- Falls back to G7 metadata-only on any preferences load failure (no dispatch break).
|
|
2374
|
+
|
|
2375
|
+
- **New preferences fields** — `headroom.perTouchpoint.subAgentDispatch` and
|
|
2376
|
+
`headroom.compressMinBytes` (default 4096). Shallow-merge on existing
|
|
2377
|
+
`preferences.json` files; no migration required.
|
|
2378
|
+
|
|
2379
|
+
- **Search result compression** — `searchMemoryWithResults` and
|
|
2380
|
+
`searchRetrospectiveWithResults` return a `CompressedResultsEnvelope` alongside the
|
|
2381
|
+
structured `matches` array. Joined match text is compressed via headroom-ai when the
|
|
2382
|
+
byte count exceeds `headroom.compressMinBytes`. Below-threshold or headroom-disabled
|
|
2383
|
+
cases return `compressedResults: null` (silent, non-blocking fallback).
|
|
2384
|
+
|
|
2385
|
+
- **`peaks memory search --compress-results`** — passes the option through. (Retrospective
|
|
2386
|
+
search gets the same in a follow-up slice if requested.)
|
|
2387
|
+
|
|
2388
|
+
- **`peaks slice decompose --benchmark`** — emits a `SliceBenchmark` envelope
|
|
2389
|
+
(`totalMs`, `codegraphQueries`, `p50ConfidenceDistribution`, `inputApproxBytes`,
|
|
2390
|
+
`outputJsonBytes`, `capturedAt`) and persists it to
|
|
2391
|
+
`.peaks/_runtime/benchmarks/<rid>.benchmark.json` for cross-version comparison.
|
|
2392
|
+
This is the egress path for verifying 2.1.0 → 2.1.1 algorithm optimizations
|
|
2393
|
+
(Stoer-Wagner min-cut + flow_step weights) end-to-end.
|
|
2394
|
+
|
|
2395
|
+
### Changed
|
|
2396
|
+
|
|
2397
|
+
- **`src/services/slice/slice-pick-service.ts`** is now a thin wrapper around
|
|
2398
|
+
`fzf-pick-service.ts`. Public API (`pickSlicesInteractive`, `PickOptions`,
|
|
2399
|
+
`PickedResult`) is preserved.
|
|
2400
|
+
|
|
2401
|
+
### Tests
|
|
2402
|
+
|
|
2403
|
+
- `tests/unit/fuzzy-matching/fzf-pick-service.test.ts` — 10 cases (ENOENT, version check,
|
|
2404
|
+
single/multi select, Esc-130, parseLine rejection, dedup, artifact write, overrideStdin,
|
|
2405
|
+
empty items).
|
|
2406
|
+
- `tests/unit/headroom-prefs.test.ts` — 11 cases covering all `resolveHeadroomOptions`
|
|
2407
|
+
branches and `shouldCompressResults` (disabled / below-threshold / enabled / per-touchpoint
|
|
2408
|
+
mode).
|
|
2409
|
+
- `tests/unit/slice/slice-pick-service.test.ts` — pre-existing 7 cases still pass.
|
|
2410
|
+
- `tests/unit/memory-search-cli.test.ts` — 8 cases updated to await the now-async
|
|
2411
|
+
`runMemorySearch`.
|
|
2412
|
+
|
|
2413
|
+
### Dogfood
|
|
2414
|
+
|
|
2415
|
+
- `HEADROOM_DISABLED_BY_PREFERENCE` hard block verified end-to-end with a temp
|
|
2416
|
+
`.peaks/preferences.json` (`headroom.enabled=false`): exit 1, envelope code matches,
|
|
2417
|
+
two actionable `nextActions`. Without `--use-headroom`, the same project dispatches
|
|
2418
|
+
normally.
|
|
2419
|
+
|
|
2420
|
+
---
|
|
2421
|
+
|
|
2422
|
+
## [2.1.1] — 2026-06-13
|
|
2423
|
+
|
|
2424
|
+
### Added
|
|
2425
|
+
|
|
2426
|
+
- **`peaks slice decompose <rid>`** — the 6-stage slice-decomposition
|
|
2427
|
+
algorithm. Reads the PRD body, queries `peaks codegraph` for each
|
|
2428
|
+
acceptance criterion, reads `.understand-anything/knowledge-graph.json`
|
|
2429
|
+
for semantic boundary detection, builds a dependency DAG with verified
|
|
2430
|
+
edges, computes SCC + critical path, runs Stoer-Wagner-style min-cut
|
|
2431
|
+
with semantic-preference weights (`flow_step`=0.05, `imports`=10.0),
|
|
2432
|
+
and partitions the result into parallel batches.
|
|
2433
|
+
Outputs `.peaks/sc/slice-decomposition/<rid>.json`. Algorithm is
|
|
2434
|
+
fzf-free; the codegraph/understand-anything inputs are both
|
|
2435
|
+
consumed as algorithm inputs, not as decoration.
|
|
2436
|
+
|
|
2437
|
+
- **`peaks slice pick <rid>`** — interactive multi-select of candidate
|
|
2438
|
+
slices via `fzf` (>= 0.38). Reads the decomposition file, spawns
|
|
2439
|
+
fzf with formatted candidate lines, parses the multi-selection, writes
|
|
2440
|
+
`.peaks/sc/slice-decomposition/<rid>-picked.json`. The algorithm is
|
|
2441
|
+
fzf-free; this is the only fzf dependency in the pipeline.
|
|
2442
|
+
|
|
2443
|
+
- **`peaks slice plan <rid>`** — dry-run plan that reads -picked.json
|
|
2444
|
+
and produces a structured plan with `newRid`, `type`, `dependsOn`
|
|
2445
|
+
edges. `--apply` is documented as v1.1 behavior (the dry-run path
|
|
2446
|
+
is fully functional; v1.1 will wire it to spawn `peaks request init`).
|
|
2447
|
+
|
|
2448
|
+
- **`src/services/slice/slice-decompose-types.ts`** — 24 TypeScript types
|
|
2449
|
+
for the algorithm's input/output contract. Stable envelope shape;
|
|
2450
|
+
any field rename requires a migration path.
|
|
2451
|
+
|
|
2452
|
+
- **`src/services/slice/calibration-store.ts`** — pure LoC+test-count
|
|
2453
|
+
heuristic for work estimation. v1 reports `confidence: 'low'` until
|
|
2454
|
+
5+ historical slice records exist; v1.1 will switch to percentile
|
|
2455
|
+
lookup.
|
|
2456
|
+
|
|
2457
|
+
- **`peaks-solo` Step 0.6** — pre-mode-selection slice decomposition.
|
|
2458
|
+
Solo runs the algorithm automatically after Step 0.55 (1.x detection)
|
|
2459
|
+
returns "fresh". The user picks a profile informed by the
|
|
2460
|
+
decomposition's parallel structure.
|
|
2461
|
+
|
|
2462
|
+
- **3 new `peaks-solo/references/*.md`** — `slice-algorithm.md`
|
|
2463
|
+
(algorithm spec), `understand-anything-integration.md` (KG consumer
|
|
2464
|
+
contract), `fzf-integration.md` (operator-facing fzf usage).
|
|
2465
|
+
|
|
2466
|
+
- **Extended `codegraph-orchestration.md`** — grew from 5 lines
|
|
2467
|
+
to ~200 lines documenting the envelope contract, freshness
|
|
2468
|
+
contract, the v0.7.10 cross-file-affected limitation + v1
|
|
2469
|
+
fallback, the status-parsing regex, and the role-handoff envelope.
|
|
2470
|
+
|
|
2471
|
+
- **Extended `swarm-dispatch-contract.md`** — adds
|
|
2472
|
+
"Slice-decomposition-driven fan-out (v2.1+)" section. Swarm plans
|
|
2473
|
+
now derive from `parallelBatches` (with legacy `--type` lookup as
|
|
2474
|
+
the fallback path).
|
|
2475
|
+
|
|
2476
|
+
- **Extended `peaks-solo/SKILL.md`** — adds "Peaks-Cli Slice
|
|
2477
|
+
Decomposition (Step 0.6 — pre-mode-selection)" section.
|
|
2478
|
+
|
|
2479
|
+
- **Extended `runbook.md`** — adds "Step 2.5: Slice Decomposition"
|
|
2480
|
+
section between the PRD transition and the Swarm fan-out.
|
|
2481
|
+
|
|
2482
|
+
### Changed
|
|
2483
|
+
|
|
2484
|
+
- **`peaks codegraph` is now a runtime algorithm input**, not a
|
|
2485
|
+
decoration. The slice-decomposition algorithm queries it (Stage 1)
|
|
2486
|
+
and reads cross-file-affected results (Stage 2, with v0.7.10
|
|
2487
|
+
fallback to real import edges).
|
|
2488
|
+
|
|
2489
|
+
- **`understand-anything` is now a runtime algorithm input** at the
|
|
2490
|
+
semantic boundary layer. The algorithm adds `flow_step` /
|
|
2491
|
+
`contains_flow` edges to the DAG with the lowest min-cut weights
|
|
2492
|
+
(0.05 / 0.10), preferring to cut through semantic seams.
|
|
2493
|
+
|
|
2494
|
+
- **`peaks project dashboard` does not regress** with the new
|
|
2495
|
+
`.peaks/sc/slice-decomposition/` path. The path is at the top level
|
|
2496
|
+
of `.peaks/`, not under `.peaks/_runtime/`, so it does not trip the
|
|
2497
|
+
L3:l3-orphan-sessions doctor check.
|
|
2498
|
+
|
|
2499
|
+
### Deprecated
|
|
2500
|
+
|
|
2501
|
+
- The "one rid = one feature" pattern. From 2.1.1 onward, the
|
|
2502
|
+
recommended workflow is: PRD -> `peaks slice decompose` -> `peaks
|
|
2503
|
+
slice pick` (interactive) -> `peaks slice plan` -> N child rids.
|
|
2504
|
+
Legacy `--type`-based fan-out still works as a fallback for rids
|
|
2505
|
+
that pre-date the algorithm.
|
|
2506
|
+
|
|
2507
|
+
### Fixed
|
|
2508
|
+
|
|
2509
|
+
- **No public API, command, flag, or dependency change.** This is
|
|
2510
|
+
a feature-only patch. The new `peaks slice <subcommand>` family
|
|
2511
|
+
adds 3 sub-commands; existing `peaks slice check` is unchanged.
|
|
2512
|
+
|
|
2513
|
+
- **No data schema migration.** The new algorithm writes
|
|
2514
|
+
`.peaks/sc/slice-decomposition/<rid>.json` (and `<rid>-picked.json`).
|
|
2515
|
+
Both paths are git-ignored runtime state. No existing JSON file
|
|
2516
|
+
format changed.
|
|
2517
|
+
|
|
2518
|
+
- **`peaks codegraph` wrapper** now consistently accepts
|
|
2519
|
+
`--project <path>` for all subcommands (query, affected, status).
|
|
2520
|
+
The wrapper falls back to raw `codegraph` (without `--project`)
|
|
2521
|
+
only when `peaks` is not on PATH.
|
|
2522
|
+
|
|
2523
|
+
- **PRD body lookup** now walks `.peaks/_runtime/*/prd/requests/`
|
|
2524
|
+
(not just 3 hardcoded paths). Handles the real
|
|
2525
|
+
`NNN-<rid>.md` filename convention from `peaks request init`.
|
|
2526
|
+
|
|
2527
|
+
### Verified
|
|
2528
|
+
|
|
2529
|
+
- 232 test files / 2939 tests pass, 0 failures, 12 skipped
|
|
2530
|
+
(baseline 229/2894 -> delta +3 files / +45 tests).
|
|
2531
|
+
- `npx tsc --noEmit` clean.
|
|
2532
|
+
- `npm run build` clean.
|
|
2533
|
+
- End-to-end CLI smoke test on peaks-cli repo:
|
|
2534
|
+
`peaks slice decompose 2026-06-13-slice-decompose-impl --json` returns
|
|
2535
|
+
`ok: true`, writes 9 work units, 1 dep edge, p50=247.5 within the
|
|
2536
|
+
expected [202, 248] range (8-WU 2.1.0 dry-run p50=225 +-10%).
|
|
2537
|
+
- `peaks doctor` clean (no L3 regressions from the new path).
|
|
2538
|
+
- QA verdict: pass (10 of 10 ACs pass; AC10 has 1 partial
|
|
2539
|
+
regarding peaks-cli's existing `review-fanout` path mapping, but
|
|
2540
|
+
the partial is a pre-existing architecture issue, NOT a regression
|
|
2541
|
+
from this slice).
|
|
2542
|
+
|
|
2543
|
+
### Known limitations (v1.1+ scope)
|
|
2544
|
+
|
|
2545
|
+
- `peaks codegraph` v0.7.10 `affected` returns 0 cross-file dependents;
|
|
2546
|
+
the algorithm falls back to real static import edges. v1.1 should
|
|
2547
|
+
read `.codegraph/codegraph.db` directly.
|
|
2548
|
+
- understand-anything is not indexed on most projects; the algorithm
|
|
2549
|
+
falls back to structural-only cuts and reports
|
|
2550
|
+
`understandAnything.fallback: "structural-only"`.
|
|
2551
|
+
- Calibration `confidence: 'low'` until 5+ historical slice records
|
|
2552
|
+
exist; v1.1 will switch to percentile lookup.
|
|
2553
|
+
- fzf `>= 0.38` required for `peaks slice pick`. Earlier versions
|
|
2554
|
+
lack `--filter` and proper `--preview` support.
|
|
2555
|
+
- The min-cut is a simplified sort + filter, not textbook
|
|
2556
|
+
Stoer-Wagner. v1.1 will swap in the full algorithm.
|
|
2557
|
+
- `peaks slice plan --apply` is dry-run only; v1.1 will wire to
|
|
2558
|
+
spawn `peaks request init` for each picked slice.
|
|
2559
|
+
- Path traversal hardening (`assertValidRid`) and DoS cap
|
|
2560
|
+
(`--max-wu N` default 500) are 1-line patches planned for v1.1.
|
|
2561
|
+
- The 3 default runners (codegraph / understand / import-edge) have
|
|
2562
|
+
0% unit-test coverage because they shell out to real binaries.
|
|
2563
|
+
v1.1 will add `vi.mock('node:child_process')` tests to push
|
|
2564
|
+
coverage of `slice-decompose-service.ts` toward 100%.
|
|
2565
|
+
|
|
2566
|
+
---
|
|
2567
|
+
|
|
2568
|
+
## [2.1.0] — 2026-06-13
|
|
2569
|
+
|
|
2570
|
+
### Changed
|
|
2571
|
+
|
|
2572
|
+
- **`~/.peaks/config.json` is now strictly `{ version, ocr.llm.* }`.**
|
|
2573
|
+
All LIVE runtime data has moved to dedicated sidecar files under
|
|
2574
|
+
`~/.peaks/`:
|
|
2575
|
+
- `~/.peaks/providers.json` — `providers.minimax.{model, baseUrl, apiKey}`
|
|
2576
|
+
and any future custom provider configs (canonical home: provider-service.ts).
|
|
2577
|
+
- `~/.peaks/proxy.json` — `httpProxy` for outbound HTTP/HTTPS
|
|
2578
|
+
(canonical home: proxy-service.ts).
|
|
2579
|
+
- `~/.peaks/workspaces.json` — registered workspaces + current-workspace
|
|
2580
|
+
pointer (canonical home: workspace-state-service.ts).
|
|
2581
|
+
On-disk legacy bloat is auto-detected and promoted to the correct
|
|
2582
|
+
sidecar on next CLI invocation; the slim `config.json` is then
|
|
2583
|
+
rewritten. The migration is **idempotent and silent** — no user
|
|
2584
|
+
action required.
|
|
2585
|
+
- **`peaks config migrate --apply` distributes legacy fields across
|
|
2586
|
+
their canonical homes.** `economyMode` / `swarmMode` continue to
|
|
2587
|
+
forward to `<project>/.peaks/preferences.json`; `providers` /
|
|
2588
|
+
`proxy.httpProxy` / `workspaces` / `currentWorkspace` now forward
|
|
2589
|
+
to their respective sidecar files. Original config is preserved
|
|
2590
|
+
in `~/.peaks/config.json.1.x.bak` for rollback.
|
|
2591
|
+
- **`PeaksConfig` type marks legacy fields `@deprecated`.** The slim
|
|
2592
|
+
runtime shape is `{ version, ocr? }`; the legacy fields stay
|
|
2593
|
+
optional on the type so existing consumers (config-service.ts,
|
|
2594
|
+
workflow-commands.ts, etc.) continue to compile during the
|
|
2595
|
+
migration window. A future slice will redirect `setConfig` writes
|
|
2596
|
+
for legacy keys to their canonical homes with a clear migration
|
|
2597
|
+
hint.
|
|
2598
|
+
|
|
2599
|
+
### Added
|
|
2600
|
+
|
|
2601
|
+
- **New `src/services/config/sidecar-store.ts`** — path helpers
|
|
2602
|
+
(`providersConfigPath()`, `proxyConfigPath()`, `workspacesConfigPath()`)
|
|
2603
|
+
+ generic `readSidecarJson<T>` / `writeSidecarJson` with the same
|
|
2604
|
+
hardened-fs guarantees as `config-safety.ts` (symlink / hardlink
|
|
2605
|
+
guards, atomic temp-file rename, 0o600 mode).
|
|
2606
|
+
- **New `src/services/config/provider-service.ts`** —
|
|
2607
|
+
`getMiniMaxProviderConfig()`, `setMiniMaxProviderConfig()`,
|
|
2608
|
+
`getMiniMaxProviderStatus()`, `getAllProviders()`,
|
|
2609
|
+
`setProviderConfig(id, …)`, plus URL validation helpers
|
|
2610
|
+
(`isValidMiniMaxBaseUrl`, `validateMiniMaxBaseUrl`,
|
|
2611
|
+
`isValidProviderBaseUrl`, `validateProviderBaseUrl`,
|
|
2612
|
+
`validateModelProviderConfig`).
|
|
2613
|
+
- **New `src/services/config/proxy-service.ts`** —
|
|
2614
|
+
`getHttpProxy()`, `setHttpProxy()`, `clearHttpProxy()`,
|
|
2615
|
+
`isValidProxyUrl()`, `validateProxyUrl()`.
|
|
2616
|
+
- **New `src/services/config/workspace-state-service.ts`** —
|
|
2617
|
+
`getWorkspaces()`, `getCurrentWorkspace()`, `setCurrentWorkspace()`,
|
|
2618
|
+
`addWorkspace()`, `removeWorkspace()`, `getWorkspaceConfig()`,
|
|
2619
|
+
`getCurrentWorkspaceConfig()`, `getWorkspaceConfigForPath()`,
|
|
2620
|
+
`getWorkspaceConfigForCurrentPath()`,
|
|
2621
|
+
`ensureWorkspaceConfigForPath()`,
|
|
2622
|
+
`ensureWorkspaceConfigForCurrentPath()`.
|
|
2623
|
+
- **`loadGlobalConfig()` governance hook.** On any read, if the
|
|
2624
|
+
on-disk `~/.peaks/config.json` contains fields outside
|
|
2625
|
+
`{ version, ocr }`, the function now promotes them to their
|
|
2626
|
+
sidecar file (if not already present) and rewrites the slim
|
|
2627
|
+
shape. Idempotent.
|
|
2628
|
+
|
|
2629
|
+
### Deprecated
|
|
2630
|
+
|
|
2631
|
+
- The `providers`, `proxy`, `workspaces`, `currentWorkspace`,
|
|
2632
|
+
`language`, `model`, `economyMode`, `swarmMode`, `tokens` fields
|
|
2633
|
+
on `PeaksConfig` are now `@deprecated`. They continue to work
|
|
2634
|
+
during the migration window (reads return merged legacy values;
|
|
2635
|
+
writes go to `~/.peaks/config.json`) but new code should target
|
|
2636
|
+
the sidecar modules directly. The next minor release (2.2.0)
|
|
2637
|
+
will remove them from the type entirely and `setConfig` will
|
|
2638
|
+
reject writes to these keys with a clear migration hint.
|
|
2639
|
+
|
|
2640
|
+
### Fixed
|
|
2641
|
+
|
|
2642
|
+
- **No public API, command, flag, or dependency change.** Existing
|
|
2643
|
+
CLI commands (`peaks config get/set`, `peaks config migrate`,
|
|
2644
|
+
`peaks config provider minimax …`) continue to work; their
|
|
2645
|
+
on-disk effects now match the slim 2.1.0 layout after the first
|
|
2646
|
+
governance pass.
|
|
2647
|
+
|
|
2648
|
+
### Verified
|
|
2649
|
+
|
|
2650
|
+
- 229 test files / 2894 tests pass, 0 failures, 12 skipped.
|
|
2651
|
+
- Full 1.x → 2.0 → 2.1 dogfood cycle: `peaks config migrate --apply`
|
|
2652
|
+
on a bloated 1.x file produces the correct slim `config.json` +
|
|
2653
|
+
populated `providers.json` / `proxy.json` / `workspaces.json` +
|
|
2654
|
+
`<project>/.peaks/preferences.json` (per-project fields only).
|
|
2655
|
+
- Rollback via `peaks config rollback` restores the original 1.x
|
|
2656
|
+
shape from `.bak`.
|
|
2657
|
+
- `package.json.version` and `src/shared/version.ts` synced to
|
|
2658
|
+
`2.1.0` via `node scripts/sync-version.mjs` at release time.
|
|
2659
|
+
|
|
2660
|
+
---
|
|
2661
|
+
|
|
2662
|
+
## [2.0.6] — 2026-06-13
|
|
2663
|
+
|
|
2664
|
+
### Fixed
|
|
2665
|
+
|
|
2666
|
+
- **23 pre-existing test failures → 0 across 9 test files.** Repair slice
|
|
2667
|
+
`2026-06-13-repair-pre-existing-test-failures` (6 atomic commits, all
|
|
2668
|
+
green, all red-line compliant) eliminated the long-standing flake
|
|
2669
|
+
surface so the test suite is a trustworthy gate again.
|
|
2670
|
+
- **`peaks doctor` L3:l3-memory-health now reads the actual on-disk
|
|
2671
|
+
schema.** The detector used to probe for a `schema_version` field
|
|
2672
|
+
that the durable memory store never writes; it now reads the real
|
|
2673
|
+
`version: 1` + hot/warm structure. The user-visible message text
|
|
2674
|
+
changed from `schema_version=N; K memory entries` to the more
|
|
2675
|
+
accurate `version=N; K hot + K warm memory entries` (cosmetic only;
|
|
2676
|
+
the JSON envelope `id` / `ok` / `message` shape is unchanged). The
|
|
2677
|
+
underlying `readMemoryFile` and the 3-state detector logic are
|
|
2678
|
+
unchanged — only the schema probe and the message formatter moved.
|
|
2679
|
+
- **`plan-reader assertContained` realpath-resolves both sides
|
|
2680
|
+
symmetrically on macOS.** On macOS, `os.tmpdir()` is a symlink
|
|
2681
|
+
(`/var/folders/...` → `/private/var/folders/...`). The previous
|
|
2682
|
+
implementation realpath-resolved the actual on-disk path but compared
|
|
2683
|
+
it against the unresolved `expectedBase`, producing a spurious
|
|
2684
|
+
"outside project root" failure for any `peaks` CLI invocation that
|
|
2685
|
+
passed through a symlinked temp dir (notably `peaks doctor` and
|
|
2686
|
+
`peaks workflow verify-pipeline` from `/tmp`-style paths). Both
|
|
2687
|
+
sides are now resolved before comparison.
|
|
2688
|
+
|
|
2689
|
+
### Changed
|
|
2690
|
+
|
|
2691
|
+
- **No public API, command, flag, or dependency change.** Two source
|
|
2692
|
+
files were touched (`src/services/doctor/doctor-service.ts` and
|
|
2693
|
+
`src/services/workflow/plan-reader.ts`); both changes STRENGTHEN
|
|
2694
|
+
existing guards, neither widens the surface. Patch bump, not minor.
|
|
2695
|
+
|
|
2696
|
+
### Verified
|
|
2697
|
+
|
|
2698
|
+
- 23 → 0 test failures across 9 test files (full suite green).
|
|
2699
|
+
- `peaks request transition --state implemented` accepted for
|
|
2700
|
+
`2026-06-13-repair-pre-existing-test-failures` prior to this release.
|
|
2701
|
+
- `package.json.version` and `src/shared/version.ts` are in sync at
|
|
2702
|
+
`2.0.6` (regenerated via `node scripts/sync-version.mjs`).
|
|
2703
|
+
|
|
2704
|
+
---
|
|
2705
|
+
|
|
2706
|
+
## [2.0.5] — 2026-06-13
|
|
2707
|
+
|
|
2708
|
+
> **Retroactive entry.** Commit `9ab4154 feat: 2.0.5` only bumped
|
|
2709
|
+
> `package.json` and `src/shared/version.ts`; this entry closes the
|
|
2710
|
+
> documentation gap.
|
|
2711
|
+
|
|
2712
|
+
### Added
|
|
2713
|
+
|
|
2714
|
+
- **`peaks workflow skip <rid>`** — explicit gate-bypass primitive
|
|
2715
|
+
for the workflow pipeline. Backed by a three-rule classifier that
|
|
2716
|
+
must all pass before the bypass is allowed:
|
|
2717
|
+
1. **Slice-type allowlist** — only `chore` / `docs` / `refactor` are
|
|
2718
|
+
eligible; `feat` / `fix` / `perf` are not.
|
|
2719
|
+
2. **Env-var caller-id** — `PEAKS_SKIP_CALLER` (or
|
|
2720
|
+
`PEAKS_CALLER_ID`) must identify the human/skill driving the
|
|
2721
|
+
call; a missing or anonymous caller-id is rejected.
|
|
2722
|
+
3. **Mandatory `--reason`** — the CLI rejects `--reason ""`; the
|
|
2723
|
+
reason is persisted into the slice record for the retrospective.
|
|
2724
|
+
Three rules, not one: each rule is independently fail-closed, so a
|
|
2725
|
+
misuse in any one of them blocks the bypass. The classifier is the
|
|
2726
|
+
pure function `canSkipSlice(slice, callerId, reason)` so the rule
|
|
2727
|
+
set is testable in isolation.
|
|
2728
|
+
- **`peaks workflow verify-pipeline --gate-skipped`** — reporting
|
|
2729
|
+
flag that surfaces slices that completed via the skip classifier
|
|
2730
|
+
during a pipeline run. The default `verify-pipeline` output hides
|
|
2731
|
+
skipped slices; `--gate-skipped` includes them in the per-slice
|
|
2732
|
+
breakdown with a distinct status and the recorded `--reason` so the
|
|
2733
|
+
retrospective can audit the bypass rate.
|
|
2734
|
+
|
|
2735
|
+
### Changed
|
|
2736
|
+
|
|
2737
|
+
- **No dependency / config / public-API change.** The 2.0.5 release
|
|
2738
|
+
is a feature-only patch.
|
|
2739
|
+
|
|
2740
|
+
### Verified
|
|
2741
|
+
|
|
2742
|
+
- 3-rule classifier test suite green (`tests/unit/workflow-skip-*`).
|
|
2743
|
+
- `peaks workflow verify-pipeline --gate-skipped` returns the
|
|
2744
|
+
expected envelope shape on synthetic skip and non-skip fixtures.
|
|
2745
|
+
- Slice `2026-06-13-peaks-workflow-skip` (the slice that introduced
|
|
2746
|
+
the feature) closed green and transitioned to `implemented` before
|
|
2747
|
+
the version bump.
|
|
2748
|
+
|
|
2749
|
+
---
|
|
2750
|
+
|
|
2751
|
+
## [2.0.4] — 2026-06-13 (hotfix)
|
|
2752
|
+
|
|
2753
|
+
### Fixed
|
|
2754
|
+
|
|
2755
|
+
- **PreToolUse hook `command` field was bare JavaScript source, not a
|
|
2756
|
+
`node -e "..."` one-liner.** `peaks workspace init` writes
|
|
2757
|
+
`.claude/settings.local.json` containing two PreToolUse hooks (one
|
|
2758
|
+
for `Bash`, one for `Write|Edit|MultiEdit`) whose `command` field
|
|
2759
|
+
was the inner JS payload without the `node -e "..."` wrapper.
|
|
2760
|
+
Claude Code executes the `command` field as a shell string, so
|
|
2761
|
+
bash saw literal `const c=process.argv[1]...` and tripped
|
|
2762
|
+
`syntax error near unexpected token`. Net effect on every 2.0.3
|
|
2763
|
+
install on Windows + macOS + Linux:
|
|
2764
|
+
- Every Bash tool call (peaks CLI or otherwise) was rejected.
|
|
2765
|
+
- Every Write / Edit / MultiEdit call was rejected.
|
|
2766
|
+
- The [Fact-Forcing Gate] bypass that `peaks workspace init` was
|
|
2767
|
+
supposed to install was therefore self-defeating — the bypass
|
|
2768
|
+
broke the gate itself, and the gate could not be reached to fix
|
|
2769
|
+
it.
|
|
2770
|
+
Recovery required the user to delete `.claude/settings.local.json`
|
|
2771
|
+
manually (losing the bypass permanently) or hand-patch the
|
|
2772
|
+
`command` field (drift vs the template).
|
|
2773
|
+
The fix wraps both builders' JS payloads in a real shell-evaluable
|
|
2774
|
+
`node -e "<js>"` form via a new `wrapAsNodeOneLiner` helper in
|
|
2775
|
+
`src/services/workspace/claude-settings-template.ts`. Inner `"`
|
|
2776
|
+
are escaped to `\"`; backslashes pass through unchanged so regex
|
|
2777
|
+
literals like `/\.peaks\//` still match correctly. `process.argv[1]`
|
|
2778
|
+
is the correct slot under `-e` per Node.js docs
|
|
2779
|
+
(https://nodejs.org/api/process.html#processargv) — consistent
|
|
2780
|
+
across Windows, macOS, and Linux. The docstring is reconciled
|
|
2781
|
+
with the implementation (the previous docstring incorrectly said
|
|
2782
|
+
`argv[2]`).
|
|
2783
|
+
|
|
2784
|
+
Regression tests cover:
|
|
2785
|
+
- `buildBashHookCommand()` and `buildWriteHookCommand()` return
|
|
2786
|
+
`node -e "..."` form.
|
|
2787
|
+
- Inner `"` are escaped to `\"`.
|
|
2788
|
+
- Spawning the wrapped command with `peaks workspace init --project . --json`
|
|
2789
|
+
exits 0; with `npm install foo` exits non-zero.
|
|
2790
|
+
- Spawning the Write hook with `.peaks/_runtime/...` and
|
|
2791
|
+
`.peaks/_runtime/<changeId>/...` paths exits 0; with `src/...`,
|
|
2792
|
+
`package.json`, `.peaks/_archive/...` exits non-zero.
|
|
2793
|
+
- The existing workspace-init round-trip test (case A/B/C) still
|
|
2794
|
+
passes with the wrapper.
|
|
2795
|
+
|
|
2796
|
+
---
|
|
2797
|
+
|
|
2798
|
+
## [2.0.3] — 2026-06-13
|
|
2799
|
+
|
|
2800
|
+
### Fixed
|
|
2801
|
+
|
|
2802
|
+
- **`@alibaba-group/open-code-review` reverted to `optionalDependency`**
|
|
2803
|
+
(was promoted to a hard `dependency` in 2.0.1 and carried through
|
|
2804
|
+
2.0.2). The ocr npm package's `postinstall` downloads a Go binary
|
|
2805
|
+
via HTTPS, which fails in restricted/proxied environments and was
|
|
2806
|
+
aborting the whole `npm i -g peaks-cli` flow. The 5-state detector
|
|
2807
|
+
(`ready` / `package-missing` / `binary-missing` / `config-missing` /
|
|
2808
|
+
`detection-failed`) and the soft-fail policy are unchanged — peaks-cli
|
|
2809
|
+
never blocks on ocr being installed; it just no longer forces the
|
|
2810
|
+
install. Users who want the second-opinion review run
|
|
2811
|
+
`npm i -g @alibaba-group/open-code-review` explicitly. Under pnpm
|
|
2812
|
+
they also need `pnpm approve-builds @alibaba-group/open-code-review`
|
|
2813
|
+
for the binary download to run. Source-of-truth refactor (ocr config
|
|
2814
|
+
under `peaksConfig.ocr.llm`) from 2.0.1 is unchanged.
|
|
2815
|
+
|
|
2816
|
+
---
|
|
2817
|
+
|
|
2818
|
+
## [2.0.0] — 2026-06-12
|
|
2819
|
+
|
|
2820
|
+
### 🎯 Headline
|
|
2821
|
+
|
|
2822
|
+
**One-key 1.x → 2.0 upgrade.** `npm i -g peaks-cli@2.0` runs the full
|
|
2823
|
+
upgrade umbrella in the consuming project automatically (gated by the
|
|
2824
|
+
1.x detector). The manual fallback is `peaks upgrade --to 2.0 --auto`.
|
|
2825
|
+
|
|
2826
|
+
The architecture moves to **skill-first / CLI-auxiliary**: skill SKILL.md
|
|
2827
|
+
files are the primary surface the LLM consumes; CLI commands are
|
|
2828
|
+
machine-enforced gates, structured-JSON probes, or side-effect primitives.
|
|
2829
|
+
See `.claude/rules/common/dev-preference.md` (project-local) for the
|
|
2830
|
+
operating tenet.
|
|
2831
|
+
|
|
2832
|
+
**ocr second-opinion code review (soft-optional).** Alibaba's
|
|
2833
|
+
`@alibaba-group/open-code-review` is now an `optionalDependency`; when
|
|
2834
|
+
installed + configured against a user-owned LLM endpoint, peaks-rd's
|
|
2835
|
+
Gate B3 merges its findings into `code-review.md` as a second opinion
|
|
2836
|
+
alongside the LLM-only review. Soft-fails so missing ocr never blocks
|
|
2837
|
+
a slice. New CLI: `peaks code-review detect-ocr` / `run-ocr`. See
|
|
2838
|
+
`skills/peaks-rd/references/ocr-integration.md` for the contract.
|
|
2839
|
+
|
|
2840
|
+
> **Note:** This `optionalDependency` classification was briefly
|
|
2841
|
+
> promoted to a hard `dependency` in 2.0.1 (alongside the source-of-truth
|
|
2842
|
+
> refactor) because the user feedback was "peaks-cli should not leave
|
|
2843
|
+
> install to the user". 2.0.3 reverts just the classification — the
|
|
2844
|
+
> source-of-truth refactor stays — because the ocr postinstall
|
|
2845
|
+
> downloads a Go binary via HTTPS, which fails in restricted/proxied
|
|
2846
|
+
> environments and was aborting `npm i -g peaks-cli`. See the 2.0.3
|
|
2847
|
+
> entry above for the full rationale.
|
|
2848
|
+
|
|
2849
|
+
### Breaking Changes
|
|
2850
|
+
|
|
2851
|
+
- **`.claude/rules/` is no longer the source of truth for project standards.**
|
|
2852
|
+
The 2.0 canonical location is `.peaks/standards/{common,typescript}/*.md`.
|
|
2853
|
+
The 1.x `.claude/rules/` tree is thinned to 2-line pointers during upgrade,
|
|
2854
|
+
preserving the original under `.claude/rules/.peaks-2.0-backup-<ISO>/`.
|
|
2855
|
+
|
|
2856
|
+
- **`.gitignore` requires a granular `.peaks/` block**, not a wholesale
|
|
2857
|
+
`/.peaks/` ignore. The upgrade umbrella migrates the consumer's
|
|
2858
|
+
`.gitignore` automatically (with a timestamped backup); without it, 2.0
|
|
2859
|
+
tracked artifacts (`.peaks/standards/`, durable `.peaks/memory/*.md`,
|
|
2860
|
+
`.peaks/PROJECT.md`, opt-in markers) would be silently hidden from git.
|
|
2861
|
+
|
|
2862
|
+
- **Per-project config moved from `~/.peaks/config.json` to `<project>/.peaks/preferences.json`.**
|
|
2863
|
+
`~/.peaks/config.json` retains only `{ "version": "2.0.0" }`. Fields
|
|
2864
|
+
`economyMode`, `swarmMode`, headroom settings, etc. are now per-project.
|
|
2865
|
+
The upgrade umbrella runs `peaks config migrate --apply` automatically.
|
|
2866
|
+
|
|
2867
|
+
- **Postinstall behavior changed.** `npm i -g peaks-cli@2.0` now:
|
|
2868
|
+
1. Symlinks bundled skills to **all 8 supported IDE platforms**
|
|
2869
|
+
(Claude Code, Trae, Cursor, Qoder, Codex, Tongyi Lingma, Aider, Roo Code),
|
|
2870
|
+
not just the auto-detected one. Per real Trae user feedback 2026-06-11.
|
|
2871
|
+
2. Installs bundled output styles.
|
|
2872
|
+
3. If `cwd` contains a 1.x peaks-cli project, fire-and-forgets
|
|
2873
|
+
`peaks upgrade --to 2.0 --auto`. Opt out with `PEAKS_SKIP_AUTO_UPGRADE=1`.
|
|
2874
|
+
|
|
2875
|
+
### Changed — ocr source-of-truth moved into peaks-cli's config
|
|
2876
|
+
|
|
2877
|
+
Following the same-release user feedback that the original 2.0.0 ocr
|
|
2878
|
+
config lived in `~/.opencodereview/config.json` (a file outside
|
|
2879
|
+
peaks-cli's reach) and was set via the `ocr config set` CLI from the
|
|
2880
|
+
upstream package, the ocr LLM endpoint config now lives under
|
|
2881
|
+
`peaksConfig.ocr.llm` in `~/.peaks/config.json`. This makes the
|
|
2882
|
+
user-managed LLM endpoint discoverable from a single, peaks-cli-owned
|
|
2883
|
+
config surface.
|
|
2884
|
+
|
|
2885
|
+
- **`@alibaba-group/open-code-review` is now a hard `dependency`** (was
|
|
2886
|
+
`optionalDependency`). The user no longer has to remember to install
|
|
2887
|
+
it; `npm i -g peaks-cli` pulls it. Network-blocked installs that fail
|
|
2888
|
+
to download the platform binary still soft-fail at runtime
|
|
2889
|
+
(`binary-missing` state) — the install-time failure risk is the
|
|
2890
|
+
trade-off.
|
|
2891
|
+
|
|
2892
|
+
> **Reverted in 2.0.3.** The install-time failure risk turned out
|
|
2893
|
+
> to bite too many real-world installs (corporate proxies, region
|
|
2894
|
+
> firewalls, sandboxed dev environments all abort the whole
|
|
2895
|
+
> `npm i -g peaks-cli`). 2.0.3 puts ocr back under
|
|
2896
|
+
> `optionalDependencies`; everything else in this section
|
|
2897
|
+
> (env-var injection, `config-template` CLI, `missingKeys`,
|
|
2898
|
+
> source-of-truth under `peaksConfig.ocr.llm`) is unchanged.
|
|
2899
|
+
- **`detectOcr` / `runOcrReview` no longer read `~/.opencodereview/config.json`.**
|
|
2900
|
+
The source of truth is `peaksConfig.ocr.llm` (parsed by
|
|
2901
|
+
`getOcrLlmConfig()` in `config-service.ts`). Missing fields surface
|
|
2902
|
+
in `data.missingKeys`; the `config-missing` state's `nextActions`
|
|
2903
|
+
payload embeds the JSON template to paste.
|
|
2904
|
+
- **Env-var injection replaces file writes.** `runOcrReview` injects
|
|
2905
|
+
`OCR_LLM_URL` / `OCR_LLM_TOKEN` / `OCR_LLM_MODEL` /
|
|
2906
|
+
`OCR_USE_ANTHROPIC` / `OCR_LLM_AUTH_HEADER` from `peaksConfig.ocr.llm`
|
|
2907
|
+
when spawning the ocr subprocess — the ocr package's highest-priority
|
|
2908
|
+
config path. peaks-cli never has to materialise
|
|
2909
|
+
`~/.opencodereview/config.json`, and does NOT auto-configure the
|
|
2910
|
+
endpoint — the user is the only party that touches the LLM
|
|
2911
|
+
token / URL.
|
|
2912
|
+
- **New CLI: `peaks code-review config-template`.** Prints the JSON
|
|
2913
|
+
snippet the user pastes into `~/.peaks/config.json`. It does NOT
|
|
2914
|
+
write anything. No `peaks ocr config set`, no `ocr config set` — just
|
|
2915
|
+
edit peaks-cli's config.json (or use
|
|
2916
|
+
`peaks config set --key ocr.llm.url --value '...'` if preferred).
|
|
2917
|
+
- **JSON envelope contract change:** `OcrDetectResult.configPath` now
|
|
2918
|
+
points at the peaks-cli config (e.g. `~/.peaks/config.json`) instead
|
|
2919
|
+
of the OCR package's legacy file. A new `missingKeys` field lists the
|
|
2920
|
+
required `ocr.llm.*` keys the user has not yet populated. The
|
|
2921
|
+
five-state contract and the soft-fail policy are unchanged.
|
|
2922
|
+
|
|
2923
|
+
### Migration (ocr source-of-truth)
|
|
2924
|
+
|
|
2925
|
+
Users who already configured `~/.opencodereview/config.json` for the
|
|
2926
|
+
soft-optional 2.0.0 release should:
|
|
2927
|
+
|
|
2928
|
+
1. Run `peaks code-review config-template --json` to see the JSON
|
|
2929
|
+
snippet.
|
|
2930
|
+
2. Paste the equivalent values into `~/.peaks/config.json` under
|
|
2931
|
+
`ocr.llm` (peaks-cli handles the camelCase conversion; the
|
|
2932
|
+
template shows the canonical shape).
|
|
2933
|
+
3. Re-run `peaks code-review detect-ocr --json` to verify
|
|
2934
|
+
`state == "ready"`.
|
|
2935
|
+
|
|
2936
|
+
The old `~/.opencodereview/config.json` is no longer consulted by
|
|
2937
|
+
peaks-cli. The user may delete it at their discretion (the ocr
|
|
2938
|
+
subprocess ignores it when peaks-cli's env vars are present).
|
|
2939
|
+
|
|
2940
|
+
### Added
|
|
2941
|
+
|
|
2942
|
+
- **`peaks upgrade --to 2.0`** — umbrella that orchestrates the 1.x → 2.0
|
|
2943
|
+
migration: config migrate, standards migrate (`--from-claude-rules`),
|
|
2944
|
+
memory extract (with disk-based glob expansion for the consumer's
|
|
2945
|
+
artifact tree), hooks install, skill sync, audit verify, plus
|
|
2946
|
+
in-process preferences-ensure, gitignore-migrate, and upgrade-record
|
|
2947
|
+
write. Soft-fail per sub-step; never blocks the whole upgrade.
|
|
2948
|
+
|
|
2949
|
+
- **`peaks upgrade --detect-1x`** — read-only probe returning a JSON
|
|
2950
|
+
envelope the peaks-solo skill consumes to gate the AskUserQuestion
|
|
2951
|
+
in Step 0.55.
|
|
2952
|
+
|
|
2953
|
+
- **`peaks standards migrate --from-claude-rules`** — thins `.claude/rules/`
|
|
2954
|
+
to 2-line pointers and scaffolds `.peaks/standards/{common,typescript}/`.
|
|
2955
|
+
|
|
2956
|
+
- **`peaks skill sync`** — distributes the skill family across all 8
|
|
2957
|
+
supported IDE platforms in one command.
|
|
2958
|
+
|
|
2959
|
+
- **`peaks audit red-lines`** — L2 catalog audit (P0/P1/P2-a/P2-b
|
|
2960
|
+
enforcers) for skills/SKILL.md, references/*.md, and the agent shield.
|
|
2961
|
+
|
|
2962
|
+
- **`peaks agent run`** — ECC 64 agents soft-optional integration
|
|
2963
|
+
(spec §7.2). When the L3 stack is installed, peaks delegates to it;
|
|
2964
|
+
otherwise degrades to peaks-cli's own core diagnostics.
|
|
2965
|
+
|
|
2966
|
+
- **`peaks memory search` / `peaks retrospective search`** — new search
|
|
2967
|
+
subcommands for the durable memory / retrospective stores.
|
|
2968
|
+
|
|
2969
|
+
- **`peaks workspace init / clean / archive`** — workspace lifecycle
|
|
2970
|
+
primitives with `--dry-run` default + `--apply` opt-in.
|
|
2971
|
+
|
|
2972
|
+
- **`peaks preferences set / get / reset`** — per-project preferences
|
|
2973
|
+
read/write CLI.
|
|
2974
|
+
|
|
2975
|
+
- **Two paired tenets** captured in `.peaks/memory/peaks-cli-tenet-one-key-completion.md`:
|
|
2976
|
+
- **One-key completion** — actions that can be done in one step
|
|
2977
|
+
should not be designed as two-step operations.
|
|
2978
|
+
- **Minimal user operation** — features can be powerful, but the
|
|
2979
|
+
user-facing surface should be minimal; the CLI/LLM figures it out.
|
|
2980
|
+
|
|
2981
|
+
### Fixed
|
|
2982
|
+
|
|
2983
|
+
- **(2026-06-12) `upgrade-service.ts` was missing from develop HEAD**,
|
|
2984
|
+
causing fresh clones to fail TS2307. Repaired in commit ec6f674.
|
|
2985
|
+
|
|
2986
|
+
- **(2026-06-12) `peaks standards migrate --from-claude-rules`** rejected
|
|
2987
|
+
as `unknown option`. CLI flag wiring fixed in core-artifact-commands.ts.
|
|
2988
|
+
|
|
2989
|
+
- **(2026-06-12) `peaks memory extract`** failed with
|
|
2990
|
+
`Artifact path must stay inside the project root` when the umbrella
|
|
2991
|
+
passed literal glob strings (`skills/**/SKILL.md`). The umbrella now
|
|
2992
|
+
expands globs on disk before spawning.
|
|
2993
|
+
|
|
2994
|
+
- **(2026-06-12) Three bugs surfaced by real-world ice-cola dogfood:**
|
|
2995
|
+
- memory-extract was called without `--apply` → always dry-ran, never
|
|
2996
|
+
actually wrote.
|
|
2997
|
+
- `.claude/skills/**/SKILL.md` (the standard Claude-Code consumer
|
|
2998
|
+
convention) was not walked; only `<root>/skills/` was scanned.
|
|
2999
|
+
- `.peaks/preferences.json` was never created after upgrade, so the
|
|
3000
|
+
1.x detector kept returning `isOneX=true` and the user got stuck
|
|
3001
|
+
in a re-prompt loop. Violated the one-key completion tenet.
|
|
3002
|
+
|
|
3003
|
+
- **(2026-06-12) `.gitignore` 1.x wholesale `/.peaks/` rule** silently
|
|
3004
|
+
hid every 2.0 tracked artifact. New `gitignore-migrate-service.ts`
|
|
3005
|
+
detects 4 wholesale forms (`.peaks`, `.peaks/`, `/.peaks`, `/.peaks/`),
|
|
3006
|
+
removes them, and appends the canonical 2.0 granular block with a
|
|
3007
|
+
sentinel comment. Idempotent; creates timestamped backup before write.
|
|
3008
|
+
|
|
3009
|
+
- **(2026-06-11) Windows: `peaks slice check`** was using `npx tsc` /
|
|
3010
|
+
`npx vitest` which spawned `cmd.exe` indirectly via the npx shim and
|
|
3011
|
+
failed with ENOENT. Now resolves local `node_modules/.bin/` binaries
|
|
3012
|
+
directly via `runCommand(shell: true)`.
|
|
3013
|
+
|
|
3014
|
+
### Deprecated
|
|
3015
|
+
|
|
3016
|
+
- **`peaks workspace migrate-1-4-1`** — retained for 1.4.1 → 1.4.2
|
|
3017
|
+
legacy session-layout backward compatibility. Will be removed in 2.1.
|
|
3018
|
+
Use `peaks upgrade --to 2.0` for the canonical migration path.
|
|
3019
|
+
|
|
3020
|
+
### Removed
|
|
3021
|
+
|
|
3022
|
+
- `~/.peaks/config.json` schema is now `{ "version": "2.0.0" }` only.
|
|
3023
|
+
All other fields are migrated to per-project `.peaks/preferences.json`
|
|
3024
|
+
by `peaks config migrate`.
|
|
3025
|
+
|
|
3026
|
+
### Architecture
|
|
3027
|
+
|
|
3028
|
+
- **Skill-first / CLI-auxiliary.** SKILL.md is the primary surface;
|
|
3029
|
+
CLI earns its keep only when (a) hook/script/CI-invokable, (b) the
|
|
3030
|
+
consumer needs a structured JSON envelope to gate a decision, or
|
|
3031
|
+
(c) destructive side-effect needs explicit `--apply`. See the
|
|
3032
|
+
decision template in `.claude/rules/common/dev-preference.md`.
|
|
3033
|
+
|
|
3034
|
+
- **Two-axis naming convention** for `.peaks/` workspace:
|
|
3035
|
+
`<changeId>` for reviewable artifacts under `.peaks/_runtime/<changeId>/...`;
|
|
3036
|
+
`<sessionId>` for ephemeral state under `.peaks/_runtime/<sessionId>/...`.
|
|
3037
|
+
Regression test pins zero use of ambiguous `<sid>`.
|
|
3038
|
+
|
|
3039
|
+
- **`.peaks/_runtime/`** replaces `.peaks/runtime/` (defensive wrong-path
|
|
3040
|
+
pattern still in .gitignore).
|
|
3041
|
+
|
|
3042
|
+
### Verified
|
|
3043
|
+
|
|
3044
|
+
- 223 test files / 2768 tests pass / 16 skipped.
|
|
3045
|
+
- `npx tsc --noEmit` clean.
|
|
3046
|
+
- `npm run build` clean.
|
|
3047
|
+
- End-to-end dogfood on real 1.x consumer project (ice-cola): 6/6
|
|
3048
|
+
upgrade sub-steps pass; `.gitignore` migrated with backup; detector
|
|
3049
|
+
returns `isOneX: false` after upgrade; all 2.0 tracked artifacts
|
|
3050
|
+
surface in `git status`.
|
|
3051
|
+
|
|
3052
|
+
### Migration Guide
|
|
3053
|
+
|
|
3054
|
+
See `docs/UPGRADING-2.0.md` for the manual fallback if the auto-upgrade
|
|
3055
|
+
is skipped (`PEAKS_SKIP_AUTO_UPGRADE=1` or `npm i --ignore-scripts`).
|
|
3056
|
+
|
|
3057
|
+
---
|
|
3058
|
+
|
|
3059
|
+
## [2.0.1] — 2026-06-12
|
|
3060
|
+
|
|
3061
|
+
### Fixed
|
|
3062
|
+
|
|
3063
|
+
- **Bug 1 — `~/.peaks/config.json` was bloated to 9 top-level fields.**
|
|
3064
|
+
The 2.0.0 release moved per-project fields (`language`, `model`,
|
|
3065
|
+
`economyMode`, `swarmMode`) to `<project>/.peaks/preferences.json`
|
|
3066
|
+
per spec §10.4, but the runtime `DEFAULT_CONFIG` still shipped
|
|
3067
|
+
`language` / `model` / `economyMode` / `swarmMode` / `tokens` /
|
|
3068
|
+
`providers` / `proxy` / `progress` placeholders. The slim migration
|
|
3069
|
+
(`executeMigration`) wrote `{ version: "2.0.0" }` only, but any
|
|
3070
|
+
code path that went through `readConfig` and re-serialised
|
|
3071
|
+
re-bloated the file. The 2.0.1 fix:
|
|
3072
|
+
|
|
3073
|
+
1. **Slim `DEFAULT_CONFIG`** to `{ version, ocr: { llm: { url, authToken, model, useAnthropic, authHeader } } }`
|
|
3074
|
+
(placeholders for the OCR LLM endpoint only).
|
|
3075
|
+
2. **Slim migration write** to the same 2-key form, so a fresh
|
|
3076
|
+
`peaks config migrate --apply` produces a discoverable
|
|
3077
|
+
`ocr.llm` block the user can paste their endpoint into.
|
|
3078
|
+
3. **Tolerant loader.** Legacy 1.x files with extra fields
|
|
3079
|
+
(`language`, `model`, `tokens`, `providers`, `proxy`, etc.)
|
|
3080
|
+
still load without throwing; the legacy fields are exposed
|
|
3081
|
+
via `getConfig` for backward compatibility, and
|
|
3082
|
+
`setConfig` rejects writes to `language` / `model` /
|
|
3083
|
+
`economyMode` / `swarmMode` with a pointer to
|
|
3084
|
+
`<project>/.peaks/preferences.json` (do not silently migrate).
|
|
3085
|
+
|
|
3086
|
+
The net effect: a freshly-installed peaks-cli writes a 2-key
|
|
3087
|
+
`~/.peaks/config.json`; legacy 1.x files migrate to the same
|
|
3088
|
+
2-key form; the ocr second-opinion config is now the only
|
|
3089
|
+
discoverable surface the user needs to populate to make
|
|
3090
|
+
`peaks code-review detect-ocr` report `state: "ready"`.
|
|
3091
|
+
|
|
3092
|
+
### Verification
|
|
3093
|
+
|
|
3094
|
+
- 70 config tests pass (`tests/unit/config-*`).
|
|
3095
|
+
- `pnpm tsc -p tsconfig.json --noEmit` clean (excluding pre-existing
|
|
3096
|
+
sync-service test scaffold for Bug 2).
|
|
3097
|
+
|
|
3098
|
+
---
|
|
3099
|
+
|
|
3100
|
+
## [2.0.2] — 2026-06-13
|
|
3101
|
+
|
|
3102
|
+
### Changed — README redesign (docs only)
|
|
3103
|
+
|
|
3104
|
+
The top of both `README.md` and `README-en.md` is rebuilt in the
|
|
3105
|
+
RAG-Anything style requested from the published repo: card-grid
|
|
3106
|
+
metadata (PROJECT / BASED ON / SKILLS.SH / STARS / VERSION / LICENSE
|
|
3107
|
+
/ TESTS / LANG / DOWNLOADS / 中文 / QUICK START / VISITORS), a
|
|
3108
|
+
multiline `readme-typing-svg` tagline animation, a
|
|
3109
|
+
`github-readme-streak-stats` streak band, and a `komarev` visitor
|
|
3110
|
+
counter. Both languages are structurally identical (same card grid,
|
|
3111
|
+
same animations, same anchor links); only the tagline and
|
|
3112
|
+
call-to-action text differ.
|
|
3113
|
+
|
|
3114
|
+
- `README.md` updated to the new layout (typing animation uses the
|
|
3115
|
+
Chinese tagline: `peaks-cli: 跨 AI IDE 的工程门禁与编排`).
|
|
3116
|
+
- `README-en.md` synced to mirror the new layout (typing animation
|
|
3117
|
+
uses the English tagline: `peaks-cli: cross-AI-IDE engineering
|
|
3118
|
+
gates & orchestration`).
|
|
3119
|
+
- Card anchors renamed to ASCII-friendly slugs on the English file
|
|
3120
|
+
(`30-seconds-to-running`, `5-minute-onboarding`, `11-skills-in-the-family`,
|
|
3121
|
+
`killer-feature-un-bypassable-gates`) so the README renders
|
|
3122
|
+
consistently on GitHub's auto-generated anchor list.
|
|
3123
|
+
|
|
3124
|
+
No code, CLI, or schema changes. The CLI still reports
|
|
3125
|
+
`Peaks CLI 2.0.2` after `prepublish` regenerates
|
|
3126
|
+
`src/shared/version.ts`.
|
|
3127
|
+
|
|
3128
|
+
---
|
|
3129
|
+
|
|
3130
|
+
## [1.4.2] — 2026-06-08
|
|
3131
|
+
|
|
3132
|
+
Last 1.x release. See git history pre-2.0.0 for details.
|
|
3133
|
+
|
|
3134
|
+
[2.0.2]: https://github.com/SquabbyZ/peaks-cli/releases/tag/v2.0.2
|
|
3135
|
+
[2.0.1]: https://github.com/SquabbyZ/peaks-cli/releases/tag/v2.0.1
|
|
3136
|
+
[2.0.0]: https://github.com/SquabbyZ/peaks-cli/releases/tag/v2.0.0
|