peaks-loop 3.1.1 → 4.0.0-beta
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 +74 -36
- 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/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/job-commands.js +58 -5
- 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-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/solo-commands.d.ts +2 -2
- package/dist/src/cli/commands/solo-commands.js +246 -20
- 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/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.js +1 -1
- 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 +2 -2
- 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 +19 -2
- 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/audit/enforcers/solo-code-ban.d.ts +1 -1
- package/dist/src/services/audit/enforcers/solo-code-ban.js +2 -2
- package/dist/src/services/audit/red-line-catalog.js +1 -1
- package/dist/src/services/audit/scanners/skills-tree-scanner.js +22 -0
- package/dist/src/services/context/auto-compact-dispatcher.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/doctor/doctor-service.js +2 -2
- package/dist/src/services/job/job-progress-store.d.ts +60 -0
- package/dist/src/services/job/job-progress-store.js +70 -0
- package/dist/src/services/job/job-resource-snapshot.js +29 -1
- package/dist/src/services/job/job-types.d.ts +4 -4
- 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/progress/progress-service.d.ts +1 -1
- package/dist/src/services/progress/progress-service.js +1 -1
- package/dist/src/services/rd/standards-diagnostic.js +1 -1
- package/dist/src/services/recommendations/capability-seed-mappings.js +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/skill/resume-detector.js +1 -1
- 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 +4 -4
- 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/solo/auto-compact-orchestrator.d.ts +1 -1
- package/dist/src/services/solo/auto-compact-orchestrator.js +2 -2
- package/dist/src/services/solo/dag-orchestrator.d.ts +3 -3
- package/dist/src/services/solo/dag-orchestrator.js +4 -4
- package/dist/src/services/solo/emit-handoff.d.ts +49 -0
- package/dist/src/services/solo/emit-handoff.js +79 -0
- package/dist/src/services/solo/mode-gate.d.ts +2 -2
- package/dist/src/services/solo/post-compact-detector.js +2 -2
- package/dist/src/services/solo/status-line-renderer.d.ts +4 -4
- package/dist/src/services/solo/step-08-gate.d.ts +90 -0
- package/dist/src/services/solo/step-08-gate.js +136 -0
- 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 +1 -1
- 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/workflow-router-service.d.ts +1 -1
- package/dist/src/services/workflow/workflow-router-service.js +3 -3
- package/dist/src/services/workspace/claude-settings-template.d.ts +7 -2
- package/dist/src/services/workspace/claude-settings-template.js +42 -3
- 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/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/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 +1 -1
- 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-runbook.md +1 -1
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-sub-agent-dispatch.md +2 -2
- package/skills/{peaks-rd → bee/peaks-rd}/references/rd-transition-gates.md +1 -1
- 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 +7 -1
- package/skills/{peaks-txt → bee/peaks-txt}/SKILL.md +9 -3
- package/skills/{peaks-ui → bee/peaks-ui}/SKILL.md +11 -5
- package/skills/peaks-audit/SKILL.md +1 -1
- package/skills/{peaks-solo → peaks-code}/SKILL.md +53 -104
- 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 +4 -4
- package/skills/{peaks-solo → peaks-code}/references/artifact-contracts.md +2 -2
- package/skills/{peaks-solo → peaks-code}/references/browser-workflow.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/frontend-only-mode.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/local-artifact-workspace.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/micro-cycle.md +9 -9
- package/skills/{peaks-solo → peaks-code}/references/mode-selection-with-stale-presence.md +12 -12
- package/skills/{peaks-solo → peaks-code}/references/mode-selection.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/openspec-workflow.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/project-scan-checklist.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/refactor-mode.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/resume-detection.md +1 -1
- package/skills/{peaks-solo → peaks-code}/references/runbook.md +25 -5
- 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 +5 -5
- package/skills/peaks-code/references/step-0-8-gate.md +60 -0
- package/skills/{peaks-solo → peaks-code}/references/sub-agent-dispatch.md +10 -10
- package/skills/{peaks-solo → peaks-code}/references/swarm-dispatch-contract.md +7 -7
- package/skills/{peaks-solo → peaks-code}/references/workflow-gates-and-types.md +3 -3
- 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 +14 -14
- package/skills/peaks-sop/SKILL.md +1 -1
- package/skills/{peaks-solo-status → peaks-status}/SKILL.md +13 -13
- package/skills/{peaks-solo-test → peaks-test}/SKILL.md +11 -11
- package/skills/peaks-solo/references/command-migration.md +0 -3
- /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/artifact-per-request.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-fanout-contracts.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/boundaries.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/checkpoint-resume.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/codegraph-orchestration.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/cross-date-session-check.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/dag-orchestrator.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-references.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/external-skill-invocation.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/fanout-mandatory.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/fast-mode.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/job-loop.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/periodic-checkpoint.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/skills/{peaks-solo → peaks-code}/references/quality-gate-cheatsheet.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/workflow.md +0 -0
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
# Peaks-Loop Frontend-only development mode
|
|
2
2
|
|
|
3
|
-
> Extracted from `skills/peaks-
|
|
3
|
+
> Extracted from `skills/peaks-code/SKILL.md` on 2026-06-09 (slice 019 — slim skill files to references) to keep SKILL.md under the 800-line cap from `common/coding-style.md`. The content below is the verbatim Frontend-only development mode section that was previously inline; nothing was paraphrased, just relocated.
|
|
4
4
|
|
|
5
5
|
When the project has no live backend (no swagger.json, no API server), Solo must activate frontend-only mode.
|
|
6
6
|
|
|
@@ -28,7 +28,7 @@ The workspace initialization creates this structure under `.peaks/`:
|
|
|
28
28
|
# --active --json` (and the matching read-only primitives for the
|
|
29
29
|
# other two) to discover session-id / active-skill / sop-state.
|
|
30
30
|
.peaks/_runtime/
|
|
31
|
-
├── active-skill.json # orchestrator presence marker (peaks-
|
|
31
|
+
├── active-skill.json # orchestrator presence marker (peaks-code / -rd / -qa / -ui / -sc / -sop / -txt)
|
|
32
32
|
├── session.json # project → session binding (the only single-session source of truth)
|
|
33
33
|
└── sop-state/ # current phase + history; definitions live globally in ~/.peaks
|
|
34
34
|
|
|
@@ -95,7 +95,7 @@ peaks slice check [--rid <rid>] [--project <path>] [--json]
|
|
|
95
95
|
|
|
96
96
|
4 个 check 全绿 + verify-pipeline pass → 才进 `peaks request transition --state qa-handoff`,让 peaks-qa 接管。
|
|
97
97
|
|
|
98
|
-
> **新增 run 017(2026-06-09)**:边界默认走 changed-only suite,原来的全 suite 行为移到 `--run-tests` opt-in。`peaks-
|
|
98
|
+
> **新增 run 017(2026-06-09)**:边界默认走 changed-only suite,原来的全 suite 行为移到 `--run-tests` opt-in。`peaks-test` skill 仍然是手动跑全量的入口。rationale: 全量 30s+ 严重拖慢 workflow;changed-only 命中 99% 真正回归。详见 PRD `.peaks/_runtime/2026-06-07-session-84feb7/prd/requests/002-017-2026-06-09-remove-auto-full-vitest-from-slice-check.md`。
|
|
99
99
|
|
|
100
100
|
## Micro-cycle → 边界 check → QA 的串联
|
|
101
101
|
|
|
@@ -131,21 +131,21 @@ verdict=return-to-rd → RD 修 (new slice 内部走 micro-cycle)
|
|
|
131
131
|
|
|
132
132
|
| 阶段 | 谁负责 | 节奏 |
|
|
133
133
|
|---|---|---|
|
|
134
|
-
| RD slice 内部 | peaks-
|
|
135
|
-
| RD slice 边界 | peaks-
|
|
134
|
+
| RD slice 内部 | peaks-code (main loop) | micro-cycle(5-10s 一个) |
|
|
135
|
+
| RD slice 边界 | peaks-code 调用 `peaks slice check` | 一次 |
|
|
136
136
|
| QA test execution | peaks-qa (sub-agent or inline) | slice 级 |
|
|
137
137
|
| 3-way fan-out (CR + sec + perf) | peaks-rd (sub-agent) | slice 级(RD 内部一次 + 边界 check 一次) |
|
|
138
138
|
| TXT handoff | peaks-txt | slice 级 |
|
|
139
139
|
| SC commit-boundaries | peaks-sc | slice 级 |
|
|
140
140
|
|
|
141
|
-
## 为什么这套比当前 peaks-
|
|
141
|
+
## 为什么这套比当前 peaks-code 的设计合理
|
|
142
142
|
|
|
143
143
|
- **快**:micro-cycle ~100ms(vs 30s 全 suite),改 10 个 bug 从 5 分钟降到 30 秒
|
|
144
144
|
- **稳**:边界 check 不省,4 项检查(tsc + vitest run --changed + 3-way + verify-pipeline)一次全跑;changed-only 模式 1-3s 内出结果,全量用 `--run-tests` opt-in
|
|
145
145
|
- **清晰**:LLM 看到一个 explicit "禁止" 列表 + 强制 sequence,比"建议"更不容易越界
|
|
146
146
|
- **可观测**:micro-cycle 走单测 → 边界跑 verify-pipeline,每步都有 JSON envelope 验证
|
|
147
147
|
|
|
148
|
-
## 跟 peaks-
|
|
148
|
+
## 跟 peaks-code SKILL.md 的对账
|
|
149
149
|
|
|
150
150
|
- `peaks slice check` = 边界命令
|
|
151
151
|
- micro-cycle = slice 内部
|
|
@@ -187,10 +187,10 @@ After RD completes (whether inline or sub-agent), Solo does not stop — it must
|
|
|
187
187
|
**Presence restoration after RD/QA work returns (MANDATORY):** In v1.x, role skills called `peaks skill presence:set <role>` internally and stomped on `.peaks/.active-skill.json`. From v1.3 onward, sub-agents in the Swarm path are forbidden from calling `peaks skill presence:set` (see "Sub-agent dispatch" in each role's SKILL.md), so the main loop's presence file is preserved across the fan-out window by construction. The one place Solo still has to actively restore presence is **once after the fan-out returns** (gate=swarm-converged) and again **after each RD↔QA repair iteration** (gate=repair-cycle-<N>). Use the same command from Step 2 with the current mode and the gate that has just advanced:
|
|
188
188
|
|
|
189
189
|
```bash
|
|
190
|
-
peaks skill presence:set peaks-
|
|
190
|
+
peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate <current-gate>
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
This keeps the CLAUDE.md status header accurate (`Peaks-Loop Skill: peaks-
|
|
193
|
+
This keeps the CLAUDE.md status header accurate (`Peaks-Loop Skill: peaks-code`) instead of showing a stale role name. Use the current mode and gate values; the gate may have advanced since startup. Skipping this step causes the header to display the last-known gate permanently.
|
|
194
194
|
|
|
195
195
|
**Full-auto auto-proceed rule**: In the `full-auto` profile, when RD transitions to `qa-handoff`, Solo immediately drives QA — by launching a `peaks sub-agent dispatch qa` sub-agent carrying the `peaks-qa` body (swarm path), then executing the returned toolCall, or by running QA inline in the main loop (assisted/strict path). Do not pause, do not ask the user, do not summarize RD results as if they were final. The only valid reason to skip QA is when `--type` is `docs` or `chore` (no acceptance surface).
|
|
196
196
|
|
|
@@ -217,7 +217,7 @@ When `peaks-qa` returns `verdict=return-to-rd`, Solo does NOT manually rewrite R
|
|
|
217
217
|
6. Repeat steps 1-5 until QA returns `verdict=pass`, or the cap below fires.
|
|
218
218
|
**After each repair iteration** (after peaks-rd and peaks-qa both return), Solo MUST restore presence:
|
|
219
219
|
```bash
|
|
220
|
-
peaks skill presence:set peaks-
|
|
220
|
+
peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate repair-cycle-<N>
|
|
221
221
|
```
|
|
222
222
|
|
|
223
223
|
**Repair cycle cap**: After 3 repair cycles without a passing QA verdict, emit a blocked TXT handoff regardless of remaining issues. Do not loop indefinitely. If a specific issue cannot be resolved within 3 cycles, mark it as a known blocker in the TXT handoff and proceed to the SC phase.
|
|
@@ -297,7 +297,7 @@ reasons array preserved verbatim.
|
|
|
297
297
|
|
|
298
298
|
### Runbook integration
|
|
299
299
|
|
|
300
|
-
When the peaks-
|
|
300
|
+
When the peaks-code main loop sees `qa verdict != pass` or any audit
|
|
301
301
|
prereq missing, the runbook now does:
|
|
302
302
|
|
|
303
303
|
1. Call `aggregateVerdict({ security, perf, karpathy, mut, qa })` with
|
|
@@ -8,19 +8,19 @@
|
|
|
8
8
|
|
|
9
9
|
Defect A (from PRD-002, 2026-06-28 session 88b27d):
|
|
10
10
|
|
|
11
|
-
1. session A runs in `full-auto` → `peaks skill presence:set peaks-
|
|
11
|
+
1. session A runs in `full-auto` → `peaks skill presence:set peaks-code --mode full-auto --gate startup` stamps
|
|
12
12
|
`.peaks/_runtime/active-skill.json` with `outerSessionId=outer-A`.
|
|
13
13
|
2. session A closes (Claude window quit).
|
|
14
14
|
3. session B opens (a new Claude window, `outerSessionId=outer-B`).
|
|
15
15
|
4. `peaks skill presence:get --project <path>` still returns `mode=full-auto` because the file is on disk.
|
|
16
|
-
5. peaks-
|
|
16
|
+
5. peaks-code Step 1 reads the presence, sees `mode=full-auto`, **skips** AskUserQuestion.
|
|
17
17
|
6. The user never picked `full-auto` for THIS session — the mode was sticky from the previous one.
|
|
18
18
|
|
|
19
19
|
The fix: presence is only authoritative when its `outerSessionId` matches the current outer session. Otherwise Step 1 must re-ask.
|
|
20
20
|
|
|
21
21
|
## Detection protocol
|
|
22
22
|
|
|
23
|
-
Before deciding to skip Step 1's AskUserQuestion, the LLM driver (or any peaks-
|
|
23
|
+
Before deciding to skip Step 1's AskUserQuestion, the LLM driver (or any peaks-code caller) MUST run:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
26
|
peaks skill presence:check-stale --project <path> --json
|
|
@@ -35,7 +35,7 @@ The CLI returns a JSON envelope of shape:
|
|
|
35
35
|
"data": {
|
|
36
36
|
"stale": true,
|
|
37
37
|
"reason": "outer-session-mismatch",
|
|
38
|
-
"presence": { "skill": "peaks-
|
|
38
|
+
"presence": { "skill": "peaks-code", "mode": "full-auto", "outerSessionId": "outer-A", ... },
|
|
39
39
|
"currentOuterSessionId": "outer-B",
|
|
40
40
|
"recordedOuterSessionId": "outer-A"
|
|
41
41
|
},
|
|
@@ -79,11 +79,11 @@ Returns the same `stale` / `reason` / `currentOuterSessionId` / `recordedOuterSe
|
|
|
79
79
|
}
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
The hard-pause on `step-1-mode-select` is preserved for ALL modes (defect #1 fix from slice 2026-06-28-solo-mode-bypass-fix). Stale-presence is an additional reason — even when the user names a profile explicitly, peaks-
|
|
82
|
+
The hard-pause on `step-1-mode-select` is preserved for ALL modes (defect #1 fix from slice 2026-06-28-solo-mode-bypass-fix). Stale-presence is an additional reason — even when the user names a profile explicitly, peaks-code can still surface the staleness for visibility.
|
|
83
83
|
|
|
84
84
|
## Auto-clear on session rotation
|
|
85
85
|
|
|
86
|
-
`peaks workspace init` now calls `clearStalePresenceOnRotation` whenever an `outer-session-mismatch` rotation fires. This means in the COMMON path (user reopens Claude → peaks-
|
|
86
|
+
`peaks workspace init` now calls `clearStalePresenceOnRotation` whenever an `outer-session-mismatch` rotation fires. This means in the COMMON path (user reopens Claude → peaks-code auto-runs `peaks workspace init` → rotation clears the stale presence → Step 1 reads no-presence → re-ask). The check-stale CLI is the safety net for the rare case where rotation was suppressed (`--no-rotate-on-outer-mismatch`).
|
|
87
87
|
|
|
88
88
|
The auto-clear respects two guards so it never destroys a user-explicit mode:
|
|
89
89
|
|
|
@@ -92,17 +92,17 @@ The auto-clear respects two guards so it never destroys a user-explicit mode:
|
|
|
92
92
|
|
|
93
93
|
## Worked example (the 88b27d defect)
|
|
94
94
|
|
|
95
|
-
Session A: `peaks skill presence:set peaks-
|
|
95
|
+
Session A: `peaks skill presence:set peaks-code --mode full-auto` (outer A).
|
|
96
96
|
Session A closes. Session B starts (outer B).
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
|
-
# 1. Run init (the common entry into peaks-
|
|
99
|
+
# 1. Run init (the common entry into peaks-code).
|
|
100
100
|
peaks workspace init --project . --json
|
|
101
101
|
# → auto-rotates session binding AND auto-clears stale presence
|
|
102
102
|
# nextActions: ["Auto-cleared stale skill presence ..."]
|
|
103
103
|
# data.rotation: { previousSessionId: "session-A", reason: "outer-session-mismatch" }
|
|
104
104
|
|
|
105
|
-
# 2. peaks-
|
|
105
|
+
# 2. peaks-code Step 1 (was: skip AskUserQuestion because presence.mode=full-auto).
|
|
106
106
|
# Now: presence is gone → no-presence → AskUserQuestion fires.
|
|
107
107
|
|
|
108
108
|
peaks skill presence:check-stale --project . --json
|
|
@@ -112,7 +112,7 @@ peaks solo should-pause --step step-1-mode-select --mode full-auto --json
|
|
|
112
112
|
# → { shouldPause: true, reason: "step=step-1-mode-select is a mode/context-selection step → always pause" }
|
|
113
113
|
|
|
114
114
|
# 3. User picks a profile (or repeats "full-auto"). Then:
|
|
115
|
-
peaks skill presence:set peaks-
|
|
115
|
+
peaks skill presence:set peaks-code --mode full-auto --gate startup
|
|
116
116
|
# → re-stamps with outer=B. Future sessions that read this presence
|
|
117
117
|
# see outerSessionId=outer-B matching THEIR outer=B → not stale.
|
|
118
118
|
```
|
|
@@ -120,5 +120,5 @@ peaks skill presence:set peaks-solo --mode full-auto --gate startup
|
|
|
120
120
|
## ACL — what NOT to do
|
|
121
121
|
|
|
122
122
|
- **NEVER** skip Step 1 just because `.peaks/_runtime/active-skill.json` shows a `mode` field. Run `presence:check-stale` first.
|
|
123
|
-
- **NEVER** call `peaks skill presence:clear` from peaks-
|
|
124
|
-
- **NEVER** set the presence `mode` field from inside a sub-agent (peaks-rd, peaks-qa, etc.). Sub-agents may read presence to honour the user's chosen mode but the write authority for Step 1 belongs to the peaks-
|
|
123
|
+
- **NEVER** call `peaks skill presence:clear` from peaks-code to "fix" a stale mode. The auto-clear path is `peaks workspace init`'s job; manual clears destroy user-explicit mode choices that may belong to another live outer session.
|
|
124
|
+
- **NEVER** set the presence `mode` field from inside a sub-agent (peaks-rd, peaks-qa, etc.). Sub-agents may read presence to honour the user's chosen mode but the write authority for Step 1 belongs to the peaks-code driver.
|
|
@@ -18,4 +18,4 @@ Map the user's selection to the `--mode` flag value (used by `peaks skill presen
|
|
|
18
18
|
|
|
19
19
|
> Note: `peaks workflow route --mode solo|team` is a **different** CLI dimension (solo developer vs team flow) and is unrelated to the profile choice here. Do not conflate them.
|
|
20
20
|
|
|
21
|
-
If the user already names a profile in their invocation (e.g. `/peaks-
|
|
21
|
+
If the user already names a profile in their invocation (e.g. `/peaks-code --full-auto`, "用全自动模式"), skip this question and use the named profile directly.
|
|
@@ -24,7 +24,7 @@ Rules Solo applies:
|
|
|
24
24
|
|
|
25
25
|
## Refactor workflow wiring
|
|
26
26
|
|
|
27
|
-
For `peaks-
|
|
27
|
+
For `peaks-code refactor` runs against a repository with `openspec/`:
|
|
28
28
|
|
|
29
29
|
1. RD entry gate — `peaks openspec validate <id>` must pass and `peaks openspec to-rd <id>` must return `acceptance.length > 0`.
|
|
30
30
|
2. Each slice must reference one OpenSpec tasks section as its commit boundary (per `references/openspec-commit-boundaries.md` in peaks-sc).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Peaks-Loop Pre-RD project scan checklist
|
|
2
2
|
|
|
3
|
-
> Extracted from `skills/peaks-
|
|
3
|
+
> Extracted from `skills/peaks-code/SKILL.md` on 2026-06-09 (slice 019 — slim skill files to references) to keep SKILL.md under the 800-line cap from `common/coding-style.md`. The content below is the verbatim Pre-RD project scan checklist that was previously inline; nothing was paraphrased, just relocated.
|
|
4
4
|
|
|
5
5
|
Before handing off to `peaks-rd`, scan the project and record findings to `.peaks/_runtime/<sessionId>/rd/project-scan.md`. RD and UI roles read this before starting work. **project-scan.md is a session-scoped singleton** — check if it already exists before regenerating (e.g. via `ls .peaks/_runtime/<sessionId>/rd/project-scan.md`). If it exists and is complete (has `## Archetype` and `## Project mode` sections), reuse it. Only regenerate if missing or incomplete.
|
|
6
6
|
|
|
@@ -60,4 +60,4 @@ done
|
|
|
60
60
|
**Strict quality guarantee (per user's hard rule: "严格要保证不能比当前的效果差")**:
|
|
61
61
|
- If no in-flight slice is detected, this step is a no-op: zero extra commands beyond the existing Step 0 probe, zero extra token cost.
|
|
62
62
|
- If an in-flight slice is detected, the cost is one `find` + one `grep` loop (sub-millisecond) + one `AskUserQuestion` (one round-trip). The savings are 3-5k tokens (the cost of manually re-reading 3-5 artifact files).
|
|
63
|
-
- The dogfood test in `tests/unit/skill-resume-mode.test.ts` (8 cases, bash-fixture shim — the legacy interface used by `skills/peaks-
|
|
63
|
+
- The dogfood test in `tests/unit/skill-resume-mode.test.ts` (8 cases, bash-fixture shim — the legacy interface used by `skills/peaks-resume`) and `tests/unit/services/skill/resume-detector.test.ts` (24 cases, the canonical TypeScript classifier at `src/services/skill/resume-detector.ts`) together cover: (a) fresh / complete / resume:rd-planning / resume:qa-validation / resume:txt-handoff state-based classifications, (b) the "Other resume triggers" overrides (missing `rd/tech-doc.md` → `rd-planning`; missing `rd/code-review.md` or `rd/security-review.md` → `rd-review-fanout`; missing `qa/test-reports/<rid>.md` → `qa-execution`), (c) the mid-implementation distinction (`spec-locked` / `implemented` / `running` / `blocked` all return `in-flight:<state>`), (d) the primary-vs-abandoned filter (multiple RDs → spec-locked wins; single blocked RD stays primary; 2+ all-abandoned → fresh), (e) the legacy `.peaks/_runtime/<sessionId>/` path fallback, and (f) determinism across two invocations on the same fixture.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Peaks-Loop Default Runbook (orchestrator, full-auto profile)
|
|
2
2
|
|
|
3
|
-
> **Maintenance**: The numbered workflow list in `skills/peaks-
|
|
3
|
+
> **Maintenance**: The numbered workflow list in `skills/peaks-code/SKILL.md` (steps 0-11) is the canonical phase sequence. This runbook is the executable CLI transcription. When updating, keep both in lockstep — a change to one must be reflected in the other.
|
|
4
4
|
>
|
|
5
5
|
> **Why this is a reference, not inline**: the runbook is a stable, copy-pasteable shell (~150 lines of bash) that does not change between skill runs. Inlining it bloats the orchestrator skill body past the 800-line cap (per `common/coding-style.md`). Extracting it here keeps SKILL.md focused on flow / decisions / contracts, while the runbook stays as the canonical place for the CLI sequence.
|
|
6
6
|
>
|
|
7
7
|
> **How peaks-loop tooling reads this file**:
|
|
8
|
-
> - `peaks skill runbook peaks-
|
|
8
|
+
> - `peaks skill runbook peaks-code` (CLI) reads the `## Default runbook` section in either SKILL.md or `references/runbook.md` (whichever has the bash code).
|
|
9
9
|
> - The test in `tests/unit/skill-default-runbook.test.ts` looks for `## Default runbook` in SKILL.md first, then falls back to `references/runbook.md` here.
|
|
10
10
|
|
|
11
11
|
## Default runbook — CLI sequence
|
|
@@ -22,7 +22,7 @@ peaks sub-agent dispatch <role> --prompt "<body>" --request-id <rid> --batch-id
|
|
|
22
22
|
# 0. Peaks-Loop Snapshot + 0.5 Peaks-Loop Workspace + 0.6 Peaks-Loop Project scan + 0.7 Peaks-Loop Existing-system extraction
|
|
23
23
|
peaks doctor --json
|
|
24
24
|
peaks project dashboard --project <repo> --json
|
|
25
|
-
peaks skill runbook peaks-
|
|
25
|
+
peaks skill runbook peaks-code --json
|
|
26
26
|
peaks workspace init --project <repo> --json
|
|
27
27
|
peaks workspace reconcile --project <repo> --json
|
|
28
28
|
peaks scan archetype --project <repo> --json
|
|
@@ -80,7 +80,7 @@ peaks request transition <rid> --role prd --state handed-off --project <repo> --
|
|
|
80
80
|
# sub-agent may also call peaks request init itself (idempotent on the same rid);
|
|
81
81
|
# Solo's call here is the source of truth. Only init roles that are in the
|
|
82
82
|
# swarm plan — roles not in the plan do not get a slot yet.
|
|
83
|
-
peaks skill presence:set peaks-
|
|
83
|
+
peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate swarm-fan-out
|
|
84
84
|
# for each role in swarm-plan.subAgents:
|
|
85
85
|
# peaks request init --role ui --id <rid> --project <repo> --apply --type <type> --json
|
|
86
86
|
# peaks request init --role rd --id <rid> --project <repo> --apply --type <type> --json
|
|
@@ -99,7 +99,7 @@ peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate swarm-
|
|
|
99
99
|
peaks sc build-dag --change-id <cid> --project <repo> --json > .peaks/_runtime/<sid>/sc/slice-dag.json
|
|
100
100
|
peaks sub-agent dispatch --from-dag .peaks/_runtime/<sid>/sc/slice-dag.json --batch-id <id> --project <repo> --json
|
|
101
101
|
# 3c. After fan-out, Solo restores presence once and runs Gate B (ls checks):
|
|
102
|
-
peaks skill presence:set peaks-
|
|
102
|
+
peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate swarm-converged
|
|
103
103
|
ls .peaks/_runtime/<sid>/prd/requests/<rid>.md # PRD artefact must exist (Gate B hard)
|
|
104
104
|
# feature / refactor → ls .peaks/_runtime/<sid>/rd/tech-doc.md
|
|
105
105
|
# bugfix → ls .peaks/_runtime/<sid>/rd/bug-analysis.md
|
|
@@ -219,6 +219,9 @@ fi
|
|
|
219
219
|
|
|
220
220
|
# After Step 7 (RD+QA commit) lands AND Step 0.8 fired (state.json exists):
|
|
221
221
|
peaks job checkpoint --slice-id <rid> --state done --commit-sha $(git rev-parse HEAD)
|
|
222
|
+
# v3.1.2: `peaks job checkpoint --state done` ALSO writes
|
|
223
|
+
# .peaks/_runtime/<sid>/job/<jid>/progress.json. Read it on resume:
|
|
224
|
+
peaks job progress --job-id <jid> --json
|
|
222
225
|
peaks job status --job-id <jid> --json
|
|
223
226
|
peaks job subagent-cleanup --job-id <jid> --batch-id <bid> --force # Step 0.87 gate
|
|
224
227
|
# Loop control:
|
|
@@ -226,4 +229,21 @@ peaks job subagent-cleanup --job-id <jid> --batch-id <bid> --force # Step 0.87
|
|
|
226
229
|
# remaining == 0 → Step 8/9/10/11 (original tail)
|
|
227
230
|
# blocked (strict) → peaks job block + STOP
|
|
228
231
|
# Rotating-mode: every rotateEvery slices → Step 0.86 (peaks session rotate + resume)
|
|
232
|
+
|
|
233
|
+
# v3.1.2 size-fear ban: refuse to emit a final handoff while remaining > 0.
|
|
234
|
+
# The LLM cannot bypass this; --force-under-job requires explicit user approval.
|
|
235
|
+
peaks solo emit-handoff --project <repo> --job-id <jid> --json
|
|
236
|
+
|
|
237
|
+
# v3.1.2 forced auto-compact: when --enforce-job-mode is set OR
|
|
238
|
+
# job-shape.json says isJob=true, ≥0.85 is MANDATORY auto-compact.
|
|
239
|
+
# Solo MUST call this without confirmation under Job mode.
|
|
240
|
+
peaks solo context-now --project <repo> --enforce-job-mode --json
|
|
241
|
+
peaks session auto-compact --execute --project <repo> --json
|
|
242
|
+
|
|
243
|
+
# v3.1.2 PreToolUse gate (installed by `peaks workspace init`):
|
|
244
|
+
# every Bash tool call runs `peaks solo gate-step-08` automatically.
|
|
245
|
+
# Exit 0 = allow (with optional Next: slice #N+1 of M line when
|
|
246
|
+
# progress.json exists). Exit 2 = BLOCKED; LLM must call
|
|
247
|
+
# `peaks solo detect-job` first.
|
|
248
|
+
peaks solo gate-step-08 --project <repo> --json
|
|
229
249
|
```
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
Step 0 already set presence with no mode. Now that the mode is known (user selected or explicitly named), re-run presence:set so the header/status line shows the profile:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
peaks skill presence:set peaks-
|
|
10
|
+
peaks skill presence:set peaks-code --project <repo> --mode <mode-value> --gate startup
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
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:
|
|
@@ -16,9 +16,9 @@ On the first presence:set in a project, ensure the out-of-band status bar is ins
|
|
|
16
16
|
peaks statusline install --project <repo> # idempotent; skips if already installed
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
Then display the compact status header: `Peaks-Loop Skill: peaks-
|
|
19
|
+
Then display the compact status header: `Peaks-Loop Skill: peaks-code | Peaks-Loop Gate: startup | Next: <one short action>`. Display this header on EVERY turn while the skill is active.
|
|
20
20
|
|
|
21
|
-
Update with `peaks skill presence:set peaks-
|
|
21
|
+
Update with `peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate <gate>` when gates change. The presence file persists across the full workflow lifecycle — do NOT clear it at workflow end.
|
|
22
22
|
|
|
23
23
|
## Step 2.5 — Set session title
|
|
24
24
|
|
|
@@ -13,7 +13,7 @@ Use `standards init` for first-time creation and `standards update` for existing
|
|
|
13
13
|
|
|
14
14
|
Do not hand-write standards file mutations inside the skill.
|
|
15
15
|
|
|
16
|
-
For project-analysis requests such as "分析项目" / "分析下这个项目", Step 0 still applies: the workspace is initialized and `peaks-
|
|
16
|
+
For project-analysis requests such as "分析项目" / "分析下这个项目", Step 0 still applies: the workspace is initialized and `peaks-code` presence is set before any analysis output. These requests run the lightweight analysis branch (project scan + standards dry-run) rather than the full RD/QA pipeline, but they never skip workspace anchoring or exit the workflow. The handoff must include an explicit **Standards increment** section. Report the current `CLAUDE.md` and `.claude/rules/**` status from the dry-run output as incremental deltas, not just a generic preflight note:
|
|
17
17
|
|
|
18
18
|
- whether `CLAUDE.md` is missing, existing, planned, skipped, appended, or review-only;
|
|
19
19
|
- which `.claude/rules/**` files are planned, existing, skipped, appended, or review-only;
|
|
@@ -8,9 +8,9 @@ The peaks-loop 1.x → 2.0 closeout ships:
|
|
|
8
8
|
|
|
9
9
|
1. A postinstall that auto-detects 1.x state and dispatches the upgrade (slice 1, commit `b6e34e6`).
|
|
10
10
|
2. A standards-migrate path that thins `.claude/rules/**/*.md` and scaffolds `.peaks/standards/` (slice 2, commit `33dd392`).
|
|
11
|
-
3. **THIS STEP** — a peaks-
|
|
11
|
+
3. **THIS STEP** — a peaks-code startup sequence probe that detects 1.x state when the user invokes `/peaks-code` directly in a 1.x consumer project, and prompts the user to upgrade.
|
|
12
12
|
|
|
13
|
-
The 1.x user experience is: "I just typed /peaks-
|
|
13
|
+
The 1.x user experience is: "I just typed /peaks-code. Why is it not working in 2.0 mode?" Step 0.55 catches this case and surfaces an `AskUserQuestion` with a one-click upgrade.
|
|
14
14
|
|
|
15
15
|
## Detection algorithm
|
|
16
16
|
|
|
@@ -35,7 +35,7 @@ The CLI returns:
|
|
|
35
35
|
},
|
|
36
36
|
"warnings": [],
|
|
37
37
|
"nextActions": [
|
|
38
|
-
"Detected 1.x state. peaks-
|
|
38
|
+
"Detected 1.x state. peaks-code Step 0.55 should present an AskUserQuestion to invoke `peaks upgrade --to 2.0 --auto --project /path/to/project`."
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
41
|
```
|
|
@@ -52,8 +52,8 @@ The TS mirror in `src/services/upgrade/1x-detector-service.ts` is the canonical
|
|
|
52
52
|
|
|
53
53
|
| Option | What it does |
|
|
54
54
|
|---|---|
|
|
55
|
-
| Run `peaks upgrade --to 2.0 --auto --project <root>` (Recommended) | Invokes the umbrella. The user sees the 6 sub-step results in the terminal. After the upgrade, re-run peaks-
|
|
56
|
-
| Skip for this session | Continue with the standing 1.x layout. Persist `autoUpgradePrompt: skip-this-session` to `.peaks/preferences.json`. The next time the user invokes peaks-
|
|
55
|
+
| Run `peaks upgrade --to 2.0 --auto --project <root>` (Recommended) | Invokes the umbrella. The user sees the 6 sub-step results in the terminal. After the upgrade, re-run peaks-code with the standing 2.0 layout. Persist `autoUpgradePrompt: opt-in` to `.peaks/preferences.json`. |
|
|
56
|
+
| Skip for this session | Continue with the standing 1.x layout. Persist `autoUpgradePrompt: skip-this-session` to `.peaks/preferences.json`. The next time the user invokes peaks-code in this project, the question re-asks. |
|
|
57
57
|
| Never ask again for this project | Persist `autoUpgradePrompt: skip-forever` to `.peaks/preferences.json`. Step 0.55 becomes a no-op for this project from now on. The user can re-enable later by removing the `autoUpgradePrompt` key from preferences.json. |
|
|
58
58
|
|
|
59
59
|
## Persistence contract
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Peaks-Loop Solo — Step 0.8 (v3.1.1 + v3.1.2) Gate Deep-Dive
|
|
2
|
+
|
|
3
|
+
> Read alongside `SKILL.md` Step 0.8. The SKILL.md header is the LOCKED CONTRACT; this file is the mechanics.
|
|
4
|
+
|
|
5
|
+
## Recorder contract (`peaks solo detect-job`)
|
|
6
|
+
|
|
7
|
+
The CLI does NOT judge whether the request is Job-shaped — that is the LLM's job. Keyword regexes are wrong here (too brittle, miss natural-language variants, shift the LLM's semantic understanding into code). The CLI is a **recorder and gate**: the LLM makes the judgement, writes it via `peaks solo detect-job`, and downstream steps refuse to proceed until the decision file exists.
|
|
8
|
+
|
|
9
|
+
### LLM judgement criteria (read once, then call the recorder)
|
|
10
|
+
|
|
11
|
+
- N parallel targets (`app/components/*`, `app/modules/*`, `for each subdir`, "以目录为维度", "把剩下的也跑了").
|
|
12
|
+
- Completion phrase implying batch continuation (`until all done`, "继续执行下个 slice", "全部添加完", "all of them").
|
|
13
|
+
- Cost / length disavowal (`不用考虑费用`, "don't worry about cost", "一直跑").
|
|
14
|
+
- Explicit slice count (`25 slices`, "切分成 N 段", "拆成 N 块").
|
|
15
|
+
|
|
16
|
+
### Action sequence
|
|
17
|
+
|
|
18
|
+
1. LLM reads the user prompt and applies judgement → `isJob: boolean + rationale + suggestedJobId + suggestedStrategy + confidence`.
|
|
19
|
+
2. LLM calls `peaks solo detect-job --is-job <bool> --rationale <text> --suggested-job-id <jid> --suggested-strategy <single|rotating> --confidence <high|medium|low> [--force]`.
|
|
20
|
+
3. CLI records to `.peaks/_runtime/<sessionId>/job-shape.json`.
|
|
21
|
+
4. If `isJob: true` → `peaks job init --job-id <jid> --slice-list <...> --main-loop-strategy <strategy> --rotate-every 3` (BEFORE Step 1).
|
|
22
|
+
5. Downstream steps (Step 1, Step 0.81, etc.) call `read-job-shape` to refuse if missing.
|
|
23
|
+
|
|
24
|
+
### Hard rule (v3.1.1 red-line #10)
|
|
25
|
+
|
|
26
|
+
LLM MUST NOT skip `peaks solo detect-job` even when the trigger is obvious from context. If the next step's `read-job-shape` throws `JOB_SHAPE_NOT_DECIDED`, Solo MUST record a decision before proceeding. Keyword-based "I already know it's a Job" is not a substitute.
|
|
27
|
+
|
|
28
|
+
## v3.1.2 mechanical gates
|
|
29
|
+
|
|
30
|
+
The recorder-only design was bypassed twice under load; the gate must be un-bypassable.
|
|
31
|
+
|
|
32
|
+
### 1. PreToolUse hook — `peaks solo gate-step-08`
|
|
33
|
+
|
|
34
|
+
`peaks workspace init` installs the `Bash` matcher `peaks solo gate-step-08 --project .` in `.claude/settings.local.json` (alongside the existing Write|Edit|MultiEdit matcher). The hook runs before every Bash call:
|
|
35
|
+
|
|
36
|
+
| Condition | Exit | Behaviour |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| `job-shape.json` exists | 0 (allow) | allow + emit decision; if `progress.json` exists, add `Next: slice #N+1 of M (<currentSlice>)` |
|
|
39
|
+
| `job-shape.json` missing AND prompt matches the fail-closed backup regex | 2 (BLOCKED) | LLM must call `peaks solo detect-job` before retrying |
|
|
40
|
+
| `job-shape.json` missing AND no regex match | 0 (allow) | allow, no Job trigger |
|
|
41
|
+
|
|
42
|
+
### 2. Size-fear ban — `peaks solo emit-handoff`
|
|
43
|
+
|
|
44
|
+
Refuses to emit a final handoff while `remaining > 0` under Job mode. Pass `--force-under-job` only with explicit user approval.
|
|
45
|
+
|
|
46
|
+
### 3. Forced auto-compact — `--enforce-job-mode`
|
|
47
|
+
|
|
48
|
+
`peaks solo context-now --enforce-job-mode` (auto-enabled when `job-shape.json` says `isJob=true`) returns `action: 'auto-compact-now'` at ≥ 0.85; Solo MUST call `peaks session auto-compact --execute` without confirmation.
|
|
49
|
+
|
|
50
|
+
### 4. On-disk slice progress — `progress.json`
|
|
51
|
+
|
|
52
|
+
`peaks job checkpoint --state done` writes `progress.json`. `peaks job progress --job-id <jid> [--allow-missing]` is the canonical reader; `peaks solo gate-step-08` also surfaces it on every Bash call so the LLM cannot "wake up cold".
|
|
53
|
+
|
|
54
|
+
## Backup regex rationale
|
|
55
|
+
|
|
56
|
+
The fail-closed backup regex (mentioned above) exists so the gate has defense in depth: even if the recorder's downstream enforcement is bypassed, the hook catches obvious Job-shaped prompts. The regex is intentionally narrow — it MUST miss benign prompts and MUST hit obvious batches — so the LLM-side judgement remains primary.
|
|
57
|
+
|
|
58
|
+
## Hook wiring
|
|
59
|
+
|
|
60
|
+
`peaks workspace init` writes both matchers (Bash + Write|Edit|MultiEdit) atomically; if either fails the whole init fails. `peaks workspace init --remove-hooks` reverses both. The Bash matcher is required for Step 0.8; the Write|Edit|MultiEdit matcher pre-existed (Step 0 [Fact-Forcing Gate]).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# sub-agent-dispatch.md — peaks sub-agent dispatch orchestrator contract
|
|
2
2
|
|
|
3
3
|
> **Slice**: 2026-06-07-sub-agent-dispatch-decouple (G3 + G6)
|
|
4
|
-
> **Audience**: SKILL.md authors and LLM readers of peaks-
|
|
4
|
+
> **Audience**: SKILL.md authors and LLM readers of peaks-code / peaks-rd / peaks-qa
|
|
5
5
|
> **Status**: stable
|
|
6
6
|
|
|
7
7
|
This reference is the orchestrator-side contract for sub-agent dispatch.
|
|
@@ -20,7 +20,7 @@ the skills compose. For sub-agent dispatch the relationship is:
|
|
|
20
20
|
|
|
21
21
|
| Surface | Who owns | What it does | Who calls it |
|
|
22
22
|
|---|---|---|---|
|
|
23
|
-
| SKILL.md (主面) | peaks-
|
|
23
|
+
| SKILL.md (主面) | peaks-code, peaks-rd, peaks-qa | Tells the LLM when and why to dispatch a sub-agent; what prompt to pass; what artifacts to expect back | LLM (during normal Solo / RD / QA flow) |
|
|
24
24
|
| CLI (副 / 原子) | `peaks sub-agent dispatch` | Validates the role, looks up the current IDE's `subAgentDispatcher`, returns a per-IDE tool-call descriptor + writes a dispatch record | LLM (read from the SKILL.md) |
|
|
25
25
|
| Dispatcher 抽象 (per-IDE) | `src/services/dispatch/sub-agent-dispatcher.ts` | Encapsulates the IDE-private tool name (claude-code: `Task`, trae: UNVERIFIED placeholder) and arg shape | CLI (called by the CLI) |
|
|
26
26
|
|
|
@@ -157,7 +157,7 @@ system is dead. G6 is the rule that says: **no**.
|
|
|
157
157
|
| Layer | Who | What | Cadence |
|
|
158
158
|
|---|---|---|---|
|
|
159
159
|
| **Sub-agent writes** | The sub-agent itself | Calls `peaks sub-agent heartbeat --record <dispatchRecordPath> --status <state> --progress <pct> --note "<text>"` to append a heartbeat | 30 s default; SKILL.md can override via `heartbeatIntervalSec: 15` |
|
|
160
|
-
| **Dispatcher reads** | peaks-
|
|
160
|
+
| **Dispatcher reads** | peaks-code main loop, during the batch-sync wait | In-process async poller (`BatchHeartbeatPoller`) reads `heartbeats[]` + `lastBeatAt` from each record, emits a single-line status per G6.5 | 10 s (offset from 30 s to avoid jitter) |
|
|
161
161
|
| **User / CLI reads** | Anyone, anytime | `peaks sub-agent list --session-id <sid> --json` (G5 RL-10, future slice) | manual |
|
|
162
162
|
|
|
163
163
|
### Sub-agent prompt template (heartbeat-aware + MCP-decoupled)
|
|
@@ -207,10 +207,10 @@ add it explicitly.
|
|
|
207
207
|
Single line, 80-120 chars:
|
|
208
208
|
|
|
209
209
|
```
|
|
210
|
-
[peaks-
|
|
211
|
-
[peaks-
|
|
210
|
+
[peaks-code] swarm 3/3 running | rd-planning 45% (12s ago) | qa-test-cases 30% (5s ago) | ui-design 20% (2s ago)
|
|
211
|
+
[peaks-code] swarm 3/3 running | rd-planning 70% (8s ago) | qa-test-cases 50% (3s ago) | ui-design 30% (6s ago)
|
|
212
212
|
...
|
|
213
|
-
[peaks-
|
|
213
|
+
[peaks-code] swarm 3/3 done
|
|
214
214
|
```
|
|
215
215
|
|
|
216
216
|
If a sub-agent has not written a heartbeat in 5 minutes, the poller
|
|
@@ -231,7 +231,7 @@ once the poller has read them.
|
|
|
231
231
|
|
|
232
232
|
- AC-33 `peaks sub-agent heartbeat` CLI primitive (implemented)
|
|
233
233
|
- AC-34 Dispatch record schema upgrade (`heartbeats[]` + `lastBeatAt` + `status` aggregate, backward-compat defaults)
|
|
234
|
-
- AC-35 peaks-
|
|
234
|
+
- AC-35 peaks-code main loop batch-sync poller (10 s cadence, 5 min stale)
|
|
235
235
|
- AC-36 SKILL.md fan-out sections include heartbeat instruction
|
|
236
236
|
- AC-37 G6 E2E dogfood (3 heartbeats, 101 → truncated, stale simulation)
|
|
237
237
|
|
|
@@ -243,7 +243,7 @@ once the poller has read them.
|
|
|
243
243
|
- AC-10: dispatch CLI unit tests
|
|
244
244
|
- AC-11 / AC-11b / AC-11c: E2E dogfood on the live repo
|
|
245
245
|
- AC-12: `peaks --help` byte-level delta is `+1` line (`sub-agent <cmd>`)
|
|
246
|
-
- AC-13..AC-19: SKILL.md fan-out rewrites (peaks-
|
|
246
|
+
- AC-13..AC-19: SKILL.md fan-out rewrites (peaks-code 5 spots, peaks-rd 2, peaks-qa 3-way, peaks-ui 1; this reference is the canonical contract)
|
|
247
247
|
- AC-22..AC-24: R-2 path guard, prompt size limit, atomic write
|
|
248
248
|
- AC-25..AC-32: G5 resource lifecycle (RL-1 batch counter, dispatch record schema, reducer dispose, slice archive, cancel dispose)
|
|
249
249
|
- AC-33..AC-37: G6 heartbeat CLI, schema, poller, status line, E2E
|
|
@@ -271,7 +271,7 @@ When writing a SKILL.md that fans out sub-agents:
|
|
|
271
271
|
- RD request #009 in-scope files (implementation contract)
|
|
272
272
|
- `.peaks/memory/sub-agent-resource-lifecycle-red-line.md` (G5 red line)
|
|
273
273
|
- `.peaks/memory/sub-agent-heartbeat-progress-red-line.md` (G6 red line)
|
|
274
|
-
- `skills/peaks-
|
|
274
|
+
- `skills/peaks-code/references/swarm-dispatch-contract.md` (predecessor contract)
|
|
275
275
|
- `skills/peaks-qa/references/qa-fanout-contract.md` (QA-specific fan-out)
|
|
276
276
|
|
|
277
277
|
---
|
|
@@ -330,5 +330,5 @@ The role's required artefact paths (also see peaks-ui/rd/qa SKILL.md and `refere
|
|
|
330
330
|
After every sub-agent dispatch returns, Solo **restores presence** once (not per-agent), then continues to Gate B verification:
|
|
331
331
|
|
|
332
332
|
```bash
|
|
333
|
-
peaks skill presence:set peaks-
|
|
333
|
+
peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate swarm-converged
|
|
334
334
|
```
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Swarm dispatch contract
|
|
2
2
|
|
|
3
|
-
> Reference for `peaks-
|
|
3
|
+
> Reference for `peaks-code` Swarm phase and the role sub-agents (`peaks-ui` / `peaks-rd` planning / `peaks-qa` test-cases). Defines the **mechanism** of fan-out: how Solo launches sub-agents, what the sub-agent prompt must contain, what the sub-agent must return, and how Solo reduces the result.
|
|
4
4
|
|
|
5
5
|
## Peaks-Loop Swarm parallel phase (sub-agent fan-out, default)
|
|
6
6
|
|
|
7
7
|
> **Slice 5 (2026-06-23) + slice 2026-06-23-audit-4th #F3:** the
|
|
8
8
|
> previous "conditional swarm" framing is replaced by the **default
|
|
9
|
-
> fan-out rule** in `skills/peaks-
|
|
9
|
+
> fan-out rule** in `skills/peaks-code/SKILL.md` §"Peaks-Loop Default
|
|
10
10
|
> sub-agent fan-out". When the slice DAG has ≥ 2 leaves at the same
|
|
11
11
|
> topological level, dispatch goes through
|
|
12
12
|
> `peaks sub-agent dispatch --from-dag` (NOT one-at-a-time). The
|
|
@@ -31,7 +31,7 @@ The previous "Swarm" used `Skill(skill="peaks-rd")` calls. That is **single-stac
|
|
|
31
31
|
This contract (slice #009) replaces the IDE-private sub-agent literal with the IDE-agnostic primitive `peaks sub-agent dispatch <role>`. The CLI returns a JSON `data.toolCall` descriptor; the LLM executes that tool in its own environment. SKILL.md is now free of IDE-private tool names and the same prompt works on every registered IDE. Real concurrent fan-out is achieved by Solo launching N dispatch calls in a single message and the platform scheduling the returned toolCalls concurrently.
|
|
32
32
|
|
|
33
33
|
```
|
|
34
|
-
You are a sub-agent invoked by peaks-
|
|
34
|
+
You are a sub-agent invoked by peaks-code. You are NOT the main Claude session.
|
|
35
35
|
Your job: execute ONE role from the peaks skill family and write its artefact(s).
|
|
36
36
|
Return a compact JSON envelope — do not write prose.
|
|
37
37
|
|
|
@@ -150,7 +150,7 @@ After all sub-agent dispatch calls return and the LLM has invoked the toolCalls,
|
|
|
150
150
|
|
|
151
151
|
1. Restores presence ONCE (not per-agent):
|
|
152
152
|
```
|
|
153
|
-
peaks skill presence:set peaks-
|
|
153
|
+
peaks skill presence:set peaks-code --project <repo> --mode <mode> --gate swarm-converged
|
|
154
154
|
```
|
|
155
155
|
2. Runs `ls` checks against `sc/swarm-plan.json` — every promised artefact must exist (Gate B hard). If any are missing, apply the degradation rules in "Degradation when swarm roles fail or are absent" (main SKILL.md).
|
|
156
156
|
3. Updates `sc/swarm-plan.json` with the final status of each sub-agent (ok / blocked / skipped / error).
|
|
@@ -158,20 +158,20 @@ After all sub-agent dispatch calls return and the LLM has invoked the toolCalls,
|
|
|
158
158
|
|
|
159
159
|
## 5. Presence restoration (single-shot)
|
|
160
160
|
|
|
161
|
-
Sub-agents are explicitly forbidden from calling `peaks skill presence:set`. That means `.peaks/.active-skill.json` does not move during the fan-out. Solo sets it to `gate=swarm-fan-out` before fan-out and to `gate=swarm-converged` once after all Tasks return. The status header (the `Peaks-Loop Skill: peaks-
|
|
161
|
+
Sub-agents are explicitly forbidden from calling `peaks skill presence:set`. That means `.peaks/.active-skill.json` does not move during the fan-out. Solo sets it to `gate=swarm-fan-out` before fan-out and to `gate=swarm-converged` once after all Tasks return. The status header (the `Peaks-Loop Skill: peaks-code | Peaks-Loop Gate: <gate>` line) therefore reads consistently across the fan-out window.
|
|
162
162
|
|
|
163
163
|
If a sub-agent is misbehaving and writes to `.peaks/.active-skill.json` anyway, the next Solo presence-set (after fan-out) overwrites it — the bug self-heals on the next gate advance, but the swarm-phase display may be off. The hard prohibition is there to prevent this; Solo should still treat the file as a single-writer resource.
|
|
164
164
|
|
|
165
165
|
## 6. Why not a `peaks-swarm` skill?
|
|
166
166
|
|
|
167
|
-
A skill cannot itself trigger sub-agents — the Skill tool runs in the main loop. The orchestrator (peaks-
|
|
167
|
+
A skill cannot itself trigger sub-agents — the Skill tool runs in the main loop. The orchestrator (peaks-code) has to be in the main loop and has to call `peaks sub-agent dispatch` directly. Putting swarm logic into a separate skill would either re-introduce the "single-stack blocking" anti-pattern or require a custom slash command that bypasses the Skill tool. The current design keeps swarm control in peaks-code where it belongs.
|
|
168
168
|
|
|
169
169
|
## 7. Tests / dogfood
|
|
170
170
|
|
|
171
171
|
- `peaks scan archetype --project <repo> --json` must keep emitting `frontendOnly` and `frontendOnlyReason`. Both fields are read here and by the existing pre-RD scan contract.
|
|
172
172
|
- `peaks request show <rid> --role prd --json` must surface the `--type` chosen at `peaks request init`. Sub-agents pass it through unchanged.
|
|
173
173
|
- `peaks skill presence:set` must remain single-writer-friendly (the sub-agents do not call it).
|
|
174
|
-
- Smoke test: a full-auto peaks-
|
|
174
|
+
- Smoke test: a full-auto peaks-code run on a `legacy-frontend` project with a UI-affecting PRD should produce `sc/swarm-plan.json` containing all three sub-agents and three corresponding artefacts in `ui/`, `rd/`, `qa/`.
|
|
175
175
|
|
|
176
176
|
---
|
|
177
177
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Peaks-Loop Workflow Order + Request Type Classification + Transition Verification Gates
|
|
2
2
|
|
|
3
|
-
> **Maintenance**: This reference holds the canonical contract for (a) how Solo sequences the 11 workflow steps, (b) which `--type` to pass to `peaks request init` for which slice shape, and (c) the executable `ls` / `grep` gate commands that physically block progression. SKILL.md keeps the narrative ("what peaks-
|
|
3
|
+
> **Maintenance**: This reference holds the canonical contract for (a) how Solo sequences the 11 workflow steps, (b) which `--type` to pass to `peaks request init` for which slice shape, and (c) the executable `ls` / `grep` gate commands that physically block progression. SKILL.md keeps the narrative ("what peaks-code does"); this file keeps the contract.
|
|
4
4
|
>
|
|
5
5
|
> **Why extracted from SKILL.md**: this content is 165 lines of mostly-tabular + bash-block contract — reference data, not orchestration prose. Inlining it bloats SKILL.md past the 800-line cap (per `common/coding-style.md`). The numbers, gate command shapes, and type-classification rules change rarely; the SKILL.md prose around them (orchestration flow, repair-loop intent, swarm fan-out shape) changes more often.
|
|
6
6
|
>
|
|
7
7
|
> **How peaks-loop tooling reads this file**:
|
|
8
|
-
> - `peaks skill runbook peaks-
|
|
8
|
+
> - `peaks skill runbook peaks-code` (CLI) and the in-line LLM reading the SKILL.md should reference this file when the gate-machine or type-classification contract is in play.
|
|
9
9
|
> - The test `tests/unit/skill-default-runbook.test.ts` does NOT check this file (it only checks the runbook). Future tests can add a similar fallback for the gates-and-types contract.
|
|
10
10
|
|
|
11
11
|
## Peaks-Loop Request type classification (MANDATORY before `peaks request init`)
|
|
@@ -170,7 +170,7 @@ find . -maxdepth 1 -name "*.png" -o -name "*.jpg" -o -name "qa-*.js" -o -name "m
|
|
|
170
170
|
```bash
|
|
171
171
|
# After `peaks standards init/update --apply`, verify the files actually landed
|
|
172
172
|
# at the project root. The CLAUDE.md and rules files are required so that
|
|
173
|
-
# subsequent peaks-rd / peaks-qa / peaks-
|
|
173
|
+
# subsequent peaks-rd / peaks-qa / peaks-code runs perform the project-local
|
|
174
174
|
# preflight described in CLAUDE.md (read coding-style.md, code-review.md, security.md).
|
|
175
175
|
ls <repo>/CLAUDE.md
|
|
176
176
|
# "No such file" → BLOCKED. Run `peaks standards init --project <repo> --apply --json`
|
|
@@ -22,7 +22,7 @@ The doctor workflow is read-only by design. It produces:
|
|
|
22
22
|
- `peaks doctor` report (69 checks: 68 pass, 1 fail — L3:l3-memory-health)
|
|
23
23
|
- Optional OpenSpec change records via `peaks openspec from-doctor`
|
|
24
24
|
|
|
25
|
-
If a doctor finding requires a code change, the workflow hands off to `peaks-rd` (or `peaks-
|
|
25
|
+
If a doctor finding requires a code change, the workflow hands off to `peaks-rd` (or `peaks-code` for the full pipeline). The doctor itself does NOT modify code.
|
|
26
26
|
|
|
27
27
|
## Workflow (5 steps)
|
|
28
28
|
|