peaks-loop 3.1.2 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +62 -12
- package/CHANGELOG.md +148 -116
- package/README-en.md +58 -240
- package/README.md +49 -325
- package/agents/karpathy-reviewer.md +3 -3
- package/dist/src/cli/cli-helpers.d.ts +18 -0
- package/dist/src/cli/cli-helpers.js +8 -0
- package/dist/src/cli/commands/adapter-commands.d.ts +30 -0
- package/dist/src/cli/commands/adapter-commands.js +35 -0
- package/dist/src/cli/commands/{solo-commands.d.ts → code-commands.d.ts} +25 -25
- package/dist/src/cli/commands/{solo-commands.js → code-commands.js} +82 -82
- package/dist/src/cli/commands/context-commands.d.ts +1 -1
- package/dist/src/cli/commands/context-commands.js +1 -1
- package/dist/src/cli/commands/contract-commands.d.ts +1 -1
- package/dist/src/cli/commands/contract-commands.js +1 -1
- package/dist/src/cli/commands/core/session-command.js +12 -0
- package/dist/src/cli/commands/core/skill-command.js +4 -4
- package/dist/src/cli/commands/dispatch-commands.js +2 -2
- package/dist/src/cli/commands/dispatch-from-dag.js +1 -1
- package/dist/src/cli/commands/hook-handle.js +7 -7
- package/dist/src/cli/commands/job-commands.js +7 -7
- package/dist/src/cli/commands/observability-commands.js +1 -1
- package/dist/src/cli/commands/perf-audit-commands.js +2 -2
- package/dist/src/cli/commands/security-audit-commands.js +2 -2
- package/dist/src/cli/commands/sediment-commands.d.ts +80 -0
- package/dist/src/cli/commands/sediment-commands.js +640 -0
- package/dist/src/cli/commands/session-auto-compact-hook-command.js +2 -2
- package/dist/src/cli/commands/session-migrate-skill-name.d.ts +17 -0
- package/dist/src/cli/commands/session-migrate-skill-name.js +41 -0
- package/dist/src/cli/commands/skill-visibility.d.ts +8 -0
- package/dist/src/cli/commands/skill-visibility.js +63 -0
- package/dist/src/cli/commands/slice-commands.js +2 -2
- package/dist/src/cli/commands/sub-agent-commands.d.ts +1 -1
- package/dist/src/cli/commands/sub-agent-commands.js +1 -1
- package/dist/src/cli/commands/sub-agent-shared.d.ts +1 -1
- package/dist/src/cli/commands/understand-commands.js +1 -1
- package/dist/src/cli/commands/upgrade-commands.d.ts +1 -1
- package/dist/src/cli/commands/upgrade-commands.js +3 -3
- package/dist/src/cli/commands/user-touchpoint-commands.d.ts +4 -4
- package/dist/src/cli/commands/user-touchpoint-commands.js +15 -15
- package/dist/src/cli/commands/verdict-aggregate-command.d.ts +1 -1
- package/dist/src/cli/commands/verdict-aggregate-command.js +2 -2
- package/dist/src/cli/commands/workflow-commands.js +23 -23
- package/dist/src/cli/commands/workspace/init-command.d.ts +3 -3
- package/dist/src/cli/commands/workspace/init-command.js +7 -7
- package/dist/src/cli/program.js +24 -7
- package/dist/src/services/adapter/adapter.d.ts +27 -0
- package/dist/src/services/adapter/adapter.js +5 -0
- package/dist/src/services/adapter/auto-adapter.d.ts +11 -0
- package/dist/src/services/adapter/auto-adapter.js +15 -0
- package/dist/src/services/adapter/claude-adapter.d.ts +14 -0
- package/dist/src/services/adapter/claude-adapter.js +40 -0
- package/dist/src/services/adapter/codex-adapter.d.ts +14 -0
- package/dist/src/services/adapter/codex-adapter.js +14 -0
- package/dist/src/services/adapter/copilot-adapter.d.ts +14 -0
- package/dist/src/services/adapter/copilot-adapter.js +14 -0
- package/dist/src/services/artifacts/repair-cycle-service.js +1 -1
- package/dist/src/services/audit/enforcers/active-skill-resolver.d.ts +1 -1
- package/dist/src/services/audit/enforcers/active-skill-resolver.js +1 -1
- package/dist/src/services/audit/enforcers/{solo-code-ban.d.ts → code-ban.d.ts} +6 -6
- package/dist/src/services/audit/enforcers/{solo-code-ban.js → code-ban.js} +6 -6
- package/dist/src/services/audit/red-line-catalog.d.ts +2 -2
- package/dist/src/services/audit/red-line-catalog.js +6 -6
- package/dist/src/services/audit/scanners/skills-tree-scanner.js +22 -0
- package/dist/src/services/audit/types.d.ts +2 -2
- package/dist/src/services/{solo → code}/auto-compact-orchestrator.d.ts +2 -2
- package/dist/src/services/{solo → code}/auto-compact-orchestrator.js +5 -5
- package/dist/src/services/{solo → code}/dag-orchestrator.d.ts +4 -4
- package/dist/src/services/{solo → code}/dag-orchestrator.js +5 -5
- package/dist/src/services/{solo → code}/emit-handoff.d.ts +1 -1
- package/dist/src/services/{solo → code}/emit-handoff.js +1 -1
- package/dist/src/services/{solo → code}/job-shape-decision.d.ts +1 -1
- package/dist/src/services/{solo → code}/job-shape-decision.js +5 -5
- package/dist/src/services/{solo → code}/mode-gate.d.ts +11 -11
- package/dist/src/services/{solo → code}/mode-gate.js +5 -5
- package/dist/src/services/{solo → code}/post-compact-detector.d.ts +3 -3
- package/dist/src/services/{solo → code}/post-compact-detector.js +6 -6
- package/dist/src/services/{solo → code}/status-line-renderer.d.ts +4 -4
- package/dist/src/services/{solo → code}/step-08-gate.d.ts +4 -4
- package/dist/src/services/{solo → code}/step-08-gate.js +4 -4
- package/dist/src/services/{solo → code}/user-touchpoint-classifier.d.ts +1 -1
- package/dist/src/services/{solo → code}/user-touchpoint-classifier.js +1 -1
- package/dist/src/services/context/auto-compact-dispatcher.d.ts +3 -3
- package/dist/src/services/context/auto-compact-dispatcher.js +2 -2
- package/dist/src/services/context/auto-compact-types.d.ts +1 -1
- package/dist/src/services/dispatch/batch-counter.js +1 -1
- package/dist/src/services/dispatch/leak-detector.js +1 -1
- package/dist/src/services/dispatch/slice-dag.d.ts +2 -2
- package/dist/src/services/dispatch/test-tool-detection.d.ts +1 -1
- package/dist/src/services/dispatch/test-tool-detection.js +1 -1
- package/dist/src/services/doctor/doctor-service.js +2 -2
- package/dist/src/services/feedback/feedback-promotion-service.js +2 -2
- package/dist/src/services/job/job-progress-store.d.ts +1 -1
- package/dist/src/services/job/job-progress-store.js +1 -1
- package/dist/src/services/job/job-resource-snapshot.js +29 -1
- package/dist/src/services/memory/project-memory-service.js +1 -1
- package/dist/src/services/migrate-skill-name/migrate.d.ts +17 -0
- package/dist/src/services/migrate-skill-name/migrate.js +152 -0
- package/dist/src/services/migrate-skill-name/schema.d.ts +42 -0
- package/dist/src/services/migrate-skill-name/schema.js +25 -0
- package/dist/src/services/observability/aggregation.d.ts +1 -1
- package/dist/src/services/observability/aggregation.js +1 -1
- package/dist/src/services/perf/perf-baseline-service.d.ts +1 -1
- package/dist/src/services/perf/perf-baseline-service.js +1 -1
- package/dist/src/services/prd/handoff-types.d.ts +1 -1
- package/dist/src/services/prd/handoff-types.js +1 -1
- package/dist/src/services/preferences/preferences-service.d.ts +1 -1
- package/dist/src/services/preferences/preferences-types.d.ts +1 -1
- package/dist/src/services/progress/progress-service.d.ts +1 -1
- package/dist/src/services/progress/progress-service.js +1 -1
- package/dist/src/services/rd/standards-diagnostic.d.ts +1 -1
- package/dist/src/services/rd/standards-diagnostic.js +3 -3
- package/dist/src/services/recommendations/capability-seed-items.js +1 -1
- package/dist/src/services/recommendations/capability-seed-mappings.js +1 -1
- package/dist/src/services/recommendations/recommendation-service.js +1 -1
- package/dist/src/services/refactor/refactor-service.d.ts +1 -1
- package/dist/src/services/sc/sc-service.js +1 -1
- package/dist/src/services/sediment/dispose-confirm.d.ts +9 -0
- package/dist/src/services/sediment/dispose-confirm.js +5 -0
- package/dist/src/services/sediment/json-schema.d.ts +247 -0
- package/dist/src/services/sediment/json-schema.js +26 -0
- package/dist/src/services/sediment/manifest-lint.d.ts +13 -0
- package/dist/src/services/sediment/manifest-lint.js +11 -0
- package/dist/src/services/sediment/pool-paths.d.ts +22 -0
- package/dist/src/services/sediment/pool-paths.js +25 -0
- package/dist/src/services/sediment/pool-read.d.ts +20 -0
- package/dist/src/services/sediment/pool-read.js +73 -0
- package/dist/src/services/sediment/pool-rebuild-index.d.ts +15 -0
- package/dist/src/services/sediment/pool-rebuild-index.js +28 -0
- package/dist/src/services/sediment/pool-write.d.ts +14 -0
- package/dist/src/services/sediment/pool-write.js +25 -0
- package/dist/src/services/sediment/promotion-gate.d.ts +12 -0
- package/dist/src/services/sediment/promotion-gate.js +20 -0
- package/dist/src/services/sediment/types.d.ts +52 -0
- package/dist/src/services/sediment/types.js +1 -0
- package/dist/src/services/session/binding-store.d.ts +1 -1
- package/dist/src/services/session/binding-store.js +1 -1
- package/dist/src/services/session/caller-id-types.d.ts +1 -1
- package/dist/src/services/session/session-manager.d.ts +1 -1
- package/dist/src/services/session/session-manager.js +1 -1
- package/dist/src/services/signal/cancel-handler.js +3 -3
- package/dist/src/services/skill/resume-detector.js +2 -2
- package/dist/src/services/skill/skill-scheduler.d.ts +1 -1
- package/dist/src/services/skill/skill-scheduler.js +1 -1
- package/dist/src/services/skillhub/release-diff.d.ts +18 -0
- package/dist/src/services/skillhub/release-diff.js +38 -0
- package/dist/src/services/skillhub/release-export.d.ts +8 -0
- package/dist/src/services/skillhub/release-export.js +31 -0
- package/dist/src/services/skillhub/release-gc-blobs.d.ts +13 -0
- package/dist/src/services/skillhub/release-gc-blobs.js +32 -0
- package/dist/src/services/skillhub/release-import.d.ts +7 -0
- package/dist/src/services/skillhub/release-import.js +59 -0
- package/dist/src/services/skillhub/release-retain.d.ts +23 -0
- package/dist/src/services/skillhub/release-retain.js +89 -0
- package/dist/src/services/skillhub/sqlite-store.d.ts +22 -0
- package/dist/src/services/skillhub/sqlite-store.js +47 -0
- package/dist/src/services/skillhub/tar-runtime.d.ts +21 -0
- package/dist/src/services/skillhub/tar-runtime.js +91 -0
- package/dist/src/services/skillhub/types.d.ts +105 -0
- package/dist/src/services/skillhub/types.js +1 -0
- package/dist/src/services/skills/skill-conformance-service.js +8 -5
- package/dist/src/services/skills/skill-presence-service.d.ts +5 -5
- package/dist/src/services/skills/skill-presence-service.js +2 -2
- package/dist/src/services/skills/skill-registry.js +27 -0
- package/dist/src/services/skills/skill-runbook-service.js +2 -2
- package/dist/src/services/slice/slice-check-service.js +1 -1
- package/dist/src/services/slice/slice-check-types.d.ts +1 -1
- package/dist/src/services/slice/slice-check-types.js +1 -1
- package/dist/src/services/slice/slice-decompose-types.d.ts +1 -1
- package/dist/src/services/slice/slice-decompose-types.js +1 -1
- package/dist/src/services/standards/missing-standards-detector.d.ts +1 -1
- package/dist/src/services/standards/missing-standards-detector.js +1 -1
- package/dist/src/services/standards/project-standards-service.d.ts +1 -1
- package/dist/src/services/standards/project-standards-service.js +4 -4
- package/dist/src/services/understand/understand-types.d.ts +1 -1
- package/dist/src/services/upgrade/1x-detector-service.js +2 -2
- package/dist/src/services/upgrade/upgrade-service.d.ts +34 -0
- package/dist/src/services/upgrade/upgrade-service.js +52 -30
- package/dist/src/services/verdict/verdict-aggregator.d.ts +1 -1
- package/dist/src/services/workflow/pipeline-verify-service.d.ts +1 -1
- package/dist/src/services/workflow/pipeline-verify-service.js +3 -3
- package/dist/src/services/workflow/workflow-autonomous-service.d.ts +3 -3
- package/dist/src/services/workflow/workflow-autonomous-service.js +2 -2
- package/dist/src/services/workflow/workflow-router-service.d.ts +7 -7
- package/dist/src/services/workflow/workflow-router-service.js +33 -33
- package/dist/src/services/workspace/claude-settings-template.d.ts +2 -2
- package/dist/src/services/workspace/claude-settings-template.js +7 -7
- package/dist/src/services/workspace/workspace-claude-settings-materializer.d.ts +1 -1
- package/dist/src/services/workspace/workspace-claude-settings-materializer.js +1 -1
- package/dist/src/services/workspace/workspace-service.d.ts +4 -4
- package/dist/src/services/workspace/workspace-service.js +2 -2
- package/dist/src/shared/paths.d.ts +1 -1
- package/dist/src/shared/paths.js +1 -1
- package/dist/src/shared/version.d.ts +1 -1
- package/dist/src/shared/version.js +1 -1
- package/dist/src/skills/peaks-maker/index.d.ts +5 -0
- package/dist/src/skills/peaks-maker/index.js +32 -0
- package/output-styles/peaks-skill-swarm.md +3 -3
- package/package.json +8 -3
- package/scripts/install-skills.mjs +29 -4
- package/skills/{peaks-prd → bee/peaks-prd}/SKILL.md +8 -2
- package/skills/{peaks-prd → bee/peaks-prd}/references/workflow.md +1 -1
- package/skills/{peaks-qa → bee/peaks-qa}/SKILL.md +10 -4
- package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-per-request.md +3 -3
- package/skills/{peaks-qa → bee/peaks-qa}/references/browser-validation-contracts.md +2 -2
- package/skills/{peaks-qa → bee/peaks-qa}/references/external-capability-guidance.md +1 -1
- package/skills/{peaks-qa → bee/peaks-qa}/references/qa-fanout-contract.md +3 -3
- package/skills/{peaks-qa → bee/peaks-qa}/references/qa-sub-agent-dispatch.md +7 -7
- package/skills/{peaks-rd → bee/peaks-rd}/SKILL.md +13 -6
- package/skills/{peaks-rd → bee/peaks-rd}/references/browser-self-test-contracts.md +1 -1
- package/skills/{peaks-rd → bee/peaks-rd}/references/mock-data-placement.md +1 -1
- package/skills/{peaks-rd → bee/peaks-rd}/references/parallel-review-fanout.md +1 -1
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-fanout-contracts.md +1 -1
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-runbook.md +2 -2
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-sub-agent-dispatch.md +13 -13
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-transition-gates.md +2 -2
- package/skills/{peaks-rd → bee/peaks-rd}/references/skill-presence-and-title.md +1 -1
- package/skills/{peaks-reviewer → bee/peaks-reviewer}/SKILL.md +2 -2
- package/skills/{peaks-sc → bee/peaks-sc}/SKILL.md +8 -2
- package/skills/{peaks-txt → bee/peaks-txt}/SKILL.md +11 -5
- package/skills/{peaks-ui → bee/peaks-ui}/SKILL.md +19 -13
- package/skills/peaks-audit/SKILL.md +1 -1
- package/skills/{peaks-solo → peaks-code}/SKILL.md +29 -29
- package/skills/{peaks-solo → peaks-code}/references/a2a-artifact-mapping.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/anchoring-and-session-info.md +6 -6
- package/skills/{peaks-solo → peaks-code}/references/artifact-contracts.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/boundaries.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/browser-workflow.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/codegraph-orchestration.md +1 -1
- package/skills/peaks-code/references/command-migration.md +3 -0
- package/skills/{peaks-solo → peaks-code}/references/completion-handoff.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/context-governance.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/dag-orchestrator.md +7 -7
- package/skills/{peaks-solo → peaks-code}/references/external-references.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/fanout-mandatory.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/fast-mode.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/frontend-only-mode.md +10 -10
- package/skills/{peaks-solo → peaks-code}/references/job-loop.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/local-artifact-workspace.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/micro-cycle.md +23 -23
- package/skills/{peaks-solo → peaks-code}/references/mode-selection-with-stale-presence.md +16 -16
- package/skills/{peaks-solo → peaks-code}/references/mode-selection.md +4 -4
- package/skills/{peaks-solo → peaks-code}/references/openspec-workflow.md +17 -17
- package/skills/{peaks-solo → peaks-code}/references/periodic-checkpoint.md +4 -4
- package/skills/{peaks-solo → peaks-code}/references/project-scan-checklist.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/quality-gate-cheatsheet.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/refactor-mode.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/resume-detection.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/runbook.md +20 -20
- package/skills/{peaks-solo → peaks-code}/references/skill-presence-and-title.md +3 -3
- package/skills/{peaks-solo → peaks-code}/references/standards-preflight.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/step-0-55-1x-detection.md +6 -6
- package/skills/{peaks-solo → peaks-code}/references/step-0-8-gate.md +11 -11
- package/skills/{peaks-solo → peaks-code}/references/sub-agent-dispatch.md +17 -17
- package/skills/{peaks-solo → peaks-code}/references/swarm-dispatch-contract.md +22 -22
- package/skills/{peaks-solo → peaks-code}/references/workflow-gates-and-types.md +4 -4
- package/skills/{peaks-solo → peaks-code}/references/workflow.md +5 -5
- package/skills/peaks-doctor/SKILL.md +1 -1
- package/skills/peaks-doctor/references/doctor-check-catalog.md +1 -1
- package/skills/peaks-final-review/SKILL.md +3 -3
- package/skills/peaks-final-review/references/4-dimensions.md +1 -1
- package/skills/peaks-ide/SKILL.md +1 -1
- package/skills/{peaks-solo-resume → peaks-resume}/SKILL.md +15 -15
- package/skills/peaks-sop/SKILL.md +1 -1
- package/skills/{peaks-solo-status → peaks-status}/SKILL.md +14 -14
- package/skills/{peaks-solo-test → peaks-test}/SKILL.md +12 -12
- package/skills/peaks-solo/references/command-migration.md +0 -3
- /package/dist/src/services/{solo → code}/batch-heartbeat-poller.d.ts +0 -0
- /package/dist/src/services/{solo → code}/batch-heartbeat-poller.js +0 -0
- /package/dist/src/services/{solo → code}/status-line-renderer.js +0 -0
- /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/SKILL.md +0 -0
- /package/skills/{peaks-perf-audit → bee/peaks-perf-audit}/references/audit-protocol.md +0 -0
- /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-prd → bee/peaks-prd}/references/artifact-per-request.md +0 -0
- /package/skills/{peaks-prd → bee/peaks-prd}/references/command-migration.md +0 -0
- /package/skills/{peaks-prd → bee/peaks-prd}/references/prd-for-multi-pass.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/codegraph-regression-focus.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/command-migration.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/openspec-validation-gate.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-compact-handoff.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-context-governance.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-gstack-integration.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-local-artifacts.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-matt-pocock-integration.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-perf-test-plan.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-refactor-role.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-runbook.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-security-test-plan.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-skill-presence.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-standards-preflight.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/qa-transition-gates.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/reading-handoff-frontmatter.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/regression-gates.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/requirement-boundary-recheck.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/test-case-generation.md +0 -0
- /package/skills/{peaks-qa → bee/peaks-qa}/references/test-report-output.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-and-standards-output.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/artifact-per-request.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/browser-action-wrapper.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/code-reviewer-4dim-hint.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/codegraph-project-analysis.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/command-migration.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/compact-handoff.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/external-references.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/frontend-project-generation.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/karpathy-reviewer-prompt.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/library-version-awareness.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/mandatory-perf-baseline.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/matt-pocock-integration.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/ocr-integration.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/openspec-cli.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-context-governance.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-gstack-integration.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/rd-standards-preflight.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/reading-v2-slice-results.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/refactor-workflow.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/v2-12-fanout-collapse.md +0 -0
- /package/skills/{peaks-rd → bee/peaks-rd}/references/writing-handoff-frontmatter.md +0 -0
- /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-prompt.md +0 -0
- /package/skills/{peaks-reviewer → bee/peaks-reviewer}/references/reviewer-schema.md +0 -0
- /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-sc → bee/peaks-sc}/references/artifact-retention.md +0 -0
- /package/skills/{peaks-sc → bee/peaks-sc}/references/command-migration.md +0 -0
- /package/skills/{peaks-sc → bee/peaks-sc}/references/openspec-commit-boundaries.md +0 -0
- /package/skills/{peaks-security-audit → bee/peaks-security-audit}/SKILL.md +0 -0
- /package/skills/{peaks-security-audit → bee/peaks-security-audit}/references/audit-protocol.md +0 -0
- /package/skills/{peaks-txt → bee/peaks-txt}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-txt → bee/peaks-txt}/references/command-migration.md +0 -0
- /package/skills/{peaks-txt → bee/peaks-txt}/references/context-capsule.md +0 -0
- /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-contracts.md +0 -0
- /package/skills/{peaks-ui → bee/peaks-ui}/references/artifact-per-request.md +0 -0
- /package/skills/{peaks-ui → bee/peaks-ui}/references/command-migration.md +0 -0
- /package/skills/{peaks-ui → bee/peaks-ui}/references/workflow.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/checkpoint-resume.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/cross-date-session-check.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/envelope-contract.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/existing-system-extraction.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/external-skill-invocation.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/gstack-integration.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/headroom-integration.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/playwright-mcp-multi-terminal.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/project-memory-loading.md +0 -0
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-txt
|
|
3
|
-
description:
|
|
3
|
+
description: |
|
|
4
|
+
Context and knowledge role for Peaks-Loop (LLM-only internal role; not user-invocable.
|
|
5
|
+
Triggered by peaks-code via `peaks sub-agent dispatch --role txt`.)
|
|
6
|
+
Use when a workflow needs context capsules, role-specific context slices, decision records,
|
|
7
|
+
assumptions, discarded options, staleness checks, lessons, or reusable project memory.
|
|
8
|
+
visibility: internal
|
|
9
|
+
---
|
|
4
10
|
---
|
|
5
11
|
|
|
6
12
|
# Peaks-Loop TXT
|
|
@@ -15,7 +21,7 @@ Before any analysis or tool call, immediately run:
|
|
|
15
21
|
peaks skill presence:set peaks-txt --project <repo> --mode <mode> --gate startup
|
|
16
22
|
```
|
|
17
23
|
|
|
18
|
-
**When invoked as a sub-agent (peaks-
|
|
24
|
+
**When invoked as a sub-agent (peaks-code swarm):** do NOT call `peaks skill presence:set` (Code owns the active-skill marker) and do NOT spawn your own session. Use the parent's sid — read `.peaks/_runtime/session.json` or pass `--session-id <parent-sid>` to any session-creating CLI. The new `peaks session info --active` reads the canonical binding for you.
|
|
19
25
|
|
|
20
26
|
On the first presence:set in a project, ensure the out-of-band status bar is installed so the user can see at a glance that Peaks is orchestrating — it renders the active skill in Claude Code's terminal status line, independent of model output:
|
|
21
27
|
|
|
@@ -62,7 +68,7 @@ When used alone or when a workflow needs portable artifacts that must survive se
|
|
|
62
68
|
|
|
63
69
|
```markdown
|
|
64
70
|
## Handoff: <request-id>
|
|
65
|
-
- **Mode:**
|
|
71
|
+
- **Mode:** code | assisted | swarm | strict
|
|
66
72
|
- **Status:** complete | blocked | return-to-rd
|
|
67
73
|
- **Artifacts:**
|
|
68
74
|
- PRD: .peaks/_runtime/<sessionId>/prd/requests/<rid>.md
|
|
@@ -108,7 +114,7 @@ Each entry should include:
|
|
|
108
114
|
- lesson or rule;
|
|
109
115
|
- why it exists;
|
|
110
116
|
- affected skills;
|
|
111
|
-
- how future PRD/RD/UI/QA/SC/
|
|
117
|
+
- how future PRD/RD/UI/QA/SC/Code workflows should apply it;
|
|
112
118
|
- whether it is stable enough for `.peaks/memory` extraction.
|
|
113
119
|
|
|
114
120
|
## Project memory guidance
|
|
@@ -287,7 +293,7 @@ Reference: `references/context-capsule.md`.
|
|
|
287
293
|
|
|
288
294
|
## Sub-agent context governance (G8 + G9 — slice #010, TXT reducer view)
|
|
289
295
|
|
|
290
|
-
> peaks-txt is the TXT reducer; it sees the metadata-only view from G7 + the share entries from G8. The TXT handoff summarizes the slice at the slice-close gate. Detailed: `skills/peaks-
|
|
296
|
+
> peaks-txt is the TXT reducer; it sees the metadata-only view from G7 + the share entries from G8. The TXT handoff summarizes the slice at the slice-close gate. Detailed: `skills/peaks-code/references/context-governance.md`.
|
|
291
297
|
|
|
292
298
|
### G8 — TXT reducer sees share entries on completion
|
|
293
299
|
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-ui
|
|
3
|
-
description:
|
|
3
|
+
description: |
|
|
4
|
+
UI and experience role for Peaks-Loop (LLM-only internal role; not user-invocable.
|
|
5
|
+
Triggered by peaks-code via `peaks sub-agent dispatch --role ui`.)
|
|
6
|
+
Use when a workflow touches UI/UX, interaction design, visual direction, design systems,
|
|
7
|
+
frontend page behavior, high-fidelity HTML prototypes, or UI regression seeds.
|
|
8
|
+
visibility: internal
|
|
9
|
+
---
|
|
4
10
|
---
|
|
5
11
|
|
|
6
12
|
# Peaks-Loop UI
|
|
@@ -26,19 +32,19 @@ find . -maxdepth 1 -name '*.png' 2>&1
|
|
|
26
32
|
|
|
27
33
|
UI inherits `peaks-qa`'s hard-block contract: `AskUserQuestion` with three options (logged in / skip / cancel); no silent downgrade, no DOM-state inference.
|
|
28
34
|
|
|
29
|
-
## Sub-agent dispatch (when launched by peaks-
|
|
35
|
+
## Sub-agent dispatch (when launched by peaks-code swarm)
|
|
30
36
|
|
|
31
|
-
When this skill is launched as a sub-agent via `peaks sub-agent dispatch <role>` from `peaks-
|
|
37
|
+
When this skill is launched as a sub-agent via `peaks sub-agent dispatch <role>` from `peaks-code`, these sections are **suspended** for the sub-agent run:
|
|
32
38
|
|
|
33
39
|
- **Session id** — use parent's sid (`.peaks/_runtime/session.json` or `--session-id <parent-sid>`). Do NOT spawn your own session; `peaks session info --active` reads the canonical binding.
|
|
34
|
-
- **Skill presence** — do NOT call `peaks skill presence:set peaks-ui`;
|
|
35
|
-
- **Workspace initialization** —
|
|
36
|
-
- **Mode selection** —
|
|
37
|
-
- **Statusline install** — done by
|
|
40
|
+
- **Skill presence** — do NOT call `peaks skill presence:set peaks-ui`; Code owns `.peaks/.active-skill.json`. Marker file at `.peaks/_runtime/<session-id>/system/sub-agent-ui.json` only.
|
|
41
|
+
- **Workspace initialization** — Code ran `peaks workspace init` before fan-out; do not re-run.
|
|
42
|
+
- **Mode selection** — Code chose the mode.
|
|
43
|
+
- **Statusline install** — done by Code at startup.
|
|
38
44
|
|
|
39
45
|
What the sub-agent **MUST** still do:
|
|
40
46
|
|
|
41
|
-
1. **Do NOT call `peaks request init`** —
|
|
47
|
+
1. **Do NOT call `peaks request init`** — Code already initialised the slot. Read via `peaks request show <rid> --role ui --project <repo> --json` if needed.
|
|
42
48
|
2. Read PRD scope via `peaks request show <rid> --role prd --project <repo> --json`.
|
|
43
49
|
3. Read `rd/project-scan.md` for component library / CSS framework / design-system context.
|
|
44
50
|
4. Run the prototype fidelity check (Figma / PRD visuals / headed browser).
|
|
@@ -59,13 +65,13 @@ What the sub-agent **MUST** still do:
|
|
|
59
65
|
**Hard prohibitions** (sub-agent context):
|
|
60
66
|
|
|
61
67
|
- Do NOT call `Skill(skill="...")`.
|
|
62
|
-
- Do NOT call `peaks skill presence:set` —
|
|
68
|
+
- Do NOT call `peaks skill presence:set` — Code owns active-skill.
|
|
63
69
|
- Do NOT modify application code. UI is design-direction only.
|
|
64
|
-
- Do NOT install MCP servers. If Playwright MCP is missing and headed browser is required, return `{"status":"blocked","blockedReason":"playwright-mcp-unavailable"}` for
|
|
70
|
+
- Do NOT install MCP servers. If Playwright MCP is missing and headed browser is required, return `{"status":"blocked","blockedReason":"playwright-mcp-unavailable"}` for Code escalation. (peaks-loop no longer manages MCP install — user runs `claude mcp add playwright -- npx @playwright/mcp@latest` in Claude Code.)
|
|
65
71
|
- Do NOT commit, push, install hooks, or apply settings.json mutations.
|
|
66
72
|
- Do NOT ask user questions; return `{"status":"blocked","blockedReason":"<text>"}` if blocked.
|
|
67
73
|
|
|
68
|
-
If the request does not affect user-visible behavior (no frontend keyword hit, `frontendOnly=false`), the swarm plan should not include UI at all —
|
|
74
|
+
If the request does not affect user-visible behavior (no frontend keyword hit, `frontendOnly=false`), the swarm plan should not include UI at all — Code will not launch this sub-agent. But if it does launch you and you determine the work is non-visual, return `{"status":"skipped","reason":"non-frontend-request"}` so Code can record the misfire.
|
|
69
75
|
|
|
70
76
|
## Skill presence (MANDATORY first action — main-loop context only)
|
|
71
77
|
|
|
@@ -217,7 +223,7 @@ Use gstack as a design-review workflow reference for the `Plan → Review → Te
|
|
|
217
223
|
- map browser walkthrough concepts to UI regression seeds when runtime validation is approved;
|
|
218
224
|
- keep accessibility, performance, and visual direction as Peaks-Loop UI acceptance inputs.
|
|
219
225
|
|
|
220
|
-
For frontend work, especially full-auto mode, use the Playwright MCP to inspect the running page or prototype before accepting the UI direction. The LLM checks its own tool list for any Playwright MCP entry in the LLM tool list; if present, it invokes the tools by name directly (browser_navigate / browser_snapshot / browser_take_screenshot / browser_console_messages / browser_network_requests / browser_close) — no peaks-loop envelope. Playwright MCP launches a headed browser on demand; if the tool list is empty, the user installs via `claude mcp add playwright -- npx @playwright/mcp@latest` (Claude Code) or the IDE's own MCP install path. (Chrome DevTools MCP is a secondary surface that connects to an already-running Chrome via `--remote-debugging-port=9222`; it does NOT launch a browser on its own.) If login, CAPTCHA, SSO, or MFA appears, the visible browser is already open; wait for the user to complete login and explicitly confirm completion before continuing. Capture only sanitized visible regressions as UI feedback for design/RD; do not retain login URLs, cookies, headers, tokens, storage state, browser traces, or screenshots/logs containing PII or SSO/MFA material. Canonical browser workflow: `peaks-
|
|
226
|
+
For frontend work, especially full-auto mode, use the Playwright MCP to inspect the running page or prototype before accepting the UI direction. The LLM checks its own tool list for any Playwright MCP entry in the LLM tool list; if present, it invokes the tools by name directly (browser_navigate / browser_snapshot / browser_take_screenshot / browser_console_messages / browser_network_requests / browser_close) — no peaks-loop envelope. Playwright MCP launches a headed browser on demand; if the tool list is empty, the user installs via `claude mcp add playwright -- npx @playwright/mcp@latest` (Claude Code) or the IDE's own MCP install path. (Chrome DevTools MCP is a secondary surface that connects to an already-running Chrome via `--remote-debugging-port=9222`; it does NOT launch a browser on its own.) If login, CAPTCHA, SSO, or MFA appears, the visible browser is already open; wait for the user to complete login and explicitly confirm completion before continuing. Capture only sanitized visible regressions as UI feedback for design/RD; do not retain login URLs, cookies, headers, tokens, storage state, browser traces, or screenshots/logs containing PII or SSO/MFA material. Canonical browser workflow: `peaks-code/references/browser-workflow.md`.
|
|
221
227
|
|
|
222
228
|
## Prototype fidelity gate (MANDATORY — check BEFORE any design work)
|
|
223
229
|
|
|
@@ -344,7 +350,7 @@ Do not own backend architecture, non-UI implementation, runtime hook installatio
|
|
|
344
350
|
|
|
345
351
|
## Sub-agent context governance (slice #010)
|
|
346
352
|
|
|
347
|
-
UI sub-agents follow the same G7 metadata-only + G8.6 share protocol. UI artifacts are large binary-ish; the 1MB artifact size limit (G7.3) applies. Detailed: `skills/peaks-
|
|
353
|
+
UI sub-agents follow the same G7 metadata-only + G8.6 share protocol. UI artifacts are large binary-ish; the 1MB artifact size limit (G7.3) applies. Detailed: `skills/peaks-code/references/context-governance.md`.
|
|
348
354
|
|
|
349
355
|
### G7 — UI sub-agent protocol
|
|
350
356
|
|
|
@@ -36,7 +36,7 @@ Invoke `peaks-audit` when **any** of these are true:
|
|
|
36
36
|
|
|
37
37
|
- A human just expressed a software-development need and no accepted `proposedGoal` exists yet.
|
|
38
38
|
- A previous audit was rejected (any dimension missing, malformed JSON, or the user said "redo the audit").
|
|
39
|
-
- A drift detector (peaks-doctor, peaks-
|
|
39
|
+
- A drift detector (peaks-doctor, peaks-code) flagged that an in-flight slice lost its goal binding.
|
|
40
40
|
- The user typed `/peaks-audit` or said "audit this", "scope this", "what would this take", "is this a good idea".
|
|
41
41
|
|
|
42
42
|
Do NOT invoke peaks-audit when the user is asking for a code review, a test run, or a deployment — those are downstream skills.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: peaks-
|
|
3
|
-
description:
|
|
2
|
+
name: peaks-code
|
|
3
|
+
description: Code-domain loop engineering orchestrator for the Peaks-Loop skill family. Use when the user asks Peaks-Loop to handle a code-repo workflow end-to-end (端到端/全流程/需求开发), especially from a product document (PRD/飞书文档/Feishu doc) through implementation and validation. Coordinates peaks-prd, peaks-rd, peaks-qa, peaks-ui, peaks-sc, and peaks-txt while preserving user confirmation gates. Triggers on `/peaks-code`, "peaks code", "全流程开发", "端到端迭代". General primitives (peaks-resume / peaks-status / peaks-test) are sibling skills, not children.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Single-scope-axis naming convention (2.7.1)
|
|
@@ -15,9 +15,9 @@ Every sub-agent dispatch (`peaks-prd`, `peaks-rd`, `peaks-qa`, `peaks-ui`, `peak
|
|
|
15
15
|
|
|
16
16
|
Never create `.peaks/_runtime/<YYYY-MM-DD-*>/` at the top level of `.peaks/`. ALL reviewable artifact dirs live under `.peaks/_runtime/<sessionId>/<role>/...` (gitignored) — never as siblings of `.peaks/_runtime/`. `peaks workspace init` creates only `.peaks/_runtime/<sessionId>/session.json`. If you find yourself about to write a date-prefixed directory directly under `.peaks/`, STOP and reroute under `.peaks/_runtime/<sessionId>/`. The `.gitignore` rule + vitest guard at `tests/unit/workspace/top-level-change-id-guard.test.ts` enforce this.
|
|
17
17
|
|
|
18
|
-
# Peaks-Loop
|
|
18
|
+
# Peaks-Loop Code
|
|
19
19
|
|
|
20
|
-
Peaks-Loop
|
|
20
|
+
Peaks-Loop Code is the orchestration facade for the Peaks-Loop short skill family. Use it to identify the user scenario, recommend an execution mode, coordinate role skills, and produce the final handoff report. Do not collapse role responsibilities into this skill.
|
|
21
21
|
|
|
22
22
|
## 产品定位(2026-06-28 校准)
|
|
23
23
|
|
|
@@ -29,7 +29,7 @@ This skill is the **primary surface**. The `peaks <cmd>` CLI is **auxiliary**
|
|
|
29
29
|
|
|
30
30
|
## Code-Change Red Line (BLOCKING — read before ANY tool call)
|
|
31
31
|
|
|
32
|
-
**Peaks-Loop
|
|
32
|
+
**Peaks-Loop Code is an orchestrator, NOT an implementer. You MUST NOT write, edit, or modify any application source code directly.** Every code change goes through `peaks-code → RD → QA → verdict`. **If you catch yourself about to write code, STOP.** Hand off to RD. Before declaring workflow complete, run `peaks workflow verify-pipeline --rid <rid> --project <repo> --json`.
|
|
33
33
|
|
|
34
34
|
## Peaks-Loop Startup sequence (MANDATORY — execute in order)
|
|
35
35
|
|
|
@@ -43,7 +43,7 @@ When a NEW conversation opens on a session whose `lastActivity` is from today AN
|
|
|
43
43
|
|
|
44
44
|
### Peaks-Loop Step N: Periodic checkpoint (auto-fire, no user action)
|
|
45
45
|
|
|
46
|
-
Proactive context-overflow defense. CLI: `peaks session checkpoint [--reason <r>] [...flags]`. Fire `--reason periodic` every 20 tool calls (G1 hard-coded), `--reason artifact-written` per PRD/RD/QA/TXT write. See `references/periodic-checkpoint.md` (otherwise `tests/unit/
|
|
46
|
+
Proactive context-overflow defense. CLI: `peaks session checkpoint [--reason <r>] [...flags]`. Fire `--reason periodic` every 20 tool calls (G1 hard-coded), `--reason artifact-written` per PRD/RD/QA/TXT write. See `references/periodic-checkpoint.md` (otherwise `tests/unit/code/checkpoint-periodic-frequency.test.ts` fails).
|
|
47
47
|
|
|
48
48
|
### Peaks-Loop Step 0.5: OpenSpec first-run opt-in (conditional)
|
|
49
49
|
|
|
@@ -61,11 +61,11 @@ After autonomous work (RD, QA, security, perf), invoke peaks-final-review for 4-
|
|
|
61
61
|
|
|
62
62
|
### Peaks-Loop Step N+2: Main-session context monitor (D6 + slice 2026-07-02)
|
|
63
63
|
|
|
64
|
-
After every 4th tool call, probe via `peaks
|
|
64
|
+
After every 4th tool call, probe via `peaks code context-now --project <repo> --json`. Thresholds: 50% / **0.85 pre-compact / 0.95 red-line** (v2.13.0). **In Job mode ≥ 0.85 is MANDATORY auto-compact** (not advisory): Code MUST call `peaks session auto-compact --execute --project <repo>` autonomously. Pass `--enforce-job-mode` to force the MANDATORY semantics in single-rid mode too (`job-shape.json` auto-enables it). **≥ 0.95** red line: next Bash/Task call fires `peaks session auto-compact-hook` (PreToolUse), in-band spawning `claude --compact`. **Karpathy §4 exception**: compact red line keeps runner alive → zero-intervention wins; LLM MUST NOT ask user to run `/compact`. Honor `--in-flight-batch` (D6.e).
|
|
65
65
|
|
|
66
66
|
### Peaks-Loop Step 0: Anchor the workflow (MANDATORY FIRST ACTIONS — no bail-out)
|
|
67
67
|
|
|
68
|
-
Run `peaks workspace init` + `peaks skill presence:set peaks-
|
|
68
|
+
Run `peaks workspace init` + `peaks skill presence:set peaks-code` BEFORE any analysis, role handoff, or mode-selection question. Even "分析下这个项目" / "看一下代码" / one-line questions anchor first.
|
|
69
69
|
|
|
70
70
|
→ see `references/anchoring-and-session-info.md` for the full Step 0 contract + session-conflict resolution.
|
|
71
71
|
|
|
@@ -79,9 +79,9 @@ Run `peaks workspace init` + `peaks skill presence:set peaks-solo` BEFORE any an
|
|
|
79
79
|
|
|
80
80
|
After Step 0, run the resume-detection probe; surface via `AskUserQuestion` if a slice is in flight.
|
|
81
81
|
|
|
82
|
-
**v3.1.2 resume rule:** if `.peaks/_runtime/<sessionId>/job/<jid>/progress.json` exists, read it FIRST and surface `Next: slice #N of M (<currentSlice>)`. `peaks job progress --job-id <jid> [--allow-missing]` is the canonical reader; the same JSON is surfaced by `peaks
|
|
82
|
+
**v3.1.2 resume rule:** if `.peaks/_runtime/<sessionId>/job/<jid>/progress.json` exists, read it FIRST and surface `Next: slice #N of M (<currentSlice>)`. `peaks job progress --job-id <jid> [--allow-missing]` is the canonical reader; the same JSON is surfaced by `peaks code gate-step-08` on every Bash call.
|
|
83
83
|
|
|
84
|
-
**v2.11.0 D7 override:** if user just `/compact`ed, run `peaks
|
|
84
|
+
**v2.11.0 D7 override:** if user just `/compact`ed, run `peaks code post-compact-detect --project <repo> --json` FIRST; `shouldAutoResume: true` skips AskUserQuestion (D7.b). Log to `.peaks/_runtime/<sessionId>/txt/auto-decisions.md`.
|
|
85
85
|
|
|
86
86
|
→ see `references/resume-detection.md`.
|
|
87
87
|
|
|
@@ -91,15 +91,15 @@ After Step 0.7 returns "fresh", run `peaks upgrade --detect-1x --project <root>
|
|
|
91
91
|
|
|
92
92
|
### Peaks-Loop Step 0.8 — Job 启动 (BLOCKING on LLM judgement — v3.1.1 patch + v3.1.2 mechanical gates)
|
|
93
93
|
|
|
94
|
-
The CLI is a **recorder + gate** for job-shape (the LLM judges). LLM calls `peaks
|
|
94
|
+
The CLI is a **recorder + gate** for job-shape (the LLM judges). LLM calls `peaks code detect-job --is-job <bool> --rationale <text> --suggested-job-id <jid> --suggested-strategy <single|rotating> --confidence <high|medium|low>`, which writes `.peaks/_runtime/<sessionId>/job-shape.json`. Downstream steps call `read-job-shape` and refuse if missing.
|
|
95
95
|
|
|
96
|
-
**Hard rule (v3.1.1 red-line #10):** LLM MUST NOT skip `peaks
|
|
96
|
+
**Hard rule (v3.1.1 red-line #10):** LLM MUST NOT skip `peaks code detect-job`. If `read-job-shape` throws `JOB_SHAPE_NOT_DECIDED`, record a decision before proceeding.
|
|
97
97
|
|
|
98
98
|
**v3.1.2 mechanical gates** (recorder-only was bypassed twice):
|
|
99
99
|
|
|
100
|
-
- **PreToolUse hook** — `peaks workspace init` installs the `Bash` matcher `peaks
|
|
101
|
-
- **Size-fear ban** — `peaks
|
|
102
|
-
- **Forced auto-compact** — `peaks
|
|
100
|
+
- **PreToolUse hook** — `peaks workspace init` installs the `Bash` matcher `peaks code gate-step-08 --project .`. Exits 0 when `job-shape.json` exists (also emits `Next: slice #N+1 of M` from `progress.json`); exits 2 BLOCKED when missing AND prompt matches a fail-closed backup regex; otherwise 0 (allow).
|
|
101
|
+
- **Size-fear ban** — `peaks code emit-handoff` refuses a final handoff while `remaining > 0` under Job mode.
|
|
102
|
+
- **Forced auto-compact** — `peaks code context-now --enforce-job-mode` (auto-enabled on `isJob=true`) returns `auto-compact-now` at ≥ 0.85; **In Job mode ≥ 0.85 is MANDATORY auto-compact** (not advisory).
|
|
103
103
|
- **On-disk slice progress** — `peaks job checkpoint --state done` writes `progress.json`; `peaks job progress --job-id <jid> [--allow-missing]` is the canonical reader.
|
|
104
104
|
|
|
105
105
|
Full mechanics (judgement criteria, hook table, backup-regex rationale, hook wiring) at `references/step-0-8-gate.md`.
|
|
@@ -128,7 +128,7 @@ Use `AskUserQuestion` with `Full auto (Recommended)` first when user did not nam
|
|
|
128
128
|
|
|
129
129
|
### Peaks-Loop Step 2: Re-set skill presence with the chosen mode
|
|
130
130
|
|
|
131
|
-
Re-run `peaks skill presence:set peaks-
|
|
131
|
+
Re-run `peaks skill presence:set peaks-code --mode <mode-value> --gate startup`. Install statusline on first run (`peaks statusline install`). → `references/skill-presence-and-title.md`.
|
|
132
132
|
|
|
133
133
|
### Peaks-Loop Step 2.3: Load project memory (durable, LLM-authored memories)
|
|
134
134
|
|
|
@@ -140,11 +140,11 @@ Extract a short title from the user's first request (8-20 Chinese chars or 4-10
|
|
|
140
140
|
|
|
141
141
|
## Sub-agent session sharing (MANDATORY — one conversation = one sid)
|
|
142
142
|
|
|
143
|
-
When peaks-
|
|
143
|
+
When peaks-code dispatches a sub-agent (peaks-rd, peaks-qa, peaks-ui, peaks-txt, peaks-sc), the prompt MUST include the parent's sid. The sub-agent MUST NOT call `peaks workspace init` (would orphan the parent's binding).
|
|
144
144
|
|
|
145
145
|
## Boundaries
|
|
146
146
|
|
|
147
|
-
Peaks-Loop
|
|
147
|
+
Peaks-Loop Code may: identify scenarios, recommend profiles, coordinate role skills through artifacts, coordinate project memory extraction, request user confirmation at risk/commit boundaries. Peaks-Loop Code must NOT silently install hooks / create agents / enable MCP / modify Claude settings / create GitHub repos / bypass role-skill artifacts. → `references/boundaries.md`.
|
|
148
148
|
|
|
149
149
|
## Peaks-Loop GStack integration
|
|
150
150
|
|
|
@@ -160,11 +160,11 @@ Before handing off to `peaks-rd`, scan the project and record findings to `.peak
|
|
|
160
160
|
|
|
161
161
|
## Peaks-Loop Frontend-only development mode
|
|
162
162
|
|
|
163
|
-
When the project has no live backend (no swagger.json, no API server),
|
|
163
|
+
When the project has no live backend (no swagger.json, no API server), Code must activate frontend-only mode. The CLI is authoritative — read `frontendOnly` and `frontendOnlyReason` from `peaks scan archetype --json`. → `references/frontend-only-mode.md`.
|
|
164
164
|
|
|
165
165
|
## Peaks-Loop Request type classification + Workflow order + Transition verification gates
|
|
166
166
|
|
|
167
|
-
The contract for the 6-type classification table, the 11-step workflow order, and the 7 transition verification gates (A through G with their `ls` / `grep` shell snippets) lives in `references/workflow-gates-and-types.md`. The peaks-
|
|
167
|
+
The contract for the 6-type classification table, the 11-step workflow order, and the 7 transition verification gates (A through G with their `ls` / `grep` shell snippets) lives in `references/workflow-gates-and-types.md`. The peaks-code narrative references those gate numbers (Gate A through Gate G) — keep both files in lockstep when adding or renaming a gate.
|
|
168
168
|
|
|
169
169
|
## Peaks-Loop Default sub-agent fan-out (≥ 2 leaves/topological level → `--from-dag`)
|
|
170
170
|
|
|
@@ -186,7 +186,7 @@ Write DAG → `.peaks/_runtime/<sessionId>/sc/slice-dag.json`, run `peaks sub-ag
|
|
|
186
186
|
|
|
187
187
|
## Peaks-Loop Mandatory RD QA repair loop (AUTO-PROCEED)
|
|
188
188
|
|
|
189
|
-
After `peaks-rd` finishes,
|
|
189
|
+
After `peaks-rd` finishes, Code MUST auto-route to `peaks-qa` without waiting for confirmation. Cap: 3 cycles; on 3rd failure emit blocked TXT handoff. Full 5-step procedure at `references/micro-cycle.md`.
|
|
190
190
|
|
|
191
191
|
## Default runbook
|
|
192
192
|
|
|
@@ -204,7 +204,7 @@ Gather via `peaks standards init/update --project <path> --dry-run`. Standards m
|
|
|
204
204
|
|
|
205
205
|
## Peaks-Loop Refactor mode
|
|
206
206
|
|
|
207
|
-
Read `references/refactor-mode.md` first. Default MVP: `peaks-
|
|
207
|
+
Read `references/refactor-mode.md` first. Default MVP: `peaks-code refactor`. Red lines: understand before changes, ≥95% UT coverage, split broad refactors, strict verifiable specs, 100% acceptance per slice.
|
|
208
208
|
|
|
209
209
|
## Peaks-Loop Quality-gate commands (CLI cheat sheet)
|
|
210
210
|
|
|
@@ -212,11 +212,11 @@ Five CLI commands harden the workflow against silent skips: `peaks request lint`
|
|
|
212
212
|
|
|
213
213
|
## Peaks-Loop Completion handoff
|
|
214
214
|
|
|
215
|
-
After final validation, refresh project-local standards via `peaks standards init/update` (never hand-write). Use Peaks-Loop TXT for the compact handoff capsule. **Presence management is delegated to the last downstream skill** — peaks-
|
|
215
|
+
After final validation, refresh project-local standards via `peaks standards init/update` (never hand-write). Use Peaks-Loop TXT for the compact handoff capsule. **Presence management is delegated to the last downstream skill** — peaks-code does not call `peaks skill presence:clear` itself.
|
|
216
216
|
|
|
217
217
|
## Peaks-Loop Step 11: Memory sediment (BLOCKING on workflow complete)
|
|
218
218
|
|
|
219
|
-
> **Hard rule.**
|
|
219
|
+
> **Hard rule.** Code MUST NOT declare a workflow complete until Step 11 has produced ≥ 1 file in `.peaks/memory/` (the durable, LLM-authored memory store) OR the user has explicitly approved a no-sediment outcome via AskUserQuestion. Applies to **all modes** including `assisted` and `strict` — `assisted` previously skipped Step 10 because there was no `[CONFIRM]` gate; Step 11 fixes that.
|
|
220
220
|
|
|
221
221
|
### Substeps (BLOCKING)
|
|
222
222
|
|
|
@@ -228,19 +228,19 @@ After final validation, refresh project-local standards via `peaks standards ini
|
|
|
228
228
|
|
|
229
229
|
**11d — Gate C (zero-write outcome):** If `extractedCount === 0` after 11c, fire AskUserQuestion:
|
|
230
230
|
|
|
231
|
-
> "本次
|
|
231
|
+
> "本次 code 未沉淀任何 `.peaks/memory` 文件。可选: (a) 回去在 handoff.md 嵌入至少 1 个 `peaks-memory:start` block 后重试; (b) 显式接受 no-sediment 并记录为 lesson; (c) 取消完成。"
|
|
232
232
|
|
|
233
|
-
Default option = (a).
|
|
233
|
+
Default option = (a). Code MUST NOT silently accept (b) without user pick. Full bash + flow at `references/runbook.md` §Step 11.
|
|
234
234
|
|
|
235
235
|
**Why this step exists:** audit 2026-07-03 confirmed 2 consecutive sessions produced zero `.peaks/memory/` files despite completing RD + QA + handoff artifacts; `assisted` mode silently skipped runbook Step 10 (no STOP condition). **Why `peaks memory extract` (not `peaks project memories:extract`):** the artifact-scoped extract is canonical; the batch-scoped sibling is for non-handoff flows. Always use `peaks memory extract --apply`.
|
|
236
236
|
|
|
237
237
|
## Peaks-Loop External references and lifecycle
|
|
238
238
|
|
|
239
|
-
3rd-party integrations (codegraph, mattpocock/skills, shadcn/ui, MCPs, Context7) follow Discovery → Reference → Side effect through Peaks CLI only. Run `peaks capabilities` for capability discovery; treat external skills as reference material only. MCP servers (Playwright / Chrome DevTools / Figma) are user-installed — check the tool list for `mcp__<server>__*` entries. Do not execute upstream installer / run upstream commands / persist sensitive examples / install upstream resources directly — funnel side effects through the Peaks CLI surface. Peaks-Loop
|
|
239
|
+
3rd-party integrations (codegraph, mattpocock/skills, shadcn/ui, MCPs, Context7) follow Discovery → Reference → Side effect through Peaks CLI only. Run `peaks capabilities` for capability discovery; treat external skills as reference material only. MCP servers (Playwright / Chrome DevTools / Figma) are user-installed — check the tool list for `mcp__<server>__*` entries. Do not execute upstream installer / run upstream commands / persist sensitive examples / install upstream resources directly — funnel side effects through the Peaks CLI surface. Peaks-Loop Code gates remain authoritative. → `references/external-references.md` + `references/external-skill-invocation.md`.
|
|
240
240
|
|
|
241
241
|
## Codegraph orchestration context
|
|
242
242
|
|
|
243
|
-
`peaks codegraph affected` is an optional project-analysis enhancement (untrusted supporting evidence) for role handoff.
|
|
243
|
+
`peaks codegraph affected` is an optional project-analysis enhancement (untrusted supporting evidence) for role handoff. Code must not treat codegraph output as approval for scope, design, or QA verdict. Never mutate agent settings / hooks from codegraph; do not commit `.codegraph/` artifacts. RD writes `.peaks/_runtime/<sessionId>/rd/codegraph-context.md`; QA / TXT consume the same envelope. → `references/codegraph-orchestration.md`.
|
|
244
244
|
|
|
245
245
|
## Sub-agent context governance (G7 + G7.7 + G8 + G9 — slice #010)
|
|
246
246
|
|
|
@@ -260,7 +260,7 @@ Index of every `references/` file. Read on demand.
|
|
|
260
260
|
| `references/a2a-artifact-mapping.md` | A2A artifact-path mapping. |
|
|
261
261
|
| `references/anchoring-and-session-info.md` | Step 0 + session-conflict. |
|
|
262
262
|
| `references/artifact-contracts.md` | Sub-agent handoff contracts. |
|
|
263
|
-
| `references/boundaries.md` |
|
|
263
|
+
| `references/boundaries.md` | Code's do / don't list. |
|
|
264
264
|
| `references/browser-workflow.md` | Browser workflow (Playwright MCP). |
|
|
265
265
|
| `references/codegraph-orchestration.md` | Codegraph role handoff. |
|
|
266
266
|
| `references/command-migration.md` | Legacy command migration. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# A2A artifact mapping (informational)
|
|
2
2
|
|
|
3
|
-
> Reference for `peaks-
|
|
3
|
+
> Reference for `peaks-code` and any other peaks skill that produces durable artefacts in `.peaks/_runtime/<session-id>/`. Maps peaks's on-disk artefact vocabulary onto the A2A (Agent2Agent) protocol's vocabulary so a future peaks consumer (e.g. an external LLM agent or a downstream peaks-loop extension) can read peaks output without having to learn a brand-new schema. This is a **documentation mapping**, not a protocol implementation: peaks-loop does not speak A2A over HTTP, does not host an AgentCard endpoint, and does not advertise its capabilities via A2A's discovery mechanism. It only uses A2A's *concepts* as a shared naming layer.
|
|
4
4
|
|
|
5
5
|
## 1. Why this reference exists
|
|
6
6
|
|
|
@@ -70,7 +70,7 @@ A consumer translating peaks states to A2A should:
|
|
|
70
70
|
|
|
71
71
|
## 5. Worked example: a feature slice from start to finish
|
|
72
72
|
|
|
73
|
-
A user runs `peaks-
|
|
73
|
+
A user runs `peaks-code` for a "add user authentication" feature. Mapping the resulting files to A2A concepts:
|
|
74
74
|
|
|
75
75
|
```
|
|
76
76
|
.peaks/_runtime/<sessionId>/prd/requests/001.md → A2A Artifact (kind=proposal)
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
# Step 0 — Anchor the workflow
|
|
2
2
|
|
|
3
|
-
> Body of `### Peaks-Loop Step 0: Anchor the workflow`. The instant Peaks-Loop
|
|
3
|
+
> Body of `### Peaks-Loop Step 0: Anchor the workflow`. The instant Peaks-Loop Code is invoked, **before** the mode-selection question, before any analysis, and before you decide whether the request "needs" the full pipeline, you MUST run these two commands and see their output:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
# Session ID is auto-generated when omitted; the command returns it in the JSON output.
|
|
7
7
|
# Do NOT pass --session-id manually — the CLI is the single source of truth for the
|
|
8
8
|
# project session binding. To look up the active session id from a skill / sub-agent,
|
|
9
9
|
# use `peaks session info --active --json` (read-only, no side effects). To avoid
|
|
10
|
-
# the "two sessions in .peaks/" confusion that bites
|
|
10
|
+
# the "two sessions in .peaks/" confusion that bites Code, always omit --session-id
|
|
11
11
|
# here and let the CLI auto-generate.
|
|
12
12
|
peaks workspace init --project <repo> --json
|
|
13
|
-
peaks skill presence:set peaks-
|
|
13
|
+
peaks skill presence:set peaks-code --project <repo> --gate startup
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
> `<repo>` is the **git project root** (the directory containing `.git`). In a monorepo / single-repo-multi-package layout, this is the repo root, NOT a sub-package — `.peaks/` lives at the repo root so every package shares one workspace. If unsure, run `git rev-parse --show-toplevel` and use that path. Never let `.peaks/` land inside a sub-package directory.
|
|
17
17
|
|
|
18
18
|
**There is no request too lightweight to skip this.** "分析下这个项目", "看一下代码", "分析项目", "解释一下架构", a one-line question — all of them still create the workspace and set presence first. The workspace is cheap; a missing `.peaks/` is the #1 reported failure.
|
|
19
19
|
|
|
20
|
-
**Anti-bail-out rule (BLOCKING):** You MUST NOT exit the peaks-
|
|
20
|
+
**Anti-bail-out rule (BLOCKING):** You MUST NOT exit the peaks-code workflow, hand control back, or produce a final answer before Step 0 has run. If you catch yourself thinking "this is just analysis, I don't need the workflow" — STOP. Run Step 0, set presence, then continue. A pure-analysis request runs the **lightweight analysis branch** (project scan + standards dry-run + handoff with a Standards-increment section), but it still anchors the workspace and keeps presence active. Declining to anchor is a workflow violation.
|
|
21
21
|
|
|
22
22
|
**Session conflict resolution (read once, internalise):** If `peaks workspace init` returns `code: "CONFLICTING_SESSION"` with a body like
|
|
23
23
|
`{"existingSessionId":"<Y>","requestedSessionId":"<X>"}`, the project is already bound to a different in-flight session `<Y>` (the one you or a prior run was working on). The fix is **NOT** to pass `--allow-session-rebind` to clobber `<Y>` — that destroys an active session's data. Instead: finish or abandon `<Y>` first (use `peaks session list --json` to see what it is, then `peaks session finish --id <Y>` or `peaks session abandon --id <Y>` — see your session command's help for the exact verbs). Only after `<Y>` is closed should you re-run `peaks workspace init`. The same rule applies to `peaks workspace init --session-id "<manually-forged>"` — do not pre-forge session ids; the CLI's auto-generated value is the binding.
|
|
24
24
|
|
|
25
|
-
**Fact-Forcing Gate bypass (slice 2.0.1-bug3):** Claude Code's [Fact-Forcing Gate] fires in two shapes inside peaks-
|
|
25
|
+
**Fact-Forcing Gate bypass (slice 2.0.1-bug3):** Claude Code's [Fact-Forcing Gate] fires in two shapes inside peaks-code Step 0: (1) Bash-side "Quote the user's current instruction verbatim. Then retry the same operation." and (2) Write-side 4-facts prompt. Both block the very first Write to `.peaks/_runtime/<sid>/session.json` and the first `peaks skill presence:set peaks-code` invocation. The default `peaks workspace init` (no flag) materializes `.claude/settings.local.json` in the consumer project root with a PreToolUse hook allow-list that exits 0 for tool calls inside `.peaks/**` and for `peaks <whitelisted-subcommand>` Bash commands. The hook bypasses the gate before it fires.
|
|
26
26
|
|
|
27
27
|
If the bypass is not in effect (e.g. `.claude/` was read-only, or the user passed `--no-claude-hooks`, or the consumer manually deleted the file), the recovery flow is:
|
|
28
28
|
|
|
@@ -31,4 +31,4 @@ If the bypass is not in effect (e.g. `.claude/` was read-only, or the user passe
|
|
|
31
31
|
|
|
32
32
|
**Anti-bail-out rule for the gate:** Do NOT skip Step 0 because the gate fired. The gate is a Claude Code core feature that peaks-loop cannot modify directly; peaks-loop can only sidestep it via the hook allow-list. If the gate still blocks Step 0 after the bypass is in effect, the user has a misconfigured `.claude/settings.json` upstream — surface that as a separate `AskUserQuestion` ("Your `.claude/settings.json` is overriding the local allow-list. May peaks-loop delete the local file and regenerate it?") rather than skipping Step 0.
|
|
33
33
|
|
|
34
|
-
`presence:set` accepts no `--mode` here on purpose — mode is unknown until Step 1. It is re-run with the selected mode in Step 2. Setting presence early guarantees the status header/line shows `peaks-
|
|
34
|
+
`presence:set` accepts no `--mode` here on purpose — mode is unknown until Step 1. It is re-run with the selected mode in Step 2. Setting presence early guarantees the status header/line shows `peaks-code` from the very first turn even if the user never reaches mode selection.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Default local artifact root: `.peaks/_runtime/<session-id>/` with role subdirectories `prd/`, `rd/`, `ui/`, `qa/`, `sc/`, and `txt/`.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Code coordinates artifact paths and handoff completeness. Keep artifacts local by default. Do not commit, sync, or move them to a git-backed artifact repository unless explicitly authorized.
|
|
6
6
|
|
|
7
7
|
## Artifact file naming conventions
|
|
8
8
|
|
|
@@ -13,10 +13,10 @@ Each role produces artifacts with predictable file names so cross-role reference
|
|
|
13
13
|
| PRD | `prd/requests/` | `<request-id>.md` | peaks-prd | peaks-ui, peaks-rd, peaks-qa, peaks-txt |
|
|
14
14
|
| UI | `ui/` | `design-draft.md` | peaks-ui | peaks-rd (implementation), peaks-qa (visual regression) |
|
|
15
15
|
| RD planning | `rd/` | `tech-doc.md` | peaks-rd (planning phase) | peaks-rd (implementation phase) |
|
|
16
|
-
| RD project scan | `rd/` | `project-scan.md` | peaks-
|
|
16
|
+
| RD project scan | `rd/` | `project-scan.md` | peaks-code (pre-RD scan) | peaks-rd, peaks-ui |
|
|
17
17
|
| RD implementation | `rd/requests/` | `<request-id>.md` | peaks-rd | peaks-qa, peaks-sc, peaks-txt |
|
|
18
18
|
| QA test cases | `qa/test-cases/` | `<request-id>.md` | peaks-qa (pre-implementation) | peaks-rd (TDD guidance), peaks-qa (execution) |
|
|
19
|
-
| QA test reports | `qa/test-reports/` | `<request-id>.md` | peaks-qa (post-execution) | peaks-
|
|
19
|
+
| QA test reports | `qa/test-reports/` | `<request-id>.md` | peaks-qa (post-execution) | peaks-code (verdict), peaks-txt |
|
|
20
20
|
| QA requests | `qa/requests/` | `<request-id>.md` | peaks-qa | peaks-txt |
|
|
21
21
|
| SC | `sc/` | `<change-id>-impact.md`, `<slice-id>-retention.md` | peaks-sc | peaks-txt |
|
|
22
22
|
| TXT | `txt/` | `handoff-<request-id>.md` | peaks-txt | user (final deliverable) |
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Boundaries
|
|
2
2
|
|
|
3
|
-
> Body of `## Boundaries`. Peaks-Loop
|
|
3
|
+
> Body of `## Boundaries`. Peaks-Loop Code may:
|
|
4
4
|
|
|
5
5
|
- identify scenarios such as refactor, bugfix, QA hardening, release validation, and incident response;
|
|
6
|
-
- recommend
|
|
6
|
+
- recommend Code, Assisted, Swarm, or Strict profiles;
|
|
7
7
|
- coordinate Peaks-Loop role skills through artifacts;
|
|
8
8
|
- coordinate project memory extraction from stable skill artifact sections;
|
|
9
9
|
- request user confirmation at risk and commit boundaries;
|
|
10
10
|
- read CLI doctor/profile/artifact reports.
|
|
11
11
|
|
|
12
|
-
Peaks-Loop
|
|
12
|
+
Peaks-Loop Code must not silently:
|
|
13
13
|
|
|
14
14
|
- install hooks;
|
|
15
15
|
- create agents;
|
|
@@ -9,7 +9,7 @@ Peaks skills standardize on **Playwright MCP** as the controlled headed-browser
|
|
|
9
9
|
| Frontend E2E validation that needs to start, navigate, capture, close | **Playwright MCP** | Headed mode, full lifecycle in one tool. |
|
|
10
10
|
| Live page debugging where the user wants to keep their own Chrome session in front | Chrome DevTools MCP | Stays attached without disrupting the user's tabs. |
|
|
11
11
|
|
|
12
|
-
> **Bug history**: an earlier version of this document recommended Chrome DevTools MCP for "open a headed browser when peaks-
|
|
12
|
+
> **Bug history**: an earlier version of this document recommended Chrome DevTools MCP for "open a headed browser when peaks-code gets a product document link." Dogfood testing in 2026-05 revealed the tool requires a pre-running Chrome with remote debugging enabled — it does NOT launch its own browser. Playwright MCP is the correct tool for the "open on demand" case.
|
|
13
13
|
|
|
14
14
|
> **Slice #016 (2026-06-09)**: peaks-loop no longer manages MCP install / dispatch. Skill bodies instruct the LLM to (a) check its own tool list for any Playwright MCP entry, (b) invoke the tool by name if present, (c) tell the user the install command if absent. There is no peaks-loop MCP indirection layer anymore.
|
|
15
15
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Codegraph orchestration context
|
|
2
2
|
|
|
3
|
-
> Body of `## Codegraph orchestration context`.
|
|
3
|
+
> Body of `## Codegraph orchestration context`. Code treats `peaks codegraph affected --project <path> <changed-files...> --json` as an optional project-analysis enhancement that informs the role handoff between PRD, RD, and QA. The output is untrusted supporting evidence — Code must not treat codegraph output as approval for scope, design, or QA verdict.
|
|
4
4
|
|
|
5
5
|
Do not run upstream installer flows, mutate agent settings, or commit `.codegraph/` artifacts into git. Peaks-Loop gates remain authoritative; codegraph context is a hint, never a substitute for role-skill output.
|
|
@@ -8,9 +8,9 @@ Use Peaks-Loop TXT for the compact handoff capsule: mode, validated decisions, a
|
|
|
8
8
|
|
|
9
9
|
## Workflow completion (no auto-exit)
|
|
10
10
|
|
|
11
|
-
peaks-
|
|
11
|
+
peaks-code does NOT itself call `peaks skill presence:clear --project <repo>` at workflow end. Presence management is delegated to the last downstream skill in the workflow (peaks-rd, peaks-qa, peaks-txt); each of those skills owns its own presence:clear step per its SKILL.md. peaks-code only sets presence: it does not unset it.
|
|
12
12
|
|
|
13
|
-
The user can continue with follow-up requirements naturally — no need to re-invoke `/peaks-
|
|
13
|
+
The user can continue with follow-up requirements naturally — no need to re-invoke `/peaks-code` to do so. The header continues to display whatever skill is active; the user can `/peaks-code` again to re-anchor.
|
|
14
14
|
|
|
15
15
|
Before ending, extract durable memories from this session.
|
|
16
16
|
|
|
@@ -41,7 +41,7 @@ On completion:
|
|
|
41
41
|
### Main LLM reducer view (G7.4.e)
|
|
42
42
|
|
|
43
43
|
```
|
|
44
|
-
[peaks-
|
|
44
|
+
[peaks-code] batch 3/3 done in 47.3s
|
|
45
45
|
- rd → .peaks/_sub_agents/2026-06-06-session-5b1095/artifacts/003-rd-001.md (12KB, sha256:abc123) summary: "wrote RD tech-doc with 4 sub-roles and dispatcher interface"
|
|
46
46
|
- qa-business → .../artifacts/003-qa-business-001.md (8KB, sha256:def456) summary: "wrote 12 API test cases covering happy + 3 error paths"
|
|
47
47
|
- qa-perf → .../artifacts/003-qa-perf-001.md (5KB, sha256:ghi789) summary: "wrote perf baseline; p95 latency target ≤ 200ms"
|
|
@@ -165,7 +165,7 @@ PROTOCOL (mandatory):
|
|
|
165
165
|
|
|
166
166
|
Main LLM view format (G7.4.e):
|
|
167
167
|
```
|
|
168
|
-
[peaks-
|
|
168
|
+
[peaks-code] batch 3/3 done in 47.3s
|
|
169
169
|
- rd → .peaks/_sub_agents/2026-06-06-session-5b1095/artifacts/003-rd-001.md (12KB, sha256:abc123) summary: "wrote RD tech-doc with 4 sub-roles"
|
|
170
170
|
- qa-business → .../artifacts/003-qa-business-001.md (8KB, sha256:def456) summary: "wrote 12 API test cases"
|
|
171
171
|
- qa-perf → .../artifacts/003-qa-perf-001.md (5KB, sha256:ghi789) summary: "p95 latency target ≤ 200ms"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# DAG-aware sub-agent dispatch (2.7.0)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
to **`runDag(dag, opts)`** in `src/services/
|
|
5
|
-
when a slice's dependency surface is a DAG.
|
|
3
|
+
Code delegates layer-by-layer fan-out + join-barrier + cancel-on-fail
|
|
4
|
+
to **`runDag(dag, opts)`** in `src/services/code/dag-orchestrator.ts`
|
|
5
|
+
when a slice's dependency surface is a DAG. Code MUST NOT re-implement
|
|
6
6
|
these mechanics inline.
|
|
7
7
|
|
|
8
8
|
## When to use `runDag`
|
|
@@ -21,7 +21,7 @@ Use single-role `peaks sub-agent dispatch <role>` for everything else.
|
|
|
21
21
|
## Contract
|
|
22
22
|
|
|
23
23
|
```ts
|
|
24
|
-
import { runDag } from '../services/
|
|
24
|
+
import { runDag } from '../services/code/dag-orchestrator.js';
|
|
25
25
|
const result = await runDag(dag, {
|
|
26
26
|
projectRoot, sessionId, requestId, role, ide,
|
|
27
27
|
dispatch: async (spec) => { /* LLM-side runner executes SubAgentDispatcher.buildToolCall(spec) */ },
|
|
@@ -34,14 +34,14 @@ const result = await runDag(dag, {
|
|
|
34
34
|
## Failure handling
|
|
35
35
|
|
|
36
36
|
Any leaf failure → orchestrator sends `cancel` to in-flight siblings;
|
|
37
|
-
|
|
37
|
+
Code gets partial `DagRunResult`, treats slice as `return-to-rd`,
|
|
38
38
|
re-enters at the failed layer on next repair cycle. Per-IDE timeout:
|
|
39
39
|
trae / trae-cn / cursor 30s, codex 45s, claude-code 60s; uniform
|
|
40
40
|
120_000ms clamp ceiling.
|
|
41
41
|
|
|
42
42
|
## Source-of-truth pointers
|
|
43
43
|
|
|
44
|
-
- Orchestrator: `src/services/
|
|
44
|
+
- Orchestrator: `src/services/code/dag-orchestrator.ts` (`runDag` +
|
|
45
45
|
`buildDispatchSpec` + `formatContractInjection`)
|
|
46
46
|
- DAG model: `src/services/dispatch/slice-dag.ts`
|
|
47
47
|
(`validateDag` / `topologicalLevels` / `sliceReadyToRun` / `hashDag`)
|
|
@@ -50,7 +50,7 @@ trae / trae-cn / cursor 30s, codex 45s, claude-code 60s; uniform
|
|
|
50
50
|
- Contract store: `src/services/dispatch/contract-store.ts`
|
|
51
51
|
- CLI surface: `peaks sub-agent dispatch --from-dag <file> --batch-id <id>`
|
|
52
52
|
and `peaks sub-agent await --batch <id> [--timeout <ms>]`
|
|
53
|
-
- Tests: `tests/unit/
|
|
53
|
+
- Tests: `tests/unit/code/dag-orchestrator.test.ts` (cancel-on-fail),
|
|
54
54
|
`tests/unit/dispatch/run-dag-dogfood-mvp.test.ts` (MVP dogfood),
|
|
55
55
|
`tests/unit/dispatch/slice-dag-dispatcher-5ide-dogfood.test.ts`
|
|
56
56
|
(5 IDE end-to-end).
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
**Codegraph**: Optional project-analysis before RD handoff. Use `peaks codegraph affected --project <path> <changed-files...> --json` for regression-surface hints. Output as untrusted supporting evidence only; never commit `.codegraph/` artifacts.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Code treats `peaks codegraph affected --project <path> <changed-files...> --json` as an optional project-analysis enhancement that informs the role handoff between PRD, RD, and QA. The output is untrusted supporting evidence — Code must not treat codegraph output as approval for scope, design, or QA verdict.
|
|
8
8
|
|
|
9
9
|
Do not run upstream installer flows, mutate agent settings, or commit `.codegraph/` artifacts into git. Peaks-Loop gates remain authoritative; codegraph context is a hint, never a substitute for role-skill output.
|
|
10
10
|
|
|
11
11
|
**External skills**: All external skill references (`mattpocock/skills`, `awesome-design-md`, `taste-skill`, `shadcn/ui`, `Chrome DevTools MCP`, `Figma Context MCP`, `Context7`, etc.) follow the three-stage pattern: capability discovery via `peaks capabilities` before naming, references only (no execute/install/persist), Peaks-Loop CLI for all side effects. Do not execute upstream installers, do not install upstream resources, do not persist sensitive examples — Peaks-Loop gates remain authoritative. External skills inform, they do not approve.
|
|
12
12
|
|
|
13
|
-
**OpenSpec lifecycle**: `render → validate → show → to-rd → validate → archive`.
|
|
13
|
+
**OpenSpec lifecycle**: `render → validate → show → to-rd → validate → archive`. Code's default runbook handles the exit gate (validate → archive after QA pass). Entry-gate validation (to-rd before slicing) is available when `openspec/` exists pre-workflow; Code delegates it to `peaks-rd` during implementation.
|
|
14
14
|
|
|
15
15
|
**MCP lifecycle**: `list → plan → apply --yes → call → rollback`. `apply` backs up settings and refuses non-peaks entries unless `--claim` is passed.
|
|
16
16
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Fan-out is mandatory (slice 2026-06-24-audit-5th-p2)
|
|
2
2
|
|
|
3
|
-
> **Reference contract.** Slice 5 (`feat(
|
|
3
|
+
> **Reference contract.** Slice 5 (`feat(code): default to multi-sub-agent
|
|
4
4
|
> fan-out when DAG has >= 2 same-level leaves`) shipped in 2.8.0 with
|
|
5
5
|
> `'fan-out'` as the default but kept `'serial'` as an opt-out. Slice
|
|
6
6
|
> 2026-06-24-audit-5th-p2 (this slice, 2.8.4) **removes the opt-out** by
|
|
@@ -95,10 +95,10 @@ shape it had pre-slice — the difference is that anything outside
|
|
|
95
95
|
|
|
96
96
|
## Tests
|
|
97
97
|
|
|
98
|
-
- `tests/unit/
|
|
98
|
+
- `tests/unit/code/skills-code-fanout-mandatory.test.ts` — pins that
|
|
99
99
|
SKILL.md still mentions `--from-dag`, does NOT mention `serial`
|
|
100
100
|
opt-out, and references `references/fanout-mandatory.md`.
|
|
101
|
-
- `tests/integration/
|
|
101
|
+
- `tests/integration/code/multi-sub-agent-fanout.test.ts` — pins the
|
|
102
102
|
runtime fan-out behavior; not affected by this slice.
|
|
103
103
|
|
|
104
104
|
## Rollout
|