peaks-loop 3.0.0 → 3.0.1
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 +3 -3
- package/CHANGELOG.md +57 -57
- package/README-en.md +2 -2
- package/README.md +2 -2
- package/agents/karpathy-reviewer.md +2 -2
- package/dist/src/cli/commands/agent-commands.js +3 -3
- package/dist/src/cli/commands/audit-commands.d.ts +1 -1
- package/dist/src/cli/commands/audit-commands.js +6 -6
- package/dist/src/cli/commands/classify-classify-commands.js +1 -1
- package/dist/src/cli/commands/code-review-commands.d.ts +3 -3
- package/dist/src/cli/commands/code-review-commands.js +5 -5
- package/dist/src/cli/commands/compact-command.d.ts +21 -0
- package/dist/src/cli/commands/compact-command.js +252 -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/core/session-command.js +17 -7
- package/dist/src/cli/commands/core/skill-command.js +1 -1
- package/dist/src/cli/commands/feedback-commands.js +1 -1
- package/dist/src/cli/commands/hook-handle.d.ts +1 -1
- package/dist/src/cli/commands/hook-handle.js +1 -1
- package/dist/src/cli/commands/legacy-commands.d.ts +1 -1
- package/dist/src/cli/commands/legacy-commands.js +2 -2
- package/dist/src/cli/commands/log-commands.js +2 -2
- package/dist/src/cli/commands/loop-commands.d.ts +1 -1
- package/dist/src/cli/commands/loop-commands.js +1 -1
- package/dist/src/cli/commands/loop-eval-commands.d.ts +1 -1
- package/dist/src/cli/commands/loop-eval-commands.js +1 -1
- package/dist/src/cli/commands/playwright-commands.d.ts +1 -1
- package/dist/src/cli/commands/playwright-commands.js +2 -2
- package/dist/src/cli/commands/request-commands.js +40 -1
- package/dist/src/cli/commands/role-commands.js +1 -1
- package/dist/src/cli/commands/slice-commands.js +5 -5
- package/dist/src/cli/commands/upgrade-commands.d.ts +1 -1
- package/dist/src/cli/commands/upgrade-commands.js +6 -6
- package/dist/src/cli/commands/workspace/init-command.js +2 -2
- package/dist/src/cli/program.js +10 -1
- package/dist/src/services/agent/ecc-agent-service.js +5 -5
- package/dist/src/services/audit/artifact-writer.d.ts +1 -1
- package/dist/src/services/audit/artifact-writer.js +1 -1
- package/dist/src/services/audit/decision-writer.d.ts +1 -1
- package/dist/src/services/audit/decision-writer.js +1 -1
- package/dist/src/services/audit/enforcers/lint-output-style.js +5 -5
- package/dist/src/services/audit/enforcers/mock-placement.d.ts +1 -1
- package/dist/src/services/audit/enforcers/mock-placement.js +1 -1
- package/dist/src/services/audit/enforcers/no-root-pollution.js +1 -1
- package/dist/src/services/audit/red-line-catalog-p2-a.js +2 -2
- package/dist/src/services/audit/red-line-catalog-p2-b.js +2 -2
- package/dist/src/services/audit/static-service.d.ts +1 -1
- package/dist/src/services/audit/static-service.js +5 -5
- package/dist/src/services/audit/types.d.ts +1 -1
- package/dist/src/services/audit/types.js +1 -1
- package/dist/src/services/audit-independent/perf-audit-service.js +1 -1
- package/dist/src/services/audit-independent/security-audit-service.js +1 -1
- package/dist/src/services/classify/classify-service.d.ts +1 -1
- package/dist/src/services/classify/classify-service.js +1 -1
- package/dist/src/services/classify/classify-types.d.ts +1 -1
- package/dist/src/services/classify/classify-types.js +1 -1
- package/dist/src/services/code-review/ecc-bridge.d.ts +2 -2
- package/dist/src/services/code-review/ecc-bridge.js +2 -2
- package/dist/src/services/code-review/ocr-service.d.ts +9 -9
- package/dist/src/services/code-review/ocr-service.js +16 -16
- package/dist/src/services/compact/decision-tables.d.ts +66 -0
- package/dist/src/services/compact/decision-tables.js +127 -0
- package/dist/src/services/compact/request-transition-hook.d.ts +20 -0
- package/dist/src/services/compact/request-transition-hook.js +110 -0
- package/dist/src/services/compact/suggest-service.d.ts +74 -0
- package/dist/src/services/compact/suggest-service.js +203 -0
- package/dist/src/services/config/config-migration.js +1 -1
- package/dist/src/services/config/config-safety.d.ts +1 -1
- package/dist/src/services/config/config-safety.js +1 -1
- package/dist/src/services/config/config-service.d.ts +1 -1
- package/dist/src/services/config/config-service.js +1 -1
- package/dist/src/services/context/auto-compact-dispatcher.js +4 -4
- package/dist/src/services/context/auto-compact-types.d.ts +6 -6
- package/dist/src/services/context/auto-compact-types.js +5 -5
- package/dist/src/services/dispatch/sub-agent-dispatcher.js +1 -1
- package/dist/src/services/dispatch/test-tool-detection.d.ts +1 -1
- package/dist/src/services/dispatch/test-tool-detection.js +1 -1
- package/dist/src/services/doctor/doctor-service.d.ts +1 -1
- package/dist/src/services/doctor/doctor-service.js +5 -5
- package/dist/src/services/hooks/presence-marker-detector.js +5 -5
- package/dist/src/services/ide/adapters/claude-code-adapter.d.ts +1 -1
- package/dist/src/services/ide/adapters/claude-code-adapter.js +2 -2
- package/dist/src/services/ide/adapters/codex-adapter.d.ts +2 -2
- package/dist/src/services/ide/adapters/codex-adapter.js +2 -2
- package/dist/src/services/ide/adapters/cursor-adapter.d.ts +2 -2
- package/dist/src/services/ide/adapters/cursor-adapter.js +2 -2
- package/dist/src/services/ide/adapters/hermes-adapter.d.ts +1 -1
- package/dist/src/services/ide/adapters/hermes-adapter.js +1 -1
- package/dist/src/services/ide/adapters/openclaw-adapter.d.ts +1 -1
- package/dist/src/services/ide/adapters/openclaw-adapter.js +1 -1
- package/dist/src/services/ide/adapters/trae-adapter.d.ts +1 -1
- package/dist/src/services/ide/adapters/trae-adapter.js +1 -1
- package/dist/src/services/ide/ide-types.d.ts +9 -9
- package/dist/src/services/legacy/legacy-detector.d.ts +1 -1
- package/dist/src/services/legacy/legacy-detector.js +1 -1
- package/dist/src/services/log/log-commands-service.d.ts +1 -1
- package/dist/src/services/log/log-commands-service.js +1 -1
- package/dist/src/services/log/logger.d.ts +3 -3
- package/dist/src/services/log/logger.js +3 -3
- package/dist/src/services/log/redact.d.ts +1 -1
- package/dist/src/services/log/redact.js +1 -1
- package/dist/src/services/loop/evaluator-dispatcher.d.ts +1 -1
- package/dist/src/services/loop/evaluator-dispatcher.js +16 -15
- package/dist/src/services/loop/monotonic-guard.js +35 -18
- package/dist/src/services/loop/monotonic-runner.d.ts +3 -0
- package/dist/src/services/loop/monotonic-runner.js +62 -28
- package/dist/src/services/loop/run-driver.js +45 -24
- package/dist/src/services/memory/llm-reranker.d.ts +1 -1
- package/dist/src/services/memory/llm-reranker.js +1 -1
- package/dist/src/services/mut/production-stryker.d.ts +0 -5
- package/dist/src/services/mut/production-stryker.js +19 -10
- package/dist/src/services/openspec/openspec-propose-from-doctor-service.d.ts +1 -1
- package/dist/src/services/openspec/openspec-propose-from-doctor-service.js +1 -1
- package/dist/src/services/perf/perf-baseline-service.d.ts +2 -2
- package/dist/src/services/perf/perf-baseline-service.js +2 -2
- package/dist/src/services/prd/handoff-auto-regen.js +1 -1
- package/dist/src/services/prd/project-scan-sediment.js +3 -3
- package/dist/src/services/prd/project-scan-types.d.ts +1 -1
- package/dist/src/services/preferences/preferences-types.d.ts +3 -3
- package/dist/src/services/preferences/preferences-types.js +2 -2
- package/dist/src/services/role/role-registry.d.ts +1 -1
- package/dist/src/services/role/role-registry.js +1 -1
- package/dist/src/services/sc/sc-service.js +3 -3
- package/dist/src/services/skill/resume-detector.js +2 -2
- package/dist/src/services/skills/sync-service.d.ts +3 -3
- package/dist/src/services/skills/sync-service.js +9 -9
- package/dist/src/services/slice/calibration-store.d.ts +1 -1
- package/dist/src/services/slice/calibration-store.js +1 -1
- package/dist/src/services/solo/auto-compact-orchestrator.d.ts +1 -1
- package/dist/src/services/solo/auto-compact-orchestrator.js +7 -7
- package/dist/src/services/solo/dag-orchestrator.js +1 -1
- package/dist/src/services/solo/mode-gate.d.ts +1 -1
- package/dist/src/services/solo/mode-gate.js +4 -4
- package/dist/src/services/solo/user-touchpoint-classifier.js +1 -1
- package/dist/src/services/standards/migrate-claude-rules-service.js +5 -5
- package/dist/src/services/standards/migrate-service.d.ts +3 -3
- package/dist/src/services/standards/migrate-service.js +5 -5
- package/dist/src/services/standards/project-standards-service.js +1 -1
- package/dist/src/services/upgrade/gitignore-migrate-service.d.ts +3 -3
- package/dist/src/services/upgrade/gitignore-migrate-service.js +4 -4
- package/dist/src/services/upgrade/upgrade-service.d.ts +1 -1
- package/dist/src/services/upgrade/upgrade-service.js +5 -5
- package/dist/src/services/verdict/envelopes.d.ts +1 -1
- package/dist/src/services/verdict/envelopes.js +1 -1
- package/dist/src/services/workflow/workflow-loader.js +1 -1
- package/dist/src/services/workspace/migrate-1-4-1-service.d.ts +1 -1
- package/dist/src/services/workspace/migrate-1-4-1-service.js +1 -1
- package/dist/src/services/workspace/migrate-types.d.ts +1 -1
- package/dist/src/services/workspace/migrate-types.js +1 -1
- package/dist/src/services/workspace/workspace-claude-settings-materializer.d.ts +2 -2
- package/dist/src/services/workspace/workspace-claude-settings-materializer.js +9 -9
- package/dist/src/services/workspace/workspace-service.d.ts +1 -1
- package/dist/src/services/workspace/workspace-service.js +1 -1
- package/dist/src/shared/path-safety.d.ts +1 -1
- package/dist/src/shared/path-safety.js +1 -1
- package/dist/src/shared/version.d.ts +1 -1
- package/dist/src/shared/version.js +1 -1
- package/output-styles/peaks-skill-swarm.md +33 -33
- package/package.json +5 -4
- package/schemas/decomposition-v1.json +1 -1
- package/schemas/decomposition-v2.json +1 -1
- package/schemas/replay-fixture.schema.json +1 -1
- package/schemas/reviewer-envelope.schema.json +1 -1
- package/scripts/install-skills.mjs +11 -11
- package/skills/peaks-audit/SKILL.md +2 -2
- package/skills/peaks-doctor/SKILL.md +4 -4
- package/skills/peaks-final-review/SKILL.md +2 -2
- package/skills/peaks-ide/SKILL.md +3 -3
- package/skills/peaks-perf-audit/SKILL.md +1 -1
- package/skills/peaks-prd/SKILL.md +14 -14
- package/skills/peaks-prd/references/workflow.md +1 -1
- package/skills/peaks-qa/SKILL.md +17 -17
- package/skills/peaks-qa/references/artifact-per-request.md +1 -1
- package/skills/peaks-qa/references/browser-validation-contracts.md +2 -2
- package/skills/peaks-qa/references/codegraph-regression-focus.md +1 -1
- package/skills/peaks-qa/references/external-capability-guidance.md +2 -2
- package/skills/peaks-qa/references/qa-fanout-contract.md +1 -1
- package/skills/peaks-qa/references/qa-gstack-integration.md +3 -3
- package/skills/peaks-qa/references/qa-local-artifacts.md +1 -1
- package/skills/peaks-qa/references/qa-matt-pocock-integration.md +1 -1
- package/skills/peaks-qa/references/qa-runbook.md +3 -3
- package/skills/peaks-qa/references/qa-skill-presence.md +1 -1
- package/skills/peaks-qa/references/qa-standards-preflight.md +2 -2
- package/skills/peaks-qa/references/qa-transition-gates.md +9 -9
- package/skills/peaks-qa/references/regression-gates.md +1 -1
- package/skills/peaks-rd/SKILL.md +13 -13
- package/skills/peaks-rd/references/artifact-and-standards-output.md +1 -1
- package/skills/peaks-rd/references/codegraph-project-analysis.md +1 -1
- package/skills/peaks-rd/references/external-references.md +3 -3
- package/skills/peaks-rd/references/karpathy-reviewer-prompt.md +1 -1
- package/skills/peaks-rd/references/mandatory-perf-baseline.md +1 -1
- package/skills/peaks-rd/references/matt-pocock-integration.md +2 -2
- package/skills/peaks-rd/references/ocr-integration.md +19 -19
- package/skills/peaks-rd/references/openspec-cli.md +2 -2
- package/skills/peaks-rd/references/rd-gstack-integration.md +5 -5
- package/skills/peaks-rd/references/rd-runbook.md +9 -9
- package/skills/peaks-rd/references/rd-standards-preflight.md +1 -1
- package/skills/peaks-rd/references/rd-transition-gates.md +13 -13
- package/skills/peaks-rd/references/skill-presence-and-title.md +1 -1
- package/skills/peaks-reviewer/SKILL.md +2 -2
- package/skills/peaks-sc/SKILL.md +9 -9
- package/skills/peaks-security-audit/SKILL.md +1 -1
- package/skills/peaks-slice-decompose/SKILL.md +2 -2
- package/skills/peaks-solo/SKILL.md +49 -49
- package/skills/peaks-solo/references/a2a-artifact-mapping.md +8 -8
- package/skills/peaks-solo/references/anchoring-and-session-info.md +3 -3
- package/skills/peaks-solo/references/boundaries.md +4 -4
- package/skills/peaks-solo/references/browser-workflow.md +2 -2
- package/skills/peaks-solo/references/codegraph-orchestration.md +1 -1
- package/skills/peaks-solo/references/completion-handoff.md +2 -2
- package/skills/peaks-solo/references/external-references.md +3 -3
- package/skills/peaks-solo/references/external-skill-invocation.md +2 -2
- package/skills/peaks-solo/references/frontend-only-mode.md +1 -1
- package/skills/peaks-solo/references/gstack-integration.md +4 -4
- package/skills/peaks-solo/references/local-artifact-workspace.md +2 -2
- package/skills/peaks-solo/references/micro-cycle.md +4 -4
- package/skills/peaks-solo/references/mode-selection.md +5 -5
- package/skills/peaks-solo/references/openspec-workflow.md +2 -2
- package/skills/peaks-solo/references/playwright-mcp-multi-terminal.md +1 -1
- package/skills/peaks-solo/references/project-memory-loading.md +1 -1
- package/skills/peaks-solo/references/project-scan-checklist.md +1 -1
- package/skills/peaks-solo/references/quality-gate-cheatsheet.md +1 -1
- package/skills/peaks-solo/references/resume-detection.md +1 -1
- package/skills/peaks-solo/references/runbook.md +20 -20
- package/skills/peaks-solo/references/skill-presence-and-title.md +2 -2
- package/skills/peaks-solo/references/standards-preflight.md +2 -2
- package/skills/peaks-solo/references/step-0-55-1x-detection.md +3 -3
- package/skills/peaks-solo/references/sub-agent-dispatch.md +3 -3
- package/skills/peaks-solo/references/swarm-dispatch-contract.md +3 -3
- package/skills/peaks-solo/references/workflow-gates-and-types.md +34 -34
- package/skills/peaks-solo-resume/SKILL.md +2 -2
- package/skills/peaks-solo-status/SKILL.md +4 -4
- package/skills/peaks-solo-test/SKILL.md +4 -4
- package/skills/peaks-sop/SKILL.md +5 -5
- package/skills/peaks-txt/SKILL.md +17 -17
- package/skills/peaks-ui/SKILL.md +17 -17
- package/skills/peaks-ui/references/workflow.md +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-solo
|
|
3
|
-
description: Full-auto orchestration facade for the Peaks-
|
|
3
|
+
description: Full-auto orchestration facade for the Peaks-Loop skill family. Use when the user asks Peaks-Loop to handle a project workflow end-to-end (端到端/全流程/需求开发), especially from a product document (PRD/飞书文档/Feishu doc) through implementation and validation. Coordinates peaks-prd, peaks-rd, peaks-ui, peaks-qa, peaks-sc, and peaks-txt while preserving user confirmation gates. Triggers on `/peaks-solo`, "peaks solo", "全流程开发", "端到端迭代".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Single-scope-axis naming convention (2.7.1)
|
|
@@ -21,13 +21,13 @@ Never create `.peaks/_runtime/<YYYY-MM-DD-*>/` at the top level of `.peaks/`. Th
|
|
|
21
21
|
|
|
22
22
|
Every sub-agent dispatch (`peaks-prd`, `peaks-rd`, `peaks-qa`, `peaks-ui`, `peaks-sc`, `peaks-txt`) MUST receive the 4 Karpathy guidelines. Append the verbatim block from `peaks-rd/references/rd-sub-agent-dispatch.md` §"Karpathy-guidelines context" to the dispatch prompt; never silently drop it. Canonical skill id: `andrej-karpathy-skills:karpathy-guidelines`. Summary: **#1 Think Before Coding** (surface assumptions, name tradeoffs), **#2 Simplicity First** (min code, no speculative features, 800-line file cap), **#3 Surgical Changes** (touch only what the request requires), **#4 Goal-Driven Execution** (verifiable ACs, plan + verify checkpoints).
|
|
23
23
|
|
|
24
|
-
# Peaks-
|
|
24
|
+
# Peaks-Loop Solo
|
|
25
25
|
|
|
26
|
-
Peaks-
|
|
26
|
+
Peaks-Loop Solo is the orchestration facade for the Peaks-Loop short skill family. Use it to identify the user scenario, recommend an execution mode, coordinate role skills, and produce the final handoff report. Do not collapse role responsibilities into this skill.
|
|
27
27
|
|
|
28
28
|
## 产品定位(2026-06-28 校准)
|
|
29
29
|
|
|
30
|
-
> peaks-
|
|
30
|
+
> peaks-loop 真实定位 = 24h AI 程序员编排器;user 角色 = 业务/产品审阅者,不参与技术决策。详见 `.peaks/memory/peaks-loop-24h-ai-programmer-positioning.md`。
|
|
31
31
|
|
|
32
32
|
## Skill-first architecture note (read once, internalise)
|
|
33
33
|
|
|
@@ -35,22 +35,22 @@ This skill is the **primary surface**. The `peaks <cmd>` CLI is **auxiliary**
|
|
|
35
35
|
|
|
36
36
|
## Code-Change Red Line (BLOCKING — read before ANY tool call)
|
|
37
37
|
|
|
38
|
-
**Peaks-
|
|
38
|
+
**Peaks-Loop Solo is an orchestrator, NOT an implementer. You MUST NOT write, edit, or modify any application source code directly.**
|
|
39
39
|
|
|
40
40
|
Every code change — bugfix, feature, refactor, or config — MUST go through the full pipeline:
|
|
41
41
|
|
|
42
42
|
```
|
|
43
43
|
peaks-solo (orchestrate only)
|
|
44
44
|
→ RD work ← ALL code changes happen HERE
|
|
45
|
-
→ Unit tests written + pass (Peaks-
|
|
45
|
+
→ Unit tests written + pass (Peaks-Loop Gate B2)
|
|
46
46
|
→ Karpathy standards enforced (file-size ≤800 lines, TypeScript rules)
|
|
47
|
-
→ Code review evidence (Peaks-
|
|
48
|
-
→ Security review evidence (Peaks-
|
|
47
|
+
→ Code review evidence (Peaks-Loop Gate B3)
|
|
48
|
+
→ Security review evidence (Peaks-Loop Gate B4)
|
|
49
49
|
→ QA work ← ALL validation happens HERE
|
|
50
|
-
→ Functional test execution (Peaks-
|
|
51
|
-
→ Performance check (Peaks-
|
|
52
|
-
→ Security test (Peaks-
|
|
53
|
-
→ Browser E2E (when frontend; Peaks-
|
|
50
|
+
→ Functional test execution (Peaks-Loop Gate A2)
|
|
51
|
+
→ Performance check (Peaks-Loop Gate A4)
|
|
52
|
+
→ Security test (Peaks-Loop Gate A3)
|
|
53
|
+
→ Browser E2E (when frontend; Peaks-Loop Gate D)
|
|
54
54
|
→ Verdict: pass | return-to-rd | blocked
|
|
55
55
|
```
|
|
56
56
|
|
|
@@ -68,45 +68,45 @@ peaks-solo (orchestrate only)
|
|
|
68
68
|
|
|
69
69
|
**Before declaring workflow complete, run:** `peaks workflow verify-pipeline --rid <rid> --project <repo> --json`
|
|
70
70
|
|
|
71
|
-
## Peaks-
|
|
71
|
+
## Peaks-Loop Startup sequence (MANDATORY — execute in order)
|
|
72
72
|
|
|
73
|
-
### Peaks-
|
|
73
|
+
### Peaks-Loop Slice 011 — workspace consolidate + session checkpoint/resume
|
|
74
74
|
|
|
75
75
|
`peaks workspace consolidate` is the slice-011 umbrella primitive. `peaks session checkpoint` (proactive context-overflow defense) and `peaks session resume` (cross-session continuity) are surfaced in SKILL.md as Step 0.75 and Step N headings (slice 2.5.0, sub-fix A). See `references/cross-date-session-check.md` for the umbrella. IDE-agnostic.
|
|
76
76
|
|
|
77
|
-
### Peaks-
|
|
77
|
+
### Peaks-Loop Step 0.75: Resume from checkpoint (BLOCKING on same-day re-invocation)
|
|
78
78
|
|
|
79
79
|
When a NEW conversation opens on a session whose `lastActivity` is from today AND `.peaks/_runtime/<sessionId>/checkpoints/` contains at least one `*.json`, surface the most recent checkpoint. Run `peaks session info --active --json` to resolve the canonical session id, then `peaks session resume --from <path> --project <repo>` to emit a markdown "resume context" block. Prompt the user via IDE-native `AskUserQuestion` (resume / start fresh), and if "resume", prepend the emitted block to its own prompt. Honors the user choice on "fresh" — the on-disk checkpoint stays untouched. Step 0.75 is a no-op if any precondition fails (no sid, wrong day, no checkpoint). Full probe + decision tree: `references/checkpoint-resume.md`.
|
|
80
80
|
|
|
81
|
-
### Peaks-
|
|
81
|
+
### Peaks-Loop Step N: Periodic checkpoint (auto-fire, no user action)
|
|
82
82
|
|
|
83
83
|
Proactive defense vs context overflow. CLI: `peaks session checkpoint [--reason <r>] [--session-id <sessionId>] [--project <p>] [--current-plan <text>] [--open-questions <list>] [--recent-decisions <list>] [--recent-artifact-paths <list>] [--git-status <text>] [--skills-active <list>] [--todo-state <list>] [--json]`. Fire `--reason periodic` every 20 tool calls (G1 hard-coded), `--reason artifact-written` per PRD/RD/QA/TXT write, `--reason context-fill` when full, `--reason user-pause` on save, `--reason user-close` before handoff. 20-call cadence locked here + `references/periodic-checkpoint.md` (otherwise `tests/unit/solo/checkpoint-periodic-frequency.test.ts` fails).
|
|
84
84
|
|
|
85
|
-
### Peaks-
|
|
85
|
+
### Peaks-Loop Step 0.5: OpenSpec first-run opt-in (conditional)
|
|
86
86
|
|
|
87
87
|
Run when `openspec/` is absent and `.peaks/.peaks-openspec-opt-in.json` is missing. Asks once and persists the decision.
|
|
88
88
|
|
|
89
89
|
→ see `references/openspec-workflow.md` for the full opt-in flow + lifecycle.
|
|
90
90
|
|
|
91
|
-
### Peaks-
|
|
91
|
+
### Peaks-Loop Step 0.6: Audit + Goal (NEW)
|
|
92
92
|
|
|
93
93
|
After human expresses need, invoke peaks-audit to summarize + multi-dim audit + propose goal. Display audit + goal to human for one-shot approval. Store approved goal at `.peaks/_runtime/<sessionId>/audit-goal/<rid>.json`. **All subsequent autonomous work requires an approved goal.**
|
|
94
94
|
|
|
95
|
-
> **v2.15.0+ 校准:** 业务 goal 与技术 goal 必须分离,user 不被推到技术决策位。详见 `.peaks/memory/peaks-
|
|
95
|
+
> **v2.15.0+ 校准:** 业务 goal 与技术 goal 必须分离,user 不被推到技术决策位。详见 `.peaks/memory/peaks-loop-user-role-and-tech-decision.md`。
|
|
96
96
|
|
|
97
97
|
→ see `references/audit-goal-gate.md` for the full Step 0.6 contract.
|
|
98
98
|
|
|
99
|
-
### Peaks-
|
|
99
|
+
### Peaks-Loop Step N+1: Final Review (NEW)
|
|
100
100
|
|
|
101
101
|
After all autonomous LLM work (RD, QA, security, perf) completes, invoke peaks-final-review to prepare 4-dim evidence. Display evidence to human for judgment. If all 4 dims pass → final delivery. If any fail → loop back with feedback.
|
|
102
102
|
|
|
103
103
|
→ see `references/final-review-gate.md` for the full Step N+1 contract.
|
|
104
104
|
|
|
105
|
-
### Peaks-
|
|
105
|
+
### Peaks-Loop Step N+2: Main-session context monitor (v2.11.0 D6)
|
|
106
106
|
|
|
107
107
|
After every 4th tool call (complement to Step N), probe via `peaks context check --prompt-size <bytes> --auto-trigger --json`. Thresholds: 50% soft warn / 75% user red line (return trigger path, do NOT auto-execute — Karpathy §4) / 90% emergency. Use `--in-flight-batch` to defer until batch converges (D6.e). Companion to Step N (soft signal); D6 is the hard signal.
|
|
108
108
|
|
|
109
|
-
### Peaks-
|
|
109
|
+
### Peaks-Loop Step 0: Anchor the workflow (MANDATORY FIRST ACTIONS — no bail-out)
|
|
110
110
|
|
|
111
111
|
Run `peaks workspace init` + `peaks skill presence:set peaks-solo` BEFORE any analysis, role handoff, or mode-selection question. Even "分析下这个项目" / "看一下代码" / one-line questions anchor first.
|
|
112
112
|
|
|
@@ -118,7 +118,7 @@ Run `peaks workspace init` + `peaks skill presence:set peaks-solo` BEFORE any an
|
|
|
118
118
|
|
|
119
119
|
→ see `references/anchoring-and-session-info.md` for the full bypass contract, recovery flow, and anti-bail-out rule.
|
|
120
120
|
|
|
121
|
-
### Peaks-
|
|
121
|
+
### Peaks-Loop Step 0.7: Detect unfinished work and offer resume (BLOCKING on first invocation per session)
|
|
122
122
|
|
|
123
123
|
After Step 0, run the resume-detection probe; surface via `AskUserQuestion` if a slice is in flight.
|
|
124
124
|
|
|
@@ -126,31 +126,31 @@ After Step 0, run the resume-detection probe; surface via `AskUserQuestion` if a
|
|
|
126
126
|
|
|
127
127
|
→ see `references/resume-detection.md` for the full detection algorithm + classification table.
|
|
128
128
|
|
|
129
|
-
### Peaks-
|
|
129
|
+
### Peaks-Loop Step 0.55: 1.x → 2.0 detection (BLOCKING on first invocation per session, when the project is not on a 2.0 layout)
|
|
130
130
|
|
|
131
|
-
Per the "one-key completion" tenet, peaks-
|
|
131
|
+
Per the "one-key completion" tenet, peaks-loop 2.0 detects 1.x consumers and prompts upgrade. After Step 0.7 returns "fresh", run `peaks upgrade --detect-1x --project <root> --json`. If `isOneX: true`, surface `AskUserQuestion`. Persist to `.peaks/preferences.json` (`autoUpgradePrompt`: opt-in / skip-this-session / skip-forever).
|
|
132
132
|
|
|
133
133
|
→ see `references/step-0-55-1x-detection.md` for the detection algorithm + AskUserQuestion options + persistence contract.
|
|
134
134
|
|
|
135
|
-
### Peaks-
|
|
135
|
+
### Peaks-Loop Step 1: Mode selection
|
|
136
136
|
|
|
137
137
|
Use `AskUserQuestion` with `Full auto (Recommended)` as the first option when EITHER the user did not name a profile OR the recorded skill presence is stale (v2.15.0 slice 002 AC-2: run `peaks skill presence:check-stale --project <path> --json` first; `stale: true` ⇒ re-ask. `peaks solo should-pause --step step-1-mode-select` returns `reason: 'stale-presence'` in this case).
|
|
138
138
|
|
|
139
139
|
→ see `references/mode-selection.md`, `references/fast-mode.md`, `references/mode-selection-with-stale-presence.md`.
|
|
140
140
|
|
|
141
|
-
### Peaks-
|
|
141
|
+
### Peaks-Loop Step 2: Re-set skill presence with the chosen mode
|
|
142
142
|
|
|
143
143
|
Re-run `peaks skill presence:set peaks-solo --mode <mode-value> --gate startup`. Install statusline on first run (`peaks statusline install`).
|
|
144
144
|
|
|
145
145
|
→ see `references/skill-presence-and-title.md`.
|
|
146
146
|
|
|
147
|
-
### Peaks-
|
|
147
|
+
### Peaks-Loop Step 2.3: Load project memory (durable, LLM-authored memories)
|
|
148
148
|
|
|
149
149
|
Run `peaks project memories --project <repo> --json` to read decisions / conventions / modules / rules / lessons from `.peaks/memory`. Use this to understand what exists, what was decided, what to avoid re-litigating.
|
|
150
150
|
|
|
151
151
|
→ see `references/project-memory-loading.md` for the kind table.
|
|
152
152
|
|
|
153
|
-
### Peaks-
|
|
153
|
+
### Peaks-Loop Step 2.5: Set session title
|
|
154
154
|
|
|
155
155
|
Extract a short title from the user's first request (8-20 Chinese chars or 4-10 English words). Run `peaks session title` with the active sid. Skip if a title is already set.
|
|
156
156
|
|
|
@@ -162,45 +162,45 @@ When peaks-solo dispatches a sub-agent (peaks-rd, peaks-qa, peaks-ui, peaks-txt,
|
|
|
162
162
|
|
|
163
163
|
## Boundaries
|
|
164
164
|
|
|
165
|
-
Peaks-
|
|
165
|
+
Peaks-Loop Solo may: identify scenarios (refactor, bugfix, QA hardening, release validation, incident response); recommend profiles; coordinate role skills through artifacts; coordinate project memory extraction; request user confirmation at risk and commit boundaries.
|
|
166
166
|
|
|
167
|
-
Peaks-
|
|
167
|
+
Peaks-Loop Solo must NOT silently install hooks, create agents, enable MCP servers, modify Claude settings, create GitHub repos, or bypass role-skill artifacts.
|
|
168
168
|
|
|
169
169
|
→ see `references/boundaries.md` for the do / don't list.
|
|
170
170
|
|
|
171
|
-
## Peaks-
|
|
171
|
+
## Peaks-Loop GStack integration
|
|
172
172
|
|
|
173
|
-
Map gstack stages to Peaks-
|
|
173
|
+
Map gstack stages to Peaks-Loop role artifacts; preserve confirmation gates. Do not delegate orchestration to gstack commands. RD and QA use Playwright MCP for browser E2E.
|
|
174
174
|
|
|
175
175
|
→ see `references/gstack-integration.md` and `references/browser-workflow.md`.
|
|
176
176
|
|
|
177
|
-
## Peaks-
|
|
177
|
+
## Peaks-Loop Local intermediate artifact workspace (MANDATORY)
|
|
178
178
|
|
|
179
|
-
The workspace is created in Step 0 as a mandatory first action. All intermediate artifacts land under `.peaks/_runtime/<sessionId>/`. NEVER write Peaks-
|
|
179
|
+
The workspace is created in Step 0 as a mandatory first action. All intermediate artifacts land under `.peaks/_runtime/<sessionId>/`. NEVER write Peaks-Loop intermediate artifacts to the project root directory.
|
|
180
180
|
|
|
181
|
-
## Peaks-
|
|
181
|
+
## Peaks-Loop Pre-RD project scan checklist (MANDATORY)
|
|
182
182
|
|
|
183
183
|
Before handing off to `peaks-rd`, scan the project and record findings to `.peaks/_runtime/<sessionId>/rd/project-scan.md`. The project-scan checklist (archetype detection, build-tool / component-library / CSS-framework / state-routing-data tables, legacy signals, artifact template) lives in the references file.
|
|
184
184
|
|
|
185
185
|
→ see `references/project-scan-checklist.md` for the checklist.
|
|
186
186
|
|
|
187
|
-
## Peaks-
|
|
187
|
+
## Peaks-Loop Frontend-only development mode
|
|
188
188
|
|
|
189
189
|
When the project has no live backend (no swagger.json, no API server), Solo must activate frontend-only mode. The CLI is authoritative — read `frontendOnly` and `frontendOnlyReason` from `peaks scan archetype --json`.
|
|
190
190
|
|
|
191
191
|
→ see `references/frontend-only-mode.md` for the mode contract, mock-data strategy, and the pre-flight keyword scan.
|
|
192
192
|
|
|
193
|
-
## Peaks-
|
|
193
|
+
## Peaks-Loop Request type classification + Workflow order + Transition verification gates
|
|
194
194
|
|
|
195
195
|
The contract for the 6-type classification table, the 11-step workflow order, and the 7 transition verification gates (A through G with their `ls` / `grep` shell snippets) lives in `references/workflow-gates-and-types.md`. The peaks-solo narrative in this SKILL.md references those gate numbers (Gate A through Gate G) — keep both files in lockstep when adding or renaming a gate. The reference file is the canonical contract; SKILL.md keeps the prose.
|
|
196
196
|
|
|
197
|
-
## Peaks-
|
|
197
|
+
## Peaks-Loop Default sub-agent fan-out (≥ 2 leaves/topological level → `--from-dag`)
|
|
198
198
|
|
|
199
199
|
> **Slice 5:** when the slice DAG has ≥ 2 leaves at one topological level, dispatch via `peaks sub-agent dispatch --from-dag <dag-file>` (wall-time ≈ max, not sum).
|
|
200
200
|
|
|
201
201
|
Write DAG → `.peaks/_runtime/<sessionId>/sc/slice-dag.json`, run `peaks sub-agent dispatch --from-dag <dag-file> --batch-id <id>` once; orchestrator emits N parallel `buildToolCall` (`dispatchCount === N`). No N serial `peaks sub-agent dispatch <role>` calls `--prompt`.
|
|
202
202
|
|
|
203
|
-
> **2026-06-28 校准:** 主路径 = 唯一蜂群;config/docs/chore 跳过不打断。assisted/strict 在 24h 场景下是反模式。详见 `.peaks/memory/peaks-
|
|
203
|
+
> **2026-06-28 校准:** 主路径 = 唯一蜂群;config/docs/chore 跳过不打断。assisted/strict 在 24h 场景下是反模式。详见 `.peaks/memory/peaks-loop-24h-ai-programmer-positioning.md`。
|
|
204
204
|
|
|
205
205
|
### Hard constraint: fan-out is mandatory (slice 2026-06-24-audit-5th-p2)
|
|
206
206
|
|
|
@@ -212,9 +212,9 @@ Write DAG → `.peaks/_runtime/<sessionId>/sc/slice-dag.json`, run `peaks sub-ag
|
|
|
212
212
|
|
|
213
213
|
## Slice 调度:分层并行 + 上游同步(2026-06-28 校准)
|
|
214
214
|
|
|
215
|
-
> 分层并行(G12,基础先行/业务并行)+ 上游同步(G11,tag 断点/独立排期窗口)见 `.peaks/memory/peaks-
|
|
215
|
+
> 分层并行(G12,基础先行/业务并行)+ 上游同步(G11,tag 断点/独立排期窗口)见 `.peaks/memory/peaks-loop-fork-sync-and-layered-parallel.md`。
|
|
216
216
|
|
|
217
|
-
## Peaks-
|
|
217
|
+
## Peaks-Loop Mandatory RD QA repair loop (AUTO-PROCEED)
|
|
218
218
|
|
|
219
219
|
After `peaks-rd` finishes implementation, repair, or code-output, Solo MUST auto-route to `peaks-qa` without waiting for confirmation. Cap: 3 cycles; on 3rd failure emit blocked TXT handoff.
|
|
220
220
|
|
|
@@ -233,25 +233,25 @@ When adding new CLI commands, mirror into `references/runbook.md` and `tests/uni
|
|
|
233
233
|
> 不要把 micro-cycle 跟边界 check 混用——前者 100ms 反馈循环,后者 30s+ 全套。
|
|
234
234
|
> 完整手册:`references/micro-cycle.md`。
|
|
235
235
|
|
|
236
|
-
## Peaks-
|
|
236
|
+
## Peaks-Loop Project standards preflight
|
|
237
237
|
|
|
238
238
|
Gather the project standards preflight status via `peaks standards init --project <path> --dry-run` and `peaks standards update --project <path> --dry-run`. Standards must reflect the project scan (component library, CSS, build tool, state, routing) — never emit a generic template.
|
|
239
239
|
|
|
240
|
-
## Peaks-
|
|
240
|
+
## Peaks-Loop Refactor mode
|
|
241
241
|
|
|
242
242
|
Read `references/refactor-mode.md` first. Default MVP: `peaks-solo refactor`. Red lines: understand before changes, ≥95% UT coverage, split broad refactors, strict verifiable specs, 100% acceptance per slice.
|
|
243
243
|
|
|
244
|
-
## Peaks-
|
|
244
|
+
## Peaks-Loop Quality-gate commands (CLI cheat sheet)
|
|
245
245
|
|
|
246
246
|
Five CLI commands harden the workflow against silent skips: `peaks request lint`, `peaks request repair-status`, `peaks scan request-type-sanity`, `peaks scan libraries`, `peaks slice check` (plus `peaks request transition`). See `references/quality-gate-cheatsheet.md`.
|
|
247
247
|
|
|
248
|
-
## Peaks-
|
|
248
|
+
## Peaks-Loop Completion handoff
|
|
249
249
|
|
|
250
|
-
After final validation, refresh project-local standards via `peaks standards init/update` (never hand-write). Use Peaks-
|
|
250
|
+
After final validation, refresh project-local standards via `peaks standards init/update` (never hand-write). Use Peaks-Loop TXT for the compact handoff capsule: mode, validated decisions, artifact paths, standards deltas, open questions, next action. **Presence management is delegated to the last downstream skill** — peaks-solo does not call `peaks skill presence:clear` itself.
|
|
251
251
|
|
|
252
|
-
## Peaks-
|
|
252
|
+
## Peaks-Loop External references and lifecycle
|
|
253
253
|
|
|
254
|
-
3rd-party integrations (codegraph, mattpocock/skills, shadcn/ui, MCPs, Context7) follow Discovery → Reference → Side effect through Peaks CLI only. Before naming external skills, run `peaks capabilities` for capability discovery; treat all external skills as reference material only. Peaks-
|
|
254
|
+
3rd-party integrations (codegraph, mattpocock/skills, shadcn/ui, MCPs, Context7) follow Discovery → Reference → Side effect through Peaks CLI only. Before naming external skills, run `peaks capabilities` for capability discovery; treat all external skills as reference material only. Peaks-Loop artifacts and ACs remain authoritative; do not execute upstream installers; MCP servers (Playwright / Chrome DevTools / Figma) are user-installed — check the tool list for `mcp__<server>__*` entries.
|
|
255
255
|
|
|
256
256
|
→ see `references/external-references.md` and `references/external-skill-invocation.md`.
|
|
257
257
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
# A2A artifact mapping (informational)
|
|
2
2
|
|
|
3
|
-
> Reference for `peaks-solo` and any other peaks skill that produces durable artefacts in `.peaks/_runtime/<session-id>/`. Maps peaks's on-disk artefact vocabulary onto the A2A (Agent2Agent) protocol's vocabulary so a future peaks consumer (e.g. an external LLM agent or a downstream peaks-
|
|
3
|
+
> Reference for `peaks-solo` and any other peaks skill that produces durable artefacts in `.peaks/_runtime/<session-id>/`. Maps peaks's on-disk artefact vocabulary onto the A2A (Agent2Agent) protocol's vocabulary so a future peaks consumer (e.g. an external LLM agent or a downstream peaks-loop extension) can read peaks output without having to learn a brand-new schema. This is a **documentation mapping**, not a protocol implementation: peaks-loop does not speak A2A over HTTP, does not host an AgentCard endpoint, and does not advertise its capabilities via A2A's discovery mechanism. It only uses A2A's *concepts* as a shared naming layer.
|
|
4
4
|
|
|
5
5
|
## 1. Why this reference exists
|
|
6
6
|
|
|
7
|
-
The A2A protocol (https://a2acn.com) defines five core concepts: **AgentCard**, **Task**, **Artifact**, **Message**, and **Part**. peaks-
|
|
7
|
+
The A2A protocol (https://a2acn.com) defines five core concepts: **AgentCard**, **Task**, **Artifact**, **Message**, and **Part**. peaks-loop's session workspace is a parallel vocabulary that grew up independently: `prd/requests/<rid>.md`, `rd/tech-doc.md`, `qa/test-cases/<rid>.md`, etc. The two vocabularies are *not* identical (A2A is HTTP-shaped, peaks is filesystem-shaped), but the A2A concepts are close enough that aligning peaks artefact names with A2A terms in this reference:
|
|
8
8
|
|
|
9
9
|
- gives an external consumer a single translation table instead of two schemas to learn,
|
|
10
10
|
- lets a peaks operator talk about "the artifact" or "the task" in mixed conversations without losing precision,
|
|
11
11
|
- documents what peaks output is **not** (no SSE streaming, no remote AgentCard), so the limits are explicit.
|
|
12
12
|
|
|
13
|
-
This is the kind of borrowing that costs zero code and earns some interoperability. It is **not** an integration: peaks-
|
|
13
|
+
This is the kind of borrowing that costs zero code and earns some interoperability. It is **not** an integration: peaks-loop does not implement A2A, does not run an A2A server, and does not depend on the a2a-protocol package. Adopting A2A concepts here is the same as adopting any other shared nomenclature (UML, OpenTelemetry, etc.): it improves the conversation, nothing more.
|
|
14
14
|
|
|
15
15
|
## 2. Concept-to-path mapping
|
|
16
16
|
|
|
@@ -94,22 +94,22 @@ A consumer wanting to render a single "feature" object in A2A terms picks the `t
|
|
|
94
94
|
|
|
95
95
|
## 6. What peaks does NOT provide
|
|
96
96
|
|
|
97
|
-
To keep the mapping honest, peaks-
|
|
97
|
+
To keep the mapping honest, peaks-loop **does not** currently provide the following A2A primitives, and consumers should not expect them:
|
|
98
98
|
|
|
99
|
-
- A2A **AgentCard** served over HTTP at `/.well-known/agent-card.json`. peaks-
|
|
99
|
+
- A2A **AgentCard** served over HTTP at `/.well-known/agent-card.json`. peaks-loop is a local CLI; its "card" is the on-disk `.peaks/.active-skill.json` plus `peaks skill doctor --json`.
|
|
100
100
|
- A2A **streaming** responses (SSE / WebSocket). peaks commands are synchronous and return a single JSON envelope.
|
|
101
101
|
- A2A **identity / auth** (OAuth, OIDC, mTLS). peaks assumes local-machine trust.
|
|
102
102
|
- A2A **cross-vendor discovery**. peaks has no A2A registry entry; MCP-compatible capabilities are discovered by the LLM via its own tool list (the LLM checks for `mcp__<server>__*` entries in its own function schema) and reported back to the user. Slice #016 retired the `peaks mcp *` indirection layer.
|
|
103
103
|
- A2A **Task delegation across the network**. peaks's "sub-agent" is a Claude Code `Task` tool call in the same process, not a remote A2A server.
|
|
104
104
|
|
|
105
|
-
These are *deliberate* omissions. peaks-
|
|
105
|
+
These are *deliberate* omissions. peaks-loop solves a different problem (a local workflow-gating CLI for Claude Code), and adopting A2A's networking surface would add weight without addressing peaks's actual failure modes (which are around LLM bypassing gates, not around inter-agent discovery).
|
|
106
106
|
|
|
107
107
|
## 7. When to re-evaluate
|
|
108
108
|
|
|
109
109
|
Re-open this mapping in any of the following cases:
|
|
110
110
|
|
|
111
111
|
- a peaks user reports a real need to share workflow state with a non-peaks agent (e.g. an Autogen / LangChain agent that wants to read a peaks handoff capsule);
|
|
112
|
-
- peaks-
|
|
112
|
+
- peaks-loop ships a hosted / multi-user mode where AgentCard-style discovery becomes useful;
|
|
113
113
|
- the A2A protocol stabilises on a thin `Artifact` JSON schema that matches peaks's on-disk shape close enough to make translation a one-liner rather than a reference doc.
|
|
114
114
|
|
|
115
|
-
Until one of those fires, this reference doc is the entire A2A surface area of peaks-
|
|
115
|
+
Until one of those fires, this reference doc is the entire A2A surface area of peaks-loop. Adding more is over-engineering.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Step 0 — Anchor the workflow
|
|
2
2
|
|
|
3
|
-
> Body of `### Peaks-
|
|
3
|
+
> Body of `### Peaks-Loop Step 0: Anchor the workflow`. The instant Peaks-Loop Solo is invoked, **before** the mode-selection question, before any analysis, and before you decide whether the request "needs" the full pipeline, you MUST run these two commands and see their output:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
# Session ID is auto-generated when omitted; the command returns it in the JSON output.
|
|
@@ -27,8 +27,8 @@ peaks skill presence:set peaks-solo --project <repo> --gate startup
|
|
|
27
27
|
If the bypass is not in effect (e.g. `.claude/` was read-only, or the user passed `--no-claude-hooks`, or the consumer manually deleted the file), the recovery flow is:
|
|
28
28
|
|
|
29
29
|
1. Re-run `peaks workspace init --project <repo> --json` **without** `--no-claude-hooks`. The next-action list will say "Materialized .claude/settings.local.json (action: written/refreshed)". Restart Claude Code so the hook takes effect.
|
|
30
|
-
2. If `.claude/` cannot be written (read-only mount, container with no write access, etc.), drop the contents of `.peaks/.claude-settings-template.json` into `.claude/settings.local.json` manually. The peaks-
|
|
30
|
+
2. If `.claude/` cannot be written (read-only mount, container with no write access, etc.), drop the contents of `.peaks/.claude-settings-template.json` into `.claude/settings.local.json` manually. The peaks-loop init always writes the offline template copy (regardless of `--no-claude-hooks`) so the user has a known source-of-truth on disk. After copying, restart Claude Code.
|
|
31
31
|
|
|
32
|
-
**Anti-bail-out rule for the gate:** Do NOT skip Step 0 because the gate fired. The gate is a Claude Code core feature that peaks-
|
|
32
|
+
**Anti-bail-out rule for the gate:** Do NOT skip Step 0 because the gate fired. The gate is a Claude Code core feature that peaks-loop cannot modify directly; peaks-loop can only sidestep it via the hook allow-list. If the gate still blocks Step 0 after the bypass is in effect, the user has a misconfigured `.claude/settings.json` upstream — surface that as a separate `AskUserQuestion` ("Your `.claude/settings.json` is overriding the local allow-list. May peaks-loop delete the local file and regenerate it?") rather than skipping Step 0.
|
|
33
33
|
|
|
34
34
|
`presence:set` accepts no `--mode` here on purpose — mode is unknown until Step 1. It is re-run with the selected mode in Step 2. Setting presence early guarantees the status header/line shows `peaks-solo` from the very first turn even if the user never reaches mode selection.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Boundaries
|
|
2
2
|
|
|
3
|
-
> Body of `## Boundaries`. Peaks-
|
|
3
|
+
> Body of `## Boundaries`. Peaks-Loop Solo may:
|
|
4
4
|
|
|
5
5
|
- identify scenarios such as refactor, bugfix, QA hardening, release validation, and incident response;
|
|
6
6
|
- recommend Solo, Assisted, Swarm, or Strict profiles;
|
|
7
|
-
- coordinate Peaks-
|
|
7
|
+
- coordinate Peaks-Loop role skills through artifacts;
|
|
8
8
|
- coordinate project memory extraction from stable skill artifact sections;
|
|
9
9
|
- request user confirmation at risk and commit boundaries;
|
|
10
10
|
- read CLI doctor/profile/artifact reports.
|
|
11
11
|
|
|
12
|
-
Peaks-
|
|
12
|
+
Peaks-Loop Solo must not silently:
|
|
13
13
|
|
|
14
14
|
- install hooks;
|
|
15
15
|
- create agents;
|
|
@@ -18,4 +18,4 @@ Peaks-Cli Solo must not silently:
|
|
|
18
18
|
- create GitHub repositories;
|
|
19
19
|
- bypass role-skill artifacts.
|
|
20
20
|
|
|
21
|
-
Use the Peaks-
|
|
21
|
+
Use the Peaks-Loop CLI for runtime side effects.
|
|
@@ -11,7 +11,7 @@ Peaks skills standardize on **Playwright MCP** as the controlled headed-browser
|
|
|
11
11
|
|
|
12
12
|
> **Bug history**: an earlier version of this document recommended Chrome DevTools MCP for "open a headed browser when peaks-solo gets a product document link." Dogfood testing in 2026-05 revealed the tool requires a pre-running Chrome with remote debugging enabled — it does NOT launch its own browser. Playwright MCP is the correct tool for the "open on demand" case.
|
|
13
13
|
|
|
14
|
-
> **Slice #016 (2026-06-09)**: peaks-
|
|
14
|
+
> **Slice #016 (2026-06-09)**: peaks-loop no longer manages MCP install / dispatch. Skill bodies instruct the LLM to (a) check its own tool list for any Playwright MCP entry, (b) invoke the tool by name if present, (c) tell the user the install command if absent. There is no peaks-loop MCP indirection layer anymore.
|
|
15
15
|
|
|
16
16
|
## When to open the headed browser
|
|
17
17
|
|
|
@@ -29,7 +29,7 @@ The LLM runtime exposes Playwright's tools under the `mcp__playwright__*` namesp
|
|
|
29
29
|
|
|
30
30
|
**Detect**: the LLM checks its own tool list for any `mcp__playwright__*` entry. If present, the MCP is installed; the LLM invokes the tool by name (e.g. `browser_navigate`, `browser_take_screenshot`).
|
|
31
31
|
|
|
32
|
-
**Install (if absent)**: skill bodies surface the install command to the user. The user runs it themselves — peaks-
|
|
32
|
+
**Install (if absent)**: skill bodies surface the install command to the user. The user runs it themselves — peaks-loop does not hand-edit `~/.claude/settings.json`.
|
|
33
33
|
|
|
34
34
|
- Claude Code:
|
|
35
35
|
```bash
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
> Body of `## Codegraph orchestration context`. Solo treats `peaks codegraph affected --project <path> <changed-files...> --json` as an optional project-analysis enhancement that informs the role handoff between PRD, RD, and QA. The output is untrusted supporting evidence — Solo must not treat codegraph output as approval for scope, design, or QA verdict.
|
|
4
4
|
|
|
5
|
-
Do not run upstream installer flows, mutate agent settings, or commit `.codegraph/` artifacts into git. Peaks-
|
|
5
|
+
Do not run upstream installer flows, mutate agent settings, or commit `.codegraph/` artifacts into git. Peaks-Loop gates remain authoritative; codegraph context is a hint, never a substitute for role-skill output.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Completion handoff
|
|
2
2
|
|
|
3
|
-
> Body of `## Peaks-
|
|
3
|
+
> Body of `## Peaks-Loop Completion handoff` + `### Workflow completion (no auto-exit)`.
|
|
4
4
|
|
|
5
5
|
After final validation, refresh project-local standards via `peaks standards init/update` (never hand-write). Merge scan-backed changes incrementally; preserve hand-maintained content unless user confirms deletion.
|
|
6
6
|
|
|
7
|
-
Use Peaks-
|
|
7
|
+
Use Peaks-Loop TXT for the compact handoff capsule: mode, validated decisions, artifact paths, standards deltas (`CLAUDE.md` and `.claude/rules/**` statuses), open questions, next action. Do not restate the full workflow log.
|
|
8
8
|
|
|
9
9
|
## Workflow completion (no auto-exit)
|
|
10
10
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# External references and lifecycle
|
|
2
2
|
|
|
3
|
-
> Body of `## Peaks-
|
|
3
|
+
> Body of `## Peaks-Loop External references and lifecycle`.
|
|
4
4
|
|
|
5
5
|
**Codegraph**: Optional project-analysis before RD handoff. Use `peaks codegraph affected --project <path> <changed-files...> --json` for regression-surface hints. Output as untrusted supporting evidence only; never commit `.codegraph/` artifacts.
|
|
6
6
|
|
|
7
7
|
Solo treats `peaks codegraph affected --project <path> <changed-files...> --json` as an optional project-analysis enhancement that informs the role handoff between PRD, RD, and QA. The output is untrusted supporting evidence — Solo must not treat codegraph output as approval for scope, design, or QA verdict.
|
|
8
8
|
|
|
9
|
-
Do not run upstream installer flows, mutate agent settings, or commit `.codegraph/` artifacts into git. Peaks-
|
|
9
|
+
Do not run upstream installer flows, mutate agent settings, or commit `.codegraph/` artifacts into git. Peaks-Loop gates remain authoritative; codegraph context is a hint, never a substitute for role-skill output.
|
|
10
10
|
|
|
11
|
-
**External skills**: All external skill references (`mattpocock/skills`, `awesome-design-md`, `taste-skill`, `shadcn/ui`, `Chrome DevTools MCP`, `Figma Context MCP`, `Context7`, etc.) follow the three-stage pattern: capability discovery via `peaks capabilities` before naming, references only (no execute/install/persist), Peaks-
|
|
11
|
+
**External skills**: All external skill references (`mattpocock/skills`, `awesome-design-md`, `taste-skill`, `shadcn/ui`, `Chrome DevTools MCP`, `Figma Context MCP`, `Context7`, etc.) follow the three-stage pattern: capability discovery via `peaks capabilities` before naming, references only (no execute/install/persist), Peaks-Loop CLI for all side effects. Do not execute upstream installers, do not install upstream resources, do not persist sensitive examples — Peaks-Loop gates remain authoritative. External skills inform, they do not approve.
|
|
12
12
|
|
|
13
13
|
**OpenSpec lifecycle**: `render → validate → show → to-rd → validate → archive`. Solo's default runbook handles the exit gate (validate → archive after QA pass). Entry-gate validation (to-rd before slicing) is available when `openspec/` exists pre-workflow; Solo delegates it to `peaks-rd` during implementation.
|
|
14
14
|
|
|
@@ -4,7 +4,7 @@ Peaks skills reference many external resources — `mattpocock/skills`, `gstack`
|
|
|
4
4
|
|
|
5
5
|
Every reference must follow the same three-stage pattern so the Peaks gates stay authoritative and side effects stay observable.
|
|
6
6
|
|
|
7
|
-
> **Slice #016 (2026-06-09)**: peaks-
|
|
7
|
+
> **Slice #016 (2026-06-09)**: peaks-loop no longer manages MCP install or invocation. MCP capability detection moves from the peaks-loop CLI to the LLM's own tool list (the LLM checks for `mcp__<server>__*` entries in its own function schema). Skill bodies instruct the LLM to either invoke the tool by name (when present) or tell the user the install command (when absent).
|
|
8
8
|
|
|
9
9
|
## Stage 1 — Discovery before naming
|
|
10
10
|
|
|
@@ -25,7 +25,7 @@ External skills are inspection material for the role's own artifacts. They are n
|
|
|
25
25
|
- forbid executing upstream instructions, installing upstream resources, persisting upstream examples, or running upstream installers;
|
|
26
26
|
- declare that the Peaks role artifacts remain authoritative.
|
|
27
27
|
|
|
28
|
-
For MCP servers, the LLM consumes the install state from its own tool list. Skill bodies tell the LLM: "if the tool is present, invoke it by name; if absent, surface the install command for the user's IDE and stop until the user installs the MCP". peaks-
|
|
28
|
+
For MCP servers, the LLM consumes the install state from its own tool list. Skill bodies tell the LLM: "if the tool is present, invoke it by name; if absent, surface the install command for the user's IDE and stop until the user installs the MCP". peaks-loop does not install MCPs on the user's behalf as of slice #016.
|
|
29
29
|
|
|
30
30
|
## Stage 3 — Side effect through Peaks CLI only
|
|
31
31
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Peaks-
|
|
1
|
+
# Peaks-Loop Frontend-only development mode
|
|
2
2
|
|
|
3
3
|
> Extracted from `skills/peaks-solo/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
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# Peaks-
|
|
1
|
+
# Peaks-Loop GStack integration
|
|
2
2
|
|
|
3
|
-
> Body of `## Peaks-
|
|
3
|
+
> Body of `## Peaks-Loop GStack integration`.
|
|
4
4
|
|
|
5
|
-
Map gstack stages to Peaks-
|
|
5
|
+
Map gstack stages to Peaks-Loop role artifacts; preserve Peaks-Loop confirmation gates. Do not delegate orchestration to gstack commands.
|
|
6
6
|
|
|
7
|
-
For frontend workflows, RD and QA must use Playwright MCP for real browser E2E. The consuming LLM detects the MCP from its own tool list: any Playwright MCP entry in the LLM tool list means the MCP is installed; absent means the user needs to install (`claude mcp add playwright -- npx @playwright/mcp@latest` in Claude Code; other IDEs have their own MCP install path). The LLM invokes the tool directly (browser_navigate / browser_click / browser_snapshot / browser_take_screenshot / browser_console_messages / browser_network_requests / browser_close) by name — there is no peaks-
|
|
7
|
+
For frontend workflows, RD and QA must use Playwright MCP for real browser E2E. The consuming LLM detects the MCP from its own tool list: any Playwright MCP entry in the LLM tool list means the MCP is installed; absent means the user needs to install (`claude mcp add playwright -- npx @playwright/mcp@latest` in Claude Code; other IDEs have their own MCP install path). The LLM invokes the tool directly (browser_navigate / browser_click / browser_snapshot / browser_take_screenshot / browser_console_messages / browser_network_requests / browser_close) by name — there is no peaks-loop indirection. Chrome DevTools MCP is a secondary CDP surface only. Sanitize browser artifacts before retention (no login URLs, cookies, tokens, PII). See `references/browser-workflow.md`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Local intermediate artifact workspace
|
|
2
2
|
|
|
3
|
-
> Body of `## Peaks-
|
|
3
|
+
> Body of `## Peaks-Loop Local intermediate artifact workspace` plus all sub-sections (workspace initialization gate, root pollution prohibition, git and sync policy).
|
|
4
4
|
|
|
5
5
|
## Workspace initialization gate
|
|
6
6
|
|
|
@@ -61,7 +61,7 @@ Files written into these directories during the workflow (not pre-created — th
|
|
|
61
61
|
|
|
62
62
|
## Root pollution prohibition (CRITICAL)
|
|
63
63
|
|
|
64
|
-
**NEVER write Peaks-
|
|
64
|
+
**NEVER write Peaks-Loop intermediate artifacts to the project root directory.** Specifically prohibited at root level:
|
|
65
65
|
|
|
66
66
|
- PRD snapshots, document extracts, or requirement notes (`feishu-doc-*.md`, `*-snapshot.md`, etc.)
|
|
67
67
|
- RD tech docs, scan reports, slice specs, or architecture notes
|
|
@@ -160,7 +160,7 @@ verdict=return-to-rd → RD 修 (new slice 内部走 micro-cycle)
|
|
|
160
160
|
|
|
161
161
|
# Mandatory RD QA repair loop (AUTO-PROCEED)
|
|
162
162
|
|
|
163
|
-
> Body of `## Peaks-
|
|
163
|
+
> Body of `## Peaks-Loop Mandatory RD QA repair loop`.
|
|
164
164
|
|
|
165
165
|
> **CLI gate enforcement**: `peaks request transition` now refuses to move RD/QA to gated states when required artifacts are missing. The required files depend on `--type` chosen at `peaks request init` (default `feature`):
|
|
166
166
|
>
|
|
@@ -171,13 +171,13 @@ verdict=return-to-rd → RD 修 (new slice 内部走 micro-cycle)
|
|
|
171
171
|
>
|
|
172
172
|
> When PRD lands, classify the request type before running `peaks request init` for every role — pass `--type <type>` so the artifact records it and downstream transitions enforce the right gates. Misclassifying a feature as `docs` to skip gates is a workflow violation. If a transition fails with `code: PREREQUISITES_MISSING`, the response lists every missing path — produce them, then re-transition. For one-off exceptions, the escape hatch `--allow-incomplete --reason "<text>"` records the bypass in the artifact transition note.
|
|
173
173
|
|
|
174
|
-
After `peaks-rd` finishes any implementation, repair, or code-output slice, Peaks-
|
|
174
|
+
After `peaks-rd` finishes any implementation, repair, or code-output slice, Peaks-Loop Solo MUST automatically route the result to `peaks-qa` without waiting for user confirmation. This is not optional in full-auto mode. Solo must not declare the workflow complete, emit a TXT handoff, or stop at RD completion.
|
|
175
175
|
|
|
176
176
|
**How Solo invokes another role (mechanism, not metaphor):**
|
|
177
177
|
|
|
178
178
|
Solo is itself a skill running in the current session. There are **two distinct mechanisms** in this skill, and they MUST NOT be confused:
|
|
179
179
|
|
|
180
|
-
1. **Swarm fan-out (planning side, after PRD confirmed)** — uses `peaks sub-agent dispatch <role>` to launch real concurrent sub-agents. The CLI returns a per-IDE tool-call descriptor that the LLM executes in its environment. See "Peaks-
|
|
180
|
+
1. **Swarm fan-out (planning side, after PRD confirmed)** — uses `peaks sub-agent dispatch <role>` to launch real concurrent sub-agents. The CLI returns a per-IDE tool-call descriptor that the LLM executes in its environment. See "Peaks-Loop Swarm parallel phase" above for the full contract. Sub-agents do NOT call Skill(...) back into the role; they execute the role's instructions inline from the prompt.
|
|
181
181
|
2. **Sequential handoff (execution side, RD↔QA repair loop)** — Solo is the only loop, and after RD or QA finishes (whether as a sub-agent or directly), Solo drives the next step from the orchestrator seat. Do NOT use the `Skill` tool to "reactivate" peaks-rd or peaks-qa in the main loop; doing so is the v1.x anti-pattern that masqueraded as "calling the role" but actually just re-prompted the same session. From v1.3 onward, the main loop drives roles via the CLI gate (`peaks request transition`) and reads back artefacts (`peaks request show ... --json`); the actual RD/QA work is either done inline by Solo (when Solo has just been re-invoked by the user) or by a Task sub-agent (in swarm mode).
|
|
182
182
|
|
|
183
183
|
After RD completes (whether inline or sub-agent), Solo does not stop — it must advance to QA. There is no "RD done, ask the user" state in full-auto mode. The only valid stops are: (a) QA verdict=pass, (b) repair cap hit, (c) explicit user cancel.
|
|
@@ -190,7 +190,7 @@ After RD completes (whether inline or sub-agent), Solo does not stop — it must
|
|
|
190
190
|
peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate <current-gate>
|
|
191
191
|
```
|
|
192
192
|
|
|
193
|
-
This keeps the CLAUDE.md status header accurate (`Peaks-
|
|
193
|
+
This keeps the CLAUDE.md status header accurate (`Peaks-Loop Skill: peaks-solo`) 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
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Step 1 — Mode selection
|
|
2
2
|
|
|
3
|
-
> Body of `### Peaks-
|
|
3
|
+
> Body of `### Peaks-Loop Step 1`. After Step 0 has anchored the workspace and presence, when the user invokes Peaks-Loop Solo without explicitly naming an execution profile, use `AskUserQuestion` to pick the profile. Present the recommended full-auto path as the first/default option with a practical description for each:
|
|
4
4
|
|
|
5
|
-
1. **Full auto (Recommended)** — Peaks-
|
|
6
|
-
2. **Assisted** — Peaks-
|
|
7
|
-
3. **Swarm** — Peaks-
|
|
8
|
-
4. **Strict** — Peaks-
|
|
5
|
+
1. **Full auto (Recommended)** — Peaks-Loop handles planning, role coordination, validation, and compact handoff end-to-end while preserving required confirmation gates for risky or shared-state actions.
|
|
6
|
+
2. **Assisted** — Peaks-Loop proposes plans, artifacts, and checks, then pauses for user decisions at major workflow boundaries.
|
|
7
|
+
3. **Swarm** — Peaks-Loop maximizes safe parallel role/worker execution for larger RD or QA workloads while keeping reducer validation and artifact boundaries explicit.
|
|
8
|
+
4. **Strict** — Peaks-Loop uses the most conservative gates: explicit confirmations, strict slice specs, coverage evidence, QA acceptance, and commit boundaries before continuing.
|
|
9
9
|
|
|
10
10
|
Map the user's selection to the `--mode` flag value (used by `peaks skill presence:set`; `presence:set --mode` accepts any string, so the name matches the user-facing label rather than overloading "solo" which is also the skill name):
|
|
11
11
|
|
|
@@ -31,7 +31,7 @@ For `peaks-solo refactor` runs against a repository with `openspec/`:
|
|
|
31
31
|
3. QA exit gate — re-run `peaks openspec validate <id>` after implementation; record the result in the QA validation report.
|
|
32
32
|
4. Archive — `peaks openspec archive <id> --apply` only after QA passes the exit gate and SC closes the final commit.
|
|
33
33
|
|
|
34
|
-
If the consuming LLM needs an MCP server for docs lookup or research (e.g. Context7), it checks its own tool list for `mcp__<server>__*` and tells the user the install command if absent. peaks-
|
|
34
|
+
If the consuming LLM needs an MCP server for docs lookup or research (e.g. Context7), it checks its own tool list for `mcp__<server>__*` and tells the user the install command if absent. peaks-loop is no longer in the install path; the LLM is the executor, the IDE is the dispatcher.
|
|
35
35
|
|
|
36
36
|
## Boundary
|
|
37
37
|
|
|
@@ -41,7 +41,7 @@ Solo must not write `openspec/changes/**` or `~/.claude/settings.json` directly.
|
|
|
41
41
|
|
|
42
42
|
# Step 0.5 — OpenSpec first-run opt-in (conditional)
|
|
43
43
|
|
|
44
|
-
> Body of `### Peaks-
|
|
44
|
+
> Body of `### Peaks-Loop Step 0.5`. After the workspace is anchored, before project scan, Solo checks whether
|
|
45
45
|
the project already has an `openspec/` directory. The lifecycle
|
|
46
46
|
(`render → validate → show → to-rd → validate → archive`) only applies
|
|
47
47
|
when `openspec/` exists; without it, RD/QA/SC silently skip the
|
|
@@ -29,7 +29,7 @@ peaks playwright stop [--terminal <id>] [--project <path>] [--json]
|
|
|
29
29
|
|
|
30
30
|
`peaks playwright start` tries ports in the order `8931, 8932, 8933, ..., 8949`. The first port that is **not** bound by anything (probe uses `net.createServer().listen()`; an `EADDRINUSE` is a busy port) is used. If 8931..8949 are all busy, the command exits with `PORT_EXHAUSTED`.
|
|
31
31
|
|
|
32
|
-
The CLI does NOT bundle the playwright-mcp binary. It shells out to `npx playwright-mcp@latest --port=<n> --browser=<b> --user-data-dir=<path>`. peaks-
|
|
32
|
+
The CLI does NOT bundle the playwright-mcp binary. It shells out to `npx playwright-mcp@latest --port=<n> --browser=<b> --user-data-dir=<path>`. peaks-loop is the lifecycle orchestrator, not the install medium.
|
|
33
33
|
|
|
34
34
|
## Session file layout
|
|
35
35
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Step 2.3 — Load project memory
|
|
2
2
|
|
|
3
|
-
> Body of `### Peaks-
|
|
3
|
+
> Body of `### Peaks-Loop Step 2.3`. Before planning any work, read the project's persistent memory — durable memories that survive across sessions:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
peaks project memories --project <repo> --json
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Peaks-
|
|
1
|
+
# Peaks-Loop Pre-RD project scan checklist
|
|
2
2
|
|
|
3
3
|
> Extracted from `skills/peaks-solo/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
|
|