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
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface AdapterSegment {
|
|
2
|
+
name: string;
|
|
3
|
+
skillMd: string;
|
|
4
|
+
scripts: {
|
|
5
|
+
name: string;
|
|
6
|
+
content: string;
|
|
7
|
+
}[];
|
|
8
|
+
}
|
|
9
|
+
export interface AdapterEnvelope {
|
|
10
|
+
preamble: string;
|
|
11
|
+
refs: {
|
|
12
|
+
path: string;
|
|
13
|
+
kind: "file" | "dir" | "script";
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
export interface Adapter {
|
|
17
|
+
readonly name: "claude" | "codex" | "copilot" | "auto";
|
|
18
|
+
resolveScratchDir(beeName: string): Promise<string>;
|
|
19
|
+
materialize(beeName: string, env: AdapterEnvelope, segments: AdapterSegment[]): Promise<string>;
|
|
20
|
+
publish(scratchDir: string): Promise<string>;
|
|
21
|
+
activate(scratchDir: string): Promise<void>;
|
|
22
|
+
cleanup(scratchDir: string): Promise<void>;
|
|
23
|
+
detect(): Promise<boolean>;
|
|
24
|
+
}
|
|
25
|
+
export declare class ADAPTER_NOT_IMPLEMENTED extends Error {
|
|
26
|
+
constructor(adapter: string, method: string);
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Adapter } from "./adapter.js";
|
|
2
|
+
type Detectable = Pick<Adapter, "name" | "detect">;
|
|
3
|
+
export declare class AutoAdapter {
|
|
4
|
+
private readonly _o;
|
|
5
|
+
private readonly _adapters;
|
|
6
|
+
constructor(_o: {
|
|
7
|
+
home: string;
|
|
8
|
+
}, _adapters: Detectable[]);
|
|
9
|
+
detectAndPick(): Promise<Detectable>;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class AutoAdapter {
|
|
2
|
+
_o;
|
|
3
|
+
_adapters;
|
|
4
|
+
constructor(_o, _adapters) {
|
|
5
|
+
this._o = _o;
|
|
6
|
+
this._adapters = _adapters;
|
|
7
|
+
}
|
|
8
|
+
async detectAndPick() {
|
|
9
|
+
for (const a of this._adapters) {
|
|
10
|
+
if (await a.detect())
|
|
11
|
+
return a;
|
|
12
|
+
}
|
|
13
|
+
throw new Error("No adapter detected. Use `peaks skill adapter set-active <name>` to force one.");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Adapter, AdapterEnvelope, AdapterSegment } from "./adapter.js";
|
|
2
|
+
export declare class ClaudeAdapter implements Adapter {
|
|
3
|
+
private readonly opts;
|
|
4
|
+
readonly name: "claude";
|
|
5
|
+
constructor(opts: {
|
|
6
|
+
home: string;
|
|
7
|
+
});
|
|
8
|
+
detect(): Promise<boolean>;
|
|
9
|
+
resolveScratchDir(beeName: string): Promise<string>;
|
|
10
|
+
materialize(beeName: string, env: AdapterEnvelope, segments: AdapterSegment[]): Promise<string>;
|
|
11
|
+
publish(scratchDir: string): Promise<string>;
|
|
12
|
+
activate(_scratchDir: string): Promise<void>;
|
|
13
|
+
cleanup(scratchDir: string): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { writeFileSync, mkdirSync, rmSync, existsSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
export class ClaudeAdapter {
|
|
4
|
+
opts;
|
|
5
|
+
name = "claude";
|
|
6
|
+
constructor(opts) {
|
|
7
|
+
this.opts = opts;
|
|
8
|
+
}
|
|
9
|
+
async detect() {
|
|
10
|
+
return true; /* Claude is the default; ship this slice first */
|
|
11
|
+
}
|
|
12
|
+
async resolveScratchDir(beeName) {
|
|
13
|
+
return join(this.opts.home, ".claude", "skills", `peaks-bee-${beeName}.peaks-generated`);
|
|
14
|
+
}
|
|
15
|
+
async materialize(beeName, env, segments) {
|
|
16
|
+
const dir = await this.resolveScratchDir(beeName);
|
|
17
|
+
if (existsSync(dir))
|
|
18
|
+
rmSync(dir, { recursive: true, force: true });
|
|
19
|
+
mkdirSync(dir, { recursive: true });
|
|
20
|
+
const frontmatter = `---\nname: peaks-bee-${beeName}\ndescription: peaks-loop generated bee ${beeName} — see local SkillHub for source\n---\n\n`;
|
|
21
|
+
const body = `${env.preamble}\n\n` + segments.map((s) => s.skillMd).join("\n\n");
|
|
22
|
+
writeFileSync(join(dir, "SKILL.md"), frontmatter + body);
|
|
23
|
+
mkdirSync(join(dir, "scripts"), { recursive: true });
|
|
24
|
+
for (const s of segments) {
|
|
25
|
+
for (const sc of s.scripts)
|
|
26
|
+
writeFileSync(join(dir, "scripts", sc.name), sc.content);
|
|
27
|
+
}
|
|
28
|
+
return dir;
|
|
29
|
+
}
|
|
30
|
+
async publish(scratchDir) {
|
|
31
|
+
return scratchDir;
|
|
32
|
+
}
|
|
33
|
+
async activate(_scratchDir) {
|
|
34
|
+
/* no-op; runtime picks up by convention */
|
|
35
|
+
}
|
|
36
|
+
async cleanup(scratchDir) {
|
|
37
|
+
if (existsSync(scratchDir))
|
|
38
|
+
rmSync(scratchDir, { recursive: true, force: true });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Adapter } from "./adapter.js";
|
|
2
|
+
export declare class CodexAdapter implements Pick<Adapter, "name"> {
|
|
3
|
+
private readonly _o;
|
|
4
|
+
readonly name: "codex";
|
|
5
|
+
constructor(_o: {
|
|
6
|
+
home: string;
|
|
7
|
+
});
|
|
8
|
+
detect(): Promise<boolean>;
|
|
9
|
+
resolveScratchDir(): Promise<void>;
|
|
10
|
+
materialize(): Promise<void>;
|
|
11
|
+
publish(): Promise<void>;
|
|
12
|
+
activate(): Promise<void>;
|
|
13
|
+
cleanup(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ADAPTER_NOT_IMPLEMENTED } from "./adapter.js";
|
|
2
|
+
export class CodexAdapter {
|
|
3
|
+
_o;
|
|
4
|
+
name = "codex";
|
|
5
|
+
constructor(_o) {
|
|
6
|
+
this._o = _o;
|
|
7
|
+
}
|
|
8
|
+
async detect() { return false; }
|
|
9
|
+
async resolveScratchDir() { throw new ADAPTER_NOT_IMPLEMENTED("codex", "resolveScratchDir"); }
|
|
10
|
+
async materialize() { throw new ADAPTER_NOT_IMPLEMENTED("codex", "materialize"); }
|
|
11
|
+
async publish() { throw new ADAPTER_NOT_IMPLEMENTED("codex", "publish"); }
|
|
12
|
+
async activate() { throw new ADAPTER_NOT_IMPLEMENTED("codex", "activate"); }
|
|
13
|
+
async cleanup() { throw new ADAPTER_NOT_IMPLEMENTED("codex", "cleanup"); }
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Adapter } from "./adapter.js";
|
|
2
|
+
export declare class CopilotAdapter implements Pick<Adapter, "name"> {
|
|
3
|
+
private readonly _o;
|
|
4
|
+
readonly name: "copilot";
|
|
5
|
+
constructor(_o: {
|
|
6
|
+
home: string;
|
|
7
|
+
});
|
|
8
|
+
detect(): Promise<boolean>;
|
|
9
|
+
resolveScratchDir(): Promise<void>;
|
|
10
|
+
materialize(): Promise<void>;
|
|
11
|
+
publish(): Promise<void>;
|
|
12
|
+
activate(): Promise<void>;
|
|
13
|
+
cleanup(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ADAPTER_NOT_IMPLEMENTED } from "./adapter.js";
|
|
2
|
+
export class CopilotAdapter {
|
|
3
|
+
_o;
|
|
4
|
+
name = "copilot";
|
|
5
|
+
constructor(_o) {
|
|
6
|
+
this._o = _o;
|
|
7
|
+
}
|
|
8
|
+
async detect() { return false; }
|
|
9
|
+
async resolveScratchDir() { throw new ADAPTER_NOT_IMPLEMENTED("copilot", "resolveScratchDir"); }
|
|
10
|
+
async materialize() { throw new ADAPTER_NOT_IMPLEMENTED("copilot", "materialize"); }
|
|
11
|
+
async publish() { throw new ADAPTER_NOT_IMPLEMENTED("copilot", "publish"); }
|
|
12
|
+
async activate() { throw new ADAPTER_NOT_IMPLEMENTED("copilot", "activate"); }
|
|
13
|
+
async cleanup() { throw new ADAPTER_NOT_IMPLEMENTED("copilot", "cleanup"); }
|
|
14
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { showRequestArtifact } from './request-artifact-service.js';
|
|
2
2
|
const DEFAULT_MAX_CYCLES = 3;
|
|
3
|
-
// Matches transition notes
|
|
3
|
+
// Matches transition notes Code writes during repair routing.
|
|
4
4
|
// Format example:
|
|
5
5
|
// - transition note (2026-05-25T08:00:00.000Z): QA return-to-rd cycle 1: failing acceptance items A, B
|
|
6
6
|
// - transition note (2026-05-25T09:00:00.000Z): QA cycle 2: regression in module X
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* active-skill-resolver — utility for hook enforcers.
|
|
3
3
|
*
|
|
4
4
|
* Resolves the active peak skill name for the current session, so hook
|
|
5
|
-
* enforcers (e.g.
|
|
5
|
+
* enforcers (e.g. code-ban) can decide whether to fire.
|
|
6
6
|
*
|
|
7
7
|
* Per `src/services/session/caller-id-types.ts`: the active-skill file is
|
|
8
8
|
* at `.peaks/_runtime/<peakSessionId>/active-skill-<callerId>.json`.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* active-skill-resolver — utility for hook enforcers.
|
|
3
3
|
*
|
|
4
4
|
* Resolves the active peak skill name for the current session, so hook
|
|
5
|
-
* enforcers (e.g.
|
|
5
|
+
* enforcers (e.g. code-ban) can decide whether to fire.
|
|
6
6
|
*
|
|
7
7
|
* Per `src/services/session/caller-id-types.ts`: the active-skill file is
|
|
8
8
|
* at `.peaks/_runtime/<peakSessionId>/active-skill-<callerId>.json`.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Code-commit-ban enforcer — PreToolUse Bash guard.
|
|
3
3
|
*
|
|
4
4
|
* Per L2 redesign §5.4. Deny `git commit` or `git apply` invocations from
|
|
5
|
-
* a peaks-* skill. The
|
|
5
|
+
* a peaks-* skill. The Code Commit Ban Red Line says peaks-code / peaks-rd
|
|
6
6
|
* are orchestrators, not implementers; the actual `git commit` step must
|
|
7
7
|
* go through `peaks request transition`, which itself enforces spec-locked
|
|
8
8
|
* + tech-doc-presence.
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
* manifest read fails, the hook must fail-OPEN (warn + allow). The LLM is
|
|
12
12
|
* never bricked by a peaks bug.
|
|
13
13
|
*/
|
|
14
|
-
export interface
|
|
14
|
+
export interface CodeBanInput {
|
|
15
15
|
readonly skill: string;
|
|
16
16
|
readonly command: string;
|
|
17
17
|
}
|
|
18
|
-
export interface
|
|
18
|
+
export interface CodeBanResult {
|
|
19
19
|
readonly denied: boolean;
|
|
20
20
|
readonly reason: string;
|
|
21
21
|
}
|
|
22
|
-
export declare function
|
|
23
|
-
export declare function
|
|
22
|
+
export declare function isCodeCommit(skill: string, command: string): boolean;
|
|
23
|
+
export declare function evaluateCodeBan(input: CodeBanInput): CodeBanResult;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Code-commit-ban enforcer — PreToolUse Bash guard.
|
|
3
3
|
*
|
|
4
4
|
* Per L2 redesign §5.4. Deny `git commit` or `git apply` invocations from
|
|
5
|
-
* a peaks-* skill. The
|
|
5
|
+
* a peaks-* skill. The Code Commit Ban Red Line says peaks-code / peaks-rd
|
|
6
6
|
* are orchestrators, not implementers; the actual `git commit` step must
|
|
7
7
|
* go through `peaks request transition`, which itself enforces spec-locked
|
|
8
8
|
* + tech-doc-presence.
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
* never bricked by a peaks bug.
|
|
13
13
|
*/
|
|
14
14
|
const COMMIT_APPLY_PATTERN = /^\s*git\s+(commit|apply)\b/;
|
|
15
|
-
const DENY_REASON = '
|
|
15
|
+
const DENY_REASON = 'Code Commit Ban Red Line: peaks-* skills must go through peaks-code / peaks-rd. ' +
|
|
16
16
|
'Use `peaks request transition` instead of `git commit` / `git apply` directly.';
|
|
17
|
-
export function
|
|
17
|
+
export function isCodeCommit(skill, command) {
|
|
18
18
|
if (!skill.startsWith('peaks-'))
|
|
19
19
|
return false;
|
|
20
20
|
return COMMIT_APPLY_PATTERN.test(command);
|
|
21
21
|
}
|
|
22
|
-
export function
|
|
23
|
-
if (
|
|
22
|
+
export function evaluateCodeBan(input) {
|
|
23
|
+
if (isCodeCommit(input.skill, input.command)) {
|
|
24
24
|
return { denied: true, reason: DENY_REASON };
|
|
25
25
|
}
|
|
26
26
|
return { denied: false, reason: '' };
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { RedLineMarker } from './types.js';
|
|
9
9
|
export interface RedLineCatalogEntry {
|
|
10
|
-
/** Stable id, e.g. "rl-
|
|
10
|
+
/** Stable id, e.g. "rl-code-ban-001". */
|
|
11
11
|
readonly id: string;
|
|
12
12
|
readonly rule: string;
|
|
13
13
|
/** Markers that, if found near the rule's text, identify this red line. */
|
|
@@ -26,7 +26,7 @@ export declare const RED_LINE_CATALOG: readonly RedLineCatalogEntry[];
|
|
|
26
26
|
* the integration seam is missing. When the integration lands, the entry
|
|
27
27
|
* is removed from this set in a single-line follow-up commit.
|
|
28
28
|
*
|
|
29
|
-
* L2.1 final state: Tasks 5 (
|
|
29
|
+
* L2.1 final state: Tasks 5 (code-ban) + 6 (no-root-pollution) are
|
|
30
30
|
* wired into peaks hook handle (Tasks 1-4: framework + 3 enforcers also
|
|
31
31
|
* integrated). Tasks 3 (tech-doc-presence) and 4 (mock-placement) are
|
|
32
32
|
* deferred — their request-transition / slice-check integrations are
|
|
@@ -9,15 +9,15 @@ import { RED_LINE_CATALOG_P2_A } from './red-line-catalog-p2-a.js';
|
|
|
9
9
|
import { RED_LINE_CATALOG_P2_B } from './red-line-catalog-p2-b.js';
|
|
10
10
|
export const RED_LINE_CATALOG = [
|
|
11
11
|
{
|
|
12
|
-
id: 'rl-
|
|
13
|
-
rule: '
|
|
12
|
+
id: 'rl-code-ban-001',
|
|
13
|
+
rule: 'Code Commit Ban',
|
|
14
14
|
markers: ['BLOCKING', 'MANDATORY'],
|
|
15
15
|
phrases: [
|
|
16
|
-
'peaks-
|
|
16
|
+
'peaks-code',
|
|
17
17
|
'orchestrator, NOT an implementer',
|
|
18
|
-
'
|
|
18
|
+
'code',
|
|
19
19
|
],
|
|
20
|
-
enforcerRef: 'src/services/audit/enforcers/
|
|
20
|
+
enforcerRef: 'src/services/audit/enforcers/code-ban.ts',
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
id: 'rl-no-root-pollution-001',
|
|
@@ -146,7 +146,7 @@ export const RED_LINE_CATALOG = [
|
|
|
146
146
|
* the integration seam is missing. When the integration lands, the entry
|
|
147
147
|
* is removed from this set in a single-line follow-up commit.
|
|
148
148
|
*
|
|
149
|
-
* L2.1 final state: Tasks 5 (
|
|
149
|
+
* L2.1 final state: Tasks 5 (code-ban) + 6 (no-root-pollution) are
|
|
150
150
|
* wired into peaks hook handle (Tasks 1-4: framework + 3 enforcers also
|
|
151
151
|
* integrated). Tasks 3 (tech-doc-presence) and 4 (mock-placement) are
|
|
152
152
|
* deferred — their request-transition / slice-check integrations are
|
|
@@ -39,6 +39,28 @@ export function scanSkillsTree(input) {
|
|
|
39
39
|
for (const entry of entries) {
|
|
40
40
|
if (!entry.isDirectory() || entry.name.startsWith('.'))
|
|
41
41
|
continue;
|
|
42
|
+
// LLM-internal skills live under `skills/bee/<name>/` per spec 2026-07-05.
|
|
43
|
+
// Recurse one level into `bee/` to cover all 9 demoted role/audit skills.
|
|
44
|
+
if (entry.name === 'bee') {
|
|
45
|
+
let subEntries;
|
|
46
|
+
try {
|
|
47
|
+
subEntries = readdirSync(join(skillsRoot, 'bee'), { withFileTypes: true });
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
warnings.push({
|
|
51
|
+
file: 'skills/bee',
|
|
52
|
+
message: `readdir failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
53
|
+
});
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
for (const subEntry of subEntries) {
|
|
57
|
+
if (!subEntry.isDirectory() || subEntry.name.startsWith('.'))
|
|
58
|
+
continue;
|
|
59
|
+
const skillMd = readSkillFile(input.projectRoot, join('bee', subEntry.name), 'SKILL.md');
|
|
60
|
+
lines.push(...skillMd);
|
|
61
|
+
}
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
42
64
|
const skillMd = readSkillFile(input.projectRoot, entry.name, 'SKILL.md');
|
|
43
65
|
lines.push(...skillMd);
|
|
44
66
|
}
|
|
@@ -21,9 +21,9 @@ export interface RedLineSource {
|
|
|
21
21
|
readonly context: string;
|
|
22
22
|
}
|
|
23
23
|
export interface RedLineEntry {
|
|
24
|
-
/** Stable id, e.g. "rl-
|
|
24
|
+
/** Stable id, e.g. "rl-code-ban-001". */
|
|
25
25
|
readonly id: string;
|
|
26
|
-
/** Human-readable rule name, e.g. "
|
|
26
|
+
/** Human-readable rule name, e.g. "Code Commit Ban". */
|
|
27
27
|
readonly rule: string;
|
|
28
28
|
readonly source: RedLineSource;
|
|
29
29
|
readonly backing: RedLineBacking;
|
|
@@ -20,9 +20,9 @@ export interface AutoCompactInput {
|
|
|
20
20
|
/** Injectable clock for mtime checks (test seam). */
|
|
21
21
|
readonly now?: Date | undefined;
|
|
22
22
|
/**
|
|
23
|
-
* Slice 2026-06-28-
|
|
23
|
+
* Slice 2026-06-28-code-mode-bypass-fix (defect #4): which session
|
|
24
24
|
* the compact should target. Default `'main'` — the orchestrator
|
|
25
|
-
* (peaks-
|
|
25
|
+
* (peaks-code body) runs in the main-session Claude Code window and
|
|
26
26
|
* wants to compress *its* context. Sub-agent shells pass
|
|
27
27
|
* `'sub-agent'` to preserve the legacy shell-spawn behaviour.
|
|
28
28
|
*/
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* 3. If 0.85 ≤ ratio < 0.95 (pre-compact zone): peaks-loop prepares
|
|
17
17
|
* the convergence toolkit (checkpoint + auto-decisions log +
|
|
18
18
|
* IDE-dispatch handle) and surfaces it to the LLM. The LLM
|
|
19
|
-
* DECIDES when to fire `peaks
|
|
19
|
+
* DECIDES when to fire `peaks code auto-compact --execute`;
|
|
20
20
|
* peaks-loop does NOT auto-fire. The toolkit is ready so the
|
|
21
21
|
* LLM doesn't lose context to a last-second `/compact` panic.
|
|
22
22
|
* 4. If ratio < 0.85: skip — return a one-line info row.
|
|
@@ -64,7 +64,7 @@ export function evaluateCompactTrigger(ratio) {
|
|
|
64
64
|
kind: 'pre-compact',
|
|
65
65
|
ratio,
|
|
66
66
|
toolkitReady: true,
|
|
67
|
-
message: `Context at ${(ratio * 100).toFixed(1)}% in pre-compact zone (0.85–0.95). Convergence toolkit is ready; LLM decides when to fire \`peaks
|
|
67
|
+
message: `Context at ${(ratio * 100).toFixed(1)}% in pre-compact zone (0.85–0.95). Convergence toolkit is ready; LLM decides when to fire \`peaks code auto-compact --execute\`.`
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
@@ -139,14 +139,14 @@ function appendAutoDecisionLog(input) {
|
|
|
139
139
|
''
|
|
140
140
|
].join('\n');
|
|
141
141
|
if (!existsSync(logPath)) {
|
|
142
|
-
writeFileSync(logPath, `# peaks-
|
|
142
|
+
writeFileSync(logPath, `# peaks-code auto-decisions log\n${row}`, 'utf8');
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
145
145
|
const existing = readFileSync(logPath, 'utf8');
|
|
146
146
|
writeFileSync(logPath, `${existing}${row}`, 'utf8');
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
|
-
* Slice 2026-06-28-
|
|
149
|
+
* Slice 2026-06-28-code-mode-bypass-fix (defect #4): write the
|
|
150
150
|
* main-session compact intent so the main-session LLM picks it up on
|
|
151
151
|
* its next turn and fires `/compact` in-band. Without this file the
|
|
152
152
|
* orchestrator's "main-session compact" request is invisible to the
|
|
@@ -200,7 +200,7 @@ function writePreCompactCheckpoint(input) {
|
|
|
200
200
|
recentDecisions: [],
|
|
201
201
|
recentArtifactPaths: [],
|
|
202
202
|
gitStatus: '',
|
|
203
|
-
skillsActive: ['peaks-
|
|
203
|
+
skillsActive: ['peaks-code'],
|
|
204
204
|
todoState: []
|
|
205
205
|
};
|
|
206
206
|
writeFileSync(path, JSON.stringify(content, null, 2), 'utf8');
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Design:
|
|
9
9
|
* - **Pure dispatcher contract**: the orchestrator never calls an LLM
|
|
10
10
|
* directly; it returns `DispatchSpec[]` per topological level and lets
|
|
11
|
-
* the caller (the CLI / peaks-
|
|
11
|
+
* the caller (the CLI / peaks-code LLM) execute the per-IDE tool calls.
|
|
12
12
|
* This keeps the orchestrator testable end-to-end with mock sub-agents.
|
|
13
13
|
* - **Join barrier**: between levels, the orchestrator awaits the
|
|
14
14
|
* results of all dispatched leaves and refuses to advance if any
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
* orchestrator writes its public contract to disk via `writeContract`,
|
|
21
21
|
* and the next dispatch's prompt is built with `formatContractInjection`.
|
|
22
22
|
*
|
|
23
|
-
* Why this lives in `services/
|
|
24
|
-
* `peaks-
|
|
23
|
+
* Why this lives in `services/code/`:
|
|
24
|
+
* `peaks-code` is the natural caller. The CLI surface (`peaks sub-agent
|
|
25
25
|
* dispatch --from-dag`) consumes the planner's output but the planner
|
|
26
26
|
* itself is a library.
|
|
27
27
|
*/
|
|
@@ -123,6 +123,6 @@ export declare function runDag(dag: SliceDag, opts: RunDagOptions): Promise<DagR
|
|
|
123
123
|
* cancels in-flight siblings and breaks the loop.
|
|
124
124
|
*
|
|
125
125
|
* Pure planner; same I/O contract as `runDag`. The caller (CLI /
|
|
126
|
-
* peaks-
|
|
126
|
+
* peaks-code LLM) executes the per-IDE tool calls.
|
|
127
127
|
*/
|
|
128
128
|
export declare function runLayeredDag(dag: SliceDag, opts: RunDagOptions): Promise<DagRunResult>;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Design:
|
|
9
9
|
* - **Pure dispatcher contract**: the orchestrator never calls an LLM
|
|
10
10
|
* directly; it returns `DispatchSpec[]` per topological level and lets
|
|
11
|
-
* the caller (the CLI / peaks-
|
|
11
|
+
* the caller (the CLI / peaks-code LLM) execute the per-IDE tool calls.
|
|
12
12
|
* This keeps the orchestrator testable end-to-end with mock sub-agents.
|
|
13
13
|
* - **Join barrier**: between levels, the orchestrator awaits the
|
|
14
14
|
* results of all dispatched leaves and refuses to advance if any
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
* orchestrator writes its public contract to disk via `writeContract`,
|
|
21
21
|
* and the next dispatch's prompt is built with `formatContractInjection`.
|
|
22
22
|
*
|
|
23
|
-
* Why this lives in `services/
|
|
24
|
-
* `peaks-
|
|
23
|
+
* Why this lives in `services/code/`:
|
|
24
|
+
* `peaks-code` is the natural caller. The CLI surface (`peaks sub-agent
|
|
25
25
|
* dispatch --from-dag`) consumes the planner's output but the planner
|
|
26
26
|
* itself is a library.
|
|
27
27
|
*/
|
|
@@ -110,7 +110,7 @@ export function buildDispatchSpec(dag, sliceId, contracts, defaultPrompt) {
|
|
|
110
110
|
'Handoff protocol (REQUIRED — orchestrator depends on this):',
|
|
111
111
|
' 1. Execute the slice to completion.',
|
|
112
112
|
` 2. Write your public contract via \`peaks contract write --project <root> --session-id <sid> --slice-id ${sliceId} --exports <...> --types <...> --signatures <...>\`. The orchestrator will pick it up on the next dispatch run.`,
|
|
113
|
-
' 3. Do NOT re-invoke `peaks sub-agent dispatch --from-dag` yourself — the parent orchestrator (peaks-
|
|
113
|
+
' 3. Do NOT re-invoke `peaks sub-agent dispatch --from-dag` yourself — the parent orchestrator (peaks-code) drives level advancement.',
|
|
114
114
|
'',
|
|
115
115
|
`After your contract is on disk, the orchestrator will auto-advance to the next topological level (if any) by re-invoking \`peaks sub-agent dispatch --from-dag\` with the same batch-id. Your slice will appear in its ancestors via \`formatContractInjection\`.${ancestorFragment}`
|
|
116
116
|
].join('\n');
|
|
@@ -214,7 +214,7 @@ export async function runDag(dag, opts) {
|
|
|
214
214
|
* cancels in-flight siblings and breaks the loop.
|
|
215
215
|
*
|
|
216
216
|
* Pure planner; same I/O contract as `runDag`. The caller (CLI /
|
|
217
|
-
* peaks-
|
|
217
|
+
* peaks-code LLM) executes the per-IDE tool calls.
|
|
218
218
|
*/
|
|
219
219
|
export async function runLayeredDag(dag, opts) {
|
|
220
220
|
try {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* --force-under-job → ALLOW (override path)
|
|
17
17
|
*
|
|
18
18
|
* Karpathy §2 (Simplicity First): ~70 lines, no LLM call, no regex.
|
|
19
|
-
* Pure read + arithmetic. The CLI wrapper in
|
|
19
|
+
* Pure read + arithmetic. The CLI wrapper in code-commands.ts
|
|
20
20
|
* translates the verdict into exit code + JSON envelope.
|
|
21
21
|
*/
|
|
22
22
|
export declare const JOB_NOT_INITIALIZED: "JOB_NOT_INITIALIZED";
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* --force-under-job → ALLOW (override path)
|
|
17
17
|
*
|
|
18
18
|
* Karpathy §2 (Simplicity First): ~70 lines, no LLM call, no regex.
|
|
19
|
-
* Pure read + arithmetic. The CLI wrapper in
|
|
19
|
+
* Pure read + arithmetic. The CLI wrapper in code-commands.ts
|
|
20
20
|
* translates the verdict into exit code + JSON envelope.
|
|
21
21
|
*/
|
|
22
22
|
import { existsSync, readFileSync } from 'node:fs';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The CLI is a *recorder and gate*, not a judge. The LLM makes the
|
|
5
5
|
* semantic call ("is this a Job?") and writes the verdict via
|
|
6
|
-
* `peaks
|
|
6
|
+
* `peaks code detect-job`; this service persists the verdict to
|
|
7
7
|
* `.peaks/_runtime/<sessionId>/job-shape.json` and refuses downstream
|
|
8
8
|
* steps that need a decision when the file is missing.
|
|
9
9
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* The CLI is a *recorder and gate*, not a judge. The LLM makes the
|
|
5
5
|
* semantic call ("is this a Job?") and writes the verdict via
|
|
6
|
-
* `peaks
|
|
6
|
+
* `peaks code detect-job`; this service persists the verdict to
|
|
7
7
|
* `.peaks/_runtime/<sessionId>/job-shape.json` and refuses downstream
|
|
8
8
|
* steps that need a decision when the file is missing.
|
|
9
9
|
*
|
|
@@ -73,7 +73,7 @@ export function readJobShapeDecision(projectRoot, sessionId) {
|
|
|
73
73
|
if (!existsSync(path)) {
|
|
74
74
|
throw new JobShapeDecisionError({
|
|
75
75
|
code: JOB_SHAPE_NOT_DECIDED,
|
|
76
|
-
message: `No Job-shape decision recorded for session ${sessionId}. Run \`peaks
|
|
76
|
+
message: `No Job-shape decision recorded for session ${sessionId}. Run \`peaks code detect-job\` to record a decision.`,
|
|
77
77
|
details: { path }
|
|
78
78
|
});
|
|
79
79
|
}
|
|
@@ -84,7 +84,7 @@ export function readJobShapeDecision(projectRoot, sessionId) {
|
|
|
84
84
|
catch (err) {
|
|
85
85
|
throw new JobShapeDecisionError({
|
|
86
86
|
code: JOB_SHAPE_NOT_DECIDED,
|
|
87
|
-
message: `Job-shape decision file is unreadable for session ${sessionId}. Run \`peaks
|
|
87
|
+
message: `Job-shape decision file is unreadable for session ${sessionId}. Run \`peaks code detect-job\` to re-record.`,
|
|
88
88
|
details: { path, cause: err instanceof Error ? err.message : String(err) }
|
|
89
89
|
});
|
|
90
90
|
}
|
|
@@ -95,7 +95,7 @@ export function readJobShapeDecision(projectRoot, sessionId) {
|
|
|
95
95
|
catch (err) {
|
|
96
96
|
throw new JobShapeDecisionError({
|
|
97
97
|
code: JOB_SHAPE_NOT_DECIDED,
|
|
98
|
-
message: `Job-shape decision file is malformed JSON for session ${sessionId}. Run \`peaks
|
|
98
|
+
message: `Job-shape decision file is malformed JSON for session ${sessionId}. Run \`peaks code detect-job --force\` to overwrite.`,
|
|
99
99
|
details: { path, cause: err instanceof Error ? err.message : String(err) }
|
|
100
100
|
});
|
|
101
101
|
}
|
|
@@ -105,7 +105,7 @@ export function readJobShapeDecision(projectRoot, sessionId) {
|
|
|
105
105
|
catch (err) {
|
|
106
106
|
throw new JobShapeDecisionError({
|
|
107
107
|
code: JOB_SHAPE_NOT_DECIDED,
|
|
108
|
-
message: `Job-shape decision file is schema-invalid for session ${sessionId}. Run \`peaks
|
|
108
|
+
message: `Job-shape decision file is schema-invalid for session ${sessionId}. Run \`peaks code detect-job --force\` to overwrite.`,
|
|
109
109
|
details: { path, cause: err instanceof Error ? err.message : String(err) }
|
|
110
110
|
});
|
|
111
111
|
}
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
* 4 mode values stay in lockstep with the rest of the runtime.
|
|
21
21
|
*/
|
|
22
22
|
import type { SkillPresenceMode } from '../skills/skill-presence-service.js';
|
|
23
|
-
export type
|
|
24
|
-
export declare const
|
|
23
|
+
export type CodeMode = SkillPresenceMode;
|
|
24
|
+
export declare const CODE_MODES: readonly CodeMode[];
|
|
25
25
|
export type HardFloorCategory = 'irreversible-external-side-effect' | 'authentication-credential' | 'multi-day-investment'
|
|
26
26
|
/**
|
|
27
27
|
* v2.15.0 slice 002 AC-4: actions that are past the user's
|
|
@@ -42,8 +42,8 @@ export declare const HARD_FLOOR_CATEGORIES: readonly HardFloorCategory[];
|
|
|
42
42
|
export type GatedStepId = 'step-0.5-openspec-opt-in' | 'step-0.6-audit-goal' | 'step-0.7-resume-detection' | 'step-0.55-1x-upgrade' | 'step-1-mode-select' | 'step-2.5-session-title' | 'phase-2-prd-confirm' | 'phase-3-swarm-gate-b' | 'phase-6-qa-gate-d' | 'phase-10-txt-memory-extract' | 'step-n+1-final-review' | 'frontend-only-mismatch' | 'step-0.75-checkpoint-resume' | 'standards-preflight';
|
|
43
43
|
export declare const GATED_STEPS: readonly GatedStepId[];
|
|
44
44
|
/**
|
|
45
|
-
* Slice 2026-06-28-
|
|
46
|
-
* produced this decision. The LLM-side caller (peaks-
|
|
45
|
+
* Slice 2026-06-28-code-mode-bypass-fix: the kind of gate that
|
|
46
|
+
* produced this decision. The LLM-side caller (peaks-code body) reads
|
|
47
47
|
* this to distinguish "you paused because the user must choose the
|
|
48
48
|
* mode" (`mode-selection-itself`) from "you paused because the mode
|
|
49
49
|
* you already chose is assisted/strict" (`mode-driven`) from "you
|
|
@@ -63,23 +63,23 @@ export declare const GATED_STEPS: readonly GatedStepId[];
|
|
|
63
63
|
export type GateKind = 'mode-selection-itself' | 'mode-driven' | 'hard-floor';
|
|
64
64
|
export interface GateDecision {
|
|
65
65
|
readonly shouldPause: boolean;
|
|
66
|
-
/** Human-readable rationale; surfaces in `peaks
|
|
66
|
+
/** Human-readable rationale; surfaces in `peaks code should-pause --json` */
|
|
67
67
|
readonly reason: string;
|
|
68
68
|
/** Hard-floor override applied? Surfaces in audit log when true */
|
|
69
69
|
readonly hardFloorCategory?: HardFloorCategory;
|
|
70
|
-
/** Slice 2026-06-28-
|
|
70
|
+
/** Slice 2026-06-28-code-mode-bypass-fix: kind of gate that produced
|
|
71
71
|
* this decision. Always present; defaults to `'mode-driven'` for the
|
|
72
72
|
* assisted/strict pause branch. */
|
|
73
73
|
readonly gateKind: GateKind;
|
|
74
74
|
}
|
|
75
|
-
export declare function
|
|
75
|
+
export declare function isCodeMode(value: string): value is CodeMode;
|
|
76
76
|
export declare function isHardFloorCategory(value: string): value is HardFloorCategory;
|
|
77
77
|
/**
|
|
78
78
|
* `true` when the current mode should auto-proceed (skip the
|
|
79
79
|
* AskUserQuestion round-trip). Mirrors D5.a: "recommended = chosen
|
|
80
80
|
* in full-auto / swarm; always log, never silently skip".
|
|
81
81
|
*/
|
|
82
|
-
export declare function shouldAutoProceed(mode:
|
|
82
|
+
export declare function shouldAutoProceed(mode: CodeMode): boolean;
|
|
83
83
|
/**
|
|
84
84
|
* Should the LLM emit an AskUserQuestion at `step` given `mode`?
|
|
85
85
|
* Pure function: no IO, no LLM call. The LLM-side caller passes the
|
|
@@ -98,7 +98,7 @@ export declare function shouldAutoProceed(mode: SoloMode): boolean;
|
|
|
98
98
|
/**
|
|
99
99
|
* v2.15.0 slice 002 AC-4: the 5 action identifiers that qualify as
|
|
100
100
|
* commit-boundary side effects. Matched by the LLM-side caller
|
|
101
|
-
* (peaks-
|
|
101
|
+
* (peaks-code body / peaks-rd fork agent) when it is about to run a
|
|
102
102
|
* Bash command that maps to one of these. Set `commitBoundaryAction:
|
|
103
103
|
* true` on the `shouldPauseAtGate` call to trigger the hard-floor
|
|
104
104
|
* override.
|
|
@@ -107,7 +107,7 @@ export type CommitBoundaryActionId = 'git-push' | 'git-tag' | 'npm-publish' | 'n
|
|
|
107
107
|
export declare const COMMIT_BOUNDARY_ACTIONS: readonly CommitBoundaryActionId[];
|
|
108
108
|
export declare function isCommitBoundaryAction(value: string): value is CommitBoundaryActionId;
|
|
109
109
|
export declare function shouldPauseAtGate(opts: {
|
|
110
|
-
mode:
|
|
110
|
+
mode: CodeMode;
|
|
111
111
|
step: GatedStepId;
|
|
112
112
|
hardFloorCategory?: HardFloorCategory | undefined;
|
|
113
113
|
/**
|
|
@@ -125,7 +125,7 @@ export declare function shouldPauseAtGate(opts: {
|
|
|
125
125
|
* system. The CLI / LLM is responsible for appending.
|
|
126
126
|
*/
|
|
127
127
|
export declare function formatAutoProceedLogLine(opts: {
|
|
128
|
-
mode:
|
|
128
|
+
mode: CodeMode;
|
|
129
129
|
step: GatedStepId;
|
|
130
130
|
recommendedOption: string;
|
|
131
131
|
hardFloorCategory?: HardFloorCategory | undefined;
|