peaks-loop 4.0.50 → 4.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/README-en.md +1 -1
- package/README.md +1 -1
- package/dist/cli/commands/baseline-commands.js +11 -1
- package/dist/cli/commands/codegraph-command-runtime.d.ts +28 -0
- package/dist/cli/commands/codegraph-command-runtime.js +72 -0
- package/dist/cli/commands/codegraph-commands.d.ts +2 -11
- package/dist/cli/commands/codegraph-commands.js +173 -228
- package/dist/cli/commands/codegraph-status-command.d.ts +22 -0
- package/dist/cli/commands/codegraph-status-command.js +299 -0
- package/dist/cli/commands/core/memory-command.js +6 -2
- package/dist/cli/commands/job-commands.js +121 -30
- package/dist/cli/commands/project-commands.js +13 -3
- package/dist/cli/commands/request-commands.js +19 -8
- package/dist/cli/commands/share-commands.js +85 -18
- package/dist/cli/commands/slice-commands.js +2 -2
- package/dist/services/artifacts/artifact-prerequisites.js +23 -1
- package/dist/services/codegraph/codegraph-autorefresh.d.ts +16 -0
- package/dist/services/codegraph/codegraph-autorefresh.js +51 -5
- package/dist/services/codegraph/codegraph-config-repair-writer.d.ts +88 -0
- package/dist/services/codegraph/codegraph-config-repair-writer.js +322 -0
- package/dist/services/codegraph/codegraph-exclude-integrity.d.ts +20 -2
- package/dist/services/codegraph/codegraph-exclude-integrity.js +24 -3
- package/dist/services/codegraph/codegraph-exclude-reconciler.d.ts +23 -2
- package/dist/services/codegraph/codegraph-exclude-reconciler.js +123 -12
- package/dist/services/codegraph/codegraph-exclude-repair.d.ts +109 -55
- package/dist/services/codegraph/codegraph-exclude-repair.js +249 -195
- package/dist/services/codegraph/codegraph-include-reconciler.d.ts +10 -0
- package/dist/services/codegraph/codegraph-include-reconciler.js +160 -0
- package/dist/services/codegraph/codegraph-index-integrity.d.ts +268 -0
- package/dist/services/codegraph/codegraph-index-integrity.js +471 -0
- package/dist/services/codegraph/codegraph-service.d.ts +54 -0
- package/dist/services/codegraph/codegraph-service.js +84 -1
- package/dist/services/dispatch/sub-agent-dispatcher.d.ts +11 -30
- package/dist/services/dispatch/sub-agent-dispatcher.js +5 -48
- package/dist/services/doctor/doctor-service/checks/codegraph-exclude-integrity.js +19 -4
- package/dist/services/doctor/doctor-service/checks/codegraph-index-integrity.d.ts +54 -0
- package/dist/services/doctor/doctor-service/checks/codegraph-index-integrity.js +151 -0
- package/dist/services/doctor/doctor-service/checks/l3-orphan-sessions.js +10 -10
- package/dist/services/doctor/doctor-service/plugin-registry.js +2 -0
- package/dist/services/doctor/doctor-service/types.d.ts +25 -0
- package/dist/services/ide/adapters/claude-code-adapter.js +0 -1
- package/dist/services/ide/adapters/codex-adapter.js +1 -2
- package/dist/services/ide/adapters/cursor-adapter.js +1 -2
- package/dist/services/ide/adapters/hermes-adapter.js +1 -2
- package/dist/services/ide/adapters/openclaw-adapter.js +1 -2
- package/dist/services/ide/adapters/qoder-adapter.js +1 -2
- package/dist/services/ide/adapters/tongyi-lingma-adapter.js +1 -2
- package/dist/services/ide/adapters/trae-adapter.js +1 -2
- package/dist/services/ide/adapters/zcode-adapter.js +0 -1
- package/dist/services/ide/ide-types.d.ts +0 -2
- package/dist/services/memory/project-memory-service/index/kind-dispatch.js +48 -13
- package/dist/services/memory/project-memory-service/index.d.ts +5 -3
- package/dist/services/memory/project-memory-service/index.js +2 -2
- package/dist/services/memory/project-memory-service/parsers/frontmatter.d.ts +15 -1
- package/dist/services/memory/project-memory-service/parsers/frontmatter.js +34 -6
- package/dist/services/memory/project-memory-service/parsers/markdown-pure.d.ts +27 -1
- package/dist/services/memory/project-memory-service/parsers/markdown-pure.js +92 -7
- package/dist/services/memory/project-memory-service/types.d.ts +86 -0
- package/dist/services/slice/slice-check-types.d.ts +1 -1
- package/dist/services/workspace/runtime-layout.d.ts +91 -0
- package/dist/services/workspace/runtime-layout.js +148 -0
- package/dist/services/workspace/workspace-claude-settings-materializer.js +14 -0
- package/package.json +6 -6
- package/scripts/clean-dist.mjs +15 -3
- package/scripts/sync-version.mjs +26 -4
- package/skills/bee/peaks-perf-audit/SKILL.md +2 -2
- package/skills/bee/peaks-perf-audit/references/audit-protocol.md +1 -1
- package/skills/bee/peaks-prd/SKILL.md +4 -4
- package/skills/bee/peaks-prd/references/prd-for-multi-pass.md +1 -1
- package/skills/bee/peaks-prd/references/workflow.md +1 -1
- package/skills/bee/peaks-qa/SKILL.md +6 -6
- package/skills/bee/peaks-qa/references/external-capability-guidance.md +1 -1
- package/skills/bee/peaks-qa/references/qa-fanout-contract.md +1 -1
- package/skills/bee/peaks-qa/references/qa-skill-presence.md +1 -1
- package/skills/bee/peaks-qa/references/reading-handoff-frontmatter.md +2 -2
- package/skills/bee/peaks-rd/SKILL.md +2 -2
- package/skills/bee/peaks-rd/references/code-reviewer-4dim-hint.md +1 -1
- package/skills/bee/peaks-rd/references/external-references.md +1 -1
- package/skills/bee/peaks-rd/references/mandatory-perf-baseline.md +1 -1
- package/skills/bee/peaks-rd/references/ocr-multilang-1.8.md +2 -2
- package/skills/bee/peaks-rd/references/parallel-review-fanout.md +2 -2
- package/skills/bee/peaks-rd/references/rd-fanout-contracts.md +11 -8
- package/skills/bee/peaks-rd/references/rd-runbook.md +1 -1
- package/skills/bee/peaks-rd/references/rd-sub-agent-dispatch.md +7 -7
- package/skills/bee/peaks-rd/references/rd-transition-gates.md +1 -1
- package/skills/bee/peaks-rd/references/reading-v2-slice-results.md +1 -1
- package/skills/bee/peaks-rd/references/skill-presence-and-title.md +1 -1
- package/skills/bee/peaks-rd/references/v2-12-fanout-collapse.md +7 -5
- package/skills/bee/peaks-rd/references/writing-handoff-frontmatter.md +3 -3
- package/skills/bee/peaks-reviewer/SKILL.md +1 -1
- package/skills/bee/peaks-sc/SKILL.md +1 -1
- package/skills/bee/peaks-security-audit/SKILL.md +3 -3
- package/skills/bee/peaks-security-audit/references/audit-protocol.md +1 -1
- package/skills/bee/peaks-txt/SKILL.md +3 -3
- package/skills/bee/peaks-txt/references/context-capsule.md +1 -1
- package/skills/bee/peaks-ui/SKILL.md +1 -1
- package/skills/peaks-audit/SKILL.md +1 -1
- package/skills/peaks-code/SKILL.md +9 -9
- package/skills/peaks-code/references/context-governance.md +1 -1
- package/skills/peaks-code/references/dag-orchestrator.md +3 -4
- package/skills/peaks-code/references/external-references.md +1 -1
- package/skills/peaks-code/references/external-skill-invocation.md +2 -2
- package/skills/peaks-code/references/fanout-mandatory.md +3 -3
- package/skills/peaks-code/references/frontend-only-mode.md +2 -2
- package/skills/peaks-code/references/gstack-integration.md +1 -1
- package/skills/peaks-code/references/micro-cycle.md +1 -1
- package/skills/peaks-code/references/periodic-checkpoint.md +2 -2
- package/skills/peaks-code/references/project-memory-loading.md +19 -1
- package/skills/peaks-code/references/project-scan-checklist.md +1 -1
- package/skills/peaks-code/references/resume-detection.md +1 -1
- package/skills/peaks-code/references/runbook.md +3 -3
- package/skills/peaks-code/references/session-overload-signal-index.md +2 -2
- package/skills/peaks-code/references/startup-sequence.md +16 -16
- package/skills/peaks-code/references/step-11-memory-sediment.md +3 -3
- package/skills/peaks-code/references/sub-agent-dispatch.md +7 -6
- package/skills/peaks-code/references/swarm-dispatch-contract.md +1 -1
- package/skills/peaks-code/references/workflow-gates-and-types.md +3 -3
- package/skills/peaks-code/references/worktree-governance.md +1 -1
- package/skills/peaks-final-review/SKILL.md +3 -3
- package/skills/peaks-ide/references/audit-log-helper.md +5 -4
- package/skills/peaks-resume/SKILL.md +1 -1
- package/skills/peaks-slice-decompose/SKILL.md +4 -4
- package/skills/peaks-slice-decompose/references/cross-pass-edge-interpretation.md +1 -1
- package/skills/peaks-slice-decompose/references/granularity-decision.md +1 -1
- package/skills/peaks-slice-decompose/references/v2-schema.md +2 -2
- package/skills/peaks-solo/SKILL.md +1 -2
|
@@ -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)
|
|
53
|
-
>
|
|
54
|
-
>
|
|
55
|
-
>
|
|
56
|
-
>
|
|
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**:
|
|
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.
|
|
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
|
|
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
|
|
54
|
+
See `../../../peaks-slice-decompose/SKILL.md` for the v2 envelope contract.
|
|
@@ -18,5 +18,5 @@ Read persistent project memory via CLI (durable, LLM-authored memories):
|
|
|
18
18
|
peaks project memories --project <repo> --json
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
This returns durable memories from `.peaks/memory` — decisions, conventions, modules, and rules captured in past sessions. Filter with `--kind <decision|convention|module|rule|
|
|
21
|
+
This returns durable memories from `.peaks/memory` — decisions, conventions, modules, and rules captured in past sessions. Filter with `--kind <project|decision|convention|rule|reference|feedback|module|lesson|bug|investigation|technical-pattern|project-rule|design|handoff|session-handoff|project-todo|publish-closure|project-closure|slice-closure|slice-pilot-findings|sediment>`. (`.peaks/PROJECT.md` is a human-readable session timeline only.)
|
|
22
22
|
Then display: `Peaks-Loop Skill: peaks-rd | Peaks-Loop Gate: startup | Next: <one short action>`. Update with `peaks skill presence:set peaks-rd --project <repo> --mode <mode> --gate <gate>` when gates change. When the role's work ends, run `peaks skill presence:clear --project <repo>`.
|
|
@@ -44,11 +44,13 @@ v2.13.0 hard-deletes the legacy paths.
|
|
|
44
44
|
|
|
45
45
|
## Pinning
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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:**
|
|
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.
|
|
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
|
-
|
|
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 *`.
|
|
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
|
|
|
@@ -75,7 +75,7 @@ Read persistent project memory via CLI (durable, LLM-authored memories):
|
|
|
75
75
|
peaks project memories --project <repo> --json
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
This returns durable memories from `.peaks/memory` — decisions, conventions, modules, and rules captured in past sessions. Filter with `--kind <decision|convention|module|rule|
|
|
78
|
+
This returns durable memories from `.peaks/memory` — decisions, conventions, modules, and rules captured in past sessions. Filter with `--kind <project|decision|convention|rule|reference|feedback|module|lesson|bug|investigation|technical-pattern|project-rule|design|handoff|session-handoff|project-todo|publish-closure|project-closure|slice-closure|slice-pilot-findings|sediment>`. (`.peaks/PROJECT.md` is a human-readable session timeline only.)
|
|
79
79
|
Then display: `Peaks-Loop Skill: peaks-sc | Peaks-Loop Gate: startup | Next: <one short action>`. Update with `peaks skill presence:set peaks-sc --project <repo> --mode <mode> --gate <gate>` when gates change. When the role's work ends, run `peaks skill presence:clear --project <repo>`.
|
|
80
80
|
|
|
81
81
|
## Responsibilities
|
|
@@ -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:
|
|
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`
|
|
@@ -69,7 +69,7 @@ Read persistent project memory via CLI (durable, LLM-authored memories):
|
|
|
69
69
|
peaks project memories --project <repo> --json
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
This returns durable memories from `.peaks/memory` — decisions, conventions, modules, and rules captured in past sessions. Filter with `--kind <decision|convention|module|rule|
|
|
72
|
+
This returns durable memories from `.peaks/memory` — decisions, conventions, modules, and rules captured in past sessions. Filter with `--kind <project|decision|convention|rule|reference|feedback|module|lesson|bug|investigation|technical-pattern|project-rule|design|handoff|session-handoff|project-todo|publish-closure|project-closure|slice-closure|slice-pilot-findings|sediment>`. (`.peaks/PROJECT.md` is a human-readable session timeline only.)
|
|
73
73
|
Then display: `Peaks-Loop Skill: peaks-txt | Peaks-Loop Gate: startup | Next: <one short action>`. Update with `peaks skill presence:set peaks-txt --project <repo> --mode <mode> --gate <gate>` when gates change. When the role's work ends, run `peaks skill presence:clear --project <repo>`.
|
|
74
74
|
|
|
75
75
|
## Responsibilities
|
|
@@ -158,7 +158,7 @@ When a skill artifact contains reusable project facts, decisions, rules, constra
|
|
|
158
158
|
```markdown
|
|
159
159
|
<!-- peaks-memory:start -->
|
|
160
160
|
title: Short project memory title
|
|
161
|
-
kind: project | decision | convention | rule | reference | module | lesson
|
|
161
|
+
kind: project | decision | convention | rule | reference | feedback | module | lesson | bug | investigation | technical-pattern | project-rule | design | handoff | session-handoff | project-todo | publish-closure | project-closure | slice-closure | slice-pilot-findings | sediment
|
|
162
162
|
---
|
|
163
163
|
Stable memory body.
|
|
164
164
|
<!-- peaks-memory:end -->
|
|
@@ -263,7 +263,7 @@ peaks capabilities --json
|
|
|
263
263
|
#
|
|
264
264
|
# <!-- peaks-memory:start -->
|
|
265
265
|
# title: Short project memory title
|
|
266
|
-
# kind: project | decision | convention | rule | reference | module | lesson
|
|
266
|
+
# kind: project | decision | convention | rule | reference | feedback | module | lesson | bug | investigation | technical-pattern | project-rule | design | handoff | session-handoff | project-todo | publish-closure | project-closure | slice-closure | slice-pilot-findings | sediment
|
|
267
267
|
# ---
|
|
268
268
|
# Stable memory body. Concrete facts only — no secrets, no transient state.
|
|
269
269
|
# <!-- peaks-memory:end -->
|
|
@@ -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 `.
|
|
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:
|
|
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 *`.
|
|
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
|
|
|
@@ -56,11 +56,11 @@ The boundary is closed under this slice:
|
|
|
56
56
|
|
|
57
57
|
## Single-scope-axis naming convention (2.7.1)
|
|
58
58
|
|
|
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 *`.
|
|
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.
|
|
60
60
|
|
|
61
61
|
## Karpathy guidance (Slice 1/6 — karpathy prompt-injection-lift)
|
|
62
62
|
|
|
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 `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**.
|
|
64
64
|
|
|
65
65
|
## Hard ban (effective 2.8.3 — read every session, no exceptions)
|
|
66
66
|
|
|
@@ -72,7 +72,7 @@ Peaks-Loop Code is the orchestration facade for the Peaks-Loop short skill famil
|
|
|
72
72
|
|
|
73
73
|
## 产品定位(2026-06-28 校准)
|
|
74
74
|
|
|
75
|
-
> peaks-loop 真实定位 = 24h AI 程序员编排器;user 角色 = 业务/产品审阅者,不参与技术决策。详见 `.peaks/memory/peaks-
|
|
75
|
+
> peaks-loop 真实定位 = 24h AI 程序员编排器;user 角色 = 业务/产品审阅者,不参与技术决策。详见 `.peaks/memory/peaks-cli-24h-ai-programmer-positioning.md`。
|
|
76
76
|
|
|
77
77
|
## Skill-first architecture note (read once, internalise)
|
|
78
78
|
|
|
@@ -91,7 +91,7 @@ This skill is the **primary surface**. The `peaks <cmd>` CLI is **auxiliary**
|
|
|
91
91
|
| `tests/integration/` | `tests/integration/x.test.ts` |
|
|
92
92
|
| `config/` | `config/peaks.json`, `tsconfig.json` |
|
|
93
93
|
| `bin/` | `bin/peaks.js` |
|
|
94
|
-
| `scripts/` | `scripts/release.
|
|
94
|
+
| `scripts/` | `scripts/release-pack.mjs` |
|
|
95
95
|
|
|
96
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.
|
|
97
97
|
|
|
@@ -231,7 +231,7 @@ See also: references/session-overload-signal-index.md for the 7-signal lookup ta
|
|
|
231
231
|
| **D-001** | 0.8 | `peaks code detect-job --is-job ...` rejected with `error: unknown option '--is-job'` | Use `peaks job init --job-id <jid> --slice-list <list> --main-loop-strategy <single\|rotating>` | §Step 0.8 first paragraph |
|
|
232
232
|
| **D-002** | 2.5 | `peaks session title --session-id <sid> ...` rejected with `error: unknown option '--session-id'` (this is the bare `<sid>` anti-pattern) | sid is positional: `peaks session title <sessionId> "<title>" --json` | §Step 2.5a |
|
|
233
233
|
| **D-003** | 0.8 | `JOB_SHAPE_NOT_DECIDED` exception expected but never thrown | Current behavior is `peaks job status` reports `done: 0` passively — treat as recoverable miss, not hard error | §Step 0.8 third paragraph |
|
|
234
|
-
| **D-010** | 11c | `peaks memory extract` returns `extractedCount: 0` despite `<!-- peaks-memory:start -->` existing | Block requires YAML frontmatter (`title:` + `kind:` + `---`) + closing `<!-- peaks-memory:end -->`.
|
|
234
|
+
| **D-010** | 11c | `peaks memory extract` returns `extractedCount: 0` despite `<!-- peaks-memory:start -->` existing | Block requires YAML frontmatter (`title:` + `kind:` + `---`) + closing `<!-- peaks-memory:end -->`. A marker without those fields, and a marker that is not the exact literal (e.g. with a `kind=…` written inside it), produce no writes and are both named in the envelope's `warnings[]` — read it before concluding there was no block | §Step 11c + 11d |
|
|
235
235
|
|
|
236
236
|
> **Sediment lesson (master record):** `.peaks/memory/peaks-code-runbook-4-0-0-beta-6-skill-md-cli-d-001-d-002-d-003-d-010.md`
|
|
237
237
|
|
|
@@ -298,7 +298,7 @@ The 6-type table + 11-step order + 7 transition gates (A-G) live in `references/
|
|
|
298
298
|
|
|
299
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).
|
|
300
300
|
|
|
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-
|
|
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`。
|
|
302
302
|
|
|
303
303
|
### Hard constraint: fan-out is mandatory (slice 2026-06-24-audit-5th-p2)
|
|
304
304
|
|
|
@@ -308,7 +308,7 @@ Write DAG → `.peaks/_runtime/<sessionId>/sc/slice-dag.json`, run `peaks sub-ag
|
|
|
308
308
|
|
|
309
309
|
## Slice 调度:分层并行 + 上游同步(2026-06-28 校准)
|
|
310
310
|
|
|
311
|
-
> 分层并行(G12)+ 上游同步(G11)见 `.peaks/memory/peaks-
|
|
311
|
+
> 分层并行(G12)+ 上游同步(G11)见 `.peaks/memory/peaks-cli-fork-sync-and-layered-parallel.md`。
|
|
312
312
|
|
|
313
313
|
## Peaks-Loop Mandatory RD QA repair loop (AUTO-PROCEED)
|
|
314
314
|
|
|
@@ -318,7 +318,7 @@ After `peaks-rd` finishes, Code MUST auto-route to `peaks-qa` without waiting fo
|
|
|
318
318
|
|
|
319
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.
|
|
320
320
|
|
|
321
|
-
When adding new CLI commands, mirror into `references/runbook.md`
|
|
321
|
+
When adding new CLI commands, mirror into `references/runbook.md` (the CLI falls back to that reference; no test asserts the mirror).
|
|
322
322
|
|
|
323
323
|
## RD micro-cycle (TDD small-step rapid-test loop)
|
|
324
324
|
|
|
@@ -370,4 +370,4 @@ Three CLI primitives: `peaks sub-agent share / shared-read / await` (last-write-
|
|
|
370
370
|
|
|
371
371
|
## References
|
|
372
372
|
|
|
373
|
-
Index of every `references/` file. Read on demand.
|
|
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 `
|
|
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:
|
|
54
|
-
|
|
55
|
-
|
|
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: `
|
|
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.
|
|
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
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
|
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
|
|
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
|
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
|
|
5
5
|
Map gstack stages to Peaks-Loop role artifacts; preserve Peaks-Loop confirmation gates. Do not delegate orchestration to gstack commands.
|
|
6
6
|
|
|
7
|
-
For frontend workflows, RD and QA must use Playwright MCP for real browser E2E. The consuming LLM detects the MCP from its own tool list: any Playwright MCP entry in the LLM tool list means the MCP is installed; absent means the user needs to install (`claude mcp add playwright -- npx @playwright/mcp@latest` in Claude Code; other IDEs have their own MCP install path). The LLM invokes the tool directly (browser_navigate / browser_click / browser_snapshot / browser_take_screenshot / browser_console_messages / browser_network_requests / browser_close) by name — there is no peaks-loop indirection. Chrome DevTools MCP is a secondary CDP surface only. Sanitize browser artifacts before retention (no login URLs, cookies, tokens, PII). See `
|
|
7
|
+
For frontend workflows, RD and QA must use Playwright MCP for real browser E2E. The consuming LLM detects the MCP from its own tool list: any Playwright MCP entry in the LLM tool list means the MCP is installed; absent means the user needs to install (`claude mcp add playwright -- npx @playwright/mcp@latest` in Claude Code; other IDEs have their own MCP install path). The LLM invokes the tool directly (browser_navigate / browser_click / browser_snapshot / browser_take_screenshot / browser_console_messages / browser_network_requests / browser_close) by name — there is no peaks-loop indirection. Chrome DevTools MCP is a secondary CDP surface only. Sanitize browser artifacts before retention (no login URLs, cookies, tokens, PII). See `browser-workflow.md`.
|
|
@@ -182,7 +182,7 @@ Code is itself a skill running in the current session. There are **two distinct
|
|
|
182
182
|
|
|
183
183
|
After RD completes (whether inline or sub-agent), Code does not stop — it must advance to QA. There is no "RD done, ask the user" state in full-auto mode. The only valid stops are: (a) QA verdict=pass, (b) repair cap hit, (c) explicit user cancel.
|
|
184
184
|
|
|
185
|
-
**RD's internal reviews are already parallelized.** When RD finishes implementation, it issues a 3-way sub-agent fan-out (code-review + security-review + perf-baseline, see `skills/peaks-rd/SKILL.md` "Parallel review fan-out") and waits for all to return before transitioning to `qa-handoff`. Code does NOT need to track three separate RD-side sub-runs; the RD role owns the fan-out lifecycle end-to-end. Code's presence restoration after the swarm converges is the only coordination point.
|
|
185
|
+
**RD's internal reviews are already parallelized.** When RD finishes implementation, it issues a 3-way sub-agent fan-out (code-review + security-review + perf-baseline, see `skills/bee/peaks-rd/SKILL.md` "Parallel review fan-out") and waits for all to return before transitioning to `qa-handoff`. Code does NOT need to track three separate RD-side sub-runs; the RD role owns the fan-out lifecycle end-to-end. Code's presence restoration after the swarm converges is the only coordination point.
|
|
186
186
|
|
|
187
187
|
**Presence restoration after RD/QA work returns (MANDATORY):** In v1.x, role skills called `peaks skill presence:set <role>` internally and stomped on `.peaks/.active-skill.json`. From v1.3 onward, sub-agents in the Swarm path are forbidden from calling `peaks skill presence:set` (see "Sub-agent dispatch" in each role's SKILL.md), so the main loop's presence file is preserved across the fan-out window by construction. The one place Code still has to actively restore presence is **once after the fan-out returns** (gate=swarm-converged) and again **after each RD↔QA repair iteration** (gate=repair-cycle-<N>). Use the same command from Step 2 with the current mode and the gate that has just advanced:
|
|
188
188
|
|
|
@@ -26,8 +26,8 @@ checkpoint as often as it wants.
|
|
|
26
26
|
> (i.e. on each 20-call mark, not "approximately every 20"). The CLI
|
|
27
27
|
> does **not** expose a `--periodic-every <n>` override flag — the
|
|
28
28
|
> cadence is owned by the skill, not the CLI. Any patch that relaxes
|
|
29
|
-
> this must update both files in lockstep
|
|
30
|
-
>
|
|
29
|
+
> this must update both files in lockstep; no guard fails on the drift
|
|
30
|
+
> — the test that pinned the cadence was deleted in `f17aa377`.
|
|
31
31
|
|
|
32
32
|
## Checkpoint CLI contract
|
|
33
33
|
|
|
@@ -12,6 +12,24 @@ This returns durable memories from `.peaks/memory`, grouped by kind:
|
|
|
12
12
|
- **convention** — discovered project patterns (code style, naming, tooling)
|
|
13
13
|
- **rule** / **reference** / **project** — standing constraints, external pointers, and project context
|
|
14
14
|
|
|
15
|
-
Filter with `--kind <decision|convention|module|rule|
|
|
15
|
+
Filter with `--kind <project|decision|convention|rule|reference|feedback|module|lesson|bug|investigation|technical-pattern|project-rule|design|handoff|session-handoff|project-todo|publish-closure|project-closure|slice-closure|slice-pilot-findings|sediment>` when you only need one slice. Use this to understand what exists, what was decided, and what to avoid re-litigating. Memories are LLM-authored at approved checkpoints via `peaks memory extract`. The `lesson` kind is for LLM-discovered runtime lessons (e.g. "this project's antv6 Drawer uses `size` not `width`"); write them as memory blocks in the RD handoff or TXT handoff.
|
|
16
|
+
|
|
17
|
+
A memory block is a **bare** start marker, then a header carrying a line-anchored `title:` and `kind:`, then a `---` separator line, then the body, then the end marker:
|
|
18
|
+
|
|
19
|
+
```markdown
|
|
20
|
+
<!-- peaks-memory:start -->
|
|
21
|
+
title: Short project memory title
|
|
22
|
+
kind: lesson
|
|
23
|
+
---
|
|
24
|
+
Stable memory body.
|
|
25
|
+
<!-- peaks-memory:end -->
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Two ways a block can be lost — one silent, one reported:
|
|
29
|
+
|
|
30
|
+
- The start marker carries **no attributes**. It is matched literally, so any text added inside it (e.g. a `kind=…` attribute between `start` and `-->`) makes it not a marker at all: the block is never found, and nothing is extracted from it. `warnings` does name it back at you ("… is not the exact marker …"), which is how you tell this apart from an artifact that simply had no blocks — but the memory itself is still lost, so fix the marker rather than reading past the warning. Put `kind:` on its own line in the header instead.
|
|
31
|
+
- `title:` and `kind:` must each be on their own line, and the `---` separator must be present. A marker whose body has only prose is found but rejected, and says which precondition failed.
|
|
32
|
+
|
|
33
|
+
Preview with `peaks memory extract --project <repo> --artifact <handoff> --dry-run`, then re-run with `--apply` to write.
|
|
16
34
|
|
|
17
35
|
`.peaks/PROJECT.md` is a human-readable session timeline only — do NOT use it for LLM context.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Peaks-Loop Pre-RD project scan checklist
|
|
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
|
|
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 Pre-RD project scan checklist that was previously inline; nothing was paraphrased, just relocated.
|
|
4
4
|
|
|
5
5
|
Before handing off to `peaks-rd`, scan the project and record findings to `.peaks/project-scan/project-scan.md` (project-level, git-tracked; sibling of `.peaks/PROJECT.md`). RD and UI roles read this before starting work. **project-scan.md is a project-scoped singleton** — check if it already exists before regenerating (e.g. via `ls .peaks/project-scan/project-scan.md`). If it exists and is complete (has `## Archetype` and `## Project mode` sections), reuse it. Only regenerate if missing or incomplete.
|
|
6
6
|
|
|
@@ -66,4 +66,4 @@ done
|
|
|
66
66
|
**Strict quality guarantee (per user's hard rule: "严格要保证不能比当前的效果差")**:
|
|
67
67
|
- If no in-flight slice is detected, this step is a no-op: zero extra commands beyond the existing Step 0 probe, zero extra token cost.
|
|
68
68
|
- If an in-flight slice is detected, the cost is one `find` + one `grep` loop (sub-millisecond) + one `AskUserQuestion` (one round-trip). The savings are 3-5k tokens (the cost of manually re-reading 3-5 artifact files).
|
|
69
|
-
- The
|
|
69
|
+
- The canonical classifier is `src/services/skill/resume-detector.ts`; the legacy bash-fixture shim used by `skills/peaks-resume` is `tests/fixtures/skill-resume-mode-detect.sh`. No unit test pins either today — the two suites that did (8 dogfood cases + 24 classifier cases) were deleted in `f17aa377`. The behaviours they covered were: (a) fresh / complete / resume:rd-planning / resume:qa-validation / resume:txt-handoff state-based classifications, (b) the "Other resume triggers" overrides (missing `rd/tech-doc.md` → `rd-planning`; missing `rd/code-review.md` or `rd/security-review.md` → `rd-review-fanout`; missing `qa/test-reports/<rid>.md` → `qa-execution`), (c) the mid-implementation distinction (`spec-locked` / `implemented` / `running` / `blocked` all return `in-flight:<state>`), (d) the primary-vs-abandoned filter (multiple RDs → spec-locked wins; single blocked RD stays primary; 2+ all-abandoned → fresh), (e) the legacy `.peaks/_runtime/<sessionId>/` path fallback, and (f) determinism across two invocations on the same fixture.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
> **Maintenance**: The numbered workflow list in `skills/peaks-code/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
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
|
|
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 `.peaks/standards/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
6
|
>
|
|
7
7
|
> **How peaks-loop tooling reads this file**:
|
|
8
|
-
> - `peaks skill runbook peaks-code` (CLI) reads the `## Default runbook` section in either SKILL.md or `
|
|
9
|
-
> - The
|
|
8
|
+
> - `peaks skill runbook peaks-code` (CLI) reads the `## Default runbook` section in either SKILL.md or `runbook.md` (whichever has the bash code).
|
|
9
|
+
> - The CLI applies the same fallback: `## Default runbook` in SKILL.md first, then `runbook.md` here. The test that asserted this was deleted in `f17aa377`.
|
|
10
10
|
|
|
11
11
|
## Default runbook — CLI sequence
|
|
12
12
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
When the LLM senses context pressure, it must consult these 7 signals before
|
|
9
9
|
deciding to (a) auto-compact, (b) refuse the next slice, or (c) ask the user to
|
|
10
10
|
open a new session. The contract is: **LLM never re-asks the user about
|
|
11
|
-
cost/length/context** (red line #2 of `
|
|
11
|
+
cost/length/context** (red line #2 of `job-loop.md`). This index is
|
|
12
12
|
the lookup table the LLM must consult in lieu of intuition.
|
|
13
13
|
|
|
14
14
|
## The 7 signals
|
|
@@ -25,7 +25,7 @@ the lookup table the LLM must consult in lieu of intuition.
|
|
|
25
25
|
|
|
26
26
|
## Hard rules
|
|
27
27
|
|
|
28
|
-
- peaks-code SKILL.md red line #2 (see `
|
|
28
|
+
- peaks-code SKILL.md red line #2 (see `job-loop.md`):
|
|
29
29
|
**Re-ask the user about cost / length / context is forbidden**.
|
|
30
30
|
The LLM MUST NOT prompt the user to open a new session based on overload
|
|
31
31
|
intuition alone; it MUST consult the 7 signals above and prefer auto-compact /
|