peaks-cli 1.0.14 → 1.0.16
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/bin/peaks.js +0 -0
- package/dist/src/cli/commands/project-commands.js +5 -0
- package/dist/src/cli/commands/request-commands.js +1 -1
- package/dist/src/cli/commands/workflow-commands.js +38 -0
- package/dist/src/services/artifacts/request-artifact-service.d.ts +2 -2
- package/dist/src/services/artifacts/request-artifact-service.js +60 -5
- package/dist/src/services/config/config-safety.d.ts +14 -0
- package/dist/src/services/config/config-safety.js +275 -0
- package/dist/src/services/config/config-service.d.ts +1 -1
- package/dist/src/services/config/config-service.js +5 -274
- package/dist/src/services/dashboard/project-dashboard-service.d.ts +11 -0
- package/dist/src/services/dashboard/project-dashboard-service.js +21 -2
- package/dist/src/services/doctor/doctor-service.d.ts +3 -0
- package/dist/src/services/doctor/doctor-service.js +58 -0
- package/dist/src/services/workflow/autonomous-resume-writer.d.ts +16 -0
- package/dist/src/services/workflow/autonomous-resume-writer.js +156 -0
- package/dist/src/shared/version.d.ts +1 -1
- package/dist/src/shared/version.js +1 -1
- package/package.json +1 -1
- package/schemas/doctor-report.schema.json +2 -2
- package/skills/peaks-prd/SKILL.md +56 -1
- package/skills/peaks-qa/SKILL.md +175 -15
- package/skills/peaks-rd/SKILL.md +198 -56
- package/skills/peaks-sc/SKILL.md +66 -5
- package/skills/peaks-solo/SKILL.md +417 -65
- package/skills/peaks-solo/references/artifact-contracts.md +60 -2
- package/skills/peaks-solo/results.tsv +1 -0
- package/skills/peaks-txt/SKILL.md +68 -1
- package/skills/peaks-ui/SKILL.md +185 -18
|
@@ -7,6 +7,16 @@ description: Product and requirement skill for Peaks. Use when a workflow needs
|
|
|
7
7
|
|
|
8
8
|
Peaks PRD turns user intent into verifiable product artifacts.
|
|
9
9
|
|
|
10
|
+
## Skill presence (MANDATORY first action)
|
|
11
|
+
|
|
12
|
+
Before any analysis or tool call, immediately run:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
peaks skill presence:set peaks-prd --mode <mode> --gate startup
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Then display: `Peaks Skill: peaks-prd | Gate: startup | Next: <one short action>`. Update with `peaks skill presence:set peaks-prd --mode <mode> --gate <gate>` when gates change. When the role's work ends, run `peaks skill presence:clear`.
|
|
19
|
+
|
|
10
20
|
## Responsibilities
|
|
11
21
|
|
|
12
22
|
- clarify goals and non-goals;
|
|
@@ -23,6 +33,16 @@ Every PRD invocation — feature, bug, refactor, clarification — must write a
|
|
|
23
33
|
|
|
24
34
|
Use `<request-id>` of the form `YYYY-MM-DD-<kebab-slug>` (or whatever id the user assigned) so PRD/UI/RD/QA/SC can cross-link the same request.
|
|
25
35
|
|
|
36
|
+
**Minimum PRD artifact sections:**
|
|
37
|
+
|
|
38
|
+
1. **Goals** — what this request must achieve, in verifiable terms
|
|
39
|
+
2. **Non-goals** — explicitly out of scope for this request
|
|
40
|
+
3. **Preserved behavior** — existing behavior that must not change
|
|
41
|
+
4. **Acceptance criteria** — per-criterion pass/fail conditions QA can execute
|
|
42
|
+
5. **Frontend delta** (when applicable) — pages, routes, components, states affected
|
|
43
|
+
6. **Unresolved questions** — items blocking implementation or QA
|
|
44
|
+
7. **User confirmation record** — date, method (explicit confirm / auto-confirm), scope confirmed
|
|
45
|
+
|
|
26
46
|
Concrete template and rules: `references/artifact-per-request.md`.
|
|
27
47
|
|
|
28
48
|
## Default runbook
|
|
@@ -69,6 +89,24 @@ peaks mcp apply --capability playwright-mcp.browser-validation --yes --json
|
|
|
69
89
|
|
|
70
90
|
Handoff is blocked until the request artifact's `state` reaches `confirmed-by-user` or `handed-off`. Update the state field in the artifact body before invoking RD/UI/QA.
|
|
71
91
|
|
|
92
|
+
### Transition verification gates (MANDATORY — run the command, see the output)
|
|
93
|
+
|
|
94
|
+
You cannot declare PRD complete from memory. Each gate below is a `ls` command you **MUST run** and whose output you **MUST see** before proceeding.
|
|
95
|
+
|
|
96
|
+
**Gate A — After PRD artifact write (before handoff to RD/UI/QA):**
|
|
97
|
+
```bash
|
|
98
|
+
ls .peaks/<id>/prd/requests/<rid>.md
|
|
99
|
+
# Expected output: .peaks/<id>/prd/requests/<rid>.md
|
|
100
|
+
# "No such file" → STOP, write the PRD artifact first. Do not hand off.
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Gate B — Before clearing PRD presence (verify user confirmation):**
|
|
104
|
+
```bash
|
|
105
|
+
grep -E "state:.*(confirmed-by-user|handed-off)" .peaks/<id>/prd/requests/<rid>.md
|
|
106
|
+
# Expected: a line containing state: confirmed-by-user or state: handed-off
|
|
107
|
+
# No match → STOP, the PRD has not been confirmed. Ask the user to confirm.
|
|
108
|
+
```
|
|
109
|
+
|
|
72
110
|
## Refactor role
|
|
73
111
|
|
|
74
112
|
For refactor workflows, avoid writing a full product PRD unless needed. Produce a focused refactor product package:
|
|
@@ -144,7 +182,24 @@ Inspect upstream skill content before applying any method. Treat examples and in
|
|
|
144
182
|
|
|
145
183
|
## Local intermediate artifacts
|
|
146
184
|
|
|
147
|
-
PRD artifacts
|
|
185
|
+
PRD artifacts must be written to the workflow-local `.peaks/<session-id>/prd/` workspace by default, unless the active Peaks CLI profile supplies a different local artifact workspace. This workspace is the handoff surface between `peaks-prd`, `peaks-rd`, `peaks-qa`, `peaks-ui`, `peaks-sc`, and `peaks-txt`.
|
|
186
|
+
|
|
187
|
+
### Document snapshot placement (BLOCKING)
|
|
188
|
+
|
|
189
|
+
**When PRD captures content from an external document (Feishu/Lark/wiki/web page), ALL intermediate snapshots MUST go into `.peaks/<session-id>/prd/source/` — NEVER to the project root directory.**
|
|
190
|
+
|
|
191
|
+
Specifically:
|
|
192
|
+
- `mcp__playwright__browser_snapshot` output → save to `.peaks/<session-id>/prd/source/<doc-name>-snapshot.md`
|
|
193
|
+
- `mcp__playwright__browser_take_screenshot` output → save to `.peaks/<session-id>/prd/source/<doc-name>-screenshot.png`
|
|
194
|
+
- Any exported `.md` or `.pdf` the user provides → save to `.peaks/<session-id>/prd/source/`
|
|
195
|
+
|
|
196
|
+
**Prohibited paths** (BLOCKING — do not write to these):
|
|
197
|
+
- `./feishu-doc-snapshot.md` (project root)
|
|
198
|
+
- `./feishu-doc-snapshot-2.md` (project root)
|
|
199
|
+
- `./<anything>-snapshot.md` (project root)
|
|
200
|
+
- `./screenshots/` (project root — use `.peaks/<id>/qa/screenshots/`)
|
|
201
|
+
|
|
202
|
+
The canonical PRD request artifact at `.peaks/<session-id>/prd/requests/<request-id>.md` should link to the source files in `prd/source/` for traceability.
|
|
148
203
|
|
|
149
204
|
Do not default to a git-backed artifact repository or commit intermediate artifacts automatically. Git commits, artifact sync, or external repository storage require explicit user confirmation or an active profile that clearly authorizes them.
|
|
150
205
|
|
package/skills/peaks-qa/SKILL.md
CHANGED
|
@@ -7,6 +7,16 @@ description: QA and verification skill for Peaks. Use when a workflow needs unit
|
|
|
7
7
|
|
|
8
8
|
Peaks QA proves that planned changes are protected and accepted.
|
|
9
9
|
|
|
10
|
+
## Skill presence (MANDATORY first action)
|
|
11
|
+
|
|
12
|
+
Before any analysis or tool call, immediately run:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
peaks skill presence:set peaks-qa --mode <mode> --gate startup
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Then display: `Peaks Skill: peaks-qa | Gate: startup | Next: <one short action>`. Update with `peaks skill presence:set peaks-qa --mode <mode> --gate <gate>` when gates change. When the role's work ends, run `peaks skill presence:clear`.
|
|
19
|
+
|
|
10
20
|
## Responsibilities
|
|
11
21
|
|
|
12
22
|
- inspect unit-test coverage evidence;
|
|
@@ -20,9 +30,13 @@ Peaks QA proves that planned changes are protected and accepted.
|
|
|
20
30
|
|
|
21
31
|
## Mandatory per-request artifact
|
|
22
32
|
|
|
23
|
-
Every QA invocation — feature, bug, refactor, clarification — must write
|
|
33
|
+
Every QA invocation — feature, bug, refactor, clarification — must write **three separate files**. Do not merge them into one. Each serves a different reader:
|
|
24
34
|
|
|
25
|
-
|
|
35
|
+
| # | File | Path | Reader | Content |
|
|
36
|
+
|---|------|------|--------|---------|
|
|
37
|
+
| 1 | Test cases | `.peaks/<id>/qa/test-cases/<rid>.md` | RD (before impl), QA | Generated test scenarios with status |
|
|
38
|
+
| 2 | Test report | `.peaks/<id>/qa/test-reports/<rid>.md` | QA, SC, Solo | Summary, coverage%, security, perf, risks |
|
|
39
|
+
| 3 | Request artifact | `.peaks/<id>/qa/requests/<rid>.md` | Solo, RD↔QA loop | Verdict, boundary check, links to #1 and #2 |
|
|
26
40
|
|
|
27
41
|
Concrete template and rules: `references/artifact-per-request.md`.
|
|
28
42
|
|
|
@@ -50,24 +64,46 @@ peaks codegraph affected --project <repo> <changed-files...> --json # regressi
|
|
|
50
64
|
peaks openspec validate <change-id> --project <repo> --json
|
|
51
65
|
peaks openspec validate <change-id> --project <repo> --prefer-external --json # optional
|
|
52
66
|
|
|
53
|
-
# 4.
|
|
67
|
+
# 4. generate test cases — MANDATORY, write to .peaks/<session-id>/qa/test-cases/<request-id>.md
|
|
68
|
+
# categories: unit, integration, UI regression (frontend only)
|
|
54
69
|
|
|
55
|
-
# 5.
|
|
70
|
+
# 5. EXECUTE tests against the actual implementation — Gate A2
|
|
71
|
+
# Run the project test command. Record output. Tests on paper are worthless.
|
|
72
|
+
# Gate A3: Run security review → .peaks/<id>/qa/security-findings.md
|
|
73
|
+
# Gate A4: Run performance check → .peaks/<id>/qa/performance-findings.md
|
|
74
|
+
# CRITICAL: Gates A3 and A4 are NON-NEGOTIABLE. You MUST run actual security
|
|
75
|
+
# and performance checks — not just write a checklist item. These gates exist
|
|
76
|
+
# because code review alone does not catch: hardcoded secrets, XSS vectors,
|
|
77
|
+
# bundle size regressions, render-performance issues, or missing CSP headers.
|
|
78
|
+
# If you skip A3 or A4, Gate C will block the verdict.
|
|
79
|
+
|
|
80
|
+
# 6. write test-report — MANDATORY, write to .peaks/<session-id>/qa/test-reports/<request-id>.md
|
|
81
|
+
# MUST contain actual execution results (pass/fail counts, coverage %, findings).
|
|
82
|
+
# A template with placeholder text does not pass Gate B.
|
|
83
|
+
|
|
84
|
+
# 7. frontend browser validation (when frontend is in scope)
|
|
56
85
|
peaks mcp list --json
|
|
57
86
|
peaks mcp plan --capability playwright-mcp.browser-validation --json
|
|
58
87
|
peaks mcp apply --capability playwright-mcp.browser-validation --yes --json
|
|
59
|
-
#
|
|
88
|
+
# Playwright MCP MUST simulate real user operations — not just take static screenshots.
|
|
89
|
+
# The minimum interaction sequence for every frontend page/flow:
|
|
60
90
|
# mcp__playwright__browser_navigate → URL (after allow-list), launches headed browser
|
|
61
|
-
# mcp__playwright__browser_take_screenshot → visible-browser confirmation
|
|
62
91
|
# mcp__playwright__browser_snapshot → accessibility tree per regression seed
|
|
92
|
+
# mcp__playwright__browser_click → click buttons, tabs, links, modals
|
|
93
|
+
# mcp__playwright__browser_type → type into form fields, search inputs
|
|
94
|
+
# mcp__playwright__browser_select_option → select dropdown values
|
|
95
|
+
# mcp__playwright__browser_fill_form → fill complete forms as a user would
|
|
96
|
+
# mcp__playwright__browser_take_screenshot → capture each state AFTER interaction
|
|
63
97
|
# mcp__playwright__browser_console_messages + browser_network_requests → error feedback loop
|
|
98
|
+
# mcp__playwright__browser_wait_for → wait for async data to render
|
|
64
99
|
# mcp__playwright__browser_close → end the session cleanly
|
|
100
|
+
# Static screenshots without user-interaction simulation do NOT pass this gate.
|
|
65
101
|
# Block QA pass if Playwright MCP is unavailable.
|
|
66
102
|
|
|
67
|
-
#
|
|
103
|
+
# 8. write per-criterion acceptance results, regression matrix, security/performance findings,
|
|
68
104
|
# and the final verdict into the QA request artifact. Mark state=verdict-issued.
|
|
69
105
|
|
|
70
|
-
#
|
|
106
|
+
# 9. on verdict=return-to-rd, route findings back through the request id; otherwise close.
|
|
71
107
|
peaks request show <request-id> --role qa --project <repo> --json
|
|
72
108
|
peaks openspec archive <change-id> --project <repo> --json # preview, then --apply on full pass
|
|
73
109
|
peaks skill presence:clear # QA complete, remove presence indicator
|
|
@@ -75,6 +111,88 @@ peaks skill presence:clear # QA complete, remove presence i
|
|
|
75
111
|
|
|
76
112
|
Verdict `pass` is blocked until every applicable validation gate has evidence in the artifact.
|
|
77
113
|
|
|
114
|
+
### Transition verification gates (MANDATORY — run the command, see the output)
|
|
115
|
+
|
|
116
|
+
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.
|
|
117
|
+
|
|
118
|
+
**Gate A — After test-case generation:**
|
|
119
|
+
```bash
|
|
120
|
+
ls .peaks/<id>/qa/test-cases/<rid>.md
|
|
121
|
+
# Expected output: .peaks/<id>/qa/test-cases/<rid>.md
|
|
122
|
+
# "No such file" → STOP, generate test cases first. Do not proceed to validation.
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**Gate A2 — After test execution: tests actually ran and produced output (CRITICAL):**
|
|
126
|
+
```bash
|
|
127
|
+
# Run the project's test command. Do NOT skip this. Writing test cases is not enough.
|
|
128
|
+
# Example (adapt to project):
|
|
129
|
+
npx vitest run --reporter=verbose 2>&1 | tail -30
|
|
130
|
+
# Expected: exit code 0, actual test output with pass/fail counts
|
|
131
|
+
# "0 tests executed" or "no test files found" → BLOCKED. Tests were written but not run.
|
|
132
|
+
# Record the raw test output and link it in the test report.
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Gate A3 — Security test executed (NOT just a checklist item):**
|
|
136
|
+
```bash
|
|
137
|
+
# Run security review against the changed surface. Record findings.
|
|
138
|
+
ls .peaks/<id>/qa/security-findings.md 2>&1
|
|
139
|
+
# Expected: .peaks/<id>/qa/security-findings.md
|
|
140
|
+
# "No such file" → BLOCKED. Run security review against changed files,
|
|
141
|
+
# record every finding with severity, then re-check.
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Gate A4 — Performance test executed:**
|
|
145
|
+
```bash
|
|
146
|
+
# Run available performance check against the changed surface. Record findings.
|
|
147
|
+
ls .peaks/<id>/qa/performance-findings.md 2>&1
|
|
148
|
+
# Expected: .peaks/<id>/qa/performance-findings.md
|
|
149
|
+
# "No such file" → BLOCKED. Run performance check (build-size, Lighthouse,
|
|
150
|
+
# bundle analysis, or project equivalent), record baseline vs. after, then re-check.
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Gate B — After test-report write (MUST contain execution results, not just planned cases):**
|
|
154
|
+
```bash
|
|
155
|
+
ls .peaks/<id>/qa/test-reports/<rid>.md
|
|
156
|
+
# Expected output: .peaks/<id>/qa/test-reports/<rid>.md
|
|
157
|
+
# "No such file" → STOP, write the test report first. Do not issue a verdict.
|
|
158
|
+
# Additionally verify the report is not a placeholder:
|
|
159
|
+
grep -c "pass\|fail\|blocked" .peaks/<id>/qa/test-reports/<rid>.md
|
|
160
|
+
# Expected: non-zero count (report contains actual pass/fail/blocked results)
|
|
161
|
+
# Zero → the report is empty/template-only. Tests were not executed.
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Gate C — Before issuing verdict:**
|
|
165
|
+
```bash
|
|
166
|
+
ls .peaks/<id>/qa/test-cases/<rid>.md \
|
|
167
|
+
.peaks/<id>/qa/test-reports/<rid>.md \
|
|
168
|
+
.peaks/<id>/qa/security-findings.md \
|
|
169
|
+
.peaks/<id>/qa/performance-findings.md \
|
|
170
|
+
.peaks/<id>/qa/requests/<rid>.md
|
|
171
|
+
# All five must exist. Missing any → QA incomplete, verdict blocked.
|
|
172
|
+
# NOTE: security-findings.md and performance-findings.md are NOT optional.
|
|
173
|
+
# If you can't run a full security scan, run at minimum: grep for secrets,
|
|
174
|
+
# check for XSS vectors, verify no hardcoded credentials.
|
|
175
|
+
# If you can't run Lighthouse, run at minimum: build-size check, bundle analysis.
|
|
176
|
+
# An empty "N/A — skipped" file does NOT pass. Every file must contain findings.
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Gate D — Frontend browser evidence (BLOCKING when frontend is in scope):**
|
|
180
|
+
```bash
|
|
181
|
+
# Verify browser screenshots exist. Screenshots are the only acceptable evidence
|
|
182
|
+
# that Playwright MCP actually launched and interacted with the running app.
|
|
183
|
+
ls .peaks/<id>/qa/screenshots/*.png 2>&1
|
|
184
|
+
# Expected: one or more .png files
|
|
185
|
+
# "No such file" → BLOCKED. Playwright MCP was not used or screenshots not saved.
|
|
186
|
+
# Screenshots, logs, manual steps, or other tools must NOT substitute for this gate.
|
|
187
|
+
# Re-run frontend browser validation (step 7 in runbook) and save screenshots.
|
|
188
|
+
```
|
|
189
|
+
```bash
|
|
190
|
+
# Verify console and network checks were actually performed
|
|
191
|
+
grep -c "browser_console_messages\|browser_network_requests" .peaks/<id>/qa/test-reports/<rid>.md
|
|
192
|
+
# Expected: non-zero count (means console/network were checked)
|
|
193
|
+
# Zero → BLOCKED. Browser error feedback loop was not executed.
|
|
194
|
+
```
|
|
195
|
+
|
|
78
196
|
## Project standards preflight
|
|
79
197
|
|
|
80
198
|
Before QA verification in a code repository, call the Peaks CLI:
|
|
@@ -106,17 +224,59 @@ Before QA passes or returns work to RD, it must independently recheck the implem
|
|
|
106
224
|
4. browser E2E must avoid destructive interactions unless the requirement explicitly includes them and the user confirms the action;
|
|
107
225
|
5. record a “red-line boundary check” section in the validation report with pass/fail, evidence, and any out-of-scope findings.
|
|
108
226
|
|
|
227
|
+
## Mandatory test-case generation
|
|
228
|
+
|
|
229
|
+
QA must generate test cases, not merely inspect existing ones. Every QA invocation that validates code changes must produce a test-case artifact at `.peaks/<session-id>/qa/test-cases/<request-id>.md`.
|
|
230
|
+
|
|
231
|
+
**Minimum test-case categories:**
|
|
232
|
+
|
|
233
|
+
1. **Unit test cases** — verify that RD's unit tests cover: happy path, edge cases (null/undefined/empty), error states, boundary values, and async behavior for each changed function/component/hook
|
|
234
|
+
2. **Integration test cases** — API contract verification, data flow through changed components, mock alignment with real API shapes
|
|
235
|
+
3. **UI regression test cases** (frontend only) — page load, component render states (loading, empty, error, populated), modal open/close, form submit/validation, table sort/filter/pagination, navigation flow, keyboard accessibility
|
|
236
|
+
|
|
237
|
+
**Test-case format:**
|
|
238
|
+
|
|
239
|
+
```markdown
|
|
240
|
+
## Test Case: <title>
|
|
241
|
+
- **Category:** unit | integration | ui-regression
|
|
242
|
+
- **Target:** <file-or-route>
|
|
243
|
+
- **Preconditions:** <state-before>
|
|
244
|
+
- **Steps:** 1. ... 2. ...
|
|
245
|
+
- **Expected result:** <what-should-happen>
|
|
246
|
+
- **Status:** pass | fail | blocked | skipped
|
|
247
|
+
- **Evidence:** <link-or-observation>
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**Test-case execution**: Run the project's test command and record results against each generated test case. If the project uses Jest, run `npx jest --coverage` and link the coverage report. If the project uses Vitest, run `npx vitest run --coverage`. Record the coverage percentage for changed files in the test report.
|
|
251
|
+
|
|
252
|
+
## Mandatory test-report output
|
|
253
|
+
|
|
254
|
+
Every QA invocation must produce a test-report artifact at `.peaks/<session-id>/qa/test-reports/<request-id>.md`. This is separate from both the test-case file and the request artifact — do not merge.
|
|
255
|
+
|
|
256
|
+
**Minimum test-report sections:**
|
|
257
|
+
|
|
258
|
+
1. **Summary** — pass/fail count, coverage %, verdict (pass / return-to-rd / blocked)
|
|
259
|
+
2. **Test execution results** — number of test cases executed, passed, failed, skipped
|
|
260
|
+
3. **Coverage evidence** — changed-files coverage %, overall project coverage %, link to coverage report
|
|
261
|
+
4. **Browser validation results** (frontend only) — pages validated, screenshots path, console errors found, network errors found
|
|
262
|
+
5. **Security findings** — issues found, severity, resolution status
|
|
263
|
+
6. **Performance findings** — baseline vs after numbers (build size, Lighthouse, etc. as applicable)
|
|
264
|
+
7. **Residual risks** — known issues not fixed, why, mitigation
|
|
265
|
+
8. **Red-line boundary check** — pass/fail against the approved scope
|
|
266
|
+
|
|
109
267
|
## Mandatory validation gates
|
|
110
268
|
|
|
111
269
|
QA cannot pass a change until the report contains evidence for every applicable gate:
|
|
112
270
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
271
|
+
0. **Test-case generation** — enforced by Gate A.
|
|
272
|
+
1. **Test-report** — enforced by Gate B.
|
|
273
|
+
2. **Unit tests** — run the project test command or a focused test command that covers new/changed code. For legacy projects below the target coverage, require coverage for the new or changed code rather than failing on pre-existing uncovered code.
|
|
274
|
+
3. **API validation** — when the change touches API contracts, data loading, request handling, auth, or integrations, exercise the relevant API path and record request/response evidence or a justified local substitute.
|
|
275
|
+
4. **Frontend browser validation** — when the repository has a frontend or the change affects UI, launch the app and use Playwright MCP for real browser end-to-end validation. This means **simulating real user operations**: clicking buttons, filling forms, selecting dropdowns, navigating between pages, waiting for async data to render, and verifying each resulting state. Static screenshots without interaction are insufficient. Confirm Playwright MCP is installed via `peaks mcp list --json`; install through `peaks mcp plan/apply --capability playwright-mcp.browser-validation --yes` if missing. Use `mcp__playwright__browser_navigate` (launches headed browser), `mcp__playwright__browser_click` (simulate clicks on tabs/buttons/links), `mcp__playwright__browser_type` (type into inputs), `mcp__playwright__browser_select_option` (select dropdowns), `mcp__playwright__browser_fill_form` (fill complete forms), `mcp__playwright__browser_wait_for` (wait for async rendering), and `mcp__playwright__browser_take_screenshot` (capture state after each interaction). 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 sanitized interaction sequences, sanitized screenshots per state, sanitized console (`browser_console_messages`) and network (`browser_network_requests`) failures. Close with `mcp__playwright__browser_close` when done. (Chrome DevTools MCP is an optional secondary surface for CDP inspection of an already-running Chrome on `:9222`; it does NOT launch a browser and cannot simulate user interaction.)
|
|
276
|
+
5. **Browser-error feedback loop** — if Playwright MCP observation surfaces a page error, console exception, broken network request, hydration/render failure, or visible regression, return the work to RD/development with the exact evidence. Do not pass QA until the fixed build is retested in the browser.
|
|
277
|
+
6. **Security check** — run security review for the changed surface and dependency/config changes. Record findings, fixes, and unresolved risks.
|
|
278
|
+
7. **Performance check** — run the project’s available performance check, build-size check, Lighthouse-equivalent check, or browser performance inspection appropriate to the change. Record baseline/after numbers when available.
|
|
279
|
+
8. **Validation report** — write or link a report containing scope, environment, commands, sanitized browser evidence, security/performance results, pass/fail summary, residual risks, and next action.
|
|
120
280
|
|
|
121
281
|
If Playwright MCP is unavailable (not installed and the user has not authorized installation), mark the gate blocked with the missing capability. Screenshots, logs, manual steps, or other tools must not substitute for the mandatory frontend browser gate. Do not silently downgrade frontend validation to API-only testing.
|
|
122
282
|
|