peaks-loop 3.1.2 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +62 -12
- package/CHANGELOG.md +148 -116
- package/README-en.md +58 -240
- package/README.md +49 -325
- package/agents/karpathy-reviewer.md +3 -3
- package/dist/src/cli/cli-helpers.d.ts +18 -0
- package/dist/src/cli/cli-helpers.js +8 -0
- package/dist/src/cli/commands/adapter-commands.d.ts +30 -0
- package/dist/src/cli/commands/adapter-commands.js +35 -0
- package/dist/src/cli/commands/{solo-commands.d.ts → code-commands.d.ts} +25 -25
- package/dist/src/cli/commands/{solo-commands.js → code-commands.js} +82 -82
- package/dist/src/cli/commands/context-commands.d.ts +1 -1
- package/dist/src/cli/commands/context-commands.js +1 -1
- package/dist/src/cli/commands/contract-commands.d.ts +1 -1
- package/dist/src/cli/commands/contract-commands.js +1 -1
- package/dist/src/cli/commands/core/session-command.js +12 -0
- package/dist/src/cli/commands/core/skill-command.js +4 -4
- package/dist/src/cli/commands/dispatch-commands.js +2 -2
- package/dist/src/cli/commands/dispatch-from-dag.js +1 -1
- package/dist/src/cli/commands/hook-handle.js +7 -7
- package/dist/src/cli/commands/job-commands.js +7 -7
- package/dist/src/cli/commands/observability-commands.js +1 -1
- package/dist/src/cli/commands/perf-audit-commands.js +2 -2
- package/dist/src/cli/commands/security-audit-commands.js +2 -2
- package/dist/src/cli/commands/sediment-commands.d.ts +80 -0
- package/dist/src/cli/commands/sediment-commands.js +640 -0
- package/dist/src/cli/commands/session-auto-compact-hook-command.js +2 -2
- package/dist/src/cli/commands/session-migrate-skill-name.d.ts +17 -0
- package/dist/src/cli/commands/session-migrate-skill-name.js +41 -0
- package/dist/src/cli/commands/skill-visibility.d.ts +8 -0
- package/dist/src/cli/commands/skill-visibility.js +63 -0
- package/dist/src/cli/commands/slice-commands.js +2 -2
- package/dist/src/cli/commands/sub-agent-commands.d.ts +1 -1
- package/dist/src/cli/commands/sub-agent-commands.js +1 -1
- package/dist/src/cli/commands/sub-agent-shared.d.ts +1 -1
- package/dist/src/cli/commands/understand-commands.js +1 -1
- package/dist/src/cli/commands/upgrade-commands.d.ts +1 -1
- package/dist/src/cli/commands/upgrade-commands.js +3 -3
- package/dist/src/cli/commands/user-touchpoint-commands.d.ts +4 -4
- package/dist/src/cli/commands/user-touchpoint-commands.js +15 -15
- package/dist/src/cli/commands/verdict-aggregate-command.d.ts +1 -1
- package/dist/src/cli/commands/verdict-aggregate-command.js +2 -2
- package/dist/src/cli/commands/workflow-commands.js +23 -23
- package/dist/src/cli/commands/workspace/init-command.d.ts +3 -3
- package/dist/src/cli/commands/workspace/init-command.js +7 -7
- package/dist/src/cli/program.js +24 -7
- package/dist/src/services/adapter/adapter.d.ts +27 -0
- package/dist/src/services/adapter/adapter.js +5 -0
- package/dist/src/services/adapter/auto-adapter.d.ts +11 -0
- package/dist/src/services/adapter/auto-adapter.js +15 -0
- package/dist/src/services/adapter/claude-adapter.d.ts +14 -0
- package/dist/src/services/adapter/claude-adapter.js +40 -0
- package/dist/src/services/adapter/codex-adapter.d.ts +14 -0
- package/dist/src/services/adapter/codex-adapter.js +14 -0
- package/dist/src/services/adapter/copilot-adapter.d.ts +14 -0
- package/dist/src/services/adapter/copilot-adapter.js +14 -0
- package/dist/src/services/artifacts/repair-cycle-service.js +1 -1
- package/dist/src/services/audit/enforcers/active-skill-resolver.d.ts +1 -1
- package/dist/src/services/audit/enforcers/active-skill-resolver.js +1 -1
- package/dist/src/services/audit/enforcers/{solo-code-ban.d.ts → code-ban.d.ts} +6 -6
- package/dist/src/services/audit/enforcers/{solo-code-ban.js → code-ban.js} +6 -6
- package/dist/src/services/audit/red-line-catalog.d.ts +2 -2
- package/dist/src/services/audit/red-line-catalog.js +6 -6
- package/dist/src/services/audit/scanners/skills-tree-scanner.js +22 -0
- package/dist/src/services/audit/types.d.ts +2 -2
- package/dist/src/services/{solo → code}/auto-compact-orchestrator.d.ts +2 -2
- package/dist/src/services/{solo → code}/auto-compact-orchestrator.js +5 -5
- package/dist/src/services/{solo → code}/dag-orchestrator.d.ts +4 -4
- package/dist/src/services/{solo → code}/dag-orchestrator.js +5 -5
- package/dist/src/services/{solo → code}/emit-handoff.d.ts +1 -1
- package/dist/src/services/{solo → code}/emit-handoff.js +1 -1
- package/dist/src/services/{solo → code}/job-shape-decision.d.ts +1 -1
- package/dist/src/services/{solo → code}/job-shape-decision.js +5 -5
- package/dist/src/services/{solo → code}/mode-gate.d.ts +11 -11
- package/dist/src/services/{solo → code}/mode-gate.js +5 -5
- package/dist/src/services/{solo → code}/post-compact-detector.d.ts +3 -3
- package/dist/src/services/{solo → code}/post-compact-detector.js +6 -6
- package/dist/src/services/{solo → code}/status-line-renderer.d.ts +4 -4
- package/dist/src/services/{solo → code}/step-08-gate.d.ts +4 -4
- package/dist/src/services/{solo → code}/step-08-gate.js +4 -4
- package/dist/src/services/{solo → code}/user-touchpoint-classifier.d.ts +1 -1
- package/dist/src/services/{solo → code}/user-touchpoint-classifier.js +1 -1
- package/dist/src/services/context/auto-compact-dispatcher.d.ts +3 -3
- package/dist/src/services/context/auto-compact-dispatcher.js +2 -2
- package/dist/src/services/context/auto-compact-types.d.ts +1 -1
- package/dist/src/services/dispatch/batch-counter.js +1 -1
- package/dist/src/services/dispatch/leak-detector.js +1 -1
- package/dist/src/services/dispatch/slice-dag.d.ts +2 -2
- package/dist/src/services/dispatch/test-tool-detection.d.ts +1 -1
- package/dist/src/services/dispatch/test-tool-detection.js +1 -1
- package/dist/src/services/doctor/doctor-service.js +2 -2
- package/dist/src/services/feedback/feedback-promotion-service.js +2 -2
- package/dist/src/services/job/job-progress-store.d.ts +1 -1
- package/dist/src/services/job/job-progress-store.js +1 -1
- package/dist/src/services/job/job-resource-snapshot.js +29 -1
- package/dist/src/services/memory/project-memory-service.js +1 -1
- package/dist/src/services/migrate-skill-name/migrate.d.ts +17 -0
- package/dist/src/services/migrate-skill-name/migrate.js +152 -0
- package/dist/src/services/migrate-skill-name/schema.d.ts +42 -0
- package/dist/src/services/migrate-skill-name/schema.js +25 -0
- package/dist/src/services/observability/aggregation.d.ts +1 -1
- package/dist/src/services/observability/aggregation.js +1 -1
- package/dist/src/services/perf/perf-baseline-service.d.ts +1 -1
- package/dist/src/services/perf/perf-baseline-service.js +1 -1
- package/dist/src/services/prd/handoff-types.d.ts +1 -1
- package/dist/src/services/prd/handoff-types.js +1 -1
- package/dist/src/services/preferences/preferences-service.d.ts +1 -1
- package/dist/src/services/preferences/preferences-types.d.ts +1 -1
- package/dist/src/services/progress/progress-service.d.ts +1 -1
- package/dist/src/services/progress/progress-service.js +1 -1
- package/dist/src/services/rd/standards-diagnostic.d.ts +1 -1
- package/dist/src/services/rd/standards-diagnostic.js +3 -3
- package/dist/src/services/recommendations/capability-seed-items.js +1 -1
- package/dist/src/services/recommendations/capability-seed-mappings.js +1 -1
- package/dist/src/services/recommendations/recommendation-service.js +1 -1
- package/dist/src/services/refactor/refactor-service.d.ts +1 -1
- package/dist/src/services/sc/sc-service.js +1 -1
- package/dist/src/services/sediment/dispose-confirm.d.ts +9 -0
- package/dist/src/services/sediment/dispose-confirm.js +5 -0
- package/dist/src/services/sediment/json-schema.d.ts +247 -0
- package/dist/src/services/sediment/json-schema.js +26 -0
- package/dist/src/services/sediment/manifest-lint.d.ts +13 -0
- package/dist/src/services/sediment/manifest-lint.js +11 -0
- package/dist/src/services/sediment/pool-paths.d.ts +22 -0
- package/dist/src/services/sediment/pool-paths.js +25 -0
- package/dist/src/services/sediment/pool-read.d.ts +20 -0
- package/dist/src/services/sediment/pool-read.js +73 -0
- package/dist/src/services/sediment/pool-rebuild-index.d.ts +15 -0
- package/dist/src/services/sediment/pool-rebuild-index.js +28 -0
- package/dist/src/services/sediment/pool-write.d.ts +14 -0
- package/dist/src/services/sediment/pool-write.js +25 -0
- package/dist/src/services/sediment/promotion-gate.d.ts +12 -0
- package/dist/src/services/sediment/promotion-gate.js +20 -0
- package/dist/src/services/sediment/types.d.ts +52 -0
- package/dist/src/services/sediment/types.js +1 -0
- package/dist/src/services/session/binding-store.d.ts +1 -1
- package/dist/src/services/session/binding-store.js +1 -1
- package/dist/src/services/session/caller-id-types.d.ts +1 -1
- package/dist/src/services/session/session-manager.d.ts +1 -1
- package/dist/src/services/session/session-manager.js +1 -1
- package/dist/src/services/signal/cancel-handler.js +3 -3
- package/dist/src/services/skill/resume-detector.js +2 -2
- package/dist/src/services/skill/skill-scheduler.d.ts +1 -1
- package/dist/src/services/skill/skill-scheduler.js +1 -1
- package/dist/src/services/skillhub/release-diff.d.ts +18 -0
- package/dist/src/services/skillhub/release-diff.js +38 -0
- package/dist/src/services/skillhub/release-export.d.ts +8 -0
- package/dist/src/services/skillhub/release-export.js +31 -0
- package/dist/src/services/skillhub/release-gc-blobs.d.ts +13 -0
- package/dist/src/services/skillhub/release-gc-blobs.js +32 -0
- package/dist/src/services/skillhub/release-import.d.ts +7 -0
- package/dist/src/services/skillhub/release-import.js +59 -0
- package/dist/src/services/skillhub/release-retain.d.ts +23 -0
- package/dist/src/services/skillhub/release-retain.js +89 -0
- package/dist/src/services/skillhub/sqlite-store.d.ts +22 -0
- package/dist/src/services/skillhub/sqlite-store.js +47 -0
- package/dist/src/services/skillhub/tar-runtime.d.ts +21 -0
- package/dist/src/services/skillhub/tar-runtime.js +91 -0
- package/dist/src/services/skillhub/types.d.ts +105 -0
- package/dist/src/services/skillhub/types.js +1 -0
- package/dist/src/services/skills/skill-conformance-service.js +8 -5
- package/dist/src/services/skills/skill-presence-service.d.ts +5 -5
- package/dist/src/services/skills/skill-presence-service.js +2 -2
- package/dist/src/services/skills/skill-registry.js +27 -0
- package/dist/src/services/skills/skill-runbook-service.js +2 -2
- package/dist/src/services/slice/slice-check-service.js +1 -1
- package/dist/src/services/slice/slice-check-types.d.ts +1 -1
- package/dist/src/services/slice/slice-check-types.js +1 -1
- package/dist/src/services/slice/slice-decompose-types.d.ts +1 -1
- package/dist/src/services/slice/slice-decompose-types.js +1 -1
- package/dist/src/services/standards/missing-standards-detector.d.ts +1 -1
- package/dist/src/services/standards/missing-standards-detector.js +1 -1
- package/dist/src/services/standards/project-standards-service.d.ts +1 -1
- package/dist/src/services/standards/project-standards-service.js +4 -4
- package/dist/src/services/understand/understand-types.d.ts +1 -1
- package/dist/src/services/upgrade/1x-detector-service.js +2 -2
- package/dist/src/services/upgrade/upgrade-service.d.ts +34 -0
- package/dist/src/services/upgrade/upgrade-service.js +52 -30
- package/dist/src/services/verdict/verdict-aggregator.d.ts +1 -1
- package/dist/src/services/workflow/pipeline-verify-service.d.ts +1 -1
- package/dist/src/services/workflow/pipeline-verify-service.js +3 -3
- package/dist/src/services/workflow/workflow-autonomous-service.d.ts +3 -3
- package/dist/src/services/workflow/workflow-autonomous-service.js +2 -2
- package/dist/src/services/workflow/workflow-router-service.d.ts +7 -7
- package/dist/src/services/workflow/workflow-router-service.js +33 -33
- package/dist/src/services/workspace/claude-settings-template.d.ts +2 -2
- package/dist/src/services/workspace/claude-settings-template.js +7 -7
- package/dist/src/services/workspace/workspace-claude-settings-materializer.d.ts +1 -1
- package/dist/src/services/workspace/workspace-claude-settings-materializer.js +1 -1
- package/dist/src/services/workspace/workspace-service.d.ts +4 -4
- package/dist/src/services/workspace/workspace-service.js +2 -2
- package/dist/src/shared/paths.d.ts +1 -1
- package/dist/src/shared/paths.js +1 -1
- package/dist/src/shared/version.d.ts +1 -1
- package/dist/src/shared/version.js +1 -1
- package/dist/src/skills/peaks-maker/index.d.ts +5 -0
- package/dist/src/skills/peaks-maker/index.js +32 -0
- package/output-styles/peaks-skill-swarm.md +3 -3
- package/package.json +8 -3
- package/scripts/install-skills.mjs +29 -4
- package/skills/{peaks-prd → bee/peaks-prd}/SKILL.md +8 -2
- package/skills/{peaks-prd → bee/peaks-prd}/references/workflow.md +1 -1
- package/skills/{peaks-qa → bee/peaks-qa}/SKILL.md +10 -4
- package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-per-request.md +3 -3
- package/skills/{peaks-qa → bee/peaks-qa}/references/browser-validation-contracts.md +2 -2
- package/skills/{peaks-qa → bee/peaks-qa}/references/external-capability-guidance.md +1 -1
- package/skills/{peaks-qa → bee/peaks-qa}/references/qa-fanout-contract.md +3 -3
- package/skills/{peaks-qa → bee/peaks-qa}/references/qa-sub-agent-dispatch.md +7 -7
- package/skills/{peaks-rd → bee/peaks-rd}/SKILL.md +13 -6
- package/skills/{peaks-rd → bee/peaks-rd}/references/browser-self-test-contracts.md +1 -1
- package/skills/{peaks-rd → bee/peaks-rd}/references/mock-data-placement.md +1 -1
- package/skills/{peaks-rd → bee/peaks-rd}/references/parallel-review-fanout.md +1 -1
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-fanout-contracts.md +1 -1
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-runbook.md +2 -2
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-sub-agent-dispatch.md +13 -13
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-transition-gates.md +2 -2
- package/skills/{peaks-rd → bee/peaks-rd}/references/skill-presence-and-title.md +1 -1
- package/skills/{peaks-reviewer → bee/peaks-reviewer}/SKILL.md +2 -2
- package/skills/{peaks-sc → bee/peaks-sc}/SKILL.md +8 -2
- package/skills/{peaks-txt → bee/peaks-txt}/SKILL.md +11 -5
- package/skills/{peaks-ui → bee/peaks-ui}/SKILL.md +19 -13
- package/skills/peaks-audit/SKILL.md +1 -1
- package/skills/{peaks-solo → peaks-code}/SKILL.md +29 -29
- package/skills/{peaks-solo → peaks-code}/references/a2a-artifact-mapping.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/anchoring-and-session-info.md +6 -6
- package/skills/{peaks-solo → peaks-code}/references/artifact-contracts.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/boundaries.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/browser-workflow.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/codegraph-orchestration.md +1 -1
- package/skills/peaks-code/references/command-migration.md +3 -0
- package/skills/{peaks-solo → peaks-code}/references/completion-handoff.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/context-governance.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/dag-orchestrator.md +7 -7
- package/skills/{peaks-solo → peaks-code}/references/external-references.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/fanout-mandatory.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/fast-mode.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/frontend-only-mode.md +10 -10
- package/skills/{peaks-solo → peaks-code}/references/job-loop.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/local-artifact-workspace.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/micro-cycle.md +23 -23
- package/skills/{peaks-solo → peaks-code}/references/mode-selection-with-stale-presence.md +16 -16
- package/skills/{peaks-solo → peaks-code}/references/mode-selection.md +4 -4
- package/skills/{peaks-solo → peaks-code}/references/openspec-workflow.md +17 -17
- package/skills/{peaks-solo → peaks-code}/references/periodic-checkpoint.md +4 -4
- package/skills/{peaks-solo → peaks-code}/references/project-scan-checklist.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/quality-gate-cheatsheet.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/refactor-mode.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/resume-detection.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/runbook.md +20 -20
- package/skills/{peaks-solo → peaks-code}/references/skill-presence-and-title.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/standards-preflight.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/step-0-55-1x-detection.md +6 -6
- package/skills/{peaks-solo → peaks-code}/references/step-0-8-gate.md +11 -11
- package/skills/{peaks-solo → peaks-code}/references/sub-agent-dispatch.md +17 -17
- package/skills/{peaks-solo → peaks-code}/references/swarm-dispatch-contract.md +22 -22
- package/skills/{peaks-solo → peaks-code}/references/workflow-gates-and-types.md +4 -4
- package/skills/{peaks-solo → peaks-code}/references/workflow.md +5 -5
- package/skills/peaks-doctor/SKILL.md +1 -1
- package/skills/peaks-doctor/references/doctor-check-catalog.md +1 -1
- package/skills/peaks-final-review/SKILL.md +3 -3
- package/skills/peaks-final-review/references/4-dimensions.md +1 -1
- package/skills/peaks-ide/SKILL.md +1 -1
- package/skills/{peaks-solo-resume → peaks-resume}/SKILL.md +15 -15
- package/skills/peaks-sop/SKILL.md +1 -1
- package/skills/{peaks-solo-status → peaks-status}/SKILL.md +14 -14
- package/skills/{peaks-solo-test → peaks-test}/SKILL.md +12 -12
- package/skills/peaks-solo/references/command-migration.md +0 -3
- /package/dist/src/services/{solo → code}/batch-heartbeat-poller.d.ts +0 -0
- /package/dist/src/services/{solo → code}/batch-heartbeat-poller.js +0 -0
- /package/dist/src/services/{solo → code}/status-line-renderer.js +0 -0
- /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/SKILL.md +0 -0
- /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/references/audit-protocol.md +0 -0
- /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-per-request.md +0 -0
- /package/skills/{peaks-prd → bee/peaks-prd}/references/command-migration.md +0 -0
- /package/skills/{peaks-prd → bee/peaks-prd}/references/prd-for-multi-pass.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/codegraph-regression-focus.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/command-migration.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/openspec-validation-gate.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-compact-handoff.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-context-governance.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-gstack-integration.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-local-artifacts.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-matt-pocock-integration.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-perf-test-plan.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-refactor-role.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-runbook.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-security-test-plan.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-skill-presence.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-standards-preflight.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-transition-gates.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/reading-handoff-frontmatter.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/regression-gates.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/requirement-boundary-recheck.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/test-case-generation.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/test-report-output.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-and-standards-output.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-per-request.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/browser-action-wrapper.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/code-reviewer-4dim-hint.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/codegraph-project-analysis.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/command-migration.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/compact-handoff.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/external-references.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/frontend-project-generation.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/karpathy-reviewer-prompt.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/library-version-awareness.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/mandatory-perf-baseline.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/matt-pocock-integration.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/ocr-integration.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/openspec-cli.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-context-governance.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-gstack-integration.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-standards-preflight.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/reading-v2-slice-results.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/refactor-workflow.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/v2-12-fanout-collapse.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/writing-handoff-frontmatter.md +0 -0
- /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-prompt.md +0 -0
- /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-schema.md +0 -0
- /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-retention.md +0 -0
- /package/skills/{peaks-sc → bee/peaks-sc}/references/command-migration.md +0 -0
- /package/skills/{peaks-sc → bee/peaks-sc}/references/openspec-commit-boundaries.md +0 -0
- /package/skills/{peaks-security-audit → bee/peaks-security-audit}/SKILL.md +0 -0
- /package/skills/{peaks-security-audit → bee/peaks-security-audit}/references/audit-protocol.md +0 -0
- /package/skills/{peaks-txt → bee/peaks-txt}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-txt → bee/peaks-txt}/references/command-migration.md +0 -0
- /package/skills/{peaks-txt → bee/peaks-txt}/references/context-capsule.md +0 -0
- /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-per-request.md +0 -0
- /package/skills/{peaks-ui → bee/peaks-ui}/references/command-migration.md +0 -0
- /package/skills/{peaks-ui → bee/peaks-ui}/references/workflow.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/checkpoint-resume.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/cross-date-session-check.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/envelope-contract.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/existing-system-extraction.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/external-skill-invocation.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/gstack-integration.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/headroom-integration.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/playwright-mcp-multi-terminal.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/project-memory-loading.md +0 -0
package/README.md
CHANGED
|
@@ -1,365 +1,89 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
# ⛰️ Peaks
|
|
4
|
-
|
|
5
|
-
<img src="https://readme-typing-svg.demolab.com?font=Fira+Code&weight=700&size=22&duration=3000&pause=800&color=6366F1¢er=true&vCenter=true&multiline=true&width=720&height=110&lines=peaks-loop%3A%20跨%20AI%20IDE%20的工程门禁与编排;11%20个%E2%9A%99%EF%B8%8F%20工作流技能%20%2B%20%E2%9A%96%EF%B8%8F%20可执行门禁;%E2%9C%89%EF%B8%8F%20%E2%9A%96%EF%B8%8F%20%E2%9C%89%EF%B8%8F%20%E2%9A%91%EF%B8%8F%20%E2%9A%96%EF%B8%8F%20%E2%9C%89%EF%B8%8F%20%E2%9A%91%EF%B8%8F%20门禁%20%2B%20审计%20%2B%20跨%20IDE%20适配" alt="peaks-loop tagline typing animation" />
|
|
1
|
+
# Peaks Loop
|
|
6
2
|
|
|
7
3
|
[English](./README-en.md) | **简体中文**
|
|
8
4
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<td align="center" width="180"><b>⚡ BASED ON</b></td>
|
|
13
|
-
<td align="center" width="180"><b>📚 SKILLS.SH</b></td>
|
|
14
|
-
</tr>
|
|
15
|
-
<tr>
|
|
16
|
-
<td align="center"><a href="https://github.com/SquabbyZ/peaks-loop">peaks-loop / 首页</a></td>
|
|
17
|
-
<td align="center">13 Skills + Cross-IDE</td>
|
|
18
|
-
<td align="center"><a href="https://skills.sh/SquabbyZ/peaks-loop">在 skills.sh 收录</a></td>
|
|
19
|
-
</tr>
|
|
20
|
-
<tr><td colspan="3"> </td></tr>
|
|
21
|
-
<tr>
|
|
22
|
-
<td align="center" width="180"><b>⭐ STARS</b></td>
|
|
23
|
-
<td align="center" width="180"><b>📦 VERSION</b></td>
|
|
24
|
-
<td align="center" width="180"><b>📄 LICENSE</b></td>
|
|
25
|
-
</tr>
|
|
26
|
-
<tr>
|
|
27
|
-
<td align="center"><a href="https://github.com/SquabbyZ/peaks-loop/stargazers"><img src="https://img.shields.io/github/stars/SquabbyZ/peaks-loop?style=for-the-badge&logo=github&logoColor=white" alt="stars" /></a></td>
|
|
28
|
-
<td align="center"><a href="https://www.npmjs.com/package/peaks-loop"><img src="https://img.shields.io/npm/v/peaks-loop?style=for-the-badge&logo=npm&logoColor=white&color=CB3837" alt="npm version" /></a></td>
|
|
29
|
-
<td align="center"><a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge" alt="license" /></a></td>
|
|
30
|
-
</tr>
|
|
31
|
-
<tr><td colspan="3"> </td></tr>
|
|
32
|
-
<tr>
|
|
33
|
-
<td align="center" width="180"><b>🧪 TESTS</b></td>
|
|
34
|
-
<td align="center" width="180"><b>🔧 LANG</b></td>
|
|
35
|
-
<td align="center" width="180"><b>📥 DOWNLOADS</b></td>
|
|
36
|
-
</tr>
|
|
37
|
-
<tr>
|
|
38
|
-
<td align="center"><b>2,800+</b></td>
|
|
39
|
-
<td align="center"><b>TypeScript</b></td>
|
|
40
|
-
<td align="center"><a href="https://www.npmjs.com/package/peaks-loop"><img src="https://img.shields.io/npm/dm/peaks-loop?style=for-the-badge&logo=npm&logoColor=white&color=CB3837" alt="downloads" /></a></td>
|
|
41
|
-
</tr>
|
|
42
|
-
<tr><td colspan="3"> </td></tr>
|
|
43
|
-
<tr>
|
|
44
|
-
<td align="center" width="180"><b>🌐 中文</b></td>
|
|
45
|
-
<td align="center" width="180"><b>🚀 QUICK START</b></td>
|
|
46
|
-
<td align="center" width="180"><b>👁️ VISITORS</b></td>
|
|
47
|
-
</tr>
|
|
48
|
-
<tr>
|
|
49
|
-
<td align="center"><a href="./README.md">简体中文</a></td>
|
|
50
|
-
<td align="center"><a href="#-30-秒跑起来">30 秒跑起来 →</a></td>
|
|
51
|
-
<td align="center"><img src="https://komarev.com/ghpvc/?username=SquabbyZ&repo=peaks-loop&label=views&color=blue&style=for-the-badge" alt="visitors" /></td>
|
|
52
|
-
</tr>
|
|
53
|
-
</table>
|
|
54
|
-
|
|
55
|
-
<img src="https://github-readme-streak-stats.herokuapp.com?user=SquabbyZ&repo=peaks-loop&theme=radical&hide_border=true&date_format=j%20M%5B%20Y%5D" alt="GitHub Streak Stats" />
|
|
56
|
-
|
|
57
|
-
[安装](#-30-秒跑起来) · [5 分钟上手](#-5-分钟上手) · [技能家族](#-11-个技能家族) · [杀手锏:不可绕过的门禁](#-杀手锏不可绕过的门禁)
|
|
58
|
-
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## 🤔 为什么是 Peaks
|
|
64
|
-
|
|
65
|
-
> 你把 `git push --force`、`rm -rf`、`npm publish`、`DROP TABLE` 这类不可逆动作**写进 CLAUDE.md** 吗?
|
|
66
|
-
> LLM 不会真听。它有 99% 的概率会"尊重你的偏好",然后在下一次对话里忘掉。
|
|
67
|
-
> **CI 只能在合并时拦;规则只能靠自觉;只有门禁(gates)能在 agent 拔刀的瞬间摁住它。**
|
|
68
|
-
|
|
69
|
-
Peaks 把 AI IDE 里的"工程团队"建模成 13 个工作流技能 + 一组**可执行的门禁**:
|
|
70
|
-
|
|
71
|
-
- 🧭 **技能(skills)**——`peaks-solo` 编排,`peaks-prd/rd/qa/ui/sc/txt/sop` 各管一段;LLM 按任务自动选对的人
|
|
72
|
-
- 🚧 **门禁(gates)**——SOP 在每个 phase 上挂"可检查条件"(文件存在 / grep 命中 / 命令退出码),不满足就把 `git push` 在 agent 自己面前拦下——**连 `--dangerously-skip-permissions` 都绕不过**
|
|
73
|
-
- 🧠 **项目记忆(memory)**——`.peaks/memory/` 把决策、踩坑、约定落盘到 git 一起被 commit;下个 session 接手不用问"为什么这么写"
|
|
74
|
-
- 🌐 **跨 IDE**——一个 CLI 适配 Claude Code / Trae / Cursor / Codex / Qoder;技能注册到 IDE 原生格式
|
|
75
|
-
- 📦 **生态可发现**——13 个技能同样发布到 [skills.sh](https://skills.sh),按需 `npx skills add` 单点装
|
|
76
|
-
|
|
77
|
-
## 🚀 30 秒跑起来
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
# 1. 装 CLI
|
|
81
|
-
npm install -g peaks-loop
|
|
82
|
-
|
|
83
|
-
# 2. 在你的项目里打开 Claude Code
|
|
84
|
-
cd /path/to/your-project && claude
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
> **v2.13.3 提示**:发布新版本时 `npm publish` 会在 publish 前自动跑 `pnpm run build`(`package.json` 的 `prepublishOnly` hook 走 `scripts/prepublish-build.mjs`),确保 `bin/peaks.js` 永远带最新 dist。**发布前不要手动跳过这一步**——2.13.2 dogfood 抓过 `bin/peaks.js` 指 Jun 13 旧 dist 的事故。
|
|
88
|
-
|
|
89
|
-
# 3. 让 AI 干活
|
|
90
|
-
> peaks-solo 帮我给登录页加 OAuth 回调
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
完了。第一次跑 peaks 会自动建 `.peaks/` 工作区 + 扫一次项目原型 + 把任务分给对的技能(PRD → 工程切片 → UI → QA → 变更控制 → 知识压缩),中间产物全部落盘。**日常使用 1 个技能(`peaks-solo`)覆盖 ≥ 90% 的需求**。v2.13.1 起 5 套异质信号(security-audit / perf-audit / karpathy / mut / qa)会按 `block > return-to-rd > warn > pass` precedence 汇聚成单一 verdict,repair-loop 触发时打印 `re-run reason: { source, signal, file, line, hint }` 作为再决策依据。v2.13.2 起 `peaks verdict aggregate --from-rid <rid>` 把这套汇聚逻辑直接暴露为 CLI 子命令,并修复了 v2.13.1 跨 source dedup bug(之前 security + perf 报同处问题会被记为 2 条 reason,现在合并为 1 条且 sources 字段列出所有 source)。
|
|
94
|
-
|
|
95
|
-
## 🧠 peaks-context — 上下文构建模块 (v3.0)
|
|
96
|
-
|
|
97
|
-
peaks-context 是 CLI 强制执行的上下文采集器,**不再依赖 LLM 自主"读 package.json"**。
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
peaks context build --goal "<你的需求>" --project . --audience peaks-rd --out context.json
|
|
101
|
-
peaks context validate context.json
|
|
102
|
-
peaks context inspect context.json
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**承诺**:deps 锁版本 antd@5.21.0 → context.json 绝不返回 6.x API 文档。
|
|
106
|
-
详见 [design spec §4.1](../../docs/superpowers/specs/2026-06-21-context-audit-redesign-design.md)。
|
|
107
|
-
|
|
108
|
-
## 🧬 peaks-mut — 测试假绿拦截 (v3.0)
|
|
109
|
-
|
|
110
|
-
peaks-mut 通过变异测试 + 断言有效性扫描拦截测试假绿:
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
peaks mut run --project . --test-files src/A.test.ts --input-sig <TACT.sig> --out mut-report.json
|
|
114
|
-
peaks mut mutants --in mut-report.json
|
|
115
|
-
peaks mut asserts --in mut-report.json
|
|
116
|
-
peaks mut report --in mut-report.json
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
**默认阈值**:变异杀灭率 ≥ 80%、弱断言比例 ≤ 5%。详见 [design spec §4.2](../../docs/superpowers/specs/2026-06-21-context-audit-redesign-design.md)。
|
|
120
|
-
|
|
121
|
-
## 🎯 peaks-rd 双阶段 (v3.0)
|
|
122
|
-
|
|
123
|
-
peaks-rd 现在拆成两阶段:
|
|
124
|
-
|
|
125
|
-
1. **战略审计**:写 `strategy.md` + `STRAT.sig`(根因分析 + 影响面)
|
|
126
|
-
2. **战术审计**:写 `impl.json` + `TACT.sig`,**AST 硬门禁拦截版本错配的 API 调用**
|
|
127
|
-
|
|
128
|
-
详见 [design spec §4.2](../../docs/superpowers/specs/2026-06-21-context-audit-redesign-design.md)。
|
|
129
|
-
|
|
130
|
-
## ⏱️ 5 分钟上手
|
|
131
|
-
|
|
132
|
-
在 IDE 对话里直接对 AI 说:
|
|
133
|
-
|
|
134
|
-
```text
|
|
135
|
-
peaks-solo 帮我给登录页加 OAuth 回调 # 端到端编排(最常用)
|
|
136
|
-
peaks-prd 为会员邀请功能整理产品目标、非目标和验收标准
|
|
137
|
-
peaks-rd 分析这次重构的最小实现切片和风险
|
|
138
|
-
peaks-qa 为这次改动设计测试和回归验证清单
|
|
139
|
-
peaks-ui 设计登录页的交互和视觉方案
|
|
140
|
-
peaks-sc 记录这次变更的影响范围、artifact 留存和 commit 边界
|
|
141
|
-
peaks-txt 为当前模块生成上下文胶囊,保留关键决策
|
|
142
|
-
peaks-sop 帮我把"内容发布"流程变成带门禁的 SOP
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
**两种基本用法**:
|
|
146
|
-
|
|
147
|
-
1. **让 `peaks-solo` 编排**(绝大多数情况)——告诉它做什么,剩下 PRD → RD → UI → QA → SC → TXT 的链路它自己协调
|
|
148
|
-
2. **直接调单个角色技能**(进阶)——只想做工作流的某一段时,跳过整 pipeline
|
|
149
|
-
|
|
150
|
-
随时确认状态?让 AI 跑一下:
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
peaks -V # 版本
|
|
154
|
-
peaks doctor --json # 环境/技能/配置一键体检
|
|
155
|
-
peaks project dashboard --project . --json # 当前项目一眼看完
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
## 🧰 13 个技能家族
|
|
159
|
-
|
|
160
|
-
| 技能 | 你用它做什么 | 典型场景 |
|
|
161
|
-
|------|------------|----------|
|
|
162
|
-
| `peaks-solo` | **端到端编排入口**,自动协调 prd/rd/ui/qa/sc/txt | 全流程开发、PRD-to-ship、跨子任务批量迭代 |
|
|
163
|
-
| `peaks-prd` | 模糊意图 → **可验收 PRD**(目标/非目标/行为保留/验收) | 需求整理、PRD 撰写、重构目标 |
|
|
164
|
-
| `peaks-rd` | 工程分析 + 切片规划 + 风险 + 执行契约 | 架构分析、最小切片、风险评估 |
|
|
165
|
-
| `peaks-qa` | 测试设计 + 覆盖率 + 回归矩阵 + 验收证据 | 测试用例、回归、浏览器 E2E |
|
|
166
|
-
| `peaks-ui` | 视觉方向 + 交互方案 + 设计系统约束 | 页面设计、交互、原型、UI 回归 |
|
|
167
|
-
| `peaks-sc` | 变更追踪 + commit 边界 + 留存策略 + 回滚证据 | 影响范围、变更控制、审计 |
|
|
168
|
-
| `peaks-txt` | 上下文胶囊 + 决策记录 + 知识压缩 | 模块理解、决策留存、复盘 |
|
|
169
|
-
| `peaks-sop` | **把你的工作流变成带门禁的 SOP**(不只研发) | 内容发布、合规清单、数据 pipeline、运维 runbook |
|
|
170
|
-
| `peaks-solo-resume` | 继续刚才没做完的切片 | 「继续完成刚才未完成的」 |
|
|
171
|
-
| `peaks-solo-status` | 一眼看到现在到哪了 | 「现在到哪了」 |
|
|
172
|
-
| `peaks-solo-test` | 跑项目测试(自动探测 vitest/jest/pytest/...) | 「跑测试」 |
|
|
173
|
-
| `peaks-security-audit` | **独立安全审计**(OWASP Top-10 + 8-dim 威胁模型) | 新增鉴权/凭证/SQL 注入/外部 API 等安全面改动 |
|
|
174
|
-
| `peaks-perf-audit` | **独立性能审计**(6-dim 性能影响) | 改热循环/I-O/并发/bundle/cold-start |
|
|
175
|
-
|
|
176
|
-
**3 solo 包装 + 7 角色技能 + 2 独立审计 + 1 编排器 = 13 个。日常 1 个 `peaks-solo` 覆盖 ≥ 90%。**
|
|
177
|
-
|
|
178
|
-
> **v2.13.0 新增**:zero-human-intervention **auto-compact**(`peaks solo context-now` + `peaks solo auto-compact`)——peaks-loop 自己探测 context %,≥85% 主动收敛(写 checkpoint + 收敛计划 + 触发 IDE compact),≥95% 强制同步压缩红线。LLM-runner 上下文始终 < 95% 自主运行,零介入。**v2.13.4 修复**:`auto-compact` 现在默认压缩**主会话**上下文(不是 sub-agent shell 自己的)。**3.0.3 新增 `ide-native` 通路**:在 `.claude/settings.local.json` 装 PreToolUse hook(`Bash|Task` matcher → `peaks session auto-compact-hook`),runner 下一次 Bash/Task tool call **in-band** 触发 `claude --compact`,不再依赖 LLM 自己 fire `/compact`。Hook ENOENT-safe(claude CLI 不在 PATH 时退出 0 + stderr 提示,runner 不会被中断)。
|
|
179
|
-
|
|
180
|
-
## 🚧 杀手锏:不可绕过的门禁
|
|
181
|
-
|
|
182
|
-
> CI 只能在**合并时**拦;`CLAUDE.md` 规则靠 agent **自觉**。**SOP 能做到 CI 和提示词都做不到的事——在 agent 拔刀的瞬间把它摁住。**
|
|
183
|
-
|
|
184
|
-
```jsonc
|
|
185
|
-
// sop.json
|
|
186
|
-
"guards": [ { "phase": "publish", "bash": "git +push" } ]
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
peaks hooks install --project <repo> # 显式 opt-in:装一条 PreToolUse 规则
|
|
191
|
-
```
|
|
5
|
+
[](https://www.npmjs.com/package/peaks-loop)
|
|
6
|
+
[](./LICENSE)
|
|
7
|
+
[](https://github.com/SquabbyZ/peaks-loop/stargazers)
|
|
192
8
|
|
|
193
|
-
|
|
9
|
+
<p align="center">
|
|
10
|
+
<video src="./examples/video-demo/preview/peaks-loop-demo.mp4" controls muted playsinline preload="metadata" width="100%" style="border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.55);"></video>
|
|
11
|
+
</p>
|
|
194
12
|
|
|
195
|
-
|
|
196
|
-
|------|------|------|
|
|
197
|
-
| `file-exists` | 文件存在 → pass | `CHANGELOG.md` 存在 |
|
|
198
|
-
| `grep`(含 `absent`) | 文件内正则匹配 → pass;`absent: true` 反转 | "正文里没有 `TODO`" |
|
|
199
|
-
| `command` | 跑命令并按退出码判定(默认拒绝,需 `--allow-commands`) | 跑 `npm test` |
|
|
13
|
+
## 它是什么
|
|
200
14
|
|
|
201
|
-
|
|
15
|
+
### loop engineering 的工程实现
|
|
202
16
|
|
|
203
|
-
|
|
17
|
+
### peaks-loop 就是你的 AI 战术小队,24 小时待命,随时接活
|
|
204
18
|
|
|
205
|
-
|
|
19
|
+
它把一套工程门禁、编排、回放都装进你本地的 AI CLI 里,装好之后,你说一句话,它替你把整套流程跑完再交还给你。
|
|
206
20
|
|
|
207
|
-
|
|
208
|
-
> peaks-rd 分析 src/auth/ 的现状,给我一份最小切片方案
|
|
209
|
-
```
|
|
210
|
-
`peaks-rd` 出:3 阶段切片、风险评估、回归点、可执行契约。**写不写代码你定**。
|
|
21
|
+
召之即来,事完收队,**不跳步,不半截扔给你**。它不是新发明一个 AI CLI,而是架在你已有的 Claude Code / Codex / Copilot 之上,把它们都调成同一支团队,只对你这一个开发者的口味。
|
|
211
22
|
|
|
212
|
-
|
|
23
|
+
**每一步都有强退出条件**:审计不通过就停,QA 没过就停,任何一道门失败 = 全流程停。你不必追着它催、也不必替它补,它跑完一道再交你拍板,拍完再走下一道。
|
|
213
24
|
|
|
214
|
-
|
|
215
|
-
> peaks-sop 帮我把"博客发布"做成带门禁的 SOP:草稿写完 → 自检(无 TODO/字数 ≥ 800) → 人工 review → 才允许发布
|
|
216
|
-
```
|
|
217
|
-
`peaks-sop` 生成 `sop.json` + `SKILL.md`,注册到全局,**从此 agent 跳过任何一步都发不出文章**。
|
|
25
|
+
#### 门禁不是装饰 —— 5439 tests passed · 19 skipped · 0 failed
|
|
218
26
|
|
|
219
|
-
|
|
27
|
+
每一行代码都过自己的门:测试套件 5,420 个用例真挡得住事,不是装饰。门禁不是写给用户看的,是写给自己看的。
|
|
220
28
|
|
|
221
|
-
|
|
222
|
-
> peaks-qa 用浏览器跑一次完整注册 → 登录 → 看板的核心流,把卡点列出来
|
|
223
|
-
```
|
|
224
|
-
`peaks-qa` 出:测试矩阵、回归清单、`code-review.md` 风格的证据文档。
|
|
29
|
+
#### 做这个项目的只有一个人,工程师口味:
|
|
225
30
|
|
|
226
|
-
|
|
31
|
+
- **极客精神。**
|
|
32
|
+
- **你跟 AI 之间只该用自然语言讲话,没有 CLI 表面给你。**
|
|
33
|
+
- **单测覆盖率和门禁审计真挡得住事,不是装饰。**
|
|
34
|
+
- **严于律己,宽以待人 —— 自己写的代码过自己的门,使用者随便怎么说都能跑通。**
|
|
35
|
+
- **AI 使用水平的下限平权:你不需要懂 prompt engineering,就跟说话一样用。**
|
|
227
36
|
|
|
228
|
-
|
|
229
|
-
> peaks-solo-resume
|
|
230
|
-
```
|
|
231
|
-
检测 in-flight slice 的最深已完成 gate,省 3-5k token 重新读 artifact。**会话断了不丢上下文**。
|
|
37
|
+
这套项目级硬规则也写进了 `~/.peaks/memory/`,不是口号,是被工具链守住的红线。
|
|
232
38
|
|
|
233
|
-
##
|
|
39
|
+
## 装了你有什么战术角色
|
|
234
40
|
|
|
235
|
-
|
|
41
|
+
先给你上的是 `peaks-code`,主官。它是 peaks-loop 默认入口,管 PRD、RD、QA、UI、SC、TXT 这一长串工序的主调度,也是你日常跟 peaks-loop 说话时最常打交道的那个角色。
|
|
236
42
|
|
|
237
|
-
|
|
238
|
-
-
|
|
43
|
+
它能做的:
|
|
44
|
+
- 写长任务代码(端到端需求 → PRD → 实现 → QA),一道门一道门跑,坏在哪道停在哪道
|
|
45
|
+
- 修 bug 当天发,改完顺手过审 + 测试,不是改完就完
|
|
46
|
+
- 帮你做 / 接 / 拆长跑的需求,把一个模糊需求一路剥到能落地的实现
|
|
239
47
|
|
|
240
|
-
|
|
48
|
+
它一句话能扛完的活,你都不必开第二个终端。它对测试覆盖率、审计门、卡点阻断一视同仁:跑不到位的活不交付,跑歪的活直接退回重跑。
|
|
241
49
|
|
|
242
|
-
|
|
243
|
-
# 装全部 13 个:
|
|
244
|
-
npx skills add SquabbyZ/peaks-loop
|
|
50
|
+
它既是装好就立刻能用的那个入口,也是后面要长出来的内建角色的调度口;它内部有一套连续审计、QA 闸口、review 验收,默认打开,你想关哪一道才需要单独说。
|
|
245
51
|
|
|
246
|
-
|
|
247
|
-
npx skills add SquabbyZ/peaks-loop --skill peaks-solo
|
|
248
|
-
npx skills add SquabbyZ/peaks-loop --skill peaks-rd
|
|
249
|
-
npx skills add SquabbyZ/peaks-loop --skill peaks-sop
|
|
250
|
-
```
|
|
52
|
+
其他内置 loop engineering,敬请期待。
|
|
251
53
|
|
|
252
|
-
|
|
54
|
+
## 你也能沉淀自己的 loop engineering
|
|
253
55
|
|
|
254
|
-
|
|
56
|
+
跑过一次还想跑,说一句话让它永久驻场。
|
|
255
57
|
|
|
256
|
-
|
|
58
|
+
你沉淀的是 loop engineering(战术套路),不是简单的 skill(动作招式)。下次说"跑那只",整套流程自动就位。
|
|
257
59
|
|
|
258
|
-
|
|
259
|
-
2. **结构化 JSON 契约**(`peaks request show ... --json`、`peaks scan archetype ... --json`)—— 让技能读回可机读判决作为下游决策
|
|
260
|
-
3. **hook / CI / 脚本场景下能被程序化调用**(`peaks hooks install`、`peaks gate enforce`)—— 把"必须满足门禁才能做 X"从纸面规则变成可执行规则
|
|
60
|
+
它落到你本地的一个池子里,只对你生效。命名、复用、迭代都是你说了算:跑过两遍稳定的会被抬高,跑翻车的会让你重新定。决策影响资产的,你拍板。
|
|
261
61
|
|
|
262
|
-
|
|
62
|
+
这套机制关键不是"工具给你造了多少只 bee",而是你那几只 bee 一直在跟着你的口味长 —— 你提一句,它长一点。
|
|
263
63
|
|
|
264
|
-
|
|
64
|
+
## 上号
|
|
265
65
|
|
|
266
66
|
```bash
|
|
267
|
-
|
|
268
|
-
peaks request init / show / transition # PRD/RD/QA/SC 请求状态机
|
|
269
|
-
peaks session list / info / title / rotate
|
|
270
|
-
peaks sop init / lint / check / advance / register
|
|
271
|
-
peaks code-review detect-ocr / config-template / run-ocr # 阿里 Open Code Review 第二意见
|
|
272
|
-
peaks hooks install / gate enforce / gate bypass
|
|
273
|
-
peaks project dashboard / memories
|
|
67
|
+
npm i -g peaks-loop
|
|
274
68
|
```
|
|
275
69
|
|
|
276
|
-
|
|
70
|
+
装完一句话接活。
|
|
277
71
|
|
|
278
|
-
##
|
|
72
|
+
## 顺便说一句
|
|
279
73
|
|
|
280
|
-
|
|
281
|
-
|---|---|
|
|
282
|
-
| ✅ **Claude Code** | 13 技能 + PreToolUse hook,agent team dogfood 通过 |
|
|
283
|
-
| ⚠️ **Trae** | slim `IdeAdapter` 已注册,真实 Trae 集成留到后续切片 |
|
|
284
|
-
| 📋 **Codex / Cursor / Qoder / 通义灵码 等** | 路线图 |
|
|
74
|
+
这个仓库以前叫 [`peaks-cli`](https://github.com/SquabbyZ/peaks-cli),现在叫 `peaks-loop`。
|
|
285
75
|
|
|
286
|
-
|
|
76
|
+
里面的技能从 `peaks-code`(单角色)演化到 `peaks-code`(带门禁的代码域).两边都还在,只是分工不同:`peaks-code` 如今是给单任务跑流程用的那个老入口,`peaks-code` 接管了端到端的主路径。
|
|
287
77
|
|
|
288
|
-
|
|
78
|
+
事情一直没换过:你说话,它替你排工程门禁,坏哪道停哪道,你来拍板。
|
|
289
79
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
```sh
|
|
293
|
-
# 装到当前项目(写入 .claude/settings.json,幂等)
|
|
294
|
-
peaks hooks install
|
|
295
|
-
|
|
296
|
-
# 装到全局(写入 ~/.claude/settings.json)
|
|
297
|
-
peaks hooks install --global
|
|
298
|
-
|
|
299
|
-
# 查状态
|
|
300
|
-
peaks hooks status
|
|
301
|
-
peaks hooks status --global
|
|
302
|
-
|
|
303
|
-
# 卸(只卸 peaks 自己注册的;保留其他第三方 hook)
|
|
304
|
-
peaks hooks uninstall
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
装完之后**重启 IDE(或 reload workspace)**让 hook 生效。
|
|
308
|
-
|
|
309
|
-
### 装了什么
|
|
310
|
-
|
|
311
|
-
装的是 `peaks gate enforce` 这条 PreToolUse `Bash` 入口——每次 Bash 调用都会跑 SOP 门禁。命中失败 → 写 `permissionDecision: "deny"` 到 stdout + `process.exitCode = 2`,Claude Code 在权限检查**之前**就拦下来(连 `--dangerously-skip-permissions` 也拦得住)。完整审计表见 [`.claude/HOOKS.md`](./.claude/HOOKS.md)。
|
|
312
|
-
|
|
313
|
-
### 输出契约
|
|
314
|
-
|
|
315
|
-
| 信号 | 走哪 | 含义 |
|
|
316
|
-
|---------------|-----------------------------------------|----------------------------|
|
|
317
|
-
| `stdout` JSON | `emitBlock` / `emitDecision` | 给宿主读的 allow/deny 决策 |
|
|
318
|
-
| `stderr` 文本 | `emitHint` | 给 LLM/操作者看的人话提示 |
|
|
319
|
-
| 退出码 `0` | 允许 | 宿主继续 |
|
|
320
|
-
| 退出码 `2` | 阻塞(`emitBlock` 专用) | 宿主必须停 |
|
|
321
|
-
|
|
322
|
-
所有 hook 走 `src/services/hooks/output.ts` 三个 helper:`emitHint` / `emitBlock` / `emitDecision`。跨平台契约测试(darwin / linux / win32)在 `tests/unit/hooks/contract.test.ts`。
|
|
323
|
-
|
|
324
|
-
### 一次性放行
|
|
325
|
-
|
|
326
|
-
```sh
|
|
327
|
-
peaks gate bypass --sop <id> --phase <phase> --reason "<why>"
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
下次匹配的 Bash 命令放行一次(每个 SOP 每项目上限 3 次)。完整文档:[`.claude/HOOKS.md`](./.claude/HOOKS.md)。
|
|
331
|
-
|
|
332
|
-
## 🏗️ 项目状态
|
|
333
|
-
|
|
334
|
-
- ✅ **13 技能** + 跨 IDE CLI + 2800+ 测试(v2.12.0 新增 `peaks-security-audit` + `peaks-perf-audit`)
|
|
335
|
-
- ✅ **门禁机制** 已在真实项目 dogfood
|
|
336
|
-
- ✅ **v2.12.0 RD fan-out 收缩**(3 路:code-reviewer + qa-test-cases-writer + karpathy-reviewer)2026-06-27 发布
|
|
337
|
-
- ✅ **v2.13.0 零介入 auto-compact**(peaks-loop 自主压缩任意 AI CLI 的上下文,runner 始终 < 95%)2026-06-27 发布
|
|
338
|
-
- ✅ **v2.13.4 4 个 solo bug 修复**:Step 1 AskUserQuestion 不再被跳过、verify-pipeline 走 canonical `.peaks/_runtime/<sessionId>/<role>/` 路径、`LegacyChangeIdSiblingError` 哨兵在 init 时容忍 misplaced 数据、auto-compact 真正压主会话上下文
|
|
339
|
-
- 📋 路线图:Trae / Codex / Cursor 真实集成、`peaks-doc` / `peaks-i18n`、SOP 模板市场
|
|
340
|
-
|
|
341
|
-
详细看 [`CHANGELOG.md`](./CHANGELOG.md) 和 [`docs/`](./docs/)。
|
|
342
|
-
|
|
343
|
-
## 📄 许可
|
|
344
|
-
|
|
345
|
-
[MIT](LICENSE) — 商用、改、私有 fork 都欢迎,保留版权即可。
|
|
346
|
-
|
|
347
|
-
## 💬 加入微信交流群
|
|
348
|
-
|
|
349
|
-
遇到使用问题、功能建议、或者想和other peaks-loop users直接交流?扫码加入 **Peaks-Loop** 微信群:
|
|
350
|
-
|
|
351
|
-
<div align="center">
|
|
352
|
-
<img src="./docs/images/wechat-group-qr.png" alt="Peaks-Loop 微信群二维码" width="240" />
|
|
353
|
-
</div>
|
|
354
|
-
|
|
355
|
-
> 二维码图片过期后,欢迎在 GitHub Issues / Discussions 提反馈。
|
|
80
|
+
你只需要把这一个仓库装好,后面每次跑新需求,都有现成的战术角色等你点。
|
|
356
81
|
|
|
357
82
|
---
|
|
358
83
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
**觉得有用?**
|
|
362
|
-
|
|
363
|
-
⭐ [Star peaks-loop on GitHub](https://github.com/SquabbyZ/peaks-loop) · 🔍 [Browse on skills.sh](https://skills.sh/SquabbyZ/peaks-loop)
|
|
84
|
+
MIT License · Made by [SquabbyZ](https://github.com/SquabbyZ)
|
|
364
85
|
|
|
365
|
-
|
|
86
|
+
- 全部技能清单 → [`skills/`](./skills/)
|
|
87
|
+
- 设计文档 → [`docs/`](./docs/)
|
|
88
|
+
- 更新日志 → [`CHANGELOG.md`](./CHANGELOG.md)
|
|
89
|
+
- 提问 → [GitHub Issues](https://github.com/SquabbyZ/peaks-loop/issues)
|
|
@@ -9,7 +9,7 @@ model: sonnet
|
|
|
9
9
|
|
|
10
10
|
> **Shipped source** (Slice 7/7): this file is the canonical source for the karpathy-reviewer sub-agent prompt. The `peaks-loop` postinstall (`scripts/install-skills.mjs#installBundledAgents`) copies this file to `~/.claude/agents/karpathy-reviewer.md` on every `npm i -g peaks-loop@latest` invocation, with content-hash drift detection (a `.peaks-managed` marker + SHA-256 compare). Edit here; do not edit the copy in `~/.claude/agents/` (it will be overwritten on the next upgrade).
|
|
11
11
|
>
|
|
12
|
-
> **Project-internal pointer**: `skills/peaks-rd/references/karpathy-reviewer-prompt.md` is a 2-line pointer to this file (peaks-loop 2.0 rules convention).
|
|
12
|
+
> **Project-internal pointer**: `skills/bee/peaks-rd/references/karpathy-reviewer-prompt.md` is a 2-line pointer to this file (peaks-loop 2.0 rules convention).
|
|
13
13
|
|
|
14
14
|
You are a **Karpathy-guidelines enforcement reviewer** for peaks-rd. You inspect a slice's RD outputs against the 4 Karpathy guidelines and emit a compact JSON envelope that blocks the `rd → qa-handoff` transition if any guideline fails. You do **not** review style, performance, security, or code quality — those are owned by the parallel 4 sub-agents.
|
|
15
15
|
|
|
@@ -223,7 +223,7 @@ karpathy-reviewer summary:
|
|
|
223
223
|
## 10. References
|
|
224
224
|
|
|
225
225
|
- Canonical 4-guideline text: `andrej-karpathy-skills:karpathy-guidelines` skill id; full text in `skills/andrej-karpathy-src/skills/karpathy-guidelines/SKILL.md`.
|
|
226
|
-
- Sub-agent dispatch contract: `skills/peaks-rd/references/rd-sub-agent-dispatch.md` §"Karpathy-guidelines context".
|
|
227
|
-
- 5-way fanout integration: `skills/peaks-rd/references/rd-fanout-contracts.md` §"karpathy-reviewer contract (Slice 5/6)".
|
|
226
|
+
- Sub-agent dispatch contract: `skills/bee/peaks-rd/references/rd-sub-agent-dispatch.md` §"Karpathy-guidelines context".
|
|
227
|
+
- 5-way fanout integration: `skills/bee/peaks-rd/references/rd-fanout-contracts.md` §"karpathy-reviewer contract (Slice 5/6)".
|
|
228
228
|
- CLI gate: `KARPATHY_REVIEW` prereq in `src/services/artifacts/artifact-prerequisites.ts` (title-case `mustContain`).
|
|
229
229
|
- Structural scanner (companion): `peaks scan karpathy` reads `rd/karpathy-review.md` and emits a similar markdown report; the structural scanner is **not** a replacement for this reviewer — it covers regex / file-presence checks, not the semantic judgement this reviewer provides.
|
|
@@ -12,6 +12,24 @@ export type ProgramIO = {
|
|
|
12
12
|
export declare function printResult<T>(io: ProgramIO, result: ResultEnvelope<T>, asJson?: boolean): void;
|
|
13
13
|
export declare function addJsonOption(command: Command): Command;
|
|
14
14
|
export declare function failUnsupportedNonDryRun(io: ProgramIO, command: string, asJson?: boolean): void;
|
|
15
|
+
/** CLI shim helper: render a `{ ok: boolean, error?, data? }` envelope
|
|
16
|
+
* and set `process.exitCode = 1` on failure.
|
|
17
|
+
*
|
|
18
|
+
* Library functions MUST return envelopes like `{ ok, error?, data? }`
|
|
19
|
+
* and MUST NOT mutate `process.exitCode` themselves. The shim (the
|
|
20
|
+
* Commander `.action()` callback in `register*Commands`) owns the
|
|
21
|
+
* process-exit side-effect so the library can be re-used from non-CLI
|
|
22
|
+
* contexts (vitest, programmatic dispatch, plugin loading).
|
|
23
|
+
*
|
|
24
|
+
* Output format mirrors the existing `registerSedimentCommands` shim:
|
|
25
|
+
* a JSON envelope on stdout (one line, parseable), nothing else.
|
|
26
|
+
*/
|
|
27
|
+
export interface CliEnvelope {
|
|
28
|
+
ok: boolean;
|
|
29
|
+
error?: string;
|
|
30
|
+
data?: unknown;
|
|
31
|
+
}
|
|
32
|
+
export declare function printCliEnvelope(io: ProgramIO, r: CliEnvelope): void;
|
|
15
33
|
export declare function isRecommendationWorkflow(value: string): value is RecommendationWorkflow;
|
|
16
34
|
export declare function isArtifactProvider(value: string): value is ArtifactProvider;
|
|
17
35
|
export declare function isArtifactSetupStep(value: string): value is GuidedArtifactSetup['step'];
|
|
@@ -27,6 +27,14 @@ export function failUnsupportedNonDryRun(io, command, asJson) {
|
|
|
27
27
|
printResult(io, fail(command, 'UNSUPPORTED_NON_DRY_RUN', 'Only dry-run planning is supported', {}, ['Rerun with --dry-run or omit --no-dry-run']), asJson);
|
|
28
28
|
process.exitCode = 1;
|
|
29
29
|
}
|
|
30
|
+
export function printCliEnvelope(io, r) {
|
|
31
|
+
if (r.ok) {
|
|
32
|
+
io.stdout(JSON.stringify({ ok: true, data: r.data ?? null }));
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
io.stdout(JSON.stringify({ ok: false, error: r.error }));
|
|
36
|
+
process.exitCode = 1;
|
|
37
|
+
}
|
|
30
38
|
export function isRecommendationWorkflow(value) {
|
|
31
39
|
return value === 'code-refactor' || value === 'product-refactor' || value === 'frontend-design';
|
|
32
40
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `peaks skill adapter <verb>` — adapter selection + detection CLI.
|
|
3
|
+
*
|
|
4
|
+
* Slice 2026-07-04-cli-15a (Task 15a of the 18-verb plan). Two verbs:
|
|
5
|
+
*
|
|
6
|
+
* list — return the known adapter id list
|
|
7
|
+
* set-active — record which adapter is currently active
|
|
8
|
+
*
|
|
9
|
+
* Unknown verbs return an empty result so program.ts can render a
|
|
10
|
+
* NOT_FOUND envelope without throwing.
|
|
11
|
+
*/
|
|
12
|
+
import type { Command } from "commander";
|
|
13
|
+
import type { ProgramIO } from "../cli-helpers.js";
|
|
14
|
+
export interface AdapterResult {
|
|
15
|
+
adapters?: string[];
|
|
16
|
+
active?: string;
|
|
17
|
+
}
|
|
18
|
+
/** Dispatch an adapter verb. `home` is accepted for API symmetry
|
|
19
|
+
* with runSediment, but the in-scope verbs don't read from disk yet. */
|
|
20
|
+
export declare function runAdapter(argv: string[], { home: _home }: {
|
|
21
|
+
home: string;
|
|
22
|
+
}): Promise<AdapterResult>;
|
|
23
|
+
/** Register the `peaks skill adapter <verb>` subcommand group.
|
|
24
|
+
*
|
|
25
|
+
* Matches the pattern used by sediment-commands.ts: the `skill`
|
|
26
|
+
* parent command is reused when present, created lazily otherwise.
|
|
27
|
+
* See src/cli/commands/workflow-plan-commands.ts:179 for the
|
|
28
|
+
* precedent.
|
|
29
|
+
*/
|
|
30
|
+
export declare function registerAdapterCommands(program: Command, io: ProgramIO): void;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Dispatch an adapter verb. `home` is accepted for API symmetry
|
|
2
|
+
* with runSediment, but the in-scope verbs don't read from disk yet. */
|
|
3
|
+
export async function runAdapter(argv, { home: _home }) {
|
|
4
|
+
const verb = argv[0];
|
|
5
|
+
if (verb === "list") {
|
|
6
|
+
return { adapters: ["claude", "codex", "copilot"] };
|
|
7
|
+
}
|
|
8
|
+
if (verb === "set-active") {
|
|
9
|
+
const name = argv[1];
|
|
10
|
+
if (name === undefined)
|
|
11
|
+
return {};
|
|
12
|
+
return { active: name };
|
|
13
|
+
}
|
|
14
|
+
return {};
|
|
15
|
+
}
|
|
16
|
+
/** Register the `peaks skill adapter <verb>` subcommand group.
|
|
17
|
+
*
|
|
18
|
+
* Matches the pattern used by sediment-commands.ts: the `skill`
|
|
19
|
+
* parent command is reused when present, created lazily otherwise.
|
|
20
|
+
* See src/cli/commands/workflow-plan-commands.ts:179 for the
|
|
21
|
+
* precedent.
|
|
22
|
+
*/
|
|
23
|
+
export function registerAdapterCommands(program, io) {
|
|
24
|
+
const existingSkill = program.commands.find((c) => c.name() === "skill");
|
|
25
|
+
const skill = existingSkill ??
|
|
26
|
+
program.command("skill").description("Manage Peaks skills");
|
|
27
|
+
skill
|
|
28
|
+
.command("adapter <args...>")
|
|
29
|
+
.description("Adapter selection and detection")
|
|
30
|
+
.action(async (args) => {
|
|
31
|
+
const home = process.env.HOME ?? process.env.USERPROFILE ?? process.cwd();
|
|
32
|
+
const r = await runAdapter(args, { home });
|
|
33
|
+
io.stdout(JSON.stringify(r));
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Slice 2 — `peaks
|
|
2
|
+
* Slice 2 — `peaks code [--fast] <change-id>` (peaks-code fast mode).
|
|
3
3
|
*
|
|
4
|
-
* The `peaks-
|
|
4
|
+
* The `peaks-code` SKILL orchestrates an LLM-side workflow:
|
|
5
5
|
* load-memory -> standards-preflight -> rd-cycle -> qa-cycle -> emit-txt
|
|
6
6
|
*
|
|
7
|
-
* The CLI surface here is intentionally narrow: it builds a
|
|
8
|
-
* runs it via `
|
|
7
|
+
* The CLI surface here is intentionally narrow: it builds a CodePlan and
|
|
8
|
+
* runs it via `runCodeFast`. Fast mode skips memory full-load, standards
|
|
9
9
|
* preflight, and the QA repair loop. Round-trip KPI: ≤ 30s.
|
|
10
10
|
*
|
|
11
|
-
* No new service layer — the orchestrator is the in-file `
|
|
11
|
+
* No new service layer — the orchestrator is the in-file `runCodeFast`
|
|
12
12
|
* function. Hooks are injected so tests can mock at the boundary.
|
|
13
13
|
*
|
|
14
14
|
* v2.11.0 Group F (Tier 9) — D5 / D7 additions:
|
|
15
|
-
* - `peaks
|
|
16
|
-
* - `peaks
|
|
15
|
+
* - `peaks code should-pause --step <step> --mode <mode>` (D5)
|
|
16
|
+
* - `peaks code post-compact-detect --project <path>` (D7)
|
|
17
17
|
*/
|
|
18
18
|
import type { Command } from 'commander';
|
|
19
19
|
import { type ProgramIO } from '../cli-helpers.js';
|
|
20
|
-
export type
|
|
21
|
-
export interface
|
|
20
|
+
export type CodeStepKind = 'memory' | 'preflight' | 'rd' | 'qa' | 'emit';
|
|
21
|
+
export interface CodeStep {
|
|
22
22
|
readonly id: 'load-memory' | 'standards-preflight' | 'rd-cycle' | 'qa-cycle' | 'emit-txt';
|
|
23
|
-
readonly kind:
|
|
23
|
+
readonly kind: CodeStepKind;
|
|
24
24
|
readonly skipped: boolean;
|
|
25
25
|
/** QA-only: when true, qa hook retries on failure up to N rounds. */
|
|
26
26
|
readonly repairLoop?: boolean;
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
28
|
+
export interface CodePlan {
|
|
29
29
|
readonly sessionId: string;
|
|
30
|
-
readonly steps: readonly
|
|
30
|
+
readonly steps: readonly CodeStep[];
|
|
31
31
|
}
|
|
32
|
-
export interface
|
|
32
|
+
export interface CodeHooks {
|
|
33
33
|
readonly memory: (ctx: {
|
|
34
34
|
sessionId: string;
|
|
35
35
|
}) => Promise<unknown>;
|
|
@@ -47,34 +47,34 @@ export interface SoloHooks {
|
|
|
47
47
|
sessionId: string;
|
|
48
48
|
}) => Promise<unknown>;
|
|
49
49
|
}
|
|
50
|
-
export interface
|
|
50
|
+
export interface CodeRunResult {
|
|
51
51
|
readonly sessionId: string;
|
|
52
52
|
readonly ok: boolean;
|
|
53
|
-
readonly steps: readonly
|
|
53
|
+
readonly steps: readonly CodeStep[];
|
|
54
54
|
readonly skipped: readonly string[];
|
|
55
55
|
readonly elapsedMs: number;
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
* Build a
|
|
58
|
+
* Build a CodePlan. `fast=true` marks memory + preflight as skipped and
|
|
59
59
|
* disables the QA repair loop. Step order is fixed; emit-txt always last.
|
|
60
60
|
*/
|
|
61
|
-
export declare function
|
|
61
|
+
export declare function buildCodePlan(opts: {
|
|
62
62
|
sessionId: string;
|
|
63
63
|
fast: boolean;
|
|
64
|
-
}):
|
|
64
|
+
}): CodePlan;
|
|
65
65
|
/**
|
|
66
|
-
* Run the
|
|
66
|
+
* Run the CodePlan. Skipped steps do NOT invoke their hook; emit-txt is
|
|
67
67
|
* always invoked last. Returns timing + skipped ids for KPI measurement.
|
|
68
68
|
*/
|
|
69
|
-
export declare function
|
|
69
|
+
export declare function runCodeFast(opts: {
|
|
70
70
|
sessionId: string;
|
|
71
|
-
plan:
|
|
72
|
-
hooks:
|
|
73
|
-
}): Promise<
|
|
71
|
+
plan: CodePlan;
|
|
72
|
+
hooks: CodeHooks;
|
|
73
|
+
}): Promise<CodeRunResult>;
|
|
74
74
|
/**
|
|
75
|
-
* Register the `peaks
|
|
75
|
+
* Register the `peaks code [--fast] <change-id>` command. The actual
|
|
76
76
|
* LLM-side orchestration is driven by the SKILL.md (LLM-side), so this
|
|
77
77
|
* CLI command is a thin surface that builds the plan and emits a JSON
|
|
78
78
|
* envelope for downstream tooling.
|
|
79
79
|
*/
|
|
80
|
-
export declare function
|
|
80
|
+
export declare function registerCodeCommands(program: Command, io: ProgramIO): void;
|