peaks-cli 1.3.7 → 1.3.9
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/dist/src/cli/commands/core-artifact-commands.js +119 -14
- package/dist/src/cli/commands/project-commands.js +58 -1
- package/dist/src/cli/commands/request-commands.js +124 -4
- package/dist/src/cli/commands/retrospective-commands.d.ts +3 -0
- package/dist/src/cli/commands/retrospective-commands.js +113 -0
- package/dist/src/cli/program.js +2 -0
- package/dist/src/services/artifacts/request-artifact-service.d.ts +16 -0
- package/dist/src/services/artifacts/request-artifact-service.js +18 -2
- package/dist/src/services/memory/project-memory-service.d.ts +19 -0
- package/dist/src/services/memory/project-memory-service.js +33 -0
- package/dist/src/services/retrospective/migrate-from-md.d.ts +37 -0
- package/dist/src/services/retrospective/migrate-from-md.js +528 -0
- package/dist/src/services/retrospective/retrospective-index.d.ts +37 -0
- package/dist/src/services/retrospective/retrospective-index.js +110 -0
- package/dist/src/services/retrospective/retrospective-show.d.ts +40 -0
- package/dist/src/services/retrospective/retrospective-show.js +109 -0
- package/dist/src/services/session/caller-binding-service.d.ts +70 -0
- package/dist/src/services/session/caller-binding-service.js +148 -0
- package/dist/src/services/session/caller-id-types.d.ts +77 -0
- package/dist/src/services/session/caller-id-types.js +46 -0
- package/dist/src/services/session/index.d.ts +4 -0
- package/dist/src/services/session/index.js +5 -0
- package/dist/src/services/session/platform-fallbacks.d.ts +31 -0
- package/dist/src/services/session/platform-fallbacks.js +35 -0
- package/dist/src/services/session/resolve-caller-id.d.ts +57 -0
- package/dist/src/services/session/resolve-caller-id.js +88 -0
- package/dist/src/services/skills/skill-presence-service.d.ts +11 -0
- package/dist/src/services/skills/skill-presence-service.js +59 -0
- package/dist/src/shared/format-md-compact.d.ts +32 -0
- package/dist/src/shared/format-md-compact.js +297 -0
- package/dist/src/shared/stale-policy.d.ts +67 -0
- package/dist/src/shared/stale-policy.js +85 -0
- package/dist/src/shared/version.d.ts +1 -1
- package/dist/src/shared/version.js +1 -1
- package/package.json +1 -1
- package/skills/peaks-qa/SKILL.md +86 -515
- package/skills/peaks-qa/references/artifact-per-request.md +7 -79
- package/skills/peaks-qa/references/browser-validation-contracts.md +51 -0
- package/skills/peaks-qa/references/codegraph-regression-focus.md +5 -0
- package/skills/peaks-qa/references/external-capability-guidance.md +9 -0
- package/skills/peaks-qa/references/qa-compact-handoff.md +3 -0
- package/skills/peaks-qa/references/qa-context-governance.md +24 -0
- package/skills/peaks-qa/references/qa-fanout-contract.md +8 -0
- package/skills/peaks-qa/references/qa-gstack-integration.md +7 -0
- package/skills/peaks-qa/references/qa-local-artifacts.md +3 -0
- package/skills/peaks-qa/references/qa-matt-pocock-integration.md +9 -0
- package/skills/peaks-qa/references/qa-refactor-role.md +3 -0
- package/skills/peaks-qa/references/qa-runbook.md +74 -0
- package/skills/peaks-qa/references/qa-skill-presence.md +22 -0
- package/skills/peaks-qa/references/qa-standards-preflight.md +8 -0
- package/skills/peaks-qa/references/qa-sub-agent-dispatch.md +38 -0
- package/skills/peaks-qa/references/qa-transition-gates.md +79 -0
- package/skills/peaks-qa/references/requirement-boundary-recheck.md +9 -0
- package/skills/peaks-qa/references/test-case-generation.md +27 -0
- package/skills/peaks-qa/references/test-report-output.md +14 -0
- package/skills/peaks-rd/SKILL.md +85 -732
- package/skills/peaks-rd/references/artifact-and-standards-output.md +9 -0
- package/skills/peaks-rd/references/artifact-per-request.md +20 -0
- package/skills/peaks-rd/references/browser-self-test-contracts.md +29 -0
- package/skills/peaks-rd/references/codegraph-project-analysis.md +5 -0
- package/skills/peaks-rd/references/compact-handoff.md +3 -0
- package/skills/peaks-rd/references/external-references.md +11 -0
- package/skills/peaks-rd/references/frontend-project-generation.md +11 -0
- package/skills/peaks-rd/references/library-version-awareness.md +30 -0
- package/skills/peaks-rd/references/mandatory-perf-baseline.md +40 -0
- package/skills/peaks-rd/references/mandatory-tech-doc.md +18 -0
- package/skills/peaks-rd/references/matt-pocock-integration.md +11 -0
- package/skills/peaks-rd/references/mock-data-placement.md +40 -0
- package/skills/peaks-rd/references/parallel-review-fanout.md +81 -0
- package/skills/peaks-rd/references/rd-context-governance.md +36 -0
- package/skills/peaks-rd/references/rd-gstack-integration.md +16 -0
- package/skills/peaks-rd/references/rd-runbook.md +125 -0
- package/skills/peaks-rd/references/rd-standards-preflight.md +8 -0
- package/skills/peaks-rd/references/rd-sub-agent-dispatch.md +39 -0
- package/skills/peaks-rd/references/rd-transition-gates.md +148 -0
- package/skills/peaks-rd/references/skill-presence-and-title.md +22 -0
- package/skills/peaks-solo/SKILL.md +87 -786
- package/skills/peaks-solo/references/anchoring-and-session-info.md +25 -0
- package/skills/peaks-solo/references/boundaries.md +21 -0
- package/skills/peaks-solo/references/codegraph-orchestration.md +5 -0
- package/skills/peaks-solo/references/completion-handoff.md +16 -0
- package/skills/peaks-solo/references/context-governance.md +51 -0
- package/skills/peaks-solo/references/external-references.md +17 -0
- package/skills/peaks-solo/references/frontend-only-mode.md +87 -0
- package/skills/peaks-solo/references/gstack-integration.md +7 -0
- package/skills/peaks-solo/references/local-artifact-workspace.md +79 -0
- package/skills/peaks-solo/references/micro-cycle.md +68 -0
- package/skills/peaks-solo/references/mode-selection.md +21 -0
- package/skills/peaks-solo/references/openspec-workflow.md +43 -0
- package/skills/peaks-solo/references/project-memory-loading.md +17 -0
- package/skills/peaks-solo/references/project-scan-checklist.md +136 -0
- package/skills/peaks-solo/references/quality-gate-cheatsheet.md +13 -0
- package/skills/peaks-solo/references/resume-detection.md +63 -0
- package/skills/peaks-solo/references/runbook.md +1 -1
- package/skills/peaks-solo/references/skill-presence-and-title.md +31 -0
- package/skills/peaks-solo/references/standards-preflight.md +23 -0
- package/skills/peaks-solo/references/sub-agent-dispatch.md +46 -0
- package/skills/peaks-solo/references/swarm-dispatch-contract.md +56 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Peaks-Cli RD transition verification gates
|
|
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.
|
|
4
|
+
|
|
5
|
+
## Transition verification gates (MANDATORY — full per-gate contract)
|
|
6
|
+
|
|
7
|
+
You cannot declare a phase complete from memory. Each gate below is a `ls` or `grep` command you **MUST run** and whose output you **MUST see** before proceeding. If any file shows "No such file" or any command returns empty, the phase is incomplete.
|
|
8
|
+
|
|
9
|
+
> **CLI enforcement (NEW)**: the gates below are now ALSO enforced by `peaks request transition`. The CLI checks the same files before allowing the transition and fails with `code: PREREQUISITES_MISSING` if any are absent. The exact required files depend on the request type chosen at `peaks request init --type <feature|bugfix|refactor|docs|config|chore>` (default `feature`):
|
|
10
|
+
>
|
|
11
|
+
> | Type | rd:implemented requires | rd:qa-handoff also requires |
|
|
12
|
+
> |---|---|---|
|
|
13
|
+
> | feature / refactor | `rd/tech-doc.md` | `rd/code-review.md` + `rd/security-review.md` + `rd/perf-baseline.md` (filled Results table, or `N/A — no perf surface` in Notes) + **`qa/test-cases/<rid>.md`** (added in slice 004; pre-drafted by the 4th sub-agent in the parallel fan-out) |
|
|
14
|
+
> | bugfix | `rd/bug-analysis.md` (lighter than tech-doc; root cause + fix + regression test plan) | `rd/code-review.md` + `rd/security-review.md` + **`qa/test-cases/<rid>.md`**; `rd/perf-baseline.md` only when the bug is performance-shaped (matches the L449-452 "When this applies" criteria) |
|
|
15
|
+
> | config | (none) | `rd/security-review.md` only |
|
|
16
|
+
> | docs / chore | (none) | (none) |
|
|
17
|
+
>
|
|
18
|
+
> The escape hatch `--allow-incomplete --reason "<text>"` still exists for one-off exceptions; the bypass is recorded in the artifact transition note.
|
|
19
|
+
|
|
20
|
+
**Peaks-Cli Gate A — After project-scan read (before any implementation):**
|
|
21
|
+
```bash
|
|
22
|
+
ls .peaks/<changeId>/rd/project-scan.md
|
|
23
|
+
# Expected output: .peaks/<changeId>/rd/project-scan.md
|
|
24
|
+
# "No such file" → STOP, create the project-scan first. Do not write code.
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Peaks-Cli Gate A2 — Before tech-doc write: project structure verified (PATH CORRECTNESS — CRITICAL):**
|
|
28
|
+
```bash
|
|
29
|
+
# Verify EVERY file path and directory in the tech-doc exists in the actual project.
|
|
30
|
+
# Do not assume paths. Do not guess directory structures. Open the files and verify.
|
|
31
|
+
# Example verification (adapt paths to the actual tech-doc):
|
|
32
|
+
ls <every-single-directory-path-in-tech-doc> 2>&1 | grep -c "No such file"
|
|
33
|
+
# Expected: 0 (zero "No such file" errors)
|
|
34
|
+
# Any "No such file" → WRONG PATH. Fix the tech-doc BEFORE writing another word.
|
|
35
|
+
# This gate exists because a tech-doc with wrong paths wastes QA time,
|
|
36
|
+
# breaks the implementation, and forces the user to correct the engineer.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Peaks-Cli Gate A3 — Before implementation: project standards files exist (CLAUDE.md + .claude/rules/):**
|
|
40
|
+
```bash
|
|
41
|
+
ls CLAUDE.md .claude/rules/common/coding-style.md .claude/rules/common/code-review.md .claude/rules/common/security.md 2>&1 | grep -c "No such file"
|
|
42
|
+
# Expected: 0 (all four files exist)
|
|
43
|
+
# Any missing → BLOCKED. Run `peaks standards init --project .` to generate them FIRST.
|
|
44
|
+
# Do not write a single line of implementation code without standards files in place.
|
|
45
|
+
# Without CLAUDE.md and .claude/rules/, code review and security review triggers won't fire.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Peaks-Cli Gate B — Before QA handoff:**
|
|
49
|
+
```bash
|
|
50
|
+
ls .peaks/<changeId>/rd/requests/<rid>.md \
|
|
51
|
+
.peaks/<changeId>/rd/tech-doc.md
|
|
52
|
+
# Both must exist. Missing either → BLOCKED, do not hand off to QA
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Peaks-Cli Gate B2 — Before QA handoff: unit tests exist and pass for the changed surface:**
|
|
56
|
+
```bash
|
|
57
|
+
# Run the project's test command against changed files. Record the output.
|
|
58
|
+
# Example (adapt to project test runner):
|
|
59
|
+
npx vitest run --changed --reporter=verbose 2>&1 | tail -20
|
|
60
|
+
# Expected: exit code 0, all changed-surface tests passing, coverage for new/changed code recorded
|
|
61
|
+
# Any failing test or zero tests for new code → BLOCKED. Write tests, then re-run.
|
|
62
|
+
#
|
|
63
|
+
# To run the FULL suite (slower; not the default for `peaks slice check`),
|
|
64
|
+
# drop `--changed` or use `npx vitest run --reporter=verbose`. The peaks-solo-test
|
|
65
|
+
# skill is the user-facing wrapper for the full suite; the slice check's
|
|
66
|
+
# `--run-tests` flag is the CLI opt-in.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Peaks-Cli Gate B3 — Before QA handoff: code review evidence exists:**
|
|
70
|
+
```bash
|
|
71
|
+
ls .peaks/<changeId>/rd/code-review.md 2>&1
|
|
72
|
+
# Expected: .peaks/<changeId>/rd/code-review.md
|
|
73
|
+
# "No such file" → BLOCKED. Run code review (use code-reviewer agent or equivalent),
|
|
74
|
+
# record findings, fix CRITICAL/HIGH issues, then re-check.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**Peaks-Cli Gate B4 — Before QA handoff: security review evidence exists:**
|
|
78
|
+
```bash
|
|
79
|
+
ls .peaks/<changeId>/rd/security-review.md 2>&1
|
|
80
|
+
# Expected: .peaks/<changeId>/rd/security-review.md
|
|
81
|
+
# "No such file" → BLOCKED. Run security review (use security-reviewer agent or equivalent),
|
|
82
|
+
# fix CRITICAL/HIGH issues, record findings, then re-check.
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Peaks-Cli Gate B5 — RD artifact body has no unfilled placeholders:**
|
|
86
|
+
```bash
|
|
87
|
+
peaks request lint <rid> --role rd --project <repo> --session-id <session-id> --json
|
|
88
|
+
# Expected: ok=true. exit 0.
|
|
89
|
+
# ok=false → BLOCKED. The lint output lists every <placeholder>, "- ..." stub,
|
|
90
|
+
# and TBD/TODO marker with line numbers. Fill them in before attempting handoff.
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Peaks-Cli Gate B6 — Declared --type matches the actual diff:**
|
|
94
|
+
```bash
|
|
95
|
+
peaks scan request-type-sanity --project <repo> --type <type> --json
|
|
96
|
+
# Expected: consistent=true. exit 0.
|
|
97
|
+
# consistent=false → BLOCKED. Either the implementation scope-creeped beyond what
|
|
98
|
+
# the declared type covers, or the type was mis-classified at PRD time. Re-classify
|
|
99
|
+
# (`peaks request init` with the corrected --type) or trim the scope.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Peaks-Cli Gate B7 — Repair cycle cap (only relevant during RD↔QA repair loop):**
|
|
103
|
+
```bash
|
|
104
|
+
peaks request repair-status <rid> --project <repo> --session-id <session-id> --json
|
|
105
|
+
# Expected: atCap=false. exit 0.
|
|
106
|
+
# atCap=true → BLOCKED. Three repair cycles already attempted; emit a blocked TXT
|
|
107
|
+
# handoff via Solo rather than entering a fourth cycle.
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Peaks-Cli Gate B8 — Diff stays inside the declared red-line scope:**
|
|
111
|
+
```bash
|
|
112
|
+
peaks scan diff-vs-scope --rid <rid> --project <repo> --session-id <session-id> --json
|
|
113
|
+
# Expected: ok=true. exit 0.
|
|
114
|
+
# violations[] non-empty → BLOCKED. A changed file matches an explicit out-of-scope
|
|
115
|
+
# pattern. Revert it, or — only with PRD approval — expand the RD red-line scope.
|
|
116
|
+
# unclassified[] non-empty → BLOCKED. A changed file does not match any declared
|
|
117
|
+
# in-scope pattern. Either add it to the in-scope list (intentional widening, requires
|
|
118
|
+
# PRD approval) or revert the change.
|
|
119
|
+
# patternsDeclared=false → BLOCKED. The RD artifact's `## Red-line scope` section has
|
|
120
|
+
# no concrete path or glob patterns. Fill it in with paths like `src/services/login/**`
|
|
121
|
+
# before re-running. Auto-allowed paths (test files, .peaks/, __mocks__/) never need a pattern.
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Peaks-Cli Gate B9 — RD-side perf-baseline output present (when slice has a user-perceivable perf surface):**
|
|
125
|
+
```bash
|
|
126
|
+
ls .peaks/<changeId>/rd/perf-baseline.md 2>&1
|
|
127
|
+
# Expected: .peaks/<changeId>/rd/perf-baseline.md
|
|
128
|
+
# "No such file" + slice is feature / refactor / bugfix-when-perf → BLOCKED.
|
|
129
|
+
# Run the perf-baseline sub-agent from "Parallel review fan-out" below (or
|
|
130
|
+
# `peaks perf baseline --apply` inline), then fill in the Results table
|
|
131
|
+
# with measurements (lighthouse / k6 / autocannon / project-local bench —
|
|
132
|
+
# the CLI does not run these; that is the RD's job), then re-verify.
|
|
133
|
+
# "No such file" + slice is docs / chore / pure-bugfix-no-perf → OK to proceed;
|
|
134
|
+
# this gate does not apply to those slice types.
|
|
135
|
+
# File exists but Results table is empty (only the header row, no data rows) →
|
|
136
|
+
# BLOCKED. The sub-agent scaffolds the file; the main RD loop must fill in
|
|
137
|
+
# the Path / route | Workload | Tool | Metric | Baseline | Threshold table
|
|
138
|
+
# with actual numbers before handoff.
|
|
139
|
+
# File contains the marker `N/A — no perf surface` in its Notes section →
|
|
140
|
+
# OK to proceed. This is the explicit opt-out the sub-agent writes when
|
|
141
|
+
# the slice has no user-perceivable perf surface (e.g. a feature that only
|
|
142
|
+
# adds an internal flag with no runtime cost, or a refactor that does not
|
|
143
|
+
# alter any hot path).
|
|
144
|
+
#
|
|
145
|
+
# The CLI enforcement table below the section header also gates this at the
|
|
146
|
+
# `peaks request transition rd:qa-handoff` call, so a missing or empty file
|
|
147
|
+
# is rejected by the CLI with `code: PREREQUISITES_MISSING`.
|
|
148
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Skill presence (RD)
|
|
2
|
+
|
|
3
|
+
> Body of `## Skill presence (MANDATORY first action — main-loop context only)`. When this skill is running in the main Claude session (not as a sub-agent — i.e. user invoked `peaks-rd` directly, or `peaks-solo` is executing the role inline in assisted/strict mode), before any analysis or tool call, immediately run:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
peaks skill presence:set peaks-rd --project <repo> --mode <mode> --gate startup
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
On the first presence:set in a project, ensure the out-of-band status bar is installed so the user can see at a glance that Peaks is orchestrating — it renders the active skill in Claude Code's terminal status line, independent of model output:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
peaks statusline install --project <repo> # idempotent; skips if already installed
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Read persistent project memory via CLI (durable, LLM-authored memories):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
peaks project memories --project <repo> --json
|
|
19
|
+
```
|
|
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|reference|project>`. (`.peaks/PROJECT.md` is a human-readable session timeline only.)
|
|
22
|
+
Then display: `Peaks-Cli Skill: peaks-rd | Peaks-Cli 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>`.
|