peaks-loop 4.0.49 → 4.0.51

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 (179) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README-en.md +1 -1
  3. package/README.md +1 -1
  4. package/dist/cli/commands/audit-commands.js +1 -0
  5. package/dist/cli/commands/baseline-commands.js +163 -25
  6. package/dist/cli/commands/core/skill-command.js +53 -4
  7. package/dist/cli/commands/core/standards-command.d.ts +24 -0
  8. package/dist/cli/commands/core/standards-command.js +74 -0
  9. package/dist/cli/commands/hooks-commands.js +55 -38
  10. package/dist/cli/commands/share-commands.js +113 -20
  11. package/dist/cli/commands/web-commands.js +8 -1
  12. package/dist/cli/commands/workflow-lifecycle-commands.d.ts +6 -0
  13. package/dist/cli/commands/workflow-lifecycle-commands.js +64 -3
  14. package/dist/services/adapter/adapter.d.ts +30 -0
  15. package/dist/services/adapter/auto-adapter.d.ts +13 -0
  16. package/dist/services/adapter/claude-adapter.js +12 -0
  17. package/dist/services/adapter/codex-adapter.d.ts +12 -0
  18. package/dist/services/adapter/codex-adapter.js +12 -0
  19. package/dist/services/adapter/copilot-adapter.d.ts +12 -0
  20. package/dist/services/adapter/copilot-adapter.js +12 -0
  21. package/dist/services/audit/backing-detector.d.ts +25 -7
  22. package/dist/services/audit/backing-detector.js +33 -17
  23. package/dist/services/audit/enforcer-liveness.d.ts +12 -0
  24. package/dist/services/audit/enforcer-liveness.js +100 -0
  25. package/dist/services/audit/enforcers/lint-catalog-governance.d.ts +23 -11
  26. package/dist/services/audit/enforcers/lint-catalog-governance.js +10 -14
  27. package/dist/services/audit/enforcers/lint-rd-handoff-coverage.d.ts +5 -15
  28. package/dist/services/audit/enforcers/lint-rd-handoff-coverage.js +94 -25
  29. package/dist/services/audit/enforcers/lint-style.d.ts +9 -1
  30. package/dist/services/audit/enforcers/lint-style.js +38 -2
  31. package/dist/services/audit/prose-ratio-calculator.d.ts +28 -17
  32. package/dist/services/audit/prose-ratio-calculator.js +25 -18
  33. package/dist/services/audit/red-line-catalog-p2-a.js +1 -1
  34. package/dist/services/audit/red-lines-service.js +51 -7
  35. package/dist/services/capability-audit-service/independent-checker.d.ts +15 -0
  36. package/dist/services/capability-audit-service/independent-checker.js +140 -0
  37. package/dist/services/capability-audit-service/index.d.ts +3 -1
  38. package/dist/services/capability-audit-service/index.js +1 -0
  39. package/dist/services/capability-audit-service/runner.d.ts +17 -13
  40. package/dist/services/capability-audit-service/runner.js +76 -15
  41. package/dist/services/capability-audit-service/types.d.ts +48 -0
  42. package/dist/services/capability-guard-runner/contracts/J01.js +21 -22
  43. package/dist/services/capability-guard-runner/contracts/J02.d.ts +1 -1
  44. package/dist/services/capability-guard-runner/contracts/J02.js +114 -28
  45. package/dist/services/capability-guard-runner/contracts/J03.d.ts +13 -0
  46. package/dist/services/capability-guard-runner/contracts/J03.js +72 -21
  47. package/dist/services/capability-guard-runner/contracts/J04.d.ts +6 -0
  48. package/dist/services/capability-guard-runner/contracts/J04.js +65 -32
  49. package/dist/services/capability-guard-runner/contracts/J05.js +118 -16
  50. package/dist/services/capability-guard-runner/contracts/J06.d.ts +14 -0
  51. package/dist/services/capability-guard-runner/contracts/J06.js +57 -39
  52. package/dist/services/capability-guard-runner/contracts/J07.d.ts +9 -0
  53. package/dist/services/capability-guard-runner/contracts/J07.js +76 -47
  54. package/dist/services/capability-guard-runner/contracts/J08.d.ts +11 -0
  55. package/dist/services/capability-guard-runner/contracts/J08.js +66 -39
  56. package/dist/services/capability-guard-runner/contracts/J09.d.ts +13 -0
  57. package/dist/services/capability-guard-runner/contracts/J09.js +95 -39
  58. package/dist/services/capability-guard-runner/contracts/J10.d.ts +12 -0
  59. package/dist/services/capability-guard-runner/contracts/J10.js +69 -35
  60. package/dist/services/capability-guard-runner/contracts/J11.d.ts +8 -0
  61. package/dist/services/capability-guard-runner/contracts/J11.js +73 -33
  62. package/dist/services/capability-guard-runner/contracts/J12.d.ts +12 -0
  63. package/dist/services/capability-guard-runner/contracts/J12.js +66 -30
  64. package/dist/services/capability-guard-runner/contracts/J13.d.ts +11 -0
  65. package/dist/services/capability-guard-runner/contracts/J13.js +62 -40
  66. package/dist/services/capability-guard-runner/contracts/J14.d.ts +11 -0
  67. package/dist/services/capability-guard-runner/contracts/J14.js +60 -31
  68. package/dist/services/capability-guard-runner/contracts/J15.d.ts +11 -0
  69. package/dist/services/capability-guard-runner/contracts/J15.js +70 -35
  70. package/dist/services/capability-guard-runner/contracts/_shared.d.ts +24 -0
  71. package/dist/services/capability-guard-runner/contracts/_shared.js +67 -0
  72. package/dist/services/capability-guard-runner/registry.d.ts +5 -0
  73. package/dist/services/capability-guard-runner/registry.js +140 -0
  74. package/dist/services/capability-guard-runner/runner.d.ts +26 -0
  75. package/dist/services/capability-guard-runner/runner.js +63 -6
  76. package/dist/services/code/auto-compact-modes.d.ts +13 -2
  77. package/dist/services/code/auto-compact-modes.js +20 -4
  78. package/dist/services/code/post-compact-detector.js +20 -11
  79. package/dist/services/code/step-08-gate.js +21 -6
  80. package/dist/services/config/config-safety.js +11 -9
  81. package/dist/services/dispatch/sub-agent-dispatcher.d.ts +11 -30
  82. package/dist/services/dispatch/sub-agent-dispatcher.js +5 -48
  83. package/dist/services/final-review/pre-post-diff.js +10 -2
  84. package/dist/services/ide/adapters/claude-code-adapter.js +0 -1
  85. package/dist/services/ide/adapters/codex-adapter.js +1 -2
  86. package/dist/services/ide/adapters/cursor-adapter.js +1 -2
  87. package/dist/services/ide/adapters/hermes-adapter.js +1 -2
  88. package/dist/services/ide/adapters/openclaw-adapter.js +1 -2
  89. package/dist/services/ide/adapters/qoder-adapter.js +1 -2
  90. package/dist/services/ide/adapters/tongyi-lingma-adapter.js +1 -2
  91. package/dist/services/ide/adapters/trae-adapter.js +1 -2
  92. package/dist/services/ide/adapters/zcode-adapter.js +0 -1
  93. package/dist/services/ide/ide-types.d.ts +0 -2
  94. package/dist/services/observability/observability-service.d.ts +1 -1
  95. package/dist/services/scan/api-diff-types.js +20 -2
  96. package/dist/services/security/safe-settings-path.js +19 -1
  97. package/dist/services/skill/skill-search-service.d.ts +3 -3
  98. package/dist/services/standards/loop-engineering-lint.d.ts +1 -1
  99. package/dist/services/standards/loop-engineering-lint.js +6 -0
  100. package/dist/services/web/daemon-registry.js +27 -2
  101. package/dist/services/workspace/claude-settings-template.d.ts +53 -37
  102. package/dist/services/workspace/claude-settings-template.js +105 -83
  103. package/dist/services/workspace/generated-artifacts-stamp.d.ts +119 -0
  104. package/dist/services/workspace/generated-artifacts-stamp.js +167 -0
  105. package/dist/services/workspace/workspace-claude-settings-materializer.d.ts +8 -0
  106. package/dist/services/workspace/workspace-claude-settings-materializer.js +38 -3
  107. package/dist/services/workspace/workspace-service.js +11 -1
  108. package/dist/shared/fs-utils.d.ts +26 -0
  109. package/dist/shared/fs-utils.js +35 -0
  110. package/package.json +9 -7
  111. package/scripts/copy-templates.mjs +0 -12
  112. package/scripts/install-skills.mjs +154 -53
  113. package/skills/bee/peaks-perf-audit/SKILL.md +2 -2
  114. package/skills/bee/peaks-perf-audit/references/audit-protocol.md +1 -1
  115. package/skills/bee/peaks-prd/SKILL.md +3 -3
  116. package/skills/bee/peaks-prd/references/prd-for-multi-pass.md +1 -1
  117. package/skills/bee/peaks-prd/references/workflow.md +1 -1
  118. package/skills/bee/peaks-qa/SKILL.md +6 -7
  119. package/skills/bee/peaks-qa/references/external-capability-guidance.md +1 -1
  120. package/skills/bee/peaks-qa/references/qa-fanout-contract.md +1 -1
  121. package/skills/bee/peaks-qa/references/reading-handoff-frontmatter.md +2 -2
  122. package/skills/bee/peaks-rd/SKILL.md +2 -3
  123. package/skills/bee/peaks-rd/references/code-reviewer-4dim-hint.md +1 -1
  124. package/skills/bee/peaks-rd/references/external-references.md +1 -1
  125. package/skills/bee/peaks-rd/references/mandatory-perf-baseline.md +1 -1
  126. package/skills/bee/peaks-rd/references/ocr-multilang-1.8.md +2 -2
  127. package/skills/bee/peaks-rd/references/parallel-review-fanout.md +2 -2
  128. package/skills/bee/peaks-rd/references/rd-fanout-contracts.md +11 -8
  129. package/skills/bee/peaks-rd/references/rd-runbook.md +1 -1
  130. package/skills/bee/peaks-rd/references/rd-sub-agent-dispatch.md +7 -7
  131. package/skills/bee/peaks-rd/references/rd-transition-gates.md +1 -1
  132. package/skills/bee/peaks-rd/references/reading-v2-slice-results.md +1 -1
  133. package/skills/bee/peaks-rd/references/v2-12-fanout-collapse.md +7 -5
  134. package/skills/bee/peaks-rd/references/writing-handoff-frontmatter.md +3 -3
  135. package/skills/bee/peaks-reviewer/SKILL.md +1 -1
  136. package/skills/bee/peaks-security-audit/SKILL.md +3 -3
  137. package/skills/bee/peaks-security-audit/references/audit-protocol.md +1 -1
  138. package/skills/bee/peaks-txt/references/context-capsule.md +1 -1
  139. package/skills/bee/peaks-ui/SKILL.md +1 -1
  140. package/skills/peaks-audit/SKILL.md +1 -1
  141. package/skills/peaks-code/SKILL.md +20 -18
  142. package/skills/peaks-code/references/context-governance.md +1 -1
  143. package/skills/peaks-code/references/dag-orchestrator.md +3 -4
  144. package/skills/peaks-code/references/external-references.md +1 -1
  145. package/skills/peaks-code/references/external-skill-invocation.md +2 -2
  146. package/skills/peaks-code/references/fanout-mandatory.md +3 -3
  147. package/skills/peaks-code/references/frontend-only-mode.md +2 -2
  148. package/skills/peaks-code/references/gstack-integration.md +1 -1
  149. package/skills/peaks-code/references/micro-cycle.md +1 -1
  150. package/skills/peaks-code/references/periodic-checkpoint.md +4 -4
  151. package/skills/peaks-code/references/project-scan-checklist.md +1 -1
  152. package/skills/peaks-code/references/resume-detection.md +1 -1
  153. package/skills/peaks-code/references/runbook.md +6 -3
  154. package/skills/peaks-code/references/session-overload-signal-index.md +6 -4
  155. package/skills/peaks-code/references/startup-sequence.md +17 -17
  156. package/skills/peaks-code/references/step-0-8-gate.md +1 -1
  157. package/skills/peaks-code/references/step-11-memory-sediment.md +2 -2
  158. package/skills/peaks-code/references/sub-agent-dispatch.md +26 -25
  159. package/skills/peaks-code/references/swarm-dispatch-contract.md +1 -1
  160. package/skills/peaks-code/references/workflow-gates-and-types.md +3 -3
  161. package/skills/peaks-code/references/worktree-governance.md +1 -1
  162. package/skills/peaks-final-review/SKILL.md +3 -3
  163. package/skills/peaks-ide/references/audit-log-helper.md +5 -4
  164. package/skills/peaks-resume/SKILL.md +1 -1
  165. package/skills/peaks-slice-decompose/SKILL.md +4 -4
  166. package/skills/peaks-slice-decompose/references/cross-pass-edge-interpretation.md +1 -1
  167. package/skills/peaks-slice-decompose/references/granularity-decision.md +1 -1
  168. package/skills/peaks-slice-decompose/references/v2-schema.md +2 -2
  169. package/skills/peaks-solo/SKILL.md +1 -2
  170. package/dist/cli/commands/context-builder-commands.d.ts +0 -11
  171. package/dist/cli/commands/context-builder-commands.js +0 -85
  172. package/dist/services/hooks/write-gate.js +0 -111
  173. package/skills/bee/peaks-prd/references/command-migration.md +0 -3
  174. package/skills/bee/peaks-qa/references/command-migration.md +0 -3
  175. package/skills/bee/peaks-rd/references/command-migration.md +0 -3
  176. package/skills/bee/peaks-sc/references/command-migration.md +0 -3
  177. package/skills/bee/peaks-txt/references/command-migration.md +0 -3
  178. package/skills/bee/peaks-ui/references/command-migration.md +0 -3
  179. package/skills/peaks-code/references/command-migration.md +0 -3
@@ -155,4 +155,4 @@ envelope and into the slice's `reducerReport`.
155
155
 
156
156
  > Body of `## 业务测试细分 (optional)`. If the PRD or project warrants it, subdivide `qa-business` further into roles like `qa-business-api` / `qa-business-frontend` / `qa-business-regression`; each gets its own `peaks sub-agent dispatch` call. Names are convention not contract — the dispatcher accepts any non-empty string. **Subdivision must stay ≤ 2 levels deep** (RL-4): `qa-business-api` is fine, `qa-business-api-user` is not. Two levels of depth is the empirical sweet spot — past that, the reducer cannot audit the boundaries between sub-agents, and prompts start overlapping.
157
157
 
158
- For the full contract (heartbeat instructions for each sub-agent, batch-id discipline, 30s cadence, 100-truncation, 5min stale) see `skills/peaks-qa/references/qa-fanout-contract.md` and `skills/peaks-code/references/sub-agent-dispatch.md` §G6.
158
+ For the full contract (heartbeat instructions for each sub-agent, batch-id discipline, 30s cadence, 100-truncation, 5min stale) see `skills/bee/peaks-qa/references/qa-fanout-contract.md` and `skills/peaks-code/references/sub-agent-dispatch.md` §G6.
@@ -4,7 +4,7 @@ QA reads the RD handoff's YAML frontmatter **before** reading the body prose. Th
4
4
 
5
5
  ## Required frontmatter fields (mirror RD writer)
6
6
 
7
- `requestId`, `scope`, `files`, `decisions[]`, `risks[]`, `nextActions[]`, `gateEvidence`, `schemaVersion: '1.0'`. Field schema: `../peaks-rd/references/writing-handoff-frontmatter.md`.
7
+ `requestId`, `scope`, `files`, `decisions[]`, `risks[]`, `nextActions[]`, `gateEvidence`, `schemaVersion: '1.0'`. Field schema: `../../peaks-rd/references/writing-handoff-frontmatter.md`.
8
8
 
9
9
  ## Mechanical cross-checks (run before body read)
10
10
 
@@ -27,4 +27,4 @@ After the frontmatter passes, read the body prose to derive the test plan:
27
27
 
28
28
  - All 5 mechanical cross-checks above pass (or are explicitly waived via `--allow-incomplete --confirm`).
29
29
  - Test plan covers every new code path mentioned in body prose.
30
- - Frontmatter YAML parses cleanly (vitest guard: `tests/unit/artifacts/handoff-frontmatter-shape.test.ts`).
30
+ - Frontmatter YAML parses cleanly. No vitest guard covers this; see `../../peaks-rd/references/writing-handoff-frontmatter.md` §Validation for the consumers that read the file.
@@ -65,7 +65,7 @@ Every RD action MUST align with the 4 Karpathy guidelines (full text at `andrej-
65
65
  3. **Surgical Changes** — touch only what the user's request requires. Remove imports / variables / functions that *your* changes made unused. Do not refactor adjacent code. Every changed line must trace to the user's request.
66
66
  4. **Goal-Driven Execution** — define verifiable success criteria (`peaks request show --role rd` carries ACs from PRD). For multi-step work, state plan + verify checkpoints before acting.
67
67
 
68
- Cross-references: Slice 1 PRD §AC-1 / `tests/unit/skills/karpathy-prompt-injection.test.ts` (4-point assertion guard). The canonical skill id is `andrej-karpathy-skills:karpathy-guidelines`.
68
+ Cross-references: Slice 1 PRD §AC-1. The 4-point assertion guard that PRD named was deleted in `f17aa377`; the block below is held by documentation only. The canonical skill id is `andrej-karpathy-skills:karpathy-guidelines`.
69
69
 
70
70
  ## Scope directory (slice 10 — read scopeDir from envelope)
71
71
 
@@ -189,7 +189,7 @@ Full dispatch contract (when-to-fan-out rules, dispatch template, prereq gates)
189
189
 
190
190
  ## Reviewer fan-out detached mode (Phase C, slice 2026-08-10)
191
191
 
192
- Reviewer fan-out may run in detached mode for any of the 3-way fan-out roles (`code-reviewer`, `qa-test-cases-writer`, `karpathy-reviewer`). Detached mode spawns a real OS process via `peaks sub-agent dispatch --mode detached --vendor <vendor>`, isolated from the orchestrator session. Use detached mode when the reviewer's expected runtime exceeds 60s OR processes ≥ 20 source files. Pass `--mode detached` explicitly per reviewer role; the default remains `in-process` (backward compat). The karpathy-reviewer's `<peaks-auto-compact>` marker is honored automatically when `--mode detached` is used. Note what that marker does and does not do (corrected 2026-09-13, rid `2026-09-13-defects-e`): it asks the child to persist durable state to `.peaks/_runtime/<sid>/detached/<rid>/compact/<n>.json` before its own harness compacts the session — the child cannot compact itself, and nothing is spliced back into its prompt. See `peaks-code/references/sub-agent-dispatch.md` §"Detached Mode" for the full contract.
192
+ Reviewer fan-out may run in detached mode for any of the 3-way fan-out roles (`code-reviewer`, `qa-test-cases-writer`, `karpathy-reviewer`). Detached mode spawns a real OS process via `peaks sub-agent dispatch --mode detached --vendor <vendor>`, isolated from the orchestrator session. Use detached mode when the reviewer's expected runtime exceeds 60s OR processes ≥ 20 source files. Pass `--mode detached` explicitly per reviewer role; the default remains `in-process` (backward compat). The karpathy-reviewer's `<peaks-auto-compact>` marker is honored automatically when `--mode detached` is used. Note what that marker does and does not do (corrected 2026-09-13, rid `2026-09-13-defects-e`): it asks the child to persist durable state to `.peaks/_runtime/<sid>/detached/<rid>/compact/<n>.json` before its own harness compacts the session — the child cannot compact itself, and nothing is spliced back into its prompt. See `../../peaks-code/references/sub-agent-dispatch.md` §"Detached Mode" for the full contract.
193
193
 
194
194
  ## Refactor hard gates
195
195
 
@@ -315,7 +315,6 @@ Index of every `references/` file in this skill. Read on demand.
315
315
  | `references/artifact-per-request.md` | RD per-request artifact + per-slice vs per-session scope. |
316
316
  | `references/browser-self-test-contracts.md` | Browser self-test contracts (1) + (2). |
317
317
  | `references/codegraph-project-analysis.md` | Codegraph local analysis (untrusted evidence). |
318
- | `references/command-migration.md` | Legacy command migration map. |
319
318
  | `references/compact-handoff.md` | RD compact handoff capsule. |
320
319
  | `references/external-references.md` | External 3rd-party inventory. |
321
320
  | `references/frontend-project-generation.md` | React + Vite + shadcn/ui default. |
@@ -3,7 +3,7 @@
3
3
  > Hint block appended to the code-reviewer sub-agent prompt at dispatch
4
4
  > time. The RD main loop injects the verbatim block below after the
5
5
  > Karpathy-guidelines context block (see
6
- > `references/rd-sub-agent-dispatch.md` §"Karpathy-guidelines context").
6
+ > `rd-sub-agent-dispatch.md` §"Karpathy-guidelines context").
7
7
  > The block is the canonical promotion surface for the convention at
8
8
  > `.peaks/standards/typescript/testing.md`.
9
9
 
@@ -6,4 +6,4 @@
6
6
 
7
7
  **Other external resources** (Context7, SearchCode, everything-claude-code, GitNexus, etc.): Use `peaks capabilities --source access-repo/mcp-server --json` for capability discovery before recommending. References only — do not execute upstream installers, do not install upstream resources, do not persist sensitive examples. Peaks-Loop RD gates remain authoritative.
8
8
 
9
- **OpenSpec CLI**: Route through Peaks-Loop CLI (`peaks openspec show/to-rd/render`). Do not hand-edit `openspec/changes/**`. Recipes: `references/openspec-cli.md`.
9
+ **OpenSpec CLI**: Route through Peaks-Loop CLI (`peaks openspec show/to-rd/render`). Do not hand-edit `openspec/changes/**`. Recipes: `openspec-cli.md`.
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Body of `## Mandatory perf-baseline output` + numbered perf-baseline steps. **BLOCKING — Do not hand off to QA without a perf-baseline file when the slice has a user-visible performance surface.** The QA stage's Gate A4 (performance check) needs a stable reference to diff against; without an RD-side baseline, the first time Gate A4 runs it has nothing to compare against and any regression it finds is a blind-side surprise. The user-facing pain of leaving perf to QA only has historically been a 3-cycle repair loop. The RD-side baseline closes that loop.
4
4
 
5
- > **Slice 025 — stable across slices within a session; refreshed on trigger.** The perf baseline is a **project-level** artifact (`.peaks/_runtime/<sessionId>/qa/perf-baseline.md`) and is **stable across slices within a session**. It is regenerated only when the slice diff matches the refresh trigger table (see `peaks-qa/references/qa-perf-test-plan.md`). Slices that do not trigger a refresh reference the existing baseline by hash from the per-slice `qa/performance-findings-<rid>.md` (not by regenerating the baseline). The CLI is `peaks workflow plan read|refresh|detect-trigger perf --project <repo>`; the RD-side `peaks perf baseline --apply` workflow below still scaffolds the initial file but the canonical refresh path post-slice-025 is the new `peaks workflow plan refresh` primitive.
5
+ > **Slice 025 — stable across slices within a session; refreshed on trigger.** The perf baseline is a **project-level** artifact (`.peaks/_runtime/<sessionId>/qa/perf-baseline.md`) and is **stable across slices within a session**. It is regenerated only when the slice diff matches the refresh trigger table (see `skills/bee/peaks-qa/references/qa-perf-test-plan.md`). Slices that do not trigger a refresh reference the existing baseline by hash from the per-slice `qa/performance-findings-<rid>.md` (not by regenerating the baseline). The CLI is `peaks workflow plan read|refresh|detect-trigger perf --project <repo>`; the RD-side `peaks perf baseline --apply` workflow below still scaffolds the initial file but the canonical refresh path post-slice-025 is the new `peaks workflow plan refresh` primitive.
6
6
 
7
7
  **When this applies:**
8
8
  - feature / refactor slices that touch a route, hook, API, or any user-perceivable surface
@@ -12,8 +12,8 @@ status: shipped-4.0.16
12
12
  `@alibaba-group/open-code-review@1.8.9` replaces the 2.0.3-era
13
13
  GitHub Releases HTTPS download with per-platform `optionalDependencies`
14
14
  (`@alibaba-group/ocr-{darwin,linux,win32}-{arm64,x64}`). `npm install`
15
- hits the registry only; postinstall runs the embedded Node installer
16
- (`scripts/install.js`) and resolves the platform binary locally.
15
+ hits the registry only; postinstall runs the Node installer the package
16
+ itself ships and resolves the platform binary locally.
17
17
 
18
18
  Sandbox evidence (2026-08-06, `npm@10.9.4`):
19
19
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  The rid is part of the filename (slice `2026-09-14-audit-artifact-rid-scoping`): every slice in a session shares `.peaks/_runtime/<sessionId>/audit/`, so a ridless name means the second slice's audit silently replaces the first slice's. The ridless locations are still read as fallbacks.
11
11
 
12
- Both audit skills consume the immutable peaks-prd handoff (`prd/handoff.md`) and the project-scoped audit templates under `.peaks/project-scan/{security-template, perf-template, audit-output-schema}.md`. The handoff presence is enforced by the `AUDIT_REQUIRES_HANDOFF` prereq. The 1-minor-release back-compat window (`v2.12.0`) keeps the old `rd/{security-review,perf-baseline}.md` paths readable via `mustContainAny` — see `tests/unit/rd/deprecated-reviewer-back-compat.test.ts` (8 cases) and `tests/unit/artifact-prerequisites-typed.test.ts`.
12
+ Both audit skills consume the immutable peaks-prd handoff (`prd/handoff.md`) and the project-scoped audit templates under `.peaks/project-scan/{security-template, perf-template, audit-output-schema}.md`. The handoff presence is enforced by the `AUDIT_REQUIRES_HANDOFF` prereq. The 1-minor-release back-compat window (`v2.12.0`) keeps the old `rd/{security-review,perf-baseline}.md` paths readable via `mustContainAny` — see `RD_DEPRECATED_REVIEWERS` in `src/services/rd/reviewer-dispatch-policy.ts`. The unit tests that once pinned this were deleted in `f17aa377` and have not been replaced.
13
13
 
14
14
  The current fan-out is therefore **3 sub-agents**:
15
15
 
@@ -67,7 +67,7 @@ Note: sub-agent 1 (code-reviewer) and sub-agent 3 (karpathy-reviewer) write to `
67
67
  - Read `.peaks/_runtime/<sessionId>/prd/handoff.md` (v2.11.0: architecture summary — the immutable peaks-prd handoff replaces `rd/tech-doc.md`).
68
68
  - Output: `.peaks/_runtime/<sessionId>/rd/karpathy-review-<rid>.md` containing a `## Karpathy-Gate` header and the 4 guideline section markers (Think Before Coding / Simplicity First / Surgical Changes / Goal-Driven Execution). (Rid in the filename, same reason as the code review; the ridless `rd/karpathy-review.md` is still read as a fallback.)
69
69
  - Required for the `KARPATHY_REVIEW` prereq. The transition CLI gate reads those markers and refuses `rd:qa-handoff` when the file is missing or the markers are absent.
70
- - See `references/rd-fanout-contracts.md` §"karpathy-reviewer contract" for the JSON envelope shape + file format.
70
+ - See `rd-fanout-contracts.md` §"karpathy-reviewer contract" for the JSON envelope shape + file format.
71
71
 
72
72
  **Hard prohibitions on all 3 sub-agents:**
73
73
  - Do NOT call `Skill(skill="...")` — would re-enter RD or another skill and break the fan-out.
@@ -21,12 +21,13 @@ end of implementation, RD fires 3 sub-agents in parallel via
21
21
  > The handoff presence is enforced by the `AUDIT_REQUIRES_HANDOFF` prereq.
22
22
  > The 1-minor-release back-compat window (`v2.12.0`) keeps the old
23
23
  > `rd/{security-review,perf-baseline}.md` paths readable via `mustContainAny` —
24
- > see `tests/unit/rd/deprecated-reviewer-back-compat.test.ts` (8 cases) and
25
- > `tests/unit/artifact-prerequisites-typed.test.ts`.
24
+ > see `RD_DEPRECATED_REVIEWERS` in
25
+ > `src/services/rd/reviewer-dispatch-policy.ts`. The two unit tests that
26
+ > once pinned this were deleted in `f17aa377` and have not been replaced.
26
27
 
27
28
  ## The 3 sub-agents
28
29
 
29
- > **Karpathy pointer (Slice 1/6):** Each of the 3 sub-agents below operates under the 4 Karpathy guidelines. The canonical reference is `andrej-karpathy-skills:karpathy-guidelines` (full text) and `peaks-rd/SKILL.md` §"Karpathy enforcement". The dispatch primitive also injects the verbatim context block from `rd-sub-agent-dispatch.md` §"Karpathy-guidelines context" into every sub-agent prompt. Sub-agents MUST NOT silently drop the block.
30
+ > **Karpathy pointer (Slice 1/6):** Each of the 3 sub-agents below operates under the 4 Karpathy guidelines. The canonical reference is `andrej-karpathy-skills:karpathy-guidelines` (full text) and `../SKILL.md` §"Karpathy enforcement". The dispatch primitive also injects the verbatim context block from `rd-sub-agent-dispatch.md` §"Karpathy-guidelines context" into every sub-agent prompt. Sub-agents MUST NOT silently drop the block.
30
31
 
31
32
  - **Sub-agent 1 — code-reviewer** runs `code-review` against the diff and
32
33
  writes `rd/code-review-<rid>.md`. **v2.11.0 Tier 7 (Group D) + 2026-09-09-ecc-dynamic:**
@@ -77,9 +78,9 @@ end of implementation, RD fires 3 sub-agents in parallel via
77
78
  > `.peaks/_runtime/<sessionId>/rd/perf-baseline.md` remains readable
78
79
  > via `mustContainAny` for the v2.12.0 1-minor-release window.
79
80
  >
80
- > See `tests/unit/rd/deprecated-reviewer-back-compat.test.ts` (8 cases)
81
- > and `RD_DEPRECATED_REVIEWERS` in
82
- > `src/services/rd/reviewer-dispatch-policy.ts`.
81
+ > See `RD_DEPRECATED_REVIEWERS` in
82
+ > `src/services/rd/reviewer-dispatch-policy.ts`. The unit test that once
83
+ > pinned this was deleted in `f17aa377` and has not been replaced.
83
84
 
84
85
  ## Hard prohibitions on all 3 sub-agents (single block)
85
86
 
@@ -201,8 +202,10 @@ failing the gate.
201
202
  `mustContainAny: [...]` on the `AUDIT_SECURITY` / `AUDIT_PERF` prereqs
202
203
  during the back-compat window. v2.13.0 hard-deletes the legacy paths.
203
204
 
204
- **Pinning:** `tests/unit/rd/deprecated-reviewer-back-compat.test.ts`
205
- (8 cases) pins the dispatch routing + the legacy-path acceptance.
205
+ **Pinning:** none. The routing + legacy-path acceptance live in
206
+ `RD_DEPRECATED_REVIEWERS` / `isDeprecatedReviewer` in
207
+ `src/services/rd/reviewer-dispatch-policy.ts`; the unit test that pinned
208
+ them (8 cases) was deleted in `f17aa377` and has not been replaced.
206
209
 
207
210
  ## Gate C evidence (RD-side, type-specific)
208
211
 
@@ -155,7 +155,7 @@ peaks codegraph affected --project <repo> <changed-files...> --json
155
155
  # --rid <rid> --project <repo> --json
156
156
  # The sub-agent reads `~/.claude/agents/karpathy-reviewer.md` (user-installed)
157
157
  # which is the project-internal draft at
158
- # `skills/peaks-rd/references/karpathy-reviewer-prompt.md` plus a
158
+ # `skills/bee/peaks-rd/references/karpathy-reviewer-prompt.md` plus a
159
159
  # `rd/karpathy-reviewer-agent-handoff.md` install guide.
160
160
  # Hard gate: missing karpathy-reviewer sub-agent OR missing rd/karpathy-review-<rid>.md
161
161
  # → `peaks request transition --state qa-handoff` returns `code: PREREQUISITES_MISSING`.
@@ -49,11 +49,11 @@ If the upstream superpowers chain suggests raw `git worktree add`:
49
49
  > single-dispatch path.
50
50
  >
51
51
  > This constraint is **text-locked** in this reference (so the LLM
52
- > runner sees the rule every time it reads the dispatch contract) and
53
- > **test-locked** by
54
- > `tests/unit/dispatch/dispatch-fanout-mandatory.test.ts` (≥ 8 cases
55
- > covering 1-leaf, 2-leaf, 3+-leaf, config/docs/chore type-bypass, and
56
- > the preferences-with-serial-default fan-out escape hatch). See also
52
+ > runner sees the rule every time it reads the dispatch contract). It is
53
+ > no longer test-locked: the unit test that carried the ≥ 8 cases
54
+ > (1-leaf, 2-leaf, 3+-leaf, config/docs/chore type-bypass, and the
55
+ > preferences-with-serial-default fan-out escape hatch) was deleted in
56
+ > `f17aa377` and has not been replaced. See also
57
57
  > `skills/peaks-code/references/fanout-mandatory.md` for the
58
58
  > orchestrator-side rationale; the two files share the same wording by
59
59
  > design — if either changes, update the other.
@@ -109,7 +109,7 @@ Any RD/QA/SC sub-agent dispatched by `peaks sub-agent dispatch --from-dag` (or b
109
109
 
110
110
  **Where the orchestrator reads the values from**: `data.orchestratorVisibleHint` (one line, copy verbatim) and `data.artifactsPublicPaths` (the public list of artifact paths the sub-agent will own). The CLI fills these in; the orchestrator just transcribes.
111
111
 
112
- **Regression guard**: `tests/unit/dispatch/dispatch-fanout-mandatory.test.ts` parses `rd-sub-agent-dispatch.md` and asserts the G11.5 heading is present. Do not delete the heading without updating the guard.
112
+ **Regression guard**: none. The unit test that parsed `rd-sub-agent-dispatch.md` and asserted the G11.5 heading is present was deleted in `f17aa377`. The heading is held by convention only — do not delete it.
113
113
 
114
114
  ---
115
115
 
@@ -161,7 +161,7 @@ Touch only what you must. Clean up only your own mess. When editing existing cod
161
161
  Define success criteria. Loop until verified. "Add validation" → write tests for invalid inputs, then make them pass. "Fix the bug" → write a test that reproduces it, then make it pass. For multi-step tasks, state a brief plan with verify checkpoints. Strong success criteria let you loop independently. Weak criteria require constant clarification.
162
162
  ```
163
163
 
164
- Sub-agents MUST NOT silently drop this block. The regression test `tests/unit/skills/karpathy-prompt-injection.test.ts` asserts this block is present. The canonical skill id for the full guidelines text is `andrej-karpathy-skills:karpathy-guidelines`.
164
+ Sub-agents MUST NOT silently drop this block. Nothing asserts its presence automatically — the unit test that did was deleted in `f17aa377`, so a dropped block fails silently. The canonical skill id for the full guidelines text is `andrej-karpathy-skills:karpathy-guidelines`.
165
165
 
166
166
  ## BDD Test Style Contract (effective rid-2026-08-05-bdd-test-style, v4.0.11+)
167
167
 
@@ -1,6 +1,6 @@
1
1
  # Peaks-Loop RD transition verification gates
2
2
 
3
- > Extracted from `skills/peaks-rd/SKILL.md` on 2026-06-09 (slice 019 — slim skill files to references) to keep SKILL.md under the 800-line cap from `common/coding-style.md`. The content below is the verbatim "Transition verification gates" section that was previously inline; nothing was paraphrased, just relocated.
3
+ > Extracted from `skills/bee/peaks-rd/SKILL.md` on 2026-06-09 (slice 019 — slim skill files to references) to keep SKILL.md under the 800-line cap from `.peaks/standards/common/coding-style.md`. The content below is the verbatim "Transition verification gates" section that was previously inline; nothing was paraphrased, just relocated.
4
4
 
5
5
  ## Transition verification gates (MANDATORY — full per-gate contract)
6
6
 
@@ -51,4 +51,4 @@ Legacy v1 envelopes use `result.dependencyDAG.edges` and `result.workUnits`. `Sc
51
51
  - No CC receives a `sliceId` outside its pass.
52
52
  - Child CCs run after their parent completes (when `parentSliceId` is set).
53
53
 
54
- See `../peaks-slice-decompose/SKILL.md` for the v2 envelope contract.
54
+ See `../../../peaks-slice-decompose/SKILL.md` for the v2 envelope contract.
@@ -44,11 +44,13 @@ v2.13.0 hard-deletes the legacy paths.
44
44
 
45
45
  ## Pinning
46
46
 
47
- - `tests/unit/rd/karpathy-skip-on-config-docs-chore.test.ts` — 6 cases pinning the 3-element `reviewerListFor('feat')` shape.
48
- - `tests/unit/rd/deprecated-reviewer-back-compat.test.ts` — 8 cases pinning `isDeprecatedReviewer` + the legacy-path acceptance.
49
- - `tests/unit/artifact-prerequisites-typed.test.ts` — back-compat for the prereq forms.
50
- - `tests/unit/parallel-fan-out.test.ts` — 18 cases pinning the 3-way SKILL.md + reference content.
51
- - `tests/unit/skills/karpathy-5way-fanout.test.ts` — 17 cases pinning the v2.12.0 collapse invariants.
47
+ **None.** The five unit-test files this section used to list — padding the
48
+ `reviewerListFor('feat')` shape, `isDeprecatedReviewer` + the legacy-path
49
+ acceptance, the prereq back-compat forms, the 3-way SKILL.md + reference
50
+ content, and the v2.12.0 collapse invariants — were all deleted in
51
+ `f17aa377` and have not been replaced. The behaviour itself lives in
52
+ `src/services/rd/reviewer-dispatch-policy.ts` and
53
+ `src/services/artifacts/artifact-prerequisites.ts`.
52
54
 
53
55
  ## Migration sequence
54
56
 
@@ -53,14 +53,14 @@ schemaVersion: '2.0'
53
53
  - `gateEvidence` — paths to the gate files peaks-qa will validate. Missing keys → Gate C failure.
54
54
  - `schemaVersion: '2.0'` — pinned (bumped from `'1.0'` in v2.11.0); bump only when the field set changes.
55
55
 
56
- > **v2.11.0 Group A change:** the validation tests at `tests/unit/artifacts/handoff-frontmatter-shape.test.ts` now assert `schemaVersion === '2.0'`. Files still carrying `'1.0'` will fail validation until upgraded.
56
+ > **v2.11.0 Group A change:** `schemaVersion` was bumped to `'2.0'`. The consumers listed under §Validation anchor on that value, so a file still carrying `'1.0'` is rejected at read time.
57
57
 
58
58
  ## Validation
59
59
 
60
- The frontmatter MUST parse as valid YAML. The regression test `tests/unit/artifacts/handoff-frontmatter-shape.test.ts` (≥ 4 cases) enforces (a) required fields present, (b) `gateEvidence` keys match the per-request-type matrix in `peaks-rd/SKILL.md` Gate C table, (c) `schemaVersion: '1.0'`. Run before commit:
60
+ The frontmatter MUST parse as valid YAML. Two automated consumers read it, and both anchor on `schemaVersion` + `sha256`: the `AUDIT_REQUIRES_HANDOFF` prereq in `src/services/artifacts/artifact-prerequisites.ts` and the independent audit services under `src/services/audit-independent/`. The serializer that writes it is `src/services/prd/handoff-frontmatter.ts`. No unit test pins the field set — the "regression test" this section used to name never existed in this repository — so required-field and `gateEvidence` completeness are conventions the publisher must honour.
61
61
 
62
62
  ```bash
63
- ./node_modules/.bin/vitest run tests/unit/artifacts/handoff-frontmatter-shape.test.ts
63
+ # No command validates the frontmatter today; review the consumers above by hand.
64
64
  ```
65
65
 
66
66
  ## Body (prose, free-form)
@@ -42,7 +42,7 @@ denied again after a long pause. That is the gate resetting, not you regressing.
42
42
 
43
43
  > **Read once at the top of this file; the rest of the skill is written against it.**
44
44
 
45
- The `.peaks/` workspace is partitioned by a **single scope axis** (session-id, at `.peaks/_runtime/<sessionId>/...`) with a nested **sub-agent axis** under `.peaks/_sub_agents/<sessionId>/...`. Use `<sessionId>` placeholders (NEVER bare `<sid>`). The peaks-loop change-id axis was removed in slice `2026-06-29-change-id-root-removal`; reviewable artifacts now live under `.peaks/_runtime/<sessionId>/<role>/...` only. OpenSpec's independent `openspec/changes/<change-id>/` vocabulary (L4) is preserved untouched. CLI mapping: session-id → `peaks session *`; sub-agent → `peaks sub-agent *`. Regression test `tests/unit/skills/skills-skill-md-naming.test.ts` enforces (a) zero bare `<sid>`, (b) every `.peaks/_runtime/<X>/` has an axis label, (c) this callout is present.
45
+ The `.peaks/` workspace is partitioned by a **single scope axis** (session-id, at `.peaks/_runtime/<sessionId>/...`) with a nested **sub-agent axis** under `.peaks/_sub_agents/<sessionId>/...`. Use `<sessionId>` placeholders (NEVER bare `<sid>`). The peaks-loop change-id axis was removed in slice `2026-06-29-change-id-root-removal`; reviewable artifacts now live under `.peaks/_runtime/<sessionId>/<role>/...` only. OpenSpec's independent `openspec/changes/<change-id>/` vocabulary (L4) is preserved untouched. CLI mapping: session-id → `peaks session *`; sub-agent → `peaks sub-agent *`. Normative by documentation only — the guard that once asserted (a) zero bare `<sid>`, (b) an axis label on every runtime path, and (c) this callout's presence was deleted in `457b9a87`. Comply by convention.
46
46
 
47
47
  ## peaks-context auto-build (v3.0)
48
48
 
@@ -81,7 +81,7 @@ MUST NOT invoke this skill — the `security-audit run` CLI exits with
81
81
 
82
82
  ## Workflow (5 steps)
83
83
 
84
- ### Step 1 — Detect (mirrors `detectEcc` from `services/code-review/ecc-bridge.ts`)
84
+ ### Step 1 — Detect (mirrors `detectEcc` from `src/services/code-review/ecc-bridge.ts`)
85
85
 
86
86
  ```bash
87
87
  peaks security-audit detect --rid <id> --sid <sid> --project <repo>
@@ -186,8 +186,8 @@ The `peaks-rd` aggregator picks up the artifact from
186
186
  - Schema: `.peaks/project-scan/audit-output-schema.md`
187
187
  - Service: `src/services/audit-independent/security-audit-service.ts`
188
188
  - CLI: `src/cli/commands/security-audit-commands.ts`
189
- - Tests: `tests/unit/services/audit-independent/security-audit-service.test.ts`
190
- - Companion: `skills/peaks-perf-audit/SKILL.md` (symmetric structure)
189
+ - Tests: none — the unit suite for the service was deleted in `f17aa377`.
190
+ - Companion: `skills/bee/peaks-perf-audit/SKILL.md` (symmetric structure)
191
191
 
192
192
  ## Karpathy alignment
193
193
 
@@ -172,4 +172,4 @@ The schema for new rows is documented in the template itself.
172
172
  - Service: `src/services/audit-independent/security-audit-service.ts`
173
173
  - Template: `.peaks/project-scan/security-template.md`
174
174
  - Schema: `.peaks/project-scan/audit-output-schema.md`
175
- - Companion: `skills/peaks-perf-audit/references/audit-protocol.md`
175
+ - Companion: `skills/bee/peaks-perf-audit/references/audit-protocol.md`
@@ -18,4 +18,4 @@ Do not dump full conversations into downstream artifacts.
18
18
 
19
19
  ## Durable project memory
20
20
 
21
- Only stable and reusable project facts should be marked for memory extraction. Use `.claude/memory` as the project-local primary source. Keep TXT capsules and skill-usage lessons in local `.peaks/_runtime/<session-id>/txt/` by default; let Peaks SC sync or commit them only after explicit authorization or an active profile that clearly permits it.
21
+ Only stable and reusable project facts should be marked for memory extraction. Use `.peaks/memory` as the project-local primary source. Keep TXT capsules and skill-usage lessons in local `.peaks/_runtime/<session-id>/txt/` by default; let Peaks SC sync or commit them only after explicit authorization or an active profile that clearly permits it.
@@ -244,7 +244,7 @@ Use gstack as a design-review workflow reference for the `Plan → Review → Te
244
244
  - map browser walkthrough concepts to UI regression seeds when runtime validation is approved;
245
245
  - keep accessibility, performance, and visual direction as Peaks-Loop UI acceptance inputs.
246
246
 
247
- For frontend work, especially full-auto mode, use the Playwright MCP to inspect the running page or prototype before accepting the UI direction. The LLM checks its own tool list for any Playwright MCP entry in the LLM tool list; if present, it invokes the tools by name directly (browser_navigate / browser_snapshot / browser_take_screenshot / browser_console_messages / browser_network_requests / browser_close) — no peaks-loop envelope. Playwright MCP launches a headed browser on demand; if the tool list is empty, the user installs via `claude mcp add playwright -- npx @playwright/mcp@latest` (Claude Code) or the IDE's own MCP install path. (Chrome DevTools MCP is a secondary surface that connects to an already-running Chrome via `--remote-debugging-port=9222`; it does NOT launch a browser on its own.) If login, CAPTCHA, SSO, or MFA appears, the visible browser is already open; wait for the user to complete login and explicitly confirm completion before continuing. Capture only sanitized visible regressions as UI feedback for design/RD; do not retain login URLs, cookies, headers, tokens, storage state, browser traces, or screenshots/logs containing PII or SSO/MFA material. Canonical browser workflow: `peaks-code/references/browser-workflow.md`.
247
+ For frontend work, especially full-auto mode, use the Playwright MCP to inspect the running page or prototype before accepting the UI direction. The LLM checks its own tool list for any Playwright MCP entry in the LLM tool list; if present, it invokes the tools by name directly (browser_navigate / browser_snapshot / browser_take_screenshot / browser_console_messages / browser_network_requests / browser_close) — no peaks-loop envelope. Playwright MCP launches a headed browser on demand; if the tool list is empty, the user installs via `claude mcp add playwright -- npx @playwright/mcp@latest` (Claude Code) or the IDE's own MCP install path. (Chrome DevTools MCP is a secondary surface that connects to an already-running Chrome via `--remote-debugging-port=9222`; it does NOT launch a browser on its own.) If login, CAPTCHA, SSO, or MFA appears, the visible browser is already open; wait for the user to complete login and explicitly confirm completion before continuing. Capture only sanitized visible regressions as UI feedback for design/RD; do not retain login URLs, cookies, headers, tokens, storage state, browser traces, or screenshots/logs containing PII or SSO/MFA material. Canonical browser workflow: `../../peaks-code/references/browser-workflow.md`.
248
248
 
249
249
  ## Prototype fidelity gate (MANDATORY — check BEFORE any design work)
250
250
 
@@ -41,7 +41,7 @@ denied again after a long pause. That is the gate resetting, not you regressing.
41
41
 
42
42
  > **Read once at the top of this file; the rest of the skill is written against it.**
43
43
 
44
- The `.peaks/` workspace is partitioned by a **single scope axis** (session-id, at `.peaks/_runtime/<sessionId>/...`) with a nested **sub-agent axis** under `.peaks/_sub_agents/<sessionId>/...`. Use `<sessionId>` placeholders (NEVER bare `<sid>`). The peaks-loop change-id axis was removed in slice `2026-06-29-change-id-root-removal`; reviewable artifacts now live under `.peaks/_runtime/<sessionId>/<role>/...` only. OpenSpec's independent `openspec/changes/<change-id>/` vocabulary (L4) is preserved untouched. CLI mapping: session-id → `peaks session *`; sub-agent → `peaks sub-agent *`. Regression test `tests/unit/skills/skills-skill-md-naming.test.ts` enforces (a) zero bare `<sid>`, (b) every `.peaks/_runtime/<X>/` has an axis label, (c) this callout is present.
44
+ The `.peaks/` workspace is partitioned by a **single scope axis** (session-id, at `.peaks/_runtime/<sessionId>/...`) with a nested **sub-agent axis** under `.peaks/_sub_agents/<sessionId>/...`. Use `<sessionId>` placeholders (NEVER bare `<sid>`). The peaks-loop change-id axis was removed in slice `2026-06-29-change-id-root-removal`; reviewable artifacts now live under `.peaks/_runtime/<sessionId>/<role>/...` only. OpenSpec's independent `openspec/changes/<change-id>/` vocabulary (L4) is preserved untouched. CLI mapping: session-id → `peaks session *`; sub-agent → `peaks sub-agent *`. Normative by documentation only — the guard that once asserted (a) zero bare `<sid>`, (b) an axis label on every runtime path, and (c) this callout's presence was deleted in `457b9a87`. Comply by convention.
45
45
 
46
46
  # Peaks-Loop Audit
47
47
 
@@ -44,8 +44,9 @@ denied again after a long pause. That is the gate resetting, not you regressing.
44
44
 
45
45
  `peaks-code` is a **code-domain long-task loop engineering orchestrator; not a general-purpose orchestrator.**
46
46
 
47
- This is RL-8 from the Loop Engineering crystallization design
48
- (`docs/superpowers/specs/2026-07-07-peaks-loop-loop-engineering-crystallization-design.md` §0.4 and §10 RL-8).
47
+ This is RL-8, stated in `.peaks/standards/loop-engineering-guidelines.md` (the 2026-07-07
48
+ crystallization design spec that first wrote it, §0.4 and §10, was retired from the tree in
49
+ commit `e6e35842`).
49
50
  The boundary is closed under this slice:
50
51
 
51
52
  - **In scope:** end-to-end code-domain workflows — repository scanning, RD planning, code implementation via RD, QA verification, UI changes inside a code repo, source-control handoff, and code-repo context packaging. Coordinated role skills: `peaks-prd`, `peaks-rd`, `peaks-qa`, `peaks-ui`, `peaks-sc`, `peaks-txt`.
@@ -55,11 +56,11 @@ The boundary is closed under this slice:
55
56
 
56
57
  ## Single-scope-axis naming convention (2.7.1)
57
58
 
58
- The `.peaks/` workspace has a **single scope axis** (session-id) plus a nested **sub-agent axis** under `.peaks/_sub_agents/<sessionId>/...`. Use `<sessionId>` (NEVER bare `<sid>`). Reviewable artifacts live at `.peaks/_runtime/<sessionId>/<role>/...` (gitignored); the change-id is an optional filename slug and does NOT route filesystem writes. CLI: session-id → `peaks session *`; sub-agent → `peaks sub-agent *`. Test `skills-skill-md-naming.test.ts` enforces (a) zero bare `<sid>`, (b) axis labels, (c) this callout.
59
+ The `.peaks/` workspace has a **single scope axis** (session-id) plus a nested **sub-agent axis** under `.peaks/_sub_agents/<sessionId>/...`. Use `<sessionId>` (NEVER bare `<sid>`). Reviewable artifacts live at `.peaks/_runtime/<sessionId>/<role>/...` (gitignored); the change-id is an optional filename slug and does NOT route filesystem writes. CLI: session-id → `peaks session *`; sub-agent → `peaks sub-agent *`. Normative by documentation only — the guard that once asserted (a) zero bare `<sid>`, (b) axis labels, and (c) this callout's presence was deleted in `457b9a87`. Comply by convention.
59
60
 
60
61
  ## Karpathy guidance (Slice 1/6 — karpathy prompt-injection-lift)
61
62
 
62
- Every sub-agent dispatch (`peaks-prd`, `peaks-rd`, `peaks-qa`, `peaks-ui`, `peaks-sc`, `peaks-txt`) MUST receive the 4 Karpathy guidelines. Append the verbatim block from `peaks-rd/references/rd-sub-agent-dispatch.md` §"Karpathy-guidelines context" to the dispatch prompt. Canonical skill id: `andrej-karpathy-skills:karpathy-guidelines`. Summary: **#1 Think Before Coding**, **#2 Simplicity First**, **#3 Surgical Changes**, **#4 Goal-Driven Execution**.
63
+ Every sub-agent dispatch (`peaks-prd`, `peaks-rd`, `peaks-qa`, `peaks-ui`, `peaks-sc`, `peaks-txt`) MUST receive the 4 Karpathy guidelines. Append the verbatim block from `skills/bee/peaks-rd/references/rd-sub-agent-dispatch.md` §"Karpathy-guidelines context" to the dispatch prompt. Canonical skill id: `andrej-karpathy-skills:karpathy-guidelines`. Summary: **#1 Think Before Coding**, **#2 Simplicity First**, **#3 Surgical Changes**, **#4 Goal-Driven Execution**.
63
64
 
64
65
  ## Hard ban (effective 2.8.3 — read every session, no exceptions)
65
66
 
@@ -71,7 +72,7 @@ Peaks-Loop Code is the orchestration facade for the Peaks-Loop short skill famil
71
72
 
72
73
  ## 产品定位(2026-06-28 校准)
73
74
 
74
- > peaks-loop 真实定位 = 24h AI 程序员编排器;user 角色 = 业务/产品审阅者,不参与技术决策。详见 `.peaks/memory/peaks-loop-24h-ai-programmer-positioning.md`。
75
+ > peaks-loop 真实定位 = 24h AI 程序员编排器;user 角色 = 业务/产品审阅者,不参与技术决策。详见 `.peaks/memory/peaks-cli-24h-ai-programmer-positioning.md`。
75
76
 
76
77
  ## Skill-first architecture note (read once, internalise)
77
78
 
@@ -90,7 +91,7 @@ This skill is the **primary surface**. The `peaks <cmd>` CLI is **auxiliary**
90
91
  | `tests/integration/` | `tests/integration/x.test.ts` |
91
92
  | `config/` | `config/peaks.json`, `tsconfig.json` |
92
93
  | `bin/` | `bin/peaks.js` |
93
- | `scripts/` | `scripts/release.sh` |
94
+ | `scripts/` | `scripts/release-pack.mjs` |
94
95
 
95
96
  ANY direct `Edit` / `Write` / `MultiEdit` of these paths from the orchestrator context is a **hard error**. The orchestrator's role is ONLY to dispatch sub-agents; it never owns a code-change tool call against these families.
96
97
 
@@ -123,7 +124,7 @@ STOP. Run:
123
124
  peaks sub-agent dispatch rd --prompt '<your task>' --graph-node <nid> --workflow-id <wid> --request-id <rid> --project . --batch-id <uuid> --json
124
125
  ```
125
126
 
126
- `--graph-node <nid>` is REQUIRED (RD §4 D4c). Prepare the node first: `peaks workflow init --skill peaks-code`, then `peaks workflow node prepare --workflow <wid> --node <nid> --kind dispatch`. The RD sub-agent owns the actual `Edit`/`Write`/`MultiEdit` tool calls against source code. The orchestrator only emits the dispatch request.
127
+ `--graph-node <nid>` and `--workflow-id <wid>` are OPTIONAL. Slice 4.0.8 RD §4 D4c made `--graph-node` required; it was relaxed again in `provisionDispatchNode` (`src/services/workflow/provision-dispatch-node.ts`) because the requirement was enforced but never validated — nothing downstream read the node, the record writer's graph transition is best-effort, and the documented "prepare a node first" ritual had no viable first step (`peaks workflow node prepare` never persisted the node). Passing neither flag now provisions the node and the graph on demand, so a dispatch works in a project with no graph infrastructure. When you DO pass a node, the binding is real: `provisionDispatchNode` writes it into `graphs/<wid>.json`. The RD sub-agent owns the actual `Edit`/`Write`/`MultiEdit` tool calls against source code. The orchestrator only emits the dispatch request.
127
128
 
128
129
  **Anti-pattern:** directly calling `Edit`/`Write`/`MultiEdit` on `src/**` from the orchestrator session because "the change is tiny" / "it's just one line" / "the dispatch overhead is too high" / "the LLM feels confident". None of these override the Code-Gate; the probe + the hook both fail-closed.
129
130
 
@@ -138,7 +139,7 @@ peaks sub-agent dispatch rd --prompt '<your task>' --graph-node <nid> --workflow
138
139
  **Integration surfaces:** `peaks code run --24h` / `peaks dashboard long-run --since 24h` / `peaks session 24h-mode state|transition|attempts|reset`.
139
140
 
140
141
  **Red lines (peaks-code side):**
141
- - No auto-compact prose ban: never write "ask the user to compact" / "prompt the user to run `/compact`" / "the user should run `peaks code auto-compact` manually" / "the user is responsible for context management" / legacy 50/75/90 percent tiers. **0.85 / 0.95 contract is mandatory.**
142
+ - No auto-compact prose ban: never write "ask the user to compact" / "prompt the user to run `/compact`" / "the user should run `peaks code auto-compact` manually" / "the user is responsible for context management" / legacy 50/75/90 percent tiers. **Tier contract (standard mode): `auto-fire` ≥ 0.80 / `pre-compact` ≥ 0.85 / `red-line` ≥ 0.95. Compact on the FIRST of these to arrive — 0.80, not 0.85.**
142
143
  - SquabbyZ sole-author rule: no `Co-Authored-By: Claude/Anthropic` trailer.
143
144
  - 24h mode is a flag on `peaks-code`; MUST NOT introduce a sibling `peaks-24h` skill or competing top-level verb.
144
145
 
@@ -185,7 +186,7 @@ Before the first planning action, run `peaks fresh-context preflight --prompt "<
185
186
  1. **PreToolUse hook — `peaks code gate-step-08`.** Installed by `peaks workspace init` on the `Bash` matcher; checks `job-shape.json` presence + fail-closed backup regex. If `job-shape.json` AND `progress.json` exist, surfaces `Next: slice #N of M (<currentSlice>)` so the LLM cannot wake up cold.
186
187
  2. **Size-fear ban — `peaks code emit-handoff`.** Refuses to emit a final handoff while `remaining > 0` under Job mode. Pass `--force-under-job` only with explicit user approval.
187
188
  3. **On-disk slice progress — `peaks job progress`.** `peaks job checkpoint --state done` writes `progress.json`. `peaks job progress --job-id <jid> [--allow-missing]` is the canonical reader.
188
- 4. **Forced auto-compact — `peaks code context-now`.** It returns `action: 'auto-compact-now'` at ≥ 0.85. **≥ 0.85 is MANDATORY auto-compact in every mode (single-rid included)** — Code MUST call `peaks code auto-compact` without confirmation. `--enforce-job-mode` (v3.1.2) only labels the run `jobMode=true`; the ≥ 0.85 downgrade that used to apply to single-rid sessions was removed 2026-09-12.
189
+ 4. **Forced auto-compact — two probes, two thresholds.** `peaks skill presence` (the every-turn probe) reports `action: 'auto-fire'` at ≥ 0.80 and `action: 'pre-compact'` at ≥ 0.85; `peaks code context-now` reports `action: 'auto-compact-now'` at ≥ 0.85 — it has no 0.80 tier. **The earlier of the two governs: at ≥ 0.80 the run is already MANDATORY auto-compact in every mode (single-rid included)** — Code MUST call `peaks code auto-compact` without confirmation, and MUST NOT wait for 0.85. `--enforce-job-mode` (v3.1.2) only labels the run `jobMode=true`; the ≥ 0.85 downgrade that used to apply to single-rid sessions was removed 2026-09-12.
189
190
 
190
191
  **Step 0.7 resume rule (read-FIRST):** on resume, `peaks code gate-step-08` reads `progress.json` first and surfaces `Next: slice #N of M (<currentSlice>)` so the orchestrator picks up at the right slice without re-reading the artifact tree.
191
192
 
@@ -197,24 +198,25 @@ Before the first planning action, run `peaks fresh-context preflight --prompt "<
197
198
 
198
199
  > **Zero-pause contract.** When context usage crosses the pre-compact threshold, peaks-loop **automatically fires `peaks code auto-compact` — the LLM does NOT prompt the user to run `/compact` manually**. Stale prose that says "ask the user to compact" silently stalls the workflow. The v2.13.0 contract makes auto-compact a system responsibility, not a user action.
199
200
 
200
- **Thresholds (v2.13.0, replacing legacy 50/75/90):**
201
+ **Thresholds (standard mode, replacing legacy 50/75/90; `partial` / 24h mode moves every line down to 0.65 / 0.70 / 0.85):**
201
202
 
202
203
  | ratio zone | zone name | action |
203
204
  |---|---|---|
204
- | `< 0.85` | normal | skip — LLM keeps working |
205
- | `0.85 ≤ ratio < 0.95` | **pre-compact zone** | `peaks code auto-compact` fires **automatically** (deferred only when in-flight sub-agent batch is running; fires the moment the batch lands). The LLM does not prompt the user. |
205
+ | `< 0.80` | normal | skip — LLM keeps working |
206
+ | `0.80 ≤ ratio < 0.85` | **auto-fire zone** | `peaks skill presence` returns `action: 'auto-fire'` here: peaks-loop preempts on its own, without asking the LLM to decide. The LLM MUST run `peaks code auto-compact` and MUST NOT wait for 0.85. **This is the tier that fires first, so this row — not the 0.85 row — is the real trigger line.** `peaks code context-now` has no 0.80 tier and still reports `soft-warn` here, so its `action` alone under-reports this band. |
207
+ | `0.85 ≤ ratio < 0.95` | **pre-compact zone** | `peaks code auto-compact` fires **automatically** (deferred only when in-flight sub-agent batch is running; fires the moment the batch lands). The LLM does not prompt the user. In practice peaks-loop already fired at the 0.80 tier above, so this band is today the "already fired" zone; `peaks code context-now` reports `action: 'auto-compact-now'` from 0.85 up. |
206
208
  | `ratio ≥ 0.95` | **red-line (Karpathy §4)** | `peaks code auto-compact` invoked immediately; `peaks code context-now` returns `action: 'red-line'`. **Since 4.0.47 the red line REQUESTS the compaction and says it is waiting — it does NOT block sub-agent dispatch, and it does not refuse to advance.** Keep working and re-probe with `peaks code context-now`; the harness performs the compaction, and nothing peaks-loop can do lowers the ratio on its own, so blocking here was a deadlock rather than a gate. If the ratio keeps climbing and no compaction lands, report that and hand control back — do not stall. `--bypass-red-line` is a no-op. |
207
209
 
208
210
  **Probe primitive (single source of truth):** `peaks code context-now --json`. Do NOT use `peaks context check --prompt-size` (deprecated, will silently under-report ratio). Returns `{ ratio, action: 'ok' | 'soft-warn' | 'auto-compact-now' | 'red-line' }` — Code reads `action` and dispatches `peaks code auto-compact` on `auto-compact-now` or `red-line` without user confirmation.
209
211
 
210
212
  **Enforcement layers (defense in depth):**
211
213
  1. `src/services/code/auto-compact-orchestrator.ts` — `evaluateAutoCompactDecision` default-returns `shouldCompact: true` for both `pre-compact` and `red-line`. Only deferral is `inFlightBatch.hasInFlightBatch` (D6.e); no LLM/human approval branch.
212
- 2. `peaks code context-now` — ≥ 0.85 is MANDATORY (`auto-compact-now`) in every mode; `--enforce-job-mode` no longer gates that (2026-09-12). Only an in-flight sub-agent batch defers it.
214
+ 2. `peaks skill presence` — ≥ 0.80 is MANDATORY (`auto-fire`) in every mode; this probe runs every turn, so it is the one that cannot be forgotten. `peaks code context-now` — ≥ 0.85 is MANDATORY (`auto-compact-now`) in every mode; `--enforce-job-mode` no longer gates that (2026-09-12). Only an in-flight sub-agent batch defers it.
213
215
  3. `peaks code gate-step-08` (PreToolUse hook) — surfaces `auto-compact-now` on every Bash call when ratio is in the zone, so the LLM cannot wake up cold and forget.
214
216
  4. Karpathy §4 exception: `peaks code auto-compact` is fired *by the orchestrator*, not by the user. If you find yourself about to write "ask the user to compact" / "prompt the user to run `/compact`", STOP — that is the regression.
215
217
 
216
218
  **Anti-pattern (DO NOT introduce):** any of these strings in skills/* or comments signals the zero-pause contract has been broken:
217
- - "ask the user to compact" / "prompt the user to run `/compact`" / "the user should run `peaks code auto-compact` manually" / "the user is responsible for context management" / legacy mid/seventy-five/ninety percent tiers (current is 0.85 / 0.95).
219
+ - "ask the user to compact" / "prompt the user to run `/compact`" / "the user should run `peaks code auto-compact` manually" / "the user is responsible for context management" / legacy mid/seventy-five/ninety percent tiers (current is 0.80 auto-fire / 0.85 pre-compact / 0.95 red-line).
218
220
 
219
221
  If the prose audit (`peaks audit red-lines`) flags any of the above, the slice is **blocked** until the prose is rewritten.
220
222
 
@@ -296,7 +298,7 @@ The 6-type table + 11-step order + 7 transition gates (A-G) live in `references/
296
298
 
297
299
  > **Slice 5:** when the slice DAG has ≥ 2 leaves at one topological level, dispatch via `peaks sub-agent dispatch --from-dag <dag-file>` (wall-time ≈ max, not sum).
298
300
 
299
- Write DAG → `.peaks/_runtime/<sessionId>/sc/slice-dag.json`, run `peaks sub-agent dispatch --from-dag <dag-file> --batch-id <id>` once; orchestrator emits N parallel `buildToolCall` (`dispatchCount === N`). 主路径 = 唯一蜂群;config/docs/chore 跳过不打断。详见 `.peaks/memory/peaks-loop-24h-ai-programmer-positioning.md`。
301
+ Write DAG → `.peaks/_runtime/<sessionId>/sc/slice-dag.json`, run `peaks sub-agent dispatch --from-dag <dag-file> --batch-id <id>` once; orchestrator emits N parallel `buildToolCall` (`dispatchCount === N`). 主路径 = 唯一蜂群;config/docs/chore 跳过不打断。详见 `.peaks/memory/peaks-cli-24h-ai-programmer-positioning.md`。
300
302
 
301
303
  ### Hard constraint: fan-out is mandatory (slice 2026-06-24-audit-5th-p2)
302
304
 
@@ -306,7 +308,7 @@ Write DAG → `.peaks/_runtime/<sessionId>/sc/slice-dag.json`, run `peaks sub-ag
306
308
 
307
309
  ## Slice 调度:分层并行 + 上游同步(2026-06-28 校准)
308
310
 
309
- > 分层并行(G12)+ 上游同步(G11)见 `.peaks/memory/peaks-loop-fork-sync-and-layered-parallel.md`。
311
+ > 分层并行(G12)+ 上游同步(G11)见 `.peaks/memory/peaks-cli-fork-sync-and-layered-parallel.md`。
310
312
 
311
313
  ## Peaks-Loop Mandatory RD QA repair loop (AUTO-PROCEED)
312
314
 
@@ -316,7 +318,7 @@ After `peaks-rd` finishes, Code MUST auto-route to `peaks-qa` without waiting fo
316
318
 
317
319
  The end-to-end CLI sequence for `full-auto` lives in `references/runbook.md`. `assisted`/`strict` pause at `[CONFIRM]`; `full-auto`/`24h` auto-proceed. At a `[CONFIRM]` gate the CLI never prompts: the transition throws `CONFIRMATION_REQUIRED`, so Code asks the user via `AskUserQuestion` and, on approval, re-runs the same command with `--confirm`. Never expect or ask for a terminal `y/N` prompt.
318
320
 
319
- When adding new CLI commands, mirror into `references/runbook.md` and `tests/unit/skill-default-runbook.test.ts` (test falls back to the reference).
321
+ When adding new CLI commands, mirror into `references/runbook.md` (the CLI falls back to that reference; no test asserts the mirror).
320
322
 
321
323
  ## RD micro-cycle (TDD small-step rapid-test loop)
322
324
 
@@ -368,4 +370,4 @@ Three CLI primitives: `peaks sub-agent share / shared-read / await` (last-write-
368
370
 
369
371
  ## References
370
372
 
371
- Index of every `references/` file. Read on demand. The 35 reference files are listed in `references/references-index.md` (auto-generated, kept outside the SKILL.md byte cap). Top-5 by usage: `runbook.md`, `sub-agent-dispatch.md`, `micro-cycle.md`, `worktree-governance.md`, `workflow-gates-and-types.md`.
373
+ Index of every `references/` file. Read on demand. There is no separate generated index — list `references/` directly (kept outside the SKILL.md byte cap). Top-5 by usage: `runbook.md`, `sub-agent-dispatch.md`, `micro-cycle.md`, `worktree-governance.md`, `workflow-gates-and-types.md`.
@@ -203,4 +203,4 @@ Two layers:
203
203
  - **CLI 兜底** — `peaks sub-agent dispatch` validates prompt size; `--force` allowed.
204
204
  - **PreToolUse hook** — `peaks sub-agent-dispatch-guard` re-validates; **NO `--force`** at hook layer (RL-30 strict).
205
205
 
206
- The sub-agent prompt template (G8.6 + G9 self-check) is in `references/context-governance.md`.
206
+ The sub-agent prompt template (G8.6 + G9 self-check) is in `context-governance.md`.
@@ -50,7 +50,6 @@ trae / trae-cn / cursor 30s, codex 45s, claude-code 60s; uniform
50
50
  - Contract store: `src/services/dispatch/contract-store.ts`
51
51
  - CLI surface: `peaks sub-agent dispatch --from-dag <file> --batch-id <id>`
52
52
  and `peaks sub-agent await --batch <id> [--timeout <ms>]`
53
- - Tests: `tests/unit/code/dag-orchestrator.test.ts` (cancel-on-fail),
54
- `tests/unit/dispatch/run-dag-dogfood-mvp.test.ts` (MVP dogfood),
55
- `tests/unit/dispatch/slice-dag-dispatcher-5ide-dogfood.test.ts`
56
- (5 IDE end-to-end).
53
+ - Tests: none. The three suites that covered this — cancel-on-fail,
54
+ MVP dogfood, and the 5-IDE end-to-end — were deleted in `f17aa377`
55
+ and have not been replaced.
@@ -12,4 +12,4 @@ Do not run upstream installer flows, mutate agent settings, or commit `.codegrap
12
12
 
13
13
  **MCP lifecycle**: `list → plan → apply --yes → call → rollback`. `apply` backs up settings and refuses non-peaks entries unless `--claim` is passed.
14
14
 
15
- Detailed rules: `references/external-skill-invocation.md`, `references/workflow.md`, `references/existing-system-extraction.md`. For an informational mapping of peaks artefact paths to the A2A (Agent2Agent) protocol's Task / Artifact / Part / Message / AgentCard vocabulary (no A2A implementation, just a shared naming layer), see `references/a2a-artifact-mapping.md`.
15
+ Detailed rules: `external-skill-invocation.md`, `workflow.md`, `existing-system-extraction.md`. For an informational mapping of peaks artefact paths to the A2A (Agent2Agent) protocol's Task / Artifact / Part / Message / AgentCard vocabulary (no A2A implementation, just a shared naming layer), see `a2a-artifact-mapping.md`.
@@ -85,7 +85,7 @@ When the user (or the active IDE skill picker) suggests invoking `superpowers:br
85
85
  2. **Reference-only invocation** — invoke the superpowers skill as **reference material**. The output (a brainstorming map, a plan, a TDD recipe, etc.) is read; it is not executed as the workflow body. Quote the methods/surfaces the peaks-rd plan borrows; never persist or "execute" the superpowers output verbatim.
86
86
  3. **Re-author through peaks-rd** — re-author the borrowed plan as a peaks-rd artefact at `.peaks/_runtime/<sessionId>/rd/requests/<rid>.md`. peaks-rd owns the slice contract, the rollback plan, and the test plan. The superpowers output may inform the prose; it does not replace the peaks-rd envelope.
87
87
  4. **Continue peaks-code** — from Step 3 (sub-agent fan-out) onward. Do NOT call `superpowers:executing-plans` or `superpowers:subagent-driven-development` to run the resulting plan; use `peaks sub-agent dispatch rd` / `peaks sub-agent dispatch qa` instead.
88
- 5. **Do not edit upstream** — the `superpowers:writing-plans` and `superpowers:brainstorming` upstream SKILL.md files are owned by the superpowers npm/Claude-Code skill distribution. Any direct edit is silently overwritten on the next `claude install skill superpowers:<skill>` refresh. If a user-facing bridge is needed, place it in `peaks-code/SKILL.md` (BRIDGE chapter), `peaks-code/references/runbook.md` (Step 2.7), `peaks-code/references/boundaries.md` (superpowers red lines), and this file (transition contract).
88
+ 5. **Do not edit upstream** — the `superpowers:writing-plans` and `superpowers:brainstorming` upstream SKILL.md files are owned by the superpowers npm/Claude-Code skill distribution. Any direct edit is silently overwritten on the next `claude install skill superpowers:<skill>` refresh. If a user-facing bridge is needed, place it in `skills/peaks-code/SKILL.md` (BRIDGE chapter), `skills/peaks-code/references/runbook.md` (Step 2.7), `skills/peaks-code/references/boundaries.md` (superpowers red lines), and this file (transition contract).
89
89
  6. **Mandatory closure** — when the request is complete, run `peaks request transition` through `spec-locked → implemented → qa-handoff → handed-off` and `peaks memory extract`. A half-finished state file under `.peaks/_runtime/<sessionId>/` is treated as pollution.
90
90
 
91
91
  ### What peaks-code MUST NOT do
@@ -96,4 +96,4 @@ When the user (or the active IDE skill picker) suggests invoking `superpowers:br
96
96
 
97
97
  ### Phrase the audit looks for
98
98
 
99
- When a peaks-code skill body mentions a superpowers skill by name, the body MUST include all four: a "reference only" qualifier, a "do not auto-run" clause, a "re-author through peaks-rd" clause, and a "Peaks artefacts remain authoritative" clause. The `tests/unit/skills/peaks-code-superpowers-bridge.test.ts` guard test enforces this on every peaks-* SKILL.md.
99
+ When a peaks-code skill body mentions a superpowers skill by name, the body MUST include all four: a "reference only" qualifier, a "do not auto-run" clause, a "re-author through peaks-rd" clause, and a "Peaks artefacts remain authoritative" clause. No guard test enforces this across peaks-* SKILL.md today — the bridge guard this paragraph used to name never existed in this repository — so the rule is held by review.
@@ -95,9 +95,9 @@ shape it had pre-slice — the difference is that anything outside
95
95
 
96
96
  ## Tests
97
97
 
98
- - `tests/unit/code/skills-code-fanout-mandatory.test.ts` — pins that
99
- SKILL.md still mentions `--from-dag`, does NOT mention `serial`
100
- opt-out, and references `references/fanout-mandatory.md`.
98
+ - Nothing pins the SKILL.md wording (`--from-dag` present, no `serial`
99
+ opt-out, `fanout-mandatory.md` referenced) — the suite that did was
100
+ deleted in `f17aa377` and has not been replaced.
101
101
  - `tests/integration/code/multi-sub-agent-fanout.test.ts` — pins the
102
102
  runtime fan-out behavior; not affected by this slice.
103
103
 
@@ -1,6 +1,6 @@
1
1
  # Peaks-Loop Frontend-only development mode
2
2
 
3
- > Extracted from `skills/peaks-code/SKILL.md` on 2026-06-09 (slice 019 — slim skill files to references) to keep SKILL.md under the 800-line cap from `common/coding-style.md`. The content below is the verbatim Frontend-only development mode section that was previously inline; nothing was paraphrased, just relocated.
3
+ > Extracted from `skills/peaks-code/SKILL.md` on 2026-06-09 (slice 019 — slim skill files to references) to keep SKILL.md under the 800-line cap from `.peaks/standards/common/coding-style.md`. The content below is the verbatim Frontend-only development mode section that was previously inline; nothing was paraphrased, just relocated.
4
4
  >
5
5
  > **2026-09-12 (`rd-routing-by-integration-mode`):** this file is now the routing home for all three integration modes, not just `prd-only`. `### Integration-mode routing (RD)` was added and the boolean-era text in `### Mode determination` was retargeted onto `.integrationMode`; the mock table and placeholder layout below belong to `prd-only`.
6
6
 
@@ -55,7 +55,7 @@ RD reads `.integrationMode` from `## Project mode` in `.peaks/project-scan/proje
55
55
  3. **Boundary:** write the mapper against the *interface*, never against the mock module. That is what keeps the guess cheap: when the real document lands, the mock file is deleted and the mapper's import target changes — no component, hook, or store is touched.
56
56
  4. **Produces:** `mock-plan.md`, the `*-api.types.ts` interfaces, `mock/<feature>-mock.ts`, and the mapper.
57
57
  5. **MUST NOT** write mock data inline in a component file — mock files live in the mock directory, and an inline mock literal in a changed file under `src/` fails `rl-mock-placement-001`. Every mock file carries the `// MOCK: Replace with real API call when swagger.json is available` header (mock rule 4 below).
58
- 6. **Exit path:** when a document appears, run `peaks scan api-diff <doc> --project <repo>` and follow §"Mock-to-real migration path" below. **Not checkable in this repo:** nothing detects "a real document now exists for this domain" automatically, and the conditional contract artifact (`.peaks/api-contract.json` with staleness detection, design spec §2.6 / S3) is **not built**. Until it is, step 1 of the migration is a run RD schedules manually.
58
+ 6. **Exit path:** when a document appears, run `peaks scan api-diff <doc> --project <repo>` and follow §"Mock-to-real migration path" below. **Not checkable in this repo:** nothing detects "a real document now exists for this domain" automatically, and the conditional contract artifact under `.peaks/` (with staleness detection, design spec §2.6 / S3) is **not built**. Until it is, step 1 of the migration is a run RD schedules manually.
59
59
 
60
60
  ### Mock data strategy selection
61
61