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
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pluggable executor for sub-step command spawns. Production
|
|
3
|
+
* callers omit `executor` on `UpgradeInput`; the default
|
|
4
|
+
* (`defaultSubstepExecutor`) wraps `node:child_process` `spawnSync`.
|
|
5
|
+
* Tests pass a synchronous fake executor to avoid the spawn cost.
|
|
6
|
+
*
|
|
7
|
+
* Contract:
|
|
8
|
+
* - Return `status: 0` for success, non-zero for failure, `null`
|
|
9
|
+
* for synchronous spawn errors (binary not found, EACCES, …).
|
|
10
|
+
* - `stdout` / `stderr` are captured as UTF-8 strings.
|
|
11
|
+
* - `durationMs` is the wall-clock duration of the spawn
|
|
12
|
+
* (caller-facing field on `SubStepResult`).
|
|
13
|
+
*/
|
|
14
|
+
export type SubstepExecutor = (command: string, args: readonly string[], timeoutMs: number) => {
|
|
15
|
+
status: number | null;
|
|
16
|
+
stdout: string;
|
|
17
|
+
stderr: string;
|
|
18
|
+
durationMs: number;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Default substep executor — wraps `spawnSync` with the same
|
|
22
|
+
* stdio / encoding / timeout config the umbrella has used since
|
|
23
|
+
* v1. Exported for test coverage: the seam-preservation test
|
|
24
|
+
* imports this directly to verify the normalized return shape
|
|
25
|
+
* on a spawn failure (e.g. a non-existent command).
|
|
26
|
+
*/
|
|
27
|
+
export declare const defaultSubstepExecutor: SubstepExecutor;
|
|
1
28
|
export interface UpgradeInput {
|
|
2
29
|
readonly projectRoot: string;
|
|
3
30
|
/**
|
|
@@ -14,6 +41,13 @@ export interface UpgradeInput {
|
|
|
14
41
|
* install hint in `nextActions` instead.
|
|
15
42
|
*/
|
|
16
43
|
readonly peaksBin?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Optional injectable executor for sub-step command execution.
|
|
46
|
+
* When omitted, the umbrella uses `defaultSubstepExecutor`
|
|
47
|
+
* (real `spawnSync`). Tests pass a synchronous fake to avoid
|
|
48
|
+
* the per-sub-step `node peaks.js …` spawn cost.
|
|
49
|
+
*/
|
|
50
|
+
readonly executor?: SubstepExecutor;
|
|
17
51
|
}
|
|
18
52
|
export interface SubStepResult {
|
|
19
53
|
readonly name: string;
|
|
@@ -33,6 +33,38 @@ import { fileURLToPath } from 'node:url';
|
|
|
33
33
|
import { runRedLinesAudit } from '../audit/red-lines-service.js';
|
|
34
34
|
import { savePreferences } from '../preferences/preferences-service.js';
|
|
35
35
|
import { migrateGitignoreFile } from './gitignore-migrate-service.js';
|
|
36
|
+
/**
|
|
37
|
+
* Default substep executor — wraps `spawnSync` with the same
|
|
38
|
+
* stdio / encoding / timeout config the umbrella has used since
|
|
39
|
+
* v1. Exported for test coverage: the seam-preservation test
|
|
40
|
+
* imports this directly to verify the normalized return shape
|
|
41
|
+
* on a spawn failure (e.g. a non-existent command).
|
|
42
|
+
*/
|
|
43
|
+
export const defaultSubstepExecutor = (command, args, timeoutMs) => {
|
|
44
|
+
const start = Date.now();
|
|
45
|
+
try {
|
|
46
|
+
const result = spawnSync(command, args, {
|
|
47
|
+
encoding: 'utf8',
|
|
48
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
49
|
+
timeout: timeoutMs,
|
|
50
|
+
});
|
|
51
|
+
return {
|
|
52
|
+
status: result.status,
|
|
53
|
+
stdout: result.stdout ?? '',
|
|
54
|
+
stderr: result.stderr ?? '',
|
|
55
|
+
durationMs: Date.now() - start,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
60
|
+
return {
|
|
61
|
+
status: null,
|
|
62
|
+
stdout: '',
|
|
63
|
+
stderr: message,
|
|
64
|
+
durationMs: Date.now() - start,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
};
|
|
36
68
|
const STEPS = [
|
|
37
69
|
{ name: 'config-migrate', args: (p) => ['config', 'migrate', '--project', p, '--apply', '--json'] },
|
|
38
70
|
{ name: 'standards-migrate', args: (p) => ['standards', 'migrate', '--from-claude-rules', '--project', p, '--apply', '--json'] },
|
|
@@ -145,8 +177,7 @@ function read1xVersion(cwd) {
|
|
|
145
177
|
}
|
|
146
178
|
return null;
|
|
147
179
|
}
|
|
148
|
-
function runStep(peaksBin, name, args, timeoutMs = 60_000) {
|
|
149
|
-
const start = Date.now();
|
|
180
|
+
function runStep(peaksBin, name, args, timeoutMs = 60_000, executor = defaultSubstepExecutor) {
|
|
150
181
|
// The global `peaks` shim is a `/bin/sh` symlink script (the
|
|
151
182
|
// npm install postinstall creates `peaks` → `peaks.sh` on
|
|
152
183
|
// Windows). cmd.exe (the default Windows shell) cannot run
|
|
@@ -168,32 +199,18 @@ function runStep(peaksBin, name, args, timeoutMs = 60_000) {
|
|
|
168
199
|
command = peaksBin;
|
|
169
200
|
spawnArgs = args;
|
|
170
201
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
durationMs: Date.now() - start,
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
catch (err) {
|
|
187
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
188
|
-
return {
|
|
189
|
-
name,
|
|
190
|
-
status: 'fail',
|
|
191
|
-
exitCode: null,
|
|
192
|
-
stdout: '',
|
|
193
|
-
stderr: message,
|
|
194
|
-
durationMs: Date.now() - start,
|
|
195
|
-
};
|
|
196
|
-
}
|
|
202
|
+
// The executor normalizes spawn errors to { status: null, stderr: ... }
|
|
203
|
+
// so no try/catch wrapper is needed here — the call always returns
|
|
204
|
+
// a shaped record. See defaultSubstepExecutor for the reference impl.
|
|
205
|
+
const result = executor(command, spawnArgs, timeoutMs);
|
|
206
|
+
return {
|
|
207
|
+
name,
|
|
208
|
+
status: result.status === 0 ? 'pass' : 'fail',
|
|
209
|
+
exitCode: result.status,
|
|
210
|
+
stdout: result.stdout,
|
|
211
|
+
stderr: result.stderr,
|
|
212
|
+
durationMs: result.durationMs,
|
|
213
|
+
};
|
|
197
214
|
}
|
|
198
215
|
function writeUpgradeRecord(projectRoot, result) {
|
|
199
216
|
try {
|
|
@@ -260,6 +277,11 @@ export function runUpgrade(input) {
|
|
|
260
277
|
resolve(here, '..', '..', '..', '..', 'bin', 'peaks.js');
|
|
261
278
|
const fallbackPeaks = 'peaks';
|
|
262
279
|
const resolvedPeaksBin = existsSync(peaksBin) ? peaksBin : fallbackPeaks;
|
|
280
|
+
// Resolve the executor once at the top of runUpgrade so every
|
|
281
|
+
// sub-step call shares the same instance. Tests pass a fake
|
|
282
|
+
// executor via UpgradeInput.executor; production callers omit
|
|
283
|
+
// it and get the default spawnSync wrapper.
|
|
284
|
+
const executor = input.executor ?? defaultSubstepExecutor;
|
|
263
285
|
const fromVersion = read1xVersion(input.projectRoot);
|
|
264
286
|
const steps = [];
|
|
265
287
|
const warnings = [];
|
|
@@ -325,7 +347,7 @@ export function runUpgrade(input) {
|
|
|
325
347
|
continue;
|
|
326
348
|
}
|
|
327
349
|
const args = ['memory', 'extract', '--project', input.projectRoot, '--artifact', ...artifacts, '--apply', '--json'];
|
|
328
|
-
const r = runStep(resolvedPeaksBin, 'memory-extract', args);
|
|
350
|
+
const r = runStep(resolvedPeaksBin, 'memory-extract', args, 60_000, executor);
|
|
329
351
|
steps.push(r);
|
|
330
352
|
if (r.status === 'fail') {
|
|
331
353
|
warnings.push(`memory-extract failed: ${r.stderr.slice(0, 200)}`);
|
|
@@ -333,7 +355,7 @@ export function runUpgrade(input) {
|
|
|
333
355
|
continue;
|
|
334
356
|
}
|
|
335
357
|
const args = step.args(input.projectRoot);
|
|
336
|
-
const r = runStep(resolvedPeaksBin, step.name, args);
|
|
358
|
+
const r = runStep(resolvedPeaksBin, step.name, args, 60_000, executor);
|
|
337
359
|
steps.push(r);
|
|
338
360
|
if (r.status === 'fail') {
|
|
339
361
|
warnings.push(`${step.name} failed: ${r.stderr.slice(0, 200)}`);
|
|
@@ -63,7 +63,7 @@ export type PipelineVerification = {
|
|
|
63
63
|
*/
|
|
64
64
|
gateH?: 'pass' | 'fail';
|
|
65
65
|
/**
|
|
66
|
-
* Slice 2026-06-28-
|
|
66
|
+
* Slice 2026-06-28-code-mode-bypass-fix (defect #3): `true` when
|
|
67
67
|
* every evidence file resolved on the canonical path
|
|
68
68
|
* (`.peaks/_runtime/change/<sessionId>/...`). `false` when at least
|
|
69
69
|
* one evidence file resolved via a legacy fallback (`.peaks/<sessionId>/...`
|
|
@@ -26,7 +26,7 @@ async function findRequestFile(projectRoot, role, rid) {
|
|
|
26
26
|
const artifact = await showRequestArtifact({ projectRoot, role: role, requestId: rid });
|
|
27
27
|
if (artifact === null)
|
|
28
28
|
return null;
|
|
29
|
-
// Slice 2026-06-28-
|
|
29
|
+
// Slice 2026-06-28-code-mode-bypass-fix (defect #3): the legacy
|
|
30
30
|
// `showRequestArtifact` returns the FULL SCOPE (`_runtime/<sid>`)
|
|
31
31
|
// as `sessionId`, not just the trailing id segment. The canonical
|
|
32
32
|
// evidence lookup needs only the bare id (`.peaks/_runtime/change/<id>/`).
|
|
@@ -158,7 +158,7 @@ export async function verifyPipeline(options) {
|
|
|
158
158
|
// preferred filesystem scope; falling through to `options.rid` would
|
|
159
159
|
// make every missing-evidence path look like a per-rid scope dir.
|
|
160
160
|
const rdEvidenceDir = resolvedChangeId || options.sessionId || getSessionIdCanonical(options.projectRoot) || options.rid;
|
|
161
|
-
// Slice 2026-06-28-
|
|
161
|
+
// Slice 2026-06-28-code-mode-bypass-fix (defect #3): track whether
|
|
162
162
|
// every resolved evidence file landed on the canonical path. Drives
|
|
163
163
|
// the `usedCanonicalPath` envelope field. The flag stays `true` if
|
|
164
164
|
// no evidence file was resolved at all (nothing to be non-canonical
|
|
@@ -410,7 +410,7 @@ export async function verifyPipeline(options) {
|
|
|
410
410
|
: 'suffixed';
|
|
411
411
|
const gateC = allQaGatesPassed ? 'pass' : 'fail';
|
|
412
412
|
const gateH = allFeedbackGatesPassed ? 'pass' : 'fail';
|
|
413
|
-
// Slice 2026-06-28-
|
|
413
|
+
// Slice 2026-06-28-code-mode-bypass-fix (defect #3): `true` when
|
|
414
414
|
// every gate resolved on the canonical path; `false` when at least
|
|
415
415
|
// one fell back to a legacy form. QA / TXT surface the value so the
|
|
416
416
|
// user knows the legacy content must be moved into the canonical
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CapabilityItemType } from '../recommendations/recommendation-types.js';
|
|
2
2
|
import type { ModelProviderConfig, WorkspaceConfig } from '../config/config-types.js';
|
|
3
3
|
import { type RdPlanResult } from '../rd/rd-service.js';
|
|
4
|
-
import { type
|
|
4
|
+
import { type CodeMode, type WorkflowMode, type WorkflowRouterPlan } from './workflow-router-service.js';
|
|
5
5
|
export { getResumeRequiredArtifacts, getResumeArtifactsStatus, createResumePlan } from './workflow-autonomous-resume-helpers.js';
|
|
6
6
|
export type CapabilitySurface = 'skill' | 'mcp' | 'plugin' | 'expert';
|
|
7
7
|
export type CapabilityPurpose = 'code-review' | 'security-review' | 'coding-standards' | 'docs-lookup' | 'browser-validation' | 'browser-debug' | 'design-context' | 'design-source' | 'code-search' | 'database-inspection' | 'browser-agent' | 'worker-guidance' | 'memory' | 'context-management' | 'ui-components' | 'spec-workflow' | 'repo-intelligence' | 'openspec' | 'workflow-methodology' | 'workflow-reference' | 'workflow-guidance' | 'product-guidance' | 'design-reference' | 'ui-reference' | 'engineering-guidance' | 'typescript-guidance' | 'quality-guidance' | 'skill-pack' | 'external-skill' | 'design-critique' | 'design-guidance' | 'cloud-skill-pack';
|
|
@@ -20,7 +20,7 @@ export type CapabilityCandidate = {
|
|
|
20
20
|
};
|
|
21
21
|
export type AutonomousWorkflowRequest = {
|
|
22
22
|
readonly mode: WorkflowMode;
|
|
23
|
-
readonly
|
|
23
|
+
readonly codeMode?: CodeMode;
|
|
24
24
|
readonly sessionId: string;
|
|
25
25
|
readonly goal: string;
|
|
26
26
|
readonly maxWorkers?: number;
|
|
@@ -68,7 +68,7 @@ export type AutonomousStoragePlan = {
|
|
|
68
68
|
};
|
|
69
69
|
export type AutonomousMvpPackage = {
|
|
70
70
|
readonly mode: WorkflowMode;
|
|
71
|
-
readonly
|
|
71
|
+
readonly codeMode: CodeMode | undefined;
|
|
72
72
|
readonly executionMode: 'preview';
|
|
73
73
|
readonly dryRun: true;
|
|
74
74
|
readonly routePolicy: WorkflowRouterPlan['routePolicy'];
|
|
@@ -205,7 +205,7 @@ function createCapabilityPlan(request) {
|
|
|
205
205
|
function createMvpPackage(request, routePlan, rdPlan, capabilityPlan, ready) {
|
|
206
206
|
return {
|
|
207
207
|
mode: request.mode,
|
|
208
|
-
|
|
208
|
+
codeMode: routePlan.codeMode,
|
|
209
209
|
executionMode: 'preview',
|
|
210
210
|
dryRun: true,
|
|
211
211
|
routePolicy: routePlan.routePolicy,
|
|
@@ -240,7 +240,7 @@ export function createAutonomousWorkflowPlan(request) {
|
|
|
240
240
|
const available = hasArtifactWorkspace(request, artifactWorkspacePath);
|
|
241
241
|
const routePlan = createWorkflowRouterPlan({
|
|
242
242
|
mode: request.mode,
|
|
243
|
-
...(request.
|
|
243
|
+
...(request.codeMode !== undefined ? { codeMode: request.codeMode } : {}),
|
|
244
244
|
sessionId: request.sessionId,
|
|
245
245
|
goal,
|
|
246
246
|
maxWorkers,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { type ModelProviderConfig, type WorkspaceConfig } from '../config/config-types.js';
|
|
2
2
|
import { type RdPlanResult } from '../rd/rd-service.js';
|
|
3
3
|
import { type TechPlanResult, type TechStatus } from '../tech/tech-service.js';
|
|
4
|
-
export type WorkflowMode = '
|
|
5
|
-
export type
|
|
4
|
+
export type WorkflowMode = 'code' | 'team';
|
|
5
|
+
export type CodeMode = 'full-auto' | 'guided' | 'rnd';
|
|
6
6
|
export type ModelTier = 'top-tier' | 'mid-tier';
|
|
7
7
|
export type ModelRole = 'strongest' | 'execution';
|
|
8
|
-
export type WorkflowRoutePolicy = '
|
|
8
|
+
export type WorkflowRoutePolicy = 'code-broad-multi-model' | 'team-rd-limited-multi-model';
|
|
9
9
|
export type WorkflowStepStage = 'product-direction' | 'design-direction' | 'tech-direction' | 'tech-review' | 'rd-planning' | 'coding-execution' | 'unit-test-execution' | 'quality-review';
|
|
10
|
-
export type WorkflowStepOwner = 'peaks-
|
|
10
|
+
export type WorkflowStepOwner = 'peaks-code' | 'peaks-rd' | 'peaks-tech' | 'human';
|
|
11
11
|
export type WorkflowRouterRequest = {
|
|
12
12
|
sessionId: string;
|
|
13
13
|
goal: string;
|
|
14
14
|
mode: WorkflowMode;
|
|
15
|
-
|
|
15
|
+
codeMode?: CodeMode;
|
|
16
16
|
maxWorkers?: number;
|
|
17
17
|
dryRun: true;
|
|
18
18
|
artifactWorkspacePath?: string;
|
|
@@ -64,7 +64,7 @@ export type WorkflowRouterPlan = {
|
|
|
64
64
|
readonly sessionId: string;
|
|
65
65
|
readonly goal: string;
|
|
66
66
|
readonly mode: WorkflowMode;
|
|
67
|
-
readonly
|
|
67
|
+
readonly codeMode?: CodeMode;
|
|
68
68
|
readonly executionMode: 'autonomous';
|
|
69
69
|
readonly decisionProfile: string;
|
|
70
70
|
readonly dryRun: true;
|
|
@@ -81,5 +81,5 @@ export type WorkflowRouterPlan = {
|
|
|
81
81
|
readonly constraints: readonly string[];
|
|
82
82
|
};
|
|
83
83
|
export declare function isWorkflowMode(mode: string): mode is WorkflowMode;
|
|
84
|
-
export declare function
|
|
84
|
+
export declare function isCodeMode(value: string): value is CodeMode;
|
|
85
85
|
export declare function createWorkflowRouterPlan(request: WorkflowRouterRequest): WorkflowRouterPlan;
|
|
@@ -18,7 +18,7 @@ const EXECUTION_STAGES = ['coding-execution', 'unit-test-execution'];
|
|
|
18
18
|
const GUIDED_DECISION_STAGES = ['product-direction', 'design-direction'];
|
|
19
19
|
const GOVERNED_DECISION_STAGES = ['product-direction', 'design-direction', 'tech-direction', 'tech-review'];
|
|
20
20
|
export function isWorkflowMode(mode) {
|
|
21
|
-
return mode === '
|
|
21
|
+
return mode === 'code' || mode === 'team';
|
|
22
22
|
}
|
|
23
23
|
function assertSupportedMode(mode) {
|
|
24
24
|
if (!isWorkflowMode(mode)) {
|
|
@@ -32,9 +32,9 @@ function normalizeGoal(goal) {
|
|
|
32
32
|
}
|
|
33
33
|
return normalized;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
if (mode !== '
|
|
37
|
-
throw new Error('
|
|
35
|
+
function assertCodeModeAllowed(mode, codeMode) {
|
|
36
|
+
if (mode !== 'code' && codeMode !== undefined) {
|
|
37
|
+
throw new Error('codeMode requires code workflow mode');
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
function step(input, executionModelId) {
|
|
@@ -48,29 +48,29 @@ function step(input, executionModelId) {
|
|
|
48
48
|
writesArtifacts: false
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
export function
|
|
51
|
+
export function isCodeMode(value) {
|
|
52
52
|
return value === 'full-auto' || value === 'guided' || value === 'rnd';
|
|
53
53
|
}
|
|
54
|
-
function getDecisionProfileSummary(mode,
|
|
54
|
+
function getDecisionProfileSummary(mode, codeMode) {
|
|
55
55
|
if (mode === 'team') {
|
|
56
56
|
return 'Team mode keeps product and design governance on a human-controlled path while RD execution follows recommended defaults.';
|
|
57
57
|
}
|
|
58
|
-
if (
|
|
58
|
+
if (codeMode === 'guided') {
|
|
59
59
|
return 'Guided mode keeps the user in the decision loop for the early recommended defaults, while later execution remains bounded by the routing plan.';
|
|
60
60
|
}
|
|
61
|
-
if (
|
|
61
|
+
if (codeMode === 'rnd') {
|
|
62
62
|
return 'R&D mode asks for technical confirmation up front, then applies recommended defaults for implementation, testing, review, and safety checks.';
|
|
63
63
|
}
|
|
64
64
|
return 'Full-auto mode applies recommended defaults for product, design, and tech decisions, then runs the engineering pipeline end to end under routing gates.';
|
|
65
65
|
}
|
|
66
|
-
function annotateSteps(steps,
|
|
67
|
-
const decisionStages =
|
|
66
|
+
function annotateSteps(steps, codeMode) {
|
|
67
|
+
const decisionStages = codeMode === 'guided'
|
|
68
68
|
? GUIDED_DECISION_STAGES
|
|
69
69
|
: GOVERNED_DECISION_STAGES;
|
|
70
70
|
return steps.map((currentStep) => {
|
|
71
71
|
const isDecisionStage = decisionStages.includes(currentStep.stage);
|
|
72
72
|
const reasonPrefix = isDecisionStage
|
|
73
|
-
? `[${
|
|
73
|
+
? `[${codeMode}] decision stage`
|
|
74
74
|
: '[routed] execution stage';
|
|
75
75
|
return {
|
|
76
76
|
...currentStep,
|
|
@@ -80,18 +80,18 @@ function annotateSteps(steps, soloMode) {
|
|
|
80
80
|
}
|
|
81
81
|
function createSoloSteps(executionModelId) {
|
|
82
82
|
return [
|
|
83
|
-
step({ id: '
|
|
84
|
-
step({ id: '
|
|
85
|
-
step({ id: '
|
|
86
|
-
step({ id: '
|
|
87
|
-
step({ id: '
|
|
88
|
-
step({ id: '
|
|
89
|
-
step({ id: '
|
|
90
|
-
step({ id: '
|
|
83
|
+
step({ id: 'code-product-direction', stage: 'product-direction', owner: 'peaks-code', modelTier: 'top-tier', reason: 'Product direction needs strong judgment before execution work is delegated.', dependsOn: [] }, executionModelId),
|
|
84
|
+
step({ id: 'code-design-direction', stage: 'design-direction', owner: 'peaks-code', modelTier: 'top-tier', reason: 'Design direction uses the recommended default before cheaper implementation work.', dependsOn: ['code-product-direction'] }, executionModelId),
|
|
85
|
+
step({ id: 'code-tech-direction', stage: 'tech-direction', owner: 'peaks-tech', modelTier: 'top-tier', reason: 'Technical boundaries and approval gates use the recommended default with high-confidence planning.', dependsOn: ['code-design-direction'] }, executionModelId),
|
|
86
|
+
step({ id: 'code-tech-review', stage: 'tech-review', owner: 'peaks-tech', modelTier: 'top-tier', reason: 'Tech artifacts and gate decisions require strong review and a recommended default path.', dependsOn: ['code-tech-direction'] }, executionModelId),
|
|
87
|
+
step({ id: 'code-rd-planning', stage: 'rd-planning', owner: 'peaks-rd', modelTier: 'top-tier', reason: 'RD task decomposition and acceptance criteria use the recommended default before execution delegation.', dependsOn: ['code-tech-review'] }, executionModelId),
|
|
88
|
+
step({ id: 'code-coding-execution', stage: 'coding-execution', owner: 'peaks-rd', modelTier: executionModelId === STRONGEST_MODEL_ID ? 'top-tier' : 'mid-tier', reason: `Coding and routine refactoring must use the configured execution worker model ${executionModelId}.`, dependsOn: ['code-rd-planning'] }, executionModelId),
|
|
89
|
+
step({ id: 'code-unit-test-execution', stage: 'unit-test-execution', owner: 'peaks-rd', modelTier: executionModelId === STRONGEST_MODEL_ID ? 'top-tier' : 'mid-tier', reason: `Unit test authoring and focused test runs must use the configured execution worker model ${executionModelId}.`, dependsOn: ['code-coding-execution'] }, executionModelId),
|
|
90
|
+
step({ id: 'code-quality-review', stage: 'quality-review', owner: 'peaks-code', modelTier: 'top-tier', reason: 'Reducer and final quality gates need strong synthesis and risk review.', dependsOn: ['code-unit-test-execution'] }, executionModelId)
|
|
91
91
|
];
|
|
92
92
|
}
|
|
93
|
-
function createSoloStepsForMode(
|
|
94
|
-
return annotateSteps(createSoloSteps(executionModelId),
|
|
93
|
+
function createSoloStepsForMode(codeMode, executionModelId) {
|
|
94
|
+
return annotateSteps(createSoloSteps(executionModelId), codeMode);
|
|
95
95
|
}
|
|
96
96
|
function createTeamSteps(executionModelId) {
|
|
97
97
|
return [
|
|
@@ -150,21 +150,21 @@ function createModeStatus(economyMode, swarmMode, executionModelId, executionMod
|
|
|
150
150
|
summary: `${economySummary} ${swarmSummary}`
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
if (mode !== '
|
|
153
|
+
function getCodeMode(mode, codeMode) {
|
|
154
|
+
if (mode !== 'code') {
|
|
155
155
|
return undefined;
|
|
156
156
|
}
|
|
157
|
-
if (
|
|
157
|
+
if (codeMode === undefined) {
|
|
158
158
|
return 'full-auto';
|
|
159
159
|
}
|
|
160
|
-
if (!
|
|
161
|
-
throw new Error('Unsupported
|
|
160
|
+
if (!isCodeMode(codeMode)) {
|
|
161
|
+
throw new Error('Unsupported code mode');
|
|
162
162
|
}
|
|
163
|
-
return
|
|
163
|
+
return codeMode;
|
|
164
164
|
}
|
|
165
165
|
export function createWorkflowRouterPlan(request) {
|
|
166
166
|
assertSupportedMode(request.mode);
|
|
167
|
-
|
|
167
|
+
assertCodeModeAllowed(request.mode, request.codeMode);
|
|
168
168
|
// Slice 2026-06-29-change-id-root-removal: change-id is metadata-only;
|
|
169
169
|
// no structural validation gate fires here.
|
|
170
170
|
const goal = normalizeGoal(request.goal);
|
|
@@ -185,8 +185,8 @@ export function createWorkflowRouterPlan(request) {
|
|
|
185
185
|
const effectiveProviders = request.config?.providers ?? { minimax: { model: 'minimax-2.7' } };
|
|
186
186
|
const executionModelId = economyMode !== false ? getConfiguredExecutionModelId(effectiveProviders) : STRONGEST_MODEL_ID;
|
|
187
187
|
const modeStatus = createModeStatus(economyMode, swarmMode, executionModelId, economyMode ? 'config.providers' : 'planner-reviewer-strongest-model');
|
|
188
|
-
const
|
|
189
|
-
const decisionProfile = getDecisionProfileSummary(request.mode,
|
|
188
|
+
const codeMode = getCodeMode(request.mode, request.codeMode);
|
|
189
|
+
const decisionProfile = getDecisionProfileSummary(request.mode, codeMode);
|
|
190
190
|
const artifactWorkspacePath = request.artifactWorkspacePath ?? (request.workspace ? getLocalArtifactPath(request.workspace) : undefined);
|
|
191
191
|
const sharedWorkspaceOptions = {
|
|
192
192
|
...(artifactWorkspacePath ? { artifactWorkspacePath } : {}),
|
|
@@ -195,7 +195,7 @@ export function createWorkflowRouterPlan(request) {
|
|
|
195
195
|
const techStatus = getTechStatus({ sessionId: request.sessionId, ...sharedWorkspaceOptions });
|
|
196
196
|
const techPlan = createTechPlan({ sessionId: request.sessionId, goal, swarm: swarmMode, dryRun: true, ...sharedWorkspaceOptions });
|
|
197
197
|
const rdPlan = createRdSwarmPlan({ skill: 'rd', sessionId: request.sessionId, goal, maxWorkers, swarmMode, executionModelId, dryRun: true, ...sharedWorkspaceOptions });
|
|
198
|
-
const steps =
|
|
198
|
+
const steps = codeMode ? createSoloStepsForMode(codeMode, executionModelId) : createTeamSteps(executionModelId);
|
|
199
199
|
const blockedReasons = uniqueStrings([
|
|
200
200
|
...techStatus.blockedReasons,
|
|
201
201
|
...getTechPlanBlockedReasons(techPlan),
|
|
@@ -208,11 +208,11 @@ export function createWorkflowRouterPlan(request) {
|
|
|
208
208
|
sessionId: request.sessionId,
|
|
209
209
|
goal,
|
|
210
210
|
mode: request.mode,
|
|
211
|
-
...(
|
|
211
|
+
...(codeMode ? { codeMode } : {}),
|
|
212
212
|
executionMode: 'autonomous',
|
|
213
213
|
decisionProfile,
|
|
214
214
|
dryRun: true,
|
|
215
|
-
routePolicy: request.mode === '
|
|
215
|
+
routePolicy: request.mode === 'code' ? 'code-broad-multi-model' : 'team-rd-limited-multi-model',
|
|
216
216
|
modelRouting: createModelRouting(steps, executionModelId),
|
|
217
217
|
modelAssignments: createModelAssignments(steps),
|
|
218
218
|
modeStatus,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* The template is a PreToolUse hook allow-list that bypasses the
|
|
6
6
|
* Claude Code [Fact-Forcing Gate] for tool calls whose paths target
|
|
7
7
|
* the peaks-managed `.peaks/` workspace. Without this bypass,
|
|
8
|
-
* `peaks workspace init` (Step 0 of every peaks-
|
|
8
|
+
* `peaks workspace init` (Step 0 of every peaks-code session) is
|
|
9
9
|
* unrunnable in a consumer project because the gate blocks the very
|
|
10
10
|
* first Write.
|
|
11
11
|
*
|
|
@@ -51,7 +51,7 @@ export declare const CLAUDE_SETTINGS_LOCAL_FILENAME = ".claude/settings.local.js
|
|
|
51
51
|
* bypass is the only emit. Bash enforcement is owned by
|
|
52
52
|
* `peaks gate enforce` in `settings.json`.
|
|
53
53
|
* 1.3.0 — added the v3.1.2 `Bash` PreToolUse matcher that runs
|
|
54
|
-
* `peaks
|
|
54
|
+
* `peaks code gate-step-08 --project .` (Step 0.8 mechanical
|
|
55
55
|
* gate). The existing Write|Edit|MultiEdit matcher is
|
|
56
56
|
* preserved. The new matcher's exit code is the load-bearing
|
|
57
57
|
* signal: 0 = allow, 2 = block (with stderr BLOCKED reason).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* The template is a PreToolUse hook allow-list that bypasses the
|
|
6
6
|
* Claude Code [Fact-Forcing Gate] for tool calls whose paths target
|
|
7
7
|
* the peaks-managed `.peaks/` workspace. Without this bypass,
|
|
8
|
-
* `peaks workspace init` (Step 0 of every peaks-
|
|
8
|
+
* `peaks workspace init` (Step 0 of every peaks-code session) is
|
|
9
9
|
* unrunnable in a consumer project because the gate blocks the very
|
|
10
10
|
* first Write.
|
|
11
11
|
*
|
|
@@ -51,7 +51,7 @@ export const CLAUDE_SETTINGS_LOCAL_FILENAME = '.claude/settings.local.json';
|
|
|
51
51
|
* bypass is the only emit. Bash enforcement is owned by
|
|
52
52
|
* `peaks gate enforce` in `settings.json`.
|
|
53
53
|
* 1.3.0 — added the v3.1.2 `Bash` PreToolUse matcher that runs
|
|
54
|
-
* `peaks
|
|
54
|
+
* `peaks code gate-step-08 --project .` (Step 0.8 mechanical
|
|
55
55
|
* gate). The existing Write|Edit|MultiEdit matcher is
|
|
56
56
|
* preserved. The new matcher's exit code is the load-bearing
|
|
57
57
|
* signal: 0 = allow, 2 = block (with stderr BLOCKED reason).
|
|
@@ -174,7 +174,7 @@ function wrapAsNodeOneLiner(js) {
|
|
|
174
174
|
* subcommand allow-list. It does NOT silently allow arbitrary paths
|
|
175
175
|
* under `.peaks/_runtime/<sessionId>/` — only those matching the documented
|
|
176
176
|
* pattern. Future slice work can broaden the allow-list if the
|
|
177
|
-
* peaks-
|
|
177
|
+
* peaks-code workflow needs more paths.
|
|
178
178
|
*/
|
|
179
179
|
function buildWriteHookCommand() {
|
|
180
180
|
// Path-matching: allow when the path contains `.peaks/_runtime/`
|
|
@@ -216,7 +216,7 @@ export function buildClaudeSettingsLocalJson() {
|
|
|
216
216
|
},
|
|
217
217
|
{
|
|
218
218
|
// v3.1.2 Step 0.8 — Mechanical PreToolUse gate. Runs
|
|
219
|
-
// `peaks
|
|
219
|
+
// `peaks code gate-step-08 --project .` before every Bash
|
|
220
220
|
// tool call. Exit 0 = allow (with structured stdout
|
|
221
221
|
// describing the decision + optional `Next: slice #N+1 of
|
|
222
222
|
// M (<currentSlice>)` line when progress.json exists). Exit
|
|
@@ -235,7 +235,7 @@ export function buildClaudeSettingsLocalJson() {
|
|
|
235
235
|
};
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
238
|
-
* v3.1.2: build the Bash matcher command that runs `peaks
|
|
238
|
+
* v3.1.2: build the Bash matcher command that runs `peaks code
|
|
239
239
|
* gate-step-08`. We invoke the CLI directly (not via `node -e "..."`)
|
|
240
240
|
* because the CLI is the only legitimate source of the structured
|
|
241
241
|
* decision + Next: slice context. Exit code is the load-bearing
|
|
@@ -246,9 +246,9 @@ export function buildClaudeSettingsLocalJson() {
|
|
|
246
246
|
*/
|
|
247
247
|
function buildBashGateStep08Command() {
|
|
248
248
|
// The hook receives the tool call on stdin. We ignore stdin and
|
|
249
|
-
// delegate entirely to `peaks
|
|
249
|
+
// delegate entirely to `peaks code gate-step-08`, which reads
|
|
250
250
|
// .peaks/_runtime/<sessionId>/job-shape.json and last-prompt.txt.
|
|
251
251
|
// `${CLAUDE_PROJECT_DIR}` resolves to the consumer project's root
|
|
252
252
|
// (Claude Code's standard convention).
|
|
253
|
-
return 'peaks
|
|
253
|
+
return 'peaks code gate-step-08 --project "${CLAUDE_PROJECT_DIR}"';
|
|
254
254
|
}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* recovery path: copy the file contents into
|
|
27
27
|
* `.claude/settings.local.json` manually. The recovery path is
|
|
28
28
|
* documented in
|
|
29
|
-
* `skills/peaks-
|
|
29
|
+
* `skills/peaks-code/references/anchoring-and-session-info.md`.
|
|
30
30
|
*
|
|
31
31
|
* Slice 2026-06-13-selfheal-claude-settings-template: the offline copy
|
|
32
32
|
* is now ALSO drift-checked (via `templateContentMatches`) so stale
|
|
@@ -53,7 +53,7 @@ const PEAKS_GITIGNORE_SNIPPET = [
|
|
|
53
53
|
* recovery path: copy the file contents into
|
|
54
54
|
* `.claude/settings.local.json` manually. The recovery path is
|
|
55
55
|
* documented in
|
|
56
|
-
* `skills/peaks-
|
|
56
|
+
* `skills/peaks-code/references/anchoring-and-session-info.md`.
|
|
57
57
|
*
|
|
58
58
|
* Slice 2026-06-13-selfheal-claude-settings-template: the offline copy
|
|
59
59
|
* is now ALSO drift-checked (via `templateContentMatches`) so stale
|
|
@@ -19,7 +19,7 @@ export type WorkspaceInitOptions = {
|
|
|
19
19
|
*/
|
|
20
20
|
noClaudeHooks?: boolean;
|
|
21
21
|
/**
|
|
22
|
-
* Slice 2026-06-16-peaks-
|
|
22
|
+
* Slice 2026-06-16-peaks-code-auto-scaffold (RD#7): opt-in flag for
|
|
23
23
|
* auto-applying `peaks standards init` when the consumer project's
|
|
24
24
|
* `.claude/rules/` is missing or empty. Default (`false`) only emits
|
|
25
25
|
* the diagnostic; set to `true` to also scaffold the rules tree via
|
|
@@ -59,7 +59,7 @@ export type WorkspaceInitReport = {
|
|
|
59
59
|
* taken on the offline `.peaks/.claude-settings-template.json` copy.
|
|
60
60
|
* The offline copy is ALWAYS written/checked (regardless of
|
|
61
61
|
* noClaudeHooks) because it is the manual-recovery anchor — see
|
|
62
|
-
* `skills/peaks-
|
|
62
|
+
* `skills/peaks-code/references/anchoring-and-session-info.md`.
|
|
63
63
|
* - written: the file did not exist; it was created
|
|
64
64
|
* - refreshed: the file existed but its parsed hooks tree
|
|
65
65
|
* diverged from the current `buildClaudeSettingsLocalJson()`;
|
|
@@ -75,7 +75,7 @@ export type WorkspaceInitReport = {
|
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
77
|
/**
|
|
78
|
-
* Slice 2026-06-16-peaks-
|
|
78
|
+
* Slice 2026-06-16-peaks-code-auto-scaffold (RD#7): structured
|
|
79
79
|
* diagnostic for missing or empty `.claude/rules/{common,<language>}/`.
|
|
80
80
|
* Always present (the detector runs on every init); `missing: false`
|
|
81
81
|
* means the project's rules tree is already populated and no action is
|
|
@@ -84,7 +84,7 @@ export type WorkspaceInitReport = {
|
|
|
84
84
|
*/
|
|
85
85
|
standardsMissing: MissingProjectStandardsDiagnostic;
|
|
86
86
|
/**
|
|
87
|
-
* Slice 2026-06-16-peaks-
|
|
87
|
+
* Slice 2026-06-16-peaks-code-auto-scaffold (RD#7): when the caller
|
|
88
88
|
* passed `initStandards: true` AND the detector reported `missing:
|
|
89
89
|
* true`, this field lists the files written by
|
|
90
90
|
* `executeProjectStandardsInit({ projectRoot, apply: true })`.
|
|
@@ -249,7 +249,7 @@ export async function initWorkspace(options) {
|
|
|
249
249
|
// that takes an explicit --session-id, so it owns the binding to .session.json.
|
|
250
250
|
// Without this write, downstream commands that fall through to
|
|
251
251
|
// `ensureSession()` would auto-generate a *different* id and create a second
|
|
252
|
-
// session directory — the bug that confuses the LLM in peaks-
|
|
252
|
+
// session directory — the bug that confuses the LLM in peaks-code.
|
|
253
253
|
//
|
|
254
254
|
// Conflict rule: if .session.json already points at a different session
|
|
255
255
|
// whose directory is real (has session.json inside), the caller is starting
|
|
@@ -289,7 +289,7 @@ export async function initWorkspace(options) {
|
|
|
289
289
|
setCurrentSessionBinding(options.projectRoot, options.sessionId);
|
|
290
290
|
bound = true;
|
|
291
291
|
}
|
|
292
|
-
// Slice 2026-06-16-peaks-
|
|
292
|
+
// Slice 2026-06-16-peaks-code-auto-scaffold (RD#7):
|
|
293
293
|
// - Always run the detector and surface the descriptor so the CLI can
|
|
294
294
|
// put it on stderr + into the JSON envelope's `data.standardsMissing`.
|
|
295
295
|
// - When `initStandards: true` AND the detector reports missing, run
|
|
@@ -2,5 +2,5 @@ export declare const repoRoot: string;
|
|
|
2
2
|
export declare const skillsDir: string;
|
|
3
3
|
export declare const schemasDir: string;
|
|
4
4
|
export declare const templatesDir: string;
|
|
5
|
-
export declare const requiredSkillNames: readonly ["peaks-
|
|
5
|
+
export declare const requiredSkillNames: readonly ["peaks-code", "peaks-prd", "peaks-ui", "peaks-rd", "peaks-qa", "peaks-sc", "peaks-txt", "peaks-sop"];
|
|
6
6
|
export declare const requiredSchemaFiles: readonly ["artifact-manifest.schema.json", "context-capsule.schema.json", "approval-record.schema.json", "change-impact.schema.json", "refactor-slice-spec.schema.json", "artifact-retention-report.schema.json", "capability-source.schema.json", "capability-item.schema.json", "capability-availability.schema.json", "recommendation-plan.schema.json", "artifact-workspace.schema.json", "mcp-server.schema.json", "mcp-install-spec.schema.json", "mcp-install-plan.schema.json", "mcp-apply-result.schema.json", "openspec-change-summary.schema.json", "openspec-render-request.schema.json", "openspec-validation-result.schema.json", "doctor-report.schema.json", "library-breaking-changes.schema.json"];
|
package/dist/src/shared/paths.js
CHANGED
|
@@ -17,7 +17,7 @@ export const skillsDir = resolve(repoRoot, 'skills');
|
|
|
17
17
|
export const schemasDir = resolve(repoRoot, 'schemas');
|
|
18
18
|
export const templatesDir = resolve(repoRoot, 'templates');
|
|
19
19
|
export const requiredSkillNames = [
|
|
20
|
-
'peaks-
|
|
20
|
+
'peaks-code',
|
|
21
21
|
'peaks-prd',
|
|
22
22
|
'peaks-ui',
|
|
23
23
|
'peaks-rd',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "
|
|
1
|
+
export declare const CLI_VERSION = "4.0.0-beta.2";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "
|
|
1
|
+
export const CLI_VERSION = "4.0.0-beta.2";
|