peaks-loop 3.1.2 → 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 +50 -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 +5 -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 +8 -8
- 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-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/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/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/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 +1 -1
- package/dist/src/services/workspace/claude-settings-template.js +2 -2
- 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 +9 -9
- 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 +5 -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-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/step-0-8-gate.md +0 -0
- /package/skills/{peaks-solo → peaks-code}/references/workflow.md +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* The template is a PreToolUse hook allow-list that bypasses the
|
|
6
6
|
* Claude Code [Fact-Forcing Gate] for tool calls whose paths target
|
|
7
7
|
* the peaks-managed `.peaks/` workspace. Without this bypass,
|
|
8
|
-
* `peaks workspace init` (Step 0 of every peaks-
|
|
8
|
+
* `peaks workspace init` (Step 0 of every peaks-code session) is
|
|
9
9
|
* unrunnable in a consumer project because the gate blocks the very
|
|
10
10
|
* first Write.
|
|
11
11
|
*
|
|
@@ -174,7 +174,7 @@ function wrapAsNodeOneLiner(js) {
|
|
|
174
174
|
* subcommand allow-list. It does NOT silently allow arbitrary paths
|
|
175
175
|
* under `.peaks/_runtime/<sessionId>/` — only those matching the documented
|
|
176
176
|
* pattern. Future slice work can broaden the allow-list if the
|
|
177
|
-
* peaks-
|
|
177
|
+
* peaks-code workflow needs more paths.
|
|
178
178
|
*/
|
|
179
179
|
function buildWriteHookCommand() {
|
|
180
180
|
// Path-matching: allow when the path contains `.peaks/_runtime/`
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* recovery path: copy the file contents into
|
|
27
27
|
* `.claude/settings.local.json` manually. The recovery path is
|
|
28
28
|
* documented in
|
|
29
|
-
* `skills/peaks-
|
|
29
|
+
* `skills/peaks-code/references/anchoring-and-session-info.md`.
|
|
30
30
|
*
|
|
31
31
|
* Slice 2026-06-13-selfheal-claude-settings-template: the offline copy
|
|
32
32
|
* is now ALSO drift-checked (via `templateContentMatches`) so stale
|
|
@@ -53,7 +53,7 @@ const PEAKS_GITIGNORE_SNIPPET = [
|
|
|
53
53
|
* recovery path: copy the file contents into
|
|
54
54
|
* `.claude/settings.local.json` manually. The recovery path is
|
|
55
55
|
* documented in
|
|
56
|
-
* `skills/peaks-
|
|
56
|
+
* `skills/peaks-code/references/anchoring-and-session-info.md`.
|
|
57
57
|
*
|
|
58
58
|
* Slice 2026-06-13-selfheal-claude-settings-template: the offline copy
|
|
59
59
|
* is now ALSO drift-checked (via `templateContentMatches`) so stale
|
|
@@ -19,7 +19,7 @@ export type WorkspaceInitOptions = {
|
|
|
19
19
|
*/
|
|
20
20
|
noClaudeHooks?: boolean;
|
|
21
21
|
/**
|
|
22
|
-
* Slice 2026-06-16-peaks-
|
|
22
|
+
* Slice 2026-06-16-peaks-code-auto-scaffold (RD#7): opt-in flag for
|
|
23
23
|
* auto-applying `peaks standards init` when the consumer project's
|
|
24
24
|
* `.claude/rules/` is missing or empty. Default (`false`) only emits
|
|
25
25
|
* the diagnostic; set to `true` to also scaffold the rules tree via
|
|
@@ -59,7 +59,7 @@ export type WorkspaceInitReport = {
|
|
|
59
59
|
* taken on the offline `.peaks/.claude-settings-template.json` copy.
|
|
60
60
|
* The offline copy is ALWAYS written/checked (regardless of
|
|
61
61
|
* noClaudeHooks) because it is the manual-recovery anchor — see
|
|
62
|
-
* `skills/peaks-
|
|
62
|
+
* `skills/peaks-code/references/anchoring-and-session-info.md`.
|
|
63
63
|
* - written: the file did not exist; it was created
|
|
64
64
|
* - refreshed: the file existed but its parsed hooks tree
|
|
65
65
|
* diverged from the current `buildClaudeSettingsLocalJson()`;
|
|
@@ -75,7 +75,7 @@ export type WorkspaceInitReport = {
|
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
77
|
/**
|
|
78
|
-
* Slice 2026-06-16-peaks-
|
|
78
|
+
* Slice 2026-06-16-peaks-code-auto-scaffold (RD#7): structured
|
|
79
79
|
* diagnostic for missing or empty `.claude/rules/{common,<language>}/`.
|
|
80
80
|
* Always present (the detector runs on every init); `missing: false`
|
|
81
81
|
* means the project's rules tree is already populated and no action is
|
|
@@ -84,7 +84,7 @@ export type WorkspaceInitReport = {
|
|
|
84
84
|
*/
|
|
85
85
|
standardsMissing: MissingProjectStandardsDiagnostic;
|
|
86
86
|
/**
|
|
87
|
-
* Slice 2026-06-16-peaks-
|
|
87
|
+
* Slice 2026-06-16-peaks-code-auto-scaffold (RD#7): when the caller
|
|
88
88
|
* passed `initStandards: true` AND the detector reported `missing:
|
|
89
89
|
* true`, this field lists the files written by
|
|
90
90
|
* `executeProjectStandardsInit({ projectRoot, apply: true })`.
|
|
@@ -249,7 +249,7 @@ export async function initWorkspace(options) {
|
|
|
249
249
|
// that takes an explicit --session-id, so it owns the binding to .session.json.
|
|
250
250
|
// Without this write, downstream commands that fall through to
|
|
251
251
|
// `ensureSession()` would auto-generate a *different* id and create a second
|
|
252
|
-
// session directory — the bug that confuses the LLM in peaks-
|
|
252
|
+
// session directory — the bug that confuses the LLM in peaks-code.
|
|
253
253
|
//
|
|
254
254
|
// Conflict rule: if .session.json already points at a different session
|
|
255
255
|
// whose directory is real (has session.json inside), the caller is starting
|
|
@@ -289,7 +289,7 @@ export async function initWorkspace(options) {
|
|
|
289
289
|
setCurrentSessionBinding(options.projectRoot, options.sessionId);
|
|
290
290
|
bound = true;
|
|
291
291
|
}
|
|
292
|
-
// Slice 2026-06-16-peaks-
|
|
292
|
+
// Slice 2026-06-16-peaks-code-auto-scaffold (RD#7):
|
|
293
293
|
// - Always run the detector and surface the descriptor so the CLI can
|
|
294
294
|
// put it on stderr + into the JSON envelope's `data.standardsMissing`.
|
|
295
295
|
// - When `initStandards: true` AND the detector reports missing, run
|
|
@@ -2,5 +2,5 @@ export declare const repoRoot: string;
|
|
|
2
2
|
export declare const skillsDir: string;
|
|
3
3
|
export declare const schemasDir: string;
|
|
4
4
|
export declare const templatesDir: string;
|
|
5
|
-
export declare const requiredSkillNames: readonly ["peaks-
|
|
5
|
+
export declare const requiredSkillNames: readonly ["peaks-code", "peaks-prd", "peaks-ui", "peaks-rd", "peaks-qa", "peaks-sc", "peaks-txt", "peaks-sop"];
|
|
6
6
|
export declare const requiredSchemaFiles: readonly ["artifact-manifest.schema.json", "context-capsule.schema.json", "approval-record.schema.json", "change-impact.schema.json", "refactor-slice-spec.schema.json", "artifact-retention-report.schema.json", "capability-source.schema.json", "capability-item.schema.json", "capability-availability.schema.json", "recommendation-plan.schema.json", "artifact-workspace.schema.json", "mcp-server.schema.json", "mcp-install-spec.schema.json", "mcp-install-plan.schema.json", "mcp-apply-result.schema.json", "openspec-change-summary.schema.json", "openspec-render-request.schema.json", "openspec-validation-result.schema.json", "doctor-report.schema.json", "library-breaking-changes.schema.json"];
|
package/dist/src/shared/paths.js
CHANGED
|
@@ -17,7 +17,7 @@ export const skillsDir = resolve(repoRoot, 'skills');
|
|
|
17
17
|
export const schemasDir = resolve(repoRoot, 'schemas');
|
|
18
18
|
export const templatesDir = resolve(repoRoot, 'templates');
|
|
19
19
|
export const requiredSkillNames = [
|
|
20
|
-
'peaks-
|
|
20
|
+
'peaks-code',
|
|
21
21
|
'peaks-prd',
|
|
22
22
|
'peaks-ui',
|
|
23
23
|
'peaks-rd',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "
|
|
1
|
+
export declare const CLI_VERSION = "4.0.0-beta";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "
|
|
1
|
+
export const CLI_VERSION = "4.0.0-beta";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// src/skills/peaks-maker/index.ts
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { dirname, join } from "node:path";
|
|
5
|
+
function parseFrontmatter(md) {
|
|
6
|
+
const m = md.match(/^---\n([\s\S]+?)\n---\n([\s\S]*)$/);
|
|
7
|
+
if (!m)
|
|
8
|
+
throw new Error("peaks-maker SKILL.md is missing YAML frontmatter");
|
|
9
|
+
const fm = {};
|
|
10
|
+
for (const line of m[1].split("\n")) {
|
|
11
|
+
const i = line.indexOf(":");
|
|
12
|
+
if (i > 0)
|
|
13
|
+
fm[line.slice(0, i).trim()] = line.slice(i + 1).trim();
|
|
14
|
+
}
|
|
15
|
+
// The non-null assertions below were unsafe: if `name:` or `description:`
|
|
16
|
+
// was absent from the frontmatter, `fm[name]` would be `undefined`, which
|
|
17
|
+
// violates the declared return type and silently leaks a malformed
|
|
18
|
+
// manifest to every consumer of `peaksMakerManifest`. Validate explicitly
|
|
19
|
+
// so a missing/empty key surfaces as a clear error at module-load time.
|
|
20
|
+
const name = fm.name;
|
|
21
|
+
const description = fm.description;
|
|
22
|
+
if (typeof name !== "string" || name.length === 0) {
|
|
23
|
+
throw new Error("peaks-maker SKILL.md is missing name or description in frontmatter");
|
|
24
|
+
}
|
|
25
|
+
if (typeof description !== "string" || description.length === 0) {
|
|
26
|
+
throw new Error("peaks-maker SKILL.md is missing name or description in frontmatter");
|
|
27
|
+
}
|
|
28
|
+
return { name, description, body: m[2] };
|
|
29
|
+
}
|
|
30
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
31
|
+
const md = readFileSync(join(here, "SKILL.md"), "utf-8");
|
|
32
|
+
export const peaksMakerManifest = parseFrontmatter(md);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "peaks-loop",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-beta",
|
|
4
4
|
"description": "Loop Engineering CLI — workflow primitive / loop guards / evaluators / slice orchestration",
|
|
5
5
|
"author": "SquabbyZ",
|
|
6
6
|
"license": "MIT",
|
|
@@ -63,16 +63,20 @@
|
|
|
63
63
|
"typecheck": "tsc -p tsconfig.json --noEmit && vitest run --coverage --coverage.include='src/services/workflow/plan-*.ts' tests/unit/services/workflow/",
|
|
64
64
|
"mut:run": "peaks mut run --project . --out mut-report.json",
|
|
65
65
|
"mut:scan": "peaks mut asserts --in mut-report.json",
|
|
66
|
-
"audit:prose-ratio": "peaks audit prose-ratio --project ."
|
|
66
|
+
"audit:prose-ratio": "peaks audit prose-ratio --project .",
|
|
67
|
+
"dogfood:sediment": "bash scripts/dogfood-sediment-cycle.sh"
|
|
67
68
|
},
|
|
68
69
|
"engines": {
|
|
69
70
|
"node": ">=20.0.0"
|
|
70
71
|
},
|
|
71
72
|
"pnpm": {
|
|
72
|
-
"onlyBuiltDependencies": [
|
|
73
|
+
"onlyBuiltDependencies": [
|
|
74
|
+
"better-sqlite3"
|
|
75
|
+
]
|
|
73
76
|
},
|
|
74
77
|
"dependencies": {
|
|
75
78
|
"@colbymchenry/codegraph": "0.7.10",
|
|
79
|
+
"better-sqlite3": "^12.11.1",
|
|
76
80
|
"commander": "^12.1.0",
|
|
77
81
|
"fzf": "^0.5.2",
|
|
78
82
|
"headroom-ai": "0.22.4",
|
|
@@ -92,6 +96,7 @@
|
|
|
92
96
|
"@stryker-mutator/core": "^8.7.1",
|
|
93
97
|
"@stryker-mutator/typescript-checker": "^8.7.1",
|
|
94
98
|
"@stryker-mutator/vitest-runner": "^8.7.1",
|
|
99
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
95
100
|
"@types/node": "^22.10.2",
|
|
96
101
|
"@vitest/coverage-v8": "^2.1.8",
|
|
97
102
|
"tsx": "^4.19.2",
|
|
@@ -600,14 +600,39 @@ export function installBundledSkills(options = {}) {
|
|
|
600
600
|
mkdirSync(targetRoot, { recursive: true });
|
|
601
601
|
const validateSkillsRoot = createInstallRootValidator(targetRoot, 'Peaks skills');
|
|
602
602
|
|
|
603
|
+
// After the v2.13.0 bee-demote (commit de0872b), the role skills
|
|
604
|
+
// (peaks-prd, peaks-rd, peaks-qa, peaks-ui, peaks-sc, peaks-txt)
|
|
605
|
+
// moved under `skills/bee/<role>/` while user-facing helpers stayed
|
|
606
|
+
// at `skills/<name>/`. Build the install candidate list by walking
|
|
607
|
+
// top-level entries (user-facing helpers) AND `skills/bee/<role>`
|
|
608
|
+
// (demoted role skills). Each candidate is installed under its
|
|
609
|
+
// basename so the postinstall links `~/.claude/skills/peaks-rd`
|
|
610
|
+
// to `skills/bee/peaks-rd` (rather than `skills/bee`).
|
|
611
|
+
const beeRoot = join(skillsRoot, 'bee');
|
|
612
|
+
/** @type {Array<{ skillName: string, sourcePath: string }>} */
|
|
613
|
+
const candidates = [];
|
|
603
614
|
for (const skillName of readdirSync(skillsRoot)) {
|
|
615
|
+
if (skillName === 'bee') continue;
|
|
604
616
|
const sourcePath = join(skillsRoot, skillName);
|
|
605
617
|
const skillFile = join(sourcePath, 'SKILL.md');
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
618
|
+
if (!lstatSync(sourcePath).isDirectory() || !existsSync(skillFile)) continue;
|
|
619
|
+
candidates.push({ skillName, sourcePath });
|
|
620
|
+
}
|
|
621
|
+
if (existsSync(beeRoot) && lstatSync(beeRoot).isDirectory()) {
|
|
622
|
+
for (const skillName of readdirSync(beeRoot)) {
|
|
623
|
+
const sourcePath = join(beeRoot, skillName);
|
|
624
|
+
const skillFile = join(sourcePath, 'SKILL.md');
|
|
625
|
+
if (!lstatSync(sourcePath).isDirectory() || !existsSync(skillFile)) continue;
|
|
626
|
+
// De-dupe: a top-level helper with the same name wins (preserves
|
|
627
|
+
// the existing install contract for any helper that shares a name
|
|
628
|
+
// with a demoted role skill, e.g. legacy overlap).
|
|
629
|
+
if (candidates.some((c) => c.skillName === skillName)) continue;
|
|
630
|
+
candidates.push({ skillName, sourcePath });
|
|
610
631
|
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
for (const { skillName, sourcePath } of candidates) {
|
|
635
|
+
const targetPath = join(targetRoot, skillName);
|
|
611
636
|
|
|
612
637
|
const current = getPathStats(targetPath);
|
|
613
638
|
if (current) {
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-prd
|
|
3
|
-
description:
|
|
3
|
+
description: |
|
|
4
|
+
Product and requirement role for Peaks-Loop (LLM-only internal role; not user-invocable.
|
|
5
|
+
Triggered by peaks-code via `peaks sub-agent dispatch --role prd`.)
|
|
6
|
+
Use when a workflow needs PRD, refactor goals, non-goals, behavior preservation,
|
|
7
|
+
acceptance criteria, product change proposals, or user-confirmable product artifacts.
|
|
8
|
+
visibility: internal
|
|
9
|
+
---
|
|
4
10
|
---
|
|
5
11
|
|
|
6
12
|
# Peaks-Loop PRD
|
|
@@ -223,7 +229,7 @@ Use gstack as a concrete workflow reference for the product-facing parts of `Thi
|
|
|
223
229
|
|
|
224
230
|
## Authenticated product document workflow
|
|
225
231
|
|
|
226
|
-
When the source PRD is an authenticated web document such as Feishu/Lark, use the Playwright MCP headed-browser surface rather than unauthenticated fetch tools. Chrome DevTools MCP is a secondary surface that only connects to an already-running Chrome (`--remote-debugging-port=9222`); it does not launch a browser on its own. The canonical browser workflow lives in `peaks-
|
|
232
|
+
When the source PRD is an authenticated web document such as Feishu/Lark, use the Playwright MCP headed-browser surface rather than unauthenticated fetch tools. Chrome DevTools MCP is a secondary surface that only connects to an already-running Chrome (`--remote-debugging-port=9222`); it does not launch a browser on its own. The canonical browser workflow lives in `peaks-code/references/browser-workflow.md`; the rules below are the PRD-specific application.
|
|
227
233
|
|
|
228
234
|
1. Confirm Playwright MCP is installed: check the LLM tool list for any Playwright MCP entry in the LLM tool list. If absent, the user installs via `claude mcp add playwright -- npx @playwright/mcp@latest` (Claude Code) or the IDE-native install command. Do not hand-edit `.claude/settings.json`.
|
|
229
235
|
2. Before navigation, verify the user-provided document URL uses `https:` and belongs to an approved Feishu/Lark tenant domain such as `*.feishu.cn`, `*.larksuite.com`, `*.larksuite.com.cn`, or a project-configured tenant. Reject `file:`, `data:`, `javascript:`, `http:`, localhost, loopback, link-local, private IP, and raw IP hosts unless the user explicitly approves a controlled local test target.
|
|
@@ -15,7 +15,7 @@ When the product source is an authenticated Feishu/Lark/wiki document:
|
|
|
15
15
|
7. Do not persist login URLs, redirect URLs, cookies, request or response headers, session tokens, tokens, storage state, QR payloads, raw browser state, raw network logs, browser traces, or screenshots/logs containing PII or SSO/MFA material into artifacts; redact sensitive evidence before writing `.peaks` outputs.
|
|
16
16
|
8. If access remains blocked, record only a redacted document identifier, a sanitized state category such as `login-required`, `mfa-required`, or `access-denied`, and the exact user action needed.
|
|
17
17
|
|
|
18
|
-
Canonical browser workflow: `../../peaks-
|
|
18
|
+
Canonical browser workflow: `../../peaks-code/references/browser-workflow.md`.
|
|
19
19
|
|
|
20
20
|
## Implementation-oriented analysis
|
|
21
21
|
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-qa
|
|
3
|
-
description:
|
|
3
|
+
description: |
|
|
4
|
+
QA and verification role for Peaks-Loop (LLM-only internal role; not user-invocable.
|
|
5
|
+
Triggered by peaks-code via `peaks sub-agent dispatch --role qa`.)
|
|
6
|
+
Use when a workflow needs unit-test coverage evidence, regression matrices,
|
|
7
|
+
baseline reports, validation reports, acceptance checks, or refactor verification gates.
|
|
8
|
+
visibility: internal
|
|
9
|
+
---
|
|
4
10
|
---
|
|
5
11
|
|
|
6
12
|
## Single-scope-axis naming convention
|
|
@@ -48,9 +54,9 @@ These two contracts are non-negotiable. The previous prose-only phrasing let the
|
|
|
48
54
|
|
|
49
55
|
The canonical scope dir for this request is provided as `envelope.data.scopeDir` (absolute path). Write all session-id-scoped files under that path. **NEVER** construct paths like `.peaks/_runtime/<scope>/...` from frontmatter (where `<scope>` is a date-stamped session id, NOT a peaks-loop change-id — the change-id axis was removed in slice `2026-06-29-change-id-root-removal`). The path has already been resolved by the CLI.
|
|
50
56
|
|
|
51
|
-
## Sub-agent dispatch (when launched by peaks-
|
|
57
|
+
## Sub-agent dispatch (when launched by peaks-code swarm)
|
|
52
58
|
|
|
53
|
-
When this skill is launched as a sub-agent via `peaks sub-agent dispatch <role>` (then the LLM executes the returned toolCall) from `peaks-
|
|
59
|
+
When this skill is launched as a sub-agent via `peaks sub-agent dispatch <role>` (then the LLM executes the returned toolCall) from `peaks-code`, the following sections of THIS skill are **suspended** for the sub-agent run: Session id, Skill presence, Workspace initialization, Mode selection, Statusline install. The sub-agent must NOT call `peaks request init` (Solo already initialised the slot), and must write `.peaks/_runtime/<sessionId>/qa/test-cases/<rid>.md` with test cases that link to PRD acceptance items. Return only a compact JSON envelope.
|
|
54
60
|
|
|
55
61
|
> **v2.15.0+ 校准:** 每个 slice 完成,user 必介入做**业务审阅**(4-5 项业务/产品清单:业务流程 / 需求覆盖 / 边界 case / UI 装配 / 能合入下版吗),**不是技术审阅**。业务审过 → 进 final;业务不通过 → 返工。详见 `.peaks/memory/peaks-loop-slice-review-and-qa-perspective.md`。
|
|
56
62
|
|
|
@@ -202,7 +208,7 @@ Do not own product scope or implementation. Do not modify runtime configuration.
|
|
|
202
208
|
|
|
203
209
|
## Sub-agent context governance (G7 + G7.7 + G8 + G9 — slice #010)
|
|
204
210
|
|
|
205
|
-
QA sub-agents (qa / qa-business / qa-perf / qa-security) follow the same G7 metadata-only + G8.6 share protocol as RD. Detailed: `skills/peaks-
|
|
211
|
+
QA sub-agents (qa / qa-business / qa-perf / qa-security) follow the same G7 metadata-only + G8.6 share protocol as RD. Detailed: `skills/peaks-code/references/context-governance.md`.
|
|
206
212
|
|
|
207
213
|
→ see `references/qa-context-governance.md` for the full G7 / G8.6 / G9 protocol + QA sub-agent prompt template.
|
|
208
214
|
|
|
@@ -39,9 +39,9 @@ AskUserQuestion({
|
|
|
39
39
|
{ label: "I am logged in / I'll log in now",
|
|
40
40
|
description: "Pause QA. The visible browser is already open; the user completes login in-place, then types 'logged in' or equivalent. QA then resumes browser_navigate + browser_snapshot from the post-login page." },
|
|
41
41
|
{ label: "Skip browser validation for this slice",
|
|
42
|
-
description: "Mark the affected acceptance items as unverified in the test report. Do NOT issue a pass verdict. The slice stays in qa-running with the browser gate marked blocked, reason=login-required. peaks-
|
|
42
|
+
description: "Mark the affected acceptance items as unverified in the test report. Do NOT issue a pass verdict. The slice stays in qa-running with the browser gate marked blocked, reason=login-required. peaks-code's repair loop will surface this on the next cycle." },
|
|
43
43
|
{ label: "Cancel the workflow",
|
|
44
|
-
description: "Stop QA immediately. Emit a blocked TXT handoff so peaks-
|
|
44
|
+
description: "Stop QA immediately. Emit a blocked TXT handoff so peaks-code can surface the auth wall to the user. Do not mark any acceptance items as accepted." }
|
|
45
45
|
]
|
|
46
46
|
})
|
|
47
47
|
```
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
- Playwright MCP is the required path for controlled headed browser and E2E validation (it launches a headed browser on demand). The LLM runtime exposes the Playwright tools under its own server-and-tool namespace (the Playwright MCP); QA invokes them by name from the LLM's tool list. (peaks-loop no longer auto-installs MCPs as of slice #016; the user runs `claude mcp add playwright -- npx @playwright/mcp@latest` themselves when the tool list is empty.)
|
|
6
6
|
- Chrome DevTools MCP is an optional secondary surface for CDP inspection (console, network, performance) of an already-running Chrome started with `--remote-debugging-port=9222`; it does NOT launch a browser on its own. The LLM invokes Chrome DevTools MCP tools directly when present in the tool list.
|
|
7
7
|
- Agent Browser can support browser walkthroughs, but never submit forms, purchase, delete, or mutate authenticated state without explicit confirmation.
|
|
8
|
-
- Canonical browser workflow (URL allow-list, login handoff, sanitization rules, tool mapping): `peaks-
|
|
8
|
+
- Canonical browser workflow (URL allow-list, login handoff, sanitization rules, tool mapping): `peaks-code/references/browser-workflow.md`.
|
|
9
9
|
- If Playwright MCP is not installed and the user does not authorize installation, mark frontend browser validation blocked; screenshots, logs, manual steps, or other tools must not substitute for the mandatory headed browser gate.
|
|
@@ -142,9 +142,9 @@ envelope and into the slice's `reducerReport`.
|
|
|
142
142
|
|
|
143
143
|
## Cross-reference
|
|
144
144
|
|
|
145
|
-
- `skills/peaks-
|
|
145
|
+
- `skills/peaks-code/references/sub-agent-dispatch.md` — orchestrator
|
|
146
146
|
contract for all Dispatchers
|
|
147
|
-
- `skills/peaks-
|
|
147
|
+
- `skills/peaks-code/SKILL.md` "Peaks-Loop Swarm parallel phase" — sibling
|
|
148
148
|
fan-out pattern
|
|
149
149
|
- `.peaks/memory/sub-agent-resource-lifecycle-red-line.md` — G5 red line
|
|
150
150
|
- `.peaks/memory/sub-agent-heartbeat-progress-red-line.md` — G6 red line
|
|
@@ -155,4 +155,4 @@ envelope and into the slice's `reducerReport`.
|
|
|
155
155
|
|
|
156
156
|
> Body of `## 业务测试细分 (optional)`. If the PRD or project warrants it, subdivide `qa-business` further into roles like `qa-business-api` / `qa-business-frontend` / `qa-business-regression`; each gets its own `peaks sub-agent dispatch` call. Names are convention not contract — the dispatcher accepts any non-empty string. **Subdivision must stay ≤ 2 levels deep** (RL-4): `qa-business-api` is fine, `qa-business-api-user` is not. Two levels of depth is the empirical sweet spot — past that, the reducer cannot audit the boundaries between sub-agents, and prompts start overlapping.
|
|
157
157
|
|
|
158
|
-
For the full contract (heartbeat instructions for each sub-agent, batch-id discipline, 30s cadence, 100-truncation, 5min stale) see `skills/peaks-qa/references/qa-fanout-contract.md` and `skills/peaks-
|
|
158
|
+
For the full contract (heartbeat instructions for each sub-agent, batch-id discipline, 30s cadence, 100-truncation, 5min stale) see `skills/peaks-qa/references/qa-fanout-contract.md` and `skills/peaks-code/references/sub-agent-dispatch.md` §G6.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Sub-agent dispatch (QA)
|
|
2
2
|
|
|
3
|
-
> Body of `## Sub-agent dispatch`. When this skill is launched as a sub-agent via `peaks sub-agent dispatch <role>` (then the LLM executes the returned toolCall) from `peaks-
|
|
3
|
+
> Body of `## Sub-agent dispatch`. When this skill is launched as a sub-agent via `peaks sub-agent dispatch <role>` (then the LLM executes the returned toolCall) from `peaks-code`, the following sections of THIS skill are **suspended** for the sub-agent run:
|
|
4
4
|
|
|
5
5
|
- **Session id** — use the parent's sid (read `.peaks/_runtime/session.json` or pass `--session-id <parent-sid>` to any session-creating CLI). Do NOT spawn your own session. The new `peaks session info --active` reads the canonical binding for you.
|
|
6
6
|
- **Skill presence (MANDATORY first action)** — do NOT call `peaks skill presence:set peaks-qa`. The sub-agent must not overwrite `.peaks/.active-skill.json`; the main Solo loop owns that file. If you need to mark your own state, write a marker file at `.peaks/_runtime/<sessionId>/system/sub-agent-qa.json` and only that.
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-rd
|
|
3
|
-
description:
|
|
3
|
+
description: |
|
|
4
|
+
Research and development role for Peaks-Loop (LLM-only internal role; not user-invocable.
|
|
5
|
+
Triggered by peaks-code via `peaks sub-agent dispatch --role rd`.)
|
|
6
|
+
Use for engineering analysis, refactor planning, project scanning, code standards,
|
|
7
|
+
unit-test coverage gates, implementation contracts, task graphs, and RD handoffs.
|
|
8
|
+
Always use this for Peaks-Loop refactor workflows.
|
|
9
|
+
visibility: internal
|
|
10
|
+
---
|
|
4
11
|
---
|
|
5
12
|
|
|
6
13
|
## Single-scope-axis naming convention
|
|
@@ -17,7 +24,7 @@ RD workflow automatically runs `peaks context build --audience peaks-rd` before
|
|
|
17
24
|
|
|
18
25
|
> **Read once per RD invocation; RD is built around these 4 guidelines.**
|
|
19
26
|
|
|
20
|
-
Every RD action
|
|
27
|
+
Every RD action MUST align with the 4 Karpathy guidelines (full text at `andrej-karpathy-skills:karpathy-guidelines` — reference only, do not execute upstream). RD sub-agents receive the full text via `references/rd-sub-agent-dispatch.md`. The 4 guidelines are:
|
|
21
28
|
|
|
22
29
|
1. **Think Before Coding** — surface assumptions, name tradeoffs, ask when unclear. State red-line scope in `## Red-line scope` before any code change.
|
|
23
30
|
2. **Simplicity First** — minimum code that solves the problem. No speculative features, no abstractions for single-use code, no error handling for impossible scenarios. If 200 lines could be 50, rewrite it. The 800-line file cap and `peaks scan file-size` gate enforce this mechanically.
|
|
@@ -40,9 +47,9 @@ For frontend / UI-affecting slices, RD's self-test uses the Playwright MCP heade
|
|
|
40
47
|
|
|
41
48
|
→ see `references/browser-self-test-contracts.md` and `references/browser-action-wrapper.md` (slice 3 thin wrapper).
|
|
42
49
|
|
|
43
|
-
## Sub-agent dispatch (when launched by peaks-
|
|
50
|
+
## Sub-agent dispatch (when launched by peaks-code swarm)
|
|
44
51
|
|
|
45
|
-
When this skill is launched as a sub-agent via `peaks sub-agent dispatch <role>` (then the LLM executes the returned toolCall) from `peaks-
|
|
52
|
+
When this skill is launched as a sub-agent via `peaks sub-agent dispatch <role>` (then the LLM executes the returned toolCall) from `peaks-code`, the following sections of THIS skill are **suspended** for the sub-agent run: Session id (use parent's), Skill presence, Workspace initialization, Mode selection, Statusline install.
|
|
46
53
|
|
|
47
54
|
What the sub-agent MUST still do: read PRD via `peaks request show`, run standards preflight (dry-run only), write planning artefact (`rd/tech-doc.md` for feature/refactor; `rd/bug-analysis.md` for bugfix; skip for config/docs/chore), return compact JSON envelope.
|
|
48
55
|
|
|
@@ -50,7 +57,7 @@ What the sub-agent MUST still do: read PRD via `peaks request show`, run standar
|
|
|
50
57
|
|
|
51
58
|
## Skill presence (MANDATORY first action — main-loop context only)
|
|
52
59
|
|
|
53
|
-
When this skill is running in the main Claude session (not as a sub-agent — i.e. user invoked `peaks-rd` directly, or `peaks-
|
|
60
|
+
When this skill is running in the main Claude session (not as a sub-agent — i.e. user invoked `peaks-rd` directly, or `peaks-code` is executing the role inline in assisted/strict mode), before any analysis or tool call, immediately run `peaks skill presence:set peaks-rd --project <repo> --mode <mode> --gate startup`. Install statusline on first run. Read durable project memory via `peaks project memories --project <repo> --json`.
|
|
54
61
|
|
|
55
62
|
→ see `references/skill-presence-and-title.md` for the full contract.
|
|
56
63
|
|
|
@@ -224,7 +231,7 @@ Do not bypass the parallel review fan-out when the slice has a code-review / qa-
|
|
|
224
231
|
|
|
225
232
|
## Sub-agent context governance (G7 + G7.7 + G8 + G9 — slice #010)
|
|
226
233
|
|
|
227
|
-
RD sub-agent prompt template MUST include the G7 path convention + G8.6 share protocol. Detailed protocol: `skills/peaks-
|
|
234
|
+
RD sub-agent prompt template MUST include the G7 path convention + G8.6 share protocol. Detailed protocol: `skills/peaks-code/references/context-governance.md` + `skills/peaks-code/references/headroom-integration.md`.
|
|
228
235
|
|
|
229
236
|
→ see `references/rd-context-governance.md` for the full G7 / G8.6 / G9 protocol + RD sub-agent prompt template.
|
|
230
237
|
|
|
@@ -21,7 +21,7 @@ AskUserQuestion({
|
|
|
21
21
|
{ label: "Skip browser self-test, hand off to QA",
|
|
22
22
|
description: "Mark the slice's browser self-test as deferred. Do NOT mark the slice as RD-done; transition to qa-handoff with browser-gate=blocked reason=login-required, and let QA's gate machinery surface the wall to the user again." },
|
|
23
23
|
{ label: "Cancel the workflow",
|
|
24
|
-
description: "Stop RD. Emit a blocked TXT handoff so peaks-
|
|
24
|
+
description: "Stop RD. Emit a blocked TXT handoff so peaks-code can surface the auth wall to the user. Do not modify code paths that the browser gate would have covered." }
|
|
25
25
|
]
|
|
26
26
|
})
|
|
27
27
|
```
|
|
@@ -19,7 +19,7 @@ When the project-scan in `.peaks/_runtime/<sessionId>/rd/project-scan.md` identi
|
|
|
19
19
|
|
|
20
20
|
2. **Never inline mock data in component files**: Mock data, fixture objects, and stub responses belong in dedicated mock files. Components should receive data through their normal channels (props, API calls via services). Writing `const mockData = [...]` inside a `.tsx` file is prohibited.
|
|
21
21
|
|
|
22
|
-
3. **Mock files must export TypeScript interfaces**: Every mock response type must be exported so RD implementation and QA test-cases can import the same contract. See peaks-
|
|
22
|
+
3. **Mock files must export TypeScript interfaces**: Every mock response type must be exported so RD implementation and QA test-cases can import the same contract. See peaks-code's "Frontend-only development mode" for the full mock-to-real migration pattern.
|
|
23
23
|
|
|
24
24
|
4. **Every mock file must be marked**: Add `// MOCK: Replace with real API call when swagger.json is available` at the top of every mock file.
|
|
25
25
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Parallel review fan-out (RD)
|
|
2
2
|
|
|
3
|
-
> Body of `## Parallel review fan-out`. **When RD reaches the end of implementation, the three review activities (code review, QA test-cases draft, AND karpathy review) run in parallel via `peaks sub-agent dispatch <role>` (then executing the returned toolCall), not sequentially.** This is the same fan-out pattern peaks-
|
|
3
|
+
> Body of `## Parallel review fan-out`. **When RD reaches the end of implementation, the three review activities (code review, QA test-cases draft, AND karpathy review) run in parallel via `peaks sub-agent dispatch <role>` (then executing the returned toolCall), not sequentially.** This is the same fan-out pattern peaks-code uses for the post-PRD swarm. RD itself, when it is the main loop, behaves as a sub-agent orchestrator: it issues 3 `peaks sub-agent dispatch` calls in a single message and waits for all to return before aggregating findings and transitioning to `qa-handoff`.
|
|
4
4
|
|
|
5
5
|
**v2.12.0 collapse (Group A — Tier 1+2+3):** the previous 4-way fan-out (slice 004) plus the appended `karpathy-reviewer` (slice 5/6) totalled **5 sub-agents**. The `security-reviewer` and `perf-baseline-reviewer` slots moved out of the RD fan-out into two new standalone audit skills:
|
|
6
6
|
|
|
@@ -164,7 +164,7 @@ peaks codegraph affected --project <repo> <changed-files...> --json
|
|
|
164
164
|
# Without project rules, security review and code review triggers won't fire.
|
|
165
165
|
|
|
166
166
|
# 7. AFTER implementation, BEFORE QA handoff — RUN THESE GATES:
|
|
167
|
-
# Peaks-Loop Gate B2: unit tests exist and pass for the changed surface → npx vitest run --changed (or project equivalent; the changed-only mode is the peaks slice check default as of run 017; use --run-tests for the full suite, or invoke /peaks-
|
|
167
|
+
# Peaks-Loop Gate B2: unit tests exist and pass for the changed surface → npx vitest run --changed (or project equivalent; the changed-only mode is the peaks slice check default as of run 017; use --run-tests for the full suite, or invoke /peaks-code-test to run the full suite standalone)
|
|
168
168
|
# Peaks-Loop Gate B3: code review evidence → .peaks/_runtime/<sessionId>/rd/code-review.md
|
|
169
169
|
# Peaks-Loop Gate B4: security review evidence → .peaks/_runtime/<sessionId>/rd/security-review.md
|
|
170
170
|
# Peaks-Loop Gate B5 (NEW): RD artifact body has no unfilled placeholders.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Sub-agent dispatch (RD)
|
|
2
2
|
|
|
3
|
-
> Body of `## Sub-agent dispatch`. When this skill is launched as a sub-agent via `peaks sub-agent dispatch <role>` (then the LLM executes the returned toolCall) from `peaks-
|
|
3
|
+
> Body of `## Sub-agent dispatch`. When this skill is launched as a sub-agent via `peaks sub-agent dispatch <role>` (then the LLM executes the returned toolCall) from `peaks-code`, the following sections of THIS skill are **suspended** for the sub-agent run:
|
|
4
4
|
|
|
5
5
|
## Default `--from-dag` is mandatory (slice 2026-06-24-efficiency-4p-bundle / G2 / P0.3)
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
> `tests/unit/dispatch/dispatch-fanout-mandatory.test.ts` (≥ 8 cases
|
|
33
33
|
> covering 1-leaf, 2-leaf, 3+-leaf, config/docs/chore type-bypass, and
|
|
34
34
|
> the preferences-with-serial-default fan-out escape hatch). See also
|
|
35
|
-
> `skills/peaks-
|
|
35
|
+
> `skills/peaks-code/references/fanout-mandatory.md` for the
|
|
36
36
|
> orchestrator-side rationale; the two files share the same wording by
|
|
37
37
|
> design — if either changes, update the other.
|
|
38
38
|
|
|
@@ -61,7 +61,7 @@ npx vitest run --changed --reporter=verbose 2>&1 | tail -20
|
|
|
61
61
|
# Any failing test or zero tests for new code → BLOCKED. Write tests, then re-run.
|
|
62
62
|
#
|
|
63
63
|
# To run the FULL suite (slower; not the default for `peaks slice check`),
|
|
64
|
-
# drop `--changed` or use `npx vitest run --reporter=verbose`. The peaks-
|
|
64
|
+
# drop `--changed` or use `npx vitest run --reporter=verbose`. The peaks-code-test
|
|
65
65
|
# skill is the user-facing wrapper for the full suite; the slice check's
|
|
66
66
|
# `--run-tests` flag is the CLI opt-in.
|
|
67
67
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Skill presence (RD)
|
|
2
2
|
|
|
3
|
-
> Body of `## Skill presence (MANDATORY first action — main-loop context only)`. When this skill is running in the main Claude session (not as a sub-agent — i.e. user invoked `peaks-rd` directly, or `peaks-
|
|
3
|
+
> Body of `## Skill presence (MANDATORY first action — main-loop context only)`. When this skill is running in the main Claude session (not as a sub-agent — i.e. user invoked `peaks-rd` directly, or `peaks-code` is executing the role inline in assisted/strict mode), before any analysis or tool call, immediately run:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
peaks skill presence:set peaks-rd --project <repo> --mode <mode> --gate startup
|
|
@@ -71,6 +71,6 @@ Missing section: reviewer is skipped (transition still passes; envelope records
|
|
|
71
71
|
- DO NOT silently prompt users for API keys. Missing env vars surface as `providerUnavailable` and the `fallbackOnError` policy decides skip vs throw.
|
|
72
72
|
- DO NOT change the schema for the 5 existing envelope parsers (v2.13.3 territory). The ReviewerEnvelope schema is additive.
|
|
73
73
|
|
|
74
|
-
## Sub-agent dispatch (when launched by peaks-
|
|
74
|
+
## Sub-agent dispatch (when launched by peaks-code swarm)
|
|
75
75
|
|
|
76
|
-
When this skill runs as a sub-agent dispatched by peaks-
|
|
76
|
+
When this skill runs as a sub-agent dispatched by peaks-code, the sub-agent receives the parent session id and change-id via envelope. It MUST write its output to `.peaks/_runtime/<sessionId>/rd/third-party-review.json` + `.md` and return a compact JSON envelope.
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-sc
|
|
3
|
-
description:
|
|
3
|
+
description: |
|
|
4
|
+
Source control, sync, and change-control role for Peaks-Loop (LLM-only internal role;
|
|
5
|
+
not user-invocable. Triggered by peaks-code via `peaks sub-agent dispatch --role sc`.)
|
|
6
|
+
Use when a workflow needs change impact, artifact retention, commit boundaries,
|
|
7
|
+
GitHub artifact repository pointers, sync state, or rollback evidence.
|
|
8
|
+
visibility: internal
|
|
9
|
+
---
|
|
4
10
|
---
|
|
5
11
|
|
|
6
12
|
# Peaks-Loop SC
|
|
@@ -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` (Solo 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
|
|
|
@@ -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
|
|