peaks-loop 3.0.0 → 3.0.2
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 +94 -59
- 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/understand-commands.js +36 -0
- 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/understand/hybrid-types.d.ts +32 -0
- package/dist/src/services/understand/hybrid-types.js +1 -0
- package/dist/src/services/understand/understand-hybrid-service.d.ts +10 -0
- package/dist/src/services/understand/understand-hybrid-service.js +100 -0
- 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
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { createCodegraphInvocation, executeCodegraphInvocation } from '../codegraph/codegraph-service.js';
|
|
2
|
+
import { scanUnderstandAnything, summarizeKnowledgeGraph } from './understand-scan-service.js';
|
|
3
|
+
import { getErrorMessage } from '../../shared/result.js';
|
|
4
|
+
const DEFAULT_FILES = ['src/index.ts', 'package.json', 'README.md'];
|
|
5
|
+
function resolveFiles(files) {
|
|
6
|
+
if (files !== undefined && files.length > 0) {
|
|
7
|
+
return [...files];
|
|
8
|
+
}
|
|
9
|
+
return [...DEFAULT_FILES];
|
|
10
|
+
}
|
|
11
|
+
async function safeSummarize(options) {
|
|
12
|
+
try {
|
|
13
|
+
return { summary: await summarizeKnowledgeGraph(options) };
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
return { warning: `UA summary failed: ${getErrorMessage(error)}` };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
async function runCodegraph(projectRoot, files, runner) {
|
|
20
|
+
try {
|
|
21
|
+
const invocation = createCodegraphInvocation({
|
|
22
|
+
subcommand: 'affected',
|
|
23
|
+
project: projectRoot,
|
|
24
|
+
files,
|
|
25
|
+
json: true
|
|
26
|
+
});
|
|
27
|
+
const execution = await executeCodegraphInvocation(invocation, runner);
|
|
28
|
+
if (execution.exitCode !== 0) {
|
|
29
|
+
return { warning: `codegraph affected exited with code ${execution.exitCode}: ${execution.stderr.slice(0, 200)}` };
|
|
30
|
+
}
|
|
31
|
+
let payload = null;
|
|
32
|
+
let parseError;
|
|
33
|
+
try {
|
|
34
|
+
payload = JSON.parse(execution.stdout);
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
parseError = getErrorMessage(error);
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
block: {
|
|
41
|
+
invocation: { subcommand: 'affected', files },
|
|
42
|
+
execution,
|
|
43
|
+
payload,
|
|
44
|
+
...(parseError !== undefined ? { parseError } : {})
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
return { warning: `codegraph affected failed: ${getErrorMessage(error)}` };
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function decideSource(uaScan, hasCodegraph) {
|
|
53
|
+
const uaPresent = uaScan.exists && uaScan.graph.exists && uaScan.graph.parseError === undefined;
|
|
54
|
+
if (uaPresent && hasCodegraph)
|
|
55
|
+
return 'ua-and-codegraph-hybrid';
|
|
56
|
+
if (uaPresent)
|
|
57
|
+
return 'ua-only';
|
|
58
|
+
if (hasCodegraph)
|
|
59
|
+
return 'ua-missing-fallback-codegraph';
|
|
60
|
+
return 'both-missing';
|
|
61
|
+
}
|
|
62
|
+
export async function buildUnderstandContext(options) {
|
|
63
|
+
const startedAt = Date.now();
|
|
64
|
+
const files = resolveFiles(options.files);
|
|
65
|
+
const sampleSize = options.sampleSize ?? 5;
|
|
66
|
+
const warnings = [];
|
|
67
|
+
const scanOptions = { projectRoot: options.projectRoot };
|
|
68
|
+
if (options.artifactDir !== undefined) {
|
|
69
|
+
scanOptions.artifactDir = options.artifactDir;
|
|
70
|
+
}
|
|
71
|
+
const uaScan = await scanUnderstandAnything(scanOptions);
|
|
72
|
+
const uaSummaryPromise = uaScan.exists && uaScan.graph.exists
|
|
73
|
+
? safeSummarize({ projectRoot: options.projectRoot, sampleSize, ...(options.artifactDir !== undefined ? { artifactDir: options.artifactDir } : {}) })
|
|
74
|
+
: Promise.resolve({});
|
|
75
|
+
const [uaSummary, codegraphResult] = await Promise.all([
|
|
76
|
+
uaSummaryPromise,
|
|
77
|
+
runCodegraph(options.projectRoot, files, options.codegraphRunner)
|
|
78
|
+
]);
|
|
79
|
+
if (uaSummary.warning)
|
|
80
|
+
warnings.push(uaSummary.warning);
|
|
81
|
+
if (codegraphResult.warning)
|
|
82
|
+
warnings.push(codegraphResult.warning);
|
|
83
|
+
const source = decideSource(uaScan, codegraphResult.block !== undefined);
|
|
84
|
+
const result = {
|
|
85
|
+
projectRoot: options.projectRoot,
|
|
86
|
+
source,
|
|
87
|
+
durationMs: Date.now() - startedAt,
|
|
88
|
+
warnings
|
|
89
|
+
};
|
|
90
|
+
if (source === 'ua-only' || source === 'ua-and-codegraph-hybrid') {
|
|
91
|
+
result.ua = {
|
|
92
|
+
scan: uaScan,
|
|
93
|
+
...(uaSummary.summary !== undefined ? { summary: uaSummary.summary } : {})
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
if (codegraphResult.block) {
|
|
97
|
+
result.codegraph = codegraphResult.block;
|
|
98
|
+
}
|
|
99
|
+
return result;
|
|
100
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The 2.0 canonical ignore block. Mirrors the same paths
|
|
3
|
-
* peaks-
|
|
4
|
-
* (the peaks-
|
|
3
|
+
* peaks-loop's own .gitignore uses; kept in lockstep manually
|
|
4
|
+
* (the peaks-loop root .gitignore is the source of truth).
|
|
5
5
|
*
|
|
6
6
|
* Sentinel: every emitted line carries the marker comment so
|
|
7
7
|
* the migration can detect "already-migrated" and stay
|
|
8
8
|
* idempotent.
|
|
9
9
|
*/
|
|
10
|
-
export declare const PEAKS_2_0_BLOCK_SENTINEL = "# peaks-
|
|
10
|
+
export declare const PEAKS_2_0_BLOCK_SENTINEL = "# peaks-loop 2.0 canonical ignore block \u2014 managed by `peaks upgrade --to 2.0`";
|
|
11
11
|
export declare const CANONICAL_2_0_PEAKS_BLOCK: string;
|
|
12
12
|
/**
|
|
13
13
|
* Returns true when `line` is a wholesale ignore of the entire
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
*
|
|
31
31
|
* Idempotent: re-running on a migrated .gitignore is a no-op.
|
|
32
32
|
*
|
|
33
|
-
* Spec reference: docs/superpowers/specs/2026-06-11-peaks-
|
|
33
|
+
* Spec reference: docs/superpowers/specs/2026-06-11-peaks-loop-l1-l2-l3-redesign.md §8.4
|
|
34
34
|
* (per-project state in .peaks/preferences.json, durable
|
|
35
35
|
* memories in .peaks/memory/*.md).
|
|
36
36
|
*/
|
|
@@ -38,14 +38,14 @@ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
|
38
38
|
import { join } from 'node:path';
|
|
39
39
|
/**
|
|
40
40
|
* The 2.0 canonical ignore block. Mirrors the same paths
|
|
41
|
-
* peaks-
|
|
42
|
-
* (the peaks-
|
|
41
|
+
* peaks-loop's own .gitignore uses; kept in lockstep manually
|
|
42
|
+
* (the peaks-loop root .gitignore is the source of truth).
|
|
43
43
|
*
|
|
44
44
|
* Sentinel: every emitted line carries the marker comment so
|
|
45
45
|
* the migration can detect "already-migrated" and stay
|
|
46
46
|
* idempotent.
|
|
47
47
|
*/
|
|
48
|
-
export const PEAKS_2_0_BLOCK_SENTINEL = '# peaks-
|
|
48
|
+
export const PEAKS_2_0_BLOCK_SENTINEL = '# peaks-loop 2.0 canonical ignore block — managed by `peaks upgrade --to 2.0`';
|
|
49
49
|
export const CANONICAL_2_0_PEAKS_BLOCK = [
|
|
50
50
|
PEAKS_2_0_BLOCK_SENTINEL,
|
|
51
51
|
'.peaks/_runtime/',
|
|
@@ -2,7 +2,7 @@ export interface UpgradeInput {
|
|
|
2
2
|
readonly projectRoot: string;
|
|
3
3
|
/**
|
|
4
4
|
* When true, the umbrella is being invoked from the
|
|
5
|
-
* `npm i -g peaks-
|
|
5
|
+
* `npm i -g peaks-loop` postinstall. Suppresses the
|
|
6
6
|
* interactive prompts and accepts soft-fail on any
|
|
7
7
|
* sub-step.
|
|
8
8
|
*/
|
|
@@ -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.2";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "3.0.
|
|
1
|
+
export const CLI_VERSION = "3.0.2";
|
|
@@ -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.2",
|
|
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",
|