peaks-cli 1.2.8 → 1.3.0

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.
Files changed (41) hide show
  1. package/README.md +12 -0
  2. package/dist/src/cli/commands/project-commands.js +1 -1
  3. package/dist/src/cli/commands/scan-commands.js +22 -0
  4. package/dist/src/cli/commands/workspace-commands.js +59 -1
  5. package/dist/src/services/memory/project-memory-service.d.ts +1 -1
  6. package/dist/src/services/memory/project-memory-service.js +52 -23
  7. package/dist/src/services/sc/sc-service.d.ts +52 -1
  8. package/dist/src/services/sc/sc-service.js +266 -17
  9. package/dist/src/services/scan/libraries-service.d.ts +24 -0
  10. package/dist/src/services/scan/libraries-service.js +419 -0
  11. package/dist/src/services/scan/libraries-types.d.ts +59 -0
  12. package/dist/src/services/scan/libraries-types.js +9 -0
  13. package/dist/src/services/session/session-manager.d.ts +7 -5
  14. package/dist/src/services/session/session-manager.js +48 -14
  15. package/dist/src/services/skills/skill-presence-service.js +102 -68
  16. package/dist/src/services/skills/skill-runbook-service.js +36 -2
  17. package/dist/src/services/skills/skill-statusline-service.js +13 -7
  18. package/dist/src/services/workflow/autonomous-resume-writer.js +7 -7
  19. package/dist/src/services/workspace/reconcile-service.d.ts +119 -0
  20. package/dist/src/services/workspace/reconcile-service.js +464 -0
  21. package/dist/src/services/workspace/reconcile-types.d.ts +93 -0
  22. package/dist/src/services/workspace/reconcile-types.js +13 -0
  23. package/dist/src/shared/change-id.d.ts +30 -0
  24. package/dist/src/shared/change-id.js +40 -6
  25. package/dist/src/shared/paths.d.ts +1 -1
  26. package/dist/src/shared/paths.js +2 -1
  27. package/dist/src/shared/version.d.ts +1 -1
  28. package/dist/src/shared/version.js +1 -1
  29. package/package.json +4 -1
  30. package/schemas/library-breaking-changes.data.json +141 -0
  31. package/schemas/library-breaking-changes.meta.json +6 -0
  32. package/schemas/library-breaking-changes.schema.json +50 -0
  33. package/skills/peaks-qa/SKILL.md +12 -0
  34. package/skills/peaks-rd/SKILL.md +145 -2
  35. package/skills/peaks-solo/SKILL.md +93 -319
  36. package/skills/peaks-solo/references/runbook.md +168 -0
  37. package/skills/peaks-solo/references/workflow-gates-and-types.md +177 -0
  38. package/skills/peaks-solo-resume/SKILL.md +81 -0
  39. package/skills/peaks-solo-status/SKILL.md +120 -0
  40. package/skills/peaks-solo-test/SKILL.md +84 -0
  41. package/skills/peaks-txt/SKILL.md +8 -5
@@ -0,0 +1,168 @@
1
+ # Peaks-Cli Default Runbook (orchestrator, full-auto profile)
2
+
3
+ > **Maintenance**: The numbered workflow list in `skills/peaks-solo/SKILL.md` (steps 0-11) is the canonical phase sequence. This runbook is the executable CLI transcription. When updating, keep both in lockstep — a change to one must be reflected in the other.
4
+ >
5
+ > **Why this is a reference, not inline**: the runbook is a stable, copy-pasteable shell (~150 lines of bash) that does not change between skill runs. Inlining it bloats the orchestrator skill body past the 800-line cap (per `common/coding-style.md`). Extracting it here keeps SKILL.md focused on flow / decisions / contracts, while the runbook stays as the canonical place for the CLI sequence.
6
+ >
7
+ > **How peaks-cli tooling reads this file**:
8
+ > - `peaks skill runbook peaks-solo` (CLI) reads the `## Default runbook` section in either SKILL.md or `references/runbook.md` (whichever has the bash code).
9
+ > - The test in `tests/unit/skill-default-runbook.test.ts` looks for `## Default runbook` in SKILL.md first, then falls back to `references/runbook.md` here.
10
+
11
+ ## Default runbook
12
+
13
+ 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.
14
+
15
+ ```bash
16
+ # 0. Peaks-Cli Snapshot + 0.5 Peaks-Cli Workspace + 0.6 Peaks-Cli Project scan + 0.7 Peaks-Cli Existing-system extraction
17
+ peaks doctor --json
18
+ peaks project dashboard --project <repo> --json
19
+ peaks skill runbook peaks-solo --json
20
+ peaks workspace init --project <repo> --json
21
+ peaks workspace reconcile --project <repo> --json
22
+ peaks scan archetype --project <repo> --json
23
+ # → copy archetype, frontendOnly, signals into .peaks/<session-id>/rd/project-scan.md (Peaks-Cli Gate A)
24
+ # → copy libraries[] into .peaks/<session-id>/rd/project-scan.md under `## Library versions`
25
+ peaks scan libraries --project <repo> --json
26
+ # → if archetype != greenfield AND archetype != unknown:
27
+ peaks scan existing-system --project <repo> --json
28
+ # → copy tokens, sources, conventions, inconsistencies into .peaks/<session-id>/system/existing-system.md (Peaks-Cli Gate A.5)
29
+
30
+ # 1. Peaks-Cli Standards preflight + apply
31
+ # Run dry-run first to inspect deltas, then APPLY. In full-auto and swarm modes,
32
+ # --apply is the default — Standards files (CLAUDE.md, .claude/rules/**) live INSIDE
33
+ # the target project and are required for downstream skill preflight, so producing
34
+ # them is part of completing the workflow. Assisted/Strict modes pause for [CONFIRM]
35
+ # between dry-run and apply.
36
+ peaks standards init --project <repo> --dry-run --json
37
+ # or: peaks standards update --project <repo> --dry-run --json
38
+ peaks standards init --project <repo> --apply --json
39
+ # or: peaks standards update --project <repo> --apply --json
40
+ # After apply, verify the files actually exist on disk (see Peaks-Cli Gate G).
41
+
42
+ # 2. Peaks-Cli PRD (Assisted/Strict: [CONFIRM] before confirmed-by-user)
43
+ # Classify the request type from the PRD: feature | bugfix | refactor | docs | config | chore
44
+ # This drives RD/QA gate strictness — see "Mandatory RD QA repair loop" for the matrix.
45
+ peaks request init --role prd --id <rid> --project <repo> --apply --type <type> --json
46
+ # Cross-verify the chosen --type against the current git diff (only meaningful if RD has started writing code;
47
+ # safe to run early too, just expect "no changes" rationale until code lands).
48
+ peaks scan request-type-sanity --project <repo> --type <type> --json
49
+ # → consistent=false → re-classify before continuing. consistent=true → proceed.
50
+ # Lint the PRD artifact before transitioning out of draft.
51
+ peaks request lint <rid> --role prd --project <repo> --json
52
+ # → ok=false → fill in <placeholders>, then re-run.
53
+ peaks request transition <rid> --role prd --state confirmed-by-user --project <repo> --json
54
+ peaks request transition <rid> --role prd --state handed-off --project <repo> --json
55
+
56
+ # 3. Peaks-Cli Swarm parallel — sub-agent fan-out (Task tool, NOT Skill tool)
57
+ # Solo computes the swarm plan from --type + frontendOnly + frontend-keyword scan,
58
+ # writes it to .peaks/<sid>/sc/swarm-plan.json, then launches one
59
+ # Task(subagent_type="general-purpose", ...) call per sub-agent in the same message.
60
+ # See "Peaks-Cli Swarm parallel phase" above for the full decision table and the
61
+ # prompt template; the role's required artefact paths are listed there.
62
+ # Hard rule: do NOT call Skill(skill="peaks-rd" | "peaks-qa" | "peaks-ui") from
63
+ # the Swarm phase — that's the v1.x anti-pattern.
64
+ #
65
+ # 3a. Pre-fan-out: Solo initialises every role's request artefact slot in the main
66
+ # loop so sub-agents find a stable rid <-> artefact binding. Each role's
67
+ # sub-agent may also call peaks request init itself (idempotent on the same rid);
68
+ # Solo's call here is the source of truth. Only init roles that are in the
69
+ # swarm plan — roles not in the plan do not get a slot yet.
70
+ peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate swarm-fan-out
71
+ # for each role in swarm-plan.subAgents:
72
+ # peaks request init --role ui --id <rid> --project <repo> --apply --type <type> --json
73
+ # peaks request init --role rd --id <rid> --project <repo> --apply --type <type> --json
74
+ # peaks request init --role qa --id <rid> --project <repo> --apply --type <type> --json
75
+ # e.g. if plan = [ui, rd, qa]: run init for ui, rd, qa.
76
+ # If plan = [rd, qa]: run for rd, qa only.
77
+ # If plan = [] (config|docs|chore skip): no inits here, jump to step 4 directly.
78
+ # 3b. Solo issues N Task(subagent_type="general-purpose", ...) calls in ONE message
79
+ # (N = len(swarm-plan.subAgents)). Each prompt embeds the role's body minus
80
+ # Step 0 / presence, plus the runtime args (rid / sid / mode / type / paths).
81
+ # 3c. After fan-out, Solo restores presence once and runs Gate B (ls checks):
82
+ peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate swarm-converged
83
+ ls .peaks/<sid>/prd/requests/<rid>.md # PRD artefact must exist (Gate B hard)
84
+ # feature / refactor → ls .peaks/<sid>/rd/tech-doc.md
85
+ # bugfix → ls .peaks/<sid>/rd/bug-analysis.md
86
+ ls .peaks/<sid>/qa/test-cases/<rid>.md # QA test-cases (skipped for docs|chore)
87
+ # ui (only when in plan):
88
+ ls .peaks/<sid>/ui/design-draft.md 2>&1 # non-blocking (Gate B info)
89
+ # Apply the degradation rules in the main SKILL.md if any artefact is missing.
90
+ # → Peaks-Cli Gate B convergence check. Assisted/Strict: [CONFIRM]
91
+
92
+ # 4. Peaks-Cli RD planning artifact (the file required by the prerequisite gate)
93
+ # feature / refactor → write .peaks/<id>/rd/tech-doc.md
94
+ # bugfix → write .peaks/<id>/rd/bug-analysis.md
95
+ # config → no planning artifact required at this state
96
+ # docs / chore → no planning artifact required
97
+ peaks request transition <rid> --role rd --state implemented --project <repo> --json
98
+
99
+ # 5. Peaks-Cli Code review + security review BEFORE qa-handoff transition.
100
+ # Produce the evidence files the CLI gate enforces:
101
+ # - .peaks/<id>/rd/code-review.md (CRITICAL/HIGH findings + fixes; required for feature/bugfix/refactor)
102
+ # - .peaks/<id>/rd/security-review.md (required for feature/bugfix/refactor/config)
103
+ # Then transition. If --type is docs/chore the gate is empty and the transition is unguarded.
104
+ peaks request transition <rid> --role rd --state qa-handoff --project <repo> --json
105
+
106
+ # 6. Peaks-Cli QA validation (AUTO-PROCEED from RD in full-auto)
107
+ # Before each QA transition, produce the evidence files the CLI gate enforces:
108
+ # Before qa:running → .peaks/<id>/qa/test-cases/<rid>.md
109
+ peaks request transition <rid> --role qa --state running --project <repo> --json
110
+ # Before qa:verdict-issued → .peaks/<id>/qa/test-reports/<rid>.md
111
+ # + .peaks/<id>/qa/security-findings.md
112
+ # + .peaks/<id>/qa/performance-findings.md (feature/refactor only)
113
+ peaks request transition <rid> --role qa --state verdict-issued --project <repo> --json
114
+ # → Peaks-Cli Gate D check. Assisted/Strict: [CONFIRM]
115
+
116
+ # 7. Peaks-Cli RD↔QA repair loop — if verdict is return-to-rd, re-run 4 through 6 until QA passes or blocked TXT.
117
+ # Before invoking peaks-rd again, check the cycle count so you don't blow past the cap silently:
118
+ peaks request repair-status <rid> --project <repo> --json
119
+ # → atCap=true → STOP and emit a blocked TXT handoff. Do NOT enter another cycle.
120
+ # → remaining > 0 → safe to continue. The next transition's --reason must include "QA return-to-rd cycle N: ..."
121
+ # so this command keeps counting accurately.
122
+ # After RD finishes the repair, re-check that the diff is still consistent with the declared --type:
123
+ peaks scan request-type-sanity --project <repo> --type <type> --json
124
+ # → consistent=false → RD scope-creeped during repair; review before re-handoff.
125
+
126
+ # 8. Peaks-Cli SC phase
127
+ peaks sc impact --change-id <cid> --module <module> --file <path> --json
128
+ peaks sc retention --slice-id <rid> --prd <prd> --rd <rd> --qa <qa> --json
129
+ peaks sc validate --slice-id <rid> --json
130
+ peaks sc boundary --slice-id <rid> --artifact <artifact> --code <file> --json
131
+
132
+ # 9. Peaks-Cli OpenSpec archive (exit gate; only after QA pass, when openspec/ exists)
133
+ peaks openspec validate <cid> --project <repo> --json
134
+ peaks openspec archive <cid> --project <repo> --apply --json
135
+ peaks workspace reconcile --project <repo> --apply --older-than 7
136
+
137
+ # 10. Peaks-Cli TXT handoff — invoke peaks-txt which embeds memory markers and extracts
138
+ # peaks-txt writes the handoff capsule to .peaks/<id>/txt/handoff.md. Inside the
139
+ # capsule body, peaks-txt embeds <!-- peaks-memory:start --> blocks for every
140
+ # stable project fact surfaced this session.
141
+ #
142
+ # 10a. Skill-side scan (do this BEFORE the AskUserQuestion below):
143
+ # grep -n "peaks-memory:start" .peaks/<id>/txt/handoff.md
144
+ # Record the count. This is the skill doing the work, not a CLI command —
145
+ # we deliberately do not ship a `peaks memory scan` because the LLM is
146
+ # the only consumer and the LLM has grep.
147
+
148
+ # 10b. AskUserQuestion (only if 10a returned count >= 1):
149
+ # "The TXT handoff has N peaks-memory:start blocks. Persist to .peaks/memory/?
150
+ # (a) Apply all — `peaks memory extract --project <repo>
151
+ # --artifact .peaks/<id>/txt/handoff.md --apply --json`
152
+ # (b) Apply selectively — re-edit handoff.md first, then re-apply
153
+ # (c) Skip for now — blocks stay in the handoff only, no .peaks/memory/ write"
154
+ # If 10a returned 0 AND the session surfaced a stable project fact
155
+ # (decision / convention / approved refactor), STOP — peaks-txt must go
156
+ # back and embed at least one block before Solo can advance.
157
+
158
+ # 10c. After the user picks (a) or (b), run:
159
+ peaks memory extract --project <repo> --artifact .peaks/<id>/txt/handoff.md --apply --json
160
+ # --apply is REQUIRED to write .peaks/memory/; without it the command only
161
+ # previews. The extract regenerates index.json in the same call.
162
+
163
+ # 11. Peaks-Cli Final snapshot
164
+ peaks project dashboard --project <repo> --json
165
+ peaks skill doctor --json
166
+ ```
167
+
168
+ Repair loop details: see `## Mandatory RD QA repair loop` in SKILL.md for the full 5-step procedure and the 3-cycle cap. Append transition notes via `--reason` rather than rewriting artifacts during repair cycles.
@@ -0,0 +1,177 @@
1
+ # Peaks-Cli Workflow Order + Request Type Classification + Transition Verification Gates
2
+
3
+ > **Maintenance**: This reference holds the canonical contract for (a) how Solo sequences the 11 workflow steps, (b) which `--type` to pass to `peaks request init` for which slice shape, and (c) the executable `ls` / `grep` gate commands that physically block progression. SKILL.md keeps the narrative ("what peaks-solo does"); this file keeps the contract.
4
+ >
5
+ > **Why extracted from SKILL.md**: this content is 165 lines of mostly-tabular + bash-block contract — reference data, not orchestration prose. Inlining it bloats SKILL.md past the 800-line cap (per `common/coding-style.md`). The numbers, gate command shapes, and type-classification rules change rarely; the SKILL.md prose around them (orchestration flow, repair-loop intent, swarm fan-out shape) changes more often.
6
+ >
7
+ > **How peaks-cli tooling reads this file**:
8
+ > - `peaks skill runbook peaks-solo` (CLI) and the in-line LLM reading the SKILL.md should reference this file when the gate-machine or type-classification contract is in play.
9
+ > - The test `tests/unit/skill-default-runbook.test.ts` does NOT check this file (it only checks the runbook). Future tests can add a similar fallback for the gates-and-types contract.
10
+
11
+ ## Peaks-Cli Request type classification (MANDATORY before `peaks request init`)
12
+
13
+ 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.
14
+
15
+ | `--type` | Pick this when the PRD says... | Pick something else when... |
16
+ |---|---|---|
17
+ | `feature` | Add new capability, new page/component/route/API path, new user-facing behavior. Includes "extend X to support Y" when Y is a new code path. | The PRD is fixing an existing broken behavior → `bugfix`. The PRD is reshaping existing code without changing user-visible behavior → `refactor`. |
18
+ | `bugfix` | Fix a specific broken behavior; PRD includes reproduction steps or a defect description; success = "the broken thing now works as it was supposed to". | The "fix" actually adds new capability (validation that didn't exist, a missing field) → `feature`. The "fix" is purely cosmetic and has zero risk → still `bugfix`; do NOT downgrade to `chore`. |
19
+ | `refactor` | Restructure code without changing user-visible behavior. Examples: rename modules, extract shared utilities, migrate a library version with no API surface change, split a monolithic file. PRD mentions coverage targets or "no behavior change". | The refactor incidentally adds or changes user-visible behavior → split into `refactor` + `feature` or pick `feature`. The change is one-line formatting → `chore`. |
20
+ | `config` | Modify config / infrastructure files only: `tsconfig.json`, `eslint`, CI YAML, `package.json` scripts, env defaults, CORS/CSP rules, build config, Docker, deployment manifests. No application source-code changes. | The config change is paired with code changes that consume the new config → `feature` or `refactor` (whichever the code change is). |
21
+ | `docs` | Modify only `*.md` / docs site / inline JSDoc / README. No `.ts` / `.tsx` / `.js` / `.css` / config-file changes. | Any source code change is included → use the type matching the code change. Adding a code example to docs that requires the example to compile → still `docs` if the example is illustrative only. |
22
+ | `chore` | Pure mechanical hygiene: formatter run, lint fix, dependency version bump with no API surface change, dead-code removal of unused files identified by tooling. | The bump changes API behavior or requires consumer migration → `refactor` (or `feature` if it adds capability). Any logic edit → `bugfix` or `refactor`. |
23
+
24
+ **Self-check before locking the type**: read the PRD scope and answer "what is the smallest gate set that still protects users from regression?" — that is the right type. Picking `docs` or `chore` to skip gates when source code is actually changing is a workflow violation and the SC phase will reject it.
25
+
26
+ 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.
27
+
28
+ When Peaks-Cli Solo coordinates development in a code repository, keep this order explicit:
29
+
30
+ 0. **Peaks-Cli Snapshot** — `peaks doctor` + `peaks project dashboard` to capture baseline state before anything else;
31
+ 0.5. **Peaks-Cli Workspace initialization** — `.peaks/<session-id>/` created, directory structure verified;
32
+ 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`;
33
+ 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;
34
+ 1. **Peaks-Cli Standards preflight** — `peaks standards init/update --dry-run`, must reference concrete project-scan findings (never emit generic templates);
35
+ 2. **Peaks-Cli PRD phase** — capture request as canonical artifact, extract scope and acceptance criteria:
36
+ - Full-auto/Swarm: auto-transition to `confirmed-by-user` once the artifact is complete;
37
+ - Assisted/Strict: pause with `AskUserQuestion` for explicit user confirmation before proceeding;
38
+ 3. **Peaks-Cli Swarm parallel phase** — after PRD confirmed, launch UI, RD(planning), QA(test-cases) simultaneously:
39
+ 3a. UI design draft and visual direction (MANDATORY when request is frontend/user-visible; skipped for `--type docs|chore|config` or pure-backend requests);
40
+ 3b. RD planning artifact — `rd/tech-doc.md` for feature/refactor, `rd/bug-analysis.md` for bugfix, skipped for docs/chore/config;
41
+ 3c. QA test-case generation (skipped for docs/chore — no acceptance surface to validate);
42
+ 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;
43
+ 5. **Peaks-Cli Code review + security review** — CRITICAL/HIGH issues fixed before progression; marked-blocked issues only allow a blocked handoff;
44
+ 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;
45
+ 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;
46
+ 8. **Peaks-Cli SC phase** — change-control evidence: impact, retention, validate, boundary;
47
+ 9. **Peaks-Cli OpenSpec archive** — exit gate: validate → archive only after QA verdict=pass (when `openspec/` exists);
48
+ 10. **Peaks-Cli TXT handoff capsule** — mode, validated decisions, artifact paths, standards deltas, open questions, next action;
49
+ 11. **Peaks-Cli Final snapshot** — `peaks project dashboard` + `peaks skill doctor` to confirm the workflow closed cleanly.
50
+
51
+ ### Peaks-Cli Transition verification gates (MANDATORY — run the command, see the output)
52
+
53
+ 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.
54
+
55
+ **Peaks-Cli Gate A — After workspace init + project scan:**
56
+ ```bash
57
+ ls .peaks/<id>/rd/project-scan.md
58
+ # Expected output: .peaks/<id>/rd/project-scan.md
59
+ # "No such file" → STOP, run project scan first
60
+ # File present but missing `## Archetype` or `## Project mode` sections → INCOMPLETE, rerun scan
61
+ # File present and complete → reuse (project-scan is a session-scoped singleton)
62
+ ```
63
+
64
+ **Peaks-Cli Gate A.5 — Existing-system extraction (legacy projects only):**
65
+ ```bash
66
+ # If project-scan.md `## Archetype` is greenfield → skip this gate
67
+ # Otherwise:
68
+ ls .peaks/<id>/system/existing-system.md
69
+ # "No such file" → STOP, run existing-system extraction
70
+ # (see references/existing-system-extraction.md)
71
+ ```
72
+
73
+ **Peaks-Cli Gate B — After swarm convergence (UI + RD planning + QA test-cases):**
74
+
75
+ Peaks-Cli Gate B has two sub-checks: a HARD gate (blocks progression) and an INFORMATIONAL check (records degradation but does not block).
76
+
77
+ ```bash
78
+ # B.hard — REQUIRED before continuing to RD implementation.
79
+ # Missing any of these → STOP, return to the role that owns the file.
80
+
81
+ # Always required (every type):
82
+ ls .peaks/<id>/prd/requests/<rid>.md
83
+
84
+ # Type-specific RD planning artifact:
85
+ # feature / refactor → ls .peaks/<id>/rd/tech-doc.md
86
+ # bugfix → ls .peaks/<id>/rd/bug-analysis.md
87
+ # config / docs / chore → (no RD planning artifact required)
88
+
89
+ # QA test-cases (skipped for docs/chore):
90
+ ls .peaks/<id>/qa/test-cases/<rid>.md
91
+ ```
92
+
93
+ ```bash
94
+ # B.info — NON-BLOCKING. Record degradation in TXT, then proceed.
95
+ ls .peaks/<id>/ui/design-draft.md 2>&1
96
+ # "No such file" + request affects user-visible UI → swarm degradation rule 1 fires:
97
+ # note "ui-design-missing" in TXT, RD continues with PRD visual descriptions.
98
+ # "No such file" + pure backend / docs / chore / config → state skip reason in TXT, proceed.
99
+ ```
100
+
101
+ **Peaks-Cli Gate C — After RD implementation (before QA handoff):**
102
+
103
+ 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.
104
+
105
+ ```bash
106
+ # Always required
107
+ ls .peaks/<id>/rd/requests/<rid>.md
108
+
109
+ # Type-specific RD evidence (must match the type recorded in the artifact body)
110
+ # feature / refactor → ls rd/tech-doc.md rd/code-review.md rd/security-review.md rd/perf-baseline.md qa/test-cases/<rid>.md
111
+ # (qa/test-cases/<rid>.md pre-drafted by the 4th sub-agent in peaks-rd's parallel fan-out — slice 004)
112
+ # bugfix → ls rd/bug-analysis.md rd/code-review.md rd/security-review.md qa/test-cases/<rid>.md
113
+ # (rd/perf-baseline.md only when the bug is performance-shaped)
114
+ # config → ls rd/security-review.md
115
+ # docs / chore → (no extra evidence required)
116
+ # Missing any required file → DO NOT attempt the qa-handoff transition; CLI will reject with PREREQUISITES_MISSING.
117
+ ```
118
+
119
+ **Peaks-Cli Gate D — After QA validation:**
120
+
121
+ The CLI gate at `qa:verdict-issued` is the authoritative check; this `ls` lets you produce missing evidence before the CLI rejects the transition.
122
+
123
+ ```bash
124
+ # Always required
125
+ ls .peaks/<id>/qa/requests/<rid>.md
126
+
127
+ # Type-specific QA evidence
128
+ # feature / refactor → ls qa/test-cases/<rid>.md qa/test-reports/<rid>.md qa/security-findings.md qa/performance-findings.md
129
+ # bugfix → ls qa/test-cases/<rid>.md qa/test-reports/<rid>.md qa/security-findings.md
130
+ # config → ls qa/security-findings.md
131
+ # docs / chore → (no QA evidence files required)
132
+ # Missing required file → QA incomplete; do not transition to verdict-issued.
133
+ ```
134
+
135
+ **Peaks-Cli Gate E — Before declaring workflow complete:**
136
+ ```bash
137
+ find .peaks/<id>/ -type f | sort
138
+ # Verify: files from gates A-D all appear in this list.
139
+ # Any mandatory file missing → NOT complete. Do not emit TXT.
140
+ # Peaks-Cli Gate G (CLAUDE.md + .claude/rules/**) must ALSO pass before TXT is emitted.
141
+ ```
142
+
143
+ **Peaks-Cli Gate F — Root pollution check (BLOCKING before completion):**
144
+ ```bash
145
+ # Verify no Peaks-Cli intermediate artifacts leaked to project root.
146
+ ls feishu-doc-*.md *-snapshot.md qa-server.js 2>&1
147
+ # Expected: "No such file or directory" for ALL patterns.
148
+ # Any file found → ROOT POLLUTION. Move it to .peaks/<id>/prd/source/
149
+ # (for doc snapshots) or .peaks/<id>/qa/ (for QA artifacts).
150
+ # Note the migration in TXT handoff. Do NOT complete the workflow
151
+ # with intermediate artifacts in the project root.
152
+ ```
153
+ ```bash
154
+ # Extended check for common leak patterns
155
+ find . -maxdepth 1 -name "*.png" -o -name "*.jpg" -o -name "qa-*.js" -o -name "mock-server.*" 2>&1
156
+ # Any Peaks-Cli QA/UI intermediate files here → ROOT POLLUTION. Move and note.
157
+ # Legitimate project files (e.g. favicon.png) are fine — only move Peaks-Cli artifacts.
158
+ ```
159
+
160
+ **Peaks-Cli Gate G — Project standards present (BLOCKING before workflow completion):**
161
+ ```bash
162
+ # After `peaks standards init/update --apply`, verify the files actually landed
163
+ # at the project root. The CLAUDE.md and rules files are required so that
164
+ # subsequent peaks-rd / peaks-qa / peaks-solo runs perform the project-local
165
+ # preflight described in CLAUDE.md (read coding-style.md, code-review.md, security.md).
166
+ ls <repo>/CLAUDE.md
167
+ # "No such file" → BLOCKED. Run `peaks standards init --project <repo> --apply --json`
168
+ # (first time) or `peaks standards update --project <repo> --apply --json` (existing).
169
+ ls <repo>/.claude/rules/common/coding-style.md \
170
+ <repo>/.claude/rules/common/code-review.md \
171
+ <repo>/.claude/rules/common/security.md
172
+ # Any "No such file" → BLOCKED. The standards apply step did not complete; re-run
173
+ # standards init/update with --apply and re-verify.
174
+ # Skipping Peaks-Cli Gate G (e.g. because the user did not explicitly authorize writes) is
175
+ # only acceptable in `assisted`/`strict` modes where the user actively declined; in
176
+ # `full-auto`/`swarm` the absence of these files is a workflow violation.
177
+ ```
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: peaks-solo-resume
3
+ description: Resume an in-flight peaks-solo slice in the current session. Use when the user says "continue the unfinished work", "继续完成", "把刚才没做完的收尾", or invokes `/peaks-solo-resume` directly. Detects the current session's deepest completed gate (via the Step 0.7 detection script at `tests/fixtures/skill-resume-mode-detect.sh`) and surfaces a resume option via `AskUserQuestion`. Triggers on `/peaks-solo-resume`, "继续完成刚才的", "resume the unfinished slice", "把刚才没做完的收尾".
4
+ ---
5
+
6
+ # Peaks-Cli Solo Resume (wrapper)
7
+
8
+ Peaks-Cli Solo Resume is a thin wrapper that handles the **most common high-frequency request shape**: "I was in the middle of something, continue it." It detects the current session's deepest completed gate, surfaces a resume option, then yields to the main `peaks-solo` skill (which runs the actual workflow from the matching gate onwards).
9
+
10
+ **This is a transparent wrapper.** The user does not stay in this skill — once the resume option is confirmed, control hands off to `peaks-solo`. The wrapper exists only to (a) detect the in-flight slice without the LLM re-reading 3-5 artifact files, and (b) surface the resume option as a `AskUserQuestion` before the main loop skips ahead.
11
+
12
+ ## Skill presence (MANDATORY first action)
13
+
14
+ ```bash
15
+ peaks skill presence:set peaks-solo-resume --project <repo> --mode <mode> --gate startup
16
+ peaks project memories --project <repo> --json # load durable memory
17
+ ```
18
+
19
+ ## Step 1: Detect the current session's in-flight slice
20
+
21
+ Use the Step 0.7 detection script (added in slice 003) to classify the current session:
22
+
23
+ ```bash
24
+ # 1. Confirm the current session id
25
+ sid=$(cat .peaks/.session.json | python3 -c "import sys,json; print(json.load(sys.stdin)['sessionId'])")
26
+
27
+ # 2. Run the detection script
28
+ bash tests/fixtures/skill-resume-mode-detect.sh "$sid" .peaks
29
+ # Possible outputs: fresh | complete | resume:rd-planning | resume:qa-validation
30
+ # | resume:txt-handoff | in-flight:<state>
31
+ ```
32
+
33
+ ## Step 2: Branch on the detection
34
+
35
+ **If `fresh`**: no in-flight slice. Tell the user "No in-flight slice in this session." Then hand off to `peaks-solo` for a fresh start (set presence back, then run `peaks workspace init --project <repo> --json` and continue with Step 1 of `peaks-solo`).
36
+
37
+ **If `complete`**: the workflow is already done. Tell the user "This session is complete — your previous slice already shipped." Then suggest a fresh start (`peaks-solo`) or close-out.
38
+
39
+ **If `resume:<gate>`**: surface a resume option via `AskUserQuestion`:
40
+
41
+ | Option | What it does |
42
+ |---|---|
43
+ | Resume from `<gate>` (Recommended) | Hand off to `peaks-solo` with the gate already at the matching point. The main loop skips ahead; the existing artifacts are preserved as-is. |
44
+ | Start a fresh slice | Treat the current request as a new slice (new `rid`). Existing artifacts are preserved but not auto-resumed. |
45
+ | Abandon the in-flight slice | Mark the in-flight slice as `deferred` (`peaks request transition <rid> --role rd --state deferred --reason "user abandoned"`) and start fresh. |
46
+
47
+ **If `in-flight:<state>`**: the slice is mid-implementation. Surface a CONFIRM (not a resume):
48
+
49
+ > "The slice is mid-implementation (state: `<state>`). The only valid option is to resume the in-flight gate. Continue?"
50
+
51
+ Use `AskUserQuestion` with a single option (Confirm and resume from `<state>`). Do NOT auto-resume mid-implementation.
52
+
53
+ ## Step 3: Hand off to peaks-solo
54
+
55
+ After the user confirms, **re-assert `peaks-solo` presence** so the status header reads correctly for the rest of the run:
56
+
57
+ ```bash
58
+ peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate <matching-gate>
59
+ ```
60
+
61
+ Then tell the user: "Resuming from `<gate>`. The main peaks-solo skill will take over from there." and yield control. The user's next message will land in the `peaks-solo` main loop, which will pick up the workflow from the matching gate.
62
+
63
+ ## Hard rules (do NOT skip)
64
+
65
+ - **Never silently auto-resume.** Always use `AskUserQuestion` first. The detection is a discovery; the user's confirmation is the gate.
66
+ - **Never auto-resume mid-implementation.** For `in-flight:<state>`, the only valid option is "Confirm and resume from `<state>`" — never "Start a fresh slice" or "Abandon" without the user's explicit choice.
67
+ - **Never write code or modify files in this skill.** This is a wrapper. The actual work (PRD, RD, QA, SC, TXT) is the main `peaks-solo` skill's job.
68
+ - **Never add a new `peaks <cmd>`.** Use the existing CLI primitives: `peaks workspace init`, `peaks project dashboard`, `peaks session list`, `peaks skill runbook`, `peaks skill doctor`, `peaks scan archetype`, `peaks request transition`. The detection script (`tests/fixtures/skill-resume-mode-detect.sh`) is the only executable this skill invokes.
69
+
70
+ ## Anti-patterns (do NOT do)
71
+
72
+ - Do NOT re-read 3-5 artifact files to determine the workflow state. The detection script does this in <1ms; re-reading is the bug Step 0.7 was added to prevent.
73
+ - Do NOT skip the `AskUserQuestion` even if the user says "just continue". The user might have changed their mind, or there might be multiple in-flight slices.
74
+ - Do NOT write to `.peaks/<sid>/` files. This skill is read-only on the workspace; it only reads `.peaks/.session.json` + runs the detection script.
75
+ - Do NOT run `peaks workspace init` on a real session (would bind a new session id). Only run it on a fresh detection where no session exists.
76
+
77
+ ## Cross-references
78
+
79
+ - The detection logic is canonical at `tests/fixtures/skill-resume-mode-detect.sh` (added in slice 003). The 8 vitest cases in `tests/unit/skill-resume-mode.test.ts` cover all classification outcomes.
80
+ - The SKILL.md prose at `skills/peaks-solo/SKILL.md` Step 0.7 (added in slice 003) is the same logic, written for LLM consumption. This wrapper reuses the same script — there is no parallel implementation.
81
+ - The "drives a CLI on the user's behalf" pattern (mirror of `peaks-sop`) is the closest existing precedent for this wrapper.
@@ -0,0 +1,120 @@
1
+ ---
2
+ name: peaks-solo-status
3
+ description: Show the current state of the peaks-solo orchestrator in a compact summary. Use when the user says "what's the current state", "现在到哪了", "where are we", or invokes `/peaks-solo-status` directly. Reads the existing CLI primitives (`peaks skill presence`, `peaks session list`, `peaks project dashboard`, `peaks request show`) and renders a 1-screen status table. Triggers on `/peaks-solo-status`, "现在到哪了", "what is the current state", "show me the dashboard", "where are we".
4
+ ---
5
+
6
+ # Peaks-Cli Solo Status (wrapper)
7
+
8
+ Peaks-Cli Solo Status is a thin wrapper that renders a compact status table for the current peaks-solo orchestrator state. It is the answer to "I just want to know where we are" — no PRD, no RD, no QA, no full peaks-solo orchestration. Just read the existing CLI state and render a 1-screen summary.
9
+
10
+ **This is a transparent wrapper.** The user does not stay in this skill — the status table is rendered, and control hands off (back to the user, or to `peaks-solo` if the user wants to act on the status).
11
+
12
+ ## Skill presence (MANDATORY first action)
13
+
14
+ ```bash
15
+ peaks skill presence:set peaks-solo-status --project <repo> --mode <mode> --gate startup
16
+ peaks project memories --project <repo> --json # load durable memory
17
+ ```
18
+
19
+ ## Step 1: Read the current state
20
+
21
+ Use only existing CLI primitives (no new commands). **Important contract note**: `peaks session list` does NOT support `--project` (verified by dogfood 2026-06-04); it returns all sessions globally. To scope to the current project, read `.peaks/.session.json` for the bound `sessionId`, then use `peaks session info <sid>` for the bound session's full state, and filter `peaks session list` output by `projectRoot` to find other sessions in the same project.
22
+
23
+ ```bash
24
+ # 1. Active skill presence
25
+ peaks skill presence --json
26
+
27
+ # 2. The bound session id (from .peaks/.session.json — local read, no CLI)
28
+ sid=$(cat .peaks/.session.json | python3 -c "import sys,json; print(json.load(sys.stdin)['sessionId'])")
29
+
30
+ # 3. The bound session's full state
31
+ peaks session info "$sid" --json
32
+
33
+ # 4. All sessions globally (then post-filter to current project)
34
+ peaks session list --json
35
+ # Note: this returns all sessions across all projects; the wrapper filters by
36
+ # matching `projectRoot` against the bound session's `projectRoot` to show only
37
+ # the sessions for THIS project. Sessions from other projects are ignored.
38
+
39
+ # 5. Per-request role state (PRD / RD / QA / TXT for the bound project)
40
+ peaks project dashboard --project <repo> --json
41
+
42
+ # 6. Per-request detail (if a specific rid is in flight)
43
+ peaks request show <rid> --role rd --project <repo> --json
44
+ peaks request show <rid> --role qa --project <repo> --json
45
+ ```
46
+
47
+ All 6 calls are read-only. Total cost: sub-second. (The original draft said "5 calls"; the corrected count is 6 because the post-filter step is now explicit.)
48
+
49
+ ## Step 2: Render the status table
50
+
51
+ Compact 1-screen format:
52
+
53
+ ```
54
+ === peaks-solo status ===
55
+ Session: 2026-06-04-session-b60252
56
+ Active: peaks-solo (mode: full-auto, gate: qa-validation)
57
+ Workspace: /Users/yuanyuan/.../peaks-cli/.peaks/2026-06-04-session-b60252
58
+
59
+ | Role | State | Artifact |
60
+ |------|----------------|-------------------------|
61
+ | PRD | handed-off | prd/requests/003.md |
62
+ | RD | qa-handoff | rd/requests/003.md |
63
+ | QA | running | qa/requests/003.md |
64
+ | TXT | (not started) | - |
65
+
66
+ QA verdict: pending
67
+ Last activity: 2026-06-04T17:00:00.000Z (12 min ago)
68
+ Standards: 5/5 existing (no delta)
69
+ Health: skill-doctor 35/35 pass
70
+ ```
71
+
72
+ If the session is fresh (no in-flight slice), render a different layout:
73
+
74
+ ```
75
+ === peaks-solo status ===
76
+ Session: 2026-06-04-session-b60252
77
+ Active: peaks-solo (mode: full-auto, gate: startup)
78
+ Workspace: /Users/yuanyuan/.../peaks-cli/.peaks/2026-06-04-session-b60252
79
+
80
+ No in-flight slice. Ready for a new request.
81
+ Health: skill-doctor 35/35 pass
82
+ ```
83
+
84
+ ## Step 3: Ask the user what to do next
85
+
86
+ | Option | What it does |
87
+ |---|---|
88
+ | Continue from the current gate | Hand off to `peaks-solo` with the gate already at the current state. Existing artifacts are preserved. |
89
+ | Open a new slice in this session | Keep the workspace, treat the current request as a new slice (new `rid`). |
90
+ | Just summarize and exit | No further action; the user will decide later. |
91
+
92
+ ## Step 4: Hand off (if user picked option 1 or 2)
93
+
94
+ Re-assert `peaks-solo` presence so the status header reads correctly for the rest of the run:
95
+
96
+ ```bash
97
+ peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate <matching-gate>
98
+ ```
99
+
100
+ Then yield control.
101
+
102
+ ## Hard rules (do NOT skip)
103
+
104
+ - **Never write to `.peaks/<sid>/`.** This skill is read-only on the workspace; it only reads existing CLI state.
105
+ - **Never add a new `peaks <cmd>`.** Use only the existing read-only CLI primitives: `peaks skill presence`, `peaks session list`, `peaks session info`, `peaks project dashboard`, `peaks request show`. **Note**: `peaks session list` does not support `--project`; filter its output by `projectRoot` post-hoc.
106
+ - **Never auto-progress the workflow.** The status table is informational only. The user chooses what to do via `AskUserQuestion`. Never silent about what comes next — always present the 3 options.
107
+ - **Never expose sensitive data in the table.** Do NOT include full PRD bodies, full tech-doc bodies, or any test code in the table. Just state names, paths, and counts.
108
+
109
+ ## Anti-patterns (do NOT do)
110
+
111
+ - Do NOT run `peaks workspace init` on the real session. The wrapper is read-only.
112
+ - Do NOT run `peaks request transition` (would change state). The wrapper is informational only.
113
+ - Do NOT write the status to a file (e.g. `.peaks/<sid>/status.md`). The user can see it in the chat; persisting it adds noise to the workspace.
114
+ - Do NOT block on slow CLI calls. The 5 read-only calls are sub-second each. If any takes >5s, fail fast and report the slow command.
115
+
116
+ ## Cross-references
117
+
118
+ - The "drives a CLI on the user's behalf" pattern (mirror of `peaks-sop`) is the closest existing precedent.
119
+ - `peaks-solo-resume` (P2.1) and `peaks-solo-test` (P2.2) are the sibling wrappers. `peaks-solo-resume` focuses on workflow-state introspection + resume decision; `peaks-solo-status` is the broader 5-CLI snapshot. The two are complementary, not redundant.
120
+ - The "read 5 CLI primitives, render 1 table" pattern is intentionally minimal — the wrapper does NOT add a new status-introspection CLI command (would violate the dev-preference.md "default-no on new CLI" rule).
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: peaks-solo-test
3
+ description: Run the project's test suite on the current repo and report results. Use when the user says "run the tests", "跑一下 test", "跑测试", or invokes `/peaks-solo-test` directly. Runs `pnpm vitest run` (or the project's equivalent test command), captures pass/fail counts and any failures, and surfaces a compact summary. Triggers on `/peaks-solo-test`, "跑一下 test", "跑测试", "run the tests", "test now".
4
+ ---
5
+
6
+ # Peaks-Cli Solo Test (wrapper)
7
+
8
+ Peaks-Cli Solo Test is a thin wrapper that runs the project's test suite on the current repo and reports results. It is the answer to "I just want to see if the tests pass" — no PRD, no RD, no QA, no full peaks-solo orchestration. Just `pnpm vitest run` and a compact summary.
9
+
10
+ **This is a transparent wrapper.** The user does not stay in this skill — the test command runs, the result is summarized, and control hands off (back to the user, or to `peaks-solo` if the user wants to act on the result).
11
+
12
+ ## Skill presence (MANDATORY first action)
13
+
14
+ ```bash
15
+ peaks skill presence:set peaks-solo-test --project <repo> --mode <mode> --gate startup
16
+ peaks project memories --project <repo> --json # load durable memory
17
+ ```
18
+
19
+ ## Step 1: Detect the project's test command
20
+
21
+ The Peaks-Cli project standard is `pnpm vitest run` (per `vitest.config.ts` + `package.json` scripts). For other project types, check the package.json scripts first. If the user explicitly named a different command (e.g. "跑 `pnpm test` not vitest"), use that.
22
+
23
+ ```bash
24
+ # Default for peaks-cli itself + most TS projects with vitest
25
+ pnpm vitest run
26
+ ```
27
+
28
+ For non-vitest projects (jest, mocha, pytest, etc.), the wrapper respects the project's existing test command. If the user says "run jest" or "run pytest", use that. Do NOT silently default to vitest.
29
+
30
+ ## Step 2: Run the test suite
31
+
32
+ ```bash
33
+ # Run with a reasonable timeout (5 min default; override for slow suites)
34
+ timeout 300 pnpm vitest run 2>&1 | tail -100
35
+ ```
36
+
37
+ Capture both stdout and stderr. If the exit code is 0, tests passed. If non-zero, tests failed or the command errored out.
38
+
39
+ ## Step 3: Summarize the result
40
+
41
+ Render a compact summary:
42
+
43
+ - **Test files**: `X passed, Y failed, Z skipped` (from the `Test Files X passed (Y)` line)
44
+ - **Tests**: `A passed, B failed, C skipped` (from the `Tests A passed | B skipped (C)` line)
45
+ - **Wall-clock**: the `Duration` line
46
+ - **Failures (if any)**: the first 5-10 failing test names + their failure messages, in priority order (the `FAIL` lines in the test output)
47
+
48
+ Then ask the user what they want to do next via `AskUserQuestion`:
49
+
50
+ | Option | What it does |
51
+ |---|---|
52
+ | Show the full failure list | Print all failing test names + messages (not just the first 5-10) |
53
+ | Open a slice to fix the failures | Hand off to `peaks-solo` with the failing tests as the slice's "acceptance criteria" |
54
+ | Just summarize and exit | No further action; the user will decide later |
55
+
56
+ ## Step 4: Hand off (if user picked option 2)
57
+
58
+ Re-assert `peaks-solo` presence so the status header reads correctly for the rest of the run:
59
+
60
+ ```bash
61
+ peaks skill presence:set peaks-solo --project <repo> --mode <mode> --gate qa-validation
62
+ ```
63
+
64
+ Then yield control. The user's next message will land in `peaks-solo` (in QA validation phase, since the failing tests are the validation surface).
65
+
66
+ ## Hard rules (do NOT skip)
67
+
68
+ - **Never silently fix test failures.** The user must choose what to do via `AskUserQuestion`. Silently "auto-fix"ing a failing test would mask the failure.
69
+ - **Never modify source code in this skill.** This is a wrapper. The actual fix (if the user wants one) is `peaks-solo`'s job.
70
+ - **Never add a new `peaks <cmd>`.** Use only existing primitives: `peaks skill presence:set`, `peaks project memories`, `peaks workspace init` (for the handoff), `peaks request transition` (if going to QA-validation). The actual test command is the project's existing test runner, not a `peaks <cmd>`.
71
+ - **Never trust the test runner's exit code as the only signal.** Some failures print partial success (e.g. 100 passed + 1 failed); the wrapper must show the failures, not just say "exit 0".
72
+
73
+ ## Anti-patterns (do NOT do)
74
+
75
+ - Do NOT run `peaks workspace init` on the real session. The wrapper is read-only on the workspace; it only reads the test results, not the workflow state.
76
+ - Do NOT write to `.peaks/<sid>/`. This skill is read-only on the workspace.
77
+ - Do NOT auto-fail the workflow if the tests fail. The user gets a summary + 3 options; the workflow state is unchanged.
78
+ - Do NOT run `pnpm vitest run --watch` or any interactive mode. The wrapper captures the output as a one-shot run; interactive mode would block the orchestrator.
79
+
80
+ ## Cross-references
81
+
82
+ - The "drives a CLI on the user's behalf" pattern (mirror of `peaks-sop`) is the closest existing precedent.
83
+ - `peaks-solo-resume` (sibling wrapper, P2.1) is the workflow-state introspection variant; `peaks-solo-test` is the test-execution variant.
84
+ - The "harness a project-native test runner" pattern is intentionally minimal — the wrapper should NOT add a new CLI for running tests (would violate the dev-preference.md "default-no on new CLI" rule + the user's explicit ask for "skill-first, CLI-auxiliary").