peaks-loop 3.0.0 → 3.0.1
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/.claude-plugin/marketplace.json +3 -3
- package/CHANGELOG.md +57 -57
- package/README-en.md +2 -2
- package/README.md +2 -2
- package/agents/karpathy-reviewer.md +2 -2
- package/dist/src/cli/commands/agent-commands.js +3 -3
- package/dist/src/cli/commands/audit-commands.d.ts +1 -1
- package/dist/src/cli/commands/audit-commands.js +6 -6
- package/dist/src/cli/commands/classify-classify-commands.js +1 -1
- package/dist/src/cli/commands/code-review-commands.d.ts +3 -3
- package/dist/src/cli/commands/code-review-commands.js +5 -5
- package/dist/src/cli/commands/compact-command.d.ts +21 -0
- package/dist/src/cli/commands/compact-command.js +252 -0
- package/dist/src/cli/commands/context-commands.d.ts +1 -1
- package/dist/src/cli/commands/context-commands.js +1 -1
- package/dist/src/cli/commands/contract-commands.d.ts +1 -1
- package/dist/src/cli/commands/core/session-command.js +17 -7
- package/dist/src/cli/commands/core/skill-command.js +1 -1
- package/dist/src/cli/commands/feedback-commands.js +1 -1
- package/dist/src/cli/commands/hook-handle.d.ts +1 -1
- package/dist/src/cli/commands/hook-handle.js +1 -1
- package/dist/src/cli/commands/legacy-commands.d.ts +1 -1
- package/dist/src/cli/commands/legacy-commands.js +2 -2
- package/dist/src/cli/commands/log-commands.js +2 -2
- package/dist/src/cli/commands/loop-commands.d.ts +1 -1
- package/dist/src/cli/commands/loop-commands.js +1 -1
- package/dist/src/cli/commands/loop-eval-commands.d.ts +1 -1
- package/dist/src/cli/commands/loop-eval-commands.js +1 -1
- package/dist/src/cli/commands/playwright-commands.d.ts +1 -1
- package/dist/src/cli/commands/playwright-commands.js +2 -2
- package/dist/src/cli/commands/request-commands.js +40 -1
- package/dist/src/cli/commands/role-commands.js +1 -1
- package/dist/src/cli/commands/slice-commands.js +5 -5
- package/dist/src/cli/commands/upgrade-commands.d.ts +1 -1
- package/dist/src/cli/commands/upgrade-commands.js +6 -6
- package/dist/src/cli/commands/workspace/init-command.js +2 -2
- package/dist/src/cli/program.js +10 -1
- package/dist/src/services/agent/ecc-agent-service.js +5 -5
- package/dist/src/services/audit/artifact-writer.d.ts +1 -1
- package/dist/src/services/audit/artifact-writer.js +1 -1
- package/dist/src/services/audit/decision-writer.d.ts +1 -1
- package/dist/src/services/audit/decision-writer.js +1 -1
- package/dist/src/services/audit/enforcers/lint-output-style.js +5 -5
- package/dist/src/services/audit/enforcers/mock-placement.d.ts +1 -1
- package/dist/src/services/audit/enforcers/mock-placement.js +1 -1
- package/dist/src/services/audit/enforcers/no-root-pollution.js +1 -1
- package/dist/src/services/audit/red-line-catalog-p2-a.js +2 -2
- package/dist/src/services/audit/red-line-catalog-p2-b.js +2 -2
- package/dist/src/services/audit/static-service.d.ts +1 -1
- package/dist/src/services/audit/static-service.js +5 -5
- package/dist/src/services/audit/types.d.ts +1 -1
- package/dist/src/services/audit/types.js +1 -1
- package/dist/src/services/audit-independent/perf-audit-service.js +1 -1
- package/dist/src/services/audit-independent/security-audit-service.js +1 -1
- package/dist/src/services/classify/classify-service.d.ts +1 -1
- package/dist/src/services/classify/classify-service.js +1 -1
- package/dist/src/services/classify/classify-types.d.ts +1 -1
- package/dist/src/services/classify/classify-types.js +1 -1
- package/dist/src/services/code-review/ecc-bridge.d.ts +2 -2
- package/dist/src/services/code-review/ecc-bridge.js +2 -2
- package/dist/src/services/code-review/ocr-service.d.ts +9 -9
- package/dist/src/services/code-review/ocr-service.js +16 -16
- package/dist/src/services/compact/decision-tables.d.ts +66 -0
- package/dist/src/services/compact/decision-tables.js +127 -0
- package/dist/src/services/compact/request-transition-hook.d.ts +20 -0
- package/dist/src/services/compact/request-transition-hook.js +110 -0
- package/dist/src/services/compact/suggest-service.d.ts +74 -0
- package/dist/src/services/compact/suggest-service.js +203 -0
- package/dist/src/services/config/config-migration.js +1 -1
- package/dist/src/services/config/config-safety.d.ts +1 -1
- package/dist/src/services/config/config-safety.js +1 -1
- package/dist/src/services/config/config-service.d.ts +1 -1
- package/dist/src/services/config/config-service.js +1 -1
- package/dist/src/services/context/auto-compact-dispatcher.js +4 -4
- package/dist/src/services/context/auto-compact-types.d.ts +6 -6
- package/dist/src/services/context/auto-compact-types.js +5 -5
- package/dist/src/services/dispatch/sub-agent-dispatcher.js +1 -1
- package/dist/src/services/dispatch/test-tool-detection.d.ts +1 -1
- package/dist/src/services/dispatch/test-tool-detection.js +1 -1
- package/dist/src/services/doctor/doctor-service.d.ts +1 -1
- package/dist/src/services/doctor/doctor-service.js +5 -5
- package/dist/src/services/hooks/presence-marker-detector.js +5 -5
- package/dist/src/services/ide/adapters/claude-code-adapter.d.ts +1 -1
- package/dist/src/services/ide/adapters/claude-code-adapter.js +2 -2
- package/dist/src/services/ide/adapters/codex-adapter.d.ts +2 -2
- package/dist/src/services/ide/adapters/codex-adapter.js +2 -2
- package/dist/src/services/ide/adapters/cursor-adapter.d.ts +2 -2
- package/dist/src/services/ide/adapters/cursor-adapter.js +2 -2
- package/dist/src/services/ide/adapters/hermes-adapter.d.ts +1 -1
- package/dist/src/services/ide/adapters/hermes-adapter.js +1 -1
- package/dist/src/services/ide/adapters/openclaw-adapter.d.ts +1 -1
- package/dist/src/services/ide/adapters/openclaw-adapter.js +1 -1
- package/dist/src/services/ide/adapters/trae-adapter.d.ts +1 -1
- package/dist/src/services/ide/adapters/trae-adapter.js +1 -1
- package/dist/src/services/ide/ide-types.d.ts +9 -9
- package/dist/src/services/legacy/legacy-detector.d.ts +1 -1
- package/dist/src/services/legacy/legacy-detector.js +1 -1
- package/dist/src/services/log/log-commands-service.d.ts +1 -1
- package/dist/src/services/log/log-commands-service.js +1 -1
- package/dist/src/services/log/logger.d.ts +3 -3
- package/dist/src/services/log/logger.js +3 -3
- package/dist/src/services/log/redact.d.ts +1 -1
- package/dist/src/services/log/redact.js +1 -1
- package/dist/src/services/loop/evaluator-dispatcher.d.ts +1 -1
- package/dist/src/services/loop/evaluator-dispatcher.js +16 -15
- package/dist/src/services/loop/monotonic-guard.js +35 -18
- package/dist/src/services/loop/monotonic-runner.d.ts +3 -0
- package/dist/src/services/loop/monotonic-runner.js +62 -28
- package/dist/src/services/loop/run-driver.js +45 -24
- package/dist/src/services/memory/llm-reranker.d.ts +1 -1
- package/dist/src/services/memory/llm-reranker.js +1 -1
- package/dist/src/services/mut/production-stryker.d.ts +0 -5
- package/dist/src/services/mut/production-stryker.js +19 -10
- package/dist/src/services/openspec/openspec-propose-from-doctor-service.d.ts +1 -1
- package/dist/src/services/openspec/openspec-propose-from-doctor-service.js +1 -1
- package/dist/src/services/perf/perf-baseline-service.d.ts +2 -2
- package/dist/src/services/perf/perf-baseline-service.js +2 -2
- package/dist/src/services/prd/handoff-auto-regen.js +1 -1
- package/dist/src/services/prd/project-scan-sediment.js +3 -3
- package/dist/src/services/prd/project-scan-types.d.ts +1 -1
- package/dist/src/services/preferences/preferences-types.d.ts +3 -3
- package/dist/src/services/preferences/preferences-types.js +2 -2
- package/dist/src/services/role/role-registry.d.ts +1 -1
- package/dist/src/services/role/role-registry.js +1 -1
- package/dist/src/services/sc/sc-service.js +3 -3
- package/dist/src/services/skill/resume-detector.js +2 -2
- package/dist/src/services/skills/sync-service.d.ts +3 -3
- package/dist/src/services/skills/sync-service.js +9 -9
- package/dist/src/services/slice/calibration-store.d.ts +1 -1
- package/dist/src/services/slice/calibration-store.js +1 -1
- package/dist/src/services/solo/auto-compact-orchestrator.d.ts +1 -1
- package/dist/src/services/solo/auto-compact-orchestrator.js +7 -7
- package/dist/src/services/solo/dag-orchestrator.js +1 -1
- package/dist/src/services/solo/mode-gate.d.ts +1 -1
- package/dist/src/services/solo/mode-gate.js +4 -4
- package/dist/src/services/solo/user-touchpoint-classifier.js +1 -1
- package/dist/src/services/standards/migrate-claude-rules-service.js +5 -5
- package/dist/src/services/standards/migrate-service.d.ts +3 -3
- package/dist/src/services/standards/migrate-service.js +5 -5
- package/dist/src/services/standards/project-standards-service.js +1 -1
- package/dist/src/services/upgrade/gitignore-migrate-service.d.ts +3 -3
- package/dist/src/services/upgrade/gitignore-migrate-service.js +4 -4
- package/dist/src/services/upgrade/upgrade-service.d.ts +1 -1
- package/dist/src/services/upgrade/upgrade-service.js +5 -5
- package/dist/src/services/verdict/envelopes.d.ts +1 -1
- package/dist/src/services/verdict/envelopes.js +1 -1
- package/dist/src/services/workflow/workflow-loader.js +1 -1
- package/dist/src/services/workspace/migrate-1-4-1-service.d.ts +1 -1
- package/dist/src/services/workspace/migrate-1-4-1-service.js +1 -1
- package/dist/src/services/workspace/migrate-types.d.ts +1 -1
- package/dist/src/services/workspace/migrate-types.js +1 -1
- package/dist/src/services/workspace/workspace-claude-settings-materializer.d.ts +2 -2
- package/dist/src/services/workspace/workspace-claude-settings-materializer.js +9 -9
- package/dist/src/services/workspace/workspace-service.d.ts +1 -1
- package/dist/src/services/workspace/workspace-service.js +1 -1
- package/dist/src/shared/path-safety.d.ts +1 -1
- package/dist/src/shared/path-safety.js +1 -1
- package/dist/src/shared/version.d.ts +1 -1
- package/dist/src/shared/version.js +1 -1
- package/output-styles/peaks-skill-swarm.md +33 -33
- package/package.json +5 -4
- package/schemas/decomposition-v1.json +1 -1
- package/schemas/decomposition-v2.json +1 -1
- package/schemas/replay-fixture.schema.json +1 -1
- package/schemas/reviewer-envelope.schema.json +1 -1
- package/scripts/install-skills.mjs +11 -11
- package/skills/peaks-audit/SKILL.md +2 -2
- package/skills/peaks-doctor/SKILL.md +4 -4
- package/skills/peaks-final-review/SKILL.md +2 -2
- package/skills/peaks-ide/SKILL.md +3 -3
- package/skills/peaks-perf-audit/SKILL.md +1 -1
- package/skills/peaks-prd/SKILL.md +14 -14
- package/skills/peaks-prd/references/workflow.md +1 -1
- package/skills/peaks-qa/SKILL.md +17 -17
- package/skills/peaks-qa/references/artifact-per-request.md +1 -1
- package/skills/peaks-qa/references/browser-validation-contracts.md +2 -2
- package/skills/peaks-qa/references/codegraph-regression-focus.md +1 -1
- package/skills/peaks-qa/references/external-capability-guidance.md +2 -2
- package/skills/peaks-qa/references/qa-fanout-contract.md +1 -1
- package/skills/peaks-qa/references/qa-gstack-integration.md +3 -3
- package/skills/peaks-qa/references/qa-local-artifacts.md +1 -1
- package/skills/peaks-qa/references/qa-matt-pocock-integration.md +1 -1
- package/skills/peaks-qa/references/qa-runbook.md +3 -3
- package/skills/peaks-qa/references/qa-skill-presence.md +1 -1
- package/skills/peaks-qa/references/qa-standards-preflight.md +2 -2
- package/skills/peaks-qa/references/qa-transition-gates.md +9 -9
- package/skills/peaks-qa/references/regression-gates.md +1 -1
- package/skills/peaks-rd/SKILL.md +13 -13
- package/skills/peaks-rd/references/artifact-and-standards-output.md +1 -1
- package/skills/peaks-rd/references/codegraph-project-analysis.md +1 -1
- package/skills/peaks-rd/references/external-references.md +3 -3
- package/skills/peaks-rd/references/karpathy-reviewer-prompt.md +1 -1
- package/skills/peaks-rd/references/mandatory-perf-baseline.md +1 -1
- package/skills/peaks-rd/references/matt-pocock-integration.md +2 -2
- package/skills/peaks-rd/references/ocr-integration.md +19 -19
- package/skills/peaks-rd/references/openspec-cli.md +2 -2
- package/skills/peaks-rd/references/rd-gstack-integration.md +5 -5
- package/skills/peaks-rd/references/rd-runbook.md +9 -9
- package/skills/peaks-rd/references/rd-standards-preflight.md +1 -1
- package/skills/peaks-rd/references/rd-transition-gates.md +13 -13
- package/skills/peaks-rd/references/skill-presence-and-title.md +1 -1
- package/skills/peaks-reviewer/SKILL.md +2 -2
- package/skills/peaks-sc/SKILL.md +9 -9
- package/skills/peaks-security-audit/SKILL.md +1 -1
- package/skills/peaks-slice-decompose/SKILL.md +2 -2
- package/skills/peaks-solo/SKILL.md +49 -49
- package/skills/peaks-solo/references/a2a-artifact-mapping.md +8 -8
- package/skills/peaks-solo/references/anchoring-and-session-info.md +3 -3
- package/skills/peaks-solo/references/boundaries.md +4 -4
- package/skills/peaks-solo/references/browser-workflow.md +2 -2
- package/skills/peaks-solo/references/codegraph-orchestration.md +1 -1
- package/skills/peaks-solo/references/completion-handoff.md +2 -2
- package/skills/peaks-solo/references/external-references.md +3 -3
- package/skills/peaks-solo/references/external-skill-invocation.md +2 -2
- package/skills/peaks-solo/references/frontend-only-mode.md +1 -1
- package/skills/peaks-solo/references/gstack-integration.md +4 -4
- package/skills/peaks-solo/references/local-artifact-workspace.md +2 -2
- package/skills/peaks-solo/references/micro-cycle.md +4 -4
- package/skills/peaks-solo/references/mode-selection.md +5 -5
- package/skills/peaks-solo/references/openspec-workflow.md +2 -2
- package/skills/peaks-solo/references/playwright-mcp-multi-terminal.md +1 -1
- package/skills/peaks-solo/references/project-memory-loading.md +1 -1
- package/skills/peaks-solo/references/project-scan-checklist.md +1 -1
- package/skills/peaks-solo/references/quality-gate-cheatsheet.md +1 -1
- package/skills/peaks-solo/references/resume-detection.md +1 -1
- package/skills/peaks-solo/references/runbook.md +20 -20
- package/skills/peaks-solo/references/skill-presence-and-title.md +2 -2
- package/skills/peaks-solo/references/standards-preflight.md +2 -2
- package/skills/peaks-solo/references/step-0-55-1x-detection.md +3 -3
- package/skills/peaks-solo/references/sub-agent-dispatch.md +3 -3
- package/skills/peaks-solo/references/swarm-dispatch-contract.md +3 -3
- package/skills/peaks-solo/references/workflow-gates-and-types.md +34 -34
- package/skills/peaks-solo-resume/SKILL.md +2 -2
- package/skills/peaks-solo-status/SKILL.md +4 -4
- package/skills/peaks-solo-test/SKILL.md +4 -4
- package/skills/peaks-sop/SKILL.md +5 -5
- package/skills/peaks-txt/SKILL.md +17 -17
- package/skills/peaks-ui/SKILL.md +17 -17
- package/skills/peaks-ui/references/workflow.md +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Per the "one-key completion" + "minimal-user-operation" tenets
|
|
6
6
|
* (2026-06-11), the typical upgrade path is:
|
|
7
7
|
*
|
|
8
|
-
* $ npm i -g peaks-
|
|
8
|
+
* $ npm i -g peaks-loop@2.0 # postinstall does everything
|
|
9
9
|
*
|
|
10
10
|
* OR (postinstall skipped / manual fallback):
|
|
11
11
|
*
|
|
@@ -104,7 +104,7 @@ function collectFilesRecursive(root, predicate) {
|
|
|
104
104
|
*/
|
|
105
105
|
function expandMemoryArtifacts(projectRoot) {
|
|
106
106
|
const out = [];
|
|
107
|
-
// skills/**/SKILL.md (peaks-
|
|
107
|
+
// skills/**/SKILL.md (peaks-loop repo convention)
|
|
108
108
|
const skillFiles = collectFilesRecursive(join(projectRoot, 'skills'), (name) => name === 'SKILL.md');
|
|
109
109
|
for (const abs of skillFiles) {
|
|
110
110
|
out.push(relative(projectRoot, abs));
|
|
@@ -202,7 +202,7 @@ function writeUpgradeRecord(projectRoot, result) {
|
|
|
202
202
|
const date = new Date().toISOString().slice(0, 10);
|
|
203
203
|
const file = join(memoryDir, `upgrade-2.0-${date}.md`);
|
|
204
204
|
const lines = [];
|
|
205
|
-
lines.push(`# Upgrade to peaks-
|
|
205
|
+
lines.push(`# Upgrade to peaks-loop 2.0 — ${date}`);
|
|
206
206
|
lines.push('');
|
|
207
207
|
lines.push(`> Auto-generated by \`peaks upgrade --to 2.0${result.applied ? ' --auto' : ''}\`.`);
|
|
208
208
|
lines.push(`> Per the "one-key completion" + "minimal-user-operation" tenets.`);
|
|
@@ -248,14 +248,14 @@ function writeUpgradeRecord(projectRoot, result) {
|
|
|
248
248
|
export function runUpgrade(input) {
|
|
249
249
|
// Resolve the peaks binary. Default: the peaks.js script
|
|
250
250
|
// co-located with this compiled module (the user just installed
|
|
251
|
-
// peaks-
|
|
251
|
+
// peaks-loop globally, but the global `peaks` shim is a .sh
|
|
252
252
|
// script that cmd.exe can't run on Windows). Falling back
|
|
253
253
|
// to just "peaks" lets the umbrella work when invoked from
|
|
254
254
|
// a Unix-style environment that can run the shim directly.
|
|
255
255
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
256
256
|
// Walk up from the compiled location to find bin/peaks.js.
|
|
257
257
|
// The compiled service lives at dist/src/services/upgrade/upgrade-service.js;
|
|
258
|
-
// bin/peaks.js is at the peaks-
|
|
258
|
+
// bin/peaks.js is at the peaks-loop root.
|
|
259
259
|
const peaksBin = input.peaksBin ??
|
|
260
260
|
resolve(here, '..', '..', '..', '..', 'bin', 'peaks.js');
|
|
261
261
|
const fallbackPeaks = 'peaks';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* peaks-
|
|
2
|
+
* peaks-loop v2.13.3 — Envelope unification (AC-1: real markdown parse).
|
|
3
3
|
*
|
|
4
4
|
* The 5 input envelopes feeding `aggregateVerdict()` have always been
|
|
5
5
|
* heterogeneous (peaks-security-audit / peaks-perf-audit / karpathy /
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* peaks-
|
|
2
|
+
* peaks-loop v2.13.3 — Envelope unification (AC-1: real markdown parse).
|
|
3
3
|
*
|
|
4
4
|
* The 5 input envelopes feeding `aggregateVerdict()` have always been
|
|
5
5
|
* heterogeneous (peaks-security-audit / peaks-perf-audit / karpathy /
|
|
@@ -22,7 +22,7 @@ import { existsSync, readFileSync } from 'node:fs';
|
|
|
22
22
|
import { join } from 'node:path';
|
|
23
23
|
import { homedir } from 'node:os';
|
|
24
24
|
import { parseWorkflowYaml, lintWorkflowSpec } from './workflow-spec.js';
|
|
25
|
-
/** Built-in default workflows shipped with peaks-
|
|
25
|
+
/** Built-in default workflows shipped with peaks-loop (git-tracked). */
|
|
26
26
|
const BUNDLED_WORKFLOWS = new Set(['default-fullauto-md', 'loop-with-quality-md']);
|
|
27
27
|
/** Try the project → global → bundled fallback chain and parse + lint. */
|
|
28
28
|
export function resolveWorkflow(projectRoot, id) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `peaks workspace migrate-1-4-1` — R004.
|
|
3
3
|
*
|
|
4
|
-
* Cleanup command for projects upgraded from peaks-
|
|
4
|
+
* Cleanup command for projects upgraded from peaks-loop 1.4.1 → 1.4.2.
|
|
5
5
|
*
|
|
6
6
|
* Slice 006 (1.4.0) moved the canonical per-session root to
|
|
7
7
|
* `.peaks/_runtime/<sid>/`. Per-request artifacts (PRD, RD, QA, SC requests)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `peaks workspace migrate-1-4-1` — R004.
|
|
3
3
|
*
|
|
4
|
-
* Cleanup command for projects upgraded from peaks-
|
|
4
|
+
* Cleanup command for projects upgraded from peaks-loop 1.4.1 → 1.4.2.
|
|
5
5
|
*
|
|
6
6
|
* Slice 006 (1.4.0) moved the canonical per-session root to
|
|
7
7
|
* `.peaks/_runtime/<sid>/`. Per-request artifacts (PRD, RD, QA, SC requests)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Type envelope for the `peaks workspace migrate` CLI command.
|
|
3
3
|
*
|
|
4
4
|
* The migrate command is the downstream-project counterpart to the
|
|
5
|
-
* one-time Phase 5 migration script that ran on the peaks-
|
|
5
|
+
* one-time Phase 5 migration script that ran on the peaks-loop self-host
|
|
6
6
|
* for slice 2026-06-05-change-id-as-unit-of-work. Where
|
|
7
7
|
* `peaks workspace reconcile` only handles the top-level runtime state
|
|
8
8
|
* files (`.peaks/.session.json`, `.peaks/.active-skill.json`,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Type envelope for the `peaks workspace migrate` CLI command.
|
|
3
3
|
*
|
|
4
4
|
* The migrate command is the downstream-project counterpart to the
|
|
5
|
-
* one-time Phase 5 migration script that ran on the peaks-
|
|
5
|
+
* one-time Phase 5 migration script that ran on the peaks-loop self-host
|
|
6
6
|
* for slice 2026-06-05-change-id-as-unit-of-work. Where
|
|
7
7
|
* `peaks workspace reconcile` only handles the top-level runtime state
|
|
8
8
|
* files (`.peaks/.session.json`, `.peaks/.active-skill.json`,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*
|
|
18
18
|
* The function is idempotent: re-running on an already-materialized
|
|
19
19
|
* project is a no-op (the file is rewritten only when its content
|
|
20
|
-
* diverges from the current peaks-
|
|
20
|
+
* diverges from the current peaks-loop release's template, which
|
|
21
21
|
* keeps the consumer up to date as the template evolves).
|
|
22
22
|
*
|
|
23
23
|
* Even when the caller passes `noClaudeHooks: true`, the function
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
*
|
|
31
31
|
* Slice 2026-06-13-selfheal-claude-settings-template: the offline copy
|
|
32
32
|
* is now ALSO drift-checked (via `templateContentMatches`) so stale
|
|
33
|
-
* on-disk copies from earlier peaks-
|
|
33
|
+
* on-disk copies from earlier peaks-loop releases (which lacked the
|
|
34
34
|
* `node -e "..."` wrapper) get refreshed automatically on the next
|
|
35
35
|
* init. The action taken on the offline copy is surfaced in
|
|
36
36
|
* `claudeSettings.offlineTemplate.action`.
|
|
@@ -19,8 +19,8 @@ import { buildClaudeSettingsLocalJson, CLAUDE_SETTINGS_LOCAL_FILENAME, templateC
|
|
|
19
19
|
* in a commit. Marked with a managed-by header so we can detect (and
|
|
20
20
|
* not double-append) on subsequent inits.
|
|
21
21
|
*/
|
|
22
|
-
const PEAKS_GITIGNORE_HEADER = '# >>> peaks-
|
|
23
|
-
const PEAKS_GITIGNORE_FOOTER = '# <<< peaks-
|
|
22
|
+
const PEAKS_GITIGNORE_HEADER = '# >>> peaks-loop managed snippet (slice 2.0.1-bug3) — do not edit by hand';
|
|
23
|
+
const PEAKS_GITIGNORE_FOOTER = '# <<< peaks-loop managed snippet';
|
|
24
24
|
const PEAKS_GITIGNORE_SNIPPET = [
|
|
25
25
|
PEAKS_GITIGNORE_HEADER,
|
|
26
26
|
'# Consumer-project .claude/settings.local.json: written by `peaks workspace init`',
|
|
@@ -28,10 +28,10 @@ const PEAKS_GITIGNORE_SNIPPET = [
|
|
|
28
28
|
'.claude/settings.local.json',
|
|
29
29
|
'# Offline template copy (.peaks/.claude-settings-template.json): written by',
|
|
30
30
|
'# `peaks workspace init` as a manual-recovery anchor. The source-of-truth is',
|
|
31
|
-
'# peaks-
|
|
31
|
+
'# peaks-loop\'s own `buildClaudeSettingsLocalJson()` — NOT this committed copy.',
|
|
32
32
|
'# Gitignored so the init flow\'s drift-driven refresh does not show up as',
|
|
33
33
|
'# "modified" in `git status` on every release bump. Recovery path: re-run',
|
|
34
|
-
'# `peaks workspace init` to regenerate; or copy from peaks-
|
|
34
|
+
'# `peaks workspace init` to regenerate; or copy from peaks-loop source.',
|
|
35
35
|
'.peaks/.claude-settings-template.json',
|
|
36
36
|
PEAKS_GITIGNORE_FOOTER,
|
|
37
37
|
''
|
|
@@ -44,7 +44,7 @@ const PEAKS_GITIGNORE_SNIPPET = [
|
|
|
44
44
|
*
|
|
45
45
|
* The function is idempotent: re-running on an already-materialized
|
|
46
46
|
* project is a no-op (the file is rewritten only when its content
|
|
47
|
-
* diverges from the current peaks-
|
|
47
|
+
* diverges from the current peaks-loop release's template, which
|
|
48
48
|
* keeps the consumer up to date as the template evolves).
|
|
49
49
|
*
|
|
50
50
|
* Even when the caller passes `noClaudeHooks: true`, the function
|
|
@@ -57,7 +57,7 @@ const PEAKS_GITIGNORE_SNIPPET = [
|
|
|
57
57
|
*
|
|
58
58
|
* Slice 2026-06-13-selfheal-claude-settings-template: the offline copy
|
|
59
59
|
* is now ALSO drift-checked (via `templateContentMatches`) so stale
|
|
60
|
-
* on-disk copies from earlier peaks-
|
|
60
|
+
* on-disk copies from earlier peaks-loop releases (which lacked the
|
|
61
61
|
* `node -e "..."` wrapper) get refreshed automatically on the next
|
|
62
62
|
* init. The action taken on the offline copy is surfaced in
|
|
63
63
|
* `claudeSettings.offlineTemplate.action`.
|
|
@@ -117,15 +117,15 @@ export async function materializeClaudeSettingsLocal(projectRoot, noClaudeHooks)
|
|
|
117
117
|
* source-of-truth on disk for the manual recovery flow. The file is
|
|
118
118
|
* GITIGNORED (added to `.peaks/.gitignore` by
|
|
119
119
|
* `upsertPeaksGitignoreSnippet`) — the source-of-truth lives in
|
|
120
|
-
* peaks-
|
|
120
|
+
* peaks-loop's own `buildClaudeSettingsLocalJson()`, NOT in any
|
|
121
121
|
* committed copy. Gitignoring it ensures the init flow's drift-driven
|
|
122
122
|
* refresh does not show up as "modified" in `git status` on every
|
|
123
|
-
* peaks-
|
|
123
|
+
* peaks-loop release bump.
|
|
124
124
|
*
|
|
125
125
|
* Recovery path for users who need to re-create their
|
|
126
126
|
* `.claude/settings.local.json`: re-run `peaks workspace init`
|
|
127
127
|
* (the file is regenerated); or copy the template straight from
|
|
128
|
-
* peaks-
|
|
128
|
+
* peaks-loop source (`src/services/workspace/claude-settings-template.ts`).
|
|
129
129
|
*
|
|
130
130
|
* Slice 2026-06-13-selfheal-claude-settings-template: drift-check via
|
|
131
131
|
* `templateContentMatches` BEFORE writing. If the on-disk copy's
|
|
@@ -47,7 +47,7 @@ export type WorkspaceInitReport = {
|
|
|
47
47
|
* `.claude/settings.local.json` materialization did this call.
|
|
48
48
|
* - written: the file was freshly written
|
|
49
49
|
* - refreshed: the file already existed and was rewritten to
|
|
50
|
-
* match the current peaks-
|
|
50
|
+
* match the current peaks-loop release's template
|
|
51
51
|
* - already-current: the file already matched the template; no
|
|
52
52
|
* rewrite needed
|
|
53
53
|
* - skipped: the caller passed noClaudeHooks=true
|
|
@@ -120,7 +120,7 @@ export class LegacyChangeIdSiblingError extends Error {
|
|
|
120
120
|
legacyPath;
|
|
121
121
|
code = 'LEGACY_CHANGE_ID_SIBLING';
|
|
122
122
|
constructor(sessionId, legacyPath) {
|
|
123
|
-
super(`peaks-
|
|
123
|
+
super(`peaks-loop 2.8.3+ forbids the legacy sibling dir ${legacyPath}. ` +
|
|
124
124
|
`Under the two-axis convention, change-id "${sessionId}" must live in the SESSION axis ` +
|
|
125
125
|
`(.peaks/_runtime/<sessionId>/), not as a top-level sibling of .peaks/_runtime/. ` +
|
|
126
126
|
`Migration: (1) inspect ${legacyPath} for user-authored content; ` +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "3.0.
|
|
1
|
+
export declare const CLI_VERSION = "3.0.1";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "3.0.
|
|
1
|
+
export const CLI_VERSION = "3.0.1";
|
|
@@ -4,31 +4,31 @@ description: Peaks 专用输出风格:仅在 peaks skills 工作流中用东
|
|
|
4
4
|
keep-coding-instructions: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
This output style is self-gated. Apply the sections below only when the current task explicitly invokes or continues a Peaks-
|
|
7
|
+
This output style is self-gated. Apply the sections below only when the current task explicitly invokes or continues a Peaks-Loop skill workflow, including `/peaks-*`, `skills/peaks-*`, Peaks-Loop PRD/RD/QA/UI/SC/TXT/Solo work, or edits to this repository's `skills/` directory. For unrelated tasks, preserve the default Claude Code behavior and keep responses concise.
|
|
8
8
|
|
|
9
|
-
## Peaks-
|
|
9
|
+
## Peaks-Loop response contract
|
|
10
10
|
|
|
11
|
-
When active, make the skill transition visually obvious with a light Northeastern Chinese humor tone. Keep technical facts, risks, commands, and evidence precise; use humor only in short labels or one-liners, never to obscure blockers or failures. Start the first response for a Peaks-
|
|
11
|
+
When active, make the skill transition visually obvious with a light Northeastern Chinese humor tone. Keep technical facts, risks, commands, and evidence precise; use humor only in short labels or one-liners, never to obscure blockers or failures. Start the first response for a Peaks-Loop skill task with this banner:
|
|
12
12
|
|
|
13
13
|
```markdown
|
|
14
14
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
15
|
-
Peaks-
|
|
16
|
-
Peaks-
|
|
17
|
-
Peaks-
|
|
18
|
-
Peaks-
|
|
15
|
+
Peaks-Loop Skill Active: <skill-name> — 整活开工,但不整虚的
|
|
16
|
+
Peaks-Loop Role Chain: <PRD → RD → QA → SC, or single role>
|
|
17
|
+
Peaks-Loop Mode: <Solo | Assisted | Swarm | Strict | Economy>
|
|
18
|
+
Peaks-Loop Current Gate: <confirmation | dry-run | coverage | QA | commit boundary | handoff>
|
|
19
19
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Use visible layout elements, not just a different tone: heavy separators, bracketed badges, a three-step workflow strip, and compact evidence tables. Then include a short process preview before doing work:
|
|
23
23
|
|
|
24
24
|
```markdown
|
|
25
|
-
Peaks-
|
|
25
|
+
Peaks-Loop [流程] ① <current role action> → ② <next gate or validation> → ③ <handoff / artifact / follow-up>
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
For swarm or economy mode, add a compact worker table when useful:
|
|
29
29
|
|
|
30
30
|
```markdown
|
|
31
|
-
| Peaks-
|
|
31
|
+
| Peaks-Loop Worker | Scope | Model/Cost lane | Output | Stop condition |
|
|
32
32
|
| --- | --- | --- | --- | --- |
|
|
33
33
|
| RD-1 | <subsystem> | <high/economy/configured provider> | <artifact> | <done signal> |
|
|
34
34
|
```
|
|
@@ -36,7 +36,7 @@ For swarm or economy mode, add a compact worker table when useful:
|
|
|
36
36
|
For final evidence, prefer this visual block:
|
|
37
37
|
|
|
38
38
|
```markdown
|
|
39
|
-
┌─ Peaks-
|
|
39
|
+
┌─ Peaks-Loop Evidence ─────────────────────
|
|
40
40
|
│ Commands: <only commands that matter>
|
|
41
41
|
│ Artifacts: <paths or none>
|
|
42
42
|
│ Changed: <files or none>
|
|
@@ -45,28 +45,28 @@ For final evidence, prefer this visual block:
|
|
|
45
45
|
└──────────────────────────────────────────
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
For continuing turns in the same Peaks-
|
|
48
|
+
For continuing turns in the same Peaks-Loop workflow, use a compact status header instead of the full banner:
|
|
49
49
|
|
|
50
50
|
```markdown
|
|
51
|
-
Peaks-
|
|
51
|
+
Peaks-Loop Skill: <skill-name> | Peaks-Loop Gate: <current gate> | Next: <one short action>
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
Structure active Peaks-
|
|
54
|
+
Structure active Peaks-Loop responses around:
|
|
55
55
|
|
|
56
|
-
1. **Peaks-
|
|
57
|
-
2. **Peaks-
|
|
58
|
-
3. **Peaks-
|
|
56
|
+
1. **Peaks-Loop Role** — name the active Peaks-Loop role or role chain, for example PRD → RD → QA → SC.
|
|
57
|
+
2. **Peaks-Loop Mode** — state whether the workflow is Solo, Assisted, Swarm, Strict, or Economy.
|
|
58
|
+
3. **Peaks-Loop Current Gate** — show the current required gate: product confirmation, RD dry-run, coverage, QA acceptance, commit boundary, or handoff.
|
|
59
59
|
4. **Action** — describe the immediate next action in one short sentence before tool use.
|
|
60
|
-
5. **Peaks-
|
|
60
|
+
5. **Peaks-Loop Evidence** — end with only the evidence that matters: commands, artifacts, changed files, blockers, and next action.
|
|
61
61
|
|
|
62
62
|
Do not produce long narrative logs. Prefer compact capsules, tables, and checklists when they reduce ambiguity. For unrelated non-Peaks tasks, do not show the banner.
|
|
63
63
|
|
|
64
|
-
## Peaks-
|
|
64
|
+
## Peaks-Loop + GStack alignment
|
|
65
65
|
|
|
66
|
-
Use gstack as a workflow reference for `Think → Plan → Build → Review → Test → Ship → Reflect`, but keep Peaks-
|
|
66
|
+
Use gstack as a workflow reference for `Think → Plan → Build → Review → Test → Ship → Reflect`, but keep Peaks-Loop as the authority:
|
|
67
67
|
|
|
68
|
-
- Think maps to Peaks-
|
|
69
|
-
- Plan maps to Peaks-
|
|
68
|
+
- Think maps to Peaks-Loop PRD and TXT context.
|
|
69
|
+
- Plan maps to Peaks-Loop RD/UI planning, risk matrices, and slice contracts.
|
|
70
70
|
- Build maps to RD implementation under strict specs.
|
|
71
71
|
- Review maps to code review, design review, and security review.
|
|
72
72
|
- Test maps to QA regression and acceptance evidence.
|
|
@@ -75,7 +75,7 @@ Use gstack as a workflow reference for `Think → Plan → Build → Review →
|
|
|
75
75
|
|
|
76
76
|
Do not imply that gstack commands are available unless the project has explicitly installed or exposed them.
|
|
77
77
|
|
|
78
|
-
## Peaks-
|
|
78
|
+
## Peaks-Loop Swarm development mode
|
|
79
79
|
|
|
80
80
|
Use Swarm mode for broad, parallelizable work with separable responsibilities. When recommending or running swarm work:
|
|
81
81
|
|
|
@@ -87,7 +87,7 @@ Use Swarm mode for broad, parallelizable work with separable responsibilities. W
|
|
|
87
87
|
|
|
88
88
|
Prefer parallel agents only for independent work. Do not duplicate searches or reviews already assigned to a worker.
|
|
89
89
|
|
|
90
|
-
## Peaks-
|
|
90
|
+
## Peaks-Loop Economy mode
|
|
91
91
|
|
|
92
92
|
Use Economy mode when the user asks for low-cost execution or when the task is broad but low-risk. In Economy mode:
|
|
93
93
|
|
|
@@ -99,28 +99,28 @@ Use Economy mode when the user asks for low-cost execution or when the task is b
|
|
|
99
99
|
|
|
100
100
|
When explaining Economy mode, separate **available now** from **recommended if configured**.
|
|
101
101
|
|
|
102
|
-
## Peaks-
|
|
102
|
+
## Peaks-Loop RD code-output rule
|
|
103
103
|
|
|
104
|
-
When the active role is Peaks-
|
|
104
|
+
When the active role is Peaks-Loop RD and code is produced or modified, require repeated dry-runs:
|
|
105
105
|
|
|
106
|
-
1. run applicable Peaks-
|
|
106
|
+
1. run applicable Peaks-Loop standards dry-runs before planning or implementation;
|
|
107
107
|
2. rerun relevant dry-runs after each meaningful slice or standards-affecting decision;
|
|
108
108
|
3. rerun before handoff, review, or commit-boundary work;
|
|
109
109
|
4. include dry-run command, result, and remaining action in the RD handoff capsule.
|
|
110
110
|
|
|
111
111
|
If a dry-run cannot be executed, state the blocker and keep it as the next action rather than silently skipping it.
|
|
112
112
|
|
|
113
|
-
## Peaks-
|
|
113
|
+
## Peaks-Loop Output examples
|
|
114
114
|
|
|
115
|
-
### Active Peaks-
|
|
115
|
+
### Active Peaks-Loop skill
|
|
116
116
|
|
|
117
117
|
```markdown
|
|
118
|
-
Peaks-
|
|
119
|
-
Peaks-
|
|
120
|
-
Peaks-
|
|
118
|
+
Peaks-Loop Role: RD → QA
|
|
119
|
+
Peaks-Loop Mode: Swarm
|
|
120
|
+
Peaks-Loop Current Gate: RD dry-run before implementation
|
|
121
121
|
Action: I will run standards dry-runs, then split workers by subsystem.
|
|
122
122
|
|
|
123
|
-
Peaks-
|
|
123
|
+
Peaks-Loop Evidence:
|
|
124
124
|
- Commands: ...
|
|
125
125
|
- Artifacts: ...
|
|
126
126
|
- Blocker: none
|
|
@@ -129,4 +129,4 @@ Peaks-Cli Evidence:
|
|
|
129
129
|
|
|
130
130
|
### Non-Peaks task
|
|
131
131
|
|
|
132
|
-
Use normal concise Claude Code responses without the Peaks-
|
|
132
|
+
Use normal concise Claude Code responses without the Peaks-Loop role/mode/gate wrapper.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "peaks-loop",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Loop Engineering CLI — workflow primitive / loop guards / evaluators / slice orchestration",
|
|
5
5
|
"author": "SquabbyZ",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
},
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "https://github.com/SquabbyZ/peaks-
|
|
14
|
+
"url": "https://github.com/SquabbyZ/peaks-loop.git"
|
|
15
15
|
},
|
|
16
|
-
"homepage": "https://github.com/SquabbyZ/peaks-
|
|
16
|
+
"homepage": "https://github.com/SquabbyZ/peaks-loop",
|
|
17
17
|
"bugs": {
|
|
18
|
-
"url": "https://github.com/SquabbyZ/peaks-
|
|
18
|
+
"url": "https://github.com/SquabbyZ/peaks-loop/issues"
|
|
19
19
|
},
|
|
20
20
|
"bin": {
|
|
21
21
|
"peaks": "./bin/peaks.js"
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
92
92
|
"@stryker-mutator/core": "^8.7.1",
|
|
93
93
|
"@stryker-mutator/typescript-checker": "^8.7.1",
|
|
94
|
+
"@stryker-mutator/vitest-runner": "^8.7.1",
|
|
94
95
|
"@types/node": "^22.10.2",
|
|
95
96
|
"@vitest/coverage-v8": "^2.1.8",
|
|
96
97
|
"tsx": "^4.19.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://peaks-
|
|
3
|
+
"$id": "https://peaks-loop.dev/schemas/decomposition-v1.json",
|
|
4
4
|
"title": "Peaks Decomposition Result v1",
|
|
5
5
|
"description": "v1 (legacy) slice decomposition output. Discriminated by the absence of a `schemaVersion` field. v1 files remain readable via `SchemaRouter.readResult`; new code should write v2 instead.",
|
|
6
6
|
"type": "object",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://peaks-
|
|
3
|
+
"$id": "https://peaks-loop.dev/schemas/decomposition-v2.json",
|
|
4
4
|
"title": "Peaks Decomposition Result v2 (multi-pass)",
|
|
5
5
|
"description": "v2 multi-pass slice decomposition output. Emitted by `peaks-slice-decompose` and the new `MultiPassOrchestrator`. Discriminated by `schemaVersion: 'v2'`. v1 files (no schemaVersion) remain readable via SchemaRouter.",
|
|
6
6
|
"type": "object",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://peaks-
|
|
3
|
+
"$id": "https://peaks-loop.dev/schemas/replay-fixture.schema.json",
|
|
4
4
|
"title": "Replay Fixture Metadata",
|
|
5
5
|
"description": "Meta envelope for v2.14.0 G1 fixture-replay anti-fake-green test fixtures. Records the CLI command that produced the fixture, its source origin, sanitization report, and SHA-256 checksum. Every fixture under tests/fixtures/replay/ MUST have a co-located fixture.meta.json that validates against this schema.",
|
|
6
6
|
"type": "object",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "peaks-
|
|
3
|
+
"$id": "peaks-loop/schemas/reviewer-envelope.schema.json",
|
|
4
4
|
"title": "ReviewerEnvelope",
|
|
5
5
|
"description": "Schema-validated JSON envelope emitted by peaks-reviewer (third-party reviewer). All LLM JSON output MUST validate against this shape; free-form LLM JSON is rejected. v2.14.0 G4 AC-4.2.",
|
|
6
6
|
"type": "object",
|
|
@@ -392,10 +392,10 @@ const IDE_DETECTION_DIRS = [
|
|
|
392
392
|
];
|
|
393
393
|
|
|
394
394
|
/**
|
|
395
|
-
* Per-IDE skill install paths. Per peaks-
|
|
395
|
+
* Per-IDE skill install paths. Per peaks-loop tenet
|
|
396
396
|
* "minimal-user-operation" (2026-06-11), the user should
|
|
397
397
|
* never have to run a per-platform install command — the
|
|
398
|
-
* `npm i -g peaks-
|
|
398
|
+
* `npm i -g peaks-loop` postinstall iterates ALL of these
|
|
399
399
|
* and symlinks the peaks-* skill family to every platform
|
|
400
400
|
* the user might be on.
|
|
401
401
|
*
|
|
@@ -730,8 +730,8 @@ export function installBundledOutputStyles(options = {}) {
|
|
|
730
730
|
*
|
|
731
731
|
* Mirrors `installBundledOutputStyles` but writes to
|
|
732
732
|
* `~/.claude/agents/` (Claude Code's sub-agent loader directory). Each
|
|
733
|
-
* agent file ships under `agents/*.md` in the peaks-
|
|
734
|
-
* copied on `npm i -g peaks-
|
|
733
|
+
* agent file ships under `agents/*.md` in the peaks-loop tarball and is
|
|
734
|
+
* copied on `npm i -g peaks-loop@latest` with content-hash drift detection
|
|
735
735
|
* via a `.peaks-managed` marker (SHA-256 of the source content).
|
|
736
736
|
*
|
|
737
737
|
* Drift policy (mirrors output-styles):
|
|
@@ -867,7 +867,7 @@ export function installBundledAgents(options = {}) {
|
|
|
867
867
|
* platforms can add an `agentsDir` field to their `IDE_SKILL_INSTALL_PROFILES`
|
|
868
868
|
* entry to opt in.
|
|
869
869
|
*
|
|
870
|
-
* Per peaks-
|
|
870
|
+
* Per peaks-loop tenet "minimal-user-operation" (2026-06-11): the user
|
|
871
871
|
* should never have to run a per-platform install command. Symlink /
|
|
872
872
|
* copy failures are soft (logged to stderr, never throw) so one platform's
|
|
873
873
|
* failure doesn't block the others.
|
|
@@ -918,7 +918,7 @@ export function installBundledAgentsForAllPlatforms(options = {}) {
|
|
|
918
918
|
|
|
919
919
|
/**
|
|
920
920
|
* Per-platform fan-out — iterate ALL 8 IdeIds and call
|
|
921
|
-
* `installBundledSkills` for each. Per peaks-
|
|
921
|
+
* `installBundledSkills` for each. Per peaks-loop tenet
|
|
922
922
|
* "minimal-user-operation" (2026-06-11): the user should
|
|
923
923
|
* never have to run a per-platform install command. The
|
|
924
924
|
* 1.x postinstall only handled the auto-detected single
|
|
@@ -1065,7 +1065,7 @@ export function detect1xProjectState(cwd = process.cwd()) {
|
|
|
1065
1065
|
|
|
1066
1066
|
/**
|
|
1067
1067
|
* Postinstall auto-upgrade — when the user just ran
|
|
1068
|
-
* `npm i -g peaks-
|
|
1068
|
+
* `npm i -g peaks-loop@2.0` and `cwd` is a 1.x peaks-loop
|
|
1069
1069
|
* project, this shells out to the installed `peaks`
|
|
1070
1070
|
* binary to run the umbrella `peaks upgrade --to 2.0 --auto`.
|
|
1071
1071
|
*
|
|
@@ -1140,8 +1140,8 @@ if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(resolve(p
|
|
|
1140
1140
|
}
|
|
1141
1141
|
const outputStylesResult = installBundledOutputStyles();
|
|
1142
1142
|
// Slice 7/7 — bundled agents (Claude Code sub-agent prompts) ship
|
|
1143
|
-
// under `agents/*.md` in the peaks-
|
|
1144
|
-
// to `~/.claude/agents/` on `npm i -g peaks-
|
|
1143
|
+
// under `agents/*.md` in the peaks-loop tarball and are auto-installed
|
|
1144
|
+
// to `~/.claude/agents/` on `npm i -g peaks-loop@latest`. Drift
|
|
1145
1145
|
// detection is content-hash + `.peaks-managed` marker (mirrors the
|
|
1146
1146
|
// output-styles contract).
|
|
1147
1147
|
const agentsPerPlatform = installBundledAgentsForAllPlatforms();
|
|
@@ -1174,7 +1174,7 @@ if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(resolve(p
|
|
|
1174
1174
|
|
|
1175
1175
|
// 2.0 postinstall: auto-detect 1.x project state in cwd
|
|
1176
1176
|
// and dispatch the upgrade umbrella. This makes the
|
|
1177
|
-
// user's `npm i -g peaks-
|
|
1177
|
+
// user's `npm i -g peaks-loop@2.0` truly one-key.
|
|
1178
1178
|
if (process.env.PEAKS_SKIP_AUTO_UPGRADE !== '1') {
|
|
1179
1179
|
// Fire-and-forget; the upgrade is async by design so
|
|
1180
1180
|
// the npm install output isn't blocked. We print a
|
|
@@ -1183,7 +1183,7 @@ if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(resolve(p
|
|
|
1183
1183
|
autoUpgrade1xProjectIfPresent().then((result) => {
|
|
1184
1184
|
if (result.ran) {
|
|
1185
1185
|
process.stdout.write(
|
|
1186
|
-
`\n✓ Detected 1.x peaks-
|
|
1186
|
+
`\n✓ Detected 1.x peaks-loop project at ${result.projectRoot}\n` +
|
|
1187
1187
|
` → auto-upgraded to 2.0 (${result.signals?.length ?? 0} signals resolved)\n` +
|
|
1188
1188
|
` Run \`peaks audit red-lines --project .\` to verify.\n`
|
|
1189
1189
|
);
|
|
@@ -7,9 +7,9 @@ description: Gate autonomous LLM work on a 6-dimension audit + user-accepted goa
|
|
|
7
7
|
|
|
8
8
|
> **Read once at the top of this file; the rest of the skill is written against it.**
|
|
9
9
|
|
|
10
|
-
The `.peaks/` workspace is partitioned by a **single scope axis** (session-id, at `.peaks/_runtime/<sessionId>/...`) with a nested **sub-agent axis** under `.peaks/_sub_agents/<sessionId>/...`. Use `<sessionId>` placeholders (NEVER bare `<sid>`). The peaks-
|
|
10
|
+
The `.peaks/` workspace is partitioned by a **single scope axis** (session-id, at `.peaks/_runtime/<sessionId>/...`) with a nested **sub-agent axis** under `.peaks/_sub_agents/<sessionId>/...`. Use `<sessionId>` placeholders (NEVER bare `<sid>`). The peaks-loop change-id axis was removed in slice `2026-06-29-change-id-root-removal`; reviewable artifacts now live under `.peaks/_runtime/<sessionId>/<role>/...` only. OpenSpec's independent `openspec/changes/<change-id>/` vocabulary (L4) is preserved untouched. CLI mapping: session-id → `peaks session *`; sub-agent → `peaks sub-agent *`. Regression test `tests/unit/skills/skills-skill-md-naming.test.ts` enforces (a) zero bare `<sid>`, (b) every `.peaks/_runtime/<X>/` has an axis label, (c) this callout is present.
|
|
11
11
|
|
|
12
|
-
# Peaks-
|
|
12
|
+
# Peaks-Loop Audit
|
|
13
13
|
|
|
14
14
|
`peaks-audit` is the **first** step in any peaks-* workflow. It turns a human-expressed need into a 6-dimension audit plus a proposed goal, and refuses to let autonomous LLM work proceed on a partial audit. It is invoked IMMEDIATELY after the need is expressed, and BEFORE any PRD, RD, or QA work begins.
|
|
15
15
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-doctor
|
|
3
|
-
description: Orchestrate peaks-
|
|
3
|
+
description: Orchestrate peaks-loop's L3 doctor (peaks audit + peaks doctor + peaks openspec from-doctor) for project health. Use when the user asks for a project health check, doctor report, audit, or wants to convert doctor findings into OpenSpec change records. Coordinates the L2 audit framework + the L3.2 doctor + the L3.3 from-doctor proposal generator. Triggers on `/peaks-doctor`, "peaks doctor", "项目健康", "doctor report", "health check", "check the project", "audit my repo".
|
|
4
4
|
internal: true
|
|
5
5
|
---
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Peaks-
|
|
8
|
+
# Peaks-Loop Doctor
|
|
9
9
|
|
|
10
|
-
Peaks-
|
|
10
|
+
Peaks-Loop Doctor is the orchestration facade for the L3 doctor workflow. It runs the L2 audit framework (`peaks audit red-lines`) + the L3.2 doctor checks (`peaks doctor`) + the L3.3 from-doctor proposal generator (`peaks openspec from-doctor`). Use it when the user wants a project health check, a red-line audit, or to convert doctor findings into OpenSpec change records.
|
|
11
11
|
|
|
12
12
|
## Skill-first architecture note (read once, internalise)
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@ This skill is the **primary surface**. The `peaks <cmd>` CLI is **auxiliary**
|
|
|
15
15
|
|
|
16
16
|
## Code-Change Red Line (BLOCKING — read before ANY tool call)
|
|
17
17
|
|
|
18
|
-
**Peaks-
|
|
18
|
+
**Peaks-Loop Doctor is a doctor orchestrator, NOT an implementer. You MUST NOT write, edit, or modify any application source code directly.**
|
|
19
19
|
|
|
20
20
|
The doctor workflow is read-only by design. It produces:
|
|
21
21
|
- `peaks audit red-lines` report (121 red lines in the current repo, 6 cli-backed)
|
|
@@ -7,9 +7,9 @@ description: Final-review skill for Peaks. Use when a workflow needs to assemble
|
|
|
7
7
|
|
|
8
8
|
> **Read once at the top of this file; the rest of the skill is written against it.**
|
|
9
9
|
|
|
10
|
-
The `.peaks/` workspace is partitioned by a **single scope axis** (session-id, at `.peaks/_runtime/<sessionId>/...`) with a nested **sub-agent axis** under `.peaks/_sub_agents/<sessionId>/...`. Use `<sessionId>` placeholders (NEVER bare `<sid>`). The peaks-
|
|
10
|
+
The `.peaks/` workspace is partitioned by a **single scope axis** (session-id, at `.peaks/_runtime/<sessionId>/...`) with a nested **sub-agent axis** under `.peaks/_sub_agents/<sessionId>/...`. Use `<sessionId>` placeholders (NEVER bare `<sid>`). The peaks-loop change-id axis was removed in slice `2026-06-29-change-id-root-removal`; reviewable artifacts now live under `.peaks/_runtime/<sessionId>/<role>/...` only. OpenSpec's independent `openspec/changes/<change-id>/` vocabulary (L4) is preserved untouched. CLI mapping: session-id → `peaks session *`; sub-agent → `peaks sub-agent *`. Regression test `tests/unit/skills/skills-skill-md-naming.test.ts` enforces (a) zero bare `<sid>`, (b) every `.peaks/_runtime/<X>/` has an axis label, (c) this callout is present.
|
|
11
11
|
|
|
12
|
-
# Peaks-
|
|
12
|
+
# Peaks-Loop Final Review
|
|
13
13
|
|
|
14
14
|
Prepare 4-dim business review evidence for human acceptance. The LLM does the work; the human judges the outcome.
|
|
15
15
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peaks-ide
|
|
3
|
-
description: Orchestrate peaks-
|
|
3
|
+
description: Orchestrate peaks-loop's IDE-aware behavior (hooks + statusline + handle) for a user's specific IDE. Detects the current state (which IDE the user is on, what peaks has already installed), plans the install / switch / status / uninstall actions, and invokes the existing peaks CLI primitives. Triggers on `/peaks-ide`, "set up peaks for my IDE", "switch peaks to Trae", "what did peaks install", "uninstall peaks hooks". Sits between the user and `peaks hooks install` / `peaks statusline install` / `peaks hook handle` — those are the CLI primitives; this skill is the user-facing surface.
|
|
4
4
|
internal: true
|
|
5
5
|
---
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Peaks-
|
|
8
|
+
# Peaks-Loop IDE Setup (peaks-ide)
|
|
9
9
|
|
|
10
|
-
`peaks-ide` is the **user-facing surface** for everything peaks-
|
|
10
|
+
`peaks-ide` is the **user-facing surface** for everything peaks-loop does that's IDE-aware. It does NOT introduce new CLI commands. It orchestrates the existing CLI primitives — `peaks hooks install`, `peaks statusline install`, `peaks hook handle` — based on the user's intent and the IDE the user is on.
|
|
11
11
|
|
|
12
12
|
**Why this exists (dev-preference red line):** "skill is primary, CLI is auxiliary." The behavior that only an LLM in a skill prompt would use ("detect which IDE the user is on", "plan the migration steps", "ask the user before destructive actions") lives in this SKILL.md, not in a new `peaks <cmd>`. The CLI commands stay as atomic primitives the skill composes.
|
|
13
13
|
|