peaks-cli 1.0.12 → 1.0.13
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/config-commands.js +1 -17
- package/dist/src/cli/commands/core-artifact-commands.js +23 -0
- package/dist/src/cli/commands/mcp-commands.d.ts +3 -0
- package/dist/src/cli/commands/mcp-commands.js +144 -0
- package/dist/src/cli/commands/openspec-commands.d.ts +3 -0
- package/dist/src/cli/commands/openspec-commands.js +169 -0
- package/dist/src/cli/commands/project-commands.d.ts +3 -0
- package/dist/src/cli/commands/project-commands.js +37 -0
- package/dist/src/cli/commands/request-commands.d.ts +3 -0
- package/dist/src/cli/commands/request-commands.js +140 -0
- package/dist/src/cli/commands/understand-commands.d.ts +3 -0
- package/dist/src/cli/commands/understand-commands.js +78 -0
- package/dist/src/cli/commands/workflow-commands.js +56 -94
- package/dist/src/cli/program.js +10 -0
- package/dist/src/services/artifacts/request-artifact-service.d.ts +58 -0
- package/dist/src/services/artifacts/request-artifact-service.js +432 -0
- package/dist/src/services/codegraph/codegraph-service.js +26 -45
- package/dist/src/services/config/config-service.js +2 -22
- package/dist/src/services/dashboard/project-dashboard-service.d.ts +64 -0
- package/dist/src/services/dashboard/project-dashboard-service.js +112 -0
- package/dist/src/services/doctor/doctor-service.d.ts +7 -0
- package/dist/src/services/doctor/doctor-service.js +139 -0
- package/dist/src/services/mcp/mcp-apply-service.d.ts +31 -0
- package/dist/src/services/mcp/mcp-apply-service.js +112 -0
- package/dist/src/services/mcp/mcp-call-service.d.ts +17 -0
- package/dist/src/services/mcp/mcp-call-service.js +34 -0
- package/dist/src/services/mcp/mcp-client-service.d.ts +14 -0
- package/dist/src/services/mcp/mcp-client-service.js +49 -0
- package/dist/src/services/mcp/mcp-install-registry.d.ts +11 -0
- package/dist/src/services/mcp/mcp-install-registry.js +38 -0
- package/dist/src/services/mcp/mcp-plan-service.d.ts +29 -0
- package/dist/src/services/mcp/mcp-plan-service.js +109 -0
- package/dist/src/services/mcp/mcp-protocol.d.ts +24 -0
- package/dist/src/services/mcp/mcp-protocol.js +41 -0
- package/dist/src/services/mcp/mcp-scan-service.d.ts +8 -0
- package/dist/src/services/mcp/mcp-scan-service.js +214 -0
- package/dist/src/services/mcp/mcp-stdio-transport.d.ts +10 -0
- package/dist/src/services/mcp/mcp-stdio-transport.js +50 -0
- package/dist/src/services/mcp/mcp-types.d.ts +31 -0
- package/dist/src/services/mcp/mcp-types.js +1 -0
- package/dist/src/services/openspec/openspec-archive-service.d.ts +12 -0
- package/dist/src/services/openspec/openspec-archive-service.js +28 -0
- package/dist/src/services/openspec/openspec-bridge-service.d.ts +16 -0
- package/dist/src/services/openspec/openspec-bridge-service.js +76 -0
- package/dist/src/services/openspec/openspec-render-service.d.ts +38 -0
- package/dist/src/services/openspec/openspec-render-service.js +130 -0
- package/dist/src/services/openspec/openspec-scan-service.d.ts +6 -0
- package/dist/src/services/openspec/openspec-scan-service.js +123 -0
- package/dist/src/services/openspec/openspec-types.d.ts +39 -0
- package/dist/src/services/openspec/openspec-types.js +1 -0
- package/dist/src/services/openspec/openspec-validate-service.d.ts +27 -0
- package/dist/src/services/openspec/openspec-validate-service.js +77 -0
- package/dist/src/services/recommendations/capability-seed-items.js +2 -1
- package/dist/src/services/recommendations/capability-seed-mappings.js +1 -1
- package/dist/src/services/recommendations/capability-seed-sources.js +1 -1
- package/dist/src/services/shadcn/shadcn-service.d.ts +4 -0
- package/dist/src/services/shadcn/shadcn-service.js +15 -30
- package/dist/src/services/skills/skill-runbook-service.d.ts +11 -0
- package/dist/src/services/skills/skill-runbook-service.js +60 -0
- package/dist/src/services/standards/project-standards-service.js +4 -9
- package/dist/src/services/understand/understand-scan-service.d.ts +28 -0
- package/dist/src/services/understand/understand-scan-service.js +157 -0
- package/dist/src/services/understand/understand-types.d.ts +24 -0
- package/dist/src/services/understand/understand-types.js +1 -0
- package/dist/src/shared/json-schema-mini.d.ts +10 -0
- package/dist/src/shared/json-schema-mini.js +113 -0
- package/dist/src/shared/paths.d.ts +1 -1
- package/dist/src/shared/paths.js +9 -1
- package/dist/src/shared/version.d.ts +1 -1
- package/dist/src/shared/version.js +1 -1
- package/package.json +2 -8
- package/schemas/doctor-report.schema.json +34 -0
- package/schemas/mcp-apply-result.schema.json +46 -0
- package/schemas/mcp-install-plan.schema.json +71 -0
- package/schemas/mcp-install-spec.schema.json +29 -0
- package/schemas/mcp-server.schema.json +29 -0
- package/schemas/openspec-change-summary.schema.json +68 -0
- package/schemas/openspec-render-request.schema.json +61 -0
- package/schemas/openspec-validation-result.schema.json +36 -0
- package/skills/peaks-prd/SKILL.md +59 -8
- package/skills/peaks-prd/references/artifact-per-request.md +78 -0
- package/skills/peaks-prd/references/workflow.md +7 -5
- package/skills/peaks-qa/SKILL.md +74 -8
- package/skills/peaks-qa/references/artifact-contracts.md +2 -2
- package/skills/peaks-qa/references/artifact-per-request.md +83 -0
- package/skills/peaks-qa/references/openspec-validation-gate.md +55 -0
- package/skills/peaks-qa/references/regression-gates.md +2 -2
- package/skills/peaks-rd/SKILL.md +96 -9
- package/skills/peaks-rd/references/artifact-contracts.md +2 -2
- package/skills/peaks-rd/references/artifact-per-request.md +90 -0
- package/skills/peaks-rd/references/openspec-mcp-cli.md +65 -0
- package/skills/peaks-rd/references/refactor-workflow.md +2 -2
- package/skills/peaks-sc/SKILL.md +44 -0
- package/skills/peaks-sc/references/openspec-commit-boundaries.md +33 -0
- package/skills/peaks-solo/SKILL.md +90 -9
- package/skills/peaks-solo/references/artifact-contracts.md +2 -2
- package/skills/peaks-solo/references/browser-workflow.md +114 -0
- package/skills/peaks-solo/references/external-skill-invocation.md +70 -0
- package/skills/peaks-solo/references/openspec-mcp-workflow.md +53 -0
- package/skills/peaks-solo/references/refactor-mode.md +2 -2
- package/skills/peaks-solo/references/workflow.md +1 -1
- package/skills/peaks-txt/SKILL.md +42 -0
- package/skills/peaks-ui/SKILL.md +57 -33
- package/skills/peaks-ui/references/artifact-per-request.md +71 -0
- package/skills/peaks-ui/references/workflow.md +8 -11
- package/scripts/strip-internal-exports.mjs +0 -33
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# UI per-request artifact contract
|
|
2
|
+
|
|
3
|
+
Every UI invocation must leave one durable artifact under the workflow-local workspace so design and frontend behavior decisions are traceable later.
|
|
4
|
+
|
|
5
|
+
## Required path
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
.peaks/<session-id>/ui/requests/<request-id>.md
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Use the same `<request-id>` PRD assigned (`YYYY-MM-DD-<kebab-slug>`) so the PRD/UI/RD/QA records can be cross-linked.
|
|
12
|
+
|
|
13
|
+
## Required content
|
|
14
|
+
|
|
15
|
+
```markdown
|
|
16
|
+
# UI Request <request-id>
|
|
17
|
+
|
|
18
|
+
- linked-prd: .peaks/<session-id>/prd/requests/<request-id>.md
|
|
19
|
+
- scope: full new surface | iteration on existing surface | regression fix | visual refresh
|
|
20
|
+
- design direction: editorial | bento | Swiss | luxury | retro-futurist | glass | product-system | other-explicit-name
|
|
21
|
+
|
|
22
|
+
## Affected surfaces
|
|
23
|
+
|
|
24
|
+
- pages / routes / components / modals / states (loading, empty, error, hover, focus, active, responsive)
|
|
25
|
+
- explicit out-of-scope surfaces (do not modify)
|
|
26
|
+
|
|
27
|
+
## UX flow and page states
|
|
28
|
+
|
|
29
|
+
- entry points, primary flow, secondary flows, exit points
|
|
30
|
+
- state machine per surface when state transitions matter
|
|
31
|
+
|
|
32
|
+
## Visual constraints
|
|
33
|
+
|
|
34
|
+
- typography pair: ...
|
|
35
|
+
- palette: ...
|
|
36
|
+
- density and motion intensity dials: ...
|
|
37
|
+
- rejected generic patterns (centered stock hero, default card grid, AI gradients, etc.)
|
|
38
|
+
|
|
39
|
+
## Interaction constraints
|
|
40
|
+
|
|
41
|
+
- keyboard, focus order, ARIA roles, gesture support, accessibility minima
|
|
42
|
+
|
|
43
|
+
## UI regression seeds
|
|
44
|
+
|
|
45
|
+
- list of visible regressions QA must check against the prior state
|
|
46
|
+
- browser paths and visible assertions QA can use directly
|
|
47
|
+
|
|
48
|
+
## Browser evidence
|
|
49
|
+
|
|
50
|
+
- sanitized observations only — no login URLs, cookies, headers, tokens, storage state, browser traces, or screenshots/logs with PII / SSO / MFA material
|
|
51
|
+
- where the Playwright MCP browser evidence is stored (`mcp__playwright__browser_take_screenshot` / `take_snapshot` outputs, sanitized)
|
|
52
|
+
|
|
53
|
+
## Handoff
|
|
54
|
+
|
|
55
|
+
- to peaks-rd: <link to RD request artifact>
|
|
56
|
+
- to peaks-qa: <link to QA request artifact>
|
|
57
|
+
|
|
58
|
+
## Status
|
|
59
|
+
|
|
60
|
+
- created: <ISO timestamp>
|
|
61
|
+
- last update: <ISO timestamp>
|
|
62
|
+
- state: draft | direction-locked | handed-off | blocked
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Rules
|
|
66
|
+
|
|
67
|
+
- Do not skip the UI artifact when the request touches user-visible behavior. Even bug fixes that change visible flow require a UI request artifact.
|
|
68
|
+
- Tasteful direction is a constraint, not a suggestion: record the chosen direction and the rejected generic patterns so QA can fail a regression that drifts toward them.
|
|
69
|
+
- Sanitize before writing — same rules as PRD/RD/QA.
|
|
70
|
+
- Do not commit unless the user or active profile authorizes durable retention.
|
|
71
|
+
- Handoff to RD/QA is blocked while state is `draft`.
|
|
@@ -8,23 +8,20 @@ Use this path before generating or accepting frontend UI:
|
|
|
8
8
|
|
|
9
9
|
1. Pull visual direction from `awesome-design-md` style references or equivalent curated design markdown.
|
|
10
10
|
2. Apply `taste-skill`/`design-taste-frontend` critique rules to set design variance, motion intensity, visual density, typography, palette, and interaction feel.
|
|
11
|
-
3.
|
|
12
|
-
4.
|
|
13
|
-
5.
|
|
14
|
-
6.
|
|
15
|
-
7.
|
|
16
|
-
8. Launch the app with the project command, capture the actual advertised URL from server output/config/user input, and use headed `gstack/browse/dist/browse` on that URL to inspect real browser output; visible browser confirmation is mandatory, default framework ports must not be guessed, gstack instability blocks the browser gate instead of falling back to Playwright MCP, and login/CAPTCHA/SSO/MFA requires waiting for explicit user confirmation before continuing.
|
|
17
|
-
9. If the browser view looks generic, visually weak, broken, inaccessible, slow, janky, or has console/runtime errors, return to design/RD and iterate before handing off to QA.
|
|
11
|
+
3. Produce a concrete visual direction, not vague “clean modern” language.
|
|
12
|
+
4. Reject generic AI UI tells: centered stock hero, uniform card grids, default shadcn/library styling, purple-blue gradients, three equal feature cards, generic placeholder copy, and static-only happy states.
|
|
13
|
+
5. Require meaningful loading, empty, error, hover, focus, active, and responsive states.
|
|
14
|
+
6. Use Playwright MCP on the running page or prototype to inspect real browser output (install via `peaks mcp plan/apply --capability playwright-mcp.browser-validation --yes` if not yet present; open with `mcp__playwright__browser_navigate` / `navigate_page`, capture with `take_snapshot` and `take_screenshot`); visible browser confirmation is mandatory, and login/CAPTCHA/SSO/MFA requires waiting for explicit user confirmation before continuing.
|
|
15
|
+
7. If the browser view looks generic, visually weak, broken, inaccessible, or has console/runtime errors, return to design/RD and iterate before handing off to QA.
|
|
18
16
|
|
|
19
17
|
## Outputs
|
|
20
18
|
|
|
21
19
|
- UX flow;
|
|
22
20
|
- page state map;
|
|
23
21
|
- visual direction with references;
|
|
24
|
-
- design dials
|
|
22
|
+
- design dials and rejected generic patterns;
|
|
25
23
|
- interaction constraints;
|
|
26
|
-
-
|
|
24
|
+
- Playwright MCP browser observations when frontend output exists (`mcp__playwright__browser_snapshot`, `take_screenshot`, `list_console_messages`, `list_network_requests`);
|
|
27
25
|
- UI regression seeds;
|
|
28
|
-
- accessibility
|
|
29
|
-
- performance evidence for animation-heavy UI;
|
|
26
|
+
- accessibility notes;
|
|
30
27
|
- taste report.
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs';
|
|
3
|
-
import { join, resolve } from 'node:path';
|
|
4
|
-
import { dirname } from 'node:path';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
|
|
7
|
-
const packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
8
|
-
const distSrcRoot = join(packageRoot, 'dist', 'src');
|
|
9
|
-
const internalExportPattern = /\/\*\* @internal \*\/\r?\nexport const testInternals = \{[\s\S]*?\r?\n\};\r?\n?/g;
|
|
10
|
-
|
|
11
|
-
function getJavaScriptFiles(directory) {
|
|
12
|
-
return readdirSync(directory).flatMap((entry) => {
|
|
13
|
-
const path = join(directory, entry);
|
|
14
|
-
const stats = statSync(path);
|
|
15
|
-
if (stats.isDirectory()) {
|
|
16
|
-
return getJavaScriptFiles(path);
|
|
17
|
-
}
|
|
18
|
-
return stats.isFile() && path.endsWith('.js') ? [path] : [];
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
for (const filePath of getJavaScriptFiles(distSrcRoot)) {
|
|
23
|
-
const source = readFileSync(filePath, 'utf8');
|
|
24
|
-
if (!source.includes('testInternals')) {
|
|
25
|
-
continue;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const strippedSource = source.replace(internalExportPattern, '');
|
|
29
|
-
if (strippedSource === source || strippedSource.includes('testInternals')) {
|
|
30
|
-
throw new Error(`Failed to strip internal test export from ${filePath}`);
|
|
31
|
-
}
|
|
32
|
-
writeFileSync(filePath, strippedSource, 'utf8');
|
|
33
|
-
}
|