peaks-cli 1.0.23 → 1.0.24

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.
@@ -1,32 +1,32 @@
1
1
  ---
2
2
  name: peaks-solo
3
- description: Full-auto orchestration facade for the Peaks skill family. Use when the user asks Peaks 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", "全流程开发", "端到端迭代", "根据产品文档开发", "从需求到上线".
3
+ description: Full-auto orchestration facade for the Peaks-Cli skill family. Use when the user asks Peaks-Cli 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
- # Peaks Solo
6
+ # Peaks-Cli Solo
7
7
 
8
- Peaks Solo is the orchestration facade for the Peaks short skill family.
8
+ Peaks-Cli Solo is the orchestration facade for the Peaks-Cli short skill family.
9
9
 
10
10
  Use this skill 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.
11
11
 
12
12
  ## Code-Change Red Line (BLOCKING — read before ANY tool call)
13
13
 
14
- **Peaks Solo is an orchestrator, NOT an implementer. You MUST NOT write, edit, or modify any application source code directly.**
14
+ **Peaks-Cli Solo is an orchestrator, NOT an implementer. You MUST NOT write, edit, or modify any application source code directly.**
15
15
 
16
16
  Every code change — bugfix, feature, refactor, or config — MUST go through the full pipeline:
17
17
 
18
18
  ```
19
19
  peaks-solo (orchestrate only)
20
20
  → Skill(skill="peaks-rd") ← ALL code changes happen HERE
21
- → Unit tests written + pass (Gate B2)
21
+ → Unit tests written + pass (Peaks-Cli Gate B2)
22
22
  → Karpathy standards enforced (file-size ≤800 lines, TypeScript rules)
23
- → Code review evidence (Gate B3)
24
- → Security review evidence (Gate B4)
23
+ → Code review evidence (Peaks-Cli Gate B3)
24
+ → Security review evidence (Peaks-Cli Gate B4)
25
25
  → Skill(skill="peaks-qa") ← ALL validation happens HERE
26
- → Functional test execution (Gate A2)
27
- → Performance check (Gate A4)
28
- → Security test (Gate A3)
29
- → Browser E2E (when frontend; Gate D)
26
+ → Functional test execution (Peaks-Cli Gate A2)
27
+ → Performance check (Peaks-Cli Gate A4)
28
+ → Security test (Peaks-Cli Gate A3)
29
+ → Browser E2E (when frontend; Peaks-Cli Gate D)
30
30
  → Verdict: pass | return-to-rd | blocked
31
31
  ```
32
32
 
@@ -42,16 +42,16 @@ peaks-solo (orchestrate only)
42
42
 
43
43
  **Before declaring workflow complete, run:** `peaks workflow verify-pipeline --rid <rid> --project <repo> --json`
44
44
 
45
- ## Startup sequence (MANDATORY — execute in order)
45
+ ## Peaks-Cli Startup sequence (MANDATORY — execute in order)
46
46
 
47
- ### Step 1: Mode selection (MUST run before presence:set)
47
+ ### Peaks-Cli Step 1: Mode selection (MUST run before presence:set)
48
48
 
49
- When the user invokes Peaks Solo without explicitly naming an execution profile, use `AskUserQuestion` BEFORE any other action. Present the recommended full-auto path as the first/default option with a practical description for each:
49
+ When the user invokes Peaks-Cli Solo without explicitly naming an execution profile, use `AskUserQuestion` BEFORE any other action. Present the recommended full-auto path as the first/default option with a practical description for each:
50
50
 
51
- 1. **Full auto (Recommended)** — Peaks handles planning, role coordination, validation, and compact handoff end-to-end while preserving required confirmation gates for risky or shared-state actions.
52
- 2. **Assisted** — Peaks proposes plans, artifacts, and checks, then pauses for user decisions at major workflow boundaries.
53
- 3. **Swarm** — Peaks maximizes safe parallel role/worker execution for larger RD or QA workloads while keeping reducer validation and artifact boundaries explicit.
54
- 4. **Strict** — Peaks uses the most conservative gates: explicit confirmations, strict slice specs, coverage evidence, QA acceptance, and commit boundaries before continuing.
51
+ 1. **Full auto (Recommended)** — Peaks-Cli handles planning, role coordination, validation, and compact handoff end-to-end while preserving required confirmation gates for risky or shared-state actions.
52
+ 2. **Assisted** — Peaks-Cli proposes plans, artifacts, and checks, then pauses for user decisions at major workflow boundaries.
53
+ 3. **Swarm** — Peaks-Cli maximizes safe parallel role/worker execution for larger RD or QA workloads while keeping reducer validation and artifact boundaries explicit.
54
+ 4. **Strict** — Peaks-Cli uses the most conservative gates: explicit confirmations, strict slice specs, coverage evidence, QA acceptance, and commit boundaries before continuing.
55
55
 
56
56
  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):
57
57
 
@@ -66,7 +66,7 @@ Map the user's selection to the `--mode` flag value (used by `peaks skill presen
66
66
 
67
67
  If the user already names a profile in their invocation (e.g. `/peaks-solo --full-auto`, "用全自动模式"), skip this question and use the named profile directly.
68
68
 
69
- ### Step 2: Set skill presence
69
+ ### Peaks-Cli Step 2: Set skill presence
70
70
 
71
71
  Only after the mode is known (user selected or explicitly named), run:
72
72
 
@@ -74,22 +74,22 @@ Only after the mode is known (user selected or explicitly named), run:
74
74
  peaks skill presence:set peaks-solo --mode <mode-value> --gate startup
75
75
  ```
76
76
 
77
- Then display the compact status header: `Peaks Skill: peaks-solo | Gate: startup | Next: <one short action>`. Display this header on EVERY turn while the skill is active.
77
+ Then display the compact status header: `Peaks-Cli Skill: peaks-solo | Peaks-Cli Gate: startup | Next: <one short action>`. Display this header on EVERY turn while the skill is active.
78
78
 
79
- Update with `peaks skill presence:set peaks-solo --mode <mode> --gate <gate>` when gates change. When the workflow ends, run `peaks skill presence:clear`.
79
+ Update with `peaks skill presence:set peaks-solo --mode <mode> --gate <gate>` when gates change. The presence file persists across the full workflow lifecycle do NOT clear it at workflow end.
80
80
 
81
81
  ## Boundaries
82
82
 
83
- Peaks Solo may:
83
+ Peaks-Cli Solo may:
84
84
 
85
85
  - identify scenarios such as refactor, bugfix, QA hardening, release validation, and incident response;
86
86
  - recommend Solo, Assisted, Swarm, or Strict profiles;
87
- - coordinate Peaks role skills through artifacts;
87
+ - coordinate Peaks-Cli role skills through artifacts;
88
88
  - coordinate project memory extraction from stable skill artifact sections;
89
89
  - request user confirmation at risk and commit boundaries;
90
90
  - read CLI doctor/profile/artifact reports.
91
91
 
92
- Peaks Solo must not silently:
92
+ Peaks-Cli Solo must not silently:
93
93
 
94
94
  - install hooks;
95
95
  - create agents;
@@ -98,19 +98,19 @@ Peaks Solo must not silently:
98
98
  - create GitHub repositories;
99
99
  - bypass role-skill artifacts.
100
100
 
101
- Use the Peaks CLI for runtime side effects.
101
+ Use the Peaks-Cli CLI for runtime side effects.
102
102
 
103
- ## GStack integration
103
+ ## Peaks-Cli GStack integration
104
104
 
105
- Map gstack stages to Peaks role artifacts; preserve Peaks confirmation gates. Do not delegate orchestration to gstack commands.
105
+ Map gstack stages to Peaks-Cli role artifacts; preserve Peaks-Cli confirmation gates. Do not delegate orchestration to gstack commands.
106
106
 
107
107
  For frontend workflows, RD and QA must use Playwright MCP (`mcp__playwright__` tool namespace) for real browser E2E (`peaks mcp plan/apply --capability playwright-mcp.browser-validation --yes`). 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`.
108
108
 
109
- ## Local intermediate artifact workspace (MANDATORY)
109
+ ## Peaks-Cli Local intermediate artifact workspace (MANDATORY)
110
110
 
111
111
  ### Workspace initialization gate
112
112
 
113
- Before ANY role handoff or artifact write, Peaks Solo MUST create the workspace. Session IDs are now **auto-generated** with the format `YYYY-MM-DD-session-<6位hex>` (e.g. `2026-05-26-session-a3f8b1`). The user does not provide a session ID — the system creates and persists it in `.peaks/.session.json`.
113
+ Before ANY role handoff or artifact write, Peaks-Cli Solo MUST create the workspace. Session IDs are now **auto-generated** with the format `YYYY-MM-DD-session-<6位hex>` (e.g. `2026-05-26-session-a3f8b1`). The user does not provide a session ID — the system creates and persists it in `.peaks/.session.json`.
114
114
 
115
115
  When `peaks workspace init` is run without `--session-id`, it automatically generates a new session ID using today's date and a random hex suffix. If `.peaks/.session.json` already exists with a valid session, the existing session is reused.
116
116
 
@@ -149,7 +149,7 @@ Files written into these directories during the workflow (not pre-created — th
149
149
 
150
150
  ### Root pollution prohibition (CRITICAL)
151
151
 
152
- **NEVER write Peaks intermediate artifacts to the project root directory.** Specifically prohibited at root level:
152
+ **NEVER write Peaks-Cli intermediate artifacts to the project root directory.** Specifically prohibited at root level:
153
153
 
154
154
  - PRD snapshots, document extracts, or requirement notes (`feishu-doc-*.md`, `*-snapshot.md`, etc.)
155
155
  - RD tech docs, scan reports, slice specs, or architecture notes
@@ -166,7 +166,7 @@ If you are about to Write/Edit an intermediate artifact in the project root, STO
166
166
 
167
167
  Do not default to git-backed storage or automatic commits for intermediate artifacts. Git inclusion or sync requires explicit user confirmation or an active profile that authorizes it.
168
168
 
169
- ## Pre-RD project scan checklist (MANDATORY)
169
+ ## Peaks-Cli Pre-RD project scan checklist (MANDATORY)
170
170
 
171
171
  Before handing off to `peaks-rd`, scan the project and record findings to `.peaks/<session-id>/rd/project-scan.md`. RD and UI roles read this before starting work. **project-scan.md is a session-scoped singleton** — check if it already exists before regenerating (e.g. via `ls .peaks/<session-id>/rd/project-scan.md`). If it exists and is complete (has `## Archetype` and `## Project mode` sections), reuse it. Only regenerate if missing or incomplete.
172
172
 
@@ -296,7 +296,7 @@ Grep `src/` for outdated patterns and list them as constraints in `project-scan.
296
296
  - <bullet list of legacy signals from section 5; empty for greenfield>
297
297
  ```
298
298
 
299
- ## Frontend-only development mode
299
+ ## Peaks-Cli Frontend-only development mode
300
300
 
301
301
  When the project has no live backend (no swagger.json, no API server), Solo must activate frontend-only mode.
302
302
 
@@ -368,7 +368,7 @@ When the PRD source is a Feishu/Lark document that requires authentication:
368
368
 
369
369
  Never silently fall back to unauthenticated `fetch` or `WebFetch` for authenticated documents.
370
370
 
371
- ## Request type classification (MANDATORY before `peaks request init`)
371
+ ## Peaks-Cli Request type classification (MANDATORY before `peaks request init`)
372
372
 
373
373
  Before initializing any role artifact, classify the request into exactly one of six types. The choice drives RD/QA gate strictness (see "Mandatory RD QA repair loop"). Pick the **primary intent** — if a request could fit two types, the higher-strictness one wins.
374
374
 
@@ -385,34 +385,34 @@ Before initializing any role artifact, classify the request into exactly one of
385
385
 
386
386
  For ambiguous cases (e.g. "improve login flow"), ask the user to clarify before initializing. The cost of one `AskUserQuestion` round is much lower than running the wrong gate matrix for the whole workflow.
387
387
 
388
- When Peaks Solo coordinates development in a code repository, keep this order explicit:
388
+ When Peaks-Cli Solo coordinates development in a code repository, keep this order explicit:
389
389
 
390
- 0. **Snapshot** — `peaks doctor` + `peaks project dashboard` to capture baseline state before anything else;
391
- 0.5. **Workspace initialization** — `.peaks/<session-id>/` created, directory structure verified;
392
- 0.6. **Project scan** — archetype, component library, CSS framework, build tool, state management, routing, data fetching, legacy signals detected and recorded to `.peaks/<session-id>/rd/project-scan.md`;
393
- 0.7. **Existing-system extraction** (MANDATORY when archetype ∈ {legacy-frontend, legacy-fullstack, frontend-monorepo}; SKIP for greenfield) — extract visual tokens and code conventions from the live codebase to `.peaks/<session-id>/system/existing-system.md`. The path lives under `system/` (not `ui/`) because the file also records non-UI conventions (service-layer signatures, hooks, naming) that backend-only or legacy-fullstack work consumes. See `references/existing-system-extraction.md`. UI design-draft and RD implementation MUST treat the extracted tokens and conventions as hard constraints;
394
- 1. **Standards preflight** — `peaks standards init/update --dry-run`, must reference concrete project-scan findings (never emit generic templates);
395
- 2. **PRD phase** — capture request as canonical artifact, extract scope and acceptance criteria:
390
+ 0. **Peaks-Cli Snapshot** — `peaks doctor` + `peaks project dashboard` to capture baseline state before anything else;
391
+ 0.5. **Peaks-Cli Workspace initialization** — `.peaks/<session-id>/` created, directory structure verified;
392
+ 0.6. **Peaks-Cli Project scan** — archetype, component library, CSS framework, build tool, state management, routing, data fetching, legacy signals detected and recorded to `.peaks/<session-id>/rd/project-scan.md`;
393
+ 0.7. **Peaks-Cli Existing-system extraction** (MANDATORY when archetype ∈ {legacy-frontend, legacy-fullstack, frontend-monorepo}; SKIP for greenfield) — extract visual tokens and code conventions from the live codebase to `.peaks/<session-id>/system/existing-system.md`. The path lives under `system/` (not `ui/`) because the file also records non-UI conventions (service-layer signatures, hooks, naming) that backend-only or legacy-fullstack work consumes. See `references/existing-system-extraction.md`. UI design-draft and RD implementation MUST treat the extracted tokens and conventions as hard constraints;
394
+ 1. **Peaks-Cli Standards preflight** — `peaks standards init/update --dry-run`, must reference concrete project-scan findings (never emit generic templates);
395
+ 2. **Peaks-Cli PRD phase** — capture request as canonical artifact, extract scope and acceptance criteria:
396
396
  - Full-auto/Swarm: auto-transition to `confirmed-by-user` once the artifact is complete;
397
397
  - Assisted/Strict: pause with `AskUserQuestion` for explicit user confirmation before proceeding;
398
- 3. **Swarm parallel phase** — after PRD confirmed, launch UI, RD(planning), QA(test-cases) simultaneously:
398
+ 3. **Peaks-Cli Swarm parallel phase** — after PRD confirmed, launch UI, RD(planning), QA(test-cases) simultaneously:
399
399
  3a. UI design draft and visual direction (MANDATORY when request is frontend/user-visible; skipped for `--type docs|chore|config` or pure-backend requests);
400
400
  3b. RD planning artifact — `rd/tech-doc.md` for feature/refactor, `rd/bug-analysis.md` for bugfix, skipped for docs/chore/config;
401
401
  3c. QA test-case generation (skipped for docs/chore — no acceptance surface to validate);
402
- 4. **RD implementation** — consumes the type-appropriate inputs: project-scan + standards + (if UI involved) UI design-draft + RD planning artifact + QA test-cases. Includes unit tests for new/changed behavior (TDD) unless `--type` is docs/chore;
403
- 5. **Code review + security review** — CRITICAL/HIGH issues fixed before progression; marked-blocked issues only allow a blocked handoff;
404
- 6. **QA validation** (auto-proceed from RD in full-auto) — execute test cases + API checks + Playwright MCP headed browser E2E for frontend + security/perf checks + test report;
405
- 7. **RD↔QA repair loop** — if QA verdict is `return-to-rd`, loop back to step 4 (RD implementation) and re-run through QA; max 3 repair cycles, then emit blocked TXT regardless;
406
- 8. **SC phase** — change-control evidence: impact, retention, validate, boundary;
407
- 9. **OpenSpec archive** — exit gate: validate → archive only after QA verdict=pass (when `openspec/` exists);
408
- 10. **TXT handoff capsule** — mode, validated decisions, artifact paths, standards deltas, open questions, next action;
409
- 11. **Final snapshot** — `peaks project dashboard` + `peaks skill doctor` to confirm the workflow closed cleanly.
402
+ 4. **Peaks-Cli RD implementation** — consumes the type-appropriate inputs: project-scan + standards + (if UI involved) UI design-draft + RD planning artifact + QA test-cases. Includes unit tests for new/changed behavior (TDD) unless `--type` is docs/chore;
403
+ 5. **Peaks-Cli Code review + security review** — CRITICAL/HIGH issues fixed before progression; marked-blocked issues only allow a blocked handoff;
404
+ 6. **Peaks-Cli QA validation** (auto-proceed from RD in full-auto) — execute test cases + API checks + Playwright MCP headed browser E2E for frontend + security/perf checks + test report;
405
+ 7. **Peaks-Cli RD↔QA repair loop** — if QA verdict is `return-to-rd`, loop back to step 4 (RD implementation) and re-run through QA; max 3 repair cycles, then emit blocked TXT regardless;
406
+ 8. **Peaks-Cli SC phase** — change-control evidence: impact, retention, validate, boundary;
407
+ 9. **Peaks-Cli OpenSpec archive** — exit gate: validate → archive only after QA verdict=pass (when `openspec/` exists);
408
+ 10. **Peaks-Cli TXT handoff capsule** — mode, validated decisions, artifact paths, standards deltas, open questions, next action;
409
+ 11. **Peaks-Cli Final snapshot** — `peaks project dashboard` + `peaks skill doctor` to confirm the workflow closed cleanly.
410
410
 
411
- ### Transition verification gates (MANDATORY — run the command, see the output)
411
+ ### Peaks-Cli Transition verification gates (MANDATORY — run the command, see the output)
412
412
 
413
413
  You cannot declare a phase complete from memory. Each gate below is a `ls` command you **MUST run** and whose output you **MUST see** before proceeding. If any file shows "No such file", the phase is incomplete.
414
414
 
415
- **Gate A — After workspace init + project scan:**
415
+ **Peaks-Cli Gate A — After workspace init + project scan:**
416
416
  ```bash
417
417
  ls .peaks/<id>/rd/project-scan.md
418
418
  # Expected output: .peaks/<id>/rd/project-scan.md
@@ -421,7 +421,7 @@ ls .peaks/<id>/rd/project-scan.md
421
421
  # File present and complete → reuse (project-scan is a session-scoped singleton)
422
422
  ```
423
423
 
424
- **Gate A.5 — Existing-system extraction (legacy projects only):**
424
+ **Peaks-Cli Gate A.5 — Existing-system extraction (legacy projects only):**
425
425
  ```bash
426
426
  # If project-scan.md `## Archetype` is greenfield → skip this gate
427
427
  # Otherwise:
@@ -430,9 +430,9 @@ ls .peaks/<id>/system/existing-system.md
430
430
  # (see references/existing-system-extraction.md)
431
431
  ```
432
432
 
433
- **Gate B — After swarm convergence (UI + RD planning + QA test-cases):**
433
+ **Peaks-Cli Gate B — After swarm convergence (UI + RD planning + QA test-cases):**
434
434
 
435
- Gate B has two sub-checks: a HARD gate (blocks progression) and an INFORMATIONAL check (records degradation but does not block).
435
+ Peaks-Cli Gate B has two sub-checks: a HARD gate (blocks progression) and an INFORMATIONAL check (records degradation but does not block).
436
436
 
437
437
  ```bash
438
438
  # B.hard — REQUIRED before continuing to RD implementation.
@@ -458,7 +458,7 @@ ls .peaks/<id>/ui/design-draft.md 2>&1
458
458
  # "No such file" + pure backend / docs / chore / config → state skip reason in TXT, proceed.
459
459
  ```
460
460
 
461
- **Gate C — After RD implementation (before QA handoff):**
461
+ **Peaks-Cli Gate C — After RD implementation (before QA handoff):**
462
462
 
463
463
  The CLI gate (`peaks request transition --state qa-handoff`) is the authoritative check; running this `ls` first lets you produce missing files before the CLI rejects the transition.
464
464
 
@@ -474,7 +474,7 @@ ls .peaks/<id>/rd/requests/<rid>.md
474
474
  # Missing any required file → DO NOT attempt the qa-handoff transition; CLI will reject with PREREQUISITES_MISSING.
475
475
  ```
476
476
 
477
- **Gate D — After QA validation:**
477
+ **Peaks-Cli Gate D — After QA validation:**
478
478
 
479
479
  The CLI gate at `qa:verdict-issued` is the authoritative check; this `ls` lets you produce missing evidence before the CLI rejects the transition.
480
480
 
@@ -490,17 +490,17 @@ ls .peaks/<id>/qa/requests/<rid>.md
490
490
  # Missing required file → QA incomplete; do not transition to verdict-issued.
491
491
  ```
492
492
 
493
- **Gate E — Before declaring workflow complete:**
493
+ **Peaks-Cli Gate E — Before declaring workflow complete:**
494
494
  ```bash
495
495
  find .peaks/<id>/ -type f | sort
496
496
  # Verify: files from gates A-D all appear in this list.
497
497
  # Any mandatory file missing → NOT complete. Do not emit TXT.
498
- # Gate G (CLAUDE.md + .claude/rules/**) must ALSO pass before TXT is emitted.
498
+ # Peaks-Cli Gate G (CLAUDE.md + .claude/rules/**) must ALSO pass before TXT is emitted.
499
499
  ```
500
500
 
501
- **Gate F — Root pollution check (BLOCKING before completion):**
501
+ **Peaks-Cli Gate F — Root pollution check (BLOCKING before completion):**
502
502
  ```bash
503
- # Verify no Peaks intermediate artifacts leaked to project root.
503
+ # Verify no Peaks-Cli intermediate artifacts leaked to project root.
504
504
  ls feishu-doc-*.md *-snapshot.md qa-server.js 2>&1
505
505
  # Expected: "No such file or directory" for ALL patterns.
506
506
  # Any file found → ROOT POLLUTION. Move it to .peaks/<id>/prd/source/
@@ -511,11 +511,11 @@ ls feishu-doc-*.md *-snapshot.md qa-server.js 2>&1
511
511
  ```bash
512
512
  # Extended check for common leak patterns
513
513
  find . -maxdepth 1 -name "*.png" -o -name "*.jpg" -o -name "qa-*.js" -o -name "mock-server.*" 2>&1
514
- # Any Peaks QA/UI intermediate files here → ROOT POLLUTION. Move and note.
515
- # Legitimate project files (e.g. favicon.png) are fine — only move Peaks artifacts.
514
+ # Any Peaks-Cli QA/UI intermediate files here → ROOT POLLUTION. Move and note.
515
+ # Legitimate project files (e.g. favicon.png) are fine — only move Peaks-Cli artifacts.
516
516
  ```
517
517
 
518
- **Gate G — Project standards present (BLOCKING before workflow completion):**
518
+ **Peaks-Cli Gate G — Project standards present (BLOCKING before workflow completion):**
519
519
  ```bash
520
520
  # After `peaks standards init/update --apply`, verify the files actually landed
521
521
  # at the project root. The CLAUDE.md and rules files are required so that
@@ -529,15 +529,15 @@ ls <repo>/.claude/rules/common/coding-style.md \
529
529
  <repo>/.claude/rules/common/security.md
530
530
  # Any "No such file" → BLOCKED. The standards apply step did not complete; re-run
531
531
  # standards init/update with --apply and re-verify.
532
- # Skipping Gate G (e.g. because the user did not explicitly authorize writes) is
532
+ # Skipping Peaks-Cli Gate G (e.g. because the user did not explicitly authorize writes) is
533
533
  # only acceptable in `assisted`/`strict` modes where the user actively declined; in
534
534
  # `full-auto`/`swarm` the absence of these files is a workflow violation.
535
535
  ```
536
536
 
537
537
 
538
- ## Swarm parallel phase
538
+ ## Peaks-Cli Swarm parallel phase
539
539
 
540
- After PRD reaches `confirmed-by-user`, Solo launches peaks-ui, peaks-rd(planning), and peaks-qa(test-cases) simultaneously using parallel Agent calls. All three derive independently from the same PRD and write to separate artifact paths. Solo waits for all three, checks convergence (Gate B), then enters RD implementation.
540
+ After PRD reaches `confirmed-by-user`, Solo launches peaks-ui, peaks-rd(planning), and peaks-qa(test-cases) simultaneously using parallel Agent calls. All three derive independently from the same PRD and write to separate artifact paths. Solo waits for all three, checks convergence (Peaks-Cli Gate B), then enters RD implementation.
541
541
 
542
542
  ### Degradation when swarm roles fail
543
543
 
@@ -547,9 +547,9 @@ After PRD reaches `confirmed-by-user`, Solo launches peaks-ui, peaks-rd(planning
547
547
  4. **Two or more missing**: Fall back to sequential mode (PRD → RD → QA); note "swarm-degraded-to-sequential".
548
548
  5. **All three missing**: Pause workflow; report to user; request confirmation to continue.
549
549
 
550
- **UI phase mandatory for frontend**: When the request affects user-visible behavior (pages, components, forms, modals, tables, styling, interaction, or layout), Peaks Solo MUST invoke `peaks-ui` in the swarm parallel phase alongside RD planning and QA test-case generation. UI produces design drafts that RD implementation later consumes. Skipping UI for frontend work is a blocking violation. The only valid reason to skip UI is when the request is purely backend (API, database, CLI, config, or build tooling).
550
+ **UI phase mandatory for frontend**: When the request affects user-visible behavior (pages, components, forms, modals, tables, styling, interaction, or layout), Peaks-Cli Solo MUST invoke `peaks-ui` in the swarm parallel phase alongside RD planning and QA test-case generation. UI produces design drafts that RD implementation later consumes. Skipping UI for frontend work is a blocking violation. The only valid reason to skip UI is when the request is purely backend (API, database, CLI, config, or build tooling).
551
551
 
552
- ## Mandatory RD QA repair loop (AUTO-PROCEED)
552
+ ## Peaks-Cli Mandatory RD QA repair loop (AUTO-PROCEED)
553
553
 
554
554
  > **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`):
555
555
  >
@@ -560,7 +560,7 @@ After PRD reaches `confirmed-by-user`, Solo launches peaks-ui, peaks-rd(planning
560
560
  >
561
561
  > 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.
562
562
 
563
- After `peaks-rd` finishes any implementation, repair, or code-output slice, Peaks 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.
563
+ After `peaks-rd` finishes any implementation, repair, or code-output slice, Peaks-Cli 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.
564
564
 
565
565
  **How Solo invokes another role skill (mechanism, not metaphor):**
566
566
 
@@ -591,25 +591,25 @@ When `peaks-qa` returns `verdict=return-to-rd`, Solo does NOT manually rewrite R
591
591
 
592
592
  In full-auto mode, treat the RD↔QA repair loop as a built-in controller objective: loop through RD→QA until all acceptance items pass (max 3 cycles). Do not exit the loop on a non-passing QA verdict unless the TXT handoff marks the workflow as blocked.
593
593
 
594
- ## Default runbook
594
+ ## Peaks-Cli Default runbook
595
595
 
596
596
  > **Maintenance**: The numbered workflow list above (steps 0-11) is the canonical phase sequence. This runbook is the executable CLI transcription. When updating this skill, keep both in lockstep — a change to one must be reflected in the other.
597
597
 
598
598
  The end-to-end CLI sequence for the `full-auto` profile. `assisted` and `strict` profiles pause at `[CONFIRM]` markers below. `full-auto` and `swarm` auto-proceed through all gates. See Transition Gates for artifact verification at each stage.
599
599
 
600
600
  ```bash
601
- # 0. Snapshot + 0.5 Workspace + 0.6 Project scan + 0.7 Existing-system extraction
601
+ # 0. Peaks-Cli Snapshot + 0.5 Peaks-Cli Workspace + 0.6 Peaks-Cli Project scan + 0.7 Peaks-Cli Existing-system extraction
602
602
  peaks doctor --json
603
603
  peaks project dashboard --project <repo> --json
604
604
  peaks skill runbook peaks-solo --json
605
605
  peaks workspace init --project <repo> --json
606
606
  peaks scan archetype --project <repo> --json
607
- # → copy archetype, frontendOnly, signals into .peaks/<session-id>/rd/project-scan.md (Gate A)
607
+ # → copy archetype, frontendOnly, signals into .peaks/<session-id>/rd/project-scan.md (Peaks-Cli Gate A)
608
608
  # → if archetype != greenfield AND archetype != unknown:
609
609
  peaks scan existing-system --project <repo> --json
610
- # → copy tokens, sources, conventions, inconsistencies into .peaks/<session-id>/system/existing-system.md (Gate A.5)
610
+ # → copy tokens, sources, conventions, inconsistencies into .peaks/<session-id>/system/existing-system.md (Peaks-Cli Gate A.5)
611
611
 
612
- # 1. Standards preflight + apply
612
+ # 1. Peaks-Cli Standards preflight + apply
613
613
  # Run dry-run first to inspect deltas, then APPLY. In full-auto and swarm modes,
614
614
  # --apply is the default — Standards files (CLAUDE.md, .claude/rules/**) live INSIDE
615
615
  # the target project and are required for downstream skill preflight, so producing
@@ -619,9 +619,9 @@ peaks standards init --project <repo> --dry-run --json
619
619
  # or: peaks standards update --project <repo> --dry-run --json
620
620
  peaks standards init --project <repo> --apply --json
621
621
  # or: peaks standards update --project <repo> --apply --json
622
- # After apply, verify the files actually exist on disk (see Gate G).
622
+ # After apply, verify the files actually exist on disk (see Peaks-Cli Gate G).
623
623
 
624
- # 2. PRD (Assisted/Strict: [CONFIRM] before confirmed-by-user)
624
+ # 2. Peaks-Cli PRD (Assisted/Strict: [CONFIRM] before confirmed-by-user)
625
625
  # Classify the request type from the PRD: feature | bugfix | refactor | docs | config | chore
626
626
  # This drives RD/QA gate strictness — see "Mandatory RD QA repair loop" for the matrix.
627
627
  peaks request init --role prd --id <rid> --project <repo> --apply --type <type> --json
@@ -635,7 +635,7 @@ peaks request lint <rid> --role prd --project <repo> --json
635
635
  peaks request transition <rid> --role prd --state confirmed-by-user --project <repo> --json
636
636
  peaks request transition <rid> --role prd --state handed-off --project <repo> --json
637
637
 
638
- # 3. Swarm parallel — launch UI + RD(planning) + QA(test-cases) simultaneously
638
+ # 3. Peaks-Cli Swarm parallel — launch UI + RD(planning) + QA(test-cases) simultaneously
639
639
  # Pass the same --type chosen for PRD so RD/QA gate matrix lines up.
640
640
  peaks request init --role ui --id <rid> --project <repo> --apply --type <type> --json
641
641
  peaks request transition <rid> --role ui --state direction-locked --project <repo> --json
@@ -643,23 +643,23 @@ peaks request transition <rid> --role ui --state handed-off --project <repo> --j
643
643
  peaks request init --role rd --id <rid> --project <repo> --apply --type <type> --json
644
644
  peaks request transition <rid> --role rd --state spec-locked --project <repo> --json
645
645
  peaks request init --role qa --id <rid> --project <repo> --apply --type <type> --json
646
- # → Gate B convergence check. Assisted/Strict: [CONFIRM]
646
+ # → Peaks-Cli Gate B convergence check. Assisted/Strict: [CONFIRM]
647
647
 
648
- # 4. RD planning artifact (the file required by the prerequisite gate)
648
+ # 4. Peaks-Cli RD planning artifact (the file required by the prerequisite gate)
649
649
  # feature / refactor → write .peaks/<id>/rd/tech-doc.md
650
650
  # bugfix → write .peaks/<id>/rd/bug-analysis.md
651
651
  # config → no planning artifact required at this state
652
652
  # docs / chore → no planning artifact required
653
653
  peaks request transition <rid> --role rd --state implemented --project <repo> --json
654
654
 
655
- # 5. Code review + security review BEFORE qa-handoff transition.
655
+ # 5. Peaks-Cli Code review + security review BEFORE qa-handoff transition.
656
656
  # Produce the evidence files the CLI gate enforces:
657
657
  # - .peaks/<id>/rd/code-review.md (CRITICAL/HIGH findings + fixes; required for feature/bugfix/refactor)
658
658
  # - .peaks/<id>/rd/security-review.md (required for feature/bugfix/refactor/config)
659
659
  # Then transition. If --type is docs/chore the gate is empty and the transition is unguarded.
660
660
  peaks request transition <rid> --role rd --state qa-handoff --project <repo> --json
661
661
 
662
- # 6. QA validation (AUTO-PROCEED from RD in full-auto)
662
+ # 6. Peaks-Cli QA validation (AUTO-PROCEED from RD in full-auto)
663
663
  # Before each QA transition, produce the evidence files the CLI gate enforces:
664
664
  # Before qa:running → .peaks/<id>/qa/test-cases/<rid>.md
665
665
  peaks request transition <rid> --role qa --state running --project <repo> --json
@@ -667,9 +667,9 @@ peaks request transition <rid> --role qa --state running --project <repo> --json
667
667
  # + .peaks/<id>/qa/security-findings.md
668
668
  # + .peaks/<id>/qa/performance-findings.md (feature/refactor only)
669
669
  peaks request transition <rid> --role qa --state verdict-issued --project <repo> --json
670
- # → Gate D check. Assisted/Strict: [CONFIRM]
670
+ # → Peaks-Cli Gate D check. Assisted/Strict: [CONFIRM]
671
671
 
672
- # 7. RD↔QA repair loop — if verdict is return-to-rd, re-run 4 through 6 until QA passes or blocked TXT.
672
+ # 7. Peaks-Cli RD↔QA repair loop — if verdict is return-to-rd, re-run 4 through 6 until QA passes or blocked TXT.
673
673
  # Before invoking peaks-rd again, check the cycle count so you don't blow past the cap silently:
674
674
  peaks request repair-status <rid> --project <repo> --json
675
675
  # → atCap=true → STOP and emit a blocked TXT handoff. Do NOT enter another cycle.
@@ -679,35 +679,34 @@ peaks request repair-status <rid> --project <repo> --json
679
679
  peaks scan request-type-sanity --project <repo> --type <type> --json
680
680
  # → consistent=false → RD scope-creeped during repair; review before re-handoff.
681
681
 
682
- # 8. SC phase
682
+ # 8. Peaks-Cli SC phase
683
683
  peaks sc impact --change-id <cid> --module <module> --file <path> --json
684
684
  peaks sc retention --slice-id <rid> --prd <prd> --rd <rd> --qa <qa> --json
685
685
  peaks sc validate --slice-id <rid> --json
686
686
  peaks sc boundary --slice-id <rid> --artifact <artifact> --code <file> --json
687
687
 
688
- # 9. OpenSpec archive (exit gate; only after QA pass, when openspec/ exists)
688
+ # 9. Peaks-Cli OpenSpec archive (exit gate; only after QA pass, when openspec/ exists)
689
689
  peaks openspec validate <cid> --project <repo> --json
690
690
  peaks openspec archive <cid> --project <repo> --apply --json
691
691
 
692
- # 10. TXT handoff
692
+ # 10. Peaks-Cli TXT handoff
693
693
  peaks memory extract --project <repo> --artifact <qa-artifact> --dry-run --json
694
694
 
695
- # 11. Final snapshot
695
+ # 11. Peaks-Cli Final snapshot
696
696
  peaks project dashboard --project <repo> --json
697
697
  peaks skill doctor --json
698
- peaks skill presence:clear
699
698
  ```
700
699
 
701
700
  Repair loop details: see `## Mandatory RD QA repair loop` above for the full 5-step procedure and the 3-cycle cap. Append transition notes via `--reason` rather than rewriting artifacts during repair cycles.
702
701
 
703
- ## Project standards preflight
702
+ ## Peaks-Cli Project standards preflight
704
703
 
705
- Before orchestrating an end-to-end code repository workflow, gather the project standards preflight status from RD and QA by calling the Peaks CLI:
704
+ Before orchestrating an end-to-end code repository workflow, gather the project standards preflight status from RD and QA by calling the Peaks-Cli CLI:
706
705
 
707
706
  - `peaks standards init --project <path> --dry-run`
708
707
  - `peaks standards update --project <path> --dry-run`
709
708
 
710
- Use `standards init` for first-time creation and `standards update` for existing `CLAUDE.md` append/review behavior. In `full-auto` and `swarm` profiles, `--apply` runs automatically after `--dry-run` succeeds — these files live inside the target project, are required for downstream skill preflight, and producing them is part of finishing the workflow (Gate G enforces this). `assisted` and `strict` profiles pause for explicit user confirmation between dry-run and apply.
709
+ Use `standards init` for first-time creation and `standards update` for existing `CLAUDE.md` append/review behavior. In `full-auto` and `swarm` profiles, `--apply` runs automatically after `--dry-run` succeeds — these files live inside the target project, are required for downstream skill preflight, and producing them is part of finishing the workflow (Peaks-Cli Gate G enforces this). `assisted` and `strict` profiles pause for explicit user confirmation between dry-run and apply.
711
710
 
712
711
  **CRITICAL — Standards must reflect the project scan.** When generating or updating `CLAUDE.md`, the content must reference concrete findings from `.peaks/<id>/rd/project-scan.md`: the detected component library (e.g. "This project uses antd 5.x"), CSS solution (e.g. "Uses Less via Umi"), build tool, state management, and routing. Never emit a generic template that says "read .claude/rules/..." without naming the actual project stack. If the project-scan has not been run yet, run it before standards init/update.
713
712
 
@@ -724,7 +723,7 @@ For project-analysis requests such as "分析项目", the handoff must include a
724
723
 
725
724
  If the dry-run output lacks enough detail to explain those deltas, say that the standards increment is unknown and keep standards application blocked until another `peaks standards init/update --dry-run` provides evidence.
726
725
 
727
- ## Refactor mode
726
+ ## Peaks-Cli Refactor mode
728
727
 
729
728
  Read `references/refactor-mode.md` before handling refactor requests.
730
729
 
@@ -740,7 +739,7 @@ It must enforce the shared refactor red lines:
740
739
  6. require 100% acceptance for each slice;
741
740
  7. require code changes and sanitized intermediate artifacts to be traceable in local `.peaks/<session-id>/` storage before the next slice; commit or sync sanitized artifacts only when explicitly authorized.
742
741
 
743
- ## Quality-gate commands (CLI cheat sheet)
742
+ ## Peaks-Cli Quality-gate commands (CLI cheat sheet)
744
743
 
745
744
  These commands harden the workflow against silent skips. Use them in the runbook at the points indicated; they all support `--json` and `--session-id`.
746
745
 
@@ -752,23 +751,27 @@ These commands harden the workflow against silent skips. Use them in the runbook
752
751
 
753
752
  Together with `peaks request transition` (which already CLI-enforces per-type artifact prerequisites), these four commands form the runtime quality net. SKILL.md prose is descriptive; the CLI is what physically blocks bad workflows.
754
753
 
755
- ## Completion handoff
754
+ ## Peaks-Cli Completion handoff
756
755
 
757
756
  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.
758
757
 
759
- Use Peaks 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.
758
+ Use Peaks-Cli 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.
760
759
 
761
- ## External references and lifecycle
760
+ ### Workflow completion (no auto-exit)
761
+
762
+ Do NOT call `peaks skill presence:clear` at workflow end. The presence file and header remain active so the user stays inside the workflow context. The user can continue with follow-up requirements naturally — no need to re-invoke `/peaks-solo`. The header continues to display the active skill and current gate.
763
+
764
+ ## Peaks-Cli External references and lifecycle
762
765
 
763
766
  **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.
764
767
 
765
- ## Codegraph orchestration context
768
+ ## Peaks-Cli Codegraph orchestration context
766
769
 
767
770
  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.
768
771
 
769
- Do not run upstream installer flows, mutate agent settings, or commit `.codegraph/` artifacts into git. Peaks gates remain authoritative; codegraph context is a hint, never a substitute for role-skill output.
772
+ Do not run upstream installer flows, mutate agent settings, or commit `.codegraph/` artifacts into git. Peaks-Cli gates remain authoritative; codegraph context is a hint, never a substitute for role-skill output.
770
773
 
771
- **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 CLI for all side effects. Do not execute upstream installers, do not install upstream resources, do not persist sensitive examples — Peaks gates remain authoritative. External skills inform, they do not approve.
774
+ **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-Cli CLI for all side effects. Do not execute upstream installers, do not install upstream resources, do not persist sensitive examples — Peaks-Cli gates remain authoritative. External skills inform, they do not approve.
772
775
 
773
776
  **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.
774
777