peaks-loop 4.0.1 → 4.0.4
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/CHANGELOG.md +38 -448
- package/README-en.md +63 -45
- package/README.md +45 -77
- package/dist/cli/commands/code-runtime-commands.js +15 -2
- package/dist/services/context/auto-compact-reader.d.ts +33 -4
- package/dist/services/context/auto-compact-reader.js +65 -18
- package/dist/services/context/auto-compact-types.d.ts +10 -2
- package/package.json +48 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 4.0.
|
|
3
|
+
## 4.0.4 — 2026-07-31 (Mac auto-compact silent failure + user-driven override)
|
|
4
|
+
|
|
5
|
+
### Bug fixes
|
|
6
|
+
|
|
7
|
+
- **Mac auto-compact silent failure closed** (rid-001-r1, commit `22debcb`): `readClaudeTranscriptFallback` now recurses into `~/.claude/projects/**/<hash>/` (was: flat readdir of `<hash>/<sid>.jsonl`). On Mac Claude Code, where the transcript can sit under a nested layout the previous flat walk could not predict, the probe was returning `ratio: 0` and the auto-compact orchestrator stayed in `none` zone — `/compact` never fired. New source tag `transcript-estimate` distinguishes this real signal from the no-signal `conservative-fallback` so the CLI can label it correctly. No orchestrator threshold change; no new dependency; works on win32 / darwin / linux. Files: `src/services/context/auto-compact-reader.ts` (surgical: +`findTranscriptJsonl` recursive helper), `src/services/context/auto-compact-types.ts` (JSDoc only), `tests/unit/context/auto-compact-reader.test.ts` (new, 6 cases). Acceptance: `peaks code context-now --json` on Mac returns `ratio >= 0.5` when `<sid>.jsonl` is ~200KB. **Plus a 2-line ESM-compatibility fix** (commit `22debcb`): the original `findTranscriptJsonl` used `require('node:fs')` inside the function body, which threw `ReferenceError: require is not defined` under pure Node 22 ESM and was silently swallowed by the outer `try/catch` — vitest's esbuild shim masked the bug. Moved `readdirSync` to top-level import.
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- Add: `peaks code context-now --prompt-size <bytes>` user-driven override (rid-002, commit `fa98502`). Mac escape hatch when `CLAUDE_CONTEXT_USAGE_PERCENT` is absent. New `source: 'user-overridden'` value at P0 above env / statusline / transcript / fallback. Example: `--prompt-size 200000` → `ratio ≈ 0.762`, `source: 'user-overridden'`. Files: `src/cli/commands/code-runtime-commands.ts`, `src/services/context/auto-compact-reader.ts` (+P0 short-circuit), `src/services/context/auto-compact-types.ts` (JSDoc), `tests/unit/context/auto-compact-reader.test.ts` (+4 cases).
|
|
12
|
+
|
|
13
|
+
### Documentation
|
|
14
|
+
|
|
15
|
+
- Add: `docs/mac-auto-compact.md` (78 lines) — Mac user-facing verify + escape hatch doc (rid-003, commit `18f4d68`). 5 sections: TL;DR, Why Mac was broken, How to verify, The escape hatch, Hook integration, Caveats, Related.
|
|
16
|
+
- Add: `CLAUDE.md` line 20 callout linking Mac users to the new doc.
|
|
17
|
+
- Add: 2 project memory entries (`.peaks/memory/2026-07-31-mac-auto-compact-{no-env-injection,esm-fake-green-and-fix}.md`) for future maintainer reference (rid-003-r1, commit `03be94f0`).
|
|
18
|
+
|
|
19
|
+
### Sub-package lockstep (4.0.4)
|
|
20
|
+
|
|
21
|
+
- peaks-loop@4.0.4 / peaks-loop-shared@0.0.32 / peaks-loop-mut@0.1.6 / peaks-loop-shared-channel@0.0.11
|
|
22
|
+
- `peaks-loop-shared/dist/version.js` CLI_VERSION bumped to "4.0.4" (publish gate-cli-version reads on-disk, not the packed tarball — both checked)
|
|
23
|
+
|
|
24
|
+
## 4.0.3 — 2026-07-30 (GA release, 4.0.2 tombstone skip)
|
|
25
|
+
|
|
26
|
+
This is the cutover to the in-flight 4.0.3 GA, replacing the prior `## 4.0.1` GA header. 4.0.3 lands because 4.0.2 is a permanent npm tombstone (published-then-unpublished on 2026-07-22; see `.peaks/memory/2026-07-30-4-0-1-published-tombstone-resolution.md` table row 4.0.2: ABSENT in versions[] but time entry `2026-07-22T01:53:48.127Z` still present = tombstoned). The byte-for-byte manifest is identical to 4.0.1; the only diff is the package.json version + the visual README rework (see "Visual / text" below). The 4.0.1 GA section below is preserved as the historical record of the actual `peaks-loop@4.0.1` published at `dist-tags.latest` on 2026-07-30T14:55:22Z; it is NOT the 4.0.3 release body.
|
|
27
|
+
|
|
28
|
+
### Visual / text (4.0.3-only)
|
|
29
|
+
|
|
30
|
+
- **README + README-en beautify** (8 SVG visual assets, 0 external deps): 5 NEW deterministic SVGs under `assets/readme/` (`hero` 1200×600 multi-pane terminal with live epoch + status lights + radial gate, `command-palette` 13 slash commands in a ⌘K palette, `pulse` 4-tile live metrics with radial rings + data-flow, `trace-stream` code diff + scrolling log + 7-gate chain, `skill-index` 13 skill cards with category badges, `ship-summary` 19-rid timeline with category chips, plus retained `architecture` + `domains` + `status` + `footer`). 1 new tail-end section in CHANGELOG (this one). All asset-only mode; no external fonts, scripts, or remote URLs.
|
|
31
|
+
- **CHANGELOG noise reduction**: 8 empty `## 4.0.0` shells stripped (4 with stale `Updated dependencies` lists + 4 with only `### Patch/Minor Changes` headers and no list items), 1 empty `## [Unreleased]` placeholder stripped, 1 duplicate `## [3.0.2]` section merged. File size 4147 → 3943 lines (-204). 0 semantic content removed; this is a release-blocker for 4.0.3 because the prior duplicate `## 4.0.0` headings confused publish.yml's release-notes awk extractor on the 4.0.3 attempt (PR #rid-034 already showed the awk regex is sensitive to neighbor duplicates).
|
|
32
|
+
- **Dynamic npm version badge in README**: the "Latest" row of the status table now renders via `[]` so the version auto-updates at every publish without a README edit. Previously this row was hardcoded `4.0.1`.
|
|
33
|
+
- **package.json keywords for npm search** (root 42 + shared 8 + mut 9 + channel 9): `peaks-loop / loop-engineering / ai-orchestration / ai-coding-agent / ai-programmer / multi-agent / claude-code / codex / z-code / cursor / trae / tongyi-lingma / agent-harness / agentic-engineering / autonomous-workflow / workflow-orchestration / llm-workflow / long-running-task / sub-agent-dispatch / dag-orchestration / slice-decomposition / sop / openspec / karpathy / darwin / anti-drift / evolution-evaluation / ci-cd / github-actions / trusted-publishing / oidc / monorepo / pnpm / vitest / code-review / tdd / security-scan / lint / typecheck / devtool / cli / developer-tools`.
|
|
34
|
+
|
|
35
|
+
### Sub-package lockstep (4.0.3)
|
|
36
|
+
|
|
37
|
+
- peaks-loop@4.0.3 / peaks-loop-shared@0.0.31 / peaks-loop-mut@0.1.5 / peaks-loop-shared-channel@0.0.10
|
|
38
|
+
- `peaks-loop-shared/dist/version.js` CLI_VERSION bumped to "4.0.3" (publish gate-cli-version reads on-disk, not the packed tarball — both checked).
|
|
39
|
+
|
|
40
|
+
## 4.0.1 — 2026-07-30 (GA release, the actual published GA at dist-tags.latest)
|
|
4
41
|
|
|
5
42
|
### Features
|
|
6
43
|
|
|
@@ -59,17 +96,6 @@
|
|
|
59
96
|
- **Cross-platform note**: Windows is the strong-evidence half of spec.md S4. macOS + Linux halves are best-effort deferred per the rid-010 plan §3 (no in-repo macOS/Linux CI runner wired for the workspace-init + spawn-harness flow). The fix is platform-agnostic at the source level (Node `child_process` + `process.argv`); the dogfood on a second OS is a verification artifact, not a correctness artifact. macOS / Linux dogfood will be captured in a follow-up slice if/when a runner is wired.
|
|
60
97
|
- Closure sediment: `.peaks/memory/2026-07-24-rid-010-fix-claude-settings-closure.md` (rid-010 — Implementation Closure Record, 2 of 5 tasks shipped; Tasks 3-5 quality gates / 3-pass review / release are part of the 2.0.4 ship path).
|
|
61
98
|
|
|
62
|
-
## 4.0.0
|
|
63
|
-
|
|
64
|
-
### Patch Changes
|
|
65
|
-
|
|
66
|
-
- Updated dependencies
|
|
67
|
-
- peaks-loop-shared@0.0.18
|
|
68
|
-
- peaks-loop-audit-independent@0.0.12
|
|
69
|
-
- peaks-loop-crystallization@0.0.13
|
|
70
|
-
- peaks-loop-doctor@0.0.12
|
|
71
|
-
- peaks-loop-final-review@0.0.12
|
|
72
|
-
|
|
73
99
|
## 4.0.0-beta.26 — 2026-07-22 (peaks-loop-shared lockstep)
|
|
74
100
|
|
|
75
101
|
- Monorepo recurrence fix: `scripts/sync-version.mjs` now auto-bumps
|
|
@@ -82,284 +108,6 @@
|
|
|
82
108
|
invocations of sync-version are now no-ops w.r.t. the shared
|
|
83
109
|
version (no ratcheting during local dev loops).
|
|
84
110
|
|
|
85
|
-
## 4.0.0
|
|
86
|
-
|
|
87
|
-
### Patch Changes
|
|
88
|
-
|
|
89
|
-
- Updated dependencies
|
|
90
|
-
- peaks-loop-shared@0.0.18
|
|
91
|
-
- peaks-loop-audit-independent@0.0.12
|
|
92
|
-
- peaks-loop-crystallization@0.0.13
|
|
93
|
-
- peaks-loop-doctor@0.0.12
|
|
94
|
-
- peaks-loop-final-review@0.0.12
|
|
95
|
-
|
|
96
|
-
## 4.0.0
|
|
97
|
-
|
|
98
|
-
### Patch Changes
|
|
99
|
-
|
|
100
|
-
- Updated dependencies
|
|
101
|
-
- peaks-loop-shared@0.0.18
|
|
102
|
-
- peaks-loop-audit-independent@0.0.12
|
|
103
|
-
- peaks-loop-crystallization@0.0.13
|
|
104
|
-
- peaks-loop-doctor@0.0.12
|
|
105
|
-
- peaks-loop-final-review@0.0.12
|
|
106
|
-
|
|
107
|
-
## 4.1.0 (Unreleased)
|
|
108
|
-
|
|
109
|
-
### Added
|
|
110
|
-
|
|
111
|
-
- **Sub-agent memory preflight**: peaks-code orchestrator now
|
|
112
|
-
automatically injects a token-bounded `feedback / layer A` memory
|
|
113
|
-
block from `.peaks/memory/index.json` into every sub-agent's
|
|
114
|
-
system prompt. Defaults to 1.2k token cap (configurable via
|
|
115
|
-
`.peaks/preferences.json::memoryPreflight.maxTokens`); silent
|
|
116
|
-
degradation when the index is missing. No new CLI surface.
|
|
117
|
-
See `docs/superpowers/specs/2026-07-22-orchestrator-memory-preflight-design.md`.
|
|
118
|
-
|
|
119
|
-
- **Slice topology multi-pass decomposition (v1 shipped + gap-closure)**: `peaks slice decompose` now supports a `--granularity` flag (`service` | `file` | `both` | `auto`) that drives the multi-pass orchestrator (`MultiPassOrchestrator` + `SchemaRouter` + `CrossPassEdgeMerger` + `LLMArbitrator` + `GranularityDecider`). v1 produced a `DecompositionResultV2` envelope (`passes[]` + `crossPassEdges[]` + `llmArbitrations[]`); the gap-closure slice adds `tests/unit/slice/integration.test.ts` (12 cases: end-to-end `decompose()` against injected runners, two-service fixture, Pass 1 partition invariant, Pass 2 scope-filter invariant, cross-service topological order, internal-edge round-trip, single-pass fallback). The 4-dim `prepareFinalReview()` mapping (functional-completeness / problem-resolution / no-new-bugs / existing-functionality-intact) is covered by `packages/peaks-loop-final-review/tests/final-review-service.test.ts`. No source code touched in this gap-closure slice; only the integration test was added. See `.peaks/_runtime/2026-07-24-session-f13da7/rd/requests/2026-07-24-rid-015-add-slice-topology-multipass.md` for the RD plan.
|
|
120
|
-
|
|
121
|
-
## 4.0.0
|
|
122
|
-
|
|
123
|
-
### Patch Changes
|
|
124
|
-
|
|
125
|
-
- Updated dependencies
|
|
126
|
-
- peaks-loop-shared@0.0.18
|
|
127
|
-
- peaks-loop-audit-independent@0.0.12
|
|
128
|
-
- peaks-loop-crystallization@0.0.13
|
|
129
|
-
- peaks-loop-doctor@0.0.12
|
|
130
|
-
- peaks-loop-final-review@0.0.12
|
|
131
|
-
|
|
132
|
-
## 4.0.0
|
|
133
|
-
|
|
134
|
-
### Patch Changes
|
|
135
|
-
|
|
136
|
-
- Updated dependencies
|
|
137
|
-
- peaks-loop-shared@0.0.18
|
|
138
|
-
- peaks-loop-audit-independent@0.0.12
|
|
139
|
-
- peaks-loop-crystallization@0.0.13
|
|
140
|
-
- peaks-loop-doctor@0.0.12
|
|
141
|
-
- peaks-loop-final-review@0.0.12
|
|
142
|
-
|
|
143
|
-
## 4.0.0
|
|
144
|
-
|
|
145
|
-
### Patch Changes
|
|
146
|
-
|
|
147
|
-
- Updated dependencies
|
|
148
|
-
- peaks-loop-shared@0.0.18
|
|
149
|
-
- peaks-loop-audit-independent@0.0.12
|
|
150
|
-
- peaks-loop-crystallization@0.0.13
|
|
151
|
-
- peaks-loop-doctor@0.0.12
|
|
152
|
-
- peaks-loop-final-review@0.0.12
|
|
153
|
-
|
|
154
|
-
## 4.0.0
|
|
155
|
-
|
|
156
|
-
### Patch Changes
|
|
157
|
-
|
|
158
|
-
- Updated dependencies
|
|
159
|
-
- peaks-loop-shared@0.0.18
|
|
160
|
-
- peaks-loop-audit-independent@0.0.12
|
|
161
|
-
- peaks-loop-crystallization@0.0.13
|
|
162
|
-
- peaks-loop-doctor@0.0.12
|
|
163
|
-
- peaks-loop-final-review@0.0.12
|
|
164
|
-
|
|
165
|
-
## 4.0.0
|
|
166
|
-
|
|
167
|
-
### Patch Changes
|
|
168
|
-
|
|
169
|
-
- Updated dependencies
|
|
170
|
-
- peaks-loop-shared@0.0.18
|
|
171
|
-
- peaks-loop-audit-independent@0.0.12
|
|
172
|
-
- peaks-loop-crystallization@0.0.13
|
|
173
|
-
- peaks-loop-doctor@0.0.12
|
|
174
|
-
- peaks-loop-final-review@0.0.12
|
|
175
|
-
|
|
176
|
-
## 4.0.0
|
|
177
|
-
|
|
178
|
-
### Patch Changes
|
|
179
|
-
|
|
180
|
-
- Updated dependencies
|
|
181
|
-
- peaks-loop-shared@0.0.18
|
|
182
|
-
- peaks-loop-audit-independent@0.0.12
|
|
183
|
-
- peaks-loop-crystallization@0.0.13
|
|
184
|
-
- peaks-loop-doctor@0.0.12
|
|
185
|
-
- peaks-loop-final-review@0.0.12
|
|
186
|
-
|
|
187
|
-
## 4.0.0
|
|
188
|
-
|
|
189
|
-
### Patch Changes
|
|
190
|
-
|
|
191
|
-
- Updated dependencies
|
|
192
|
-
- peaks-loop-shared@0.0.18
|
|
193
|
-
- peaks-loop-audit-independent@0.0.12
|
|
194
|
-
- peaks-loop-crystallization@0.0.13
|
|
195
|
-
- peaks-loop-doctor@0.0.12
|
|
196
|
-
- peaks-loop-final-review@0.0.12
|
|
197
|
-
|
|
198
|
-
## 4.0.0
|
|
199
|
-
|
|
200
|
-
### Patch Changes
|
|
201
|
-
|
|
202
|
-
- Updated dependencies
|
|
203
|
-
- peaks-loop-shared@0.0.18
|
|
204
|
-
- peaks-loop-audit-independent@0.0.12
|
|
205
|
-
- peaks-loop-crystallization@0.0.13
|
|
206
|
-
- peaks-loop-doctor@0.0.12
|
|
207
|
-
- peaks-loop-final-review@0.0.12
|
|
208
|
-
|
|
209
|
-
## 4.0.0
|
|
210
|
-
|
|
211
|
-
### Patch Changes
|
|
212
|
-
|
|
213
|
-
- Updated dependencies
|
|
214
|
-
- peaks-loop-shared@0.0.18
|
|
215
|
-
- peaks-loop-audit-independent@0.0.12
|
|
216
|
-
- peaks-loop-crystallization@0.0.13
|
|
217
|
-
- peaks-loop-doctor@0.0.12
|
|
218
|
-
- peaks-loop-final-review@0.0.12
|
|
219
|
-
|
|
220
|
-
## 4.0.0
|
|
221
|
-
|
|
222
|
-
### Patch Changes
|
|
223
|
-
|
|
224
|
-
- Updated dependencies
|
|
225
|
-
- peaks-loop-shared@0.0.18
|
|
226
|
-
- peaks-loop-audit-independent@0.0.12
|
|
227
|
-
- peaks-loop-crystallization@0.0.13
|
|
228
|
-
- peaks-loop-doctor@0.0.12
|
|
229
|
-
- peaks-loop-final-review@0.0.12
|
|
230
|
-
|
|
231
|
-
## 4.0.0
|
|
232
|
-
|
|
233
|
-
### Patch Changes
|
|
234
|
-
|
|
235
|
-
- Updated dependencies
|
|
236
|
-
- peaks-loop-shared@0.0.18
|
|
237
|
-
- peaks-loop-audit-independent@0.0.12
|
|
238
|
-
- peaks-loop-crystallization@0.0.13
|
|
239
|
-
- peaks-loop-doctor@0.0.12
|
|
240
|
-
- peaks-loop-final-review@0.0.12
|
|
241
|
-
|
|
242
|
-
## 4.0.0
|
|
243
|
-
|
|
244
|
-
### Patch Changes
|
|
245
|
-
|
|
246
|
-
- Updated dependencies
|
|
247
|
-
- peaks-loop-shared@0.0.18
|
|
248
|
-
- peaks-loop-audit-independent@0.0.12
|
|
249
|
-
- peaks-loop-crystallization@0.0.13
|
|
250
|
-
- peaks-loop-doctor@0.0.12
|
|
251
|
-
- peaks-loop-final-review@0.0.12
|
|
252
|
-
|
|
253
|
-
## 4.0.0
|
|
254
|
-
|
|
255
|
-
### Patch Changes
|
|
256
|
-
|
|
257
|
-
- Updated dependencies
|
|
258
|
-
- peaks-loop-shared@0.0.18
|
|
259
|
-
- peaks-loop-audit-independent@0.0.12
|
|
260
|
-
- peaks-loop-crystallization@0.0.13
|
|
261
|
-
- peaks-loop-doctor@0.0.12
|
|
262
|
-
- peaks-loop-final-review@0.0.12
|
|
263
|
-
|
|
264
|
-
## 4.0.0
|
|
265
|
-
|
|
266
|
-
### Patch Changes
|
|
267
|
-
|
|
268
|
-
- Updated dependencies
|
|
269
|
-
- peaks-loop-shared@0.0.18
|
|
270
|
-
- peaks-loop-audit-independent@0.0.12
|
|
271
|
-
- peaks-loop-crystallization@0.0.13
|
|
272
|
-
- peaks-loop-doctor@0.0.12
|
|
273
|
-
- peaks-loop-final-review@0.0.12
|
|
274
|
-
|
|
275
|
-
## 4.0.0
|
|
276
|
-
|
|
277
|
-
### Patch Changes
|
|
278
|
-
|
|
279
|
-
- Updated dependencies
|
|
280
|
-
- peaks-loop-shared@0.0.18
|
|
281
|
-
- peaks-loop-audit-independent@0.0.12
|
|
282
|
-
- peaks-loop-crystallization@0.0.13
|
|
283
|
-
- peaks-loop-doctor@0.0.12
|
|
284
|
-
- peaks-loop-final-review@0.0.12
|
|
285
|
-
|
|
286
|
-
## 4.0.0
|
|
287
|
-
|
|
288
|
-
### Patch Changes
|
|
289
|
-
|
|
290
|
-
- Updated dependencies
|
|
291
|
-
- peaks-loop-shared@0.0.18
|
|
292
|
-
- peaks-loop-audit-independent@0.0.12
|
|
293
|
-
- peaks-loop-crystallization@0.0.13
|
|
294
|
-
- peaks-loop-doctor@0.0.12
|
|
295
|
-
- peaks-loop-final-review@0.0.12
|
|
296
|
-
|
|
297
|
-
## 4.0.0
|
|
298
|
-
|
|
299
|
-
### Patch Changes
|
|
300
|
-
|
|
301
|
-
- Updated dependencies
|
|
302
|
-
- peaks-loop-shared@0.0.18
|
|
303
|
-
- peaks-loop-audit-independent@0.0.12
|
|
304
|
-
- peaks-loop-crystallization@0.0.13
|
|
305
|
-
- peaks-loop-doctor@0.0.12
|
|
306
|
-
- peaks-loop-final-review@0.0.12
|
|
307
|
-
|
|
308
|
-
## 4.0.0
|
|
309
|
-
|
|
310
|
-
### Patch Changes
|
|
311
|
-
|
|
312
|
-
- Updated dependencies
|
|
313
|
-
- peaks-loop-shared@0.0.18
|
|
314
|
-
- peaks-loop-audit-independent@0.0.12
|
|
315
|
-
- peaks-loop-crystallization@0.0.13
|
|
316
|
-
- peaks-loop-doctor@0.0.12
|
|
317
|
-
- peaks-loop-final-review@0.0.12
|
|
318
|
-
|
|
319
|
-
## 4.0.0
|
|
320
|
-
|
|
321
|
-
### Patch Changes
|
|
322
|
-
|
|
323
|
-
- Updated dependencies
|
|
324
|
-
- peaks-loop-shared@0.0.18
|
|
325
|
-
- peaks-loop-audit-independent@0.0.12
|
|
326
|
-
- peaks-loop-crystallization@0.0.13
|
|
327
|
-
- peaks-loop-doctor@0.0.12
|
|
328
|
-
- peaks-loop-final-review@0.0.12
|
|
329
|
-
|
|
330
|
-
## 4.0.0
|
|
331
|
-
|
|
332
|
-
### Patch Changes
|
|
333
|
-
|
|
334
|
-
- Updated dependencies
|
|
335
|
-
- peaks-loop-shared@0.0.15
|
|
336
|
-
- peaks-loop-audit-independent@0.0.11
|
|
337
|
-
- peaks-loop-crystallization@0.0.12
|
|
338
|
-
- peaks-loop-doctor@0.0.11
|
|
339
|
-
- peaks-loop-final-review@0.0.11
|
|
340
|
-
|
|
341
|
-
## 4.0.0
|
|
342
|
-
|
|
343
|
-
### Patch Changes
|
|
344
|
-
|
|
345
|
-
- Updated dependencies
|
|
346
|
-
- peaks-loop-shared@0.0.15
|
|
347
|
-
- peaks-loop-audit-independent@0.0.11
|
|
348
|
-
- peaks-loop-crystallization@0.0.12
|
|
349
|
-
- peaks-loop-doctor@0.0.11
|
|
350
|
-
- peaks-loop-final-review@0.0.11
|
|
351
|
-
|
|
352
|
-
## 4.0.0
|
|
353
|
-
|
|
354
|
-
### Patch Changes
|
|
355
|
-
|
|
356
|
-
- Updated dependencies
|
|
357
|
-
- peaks-loop-shared@0.0.15
|
|
358
|
-
- peaks-loop-audit-independent@0.0.11
|
|
359
|
-
- peaks-loop-crystallization@0.0.12
|
|
360
|
-
- peaks-loop-doctor@0.0.11
|
|
361
|
-
- peaks-loop-final-review@0.0.11
|
|
362
|
-
|
|
363
111
|
## 4.0.0-beta.21 — 2026-07-22 (ice-cola surface-check fixes, republish)
|
|
364
112
|
|
|
365
113
|
This release is the **republish** after the accidental 4.0.2
|
|
@@ -462,68 +210,6 @@ statusline` (no subcommand) was documented as "Run with no
|
|
|
462
210
|
`peaks-loop-crystallization` declares `zod` as a runtime
|
|
463
211
|
dependency (a separate source bug, out of scope for this repair).
|
|
464
212
|
|
|
465
|
-
## 4.0.0
|
|
466
|
-
|
|
467
|
-
### Patch Changes
|
|
468
|
-
|
|
469
|
-
- Updated dependencies
|
|
470
|
-
- peaks-loop-shared@0.0.5
|
|
471
|
-
- peaks-loop-audit-independent@0.0.5
|
|
472
|
-
- peaks-loop-crystallization@0.0.5
|
|
473
|
-
- peaks-loop-doctor@0.0.5
|
|
474
|
-
- peaks-loop-final-review@0.0.5
|
|
475
|
-
|
|
476
|
-
## 4.0.0
|
|
477
|
-
|
|
478
|
-
### Patch Changes
|
|
479
|
-
|
|
480
|
-
- Updated dependencies
|
|
481
|
-
- peaks-loop-shared@0.0.5
|
|
482
|
-
- peaks-loop-audit-independent@0.0.5
|
|
483
|
-
- peaks-loop-crystallization@0.0.5
|
|
484
|
-
- peaks-loop-doctor@0.0.5
|
|
485
|
-
- peaks-loop-final-review@0.0.5
|
|
486
|
-
|
|
487
|
-
## 4.0.0
|
|
488
|
-
|
|
489
|
-
### Minor Changes
|
|
490
|
-
|
|
491
|
-
- 5d01343: Monorepo extraction: peaks-loop 4.0.0-beta.15 ships the new pnpm
|
|
492
|
-
workspace shell with 6 independent packages extracted from the main
|
|
493
|
-
repo as Tier-A zero/low-coupling domains:
|
|
494
|
-
|
|
495
|
-
- peaks-loop-shared (4 utils: fs / paths / result / version)
|
|
496
|
-
- peaks-loop-mut (mutation testing + ECC cache)
|
|
497
|
-
- peaks-loop-doctor (project health check)
|
|
498
|
-
- peaks-loop-crystallization (crystallization pipeline)
|
|
499
|
-
- peaks-loop-final-review (4-dim business review)
|
|
500
|
-
- peaks-loop-audit-independent (security + perf audit)
|
|
501
|
-
|
|
502
|
-
Each subpackage has its own typecheck / build / vitest pipeline; they
|
|
503
|
-
are wired back into the main peaks-loop CLI via workspace:_ protocol.
|
|
504
|
-
Trusted Publishing (OIDC) is wired via .github/workflows/publish.yml
|
|
505
|
-
on push tags v_._._ — no NPM_TOKEN required.
|
|
506
|
-
|
|
507
|
-
Also:
|
|
508
|
-
|
|
509
|
-
- D21: peaks sub-agent finalize command (LLM-side completion signal
|
|
510
|
-
to mark dispatch records done/failed/cancelled; without it records
|
|
511
|
-
would stay queued forever).
|
|
512
|
-
- Trusted Publishing via OIDC — npmjs.com trusted publisher
|
|
513
|
-
configured; npm token removed from ~/.npmrc.
|
|
514
|
-
|
|
515
|
-
### Patch Changes
|
|
516
|
-
|
|
517
|
-
- Updated dependencies [5d01343]
|
|
518
|
-
- peaks-loop-shared@0.1.0
|
|
519
|
-
- peaks-loop-mut@0.1.0
|
|
520
|
-
- peaks-loop-doctor@0.1.0
|
|
521
|
-
- peaks-loop-crystallization@0.1.0
|
|
522
|
-
- peaks-loop-final-review@0.1.0
|
|
523
|
-
- peaks-loop-audit-independent@0.1.0
|
|
524
|
-
|
|
525
|
-
## [Unreleased]
|
|
526
|
-
|
|
527
213
|
## 4.0.0-beta.14 — 2026-07-16
|
|
528
214
|
|
|
529
215
|
### Status: RELEASED (D-019: copy-templates.mjs + package.json files[])
|
|
@@ -1245,102 +931,6 @@ The v2.19.0 work shipped as code commits (`f91d71c`, `5186d3d`, `b598612`, `ced8
|
|
|
1245
931
|
- Existing RD/QA artifacts in `.peaks/_runtime/<sid>/<role>/` remain readable; the planner no longer requires a change-id, and the change-id (if any) is embedded only as a filename slug.
|
|
1246
932
|
- The 2.8.3 hard-ban on `.peaks/_runtime/<YYYY-MM-DD-*>/` sibling directories is still enforced via the rewritten guard test and the inline `lstatSync` in `initWorkspace`.
|
|
1247
933
|
|
|
1248
|
-
## [3.0.2] — 2026-07-02 — change-id shim retirement (v2.19.0) + Understand Anything hybrid context (3.0.2)
|
|
1249
|
-
|
|
1250
|
-
**PATCH bump from 3.0.1**. Two independent slices bundled into one release:
|
|
1251
|
-
|
|
1252
|
-
- **v2.19.0 change-id shim retirement** — full removal of the peaks-loop change-id axis (filesystem axis, code shim, envelope JSON slug, CLI flags). The change-id was a no-op post-v2.17.0 hard-kill; this slice retires the v2.17.0 shim half-life. OpenSpec's independent `openspec/changes/<change-id>/` vocabulary (L4) is preserved untouched.
|
|
1253
|
-
- **3.0.2 Understand Anything hybrid context** — new `peaks understand context` subcommand that encapsulates the UA-first / codegraph-fallback / hybrid-union routing decision in the service layer (per the peaks-loop "skill-first / CLI-auxiliary" architecture). Consumers no longer pick one or the other at the LLM level.
|
|
1254
|
-
|
|
1255
|
-
The v2.19.0 work shipped as code commits (`f91d71c`, `5186d3d`, `b598612`, `ced835e`, `7ee9d8f`, plus follow-up tests) but was never formally released. v2.19.0 is therefore _not_ a separate release line — its changes are rolled forward into 3.0.2. Future releases resume numeric sequence from 3.0.3.
|
|
1256
|
-
|
|
1257
|
-
### Added — `peaks understand context` (3.0.2 user-facing feature)
|
|
1258
|
-
|
|
1259
|
-
The Understand Anything (UA) Claude Code plugin and `@colbymchenry/codegraph` are both complementary project-analysis tools. UA provides a high-level knowledge graph (tours, layers, expert prompts); codegraph provides low-level affected-file analysis. Until 3.0.2, peaks-loop consumers had to choose one or the other at the LLM level — there was no service-layer enforcement of either.
|
|
1260
|
-
|
|
1261
|
-
This slice adds a single `peaks understand context` subcommand that encapsulates the routing decision in the service layer (per the peaks-loop "skill-first / CLI-auxiliary" architecture — see `peaks-code` SKILL.md). The envelope carries a `source` tag so downstream consumers can audit which evidence contributed to the context.
|
|
1262
|
-
|
|
1263
|
-
**Source routing** (deterministic, decided in `buildUnderstandContext`):
|
|
1264
|
-
|
|
1265
|
-
- `ua-only` — UA knowledge graph present, no codegraph
|
|
1266
|
-
- `ua-missing-fallback-codegraph` — UA absent, codegraph produced evidence
|
|
1267
|
-
- `ua-and-codegraph-hybrid` — both present, both contribute (parallel `Promise.all`)
|
|
1268
|
-
- `both-missing` — neither produced evidence, exit code 2
|
|
1269
|
-
|
|
1270
|
-
**Added files (5):**
|
|
1271
|
-
|
|
1272
|
-
- `src/services/understand/understand-hybrid-service.ts` (133L, new): `buildUnderstandContext({projectRoot, files?, sampleSize?, artifactDir?, codegraphRunner?})` uses `Promise.all` to run UA scan and codegraph affected in parallel; total wall-clock = `max(uaMs, codegraphMs)`, not sum. Failures are caught into `warnings[]` (best-effort); the main envelope is always returned so consumers can audit missing evidence.
|
|
1273
|
-
- `src/services/understand/hybrid-types.ts` (39L, new): `UnderstandContextResult` envelope + 4-value source enum + `CodegraphContextBlock`.
|
|
1274
|
-
- `src/cli/commands/understand-commands.ts` (208L, +51L net): new `peaks understand context` subcommand at base path `admin/audit-logs` (the only 3rd CLI surface in the understand module family). The subcommand accepts `--project --files --sample --artifact-dir` and emits the envelope as JSON or human-readable summary.
|
|
1275
|
-
- `tests/unit/understand-hybrid-service.test.ts` (110L, 4 cases): `ua-only` / `fallback` / `hybrid` / `both-missing`.
|
|
1276
|
-
- `tests/integration/understand-hybrid-cli.test.ts` (85L, 3 cases): end-to-end CLI both-missing / ua-only / envelope-shape-stability.
|
|
1277
|
-
|
|
1278
|
-
**Test evidence:** 7/7 vitest (4 unit + 3 integration), `tsc --noEmit` clean.
|
|
1279
|
-
|
|
1280
|
-
The peak-loop skill-external-invocation audit pattern (capability discovery + references only + do-not-execute + Peaks authoritative) is preserved: codegraph is consumed via the existing `executeCodegraphInvocation` (no upstream installer calls); UA installation is a text `INSTALL_HINT` only.
|
|
1281
|
-
|
|
1282
|
-
### Removed — change-id shim (cleanup post v2.17.0 hard-kill, rolled up from v2.19.0)
|
|
1283
|
-
|
|
1284
|
-
**PATCH bump from 2.18.3**. Resolves the user-reported "新项目第一次使用 peaks-code 时初始化完不按流程走、开发效果差、再开 session 后才正常" defect. Two surgical fixes to the first-run Code gates (3 source files, 1 new test file, 2 test-regression updates; no schema change, no new dependencies, no public API change).
|
|
1285
|
-
|
|
1286
|
-
### Bugfix — `step-0.55-1x-upgrade` always pauses, even in `full-auto` (P0)
|
|
1287
|
-
|
|
1288
|
-
The 1.x → 2.0 upgrade is an irreversible external side effect (rewrites `~/.peaks/config.json` + the on-disk cache schema). Pre-fix, `peaks code should-pause --step step-0.55-1x-upgrade --mode full-auto` returned `shouldPause: false` because the step was declared in `GATED_STEPS` but missing from the `HARD_PAUSE_STEPS` `Set` that already covered `step-0.5-openspec-opt-in` and `step-0.7-resume-detection`. In `full-auto` mode, the `shouldAutoProceed` branch silently auto-proceeded the upgrade without user consent. The result: 1.x → 2.0 downgrade (or stale 1.x standards/config residue) on the very first Code run of a fresh project. Post-fix, the step pauses with `gateKind: 'mode-selection-itself'` and the LLM-side caller presents an `AskUserQuestion` to the user.
|
|
1289
|
-
|
|
1290
|
-
- **Modified (2):** `src/services/code/mode-gate.ts` (added 1 entry to `HARD_PAUSE_STEPS`), `src/services/code/user-touchpoint-classifier.ts` (reclassified the row from `tech/business-only` with `fullAutoCanProceed: true` to `commit-floor/always` with `fullAutoCanProceed: false`).
|
|
1291
|
-
- **User-observed symptom (now fixed):** "首次启动后开发效果差" — caused by 1.x standards/config residue silently surviving `full-auto` and contaminating subsequent RD/QA artifact contracts.
|
|
1292
|
-
|
|
1293
|
-
### Bugfix — `--mode` is optional on `peaks code should-pause` (P1, Step 1 chicken-and-egg)
|
|
1294
|
-
|
|
1295
|
-
`peaks code should-pause --step step-1-mode-select` (no `--mode` flag) failed pre-fix with `error: required option --mode <mode> not specified`. Step 1's SEMANTIC is "ask the user what mode to use" — requiring `--mode` to ask mode is a chicken-and-egg. Post-fix, `--mode` is `.option()` (not `.requiredOption()`); the action handler resolves `const mode = opts.mode ?? 'full-auto'` once at the top. All 5 downstream `opts.mode` references inside the same action body now use the local `mode` const. Existing `--mode <x>` callers are unaffected (backward-compatible). The service-layer `shouldPauseAtGate` still requires a resolved mode — defaulting is at the CLI boundary, which is the correct layer for ergonomics.
|
|
1296
|
-
|
|
1297
|
-
- **Modified (1):** `src/cli/commands/code-commands.ts` (option() + `mode` const + 5 reference rewrites inside the same action handler).
|
|
1298
|
-
- **User-observed symptom (now fixed):** "再开 session 后才正常" — the first session's failed Step 1 caused the LLM-side caller to fall back to a sticky default mode; the second session's retry landed in the "right" mode by accident.
|
|
1299
|
-
|
|
1300
|
-
### Test surface
|
|
1301
|
-
|
|
1302
|
-
- **Created (1):** `tests/unit/services/code/first-run-step-gates.test.ts` — 20 vitest cases (4 modes × `step-0.55-1x-upgrade` pause guard; default-mode vs explicit-mode Step 1; AC-3 backward-compat byte-equality; 8 regression guards on the other 2 hard-pause steps; cross-check that non-hard-pause steps still auto-proceed).
|
|
1303
|
-
- **Modified (2, regression-data extension):** `tests/unit/services/code/mode-gate.test.ts` (added `step-0.55-1x-upgrade` to the local `HARD_PAUSE_STEP_SET` test fixture), `tests/unit/services/code/stale-presence-detection.test.ts` (added the new step to the case-#5 non-Step-1 filter — these existing tests encoded the BUG behavior, so leaving them stale would have caused a false-positive green).
|
|
1304
|
-
- **Updated (1):** `package.json` + `src/shared/version.ts` (2.18.3 → 2.18.4).
|
|
1305
|
-
|
|
1306
|
-
### Why this is the simplest fix
|
|
1307
|
-
|
|
1308
|
-
- 1-line addition to `HARD_PAUSE_STEPS` + 5-line row replacement in the classifier + 5-line command-arg change with 5 mechanical reference rewrites = 3 source edits. No new abstractions, no new env vars, no new schemas, no CLI surface change beyond the `--mode` defaulting.
|
|
1309
|
-
- 800-line file cap respected: largest modified file is `code-commands.ts` (well below the 800 cap).
|
|
1310
|
-
- Karpathy #3 surgical: 6 files touched, all justified (3 source + 1 new test + 2 test-regression updates because the existing tests encoded the BUG behavior).
|
|
1311
|
-
|
|
1312
|
-
### Verification (QA cycle 1, verdict pass)
|
|
1313
|
-
|
|
1314
|
-
- AC-1: `peaks code should-pause --step step-0.55-1x-upgrade --mode full-auto` → `ok: true, shouldPause: true, gateKind: "mode-selection-itself"` ✅
|
|
1315
|
-
- AC-2: `peaks code should-pause --step step-1-mode-select` (no `--mode`) → `ok: true, shouldPause: true` (no "required option" error) ✅
|
|
1316
|
-
- AC-3: `peaks code should-pause --step step-1-mode-select --mode full-auto` → byte-identical to AC-2 ✅
|
|
1317
|
-
- Cross-mode 4×2 matrix (full-auto / assisted / strict / swarm × step-0.55 / step-1): 8/8 pause ✅
|
|
1318
|
-
- `peaks-code` first-run sequence (skill presence:check-stale + upgrade --detect-1x + 4 should-pause steps): 6/6 clean ✅
|
|
1319
|
-
- vitest 527/527 passed (27 files, 0 failed, 22.61s wallclock)
|
|
1320
|
-
- 5-way fanout audit: code-reviewer PASS / karpathy-reviewer PASS (4 guidelines) / security-reviewer PASS / perf-baseline-reviewer PASS / qa-test-cases-writer PASS (21 TCs)
|
|
1321
|
-
- QA verdict: `pass` (`verdict-2026-06-29-fix-first-run-step-gates.md`)
|
|
1322
|
-
|
|
1323
|
-
### Files
|
|
1324
|
-
|
|
1325
|
-
- 3 source modifications
|
|
1326
|
-
- 1 new test file
|
|
1327
|
-
- 2 test-regression updates
|
|
1328
|
-
- 1 version bump (this release)
|
|
1329
|
-
|
|
1330
|
-
### Dispatch / artifacts
|
|
1331
|
-
|
|
1332
|
-
- Request id: `2026-06-29-fix-first-run-step-gates`
|
|
1333
|
-
- RD artifact: `.peaks/_runtime/2026-06-29-session-9cac8e/rd/requests/001-2026-06-29-fix-first-run-step-gates.md`
|
|
1334
|
-
- Bug analysis: `.peaks/_runtime/2026-06-29-session-9cac8e/rd/bug-analysis.md`
|
|
1335
|
-
- Code review: `.peaks/_runtime/2026-06-29-session-9cac8e/rd/code-review.md`
|
|
1336
|
-
- Karpathy review: `.peaks/_runtime/2026-06-29-session-9cac8e/rd/karpathy-review.md`
|
|
1337
|
-
- Security audit: `.peaks/_runtime/2026-06-29-session-9cac8e/audit/security.md`
|
|
1338
|
-
- Perf audit: `.peaks/_runtime/2026-06-29-session-9cac8e/audit/perf.md`
|
|
1339
|
-
- QA test plan: `.peaks/_runtime/2026-06-29-session-9cac8e/qa/test-cases/2026-06-29-fix-first-run-step-gates.md`
|
|
1340
|
-
- QA verdict: `.peaks/_runtime/2026-06-29-session-9cac8e/qa/verdict-2026-06-29-fix-first-run-step-gates.md`
|
|
1341
|
-
|
|
1342
|
-
---
|
|
1343
|
-
|
|
1344
934
|
## [2.18.2] — 2026-06-29 — `peaks doctor --rebuild-binding` + `peaks binding status` CLI (2 follow-up enhancements)
|
|
1345
935
|
|
|
1346
936
|
> **⚠️ Non-strict-SemVer.** This PATCH bump (2.18.1 → 2.18.2) lands 2 user-facing CLI additions under a PATCH version per the user convention: `peaks doctor --rebuild-binding` (new flag) and `peaks binding status` (new command). Strict SemVer would have called for a MINOR bump. The convention is documented in `CLAUDE.md` and matches the v2.18.1 PATCH precedent.
|
package/README-en.md
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
[](https://github.com/SquabbyZ/peaks-loop/actions/workflows/publish.yml)
|
|
9
9
|
[](https://github.com/SquabbyZ/peaks-loop/actions/workflows/ci.yml)
|
|
10
10
|
[](./LICENSE)
|
|
11
|
-
[
|
|
12
|
-
[](https://www.npmjs.com/package/peaks-loop)
|
|
12
|
+
[](#status)
|
|
13
13
|
[](https://github.com/SquabbyZ/peaks-loop/stargazers)
|
|
14
14
|
|
|
15
15
|
**English** · [简体中文](./README.md)
|
|
@@ -17,29 +17,14 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
19
|
<p align="center">
|
|
20
|
-
<img
|
|
21
|
-
src="https://raw.githubusercontent.com/SquabbyZ/peaks-loop/main/examples/video-demo/preview/peaks-loop-demo-en.gif"
|
|
22
|
-
alt="peaks-loop 30-second demo (first 18s · install + slash command + 5 domains + sediment into bee)"
|
|
23
|
-
width="92%"
|
|
24
|
-
style="border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.55); display: block;"
|
|
25
|
-
/>
|
|
26
|
-
<br>
|
|
27
|
-
<sub>👆 18s looping GIF (full 30s mp4 is no longer shipped with the npm package — see <a href="https://github.com/SquabbyZ/peaks-loop/releases">GitHub Releases</a> · 13MB · 480p)</sub>
|
|
28
|
-
</p>
|
|
29
|
-
|
|
30
|
-
<p align="center">
|
|
31
|
-
<img
|
|
32
|
-
src="./assets/readme/releases-banner.svg"
|
|
33
|
-
alt="peaks-loop 4.0.0 GA release banner — first stable cutover from 4.0.0-beta.36"
|
|
34
|
-
width="92%"
|
|
35
|
-
/>
|
|
20
|
+
<img src="./assets/readme/hero.svg" alt="peaks-loop 4.0.3 — Loop Engineering, Engineered" width="92%"/>
|
|
36
21
|
</p>
|
|
37
22
|
|
|
38
23
|
---
|
|
39
24
|
|
|
40
25
|
## What it is
|
|
41
26
|
|
|
42
|
-
peaks-loop is a **Loop Engineering crystallization system**, not a workflow tool — what sediments from the runs you do is **not** a procedure, it's a set of **Loop Engineering** method assets that are karpathy-engineered at the rule level and darwin-verified at the change level.
|
|
27
|
+
peaks-loop is a **Loop Engineering crystallization system**, not a workflow tool — what sediments from the runs you do is **not** a procedure, it's a set of **Loop Engineering** method assets that are karpathy-engineered at the rule level and darwin-verified at the change level.
|
|
43
28
|
|
|
44
29
|
| Asset layer | Role | One-liner |
|
|
45
30
|
| --- | --- | --- |
|
|
@@ -52,6 +37,10 @@ peaks-loop is a **Loop Engineering crystallization system**, not a workflow tool
|
|
|
52
37
|
- `/peaks-code` is the **code-domain** long-task Loop Engineering orchestrator, not a general orchestrator; non-code lanes (`peaks-content` / `peaks-doctor` / `peaks-issue-fix-orchestrator` / `peaks-sop`) ship as independent `peaks-*` bees, **not** as subclasses of `peaks-code`.
|
|
53
38
|
- Twice-clean runs sediment into your local tactic pool (bee); broken runs come back for you to redefine. Your few bees grow with your taste.
|
|
54
39
|
|
|
40
|
+
<p align="center">
|
|
41
|
+
<img src="./assets/readme/architecture.svg" alt="peaks-loop four asset layers, seven gates, one engineering spine" width="92%"/>
|
|
42
|
+
</p>
|
|
43
|
+
|
|
55
44
|
---
|
|
56
45
|
|
|
57
46
|
## Up and running in 30 seconds
|
|
@@ -89,6 +78,10 @@ No CLI to memorize. No manifest to hand-author. No second terminal to open. **Se
|
|
|
89
78
|
|
|
90
79
|
Code, content, project health, issue sweeps, custom workflows — **4.x ships five first-class domains**, each with its own orchestrator. Same discipline on every lane: "gate fails = stop, run the next gate".
|
|
91
80
|
|
|
81
|
+
<p align="center">
|
|
82
|
+
<img src="./assets/readme/command-palette.svg" alt="peaks-loop 13 slash commands — command palette" width="92%"/>
|
|
83
|
+
</p>
|
|
84
|
+
|
|
92
85
|
| Domain | Send this slash command | It will… |
|
|
93
86
|
| --- | --- | --- |
|
|
94
87
|
| 💻 **Code (code-domain) only** | `/peaks-code build this feature` | PRD → RD → code → QA → UI → slice, ready for your sign-off |
|
|
@@ -100,6 +93,11 @@ Code, content, project health, issue sweeps, custom workflows — **4.x ships fi
|
|
|
100
93
|
| 🔁 **Replay** | `/peaks-solo run it like last time` | pull up your sedimented tactic, replay it |
|
|
101
94
|
| 🆕 **Onboard** | `/peaks-code this is a new repo, walk me through it` | map structure, flag risks, hand you a learning order |
|
|
102
95
|
| 🧠 **Sediment** | `/peaks-solo I'll do this again — save it` | ground it locally as a reusable tactic |
|
|
96
|
+
| 🧪 **Open the audit gate** | `/peaks-audit` | 6-dim audit, mandatory entry before RD / QA |
|
|
97
|
+
| ✅ **4-dim sign-off** | `/peaks-final-review` | functional / problem / no-new-bugs / no-regression |
|
|
98
|
+
| 🔌 **IDE adapter** | `/peaks-ide` | hooks + statusline + handle |
|
|
99
|
+
| ⏯ **Resume from a checkpoint** | `/peaks-resume` | scan the deepest finished gate, AskUserQuestion |
|
|
100
|
+
| 🔬 **Slice decomposition** | `/peaks-slice-decompose` | multi-pass + cross-pass edges + arbitration |
|
|
103
101
|
|
|
104
102
|
Every lane opens with **one slash command**.
|
|
105
103
|
|
|
@@ -108,7 +106,7 @@ Every lane opens with **one slash command**.
|
|
|
108
106
|
## Why people pick it
|
|
109
107
|
|
|
110
108
|
- **Natural language is the interface.** No CLI to learn, no commands to memorize. **Use an explicit slash command (e.g. `/peaks-code xxx`)** to route to the right orchestrator; everything after the slash is plain language. The LLM runs the commands on your behalf.
|
|
111
|
-
- **Gates that actually block, not decorate.**
|
|
109
|
+
- **Gates that actually block, not decorate.** 285+ test cases across 4 packages, all green by default; QA gate, review sign-off — all on. **Audit fails = stop. QA fails = stop.**
|
|
112
110
|
- **Run-once flows become local tactics (bees).** Sedimented loop engineering lands in your local `~/.peaks/` pool — twice-clean runs auto-promote to standing tactics, broken runs come back for you to redefine. **Next time, just say "run that one" and the whole playbook slots back in.** Your few tactics grow with your taste.
|
|
113
111
|
- **Sits on top of what you already run.** Not a new AI CLI to learn — it rides on **Claude Code** and **Z Code**. No shell grab, no prompt grab, no IDE grab. Other tools: adapters in progress, contributions welcome.
|
|
114
112
|
- **You decide, it executes.** Decisions that touch your assets are yours; everything else it runs on its own. **Zero learning cost. One minute to first task.**
|
|
@@ -124,23 +122,42 @@ Every lane opens with **one slash command**.
|
|
|
124
122
|
| Security scan | ✅ on | secrets, SSRF, injection, dangerous IO |
|
|
125
123
|
| QA review | ✅ on | task-level gate — fails loud, stops clean |
|
|
126
124
|
| Review sign-off | ✅ on | nothing ships without eyes on it |
|
|
125
|
+
| Anti-drift evaluation (Evolution Evaluation) | ✅ on | every improvement needs an independent scorer + a regression skeptic, otherwise revert |
|
|
127
126
|
|
|
128
127
|
**All gates on by default. You only speak to turn one off.**
|
|
129
128
|
|
|
130
129
|
---
|
|
131
130
|
|
|
132
|
-
## Status · shipping 4.
|
|
131
|
+
## Status · shipping 4.0.3 GA
|
|
132
|
+
|
|
133
|
+
<p align="center">
|
|
134
|
+
<img src="./assets/readme/pulse.svg" alt="peaks-loop live metrics — 4 tiles + sparkline + pipeline progress" width="92%"/>
|
|
135
|
+
</p>
|
|
136
|
+
|
|
137
|
+
<p align="center">
|
|
138
|
+
<img src="./assets/readme/trace-stream.svg" alt="peaks-loop live diff & log stream — code diff + scrolling log + 7-gate chain" width="92%"/>
|
|
139
|
+
</p>
|
|
133
140
|
|
|
134
141
|
| | |
|
|
135
142
|
| --- | --- |
|
|
136
|
-
| **Latest** | [
|
|
137
|
-
| **Domains** | Code (`peaks-code`) · Content (`peaks-content`) · Project health (`peaks-doctor`) · Issue sweep (`peaks-issue-fix-orchestrator`) · Custom SOP (`peaks-sop`) · Cross-domain primitives (`peaks-solo` dispatcher · `peaks-resume` · `peaks-status` · `peaks-test`) |
|
|
143
|
+
| **Latest** | [](https://www.npmjs.com/package/peaks-loop) — GA (2026-07-30) |
|
|
144
|
+
| **Domains** | Code (`peaks-code`) · Content (`peaks-content`) · Project health (`peaks-doctor`) · Issue sweep (`peaks-issue-fix-orchestrator`) · Custom SOP (`peaks-sop`) · Cross-domain primitives (`peaks-solo` dispatcher · `peaks-resume` · `peaks-status` · `peaks-test` · `peaks-slice-decompose`) |
|
|
138
145
|
| **Sediment pool** | `~/.peaks/` local pool · twice-clean runs auto-promote to a bee · broken runs come back for you to redefine · the bee grows with your taste |
|
|
139
|
-
| **Test suite** |
|
|
146
|
+
| **Test suite** | 285+ cases · 4 packages (peaks-loop / peaks-loop-mut / peaks-loop-shared-channel / peaks-loop-shared) · ~80s full run |
|
|
140
147
|
| **IDE adapters** | ✅ Claude Code · ✅ Z Code · 🚧 Codex / Cursor / Trae / Tongyi Lingma / Hermes / OpenClaw / Qoder (adapters in progress — contributions welcome) |
|
|
141
148
|
| **Runtime** | Node ≥ 20 |
|
|
142
149
|
| **License** | MIT |
|
|
143
150
|
|
|
151
|
+
### What 4.0.3 GA actually shipped (2026-07-30)
|
|
152
|
+
|
|
153
|
+
| Epic | Solved | Verified by |
|
|
154
|
+
| --- | --- | --- |
|
|
155
|
+
| **Test suite rebuilt from scratch** | Old 559-file unit suite took 3+ hours; the 11-file / 161-case rebuild runs in ~80s, and combined with sub-package tests and later slices the workspace-wide total is 285+ cases across 4 packages. Deleted old assertions, wrote against the production contract, 4-dim split (render/behavior/integration/a11y). | commits `f17aa377` → `1d6233bc` · `.peaks/memory/2026-07-30-test-rebuild-epic-sediment.md` |
|
|
156
|
+
| **Karpathy evaluation cost self-review** | LLM no longer "done for today, will continue tomorrow" after 1–2 slices — `karpathy-reviewer` reports `costRatio`; `peaks job karpathy-cost-check` auto-downgrades `block` → `warn` above 10. 24h-mode stays the override. | `peaks job karpathy-cost-check --review-file <path>` · 21-case unit test |
|
|
157
|
+
| **Compact visibility** | `peaks compact history` for the LLM to read every compact event of the current session; `peaks statusline compact` for the IDE statusline (`--` / `compact pending (0.85)` / `REDLINE 0.95` / `just compacted (0.92→?)`). | `auto-compact-orchestrator` appends to `compact-history.jsonl` · 19-case unit test |
|
|
158
|
+
| **Sub-package coverage + workspace-wide `pnpm test:full`** | Independent 4-dim tests for `peaks-loop-mut` / `peaks-loop-shared-channel`; `peaks-loop-shared` 0 file (`passWithNoTests`); redundant root mirror removed. | commits `593ffcdf` → `08e92d8f` · `pnpm test:full` runs all 4 packages in one go |
|
|
159
|
+
| **CLI surface collapsed (73 → 5 super-commands)** | Five super-commands (`peaks code / audit / doctor / openspec / release / release-pack`) replace 73 leaf commands, byte-identical contract preserved, opaque to downstream callers. | rid-009 · 26 routing tests |
|
|
160
|
+
|
|
144
161
|
---
|
|
145
162
|
|
|
146
163
|
## Strongly recommended · compose these four
|
|
@@ -148,17 +165,7 @@ Every lane opens with **one slash command**.
|
|
|
148
165
|
> **Zero learning cost.** That's the biggest reason to use them together — not just that the effect is excellent, but that **all four projects speak the same interface: natural language + a choice.** You say one sentence; the LLM runs the commands, applies the gates, and follows the playbook.
|
|
149
166
|
|
|
150
167
|
<p align="center">
|
|
151
|
-
<
|
|
152
|
-
<img src="https://img.shields.io/badge/ECC-affaan--m-6366f1?style=for-the-badge&logo=github&logoColor=white" alt="affaan-m/ECC" />
|
|
153
|
-
</a>
|
|
154
|
-
|
|
155
|
-
<a href="https://github.com/Egonex-AI/Understand-Anything">
|
|
156
|
-
<img src="https://img.shields.io/badge/Understand--Anything-Egonex--AI-22c55e?style=for-the-badge&logo=github&logoColor=white" alt="Egonex-AI/Understand-Anything" />
|
|
157
|
-
</a>
|
|
158
|
-
|
|
159
|
-
<a href="https://github.com/obra/superpowers">
|
|
160
|
-
<img src="https://img.shields.io/badge/superpowers-obra-f59e0b?style=for-the-badge&logo=github&logoColor=white" alt="obra/superpowers" />
|
|
161
|
-
</a>
|
|
168
|
+
<img src="./assets/readme/footer.svg" alt="peaks-loop recommended stack" width="92%"/>
|
|
162
169
|
</p>
|
|
163
170
|
|
|
164
171
|
| Role | Project | One-liner |
|
|
@@ -214,16 +221,27 @@ It changes, but **the gates hold**. Audit fails = nothing ships. QA fails = noth
|
|
|
214
221
|
|
|
215
222
|
**The biggest shift: from "code-only tool" to multi-domain orchestration system.** 4.x no longer just writes code — it ships four new domain orchestrators: `peaks-content` (content production), `peaks-doctor` (project health), `peaks-issue-fix-orchestrator` (batch issue fix), `peaks-sop` (custom SOPs). On top of that, `peaks-solo` auto-routes to the right domain from plain language. Plus 9 IDE adapters, crystallization-system renaming, post-run crystallization. Full list → [`CHANGELOG.md`](./CHANGELOG.md).
|
|
216
223
|
|
|
217
|
-
|
|
224
|
+
</details>
|
|
218
225
|
|
|
219
|
-
|
|
220
|
-
| --- | --- | --- |
|
|
221
|
-
| **Test suite rebuilt from scratch** | Old 559-file unit suite took 3+ hours; now 219 cases across 4 packages all green, `pnpm test:full` in ~67s. Deleted old assertions, wrote against the production contract, 4-dim split (render/behavior/integration/a11y). | commits `f17aa377` → `1d6233bc` · `.peaks/memory/2026-07-30-test-rebuild-epic-sediment.md` |
|
|
222
|
-
| **Karpathy evaluation cost self-review** | LLM no longer "done for today, will continue tomorrow" after 1–2 slices — `karpathy-reviewer` reports `costRatio`; `peaks job karpathy-cost-check` auto-downgrades `block` → `warn` above 10. 24h-mode stays the override. | `peaks job karpathy-cost-check --review-file <path>` · 21-case unit test |
|
|
223
|
-
| **Compact visibility** | `peaks compact history` for the LLM to read every compact event of the current session; `peaks statusline compact` for the IDE statusline ( `--` / `compact pending (0.85)` / `REDLINE 0.95` / `just compacted (0.92→?)` ). | `auto-compact-orchestrator` appends to `compact-history.jsonl` · 19-case unit test |
|
|
224
|
-
| **Sub-package coverage + workspace-wide `pnpm test:full`** | Independent 4-dim tests for `peaks-loop-mut` / `peaks-loop-shared-channel`; `peaks-loop-shared` 0 file (passWithNoTests); redundant root mirror removed. | commits `593ffcdf` → `08e92d8f` · `pnpm test:full` runs all 4 packages in one go |
|
|
226
|
+
---
|
|
225
227
|
|
|
226
|
-
|
|
228
|
+
## Full skill index
|
|
229
|
+
|
|
230
|
+
13 user skills · every entry point lives in `skills/<name>/SKILL.md`:
|
|
231
|
+
|
|
232
|
+
<p align="center">
|
|
233
|
+
<img src="./assets/readme/skill-index.svg" alt="peaks-loop 13 user skills — full index with category badges" width="92%"/>
|
|
234
|
+
</p>
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Ship summary (4.x · 19 rids)
|
|
239
|
+
|
|
240
|
+
`009 · 010 · 011 · 014 · 015 · 016 · 017 · 020b · 024 · 025 · 026 · 027 · 028 · 029 · 030 · 031 · 032 · 033 · 034` — CLI surface collapse (73 → 5 byte-identical), Trusted Publishing + OIDC, 24h-mode, context spillover, DAG wave + barrier, dashboard aggregation, test-rebuild epic, karpathy-cost self-review, compact visibility, retire-auto-compact-hook, and more.
|
|
241
|
+
|
|
242
|
+
<p align="center">
|
|
243
|
+
<img src="./assets/readme/ship-summary.svg" alt="peaks-loop 4.x 19-rid ship timeline with category chips" width="92%"/>
|
|
244
|
+
</p>
|
|
227
245
|
|
|
228
246
|
---
|
|
229
247
|
|
|
@@ -234,8 +252,8 @@ It changes, but **the gates hold**. Audit fails = nothing ships. QA fails = noth
|
|
|
234
252
|
- Questions → [GitHub Issues](https://github.com/SquabbyZ/peaks-loop/issues)
|
|
235
253
|
- Tribute: [multica-ai/andrej-karpathy-skills](https://github.com/multica-ai/andrej-karpathy-skills) · [alchaincyf/darwin-skill](https://github.com/alchaincyf/darwin-skill)
|
|
236
254
|
- Recommended combo: [affaan-m/ECC](https://github.com/affaan-m/ECC) · [Egonex-AI/Understand-Anything](https://github.com/Egonex-AI/Understand-Anything) · [obra/superpowers](https://github.com/obra/superpowers)
|
|
237
|
-
|
|
238
|
-
|
|
255
|
+
|
|
256
|
+
---
|
|
239
257
|
|
|
240
258
|
---
|
|
241
259
|
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[](https://github.com/SquabbyZ/peaks-loop/actions/workflows/ci.yml)
|
|
10
10
|
[](./LICENSE)
|
|
11
11
|
[](https://www.npmjs.com/package/peaks-loop)
|
|
12
|
-
[](#status)
|
|
13
13
|
[](https://github.com/SquabbyZ/peaks-loop/stargazers)
|
|
14
14
|
|
|
15
15
|
[English](./README-en.md) · **简体中文**
|
|
@@ -17,29 +17,14 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
19
|
<p align="center">
|
|
20
|
-
<img
|
|
21
|
-
src="https://raw.githubusercontent.com/SquabbyZ/peaks-loop/main/examples/video-demo/preview/peaks-loop-demo.gif"
|
|
22
|
-
alt="peaks-loop 30 秒演示(前 18 秒 · install + 斜杠命令 + 5 域 + 沉淀成 bee)"
|
|
23
|
-
width="92%"
|
|
24
|
-
style="border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.55); display: block;"
|
|
25
|
-
/>
|
|
26
|
-
<br>
|
|
27
|
-
<sub>👆 18s 循环 GIF(完整 30s mp4 不再随 npm 包发布,见 <a href="https://github.com/SquabbyZ/peaks-loop/releases">GitHub Release</a> · 13MB · 480p)</sub>
|
|
28
|
-
</p>
|
|
29
|
-
|
|
30
|
-
<p align="center">
|
|
31
|
-
<img
|
|
32
|
-
src="./assets/readme/releases-banner.svg"
|
|
33
|
-
alt="peaks-loop 4.0.0 GA release banner — first stable cutover from 4.0.0-beta.36"
|
|
34
|
-
width="92%"
|
|
35
|
-
/>
|
|
20
|
+
<img src="./assets/readme/hero.svg" alt="peaks-loop 4.0.3 — Loop Engineering, Engineered" width="92%"/>
|
|
36
21
|
</p>
|
|
37
22
|
|
|
38
23
|
---
|
|
39
24
|
|
|
40
25
|
## 它是什么
|
|
41
26
|
|
|
42
|
-
peaks-loop 是一个 **Loop Engineering 结晶系统**,不是工作流工具 —— 你跑过的工作里,沉淀下来的不是「流程」,是一套**可被 karpathy 风格工程化、又被 darwin 风格独立验证**的 Loop Engineering
|
|
27
|
+
peaks-loop 是一个 **Loop Engineering 结晶系统**,不是工作流工具 —— 你跑过的工作里,沉淀下来的不是「流程」,是一套**可被 karpathy 风格工程化、又被 darwin 风格独立验证**的 Loop Engineering 方法资产。
|
|
43
28
|
|
|
44
29
|
| 资产层 | 角色 | 一句话 |
|
|
45
30
|
| --- | --- | --- |
|
|
@@ -52,6 +37,10 @@ peaks-loop 是一个 **Loop Engineering 结晶系统**,不是工作流工具 —
|
|
|
52
37
|
- `/peaks-code` 是 **code-domain** 长任务 Loop Engineering 编排器,不是通用编排器;非代码域(`peaks-content` / `peaks-doctor` / `peaks-issue-fix-orchestrator` / `peaks-sop`)都是独立的 `peaks-*` 蜂,不是 `peaks-code` 的子类。
|
|
53
38
|
- 跑两次稳定就沉淀成本地战术(bee);跑翻车的会让你重定义。bee 跟着你的口味长。
|
|
54
39
|
|
|
40
|
+
<p align="center">
|
|
41
|
+
<img src="./assets/readme/architecture.svg" alt="peaks-loop 四层资产 / 七道闸门 / 一条工程脊柱" width="92%"/>
|
|
42
|
+
</p>
|
|
43
|
+
|
|
55
44
|
---
|
|
56
45
|
|
|
57
46
|
## 30 秒上手
|
|
@@ -89,6 +78,10 @@ npm i -g peaks-loop
|
|
|
89
78
|
|
|
90
79
|
代码、内容、项目健康、issue 修复、自定义工作流 —— **4.x 已经覆盖五条域**,每条域都有专门编排器,按"门禁不通过就停"的纪律一条一条跑。
|
|
91
80
|
|
|
81
|
+
<p align="center">
|
|
82
|
+
<img src="./assets/readme/command-palette.svg" alt="peaks-loop 13 slash commands — command palette" width="92%"/>
|
|
83
|
+
</p>
|
|
84
|
+
|
|
92
85
|
| 域 | 你发这条命令 | 它会做什么 |
|
|
93
86
|
| --- | --- | --- |
|
|
94
87
|
| 💻 **代码域 (code-domain) only** | `/peaks-code 帮我实现这个功能` | PRD → RD → 实现 → QA → UI → 切片,跑完交你拍板 |
|
|
@@ -113,7 +106,7 @@ npm i -g peaks-loop
|
|
|
113
106
|
## 为什么大家会选它
|
|
114
107
|
|
|
115
108
|
- **自然语言即界面** —— 你不学 CLI、不背命令。**用一条斜杠命令(比如 `/peaks-code xxx`)** 显式触发到对应编排器,后面说什么都行。LLM 替你跟 peaks-loop 跑命令。
|
|
116
|
-
- **门禁真挡事,不是装饰** ——
|
|
109
|
+
- **门禁真挡事,不是装饰** —— 285+ 测试用例(4 packages 全绿)、QA 闸口、review 验收默认全开。**审计不通过就停,QA 没过就停**。
|
|
117
110
|
- **跑过的事会变成本地战术(bee)** —— 沉淀下来的 loop engineering 落到你本地的 `~/.peaks/` 池子里,跑两次稳定就自动晋升;跑翻车的会让你重新定义。**下次说"跑那只"整套流程自动就位**,你那几只战术会跟着你的口味长。
|
|
118
111
|
- **搭在你已经用的工具上** —— 不是新发明一个 AI CLI,而是架在 **Claude Code** 和 **Z Code** 之上。不抢你的 shell、不抢你的 prompt、不抢你的 IDE。其他工具适配中,欢迎共建。
|
|
119
112
|
- **你拍板,它执行** —— 影响资产的决策都给你选;其余的它自己跑。**0 学习成本,1 分钟上手。**
|
|
@@ -129,23 +122,42 @@ npm i -g peaks-loop
|
|
|
129
122
|
| 安全扫描 | ✅ 开 | 凭据、SSRF、注入、危险 IO |
|
|
130
123
|
| QA 复核 | ✅ 开 | 任务级闸门,坏在哪道停在哪道 |
|
|
131
124
|
| review 验收 | ✅ 开 | 改完不立刻出门,review 通过才出门 |
|
|
125
|
+
| 反漂移评估 (Evolution Evaluation) | ✅ 开 | 改进必须过独立评估者 + 反方怀疑者,过不了就回滚 |
|
|
132
126
|
|
|
133
127
|
**所有闸门默认开,你想关哪一道才需要单独说。**
|
|
134
128
|
|
|
135
129
|
---
|
|
136
130
|
|
|
137
|
-
## 当前状态 · 4.
|
|
131
|
+
## 当前状态 · 4.0.3 GA
|
|
132
|
+
|
|
133
|
+
<p align="center">
|
|
134
|
+
<img src="./assets/readme/pulse.svg" alt="peaks-loop live metrics — 4 tiles + sparkline + pipeline progress" width="92%"/>
|
|
135
|
+
</p>
|
|
136
|
+
|
|
137
|
+
<p align="center">
|
|
138
|
+
<img src="./assets/readme/trace-stream.svg" alt="peaks-loop 实时 diff & log stream — code diff + 滚动日志 + 7-gate 链路" width="92%"/>
|
|
139
|
+
</p>
|
|
138
140
|
|
|
139
141
|
| | |
|
|
140
142
|
| --- | --- |
|
|
141
|
-
| **最新版本** | [
|
|
142
|
-
| **覆盖域** | 代码(`peaks-code`) · 内容(`peaks-content`) · 项目健康(`peaks-doctor`) · 批量修 issue(`peaks-issue-fix-orchestrator`) · 自定义 SOP(`peaks-sop`) · 通用原语(`peaks-solo` 分诊 / `peaks-resume` 续 / `peaks-status` 看 / `peaks-test` 测) |
|
|
143
|
+
| **最新版本** | [](https://www.npmjs.com/package/peaks-loop) — GA(2026-07-30) |
|
|
144
|
+
| **覆盖域** | 代码(`peaks-code`) · 内容(`peaks-content`) · 项目健康(`peaks-doctor`) · 批量修 issue(`peaks-issue-fix-orchestrator`) · 自定义 SOP(`peaks-sop`) · 通用原语(`peaks-solo` 分诊 / `peaks-resume` 续 / `peaks-status` 看 / `peaks-test` 测 / `peaks-slice-decompose` 切片) |
|
|
143
145
|
| **沉淀池** | `~/.peaks/` 本地池 · 跑两次自动晋升成 bee · 跑翻车让你重定义 · bee 跟着你的口味长 |
|
|
144
|
-
| **测试套件** |
|
|
146
|
+
| **测试套件** | 285+ cases · 4 packages (peaks-loop / peaks-loop-mut / peaks-loop-shared-channel / peaks-loop-shared) · 80s 全量 |
|
|
145
147
|
| **适配 IDE** | ✅ Claude Code · ✅ Z Code · 🚧 Codex / Cursor / Trae / Tongyi Lingma / Hermes / OpenClaw / Qoder(适配中,欢迎共建) |
|
|
146
148
|
| **依赖运行时** | Node ≥ 20 |
|
|
147
149
|
| **License** | MIT |
|
|
148
150
|
|
|
151
|
+
### 4.0.3 GA 这一波实打实修了什么(2026-07-30)
|
|
152
|
+
|
|
153
|
+
| Epic | 解决的事 | 怎么验 |
|
|
154
|
+
| --- | --- | --- |
|
|
155
|
+
| **测试体系从零重建** | 旧 559 文件单测卡 3 小时跑不完;现 11 test files / 161 cases 单测已上线,加上子包测试与新增切片,全量 4 packages 285+ cases 全绿,`pnpm test:full` ~80s。删旧断言、写生产合约、4 维分拆(render/behavior/integration/a11y)。 | commit `f17aa377` → `1d6233bc` · `.peaks/memory/2026-07-30-test-rebuild-epic-sediment.md` |
|
|
156
|
+
| **Karpathy 评估成本自审** | LLM 在 1-2 个 slice 后不再"今天差不多了明天继续"——`karpathy-reviewer` 报 `costRatio`,>10 时 `peaks job karpathy-cost-check` 自动降级 `block`→`warn`。24h-mode 仍是 override。 | `peaks job karpathy-cost-check --review-file <path>` · 21 cases 单测 |
|
|
157
|
+
| **Compact 显性可见** | `peaks compact history` 给 LLM 看本次会话所有 compact 事件;`peaks statusline compact` 单行指示给 IDE 状态栏( `--` / `compact pending (0.85)` / `REDLINE 0.95` / `just compacted (0.92→?)`)。 | `auto-compact-orchestrator` append 到 `compact-history.jsonl` · 19 cases 单测 |
|
|
158
|
+
| **子包独立单测 + `pnpm test:full` 覆盖全 workspace** | `peaks-loop-mut` / `peaks-loop-shared-channel` 各自 4 维单测;`peaks-loop-shared` 0 file (passWithNoTests);root 镜像冗余删除。 | commit `593ffcdf` → `08e92d8f` · `pnpm test:full` 一次跑完 4 packages |
|
|
159
|
+
| **CLI surface 收敛(73 → 5 super-commands)** | 5 个 super-command(`peaks code / audit / doctor / openspec / release / release-pack`)替换 73 个 leaf command,byte-identical 契约保留,改动对外透明。 | rid-009 · 26 routing test |
|
|
160
|
+
|
|
149
161
|
---
|
|
150
162
|
|
|
151
163
|
## 强烈推荐 · 四个项目组合起来用
|
|
@@ -153,17 +165,7 @@ npm i -g peaks-loop
|
|
|
153
165
|
> **0 学习成本。** 这是组合起来用最大的好处 —— 不只是效果俱佳,更是因为这四个项目的**接口对齐到了"自然语言"**,你只需要说一句话,谁替你跑命令、按什么闸门、按什么战术手册,完全不用你记。
|
|
154
166
|
|
|
155
167
|
<p align="center">
|
|
156
|
-
<
|
|
157
|
-
<img src="https://img.shields.io/badge/ECC-affaan--m-6366f1?style=for-the-badge&logo=github&logoColor=white" alt="affaan-m/ECC" />
|
|
158
|
-
</a>
|
|
159
|
-
|
|
160
|
-
<a href="https://github.com/Egonex-AI/Understand-Anything">
|
|
161
|
-
<img src="https://img.shields.io/badge/Understand--Anything-Egonex--AI-22c55e?style=for-the-badge&logo=github&logoColor=white" alt="Egonex-AI/Understand-Anything" />
|
|
162
|
-
</a>
|
|
163
|
-
|
|
164
|
-
<a href="https://github.com/obra/superpowers">
|
|
165
|
-
<img src="https://img.shields.io/badge/superpowers-obra-f59e0b?style=for-the-badge&logo=github&logoColor=white" alt="obra/superpowers" />
|
|
166
|
-
</a>
|
|
168
|
+
<img src="./assets/readme/footer.svg" alt="peaks-loop 推荐组合" width="92%"/>
|
|
167
169
|
</p>
|
|
168
170
|
|
|
169
171
|
| 角色 | 项目 | 一句话 |
|
|
@@ -219,15 +221,6 @@ peaks-loop 的两条工程脊柱直接来自这两个项目:
|
|
|
219
221
|
|
|
220
222
|
**最大的不同:从"代码专用"扩成"多域编排系统"。** 4.x 不再只是写代码 —— 新增了 `peaks-content`(内容生产)、`peaks-doctor`(项目健康)、`peaks-issue-fix-orchestrator`(批量修 issue)、`peaks-sop`(自定义 SOP)四条域编排链,加上 `peaks-solo` 分诊员按你说话自动判断该走哪一域。再加 9 个 IDE 适配、结晶系统重命名、post-run crystallization 机制。完整变更 → [`CHANGELOG.md`](./CHANGELOG.md)。
|
|
221
223
|
|
|
222
|
-
### 4.0.0 GA 这一波实打实修了什么(2026-07-30)
|
|
223
|
-
|
|
224
|
-
| Epic | 解决的事 | 怎么验 |
|
|
225
|
-
| --- | --- | --- |
|
|
226
|
-
| **测试体系从零重建** | 旧 559 文件单测卡 3 小时跑不完;现 219 cases 4 packages 全绿,`pnpm test:full` ~67s。删旧断言、写生产合约、4 维分拆(render/behavior/integration/a11y)。 | commit `f17aa377` → `1d6233bc` · `.peaks/memory/2026-07-30-test-rebuild-epic-sediment.md` |
|
|
227
|
-
| **Karpathy 评估成本自审** | LLM 在 1-2 个 slice 后不再"今天差不多了明天继续"——`karpathy-reviewer` 报 `costRatio`,>10 时 `peaks job karpathy-cost-check` 自动降级 `block`→`warn`。24h-mode 仍是 override。 | `peaks job karpathy-cost-check --review-file <path>` · 21 cases 单测 |
|
|
228
|
-
| **Compact 显性可见** | `peaks compact history` 给 LLM 看本次会话所有 compact 事件;`peaks statusline compact` 单行指示给 IDE 状态栏( `--` / `compact pending (0.85)` / `REDLINE 0.95` / `just compacted (0.92→?)`)。 | `auto-compact-orchestrator` append 到 `compact-history.jsonl` · 19 cases 单测 |
|
|
229
|
-
| **子包独立单测 + `pnpm test:full` 覆盖全 workspace** | `peaks-loop-mut` / `peaks-loop-shared-channel` 各自 4 维单测;`peaks-loop-shared` 0 file (passWithNoTests);root 镜像冗余删除。 | commit `593ffcdf` → `08e92d8f` · `pnpm test:full` 一次跑完 4 packages |
|
|
230
|
-
|
|
231
224
|
</details>
|
|
232
225
|
|
|
233
226
|
---
|
|
@@ -236,13 +229,19 @@ peaks-loop 的两条工程脊柱直接来自这两个项目:
|
|
|
236
229
|
|
|
237
230
|
13 个 user skill · 全部入口都在 `skills/<name>/SKILL.md`:
|
|
238
231
|
|
|
239
|
-
|
|
232
|
+
<p align="center">
|
|
233
|
+
<img src="./assets/readme/skill-index.svg" alt="peaks-loop 13 user skills 索引卡" width="92%"/>
|
|
234
|
+
</p>
|
|
240
235
|
|
|
241
236
|
---
|
|
242
237
|
|
|
243
|
-
## Ship 摘要(4.x ·
|
|
238
|
+
## Ship 摘要(4.x · 19 rid)
|
|
244
239
|
|
|
245
|
-
`020b · 024 · 025 · 026 · 027 · 028 · 029 · 030 · 031 · 032 · 033 · 034
|
|
240
|
+
`009 · 010 · 011 · 014 · 015 · 016 · 017 · 020b · 024 · 025 · 026 · 027 · 028 · 029 · 030 · 031 · 032 · 033 · 034` — 涵盖 CLI surface 收敛(73→5 byte-identical)、Trusted Publishing + OIDC、24h-mode、context spillover、DAG wave+barrier、dashboard aggregation、test-rebuild epic、karpathy-cost self-review、compact visibility、retire-auto-compact-hook 等。
|
|
241
|
+
|
|
242
|
+
<p align="center">
|
|
243
|
+
<img src="./assets/readme/ship-summary.svg" alt="peaks-loop 4.x 19 rid 历程表" width="92%"/>
|
|
244
|
+
</p>
|
|
246
245
|
|
|
247
246
|
---
|
|
248
247
|
|
|
@@ -253,40 +252,9 @@ peaks-loop 的两条工程脊柱直接来自这两个项目:
|
|
|
253
252
|
- 提问 → [GitHub Issues](https://github.com/SquabbyZ/peaks-loop/issues)
|
|
254
253
|
- 致敬: [multica-ai/andrej-karpathy-skills](https://github.com/multica-ai/andrej-karpathy-skills) · [alchaincyf/darwin-skill](https://github.com/alchaincyf/darwin-skill)
|
|
255
254
|
- 组合推荐: [affaan-m/ECC](https://github.com/affaan-m/ECC) · [Egonex-AI/Understand-Anything](https://github.com/Egonex-AI/Understand-Anything) · [obra/superpowers](https://github.com/obra/superpowers)
|
|
256
|
-
- 沉淀设计 → [`docs/superpowers/specs/2026-07-04-peaks-maker-dynamic-skill-sediment-design.md`](./docs/superpowers/specs/2026-07-04-peaks-maker-dynamic-skill-sediment-design.md)
|
|
257
|
-
- Loop Engineering 结晶设计 → [`docs/superpowers/specs/2026-07-07-peaks-loop-loop-engineering-crystallization-design.md`](./docs/superpowers/specs/2026-07-07-peaks-loop-loop-engineering-crystallization-design.md)
|
|
258
255
|
|
|
259
256
|
---
|
|
260
257
|
|
|
261
|
-
## 发布(Trusted Publishing · OIDC)
|
|
262
|
-
|
|
263
|
-
本仓库发布链路**不**使用 npm token,改用 **Trusted Publishing + OIDC**:
|
|
264
|
-
|
|
265
|
-
- 维护者**不需要**也不会持有 `NPM_TOKEN` —— `~/.npmrc` 已被清理,npmjs.com 已把 Publishing access 切到 disallow tokens。
|
|
266
|
-
- 触发方式 1:`git tag vX.Y.Z && git push --tags`(走 `.github/workflows/publish.yml` 的 `push: tags: v*.*.*` 触发器)。
|
|
267
|
-
- 触发方式 2:GitHub UI → Actions → publish → Run workflow(手动兜底,可用于 dry-run / 补发)。
|
|
268
|
-
- 每次发布跑完整链路:`install → typecheck → build → vitest → changesets version → changesets publish`,全部通过才会真正落到 npm。
|
|
269
|
-
- 维护者的本地动作只有两步:`pnpm changeset` 写变更说明 + 合并 PR(剩下的 CI 自动跑)。
|
|
270
|
-
|
|
271
|
-
**npmjs 侧一次性配置**(本 slice 完成后由人工做一次):
|
|
272
|
-
|
|
273
|
-
1. 登录 https://www.npmjs.com → Settings → Trusted Publishers → Add GitHub Action。
|
|
274
|
-
2. Owner / Org:`SquabbyZ` · Repository:`peaks-loop` · Workflow filename:`publish.yml` · Environment name:留空。
|
|
275
|
-
3. 保存。
|
|
276
|
-
|
|
277
|
-
**撤销** = npmjs 端删 trusted publisher,**无需** rotate token。
|
|
278
|
-
|
|
279
|
-
**常见故障**:
|
|
280
|
-
|
|
281
|
-
| 现象 | 原因 | 修法 |
|
|
282
|
-
|------|------|------|
|
|
283
|
-
| publish 步骤报 `Cannot get JWT` | 缺 `id-token: write` | 检查 `.github/workflows/publish.yml#permissions` |
|
|
284
|
-
| publish 步骤报 `ENEEDAUTH` 或 `404 from registry.npmjs.org` | npmjs 端没配 trusted publisher | 走上面的 3 步配置 |
|
|
285
|
-
| `changeset version` 把 `package.json` 改了我没想要 | 漏掉了手动 version | 提交前先本地 `pnpm changeset version`,CI 端为 no-op |
|
|
286
|
-
| tag 推了但 CI 没跑 | tag 格式不符 `v*.*.*` | 检查 `git tag` 输出 |
|
|
287
|
-
|
|
288
|
-
详细 RD 文档见 [`docs/superpowers/slices/slice-s1-trusted-publish.md`](./docs/superpowers/slices/slice-s1-trusted-publish.md)。
|
|
289
|
-
|
|
290
258
|
---
|
|
291
259
|
|
|
292
260
|
<div align="center">
|
|
@@ -115,9 +115,20 @@ export function registerCodeRuntimeCommands(code, io) {
|
|
|
115
115
|
'≥0.95 emits action=red-line (forced hook fires next turn).')
|
|
116
116
|
.requiredOption('--project <path>', 'target project root')
|
|
117
117
|
.option('--session-id <sid>', 'override session id (default: read from active presence)')
|
|
118
|
-
.option('--enforce-job-mode', 'v3.1.2: treat ≥0.85 as MANDATORY auto-compact (not advisory). Auto-enabled when job-shape.json says isJob=true.')
|
|
118
|
+
.option('--enforce-job-mode', 'v3.1.2: treat ≥0.85 as MANDATORY auto-compact (not advisory). Auto-enabled when job-shape.json says isJob=true.')
|
|
119
|
+
.option('--prompt-size <bytes>', 'override the bytes-from-env path; takes priority over env / statusline / transcript. Useful when CLAUDE_CONTEXT_USAGE_PERCENT is absent (e.g. Mac Claude Code).')).action(async (opts) => {
|
|
119
120
|
try {
|
|
120
121
|
const { readContextPercent } = await import('../../services/context/auto-compact-reader.js');
|
|
122
|
+
// rid-002: parse --prompt-size <bytes> defensively. CLI-layer
|
|
123
|
+
// guard rejects non-finite / negative values; only finite
|
|
124
|
+
// non-negative numbers reach the reader. Undefined → no override.
|
|
125
|
+
let promptSizeBytes;
|
|
126
|
+
if (opts.promptSize !== undefined) {
|
|
127
|
+
const parsed = Number(opts.promptSize);
|
|
128
|
+
if (Number.isFinite(parsed) && parsed >= 0) {
|
|
129
|
+
promptSizeBytes = parsed;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
121
132
|
// v3.1.2: detect Job mode from job-shape.json when --enforce-job-mode
|
|
122
133
|
// is not explicitly passed. The LLM is the source of truth for
|
|
123
134
|
// whether the request is Job-shaped; the recorded decision is.
|
|
@@ -140,7 +151,8 @@ export function registerCodeRuntimeCommands(code, io) {
|
|
|
140
151
|
const probe = readContextPercent({
|
|
141
152
|
projectRoot: opts.project,
|
|
142
153
|
sessionId: opts.sessionId ?? readActiveSid(opts.project) ?? 'unknown',
|
|
143
|
-
env: process.env
|
|
154
|
+
env: process.env,
|
|
155
|
+
promptSizeBytes
|
|
144
156
|
});
|
|
145
157
|
const ratioPct = (probe.ratio * 100).toFixed(1);
|
|
146
158
|
let action = 'ok';
|
|
@@ -179,6 +191,7 @@ export function registerCodeRuntimeCommands(code, io) {
|
|
|
179
191
|
ide: probe.ide,
|
|
180
192
|
capacityBytes: probe.capacityBytes,
|
|
181
193
|
rawBytes: probe.rawBytes ?? null,
|
|
194
|
+
bytesPrompt: promptSizeBytes ?? null,
|
|
182
195
|
capturedAt: probe.capturedAt
|
|
183
196
|
}, [], [
|
|
184
197
|
action === 'red-line'
|
|
@@ -3,6 +3,16 @@ export interface ReadContextPercentInput {
|
|
|
3
3
|
readonly projectRoot: string;
|
|
4
4
|
readonly sessionId: string;
|
|
5
5
|
readonly env?: NodeJS.ProcessEnv | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Slice 2026-07-31-rid-002: explicit byte count from `--prompt-size <bytes>`.
|
|
8
|
+
* When set to a finite non-negative number, short-circuits the entire
|
|
9
|
+
* env / statusline / transcript chain with `source: 'user-overridden'`.
|
|
10
|
+
* Mac escape hatch — Claude Code Mac does NOT inject
|
|
11
|
+
* `CLAUDE_CONTEXT_USAGE_PERCENT` into PreToolUse sub-shells, so the
|
|
12
|
+
* user (or a hook wrapper) can inject the bytes they observed themselves.
|
|
13
|
+
* Priority P0 — above everything else.
|
|
14
|
+
*/
|
|
15
|
+
readonly promptSizeBytes?: number | undefined;
|
|
6
16
|
}
|
|
7
17
|
/**
|
|
8
18
|
* Read env-var-based context percentage. Returns `null` when the env
|
|
@@ -19,12 +29,30 @@ declare function readEnvPercent(env: NodeJS.ProcessEnv, varName: string): number
|
|
|
19
29
|
*/
|
|
20
30
|
declare function readClaudeStatuslinePercent(): number | null;
|
|
21
31
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
32
|
+
* Recursive search for `<sessionId>.jsonl` under `projectsDir`. Used by
|
|
33
|
+
* `readClaudeTranscriptFallback` and exported via `_internal` so unit
|
|
34
|
+
* tests can drive it without monkey-patching `os.homedir` (which is
|
|
35
|
+
* non-configurable in ESM module namespaces).
|
|
36
|
+
*
|
|
37
|
+
* The Mac layout encodes the cwd as a single hash directory; on Mac
|
|
38
|
+
* Claude Code nests the transcript under that hash with an extra level
|
|
39
|
+
* of subdirectory we cannot predict ahead of time. A flat readdir misses
|
|
40
|
+
* that branch and returns null — the silent-failure mode that this fix
|
|
41
|
+
* closes.
|
|
42
|
+
*/
|
|
43
|
+
declare function findTranscriptJsonl(projectsDir: string, sessionId: string): {
|
|
44
|
+
path: string;
|
|
45
|
+
bytes: number;
|
|
46
|
+
} | null;
|
|
47
|
+
/**
|
|
48
|
+
* Conservative transcript-size fallback. Recursively searches
|
|
49
|
+
* `~/.claude/projects/<hash>/<sid-or-nested>.jsonl` (Mac may nest
|
|
50
|
+
* the jsonl under an
|
|
51
|
+
* extra directory we cannot predict ahead of time) and estimates
|
|
24
52
|
* `ratio = bytesUsed / 256K`. Returns the bytes seen so the
|
|
25
53
|
* orchestrator can show "estimated from 124KB of 256KB transcript"
|
|
26
|
-
* in the envelope. Tagged `'
|
|
27
|
-
* know
|
|
54
|
+
* in the envelope. Tagged `'transcript-estimate'` (v2.14.0) so callers
|
|
55
|
+
* know it is a real signal, NOT a hard gate.
|
|
28
56
|
*/
|
|
29
57
|
declare function readClaudeTranscriptFallback(sessionId: string): {
|
|
30
58
|
ratio: number;
|
|
@@ -47,5 +75,6 @@ export declare const _internal: {
|
|
|
47
75
|
readEnvPercent: typeof readEnvPercent;
|
|
48
76
|
readClaudeStatuslinePercent: typeof readClaudeStatuslinePercent;
|
|
49
77
|
readClaudeTranscriptFallback: typeof readClaudeTranscriptFallback;
|
|
78
|
+
findTranscriptJsonl: typeof findTranscriptJsonl;
|
|
50
79
|
};
|
|
51
80
|
export {};
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* 3. `ratio: 0` with `source: 'conservative-fallback'` — the
|
|
23
23
|
* orchestrator MUST NOT auto-fire compact on this signal.
|
|
24
24
|
*/
|
|
25
|
-
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
25
|
+
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
|
|
26
26
|
import { homedir } from 'node:os';
|
|
27
27
|
import { join } from 'node:path';
|
|
28
28
|
import { detectIdeFromEnv } from './ide-detect.js';
|
|
@@ -70,25 +70,36 @@ function readClaudeStatuslinePercent() {
|
|
|
70
70
|
return null;
|
|
71
71
|
}
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
73
|
+
* Recursive search for `<sessionId>.jsonl` under `projectsDir`. Used by
|
|
74
|
+
* `readClaudeTranscriptFallback` and exported via `_internal` so unit
|
|
75
|
+
* tests can drive it without monkey-patching `os.homedir` (which is
|
|
76
|
+
* non-configurable in ESM module namespaces).
|
|
77
|
+
*
|
|
78
|
+
* The Mac layout encodes the cwd as a single hash directory; on Mac
|
|
79
|
+
* Claude Code nests the transcript under that hash with an extra level
|
|
80
|
+
* of subdirectory we cannot predict ahead of time. A flat readdir misses
|
|
81
|
+
* that branch and returns null — the silent-failure mode that this fix
|
|
82
|
+
* closes.
|
|
79
83
|
*/
|
|
80
|
-
function
|
|
81
|
-
const projectsDir = join(homedir(), '.claude', 'projects');
|
|
84
|
+
function findTranscriptJsonl(projectsDir, sessionId) {
|
|
82
85
|
if (!existsSync(projectsDir))
|
|
83
86
|
return null;
|
|
84
87
|
try {
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
const stack = [projectsDir];
|
|
89
|
+
while (stack.length > 0) {
|
|
90
|
+
const dir = stack.pop();
|
|
91
|
+
if (dir === undefined)
|
|
92
|
+
break;
|
|
93
|
+
const entries = readdirSync(dir, { withFileTypes: true });
|
|
94
|
+
for (const entry of entries) {
|
|
95
|
+
const full = join(dir, entry.name);
|
|
96
|
+
if (entry.isDirectory()) {
|
|
97
|
+
stack.push(full);
|
|
98
|
+
}
|
|
99
|
+
else if (entry.isFile() && entry.name === `${sessionId}.jsonl`) {
|
|
100
|
+
const bytes = statSync(full).size;
|
|
101
|
+
return { path: full, bytes };
|
|
102
|
+
}
|
|
92
103
|
}
|
|
93
104
|
}
|
|
94
105
|
}
|
|
@@ -97,6 +108,24 @@ function readClaudeTranscriptFallback(sessionId) {
|
|
|
97
108
|
}
|
|
98
109
|
return null;
|
|
99
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Conservative transcript-size fallback. Recursively searches
|
|
113
|
+
* `~/.claude/projects/<hash>/<sid-or-nested>.jsonl` (Mac may nest
|
|
114
|
+
* the jsonl under an
|
|
115
|
+
* extra directory we cannot predict ahead of time) and estimates
|
|
116
|
+
* `ratio = bytesUsed / 256K`. Returns the bytes seen so the
|
|
117
|
+
* orchestrator can show "estimated from 124KB of 256KB transcript"
|
|
118
|
+
* in the envelope. Tagged `'transcript-estimate'` (v2.14.0) so callers
|
|
119
|
+
* know it is a real signal, NOT a hard gate.
|
|
120
|
+
*/
|
|
121
|
+
function readClaudeTranscriptFallback(sessionId) {
|
|
122
|
+
const projectsDir = join(homedir(), '.claude', 'projects');
|
|
123
|
+
const hit = findTranscriptJsonl(projectsDir, sessionId);
|
|
124
|
+
if (hit === null)
|
|
125
|
+
return null;
|
|
126
|
+
const ratio = Math.min(1, hit.bytes / (256 * 1024));
|
|
127
|
+
return { ratio, bytes: hit.bytes };
|
|
128
|
+
}
|
|
100
129
|
/**
|
|
101
130
|
* Probe the current AI CLI's context-fill ratio. Adapter-driven:
|
|
102
131
|
* looks up the registered `IdeAdapter.compact` profile via
|
|
@@ -121,6 +150,24 @@ export function readContextPercent(input) {
|
|
|
121
150
|
// through `unknown` to IdeId's wider 8-element set.
|
|
122
151
|
const ideId = (detected === 'unknown' ? 'claude-code' : detected);
|
|
123
152
|
const adapter = getAdapter(ideId);
|
|
153
|
+
// P0 user-overridden takes priority over env / statusline / transcript.
|
|
154
|
+
// Mac escape hatch: when the CLI/helper passes `--prompt-size <bytes>`,
|
|
155
|
+
// honor that number directly. Do NOT read env, statusline, or transcript
|
|
156
|
+
// — user intent always wins. Negative / non-finite values are ignored
|
|
157
|
+
// here (CLI layer validates >= 0); they fall through to the chain below.
|
|
158
|
+
if (input.promptSizeBytes !== undefined &&
|
|
159
|
+
Number.isFinite(input.promptSizeBytes) &&
|
|
160
|
+
input.promptSizeBytes >= 0) {
|
|
161
|
+
const ratio = Math.min(1, input.promptSizeBytes / capacityBytes);
|
|
162
|
+
return {
|
|
163
|
+
ratio,
|
|
164
|
+
source: 'user-overridden',
|
|
165
|
+
rawBytes: input.promptSizeBytes,
|
|
166
|
+
capacityBytes,
|
|
167
|
+
ide: ideId,
|
|
168
|
+
capturedAt
|
|
169
|
+
};
|
|
170
|
+
}
|
|
124
171
|
// Primary: read the adapter-declared env-var (no hard-coded IDE names).
|
|
125
172
|
if (adapter.compact) {
|
|
126
173
|
const primary = readEnvPercent(env, adapter.compact.envVarForContextPercent);
|
|
@@ -147,7 +194,7 @@ export function readContextPercent(input) {
|
|
|
147
194
|
if (fallback !== null) {
|
|
148
195
|
return {
|
|
149
196
|
ratio: fallback.ratio,
|
|
150
|
-
source: '
|
|
197
|
+
source: 'transcript-estimate',
|
|
151
198
|
rawBytes: fallback.bytes,
|
|
152
199
|
capacityBytes,
|
|
153
200
|
ide: ideId,
|
|
@@ -161,4 +208,4 @@ export function readContextPercent(input) {
|
|
|
161
208
|
return { ratio: 0, source: 'conservative-fallback', capacityBytes, ide: ideId, capturedAt };
|
|
162
209
|
}
|
|
163
210
|
/** Re-export the env-var probe for unit tests. */
|
|
164
|
-
export const _internal = { readEnvPercent, readClaudeStatuslinePercent, readClaudeTranscriptFallback };
|
|
211
|
+
export const _internal = { readEnvPercent, readClaudeStatuslinePercent, readClaudeTranscriptFallback, findTranscriptJsonl };
|
|
@@ -152,10 +152,18 @@ export interface ContextPercentProbe {
|
|
|
152
152
|
readonly ratio: number;
|
|
153
153
|
/**
|
|
154
154
|
* Adapter-driven source tag. Fixed values:
|
|
155
|
+
* - `user-overridden` (v2.14.0 rid-002: explicit `--prompt-size
|
|
156
|
+
* <bytes>` from the CLI / hook wrapper —
|
|
157
|
+
* takes priority P0 over EVERY other source.
|
|
158
|
+
* Mac escape hatch.)
|
|
155
159
|
* - `${ideId}-env` (e.g. `claude-code-env`)
|
|
156
160
|
* - `statusline-poll` (Claude Code MVP fallback)
|
|
157
|
-
* - `
|
|
158
|
-
*
|
|
161
|
+
* - `transcript-estimate` (v2.14.0 Mac-aware: recursive
|
|
162
|
+
* readdir under ~/.claude/projects/
|
|
163
|
+
* finds <sid>.jsonl and reports
|
|
164
|
+
* bytes/256K; a real signal, NOT
|
|
165
|
+
* a hard gate)
|
|
166
|
+
* - `conservative-fallback` (no signal available — caller
|
|
159
167
|
* MUST NOT treat as hard gate)
|
|
160
168
|
* Future IDEs may add per-ide sources; the type accepts any
|
|
161
169
|
* string to keep the schema forward-compatible.
|
package/package.json
CHANGED
|
@@ -1,8 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "peaks-loop",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "Loop Engineering CLI — workflow primitive / loop guards / evaluators / slice orchestration",
|
|
5
5
|
"author": "SquabbyZ",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"peaks-loop",
|
|
8
|
+
"loop-engineering",
|
|
9
|
+
"ai-orchestration",
|
|
10
|
+
"ai-coding-agent",
|
|
11
|
+
"ai-programmer",
|
|
12
|
+
"multi-agent",
|
|
13
|
+
"claude-code",
|
|
14
|
+
"codex",
|
|
15
|
+
"z-code",
|
|
16
|
+
"cursor",
|
|
17
|
+
"trae",
|
|
18
|
+
"tongyi-lingma",
|
|
19
|
+
"agent-harness",
|
|
20
|
+
"agentic-engineering",
|
|
21
|
+
"autonomous-workflow",
|
|
22
|
+
"workflow-orchestration",
|
|
23
|
+
"llm-workflow",
|
|
24
|
+
"long-running-task",
|
|
25
|
+
"sub-agent-dispatch",
|
|
26
|
+
"dag-orchestration",
|
|
27
|
+
"slice-decomposition",
|
|
28
|
+
"sop",
|
|
29
|
+
"openspec",
|
|
30
|
+
"karpathy",
|
|
31
|
+
"darwin",
|
|
32
|
+
"anti-drift",
|
|
33
|
+
"evolution-evaluation",
|
|
34
|
+
"ci-cd",
|
|
35
|
+
"github-actions",
|
|
36
|
+
"trusted-publishing",
|
|
37
|
+
"oidc",
|
|
38
|
+
"monorepo",
|
|
39
|
+
"pnpm",
|
|
40
|
+
"vitest",
|
|
41
|
+
"code-review",
|
|
42
|
+
"tdd",
|
|
43
|
+
"security-scan",
|
|
44
|
+
"lint",
|
|
45
|
+
"typecheck",
|
|
46
|
+
"devtool",
|
|
47
|
+
"cli",
|
|
48
|
+
"developer-tools"
|
|
49
|
+
],
|
|
6
50
|
"license": "MIT",
|
|
7
51
|
"type": "module",
|
|
8
52
|
"publishConfig": {
|
|
@@ -54,9 +98,9 @@
|
|
|
54
98
|
"headroom-ai": "0.22.4",
|
|
55
99
|
"yaml": "^2.9.0",
|
|
56
100
|
"zod": "^3.25.76",
|
|
57
|
-
"peaks-loop-mut": "0.1.
|
|
58
|
-
"peaks-loop-shared": "0.0.
|
|
59
|
-
"peaks-loop-shared-channel": "0.0.
|
|
101
|
+
"peaks-loop-mut": "0.1.7",
|
|
102
|
+
"peaks-loop-shared": "0.0.33",
|
|
103
|
+
"peaks-loop-shared-channel": "0.0.12"
|
|
60
104
|
},
|
|
61
105
|
"peerDependencies": {
|
|
62
106
|
"@alibaba-group/open-code-review": "1.3.1"
|