peaks-cli 1.0.0
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/LICENSE +52 -0
- package/README.md +417 -0
- package/bin/peaks.js +2 -0
- package/dist/src/cli/cli-helpers.d.ts +25 -0
- package/dist/src/cli/cli-helpers.js +78 -0
- package/dist/src/cli/commands/capability-commands.d.ts +5 -0
- package/dist/src/cli/commands/capability-commands.js +46 -0
- package/dist/src/cli/commands/capability-worker-config-sc-commands.d.ts +3 -0
- package/dist/src/cli/commands/capability-worker-config-sc-commands.js +10 -0
- package/dist/src/cli/commands/config-commands.d.ts +3 -0
- package/dist/src/cli/commands/config-commands.js +212 -0
- package/dist/src/cli/commands/core-artifact-commands.d.ts +3 -0
- package/dist/src/cli/commands/core-artifact-commands.js +200 -0
- package/dist/src/cli/commands/sc-commands.d.ts +3 -0
- package/dist/src/cli/commands/sc-commands.js +37 -0
- package/dist/src/cli/commands/worker-commands.d.ts +3 -0
- package/dist/src/cli/commands/worker-commands.js +52 -0
- package/dist/src/cli/commands/workflow-commands.d.ts +3 -0
- package/dist/src/cli/commands/workflow-commands.js +257 -0
- package/dist/src/cli/index.d.ts +1 -0
- package/dist/src/cli/index.js +14 -0
- package/dist/src/cli/program.d.ts +4 -0
- package/dist/src/cli/program.js +13 -0
- package/dist/src/services/artifacts/artifact-service.d.ts +43 -0
- package/dist/src/services/artifacts/artifact-service.js +97 -0
- package/dist/src/services/artifacts/workspace-service.d.ts +33 -0
- package/dist/src/services/artifacts/workspace-service.js +254 -0
- package/dist/src/services/config/config-service.d.ts +29 -0
- package/dist/src/services/config/config-service.js +501 -0
- package/dist/src/services/config/config-types.d.ts +63 -0
- package/dist/src/services/config/config-types.js +16 -0
- package/dist/src/services/config/model-routing.d.ts +4 -0
- package/dist/src/services/config/model-routing.js +15 -0
- package/dist/src/services/doctor/doctor-service.d.ts +18 -0
- package/dist/src/services/doctor/doctor-service.js +68 -0
- package/dist/src/services/memory/project-memory-service.d.ts +79 -0
- package/dist/src/services/memory/project-memory-service.js +306 -0
- package/dist/src/services/profiles/profile-service.d.ts +6 -0
- package/dist/src/services/profiles/profile-service.js +19 -0
- package/dist/src/services/providers/minimax-provider-service.d.ts +24 -0
- package/dist/src/services/providers/minimax-provider-service.js +143 -0
- package/dist/src/services/providers/minimax-worker-service.d.ts +21 -0
- package/dist/src/services/providers/minimax-worker-service.js +80 -0
- package/dist/src/services/proxy/proxy-service.d.ts +7 -0
- package/dist/src/services/proxy/proxy-service.js +31 -0
- package/dist/src/services/rd/rd-service.d.ts +88 -0
- package/dist/src/services/rd/rd-service.js +370 -0
- package/dist/src/services/recommendations/capability-availability.d.ts +5 -0
- package/dist/src/services/recommendations/capability-availability.js +40 -0
- package/dist/src/services/recommendations/capability-map-service.d.ts +7 -0
- package/dist/src/services/recommendations/capability-map-service.js +131 -0
- package/dist/src/services/recommendations/capability-seed-items.d.ts +2 -0
- package/dist/src/services/recommendations/capability-seed-items.js +131 -0
- package/dist/src/services/recommendations/capability-seed-mappings.d.ts +2 -0
- package/dist/src/services/recommendations/capability-seed-mappings.js +42 -0
- package/dist/src/services/recommendations/capability-seed-sources.d.ts +2 -0
- package/dist/src/services/recommendations/capability-seed-sources.js +35 -0
- package/dist/src/services/recommendations/recommendation-service.d.ts +8 -0
- package/dist/src/services/recommendations/recommendation-service.js +106 -0
- package/dist/src/services/recommendations/recommendation-types.d.ts +129 -0
- package/dist/src/services/recommendations/recommendation-types.js +1 -0
- package/dist/src/services/recommendations/seed-capability-catalog.d.ts +3 -0
- package/dist/src/services/recommendations/seed-capability-catalog.js +3 -0
- package/dist/src/services/refactor/refactor-service.d.ts +9 -0
- package/dist/src/services/refactor/refactor-service.js +33 -0
- package/dist/src/services/sc/index.d.ts +1 -0
- package/dist/src/services/sc/index.js +1 -0
- package/dist/src/services/sc/sc-service.d.ts +79 -0
- package/dist/src/services/sc/sc-service.js +223 -0
- package/dist/src/services/skills/skill-registry.d.ts +17 -0
- package/dist/src/services/skills/skill-registry.js +40 -0
- package/dist/src/services/standards/project-standards-service.d.ts +82 -0
- package/dist/src/services/standards/project-standards-service.js +383 -0
- package/dist/src/services/tech/tech-service.d.ts +69 -0
- package/dist/src/services/tech/tech-service.js +236 -0
- package/dist/src/services/workflow/workflow-autonomous-service.d.ts +99 -0
- package/dist/src/services/workflow/workflow-autonomous-service.js +526 -0
- package/dist/src/services/workflow/workflow-router-service.d.ts +85 -0
- package/dist/src/services/workflow/workflow-router-service.js +213 -0
- package/dist/src/shared/change-id.d.ts +15 -0
- package/dist/src/shared/change-id.js +76 -0
- package/dist/src/shared/frontmatter.d.ts +6 -0
- package/dist/src/shared/frontmatter.js +47 -0
- package/dist/src/shared/fs-utils.d.ts +4 -0
- package/dist/src/shared/fs-utils.js +16 -0
- package/dist/src/shared/fs.d.ts +4 -0
- package/dist/src/shared/fs.js +26 -0
- package/dist/src/shared/path-utils.d.ts +13 -0
- package/dist/src/shared/path-utils.js +56 -0
- package/dist/src/shared/paths.d.ts +6 -0
- package/dist/src/shared/paths.js +40 -0
- package/dist/src/shared/planner-response.d.ts +21 -0
- package/dist/src/shared/planner-response.js +26 -0
- package/dist/src/shared/platform.d.ts +6 -0
- package/dist/src/shared/platform.js +11 -0
- package/dist/src/shared/process.d.ts +5 -0
- package/dist/src/shared/process.js +12 -0
- package/dist/src/shared/result.d.ts +13 -0
- package/dist/src/shared/result.js +32 -0
- package/package.json +49 -0
- package/schemas/approval-record.schema.json +14 -0
- package/schemas/artifact-manifest.schema.json +16 -0
- package/schemas/artifact-retention-report.schema.json +17 -0
- package/schemas/artifact-workspace.schema.json +22 -0
- package/schemas/capability-availability.schema.json +36 -0
- package/schemas/capability-item.schema.json +37 -0
- package/schemas/capability-source.schema.json +30 -0
- package/schemas/change-impact.schema.json +15 -0
- package/schemas/context-capsule.schema.json +16 -0
- package/schemas/recommendation-plan.schema.json +37 -0
- package/schemas/refactor-slice-spec.schema.json +19 -0
- package/scripts/clean-dist.mjs +8 -0
- package/scripts/install-skills.mjs +76 -0
- package/scripts/watch.mjs +389 -0
- package/skills/peaks-prd/SKILL.md +42 -0
- package/skills/peaks-prd/references/artifact-contracts.md +3 -0
- package/skills/peaks-prd/references/command-migration.md +3 -0
- package/skills/peaks-prd/references/workflow.md +11 -0
- package/skills/peaks-qa/SKILL.md +45 -0
- package/skills/peaks-qa/references/artifact-contracts.md +3 -0
- package/skills/peaks-qa/references/command-migration.md +3 -0
- package/skills/peaks-qa/references/regression-gates.md +16 -0
- package/skills/peaks-rd/SKILL.md +56 -0
- package/skills/peaks-rd/references/artifact-contracts.md +3 -0
- package/skills/peaks-rd/references/command-migration.md +3 -0
- package/skills/peaks-rd/references/refactor-workflow.md +31 -0
- package/skills/peaks-sc/SKILL.md +30 -0
- package/skills/peaks-sc/references/artifact-contracts.md +3 -0
- package/skills/peaks-sc/references/artifact-retention.md +14 -0
- package/skills/peaks-sc/references/command-migration.md +3 -0
- package/skills/peaks-solo/SKILL.md +63 -0
- package/skills/peaks-solo/references/artifact-contracts.md +3 -0
- package/skills/peaks-solo/references/command-migration.md +3 -0
- package/skills/peaks-solo/references/refactor-mode.md +22 -0
- package/skills/peaks-solo/references/workflow.md +14 -0
- package/skills/peaks-txt/SKILL.md +48 -0
- package/skills/peaks-txt/references/artifact-contracts.md +3 -0
- package/skills/peaks-txt/references/command-migration.md +3 -0
- package/skills/peaks-txt/references/context-capsule.md +20 -0
- package/skills/peaks-ui/SKILL.md +35 -0
- package/skills/peaks-ui/references/artifact-contracts.md +3 -0
- package/skills/peaks-ui/references/command-migration.md +3 -0
- package/skills/peaks-ui/references/workflow.md +11 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: peaks-solo
|
|
3
|
+
description: Full-auto orchestration facade for the Peaks skill family. Use when the user asks Peaks to handle a project workflow end-to-end, especially refactoring via `peaks-solo refactor`, coordinating peaks-prd, peaks-rd, peaks-qa, peaks-sc, and peaks-txt while preserving user confirmation gates.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Peaks Solo
|
|
7
|
+
|
|
8
|
+
Peaks Solo is the orchestration facade for the Peaks short skill family.
|
|
9
|
+
|
|
10
|
+
Use this skill to identify the user scenario, recommend an execution mode, coordinate role skills, and produce the final handoff report. Do not collapse role responsibilities into this skill.
|
|
11
|
+
|
|
12
|
+
## Boundaries
|
|
13
|
+
|
|
14
|
+
Peaks Solo may:
|
|
15
|
+
|
|
16
|
+
- identify scenarios such as refactor, bugfix, QA hardening, release validation, and incident response;
|
|
17
|
+
- recommend Solo, Assisted, Swarm, or Strict profiles;
|
|
18
|
+
- coordinate Peaks role skills through artifacts;
|
|
19
|
+
- coordinate project memory extraction from stable skill artifact sections;
|
|
20
|
+
- request user confirmation at risk and commit boundaries;
|
|
21
|
+
- read CLI doctor/profile/artifact reports.
|
|
22
|
+
|
|
23
|
+
Peaks Solo must not silently:
|
|
24
|
+
|
|
25
|
+
- install hooks;
|
|
26
|
+
- create agents;
|
|
27
|
+
- enable MCP servers;
|
|
28
|
+
- modify Claude settings;
|
|
29
|
+
- create GitHub repositories;
|
|
30
|
+
- bypass role-skill artifacts.
|
|
31
|
+
|
|
32
|
+
Use the Peaks CLI for runtime side effects.
|
|
33
|
+
|
|
34
|
+
## Project standards preflight
|
|
35
|
+
|
|
36
|
+
Before orchestrating an end-to-end code repository workflow, gather the project standards preflight status from RD and QA by calling the Peaks CLI:
|
|
37
|
+
|
|
38
|
+
- `peaks standards init --project <path> --dry-run`
|
|
39
|
+
- `peaks standards update --project <path> --dry-run`
|
|
40
|
+
|
|
41
|
+
Use `standards init` for first-time creation and `standards update` for existing `CLAUDE.md` append/review behavior. Apply only when write authorization exists; otherwise keep the CLI output as the next action and continue only when the selected workflow can safely proceed without writing standards. Do not hand-write standards file mutations inside the skill.
|
|
42
|
+
|
|
43
|
+
## Refactor mode
|
|
44
|
+
|
|
45
|
+
Read `references/refactor-mode.md` before handling refactor requests.
|
|
46
|
+
|
|
47
|
+
Default MVP path: `peaks-solo refactor`.
|
|
48
|
+
|
|
49
|
+
It must enforce the shared refactor red lines:
|
|
50
|
+
|
|
51
|
+
1. understand the project before changes;
|
|
52
|
+
2. require UT coverage >= 95%;
|
|
53
|
+
3. treat unknown coverage as failing;
|
|
54
|
+
4. split broad refactors into minimal functional slices;
|
|
55
|
+
5. require strict verifiable specs before each slice;
|
|
56
|
+
6. require 100% acceptance for each slice;
|
|
57
|
+
7. require code and intermediate artifacts to be committed before the next slice.
|
|
58
|
+
|
|
59
|
+
## Optional capabilities
|
|
60
|
+
|
|
61
|
+
When built-in guidance is insufficient, use capability discovery rather than reimplementing specialist workflows. Ask for user consent before token-heavy discovery unless the active profile permits it.
|
|
62
|
+
|
|
63
|
+
Reference: `references/workflow.md`.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Peaks Solo Refactor Mode
|
|
2
|
+
|
|
3
|
+
`peaks-solo refactor` is the primary MVP path.
|
|
4
|
+
|
|
5
|
+
## Flow
|
|
6
|
+
|
|
7
|
+
1. Detect refactor intent and risk.
|
|
8
|
+
2. Ask CLI doctor for available runtime capabilities.
|
|
9
|
+
3. Coordinate `peaks-prd` for goals, non-goals, preserved behavior, and acceptance spec.
|
|
10
|
+
4. Coordinate `peaks-txt` for initial context capsule.
|
|
11
|
+
5. Coordinate `peaks-rd` for project scan, standards scan, coverage report, slice map, and options.
|
|
12
|
+
6. Block implementation unless UT coverage is >= 95%.
|
|
13
|
+
7. Coordinate `peaks-qa` for regression matrix and baseline report.
|
|
14
|
+
8. Ask the user to confirm option, scope, and accepted risks.
|
|
15
|
+
9. Execute one minimal functional slice at a time.
|
|
16
|
+
10. Require 100% acceptance for the slice.
|
|
17
|
+
11. Coordinate `peaks-sc` for artifact retention and commit boundary.
|
|
18
|
+
12. Refuse the next slice until code and intermediate artifacts are committed.
|
|
19
|
+
|
|
20
|
+
## Runtime resources
|
|
21
|
+
|
|
22
|
+
Use CLI-managed profiles for hooks, agents, swarm, MCP, and external skills. Do not install them from the skill body.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Peaks Solo Workflow
|
|
2
|
+
|
|
3
|
+
Peaks Solo is a facade over role skills. It keeps the workflow moving without absorbing role-specific responsibility.
|
|
4
|
+
|
|
5
|
+
## Modes
|
|
6
|
+
|
|
7
|
+
- Solo: default, single controller with soft gates.
|
|
8
|
+
- Assisted: role skills contribute artifacts without broad swarm execution.
|
|
9
|
+
- Swarm: multiple subagents work in parallel when the CLI-managed profile is enabled.
|
|
10
|
+
- Strict: hook/profile guarded mode for high-risk work.
|
|
11
|
+
|
|
12
|
+
## Capability discovery
|
|
13
|
+
|
|
14
|
+
Before using `find-skills`, explain the benefit and token cost unless the active profile permits automatic discovery.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: peaks-txt
|
|
3
|
+
description: Context and knowledge skill for Peaks. Use when a workflow needs context capsules, role-specific context slices, decision records, assumptions, discarded options, staleness checks, lessons, or reusable project memory.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Peaks TXT
|
|
7
|
+
|
|
8
|
+
Peaks TXT compresses workflow context into portable, role-specific artifacts.
|
|
9
|
+
|
|
10
|
+
## Responsibilities
|
|
11
|
+
|
|
12
|
+
- generate context capsules;
|
|
13
|
+
- slice context for PRD, RD, QA, UI, and SC consumers;
|
|
14
|
+
- record decisions, assumptions, discarded options, and staleness conditions;
|
|
15
|
+
- archive lessons from refactor slices.
|
|
16
|
+
|
|
17
|
+
## Refactor role
|
|
18
|
+
|
|
19
|
+
For refactors, create initial context before RD analysis and final context after validation and artifact retention.
|
|
20
|
+
|
|
21
|
+
## Project memory guidance
|
|
22
|
+
|
|
23
|
+
When a skill artifact contains reusable project facts, decisions, rules, or constraints, mark only the stable extract with:
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
<!-- peaks-memory:start -->
|
|
27
|
+
title: Short project memory title
|
|
28
|
+
kind: project
|
|
29
|
+
---
|
|
30
|
+
Stable memory body.
|
|
31
|
+
<!-- peaks-memory:end -->
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The primary write target is the target project's `.claude/memory`. Use `peaks memory extract --project <path> --artifact <artifact> --apply` only after the user or active profile allows durable project memory writes.
|
|
35
|
+
|
|
36
|
+
## External capability guidance
|
|
37
|
+
|
|
38
|
+
Use `peaks capabilities --json` before recommending memory or context-management resources.
|
|
39
|
+
|
|
40
|
+
- claude-mem and context-mode can inform reusable context workflows only when durable memory is explicitly approved.
|
|
41
|
+
- Never store secrets, credentials, private customer data, or non-exportable business data in memory artifacts.
|
|
42
|
+
- Prefer Peaks TXT context capsules when external persistence is unavailable or not authorized.
|
|
43
|
+
|
|
44
|
+
## Boundaries
|
|
45
|
+
|
|
46
|
+
Do not choose the refactor plan or install runtime resources. Use artifacts produced by other skills and CLI reports.
|
|
47
|
+
|
|
48
|
+
Reference: `references/context-capsule.md`.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Context Capsule
|
|
2
|
+
|
|
3
|
+
A context capsule is the smallest durable context needed by downstream roles.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
- original request;
|
|
8
|
+
- goals and non-goals;
|
|
9
|
+
- confirmed decisions;
|
|
10
|
+
- assumptions;
|
|
11
|
+
- discarded options;
|
|
12
|
+
- risks;
|
|
13
|
+
- role-specific slices;
|
|
14
|
+
- staleness conditions.
|
|
15
|
+
|
|
16
|
+
Do not dump full conversations into downstream artifacts.
|
|
17
|
+
|
|
18
|
+
## Durable project memory
|
|
19
|
+
|
|
20
|
+
Only stable and reusable project facts should be marked for memory extraction. Use `.claude/memory` as the project-local primary source, and let Peaks SC sync that directory to the artifact repository at checkpoints.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: peaks-ui
|
|
3
|
+
description: UI and experience skill for Peaks. Use when a workflow touches UI/UX, interaction design, visual direction, design systems, frontend page behavior, high-fidelity HTML prototypes, or UI regression seeds.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Peaks UI
|
|
7
|
+
|
|
8
|
+
Peaks UI handles experience, interaction, visual direction, and UI-specific refactor artifacts.
|
|
9
|
+
|
|
10
|
+
## Responsibilities
|
|
11
|
+
|
|
12
|
+
- identify when UI involvement is necessary;
|
|
13
|
+
- produce UX flow and page-state artifacts;
|
|
14
|
+
- define interaction and visual constraints;
|
|
15
|
+
- create UI regression seeds;
|
|
16
|
+
- review user-facing behavior preservation.
|
|
17
|
+
|
|
18
|
+
## Refactor role
|
|
19
|
+
|
|
20
|
+
Only engage when the refactor affects UI, interaction, styling, page structure, design system, or frontend user behavior.
|
|
21
|
+
|
|
22
|
+
## External capability guidance
|
|
23
|
+
|
|
24
|
+
Use `peaks capabilities --json` before recommending design, browser, or UI reference resources.
|
|
25
|
+
|
|
26
|
+
- shadcn/ui, React Bits, awesome-design-md, taste-skill, and ui-ux-pro-max-skill are UI references; do not treat unreviewed generated UI as finished design.
|
|
27
|
+
- Chrome DevTools MCP and Agent Browser can support runtime UI inspection only after the user approves the app target.
|
|
28
|
+
- Figma Context MCP and Penpot require user-authorized design access and must not persist tokens or private design data in project artifacts.
|
|
29
|
+
- Check license, accessibility, and performance before translating external visual references into Peaks UI constraints.
|
|
30
|
+
|
|
31
|
+
## Boundaries
|
|
32
|
+
|
|
33
|
+
Do not own backend architecture, non-UI implementation, runtime hook installation, or final QA acceptance.
|
|
34
|
+
|
|
35
|
+
Reference: `references/workflow.md`.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Peaks UI Workflow
|
|
2
|
+
|
|
3
|
+
Use Peaks UI only when refactor scope affects user-facing behavior, interaction, visual structure, design systems, or page states.
|
|
4
|
+
|
|
5
|
+
## Outputs
|
|
6
|
+
|
|
7
|
+
- UX flow;
|
|
8
|
+
- page state map;
|
|
9
|
+
- interaction constraints;
|
|
10
|
+
- UI regression seeds;
|
|
11
|
+
- accessibility notes.
|