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.
Files changed (107) hide show
  1. package/bin/peaks.js +0 -0
  2. package/dist/src/cli/commands/config-commands.js +1 -17
  3. package/dist/src/cli/commands/core-artifact-commands.js +23 -0
  4. package/dist/src/cli/commands/mcp-commands.d.ts +3 -0
  5. package/dist/src/cli/commands/mcp-commands.js +144 -0
  6. package/dist/src/cli/commands/openspec-commands.d.ts +3 -0
  7. package/dist/src/cli/commands/openspec-commands.js +169 -0
  8. package/dist/src/cli/commands/project-commands.d.ts +3 -0
  9. package/dist/src/cli/commands/project-commands.js +37 -0
  10. package/dist/src/cli/commands/request-commands.d.ts +3 -0
  11. package/dist/src/cli/commands/request-commands.js +140 -0
  12. package/dist/src/cli/commands/understand-commands.d.ts +3 -0
  13. package/dist/src/cli/commands/understand-commands.js +78 -0
  14. package/dist/src/cli/commands/workflow-commands.js +56 -94
  15. package/dist/src/cli/program.js +10 -0
  16. package/dist/src/services/artifacts/request-artifact-service.d.ts +58 -0
  17. package/dist/src/services/artifacts/request-artifact-service.js +432 -0
  18. package/dist/src/services/codegraph/codegraph-service.js +26 -45
  19. package/dist/src/services/config/config-service.js +2 -22
  20. package/dist/src/services/dashboard/project-dashboard-service.d.ts +64 -0
  21. package/dist/src/services/dashboard/project-dashboard-service.js +112 -0
  22. package/dist/src/services/doctor/doctor-service.d.ts +7 -0
  23. package/dist/src/services/doctor/doctor-service.js +139 -0
  24. package/dist/src/services/mcp/mcp-apply-service.d.ts +31 -0
  25. package/dist/src/services/mcp/mcp-apply-service.js +112 -0
  26. package/dist/src/services/mcp/mcp-call-service.d.ts +17 -0
  27. package/dist/src/services/mcp/mcp-call-service.js +34 -0
  28. package/dist/src/services/mcp/mcp-client-service.d.ts +14 -0
  29. package/dist/src/services/mcp/mcp-client-service.js +49 -0
  30. package/dist/src/services/mcp/mcp-install-registry.d.ts +11 -0
  31. package/dist/src/services/mcp/mcp-install-registry.js +38 -0
  32. package/dist/src/services/mcp/mcp-plan-service.d.ts +29 -0
  33. package/dist/src/services/mcp/mcp-plan-service.js +109 -0
  34. package/dist/src/services/mcp/mcp-protocol.d.ts +24 -0
  35. package/dist/src/services/mcp/mcp-protocol.js +41 -0
  36. package/dist/src/services/mcp/mcp-scan-service.d.ts +8 -0
  37. package/dist/src/services/mcp/mcp-scan-service.js +214 -0
  38. package/dist/src/services/mcp/mcp-stdio-transport.d.ts +10 -0
  39. package/dist/src/services/mcp/mcp-stdio-transport.js +50 -0
  40. package/dist/src/services/mcp/mcp-types.d.ts +31 -0
  41. package/dist/src/services/mcp/mcp-types.js +1 -0
  42. package/dist/src/services/openspec/openspec-archive-service.d.ts +12 -0
  43. package/dist/src/services/openspec/openspec-archive-service.js +28 -0
  44. package/dist/src/services/openspec/openspec-bridge-service.d.ts +16 -0
  45. package/dist/src/services/openspec/openspec-bridge-service.js +76 -0
  46. package/dist/src/services/openspec/openspec-render-service.d.ts +38 -0
  47. package/dist/src/services/openspec/openspec-render-service.js +130 -0
  48. package/dist/src/services/openspec/openspec-scan-service.d.ts +6 -0
  49. package/dist/src/services/openspec/openspec-scan-service.js +123 -0
  50. package/dist/src/services/openspec/openspec-types.d.ts +39 -0
  51. package/dist/src/services/openspec/openspec-types.js +1 -0
  52. package/dist/src/services/openspec/openspec-validate-service.d.ts +27 -0
  53. package/dist/src/services/openspec/openspec-validate-service.js +77 -0
  54. package/dist/src/services/recommendations/capability-seed-items.js +2 -1
  55. package/dist/src/services/recommendations/capability-seed-mappings.js +1 -1
  56. package/dist/src/services/recommendations/capability-seed-sources.js +1 -1
  57. package/dist/src/services/shadcn/shadcn-service.d.ts +4 -0
  58. package/dist/src/services/shadcn/shadcn-service.js +15 -30
  59. package/dist/src/services/skills/skill-runbook-service.d.ts +11 -0
  60. package/dist/src/services/skills/skill-runbook-service.js +60 -0
  61. package/dist/src/services/standards/project-standards-service.js +4 -9
  62. package/dist/src/services/understand/understand-scan-service.d.ts +28 -0
  63. package/dist/src/services/understand/understand-scan-service.js +157 -0
  64. package/dist/src/services/understand/understand-types.d.ts +24 -0
  65. package/dist/src/services/understand/understand-types.js +1 -0
  66. package/dist/src/shared/json-schema-mini.d.ts +10 -0
  67. package/dist/src/shared/json-schema-mini.js +113 -0
  68. package/dist/src/shared/paths.d.ts +1 -1
  69. package/dist/src/shared/paths.js +9 -1
  70. package/dist/src/shared/version.d.ts +1 -1
  71. package/dist/src/shared/version.js +1 -1
  72. package/package.json +2 -8
  73. package/schemas/doctor-report.schema.json +34 -0
  74. package/schemas/mcp-apply-result.schema.json +46 -0
  75. package/schemas/mcp-install-plan.schema.json +71 -0
  76. package/schemas/mcp-install-spec.schema.json +29 -0
  77. package/schemas/mcp-server.schema.json +29 -0
  78. package/schemas/openspec-change-summary.schema.json +68 -0
  79. package/schemas/openspec-render-request.schema.json +61 -0
  80. package/schemas/openspec-validation-result.schema.json +36 -0
  81. package/skills/peaks-prd/SKILL.md +59 -8
  82. package/skills/peaks-prd/references/artifact-per-request.md +78 -0
  83. package/skills/peaks-prd/references/workflow.md +7 -5
  84. package/skills/peaks-qa/SKILL.md +74 -8
  85. package/skills/peaks-qa/references/artifact-contracts.md +2 -2
  86. package/skills/peaks-qa/references/artifact-per-request.md +83 -0
  87. package/skills/peaks-qa/references/openspec-validation-gate.md +55 -0
  88. package/skills/peaks-qa/references/regression-gates.md +2 -2
  89. package/skills/peaks-rd/SKILL.md +96 -9
  90. package/skills/peaks-rd/references/artifact-contracts.md +2 -2
  91. package/skills/peaks-rd/references/artifact-per-request.md +90 -0
  92. package/skills/peaks-rd/references/openspec-mcp-cli.md +65 -0
  93. package/skills/peaks-rd/references/refactor-workflow.md +2 -2
  94. package/skills/peaks-sc/SKILL.md +44 -0
  95. package/skills/peaks-sc/references/openspec-commit-boundaries.md +33 -0
  96. package/skills/peaks-solo/SKILL.md +90 -9
  97. package/skills/peaks-solo/references/artifact-contracts.md +2 -2
  98. package/skills/peaks-solo/references/browser-workflow.md +114 -0
  99. package/skills/peaks-solo/references/external-skill-invocation.md +70 -0
  100. package/skills/peaks-solo/references/openspec-mcp-workflow.md +53 -0
  101. package/skills/peaks-solo/references/refactor-mode.md +2 -2
  102. package/skills/peaks-solo/references/workflow.md +1 -1
  103. package/skills/peaks-txt/SKILL.md +42 -0
  104. package/skills/peaks-ui/SKILL.md +57 -33
  105. package/skills/peaks-ui/references/artifact-per-request.md +71 -0
  106. package/skills/peaks-ui/references/workflow.md +8 -11
  107. 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. Use HyperFrames as a reference for HTML-native timeline ideas, kinetic overlays, animated captions, data motion, shader-like transitions, and cinematic state changes, without installing its runtime unless explicitly approved. If the workflow requires actual HyperFrames skills/runtime and they are missing, mark the step blocked and tell the user to install manually with `npx skills add heygen-com/hyperframes` before continuing that path.
12
- 4. Produce a concrete visual direction, not vague “clean modern” language.
13
- 5. Define a motion budget: allowed animated properties, max intensity, reduced-motion behavior, lazy-loading expectations, and performance evidence required.
14
- 6. 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.
15
- 7. Require meaningful loading, empty, error, hover, focus, active, responsive, and reduced-motion states.
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, motion budget, and rejected generic patterns;
22
+ - design dials and rejected generic patterns;
25
23
  - interaction constraints;
26
- - headed `gstack/browse/dist/browse` browser observations when frontend output exists;
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 and reduced-motion notes;
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
- }