peaks-loop 3.1.2 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +62 -12
- package/CHANGELOG.md +148 -116
- package/README-en.md +58 -240
- package/README.md +49 -325
- package/agents/karpathy-reviewer.md +3 -3
- package/dist/src/cli/cli-helpers.d.ts +18 -0
- package/dist/src/cli/cli-helpers.js +8 -0
- package/dist/src/cli/commands/adapter-commands.d.ts +30 -0
- package/dist/src/cli/commands/adapter-commands.js +35 -0
- package/dist/src/cli/commands/{solo-commands.d.ts → code-commands.d.ts} +25 -25
- package/dist/src/cli/commands/{solo-commands.js → code-commands.js} +82 -82
- package/dist/src/cli/commands/context-commands.d.ts +1 -1
- package/dist/src/cli/commands/context-commands.js +1 -1
- package/dist/src/cli/commands/contract-commands.d.ts +1 -1
- package/dist/src/cli/commands/contract-commands.js +1 -1
- package/dist/src/cli/commands/core/session-command.js +12 -0
- package/dist/src/cli/commands/core/skill-command.js +4 -4
- package/dist/src/cli/commands/dispatch-commands.js +2 -2
- package/dist/src/cli/commands/dispatch-from-dag.js +1 -1
- package/dist/src/cli/commands/hook-handle.js +7 -7
- package/dist/src/cli/commands/job-commands.js +7 -7
- package/dist/src/cli/commands/observability-commands.js +1 -1
- package/dist/src/cli/commands/perf-audit-commands.js +2 -2
- package/dist/src/cli/commands/security-audit-commands.js +2 -2
- package/dist/src/cli/commands/sediment-commands.d.ts +80 -0
- package/dist/src/cli/commands/sediment-commands.js +640 -0
- package/dist/src/cli/commands/session-auto-compact-hook-command.js +2 -2
- package/dist/src/cli/commands/session-migrate-skill-name.d.ts +17 -0
- package/dist/src/cli/commands/session-migrate-skill-name.js +41 -0
- package/dist/src/cli/commands/skill-visibility.d.ts +8 -0
- package/dist/src/cli/commands/skill-visibility.js +63 -0
- package/dist/src/cli/commands/slice-commands.js +2 -2
- package/dist/src/cli/commands/sub-agent-commands.d.ts +1 -1
- package/dist/src/cli/commands/sub-agent-commands.js +1 -1
- package/dist/src/cli/commands/sub-agent-shared.d.ts +1 -1
- package/dist/src/cli/commands/understand-commands.js +1 -1
- package/dist/src/cli/commands/upgrade-commands.d.ts +1 -1
- package/dist/src/cli/commands/upgrade-commands.js +3 -3
- package/dist/src/cli/commands/user-touchpoint-commands.d.ts +4 -4
- package/dist/src/cli/commands/user-touchpoint-commands.js +15 -15
- package/dist/src/cli/commands/verdict-aggregate-command.d.ts +1 -1
- package/dist/src/cli/commands/verdict-aggregate-command.js +2 -2
- package/dist/src/cli/commands/workflow-commands.js +23 -23
- package/dist/src/cli/commands/workspace/init-command.d.ts +3 -3
- package/dist/src/cli/commands/workspace/init-command.js +7 -7
- package/dist/src/cli/program.js +24 -7
- package/dist/src/services/adapter/adapter.d.ts +27 -0
- package/dist/src/services/adapter/adapter.js +5 -0
- package/dist/src/services/adapter/auto-adapter.d.ts +11 -0
- package/dist/src/services/adapter/auto-adapter.js +15 -0
- package/dist/src/services/adapter/claude-adapter.d.ts +14 -0
- package/dist/src/services/adapter/claude-adapter.js +40 -0
- package/dist/src/services/adapter/codex-adapter.d.ts +14 -0
- package/dist/src/services/adapter/codex-adapter.js +14 -0
- package/dist/src/services/adapter/copilot-adapter.d.ts +14 -0
- package/dist/src/services/adapter/copilot-adapter.js +14 -0
- package/dist/src/services/artifacts/repair-cycle-service.js +1 -1
- package/dist/src/services/audit/enforcers/active-skill-resolver.d.ts +1 -1
- package/dist/src/services/audit/enforcers/active-skill-resolver.js +1 -1
- package/dist/src/services/audit/enforcers/{solo-code-ban.d.ts → code-ban.d.ts} +6 -6
- package/dist/src/services/audit/enforcers/{solo-code-ban.js → code-ban.js} +6 -6
- package/dist/src/services/audit/red-line-catalog.d.ts +2 -2
- package/dist/src/services/audit/red-line-catalog.js +6 -6
- package/dist/src/services/audit/scanners/skills-tree-scanner.js +22 -0
- package/dist/src/services/audit/types.d.ts +2 -2
- package/dist/src/services/{solo → code}/auto-compact-orchestrator.d.ts +2 -2
- package/dist/src/services/{solo → code}/auto-compact-orchestrator.js +5 -5
- package/dist/src/services/{solo → code}/dag-orchestrator.d.ts +4 -4
- package/dist/src/services/{solo → code}/dag-orchestrator.js +5 -5
- package/dist/src/services/{solo → code}/emit-handoff.d.ts +1 -1
- package/dist/src/services/{solo → code}/emit-handoff.js +1 -1
- package/dist/src/services/{solo → code}/job-shape-decision.d.ts +1 -1
- package/dist/src/services/{solo → code}/job-shape-decision.js +5 -5
- package/dist/src/services/{solo → code}/mode-gate.d.ts +11 -11
- package/dist/src/services/{solo → code}/mode-gate.js +5 -5
- package/dist/src/services/{solo → code}/post-compact-detector.d.ts +3 -3
- package/dist/src/services/{solo → code}/post-compact-detector.js +6 -6
- package/dist/src/services/{solo → code}/status-line-renderer.d.ts +4 -4
- package/dist/src/services/{solo → code}/step-08-gate.d.ts +4 -4
- package/dist/src/services/{solo → code}/step-08-gate.js +4 -4
- package/dist/src/services/{solo → code}/user-touchpoint-classifier.d.ts +1 -1
- package/dist/src/services/{solo → code}/user-touchpoint-classifier.js +1 -1
- package/dist/src/services/context/auto-compact-dispatcher.d.ts +3 -3
- package/dist/src/services/context/auto-compact-dispatcher.js +2 -2
- package/dist/src/services/context/auto-compact-types.d.ts +1 -1
- package/dist/src/services/dispatch/batch-counter.js +1 -1
- package/dist/src/services/dispatch/leak-detector.js +1 -1
- package/dist/src/services/dispatch/slice-dag.d.ts +2 -2
- package/dist/src/services/dispatch/test-tool-detection.d.ts +1 -1
- package/dist/src/services/dispatch/test-tool-detection.js +1 -1
- package/dist/src/services/doctor/doctor-service.js +2 -2
- package/dist/src/services/feedback/feedback-promotion-service.js +2 -2
- package/dist/src/services/job/job-progress-store.d.ts +1 -1
- package/dist/src/services/job/job-progress-store.js +1 -1
- package/dist/src/services/job/job-resource-snapshot.js +29 -1
- package/dist/src/services/memory/project-memory-service.js +1 -1
- package/dist/src/services/migrate-skill-name/migrate.d.ts +17 -0
- package/dist/src/services/migrate-skill-name/migrate.js +152 -0
- package/dist/src/services/migrate-skill-name/schema.d.ts +42 -0
- package/dist/src/services/migrate-skill-name/schema.js +25 -0
- package/dist/src/services/observability/aggregation.d.ts +1 -1
- package/dist/src/services/observability/aggregation.js +1 -1
- package/dist/src/services/perf/perf-baseline-service.d.ts +1 -1
- package/dist/src/services/perf/perf-baseline-service.js +1 -1
- package/dist/src/services/prd/handoff-types.d.ts +1 -1
- package/dist/src/services/prd/handoff-types.js +1 -1
- package/dist/src/services/preferences/preferences-service.d.ts +1 -1
- package/dist/src/services/preferences/preferences-types.d.ts +1 -1
- package/dist/src/services/progress/progress-service.d.ts +1 -1
- package/dist/src/services/progress/progress-service.js +1 -1
- package/dist/src/services/rd/standards-diagnostic.d.ts +1 -1
- package/dist/src/services/rd/standards-diagnostic.js +3 -3
- package/dist/src/services/recommendations/capability-seed-items.js +1 -1
- package/dist/src/services/recommendations/capability-seed-mappings.js +1 -1
- package/dist/src/services/recommendations/recommendation-service.js +1 -1
- package/dist/src/services/refactor/refactor-service.d.ts +1 -1
- package/dist/src/services/sc/sc-service.js +1 -1
- package/dist/src/services/sediment/dispose-confirm.d.ts +9 -0
- package/dist/src/services/sediment/dispose-confirm.js +5 -0
- package/dist/src/services/sediment/json-schema.d.ts +247 -0
- package/dist/src/services/sediment/json-schema.js +26 -0
- package/dist/src/services/sediment/manifest-lint.d.ts +13 -0
- package/dist/src/services/sediment/manifest-lint.js +11 -0
- package/dist/src/services/sediment/pool-paths.d.ts +22 -0
- package/dist/src/services/sediment/pool-paths.js +25 -0
- package/dist/src/services/sediment/pool-read.d.ts +20 -0
- package/dist/src/services/sediment/pool-read.js +73 -0
- package/dist/src/services/sediment/pool-rebuild-index.d.ts +15 -0
- package/dist/src/services/sediment/pool-rebuild-index.js +28 -0
- package/dist/src/services/sediment/pool-write.d.ts +14 -0
- package/dist/src/services/sediment/pool-write.js +25 -0
- package/dist/src/services/sediment/promotion-gate.d.ts +12 -0
- package/dist/src/services/sediment/promotion-gate.js +20 -0
- package/dist/src/services/sediment/types.d.ts +52 -0
- package/dist/src/services/sediment/types.js +1 -0
- package/dist/src/services/session/binding-store.d.ts +1 -1
- package/dist/src/services/session/binding-store.js +1 -1
- package/dist/src/services/session/caller-id-types.d.ts +1 -1
- package/dist/src/services/session/session-manager.d.ts +1 -1
- package/dist/src/services/session/session-manager.js +1 -1
- package/dist/src/services/signal/cancel-handler.js +3 -3
- package/dist/src/services/skill/resume-detector.js +2 -2
- package/dist/src/services/skill/skill-scheduler.d.ts +1 -1
- package/dist/src/services/skill/skill-scheduler.js +1 -1
- package/dist/src/services/skillhub/release-diff.d.ts +18 -0
- package/dist/src/services/skillhub/release-diff.js +38 -0
- package/dist/src/services/skillhub/release-export.d.ts +8 -0
- package/dist/src/services/skillhub/release-export.js +31 -0
- package/dist/src/services/skillhub/release-gc-blobs.d.ts +13 -0
- package/dist/src/services/skillhub/release-gc-blobs.js +32 -0
- package/dist/src/services/skillhub/release-import.d.ts +7 -0
- package/dist/src/services/skillhub/release-import.js +59 -0
- package/dist/src/services/skillhub/release-retain.d.ts +23 -0
- package/dist/src/services/skillhub/release-retain.js +89 -0
- package/dist/src/services/skillhub/sqlite-store.d.ts +22 -0
- package/dist/src/services/skillhub/sqlite-store.js +47 -0
- package/dist/src/services/skillhub/tar-runtime.d.ts +21 -0
- package/dist/src/services/skillhub/tar-runtime.js +91 -0
- package/dist/src/services/skillhub/types.d.ts +105 -0
- package/dist/src/services/skillhub/types.js +1 -0
- package/dist/src/services/skills/skill-conformance-service.js +8 -5
- package/dist/src/services/skills/skill-presence-service.d.ts +5 -5
- package/dist/src/services/skills/skill-presence-service.js +2 -2
- package/dist/src/services/skills/skill-registry.js +27 -0
- package/dist/src/services/skills/skill-runbook-service.js +2 -2
- package/dist/src/services/slice/slice-check-service.js +1 -1
- package/dist/src/services/slice/slice-check-types.d.ts +1 -1
- package/dist/src/services/slice/slice-check-types.js +1 -1
- package/dist/src/services/slice/slice-decompose-types.d.ts +1 -1
- package/dist/src/services/slice/slice-decompose-types.js +1 -1
- package/dist/src/services/standards/missing-standards-detector.d.ts +1 -1
- package/dist/src/services/standards/missing-standards-detector.js +1 -1
- package/dist/src/services/standards/project-standards-service.d.ts +1 -1
- package/dist/src/services/standards/project-standards-service.js +4 -4
- package/dist/src/services/understand/understand-types.d.ts +1 -1
- package/dist/src/services/upgrade/1x-detector-service.js +2 -2
- package/dist/src/services/upgrade/upgrade-service.d.ts +34 -0
- package/dist/src/services/upgrade/upgrade-service.js +52 -30
- package/dist/src/services/verdict/verdict-aggregator.d.ts +1 -1
- package/dist/src/services/workflow/pipeline-verify-service.d.ts +1 -1
- package/dist/src/services/workflow/pipeline-verify-service.js +3 -3
- package/dist/src/services/workflow/workflow-autonomous-service.d.ts +3 -3
- package/dist/src/services/workflow/workflow-autonomous-service.js +2 -2
- package/dist/src/services/workflow/workflow-router-service.d.ts +7 -7
- package/dist/src/services/workflow/workflow-router-service.js +33 -33
- package/dist/src/services/workspace/claude-settings-template.d.ts +2 -2
- package/dist/src/services/workspace/claude-settings-template.js +7 -7
- package/dist/src/services/workspace/workspace-claude-settings-materializer.d.ts +1 -1
- package/dist/src/services/workspace/workspace-claude-settings-materializer.js +1 -1
- package/dist/src/services/workspace/workspace-service.d.ts +4 -4
- package/dist/src/services/workspace/workspace-service.js +2 -2
- package/dist/src/shared/paths.d.ts +1 -1
- package/dist/src/shared/paths.js +1 -1
- package/dist/src/shared/version.d.ts +1 -1
- package/dist/src/shared/version.js +1 -1
- package/dist/src/skills/peaks-maker/index.d.ts +5 -0
- package/dist/src/skills/peaks-maker/index.js +32 -0
- package/output-styles/peaks-skill-swarm.md +3 -3
- package/package.json +8 -3
- package/scripts/install-skills.mjs +29 -4
- package/skills/{peaks-prd → bee/peaks-prd}/SKILL.md +8 -2
- package/skills/{peaks-prd → bee/peaks-prd}/references/workflow.md +1 -1
- package/skills/{peaks-qa → bee/peaks-qa}/SKILL.md +10 -4
- package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-per-request.md +3 -3
- package/skills/{peaks-qa → bee/peaks-qa}/references/browser-validation-contracts.md +2 -2
- package/skills/{peaks-qa → bee/peaks-qa}/references/external-capability-guidance.md +1 -1
- package/skills/{peaks-qa → bee/peaks-qa}/references/qa-fanout-contract.md +3 -3
- package/skills/{peaks-qa → bee/peaks-qa}/references/qa-sub-agent-dispatch.md +7 -7
- package/skills/{peaks-rd → bee/peaks-rd}/SKILL.md +13 -6
- package/skills/{peaks-rd → bee/peaks-rd}/references/browser-self-test-contracts.md +1 -1
- package/skills/{peaks-rd → bee/peaks-rd}/references/mock-data-placement.md +1 -1
- package/skills/{peaks-rd → bee/peaks-rd}/references/parallel-review-fanout.md +1 -1
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-fanout-contracts.md +1 -1
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-runbook.md +2 -2
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-sub-agent-dispatch.md +13 -13
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-transition-gates.md +2 -2
- package/skills/{peaks-rd → bee/peaks-rd}/references/skill-presence-and-title.md +1 -1
- package/skills/{peaks-reviewer → bee/peaks-reviewer}/SKILL.md +2 -2
- package/skills/{peaks-sc → bee/peaks-sc}/SKILL.md +8 -2
- package/skills/{peaks-txt → bee/peaks-txt}/SKILL.md +11 -5
- package/skills/{peaks-ui → bee/peaks-ui}/SKILL.md +19 -13
- package/skills/peaks-audit/SKILL.md +1 -1
- package/skills/{peaks-solo → peaks-code}/SKILL.md +29 -29
- package/skills/{peaks-solo → peaks-code}/references/a2a-artifact-mapping.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/anchoring-and-session-info.md +6 -6
- package/skills/{peaks-solo → peaks-code}/references/artifact-contracts.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/boundaries.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/browser-workflow.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/codegraph-orchestration.md +1 -1
- package/skills/peaks-code/references/command-migration.md +3 -0
- package/skills/{peaks-solo → peaks-code}/references/completion-handoff.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/context-governance.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/dag-orchestrator.md +7 -7
- package/skills/{peaks-solo → peaks-code}/references/external-references.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/fanout-mandatory.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/fast-mode.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/frontend-only-mode.md +10 -10
- package/skills/{peaks-solo → peaks-code}/references/job-loop.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/local-artifact-workspace.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/micro-cycle.md +23 -23
- package/skills/{peaks-solo → peaks-code}/references/mode-selection-with-stale-presence.md +16 -16
- package/skills/{peaks-solo → peaks-code}/references/mode-selection.md +4 -4
- package/skills/{peaks-solo → peaks-code}/references/openspec-workflow.md +17 -17
- package/skills/{peaks-solo → peaks-code}/references/periodic-checkpoint.md +4 -4
- package/skills/{peaks-solo → peaks-code}/references/project-scan-checklist.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/quality-gate-cheatsheet.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/refactor-mode.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/resume-detection.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/runbook.md +20 -20
- package/skills/{peaks-solo → peaks-code}/references/skill-presence-and-title.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/standards-preflight.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/step-0-55-1x-detection.md +6 -6
- package/skills/{peaks-solo → peaks-code}/references/step-0-8-gate.md +11 -11
- package/skills/{peaks-solo → peaks-code}/references/sub-agent-dispatch.md +17 -17
- package/skills/{peaks-solo → peaks-code}/references/swarm-dispatch-contract.md +22 -22
- package/skills/{peaks-solo → peaks-code}/references/workflow-gates-and-types.md +4 -4
- package/skills/{peaks-solo → peaks-code}/references/workflow.md +5 -5
- package/skills/peaks-doctor/SKILL.md +1 -1
- package/skills/peaks-doctor/references/doctor-check-catalog.md +1 -1
- package/skills/peaks-final-review/SKILL.md +3 -3
- package/skills/peaks-final-review/references/4-dimensions.md +1 -1
- package/skills/peaks-ide/SKILL.md +1 -1
- package/skills/{peaks-solo-resume → peaks-resume}/SKILL.md +15 -15
- package/skills/peaks-sop/SKILL.md +1 -1
- package/skills/{peaks-solo-status → peaks-status}/SKILL.md +14 -14
- package/skills/{peaks-solo-test → peaks-test}/SKILL.md +12 -12
- package/skills/peaks-solo/references/command-migration.md +0 -3
- /package/dist/src/services/{solo → code}/batch-heartbeat-poller.d.ts +0 -0
- /package/dist/src/services/{solo → code}/batch-heartbeat-poller.js +0 -0
- /package/dist/src/services/{solo → code}/status-line-renderer.js +0 -0
- /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/SKILL.md +0 -0
- /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/references/audit-protocol.md +0 -0
- /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-per-request.md +0 -0
- /package/skills/{peaks-prd → bee/peaks-prd}/references/command-migration.md +0 -0
- /package/skills/{peaks-prd → bee/peaks-prd}/references/prd-for-multi-pass.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/codegraph-regression-focus.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/command-migration.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/openspec-validation-gate.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-compact-handoff.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-context-governance.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-gstack-integration.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-local-artifacts.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-matt-pocock-integration.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-perf-test-plan.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-refactor-role.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-runbook.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-security-test-plan.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-skill-presence.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-standards-preflight.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-transition-gates.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/reading-handoff-frontmatter.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/regression-gates.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/requirement-boundary-recheck.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/test-case-generation.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/test-report-output.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-and-standards-output.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-per-request.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/browser-action-wrapper.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/code-reviewer-4dim-hint.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/codegraph-project-analysis.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/command-migration.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/compact-handoff.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/external-references.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/frontend-project-generation.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/karpathy-reviewer-prompt.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/library-version-awareness.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/mandatory-perf-baseline.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/matt-pocock-integration.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/ocr-integration.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/openspec-cli.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-context-governance.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-gstack-integration.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-standards-preflight.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/reading-v2-slice-results.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/refactor-workflow.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/v2-12-fanout-collapse.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/writing-handoff-frontmatter.md +0 -0
- /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-prompt.md +0 -0
- /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-schema.md +0 -0
- /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-retention.md +0 -0
- /package/skills/{peaks-sc → bee/peaks-sc}/references/command-migration.md +0 -0
- /package/skills/{peaks-sc → bee/peaks-sc}/references/openspec-commit-boundaries.md +0 -0
- /package/skills/{peaks-security-audit → bee/peaks-security-audit}/SKILL.md +0 -0
- /package/skills/{peaks-security-audit → bee/peaks-security-audit}/references/audit-protocol.md +0 -0
- /package/skills/{peaks-txt → bee/peaks-txt}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-txt → bee/peaks-txt}/references/command-migration.md +0 -0
- /package/skills/{peaks-txt → bee/peaks-txt}/references/context-capsule.md +0 -0
- /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-per-request.md +0 -0
- /package/skills/{peaks-ui → bee/peaks-ui}/references/command-migration.md +0 -0
- /package/skills/{peaks-ui → bee/peaks-ui}/references/workflow.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/checkpoint-resume.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/cross-date-session-check.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/envelope-contract.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/existing-system-extraction.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/external-skill-invocation.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/gstack-integration.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/headroom-integration.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/playwright-mcp-multi-terminal.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/project-memory-loading.md +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,56 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
## 4.0.0-beta.2 — 2026-07-07
|
|
6
|
+
|
|
7
|
+
### Renamed
|
|
8
|
+
- **`peaks-solo` → `peaks-code`** — the long-running code-domain orchestrator skill (PRD/RD/QA/UI/SC/TXT pipeline) has been renamed to communicate its scope more accurately. The on-disk directory `~/.peaks/skills/.system/bees/peaks-code/` is preserved as a stable install location; only the manifest `id` and `displayName` change (`peaks-code` / `Peaks Code`). All four sibling skills (`peaks-solo-resume` → `peaks-resume`, `peaks-solo-status` → `peaks-status`, `peaks-solo-test` → `peaks-test`) are now top-level primitives rather than child skills of `peaks-solo`. Migration: `peaks session migrate-skill-name --from peaks-solo --to peaks-code --apply`.
|
|
9
|
+
|
|
10
|
+
### Changed (Breaking)
|
|
11
|
+
- **`peaks skill presence:set peaks-solo` no longer recognized** — the canonical skill name is now `peaks-code`. Existing `.peaks/_runtime/*/active-skill.json` files carrying `skill: "peaks-solo"` are migrated by `peaks session migrate-skill-name`. Manual override: edit the file and replace `"skill": "peaks-solo"` with `"skill": "peaks-code"`.
|
|
12
|
+
- **CLI surface unchanged** — `peaks code`, `peaks code --fast`, and the entire `peaks-code` skill runbook continue to function; only the skill-identification field (`id`, `displayName`, presence `skill` value) changes. The runbook name `peaks code` is the user-facing verb and remains as-is.
|
|
13
|
+
|
|
14
|
+
### Fixed (post-rename polish)
|
|
15
|
+
- **Rule name normalization** — `Code Code-Change Red Line` → `Code Commit Ban Red Line` (8 occurrences across `src/services/audit/enforcers/code-ban.ts`, `src/cli/commands/hook-handle.ts`, and the audit tests). Aligns with `red-line-catalog.ts` entry `rl-code-ban-001` / `Code Commit Ban`.
|
|
16
|
+
- **Wire-format error code rename** — `SOLO_MODE_REQUIRES_SOLO_WORKFLOW` → `CODE_MODE_REQUIRES_CODE_WORKFLOW` and `UNSUPPORTED_SOLO_MODE` → `UNSUPPORTED_CODE_MODE` in `src/cli/commands/workflow-commands.ts` (4 test sites updated).
|
|
17
|
+
- **Test local consts** — `soloResult/soloOutput` → `codeResult/codeOutput` in `tests/unit/cli-program.workflow.test.ts`; `SOLO_PATH/soloAbsPath` → `CODE_PATH/codeAbsPath` in `tests/unit/code/skills-subagent-scope-dir.test.ts`; `SOLO_REF/SOLO_FANOUT_REF` → `CODE_REF/CODE_FANOUT_REF` in `tests/unit/dispatch/dispatch-fanout-mandatory.test.ts`.
|
|
18
|
+
- **CHANGELOG self-contradiction** — the rename entry previously read `peaks-code → peaks-code` (collapsed by the global `s/Solo/Code/g` substitution). Now correctly reads `peaks-solo → peaks-code`.
|
|
19
|
+
- **`deriveRuleName` test expectation** — `tests/unit/services/audit/classifier.test.ts` expected 9 words but the function correctly truncates to 8. Updated to match the new word split introduced by `Code Commit Ban` (2 words) replacing `Code Code-Change` (1 hyphenated word).
|
|
20
|
+
- **Output style mode label** — `.claude/output-styles/peaks-skill-swarm.md` now uses `Code` instead of `Solo` in the mode badge and prose (3 occurrences).
|
|
21
|
+
- **Project history row** — `.peaks/PROJECT.md` session-history row `001-solo-memory-write-broken` → `001-code-memory-write-broken`.
|
|
22
|
+
- **Video demo copy** — `examples/video-demo/src/copy.ts` `skillWas: 'peaks-solo'` → `skillWas: 'peaks-code'` (legacy label, both locales).
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- **Manifest id field** — `.peaks/skills/.system/bees/peaks-code/manifest.json` now carries `{ "id": "peaks-code", "displayName": "Peaks Code" }`. The `migrate-skill-name` service explicitly skips this file (test: `session-migrate-skill-name.test.ts:69` "跳过 .peaks/skills/.system/bees/peaks-code/manifest.json") so the canonical id is only ever edited by hand or by an explicit `peaks skill sediment refine-bee` flow, never by bulk migration.
|
|
26
|
+
- **Spec §4.1.1 rewrite** — `docs/superpowers/specs/2026-07-04-peaks-maker-dynamic-skill-sediment-design.md` §4.1.1 has been rewritten from "peaks-code as preserved alias" to "peaks-code as the system-stable code-domain bee (renamed from peaks-code)". The plan's spec-coverage table now references the renamed heading.
|
|
27
|
+
- **Migration helper** — `peaks session migrate-skill-name --from <old> --to <new> [--apply]` is the supported path for renaming skill references in `.peaks/_runtime/`. Idempotent; skip-list includes `.peaks/memory/**` and `.peaks/skills/.system/bees/peaks-code/manifest.json`.
|
|
28
|
+
|
|
29
|
+
### Verification
|
|
30
|
+
- `tsc --noEmit` zero errors
|
|
31
|
+
- Full `vitest run` exit 0 (all 30 touched test files / 265 directly-tested assertions pass)
|
|
32
|
+
- `silent-warning-detector` OK on 481 files
|
|
33
|
+
- All rename+polish changes committed as `b1dbc51 chore(rename): complete peaks-solo → peaks-code sweep + polish`
|
|
34
|
+
|
|
3
35
|
## 3.1.2 — 2026-07-04
|
|
4
36
|
|
|
5
37
|
### Added — Mechanical Job-mode gates (Step 0.8 enforcement)
|
|
6
38
|
|
|
7
|
-
The v3.1.1 recorder-only design was bypassed twice under load (2026-07-03 35-slice incident, 2026-07-04 3018-file incident): the LLM skipped `peaks
|
|
39
|
+
The v3.1.1 recorder-only design was bypassed twice under load (2026-07-03 35-slice incident, 2026-07-04 3018-file incident): the LLM skipped `peaks code detect-job` and ran fake-completion narratives instead of Job mode. The v3.1.2 patch converts Step 0.8 from "LLM should call" to "LLM cannot proceed without calling" through four mechanical gates — no LLM interpretation required.
|
|
8
40
|
|
|
9
|
-
- **PreToolUse hook** — `peaks workspace init` now installs a `Bash` matcher in `.claude/settings.local.json` (TEMPLATE_VERSION bumped 1.2.0 → 1.3.0) that runs `peaks
|
|
10
|
-
- **`peaks
|
|
11
|
-
- **Size-fear ban** — `peaks
|
|
12
|
-
- **Forced auto-compact** — extended `peaks
|
|
41
|
+
- **PreToolUse hook** — `peaks workspace init` now installs a `Bash` matcher in `.claude/settings.local.json` (TEMPLATE_VERSION bumped 1.2.0 → 1.3.0) that runs `peaks code gate-step-08 --project .` before every Bash call. Exit 0 = allow, exit 2 = block. Existing `Write|Edit|MultiEdit` matcher preserved. Re-running `peaks workspace init` is idempotent (`templateContentMatches`).
|
|
42
|
+
- **`peaks code gate-step-08`** — new service `src/services/code/step-08-gate.ts` (~120 LOC) + CLI. Reads `.peaks/_runtime/<sessionId>/job-shape.json`. When `decision.isJob=true` AND `job/<jid>/progress.json` exists, prints `Next: slice #<done+1> of <total> (<currentSlice>)` so the LLM cannot wake up cold. When the file is missing AND the user's prompt (from `--prompt` / `last-prompt.txt`) matches the fail-closed backup regex `/(until|全部|until all done|disavow cost|不用考虑费用|all of them)/i`, exits 2 with `BLOCKED:` on stderr.
|
|
43
|
+
- **Size-fear ban** — `peaks code emit-handoff`. New service `src/services/code/emit-handoff.ts` (~70 LOC) + CLI. Under Job mode (`isJob=true`), refuses to emit a final handoff while `remaining > 0`. Codes: `JOB_NOT_INITIALIZED` (no state.json), `JOB_REMAINING_BLOCKED` (remaining > 0), allow when `remaining === 0`, allow under `--force-under-job` override.
|
|
44
|
+
- **Forced auto-compact** — extended `peaks code context-now` with `--enforce-job-mode` (auto-enabled when `job-shape.json` says `isJob=true`). At `ratio >= 0.85` returns `action: 'auto-compact-now'` (MANDATORY, not advisory); at `ratio >= 0.95` returns `action: 'red-line'`. SKILL.md Step N+2 prose updated: "in Job mode, ≥ 0.85 is MANDATORY auto-compact."
|
|
13
45
|
- **On-disk slice progress** — `peaks job checkpoint --state done` now writes `.peaks/_runtime/<sessionId>/job/<jid>/progress.json` after updating state.json. New `peaks job progress --job-id <jid>` reader. `gate-step-08` reads the same file in its allow-job path so the LLM gets resume context BEFORE any Bash call. SKILL.md Step 0.7 updated: "if progress.json exists, read it FIRST and surface `Next: slice #N of M (<currentSlice>)`."
|
|
14
46
|
|
|
15
47
|
### Tests (v3.1.2)
|
|
16
48
|
|
|
17
|
-
- `tests/unit/
|
|
18
|
-
- `tests/unit/
|
|
19
|
-
- `tests/integration/
|
|
20
|
-
- Extended `tests/unit/
|
|
21
|
-
- Extended `tests/unit/workspace/workspace-init-claude-hooks.test.ts` case-A to assert both PreToolUse matchers (`Write|Edit|MultiEdit` AND `Bash`) are emitted with the new Bash command invoking `peaks
|
|
49
|
+
- `tests/unit/code/gate-step-08.test.ts` — 9 unit tests covering the 4 paths + Next: slice context injection + backup-regex sanity + prompt-source fallback.
|
|
50
|
+
- `tests/unit/code/emit-handoff.test.ts` — 10 unit tests covering the 4 paths + `--force-under-job` override + `JOB_NOT_INITIALIZED` + skipped-slices edge case + `--job-id` override.
|
|
51
|
+
- `tests/integration/code-gate-step-08-hook.test.ts` — 5 integration tests spawning `node bin/peaks.js code gate-step-08` as a real child process (the hook protocol itself), asserting exit 0 / exit 2 + stderr BLOCKED line + JSON envelope shape.
|
|
52
|
+
- Extended `tests/unit/code/code-step-08-block-guard.test.ts` to assert SKILL.md + runbook.md reference `peaks code gate-step-08`, `peaks code emit-handoff`, `peaks job progress`, and the Job-mode MANDATORY auto-compact prose.
|
|
53
|
+
- Extended `tests/unit/workspace/workspace-init-claude-hooks.test.ts` case-A to assert both PreToolUse matchers (`Write|Edit|MultiEdit` AND `Bash`) are emitted with the new Bash command invoking `peaks code gate-step-08`.
|
|
22
54
|
|
|
23
55
|
### Memory
|
|
24
56
|
|
|
@@ -28,17 +60,17 @@ Two consecutive ship-day incidents motivated this release: `2026-07-03-v3-1-0-jo
|
|
|
28
60
|
|
|
29
61
|
### Added — Step 0.8 detector-as-recorder (LLM-judged, CLI-validated)
|
|
30
62
|
|
|
31
|
-
`peaks-
|
|
63
|
+
`peaks-code` Step 0.8 is no longer prose-only: the LLM makes the Job-shape judgement, the CLI records it. The CLI is a **recorder and gate**, not a detector — no keyword regex anywhere in the service or CLI (the LLM is the source of truth). Downstream steps refuse to proceed until the decision file exists.
|
|
32
64
|
|
|
33
|
-
- New service: `src/services/
|
|
65
|
+
- New service: `src/services/code/job-shape-decision.ts` — `readJobShapeDecision` / `writeJobShapeDecision` / `validateJobShapeDecision`. Persists to `.peaks/_runtime/<sessionId>/job-shape.json`; server-side stamps `decidedAt` so the LLM cannot back-date; throws `JOB_SHAPE_NOT_DECIDED` on missing / unreadable / malformed.
|
|
34
66
|
- New CLI subcommands:
|
|
35
|
-
- `peaks
|
|
36
|
-
- `peaks
|
|
37
|
-
- New tests: `tests/unit/
|
|
67
|
+
- `peaks code detect-job --is-job <bool> --rationale <text> --suggested-job-id <jid> [--suggested-strategy single|rotating] [--confidence high|medium|low] [--force]` — recorder. Validates `suggestedJobId` against `/^[a-z0-9][a-z0-9-]{2,40}$/`, hashes the user prompt, writes the file. Refuses overwrite without `--force`.
|
|
68
|
+
- `peaks code read-job-shape` — downstream gate. Returns the current record or `JOB_SHAPE_NOT_DECIDED`.
|
|
69
|
+
- New tests: `tests/unit/code/job-shape-decision.test.ts` (validate happy/sad, server-stamp `decidedAt`, force semantics, missing/unreadable/malformed, round-trip, promptHash determinism), `tests/integration/code-detect-job-command.test.ts` (CLI spawn happy / bad-flag / read-back / fresh / force), `tests/unit/code/code-step-08-block-guard.test.ts` (locks the SKILL.md / runbook contract: `BLOCKING on LLM judgement`, `peaks code detect-job`, `peaks code read-job-shape`, and runbook ordering before `# After Step 7`).
|
|
38
70
|
|
|
39
71
|
### Hard red line #10 (v3.1.1)
|
|
40
72
|
|
|
41
|
-
The LLM MUST NOT skip `peaks
|
|
73
|
+
The LLM MUST NOT skip `peaks code detect-job` even when the trigger is obvious from context. If the next step's `read-job-shape` throws `JOB_SHAPE_NOT_DECIDED`, Code MUST record a decision before proceeding. Keyword-based "I already know it's a Job" is not a substitute — the LLM is the only authority for the Job-shape judgement, and the CLI is the only place that records it.
|
|
42
74
|
|
|
43
75
|
### Memory
|
|
44
76
|
|
|
@@ -46,9 +78,9 @@ Incident + rationale: `.peaks/memory/2026-07-03-v3-1-0-job-trigger-miss.md`. Thi
|
|
|
46
78
|
|
|
47
79
|
## 3.1.0 — 2026-07-03
|
|
48
80
|
|
|
49
|
-
### Fixed — peaks-
|
|
81
|
+
### Fixed — peaks-code external-references authority declaration
|
|
50
82
|
|
|
51
|
-
- `skills/peaks-
|
|
83
|
+
- `skills/peaks-code/SKILL.md` External-references paragraph now ends with `Peaks-Loop Code gates and artifacts remain authoritative.` to satisfy `tests/unit/skill-external-invocation.test.ts:63` (`PEAKS_AUTHORITATIVE_PATTERN`). One-line surgical patch; no behaviour change.
|
|
52
84
|
|
|
53
85
|
### Added — Peaks-Loop Job
|
|
54
86
|
|
|
@@ -56,7 +88,7 @@ Incident + rationale: `.peaks/memory/2026-07-03-v3-1-0-job-trigger-miss.md`. Thi
|
|
|
56
88
|
- New CLI flag `--main-loop-strategy single|rotating` on `job init`, with rotating-mode hard default for ≥3 slices and `rotateEvery=3` cadence.
|
|
57
89
|
- New `--watch` poll mode + statusline event stub (`emitJobEvent`) for ambient progress visibility. Real statusline wire-up deferred to a follow-up slice.
|
|
58
90
|
- Sub-agent wrapper `SubAgentJobWrapper` enforces `--budget-mb 512` default + cleanup gate before slice checkpoint.
|
|
59
|
-
- New peaks-
|
|
91
|
+
- New peaks-code SKILL.md Steps 0.8 / 0.81 / 0.85 / 0.86 / 0.87 wrapping the existing single-rid runbook for multi-slice jobs.
|
|
60
92
|
- 9 hard-red-line rules embedded in the skill prose (cost re-ask ban, slice-coalesce ban, fake-completion ban, detached-mode ban, cleanup-skip ban, rotate-skip ban, etc).
|
|
61
93
|
|
|
62
94
|
### New services
|
|
@@ -71,7 +103,7 @@ Incident + rationale: `.peaks/memory/2026-07-03-v3-1-0-job-trigger-miss.md`. Thi
|
|
|
71
103
|
|
|
72
104
|
### Migration
|
|
73
105
|
|
|
74
|
-
- Existing single-rid flows are unchanged. The Job is opt-in via peaks-
|
|
106
|
+
- Existing single-rid flows are unchanged. The Job is opt-in via peaks-code Step 0.8 detection; users who do not invoke multi-slice requests see no behavior difference.
|
|
75
107
|
- The `peaks session rotate` and `peaks session cycle-summary` subcommands referenced in the spec are NOT shipped in v1; the rotation path uses constructor-injected stub callbacks. M6.5 follow-up will add the real subcommands.
|
|
76
108
|
|
|
77
109
|
### Spec / plan
|
|
@@ -90,19 +122,19 @@ The v2.13.0 auto-compact design shipped `shell-exec` as the only pathway, which
|
|
|
90
122
|
- **New `ide-native` pathway** — `src/services/context/auto-compact-dispatcher.ts:138-155` routes main-session compacts through `installAutoCompactHook`, which writes a PreToolUse hook into `.claude/settings.local.json` (matcher `Bash|Task`, command `peaks session auto-compact-hook`).
|
|
91
123
|
- **New `peaks session auto-compact-hook` CLI** — `src/cli/commands/session-auto-compact-hook-command.ts`. Reads `CLAUDE_CONTEXT_USAGE_PERCENT`; below 0.95 exits 0 silent; at ratio ≥ 0.95 spawns `claude --compact` in-band against the **current** runner (detached + unref, never blocks the runner's tool call). ENOENT-safe: if `claude` is not on PATH (e.g. user runs Claude Code as an MCP), the hook logs a stderr hint and exits 0 silent rather than crashing the runner.
|
|
92
124
|
- **New `installAutoCompactHook` / `removeAutoCompactHook` service** — `src/services/hooks/auto-compact-hook-install.ts`. Idempotent: re-install returns `already-installed` and does NOT re-write the file; remove preserves other PreToolUse entries (the existing fact-forcing bypass hook on every peaks-loop consumer project survives).
|
|
93
|
-
- **Lazy install** — hook is installed on first `peaks
|
|
125
|
+
- **Lazy install** — hook is installed on first `peaks code auto-compact` invocation, NOT on `peaks workspace init`. User has opted in by running the command; no zero-touch surprise.
|
|
94
126
|
- **Claude Code adapter** — `compactPathway` changed from `shell-exec` to `ide-native` for `target='main'`. Sub-agent shells still get the legacy `shell-exec` pathway.
|
|
95
127
|
|
|
96
|
-
### Fixed —
|
|
128
|
+
### Fixed — Code Step N+2 prose (was 75% / "do NOT auto-execute")
|
|
97
129
|
|
|
98
|
-
- `skills/peaks-
|
|
130
|
+
- `skills/peaks-code/SKILL.md` Step N+2 paragraph rewritten: thresholds now 0.85 pre-compact / 0.95 red-line (matches v2.13.0 auto-compact), explicit Karpathy §4 compact-red-line exception cited, `peaks code context-now --json` is the canonical probe primitive (replaces `peaks context check --prompt-size <bytes>` hand-pass).
|
|
99
131
|
- `src/services/context/main-session-monitor.ts` — `@deprecated` JSDoc on `evaluateMainSessionThreshold` cross-links to `evaluateCompactTrigger` (0.85/0.95); legacy 4-tier envelope retained for statusline callers (migration to v2.15.0).
|
|
100
132
|
|
|
101
133
|
### Tests — 4 new suites + 3 modified files
|
|
102
134
|
|
|
103
135
|
- `tests/unit/services/hooks/auto-compact-hook-install.test.ts` (7 cases) — install / idempotent / remove / preservation of unrelated entries.
|
|
104
136
|
- `tests/unit/services/context/auto-compact-dispatcher-ide-native.test.ts` (9 cases) — `dispatchIdeCompact({ target: 'main' })` routes to `ide-native`; round-trip install / remove.
|
|
105
|
-
- `tests/unit/skills/
|
|
137
|
+
- `tests/unit/skills/code-step-n-plus-2-prose.test.ts` (6 cases) — pins the 0.85 / 0.95 / Karpathy §4 contract; asserts `75%` is NOT in the paragraph.
|
|
106
138
|
- `tests/unit/cli/session-auto-compact-hook-command.test.ts` (3 cases) — dogfood surfacing: below-threshold silent, missing env-var silent, red-line + ENOENT exits 0 with stderr hint.
|
|
107
139
|
- `tests/unit/services/context/main-session-monitor.test.ts` (+2 AC-4 cases), `tests/unit/context/auto-compact-main-target.test.ts` (pathway assertion updated) — coverage.
|
|
108
140
|
|
|
@@ -196,7 +228,7 @@ The v2.19.0 work shipped as code commits (`f91d71c`, `5186d3d`, `b598612`, `ced8
|
|
|
196
228
|
|
|
197
229
|
The Understand Anything (UA) Claude Code plugin and `@colbymchenry/codegraph` are both complementary project-analysis tools. UA provides a high-level knowledge graph (tours, layers, expert prompts); codegraph provides low-level affected-file analysis. Until 3.0.2, peaks-loop consumers had to choose one or the other at the LLM level — there was no service-layer enforcement of either.
|
|
198
230
|
|
|
199
|
-
This slice adds a single `peaks understand context` subcommand that encapsulates the routing decision in the service layer (per the peaks-loop "skill-first / CLI-auxiliary" architecture — see `peaks-
|
|
231
|
+
This slice adds a single `peaks understand context` subcommand that encapsulates the routing decision in the service layer (per the peaks-loop "skill-first / CLI-auxiliary" architecture — see `peaks-code` SKILL.md). The envelope carries a `source` tag so downstream consumers can audit which evidence contributed to the context.
|
|
200
232
|
|
|
201
233
|
**Source routing** (deterministic, decided in `buildUnderstandContext`):
|
|
202
234
|
- `ua-only` — UA knowledge graph present, no codegraph
|
|
@@ -217,41 +249,41 @@ The peak-loop skill-external-invocation audit pattern (capability discovery + re
|
|
|
217
249
|
|
|
218
250
|
### Removed — change-id shim (cleanup post v2.17.0 hard-kill, rolled up from v2.19.0)
|
|
219
251
|
|
|
220
|
-
**PATCH bump from 2.18.3**. Resolves the user-reported "新项目第一次使用 peaks-
|
|
252
|
+
**PATCH bump from 2.18.3**. Resolves the user-reported "新项目第一次使用 peaks-code 时初始化完不按流程走、开发效果差、再开 session 后才正常" defect. Two surgical fixes to the first-run Code gates (3 source files, 1 new test file, 2 test-regression updates; no schema change, no new dependencies, no public API change).
|
|
221
253
|
|
|
222
254
|
### Bugfix — `step-0.55-1x-upgrade` always pauses, even in `full-auto` (P0)
|
|
223
255
|
|
|
224
|
-
The 1.x → 2.0 upgrade is an irreversible external side effect (rewrites `~/.peaks/config.json` + the on-disk cache schema). Pre-fix, `peaks
|
|
256
|
+
The 1.x → 2.0 upgrade is an irreversible external side effect (rewrites `~/.peaks/config.json` + the on-disk cache schema). Pre-fix, `peaks code 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 Code 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.
|
|
225
257
|
|
|
226
|
-
- **Modified (2):** `src/services/
|
|
258
|
+
- **Modified (2):** `src/services/code/mode-gate.ts` (added 1 entry to `HARD_PAUSE_STEPS`), `src/services/code/user-touchpoint-classifier.ts` (reclassified the row from `tech/business-only` with `fullAutoCanProceed: true` to `commit-floor/always` with `fullAutoCanProceed: false`).
|
|
227
259
|
- **User-observed symptom (now fixed):** "首次启动后开发效果差" — caused by 1.x standards/config residue silently surviving `full-auto` and contaminating subsequent RD/QA artifact contracts.
|
|
228
260
|
|
|
229
|
-
### Bugfix — `--mode` is optional on `peaks
|
|
261
|
+
### Bugfix — `--mode` is optional on `peaks code should-pause` (P1, Step 1 chicken-and-egg)
|
|
230
262
|
|
|
231
|
-
`peaks
|
|
263
|
+
`peaks code 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.
|
|
232
264
|
|
|
233
|
-
- **Modified (1):** `src/cli/commands/
|
|
265
|
+
- **Modified (1):** `src/cli/commands/code-commands.ts` (option() + `mode` const + 5 reference rewrites inside the same action handler).
|
|
234
266
|
- **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.
|
|
235
267
|
|
|
236
268
|
### Test surface
|
|
237
269
|
|
|
238
|
-
- **Created (1):** `tests/unit/services/
|
|
239
|
-
- **Modified (2, regression-data extension):** `tests/unit/services/
|
|
270
|
+
- **Created (1):** `tests/unit/services/code/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).
|
|
271
|
+
- **Modified (2, regression-data extension):** `tests/unit/services/code/mode-gate.test.ts` (added `step-0.55-1x-upgrade` to the local `HARD_PAUSE_STEP_SET` test fixture), `tests/unit/services/code/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).
|
|
240
272
|
- **Updated (1):** `package.json` + `src/shared/version.ts` (2.18.3 → 2.18.4).
|
|
241
273
|
|
|
242
274
|
### Why this is the simplest fix
|
|
243
275
|
|
|
244
276
|
- 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.
|
|
245
|
-
- 800-line file cap respected: largest modified file is `
|
|
277
|
+
- 800-line file cap respected: largest modified file is `code-commands.ts` (well below the 800 cap).
|
|
246
278
|
- 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).
|
|
247
279
|
|
|
248
280
|
### Verification (QA cycle 1, verdict pass)
|
|
249
281
|
|
|
250
|
-
- AC-1: `peaks
|
|
251
|
-
- AC-2: `peaks
|
|
252
|
-
- AC-3: `peaks
|
|
282
|
+
- AC-1: `peaks code should-pause --step step-0.55-1x-upgrade --mode full-auto` → `ok: true, shouldPause: true, gateKind: "mode-selection-itself"` ✅
|
|
283
|
+
- AC-2: `peaks code should-pause --step step-1-mode-select` (no `--mode`) → `ok: true, shouldPause: true` (no "required option" error) ✅
|
|
284
|
+
- AC-3: `peaks code should-pause --step step-1-mode-select --mode full-auto` → byte-identical to AC-2 ✅
|
|
253
285
|
- Cross-mode 4×2 matrix (full-auto / assisted / strict / swarm × step-0.55 / step-1): 8/8 pause ✅
|
|
254
|
-
- `peaks-
|
|
286
|
+
- `peaks-code` first-run sequence (skill presence:check-stale + upgrade --detect-1x + 4 should-pause steps): 6/6 clean ✅
|
|
255
287
|
- vitest 527/527 passed (27 files, 0 failed, 22.61s wallclock)
|
|
256
288
|
- 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)
|
|
257
289
|
- QA verdict: `pass` (`verdict-2026-06-29-fix-first-run-step-gates.md`)
|
|
@@ -486,9 +518,9 @@ Each original file gets a sibling `import { ... } from './X-helpers.js'` + `expo
|
|
|
486
518
|
|
|
487
519
|
### Behavior changes (user-visible)
|
|
488
520
|
|
|
489
|
-
- **None at the CLI surface.** No new commands, no removed commands, no flag changes. Existing `peaks
|
|
521
|
+
- **None at the CLI surface.** No new commands, no removed commands, no flag changes. Existing `peaks code`, `peaks doctor`, `peaks request lint`, `peaks scan file-size` all behave identically.
|
|
490
522
|
- **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).
|
|
491
|
-
- **Multi-Claude parallel fix (user-visible in the dogfood scenarios):** opening 2 Claude Code windows in the same project and running `peaks
|
|
523
|
+
- **Multi-Claude parallel fix (user-visible in the dogfood scenarios):** opening 2 Claude Code windows in the same project and running `peaks code` in each now yields 2 distinct sids (was: 1 collided sid, per the v2.17.0 changelog dogfood scenario 1).
|
|
492
524
|
- **`/compact` resume (user-visible, no change):** same outer-session-id still reuses the same sid. Verified by dogfood.
|
|
493
525
|
|
|
494
526
|
### Verification
|
|
@@ -505,7 +537,7 @@ Each original file gets a sibling `import { ... } from './X-helpers.js'` + `expo
|
|
|
505
537
|
|---|---|---|---|
|
|
506
538
|
| 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 |
|
|
507
539
|
| B | peaks doctor stale-binding scan | PASS | 0 stale bindings, ttl=300000ms, v2.16.0 schema surface intact |
|
|
508
|
-
| C | peaks
|
|
540
|
+
| C | peaks code smoke (4 sub-commands) | PARTIAL | 3/4 pass; `peaks request lint --project .` is invalid syntax (needs `<rid>` + `--role`); not a v2.18.0 regression |
|
|
509
541
|
| 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 |
|
|
510
542
|
|
|
511
543
|
**Dogfood verdict:** 3.5 / 4 pass; `recommend_v2.18.0_commit: true`.
|
|
@@ -557,7 +589,7 @@ The first v2.18.0 release deferred two open items to a redo slice; both are now
|
|
|
557
589
|
|
|
558
590
|
### Feature — D2 Claude-instance-level hard-exclusive sid
|
|
559
591
|
|
|
560
|
-
- Same Claude instance keeps one sid across multiple peaks-* skill activations (peaks-
|
|
592
|
+
- Same Claude instance keeps one sid across multiple peaks-* skill activations (peaks-code → peaks-rd → peaks-qa).
|
|
561
593
|
- `/compact` resume: same outer-session-id reuses the same sid (post-compact-resume v2.11.0 D7 alignment).
|
|
562
594
|
|
|
563
595
|
### Feature — Doctor stale-binding scan (AC-10)
|
|
@@ -576,7 +608,7 @@ The first v2.18.0 release deferred two open items to a redo slice; both are now
|
|
|
576
608
|
### Behavior changes (user-visible)
|
|
577
609
|
|
|
578
610
|
- **`--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.
|
|
579
|
-
- **On-disk artifact paths** unchanged from a CLI user's perspective — reviewable artifacts still appear at the locations `peaks
|
|
611
|
+
- **On-disk artifact paths** unchanged from a CLI user's perspective — reviewable artifacts still appear at the locations `peaks code` / `peaks qa` write them. Internally they key off session id, not change-id.
|
|
580
612
|
- **`peaks doctor` exit code**: now exits 1 when stale bindings are present (in addition to its existing failure conditions).
|
|
581
613
|
|
|
582
614
|
### Verification
|
|
@@ -590,9 +622,9 @@ The first v2.18.0 release deferred two open items to a redo slice; both are now
|
|
|
590
622
|
|
|
591
623
|
Recommended scenarios before next release (see `peaks/_runtime/2026-06-29-session-88411f/txt/handoff-2026-06-29-v2-17-0.md` for details):
|
|
592
624
|
|
|
593
|
-
1. **Multi-Claude parallel提速**: open 2 Claude instances in the same project, run `peaks
|
|
625
|
+
1. **Multi-Claude parallel提速**: open 2 Claude instances in the same project, run `peaks code <different goal>` in each. Verify both bindings coexist with distinct sids.
|
|
594
626
|
2. **D1 conflict detection**: 2 instances both targeting the same source file. Verify each writes to its own session-scoped artifact directory.
|
|
595
|
-
3. **`/compact` resume**: run `peaks
|
|
627
|
+
3. **`/compact` resume**: run `peaks code <goal>`, `/compact`, continue. Verify same sid reused.
|
|
596
628
|
4. **Doctor stale**: kill -9 a Claude instance, run `peaks doctor`, verify stale binding listed + `--cleanup-stale` works.
|
|
597
629
|
|
|
598
630
|
### Commits
|
|
@@ -605,19 +637,19 @@ Recommended scenarios before next release (see `peaks/_runtime/2026-06-29-sessio
|
|
|
605
637
|
### Out of scope (deferred)
|
|
606
638
|
|
|
607
639
|
- Runner wiring for D1/D2 in `peaks workspace init` + `peaks audit-goal` (modules exist, not yet called).
|
|
608
|
-
- 800-line cap backlog (`session-manager.ts` 710, `
|
|
640
|
+
- 800-line cap backlog (`session-manager.ts` 710, `code/` and `verdict/` modules) — unchanged from v2.15.x.
|
|
609
641
|
- Final removal of `change-id.ts` shims (would require rewriting the 11 src services that still reference them).
|
|
610
642
|
|
|
611
643
|
---
|
|
612
644
|
|
|
613
645
|
## [2.15.1] — 2026-06-28 — 12 Gaps CLI 全套落地 + ice-cola dogfood 验证
|
|
614
646
|
|
|
615
|
-
**PATCH bump from 2.15.0**. Follow-up ship for the 12 Gaps positioning memory (peaks-loop 真实定位 + 全套 15 个 Gap CLI 落地). No breaking changes. All new commands are additive top-level (no conflict with existing `peaks
|
|
647
|
+
**PATCH bump from 2.15.0**. Follow-up ship for the 12 Gaps positioning memory (peaks-loop 真实定位 + 全套 15 个 Gap CLI 落地). No breaking changes. All new commands are additive top-level (no conflict with existing `peaks code` / `peaks qa` / `peaks slice` role commands).
|
|
616
648
|
|
|
617
649
|
### Feature — slice DAG layered parallelism + foundation/upstreamSync/complexity 字段
|
|
618
650
|
|
|
619
651
|
- `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 稳定.
|
|
620
|
-
- `src/services/
|
|
652
|
+
- `src/services/code/dag-orchestrator.ts` — 新增 `runLayeredDag` (业务 slice 不等所有 foundation,只等其 dependsOn 子集). cancel-on-fail 保留.
|
|
621
653
|
- `src/cli/commands/dispatch-from-dag.ts` — 切到 `runLayeredDag` + envelope 加 `sliceMeta` 字段.
|
|
622
654
|
|
|
623
655
|
### Feature — G11/13/14/15 CLI 全套落地 (10 commands)
|
|
@@ -631,7 +663,7 @@ Recommended scenarios before next release (see `peaks/_runtime/2026-06-29-sessio
|
|
|
631
663
|
|
|
632
664
|
- **G1 slice review** (4 cmds): `peaks slice-review` / `slice-score` / `slice-accept` / `slice-reject` — 4 项业务清单 + 12 Gaps 阈值 (avg >= 3 + no item <= 2)
|
|
633
665
|
- **G3 prd blocks** (1 cmd): `peaks prd check-blocks` — 4 必填块校验 (业务场景 / 边界 / UI 装配 / 上游基线) + 业务禁区子节
|
|
634
|
-
- **G4 user touchpoint** (3 cmds): `peaks gate-classify` / `user-touchpoints` / `commit-boundary-actions` — 14
|
|
666
|
+
- **G4 user touchpoint** (3 cmds): `peaks gate-classify` / `user-touchpoints` / `commit-boundary-actions` — 14 Code gate 静态分类 (business / tech / mode-selection / commit-boundary / commit-floor)
|
|
635
667
|
- **G5 qa business** (4 cmds): `peaks qa-business-review` / `-score` / `-accept` / `-reject` — 6 项业务清单 + 同一阈值
|
|
636
668
|
|
|
637
669
|
### Feature — G6/G7/G8/G9/G10 CLI (10 commands, 30+ tests)
|
|
@@ -645,7 +677,7 @@ Recommended scenarios before next release (see `peaks/_runtime/2026-06-29-sessio
|
|
|
645
677
|
### Documentation
|
|
646
678
|
|
|
647
679
|
- 6 new memory files: `peaks-loop-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`
|
|
648
|
-
- 4 SKILL.md 校准注: peaks-
|
|
680
|
+
- 4 SKILL.md 校准注: peaks-code / peaks-prd / peaks-rd / peaks-qa 加 2026-06-28 校准 anchor
|
|
649
681
|
- 12 Gaps 完整定位: 24h 程序员场景 / 唯一蜂群 / 反伪选择 / 业务审阅 / 轻量回归 / 上线观察期等
|
|
650
682
|
|
|
651
683
|
### Fix
|
|
@@ -687,9 +719,9 @@ Recommended scenarios before next release (see `peaks/_runtime/2026-06-29-sessio
|
|
|
687
719
|
- **`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:
|
|
688
720
|
- **Reconnect guard** — recorded outer id matches the NEW outer id → do NOT clear (reconnect).
|
|
689
721
|
- **Live-different-outer guard** — recorded outer id belongs to a different LIVE outer session → do NOT clear (would destroy another user's mode).
|
|
690
|
-
- **`peaks
|
|
691
|
-
- **`skills/peaks-
|
|
692
|
-
- **`skills/peaks-
|
|
722
|
+
- **`peaks code 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-code-mode-bypass-fix).
|
|
723
|
+
- **`skills/peaks-code/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`.
|
|
724
|
+
- **`skills/peaks-code/references/mode-selection-with-stale-presence.md`** (NEW) — Detection protocol + worked example (88b27d defect) + ACL.
|
|
693
725
|
- **`src/services/skills/skill-presence-service.ts`** — New exports: `checkStalePresence`, `clearStalePresenceOnRotation`, types `StalenessCheck`, `StaleReason`.
|
|
694
726
|
|
|
695
727
|
### Feature — User-feedback → peaks-loop enforcement (defect B fix)
|
|
@@ -702,12 +734,12 @@ Recommended scenarios before next release (see `peaks/_runtime/2026-06-29-sessio
|
|
|
702
734
|
|
|
703
735
|
### Feature — Commit-boundary hard-floor (full-auto boundary = commit only)
|
|
704
736
|
|
|
705
|
-
- **`src/services/
|
|
737
|
+
- **`src/services/code/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).
|
|
706
738
|
- **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.
|
|
707
739
|
|
|
708
740
|
### Test results
|
|
709
741
|
- 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**.
|
|
710
|
-
- Existing
|
|
742
|
+
- Existing code tests (mode-gate × 81, post-compact × 11) pass unchanged.
|
|
711
743
|
- Full unit suite baseline 4394 → 4680 passing (286 added). 0 new failures; pre-existing 7 unrelated failures unchanged.
|
|
712
744
|
|
|
713
745
|
### Out-of-scope
|
|
@@ -720,10 +752,10 @@ Recommended scenarios before next release (see `peaks/_runtime/2026-06-29-sessio
|
|
|
720
752
|
slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 + 业务并行(节省 2-3 天 wall time);fork 场景 = 上游 tag 断点同步;复杂度分流 = user-attended vs overnight 排程。
|
|
721
753
|
|
|
722
754
|
- **`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 稳定**。
|
|
723
|
-
- **`src/services/
|
|
755
|
+
- **`src/services/code/dag-orchestrator.ts`** — 新增 `runLayeredDag` 函数。同 `runDag` 语义 + 业务 slice 不等所有 foundation,只等其 `dependsOn` 子集。cancel-on-fail 保留。`runDag` 保留(向后兼容,内部走 priority-sorted levels)。
|
|
724
756
|
- **`src/cli/commands/dispatch-from-dag.ts`** — 切到 `runLayeredDag`。envelope 加 `sliceMeta` 字段(per-slice foundation/upstreamSync/complexity)。
|
|
725
|
-
- **2 new test files** — `tests/unit/dispatch/slice-dag-foundation.test.ts` (19 cases) + `tests/unit/
|
|
726
|
-
- **dispatch +
|
|
757
|
+
- **2 new test files** — `tests/unit/dispatch/slice-dag-foundation.test.ts` (19 cases) + `tests/unit/code/dag-orchestrator-layered.test.ts` (5 cases) = **24 new tests, 0 regression**。
|
|
758
|
+
- **dispatch + code tests**: 215/215 通过(单跑)。
|
|
727
759
|
- **全量 vitest** 4843 cases: 4824 passed / 2 failed(并发 race,pre-existing)。
|
|
728
760
|
|
|
729
761
|
**不触动:** transition gates / hard contracts / Karpathy 4 / sub-agent 协议 / 老 DAG 兼容性。
|
|
@@ -777,8 +809,8 @@ slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 +
|
|
|
777
809
|
- 8 tests pass
|
|
778
810
|
|
|
779
811
|
**G4 user touchpoint classifier**(slice-2026-06-28-user-touchpoints):
|
|
780
|
-
- 3 commands: `peaks
|
|
781
|
-
- 14 个
|
|
812
|
+
- 3 commands: `peaks code gate-classify` / `peaks code user-touchpoints` / `peaks code commit-boundary-actions`
|
|
813
|
+
- 14 个 Code gate 静态分类: business / tech / mode-selection / commit-boundary / commit-floor
|
|
782
814
|
- `userShouldReview`: always / business-only / never
|
|
783
815
|
- 7 tests pass
|
|
784
816
|
|
|
@@ -838,7 +870,7 @@ slice-2026-06-28-layered-dag PRD: 大需求(1 周内做不完)= 基础先行 +
|
|
|
838
870
|
会话期间从资深前端 + 后端半盲 + 极致工期 + 24h AI 程序员 + 存量无 UT 的真实场景,沉淀 6 个 memory 文件 + 索引 + 4 个 SKILL.md 校准注。**核心叙事:** `90% 效率 + 80% 质量` > `80% 效率 + 90% 质量`;user 在循环里 = 业务/产品审阅者不参与技术决策;主路径 = 唯一蜂群模式;prd 质量前置 = 4 必填块;QA = 业务视角 + 轻量回归 + 上线观察期。
|
|
839
871
|
|
|
840
872
|
- **6 new memory files** — `.peaks/memory/peaks-loop-{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)
|
|
841
|
-
- **4 SKILL.md 校准注** — peaks-
|
|
873
|
+
- **4 SKILL.md 校准注** — peaks-code / peaks-prd / peaks-rd / peaks-qa 各加精简 anchor(均通过 25KB cap,只引用 memory 不重复内容)
|
|
842
874
|
- **不触动** transition gates / hard contracts / Karpathy 4 / 模式枚举 / mode-gate.ts / sub-agent 协议
|
|
843
875
|
|
|
844
876
|
### Fix — 2 pre-existing bugs (2026-06-28 follow-up)
|
|
@@ -966,26 +998,26 @@ Slice B of the v2.14.0 anti-fake-green hardening PRD (`v2-14-0-anti-fake-green-h
|
|
|
966
998
|
|
|
967
999
|
---
|
|
968
1000
|
|
|
969
|
-
## [2.13.4] — 2026-06-28 —
|
|
1001
|
+
## [2.13.4] — 2026-06-28 — Code mode gate + verify-pipeline canonical path + auto-compact main target
|
|
970
1002
|
|
|
971
|
-
**PATCH bump from 2.13.3** (slice `2026-06-28-
|
|
1003
|
+
**PATCH bump from 2.13.3** (slice `2026-06-28-code-mode-bypass-fix`, 4 production defects reported by user in code session 2026-06-28).
|
|
972
1004
|
|
|
973
1005
|
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: "效率比省钱更重要,是在效率达到最大值的时候,再去考虑经济问题").
|
|
974
1006
|
|
|
975
1007
|
### Bug fixes
|
|
976
1008
|
|
|
977
|
-
- **Step 1 AskUserQuestion is no longer auto-defaulted to `mode: full-auto`** (defect #1) — `src/services/
|
|
1009
|
+
- **Step 1 AskUserQuestion is no longer auto-defaulted to `mode: full-auto`** (defect #1) — `src/services/code/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/code/mode-gate-step-1-hard-pause.test.ts` cover the four-mode matrix + hard-floor precedence. The pre-existing `tests/unit/services/code/mode-gate.test.ts` (77 cases) was also updated for the new `gateKind` field — 77/77 still pass.
|
|
978
1010
|
- **`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.
|
|
979
|
-
- **`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/
|
|
1011
|
+
- **`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/code/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.
|
|
980
1012
|
|
|
981
1013
|
### Features
|
|
982
1014
|
|
|
983
|
-
- **`peaks workspace migrate-change-scope --project <path> [--apply] [--json]`** — slice 2026-06-28-
|
|
1015
|
+
- **`peaks workspace migrate-change-scope --project <path> [--apply] [--json]`** — slice 2026-06-28-code-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.
|
|
984
1016
|
|
|
985
1017
|
### Internal
|
|
986
1018
|
|
|
987
|
-
- `src/services/
|
|
988
|
-
- `src/services/
|
|
1019
|
+
- `src/services/code/mode-gate.ts` (+28/-4 lines) — `HARD_PAUSE_STEPS` set + `GateKind` union + `gateKind` field on `GateDecision`.
|
|
1020
|
+
- `src/services/code/auto-compact-orchestrator.ts` (+24/-2 lines) — `target` parameter, `writeMainSessionCompactIntent` helper, surface `target` in return envelope.
|
|
989
1021
|
- `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.
|
|
990
1022
|
- `src/services/context/auto-compact-types.ts` (+6 lines) — `target?: 'main' | 'sub-agent'` on `AutoCompactResult.data`.
|
|
991
1023
|
- `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).
|
|
@@ -996,12 +1028,12 @@ The four defects all stem from the v2.13.0 two-axis convention landing debt: the
|
|
|
996
1028
|
- `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.
|
|
997
1029
|
- `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.
|
|
998
1030
|
- `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.
|
|
999
|
-
- `tests/unit/services/
|
|
1000
|
-
- 5 new test files: `tests/unit/
|
|
1031
|
+
- `tests/unit/services/code/mode-gate.test.ts` (linter-updated) — assertions for the new `gateKind` field on every `GateDecision` return.
|
|
1032
|
+
- 5 new test files: `tests/unit/code/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.
|
|
1001
1033
|
|
|
1002
1034
|
### Test results
|
|
1003
1035
|
|
|
1004
|
-
- `pnpm vitest run` on the 4 affected module areas (
|
|
1036
|
+
- `pnpm vitest run` on the 4 affected module areas (code/workflow/context/workspace): **181/181 pass** (5 new test files + pre-existing suites).
|
|
1005
1037
|
- 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).
|
|
1006
1038
|
- `pnpm tsc --noEmit`: clean.
|
|
1007
1039
|
|
|
@@ -1051,7 +1083,7 @@ The four defects all stem from the v2.13.0 two-axis convention landing debt: the
|
|
|
1051
1083
|
|---|---|
|
|
1052
1084
|
| 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 |
|
|
1053
1085
|
|
|
1054
|
-
### Verified (peaks
|
|
1086
|
+
### Verified (peaks code dogfood + QA on this session)
|
|
1055
1087
|
|
|
1056
1088
|
- 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}]`.
|
|
1057
1089
|
- 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`.
|
|
@@ -1129,7 +1161,7 @@ v2.13.1 shipped with a BLOCKER bug found via post-release dogfood: `aggregateVer
|
|
|
1129
1161
|
|---|---|
|
|
1130
1162
|
| 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 |
|
|
1131
1163
|
|
|
1132
|
-
### Verified (peaks
|
|
1164
|
+
### Verified (peaks code dogfood + QA on this session)
|
|
1133
1165
|
|
|
1134
1166
|
- 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`.
|
|
1135
1167
|
- 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.
|
|
@@ -1160,11 +1192,11 @@ v2.13.1 shipped with a BLOCKER bug found via post-release dogfood: `aggregateVer
|
|
|
1160
1192
|
|
|
1161
1193
|
---
|
|
1162
1194
|
|
|
1163
|
-
## [2.13.1] — 2026-06-27 — Verdict reasoning layer (multi-signal convergence for peaks-
|
|
1195
|
+
## [2.13.1] — 2026-06-27 — Verdict reasoning layer (multi-signal convergence for peaks-code)
|
|
1164
1196
|
|
|
1165
1197
|
**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).
|
|
1166
1198
|
|
|
1167
|
-
peaks-
|
|
1199
|
+
peaks-code 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.
|
|
1168
1200
|
|
|
1169
1201
|
### Features
|
|
1170
1202
|
|
|
@@ -1176,10 +1208,10 @@ peaks-solo previously received 5 heterogeneous signals (security-audit, perf-aud
|
|
|
1176
1208
|
|
|
1177
1209
|
- `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).
|
|
1178
1210
|
- `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.
|
|
1179
|
-
- `skills/peaks-
|
|
1211
|
+
- `skills/peaks-code/references/micro-cycle.md` — added `## Verdict reasoning (v2.13.1)` section (91 lines) after the unchanged repair-cycle cap rule.
|
|
1180
1212
|
- `tests/unit/artifact-prerequisites/mut-report-prereq.test.ts` (NEW, 4 cases).
|
|
1181
1213
|
- `tests/unit/services/verdict/verdict-aggregator.test.ts` (NEW, 13 cases).
|
|
1182
|
-
- `tests/unit/skills/
|
|
1214
|
+
- `tests/unit/skills/code/micro-cycle-verdict-reasoning.test.ts` (NEW, 4 cases).
|
|
1183
1215
|
- `tests/unit/artifact-prerequisites.test.ts` (UPDATED, +25 lines) — seeded `mut-report.json` in 3 pass-path tests; added to negative-path missing-list.
|
|
1184
1216
|
- `tests/unit/artifact-prerequisites-typed.test.ts` (UPDATED, +20 lines) — same across bugfix + feature + refactor.
|
|
1185
1217
|
|
|
@@ -1193,11 +1225,11 @@ peaks-solo previously received 5 heterogeneous signals (security-audit, perf-aud
|
|
|
1193
1225
|
|---|---|
|
|
1194
1226
|
| 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 |
|
|
1195
1227
|
|
|
1196
|
-
### Verified (peaks
|
|
1228
|
+
### Verified (peaks code dogfood on this session)
|
|
1197
1229
|
|
|
1198
1230
|
- 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.
|
|
1199
1231
|
- 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.
|
|
1200
|
-
- AC-3 (micro-cycle reasoning): `tests/unit/skills/
|
|
1232
|
+
- AC-3 (micro-cycle reasoning): `tests/unit/skills/code/micro-cycle-verdict-reasoning.test.ts` → 4/4 pass; 6-step cycle body byte-stable.
|
|
1201
1233
|
- 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.
|
|
1202
1234
|
- Total: 8 test files, **90/90** tests pass, duration 1.27s.
|
|
1203
1235
|
- `./node_modules/.bin/tsc --noEmit` → 0 errors.
|
|
@@ -1224,7 +1256,7 @@ peaks-solo previously received 5 heterogeneous signals (security-audit, perf-aud
|
|
|
1224
1256
|
|
|
1225
1257
|
**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).
|
|
1226
1258
|
|
|
1227
|
-
peaks-
|
|
1259
|
+
peaks-code 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:
|
|
1228
1260
|
|
|
1229
1261
|
- **85% pre-compact zone** — peaks-loop writes a pre-compact checkpoint + convergence plan + auto-decisions log + IDE-side compact dispatch (async-friendly).
|
|
1230
1262
|
- **95% RED LINE** — peaks-loop refuses sub-agent dispatch and forces synchronous IDE compact; mandatory, LLM cannot opt out.
|
|
@@ -1233,9 +1265,9 @@ Adapter-driven protocol (no hard-coded IDE names): `IdeAdapter.compact?: IdeComp
|
|
|
1233
1265
|
|
|
1234
1266
|
### Features
|
|
1235
1267
|
|
|
1236
|
-
- **`peaks
|
|
1237
|
-
- **`peaks
|
|
1238
|
-
- **Convergence toolkit** (AC-2) — `src/services/
|
|
1268
|
+
- **`peaks code 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.
|
|
1269
|
+
- **`peaks code 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).
|
|
1270
|
+
- **Convergence toolkit** (AC-2) — `src/services/code/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.
|
|
1239
1271
|
- **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.
|
|
1240
1272
|
|
|
1241
1273
|
### Internal
|
|
@@ -1243,10 +1275,10 @@ Adapter-driven protocol (no hard-coded IDE names): `IdeAdapter.compact?: IdeComp
|
|
|
1243
1275
|
- `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`.
|
|
1244
1276
|
- `src/services/context/auto-compact-reader.ts` (NEW) — `readContextPercent` (AC-1 probe).
|
|
1245
1277
|
- `src/services/context/auto-compact-dispatcher.ts` (NEW) — `dispatchIdeCompact` (AC-3 IDE dispatch).
|
|
1246
|
-
- `src/services/
|
|
1278
|
+
- `src/services/code/auto-compact-orchestrator.ts` (NEW) — `evaluateCompactTrigger` + `runAutoCompact` (AC-2 + AC-4 core).
|
|
1247
1279
|
- `src/services/ide/ide-types.ts` — `IdeAdapter.compact?: IdeCompactProfile` + `IdeCompactProfile` interface.
|
|
1248
1280
|
- `src/services/ide/adapters/claude-code-adapter.ts` — MVP `compact` profile: `CLAUDE_CONTEXT_USAGE_PERCENT` + `claude --compact` + `shell-exec`.
|
|
1249
|
-
- `src/cli/commands/
|
|
1281
|
+
- `src/cli/commands/code-commands.ts` — `peaks code context-now` + `peaks code auto-compact` subcommands.
|
|
1250
1282
|
- `package.json` + `src/shared/version.ts` — `2.12.0 → 2.13.0`.
|
|
1251
1283
|
|
|
1252
1284
|
### Decision records
|
|
@@ -1257,10 +1289,10 @@ Adapter-driven protocol (no hard-coded IDE names): `IdeAdapter.compact?: IdeComp
|
|
|
1257
1289
|
|
|
1258
1290
|
| Commit tag | Scope |
|
|
1259
1291
|
|---|---|
|
|
1260
|
-
| v2.13.0-alpha.1 (`edffc33`) | Two-tier threshold + auto-compact types + reader + dispatcher + orchestrator + Claude Code MVP adapter + `peaks
|
|
1292
|
+
| v2.13.0-alpha.1 (`edffc33`) | Two-tier threshold + auto-compact types + reader + dispatcher + orchestrator + Claude Code MVP adapter + `peaks code context-now` + `peaks code auto-compact` CLI |
|
|
1261
1293
|
| `a8b9804` | In-session dogfood limitation documented (current ad-hoc Claude Code session cannot be externally compacted — reserved for follow-up PreToolUse-hook slice) |
|
|
1262
1294
|
|
|
1263
|
-
### Verified (peaks
|
|
1295
|
+
### Verified (peaks code dogfood on this session)
|
|
1264
1296
|
|
|
1265
1297
|
- `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` ✓
|
|
1266
1298
|
- `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` ✓
|
|
@@ -1273,12 +1305,12 @@ Adapter-driven protocol (no hard-coded IDE names): `IdeAdapter.compact?: IdeComp
|
|
|
1273
1305
|
|
|
1274
1306
|
### Out-of-scope (NOT changed)
|
|
1275
1307
|
|
|
1276
|
-
- `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-
|
|
1308
|
+
- `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-code/SKILL.md` main flow + `peaks-prd/SKILL.md` main body — all untouched per the v2.13.0 red-line scope.
|
|
1277
1309
|
|
|
1278
1310
|
### Known limitations (carry-forward to v2.13.1)
|
|
1279
1311
|
|
|
1280
1312
|
- **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.
|
|
1281
|
-
- **`peaks-
|
|
1313
|
+
- **`peaks-code` Step N+2 prose update** — `skills/peaks-code/SKILL.md` should mention `peaks code context-now` + `auto-compact` so LLM sessions invoke the autonomous loop instead of `--prompt-size` hand-passing.
|
|
1282
1314
|
|
|
1283
1315
|
---
|
|
1284
1316
|
|
|
@@ -1340,7 +1372,7 @@ Each Group A→D ran the full RD→QA loop independently. Group C final QA: 14/1
|
|
|
1340
1372
|
|
|
1341
1373
|
### Out-of-scope (NOT changed)
|
|
1342
1374
|
|
|
1343
|
-
`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-
|
|
1375
|
+
`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-code/SKILL.md` main flow + `peaks-prd/SKILL.md` main body — all untouched per the v2.12.0 red-line scope.
|
|
1344
1376
|
|
|
1345
1377
|
---
|
|
1346
1378
|
|
|
@@ -1355,7 +1387,7 @@ Read-only observability layer on top of the v2.11.0 slice topology + 10/90 parad
|
|
|
1355
1387
|
- **`peaks observability status`** (AC-1) — aggregate metrics for active session: total slices, success count, fail count, fanout cost total, repair-cycle peak.
|
|
1356
1388
|
- **`peaks observability slices`** (AC-2) — per-slice list with rid, state, fanout count, repair-cycle count, duration (ms).
|
|
1357
1389
|
- **`peaks observability fanout`** (AC-3) — fanout cost breakdown per sub-agent role (rd / qa / code-reviewer / security-reviewer / karpathy-reviewer).
|
|
1358
|
-
- **`peaks observability repair-cycles`** (AC-4) — RD→QA repair-cycle count per slice; cap = 3 (peaks-
|
|
1390
|
+
- **`peaks observability repair-cycles`** (AC-4) — RD→QA repair-cycle count per slice; cap = 3 (peaks-code repair-loop contract); capHit flag.
|
|
1359
1391
|
- **`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.
|
|
1360
1392
|
- **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.
|
|
1361
1393
|
- **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).
|
|
@@ -1373,9 +1405,9 @@ Read-only observability layer on top of the v2.11.0 slice topology + 10/90 parad
|
|
|
1373
1405
|
- Modified: `src/services/artifacts/request-artifact-service.ts` (hook #1/7).
|
|
1374
1406
|
- Modified: `src/cli/commands/dispatch-commands.ts` (hook #2/7).
|
|
1375
1407
|
- Modified: `src/services/session/session-checkpoint-service.ts` (hook #3/7).
|
|
1376
|
-
- Modified: `src/cli/commands/
|
|
1408
|
+
- Modified: `src/cli/commands/code-commands.ts` (hook #4/7).
|
|
1377
1409
|
- Modified: `src/cli/commands/context-commands.ts` (hook #5/7).
|
|
1378
|
-
- Modified: `src/services/
|
|
1410
|
+
- Modified: `src/services/code/post-compact-detector.ts` (hook #6/7).
|
|
1379
1411
|
- Modified: `src/services/artifacts/artifact-prerequisites.ts` (hook #7/7).
|
|
1380
1412
|
- Modified: `src/cli/program.ts` (+1 line: registerObservabilityCommands).
|
|
1381
1413
|
- Modified: `src/shared/version.ts` (CLI_VERSION 2.11.0 → 2.11.1).
|
|
@@ -1387,7 +1419,7 @@ Read-only observability layer on top of the v2.11.0 slice topology + 10/90 parad
|
|
|
1387
1419
|
|
|
1388
1420
|
**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`).
|
|
1389
1421
|
|
|
1390
|
-
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-
|
|
1422
|
+
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-code removes runtime friction (auto-proceed, context monitor, post-compact resume).
|
|
1391
1423
|
|
|
1392
1424
|
### Features
|
|
1393
1425
|
|
|
@@ -1396,7 +1428,7 @@ Implements the "metering is value" + "10/90 paradigm" alignment: peaks-prd produ
|
|
|
1396
1428
|
- **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).
|
|
1397
1429
|
- **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.
|
|
1398
1430
|
- **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).
|
|
1399
|
-
- **Tier 9 (Group F — commit `9e3ef49`)** — D5 self-decision (`src/services/
|
|
1431
|
+
- **Tier 9 (Group F — commit `9e3ef49`)** — D5 self-decision (`src/services/code/mode-gate.ts` + `peaks code should-pause`); D6 context monitor (`src/services/context/main-session-monitor.ts` + `peaks context check`); D7 post-compact resume (`src/services/code/post-compact-detector.ts` + `peaks code post-compact-detect`); SKILL.md new Step N+2 + Step 0.7 D7 branch. +111 tests.
|
|
1400
1432
|
|
|
1401
1433
|
### Migration
|
|
1402
1434
|
|
|
@@ -1414,7 +1446,7 @@ Implements the "metering is value" + "10/90 paradigm" alignment: peaks-prd produ
|
|
|
1414
1446
|
|
|
1415
1447
|
- **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).
|
|
1416
1448
|
- **D5 hard-floor categories** (irreversible external side effects / auth-credential / multi-day investment) still pause for AskUserQuestion regardless of mode.
|
|
1417
|
-
- **D7 post-compact resume** requires re-invoking `/peaks-
|
|
1449
|
+
- **D7 post-compact resume** requires re-invoking `/peaks-code` in fresh context (Option A — no SessionStart hook in v2.11.0; Option B deferred).
|
|
1418
1450
|
- **Migration scope** is text-only — historical `rd/tech-doc.md` files coexist with the new `prd/handoff.md`; prune is a future slice.
|
|
1419
1451
|
|
|
1420
1452
|
---
|
|
@@ -1427,7 +1459,7 @@ Implements the 10/90 paradigm foundation: 10% human / 90% LLM autonomous workflo
|
|
|
1427
1459
|
|
|
1428
1460
|
### Features
|
|
1429
1461
|
|
|
1430
|
-
- **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-
|
|
1462
|
+
- **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-code fan-out RD. v1 envelopes continue to read via `SchemaRouter` (`src/services/slice/schema-router.ts`).
|
|
1431
1463
|
- **LLMArbitrator** (W2 T5): content-hash SHA-256 cache (`<cacheDir>/<hash>.json`), budget cap (`resetArbitratorBudget()`), live/cache/failure-path callId routing.
|
|
1432
1464
|
- **GranularityDecider** (W2 T6): stop-condition + tie-break for file-vs-service subdivision.
|
|
1433
1465
|
- **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`.
|
|
@@ -1437,7 +1469,7 @@ Implements the 10/90 paradigm foundation: 10% human / 90% LLM autonomous workflo
|
|
|
1437
1469
|
- **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.
|
|
1438
1470
|
- **3 new skills** (W4): `peaks-slice-decompose` (v2 schema references), `peaks-audit` (6-dim reference), `peaks-final-review` (4-dim reference).
|
|
1439
1471
|
- **5 existing skill updates** (W7 CC-α):
|
|
1440
|
-
- `peaks-
|
|
1472
|
+
- `peaks-code` — new Step 0.6 (Audit + Goal gate) and Step N+1 (Final Review gate) between Step 0.5 and Step 0.7.
|
|
1441
1473
|
- `peaks-rd` — new references: `reading-v2-slice-results.md` (SchemaRouter dual-read), `writing-handoff-frontmatter.md` (frontmatter fields + canonical path).
|
|
1442
1474
|
- `peaks-qa` — new reference: `reading-handoff-frontmatter.md` (cross-check `decisions[]` vs `tests/`, `risks[]` vs `tests/unit/security/`).
|
|
1443
1475
|
- `peaks-prd` — new reference: `prd-for-multi-pass.md` (AC tagging `[pass-1]` / `[pass-2]`).
|
|
@@ -1459,7 +1491,7 @@ Implements the 10/90 paradigm foundation: 10% human / 90% LLM autonomous workflo
|
|
|
1459
1491
|
### Bugfixes — W8 / W8-b stabilization (slice `add-slice-topology-multipass`, post-W7 follow-up)
|
|
1460
1492
|
|
|
1461
1493
|
- **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.
|
|
1462
|
-
- **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-
|
|
1494
|
+
- **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-code T22 missed this; W8-b surfaced it via the `beforeAll` sync-version run).
|
|
1463
1495
|
- 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).
|
|
1464
1496
|
|
|
1465
1497
|
### Risks / gaps carried forward
|
|
@@ -1477,7 +1509,7 @@ Implements the 10/90 paradigm foundation: 10% human / 90% LLM autonomous workflo
|
|
|
1477
1509
|
|
|
1478
1510
|
- **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`.
|
|
1479
1511
|
- **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.
|
|
1480
|
-
- **Test-tool-detection block** (slice `2026-06-24-test-tool-detection-injection`): Every sub-agent dispatched by
|
|
1512
|
+
- **Test-tool-detection block** (slice `2026-06-24-test-tool-detection-injection`): Every sub-agent dispatched by Code (`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`.
|
|
1481
1513
|
|
|
1482
1514
|
### Bugfixes — handoff path canonicalization (v1 + v2 + v3 + v4 + v5 + v6 + v7)
|
|
1483
1515
|
|
|
@@ -1544,7 +1576,7 @@ Replaced all 20 with a 4-helper API at `src/services/artifacts/artifact-template
|
|
|
1544
1576
|
**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`.
|
|
1545
1577
|
|
|
1546
1578
|
- New module: `src/services/dispatch/test-tool-detection.ts` (47 lines; exports `TEST_TOOL_DETECTION_BLOCK` + `formatTestToolDetection()`)
|
|
1547
|
-
- Dispatch chokepoints updated: `src/cli/commands/dispatch-commands.ts:187`, `src/services/
|
|
1579
|
+
- Dispatch chokepoints updated: `src/cli/commands/dispatch-commands.ts:187`, `src/services/code/dag-orchestrator.ts:157,182-183`
|
|
1548
1580
|
- Dispatch envelope bumped: `envelopeVersion: '2.1.0'` → `'2.2.0'` (consumers can detect the new prompt shape)
|
|
1549
1581
|
- 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
|
|
1550
1582
|
- Block size: 749 bytes UTF-8 (≤800 cap)
|
|
@@ -1558,9 +1590,9 @@ Replaced all 20 with a 4-helper API at `src/services/artifacts/artifact-template
|
|
|
1558
1590
|
### Changed
|
|
1559
1591
|
|
|
1560
1592
|
- **`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[]`.
|
|
1561
|
-
- **SKILL.md contract flipped.** `peaks-
|
|
1593
|
+
- **SKILL.md contract flipped.** `peaks-code` SKILL.md now states "Hard constraint: fan-out is mandatory"; the previous "Fan-out opt-out" subsection is removed.
|
|
1562
1594
|
- **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.
|
|
1563
|
-
- **Test surface refreshed.** `tests/unit/
|
|
1595
|
+
- **Test surface refreshed.** `tests/unit/code/skills-code-fanout-opt-out.test.ts` → `tests/unit/code/skills-code-fanout-mandatory.test.ts`; pins the new hard constraint and verifies the opt-out file is deleted.
|
|
1564
1596
|
|
|
1565
1597
|
### Migration
|
|
1566
1598
|
|
|
@@ -1889,11 +1921,11 @@ are unchanged by this release), `pnpm build` clean.
|
|
|
1889
1921
|
`.peaks/_runtime/<sessionId>/dispatch/contracts/<slice-id>.json`. The B/C/D
|
|
1890
1922
|
dispatch prompts auto-inject A's contract under a `slice A contract:`
|
|
1891
1923
|
segment so downstream slices see the dependency without re-reading source.
|
|
1892
|
-
- **
|
|
1893
|
-
`src/services/
|
|
1924
|
+
- **Code DAG orchestrator with cancel-on-fail (slice 1.2)** —
|
|
1925
|
+
`src/services/code/dag-orchestrator.ts` exports `runDag(dag, opts)`:
|
|
1894
1926
|
topological-layer fan-out, per-layer join barrier, 任一叶子失败整组回退
|
|
1895
1927
|
(any leaf failure → in-flight sub-agents receive cancel signal → RD
|
|
1896
|
-
returns to repair). peaks-
|
|
1928
|
+
returns to repair). peaks-code SKILL.md references the orchestrator.
|
|
1897
1929
|
- **5-IDE `awaitBatch` real implementation (slices 1.2 + 1.3 + 1.4)** —
|
|
1898
1930
|
`SubAgentDispatcher.awaitBatch(batchId, opts): Promise<BatchResult[]>`
|
|
1899
1931
|
is now implemented across **all 5 IDEs**: claude-code (1.2 MVP) +
|
|
@@ -1953,7 +1985,7 @@ are unchanged by this release), `pnpm build` clean.
|
|
|
1953
1985
|
- **`runDag` cancel-on-fail correctness (slice 1.2.c)** — when any leaf
|
|
1954
1986
|
fails, in-flight sub-agents in the same batch receive a cancel signal
|
|
1955
1987
|
at the envelope level; the orchestrator no longer waits for them to
|
|
1956
|
-
finish naturally. Pinned by `tests/unit/
|
|
1988
|
+
finish naturally. Pinned by `tests/unit/code/dag-orchestrator.test.ts`.
|
|
1957
1989
|
|
|
1958
1990
|
### Security
|
|
1959
1991
|
|
|
@@ -2407,10 +2439,10 @@ are unchanged by this release), `pnpm build` clean.
|
|
|
2407
2439
|
skillsActive, todoState, reason, createdAt). Max 10 retained, oldest auto-pruned.
|
|
2408
2440
|
- **`peaks session resume`** (slice 011) — reads checkpoint JSON, emits structured
|
|
2409
2441
|
markdown block for skill to prepend on session restart.
|
|
2410
|
-
- **peaks-
|
|
2411
|
-
IDE-agnostic; lives in `skills/peaks-
|
|
2412
|
-
- **peaks-
|
|
2413
|
-
- **peaks-
|
|
2442
|
+
- **peaks-code Step 0.5** (slice 011) — cross-date session check.
|
|
2443
|
+
IDE-agnostic; lives in `skills/peaks-code/references/cross-date-session-check.md`.
|
|
2444
|
+
- **peaks-code Step 0.75** (slice 011) — checkpoint resume probe.
|
|
2445
|
+
- **peaks-code Step N** (slice 011) — periodic checkpoint guidance.
|
|
2414
2446
|
|
|
2415
2447
|
### Security
|
|
2416
2448
|
|
|
@@ -2599,12 +2631,12 @@ Full suite: **2957 passed, 12 skipped, 0 failed**.
|
|
|
2599
2631
|
5+ historical slice records exist; v1.1 will switch to percentile
|
|
2600
2632
|
lookup.
|
|
2601
2633
|
|
|
2602
|
-
- **`peaks-
|
|
2603
|
-
|
|
2634
|
+
- **`peaks-code` Step 0.6** — pre-mode-selection slice decomposition.
|
|
2635
|
+
Code runs the algorithm automatically after Step 0.55 (1.x detection)
|
|
2604
2636
|
returns "fresh". The user picks a profile informed by the
|
|
2605
2637
|
decomposition's parallel structure.
|
|
2606
2638
|
|
|
2607
|
-
- **3 new `peaks-
|
|
2639
|
+
- **3 new `peaks-code/references/*.md`** — `slice-algorithm.md`
|
|
2608
2640
|
(algorithm spec), `understand-anything-integration.md` (KG consumer
|
|
2609
2641
|
contract), `fzf-integration.md` (operator-facing fzf usage).
|
|
2610
2642
|
|
|
@@ -2618,7 +2650,7 @@ Full suite: **2957 passed, 12 skipped, 0 failed**.
|
|
|
2618
2650
|
now derive from `parallelBatches` (with legacy `--type` lookup as
|
|
2619
2651
|
the fallback path).
|
|
2620
2652
|
|
|
2621
|
-
- **Extended `peaks-
|
|
2653
|
+
- **Extended `peaks-code/SKILL.md`** — adds "Peaks-Loop Slice
|
|
2622
2654
|
Decomposition (Step 0.6 — pre-mode-selection)" section.
|
|
2623
2655
|
|
|
2624
2656
|
- **Extended `runbook.md`** — adds "Step 2.5: Slice Decomposition"
|
|
@@ -3092,7 +3124,7 @@ subprocess ignores it when peaks-loop's env vars are present).
|
|
|
3092
3124
|
write. Soft-fail per sub-step; never blocks the whole upgrade.
|
|
3093
3125
|
|
|
3094
3126
|
- **`peaks upgrade --detect-1x`** — read-only probe returning a JSON
|
|
3095
|
-
envelope the peaks-
|
|
3127
|
+
envelope the peaks-code skill consumes to gate the AskUserQuestion
|
|
3096
3128
|
in Step 0.55.
|
|
3097
3129
|
|
|
3098
3130
|
- **`peaks standards migrate --from-claude-rules`** — thins `.claude/rules/`
|