peaks-loop 4.1.12 → 4.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +53 -0
  3. package/dist/cli/commands/_register.js +2 -0
  4. package/dist/cli/commands/batch-commands.d.ts +6 -0
  5. package/dist/cli/commands/batch-commands.js +70 -0
  6. package/dist/cli/commands/batch-diagnose-command.d.ts +10 -0
  7. package/dist/cli/commands/batch-diagnose-command.js +196 -0
  8. package/dist/cli/commands/batch-diagnose-envelope.d.ts +25 -0
  9. package/dist/cli/commands/batch-diagnose-envelope.js +60 -0
  10. package/dist/cli/commands/batch-diagnose-record.d.ts +21 -0
  11. package/dist/cli/commands/batch-diagnose-record.js +51 -0
  12. package/dist/cli/commands/batch-item-input.d.ts +59 -0
  13. package/dist/cli/commands/batch-item-input.js +113 -0
  14. package/dist/cli/commands/batch-report-command.d.ts +22 -0
  15. package/dist/cli/commands/batch-report-command.js +199 -0
  16. package/dist/cli/commands/core/skill-context-verdict.d.ts +16 -1
  17. package/dist/cli/commands/core/skill-context-verdict.js +38 -8
  18. package/dist/cli/commands/lint-commands.js +8 -0
  19. package/dist/cli/commands/lint-rules-command.d.ts +14 -0
  20. package/dist/cli/commands/lint-rules-command.js +44 -0
  21. package/dist/services/batch/batch-active-batch.d.ts +55 -0
  22. package/dist/services/batch/batch-active-batch.js +127 -0
  23. package/dist/services/batch/batch-context-reminder.d.ts +85 -0
  24. package/dist/services/batch/batch-context-reminder.js +201 -0
  25. package/dist/services/batch/batch-diagnosis-finding.d.ts +25 -0
  26. package/dist/services/batch/batch-diagnosis-finding.js +227 -0
  27. package/dist/services/batch/batch-diagnosis-report-store.d.ts +49 -0
  28. package/dist/services/batch/batch-diagnosis-report-store.js +133 -0
  29. package/dist/services/batch/batch-diagnosis-summary.d.ts +31 -0
  30. package/dist/services/batch/batch-diagnosis-summary.js +129 -0
  31. package/dist/services/batch/batch-diagnosis.d.ts +36 -0
  32. package/dist/services/batch/batch-diagnosis.js +107 -0
  33. package/dist/services/batch/batch-entry.d.ts +22 -0
  34. package/dist/services/batch/batch-entry.js +42 -0
  35. package/dist/services/batch/batch-fix-agent.d.ts +39 -0
  36. package/dist/services/batch/batch-fix-agent.js +126 -0
  37. package/dist/services/batch/batch-fix-types.d.ts +85 -0
  38. package/dist/services/batch/batch-fix-types.js +11 -0
  39. package/dist/services/batch/batch-fix.d.ts +15 -0
  40. package/dist/services/batch/batch-fix.js +229 -0
  41. package/dist/services/batch/batch-phase-advance.d.ts +45 -0
  42. package/dist/services/batch/batch-phase-advance.js +105 -0
  43. package/dist/services/batch/batch-progress-store.d.ts +52 -0
  44. package/dist/services/batch/batch-progress-store.js +219 -0
  45. package/dist/services/batch/batch-progress-types.d.ts +79 -0
  46. package/dist/services/batch/batch-progress-types.js +10 -0
  47. package/dist/services/batch/batch-recovery.d.ts +5 -0
  48. package/dist/services/batch/batch-recovery.js +24 -0
  49. package/dist/services/batch/batch-verify.d.ts +93 -0
  50. package/dist/services/batch/batch-verify.js +216 -0
  51. package/dist/services/code/auto-compact-decision.d.ts +17 -0
  52. package/dist/services/code/auto-compact-decision.js +6 -0
  53. package/dist/services/code/auto-compact-orchestrator.js +6 -0
  54. package/dist/services/code/batch-compaction-point.d.ts +45 -0
  55. package/dist/services/code/batch-compaction-point.js +99 -0
  56. package/dist/services/context/context-schema.d.ts +1 -1
  57. package/dist/services/lint/curated-rule-reader.d.ts +37 -0
  58. package/dist/services/lint/curated-rule-reader.js +179 -0
  59. package/dist/services/lint/project-lint-declarations.d.ts +27 -0
  60. package/dist/services/lint/project-lint-declarations.js +217 -0
  61. package/dist/services/lint/project-lint-tool-detection.d.ts +14 -0
  62. package/dist/services/lint/project-lint-tool-detection.js +208 -0
  63. package/dist/services/lint/project-lint-tool-rules.d.ts +19 -0
  64. package/dist/services/lint/project-lint-tool-rules.js +199 -0
  65. package/dist/services/lint/rule-pre-read-types.d.ts +66 -0
  66. package/dist/services/lint/rule-pre-read-types.js +22 -0
  67. package/dist/services/lint/rule-pre-read.d.ts +20 -0
  68. package/dist/services/lint/rule-pre-read.js +145 -0
  69. package/dist/services/skill/skill-search-service.d.ts +3 -3
  70. package/package.json +5 -5
  71. package/skills/peaks-code/references/micro-cycle.md +13 -1
  72. package/skills/peaks-race-code/SKILL.md +40 -1
@@ -30,10 +30,10 @@ export declare const SkillSearchInputSchema: z.ZodObject<{
30
30
  status: "status";
31
31
  resume: "resume";
32
32
  audit: "audit";
33
- "final-review": "final-review";
34
- content: "content";
35
- ide: "ide";
36
33
  test: "test";
34
+ ide: "ide";
35
+ content: "content";
36
+ "final-review": "final-review";
37
37
  doctor: "doctor";
38
38
  research: "research";
39
39
  triage: "triage";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peaks-loop",
3
- "version": "4.1.12",
3
+ "version": "4.1.13",
4
4
  "description": "Loop Engineering CLI — workflow primitive / loop guards / evaluators / slice orchestration",
5
5
  "author": "SquabbyZ",
6
6
  "keywords": [
@@ -129,10 +129,10 @@
129
129
  "picomatch": "4.0.7",
130
130
  "yaml": "^2.9.1",
131
131
  "zod": "^4.6.7",
132
- "peaks-loop-internal-runtime": "0.0.52",
133
- "peaks-loop-mut": "0.1.66",
134
- "peaks-loop-shared": "0.0.101",
135
- "peaks-loop-shared-channel": "0.0.69"
132
+ "peaks-loop-internal-runtime": "0.0.53",
133
+ "peaks-loop-shared": "0.0.102",
134
+ "peaks-loop-shared-channel": "0.0.70",
135
+ "peaks-loop-mut": "0.1.67"
136
136
  },
137
137
  "devDependencies": {
138
138
  "@changesets/cli": "2.31.1",
@@ -60,7 +60,19 @@ npx vitest run tests/unit/<file>.test.ts --no-coverage
60
60
 
61
61
  目的:防"改一处坏一处"。比全 suite 快 10-50×。
62
62
 
63
- ### 6. 写一个 commit message(先不 commit)
63
+ ### 6. lint 腿 —— 写完立刻查,不要等提交时
64
+
65
+ ```bash
66
+ peaks lint check --scope <刚改的文件> --json
67
+ ```
68
+
69
+ 只查刚改的那个文件,不扫全项目(扫全项目跟跑全 suite 一样慢,就白搭了 micro-cycle 的意义)。
70
+ `peaks lint check` 是只读 ESLint 校验器,不会写任何文件。
71
+
72
+ **红了就在同一个上下文里改**(同一轮 micro-cycle 内,改完重跑本腿),不要留到 pre-commit / pre-push ——
73
+ 那时上下文已经换了,返工成本是这里的十倍以上。
74
+
75
+ ### 7. 写一个 commit message(先不 commit)
64
76
 
65
77
  ```bash
66
78
  git add -p
@@ -174,7 +174,8 @@ section.
174
174
 
175
175
  ## What this lane does not write
176
176
 
177
- No sub-agent dispatches. No Gate A–G file chain. No `peaks request transition` state machine.
177
+ No sub-agent dispatches — the read-only diagnosis fan-out of batch mode below is the one
178
+ exception. No Gate A–G file chain. No `peaks request transition` state machine.
178
179
  No planning or review documents — no tech doc, bug analysis, review envelope, audit envelope,
179
180
  QA report or verdict. No job shape, no slice DAG, no swarm fan-out, no PRD phase, no
180
181
  orchestrator-to-implementer handoff.
@@ -183,3 +184,41 @@ Keep the parts that cost no wall-clock, because they are habits rather than cere
183
184
  file before editing it, the TDD micro-cycle, the four Karpathy guidelines, one codegraph
184
185
  query for the affected surface, one sentence before you start on what you will change and
185
186
  why, and nothing dropped in the project root.
187
+
188
+ ## Batch mode (批量模式)
189
+
190
+ **When it engages.** The user gives you **two or more mutually independent** bugs or small
191
+ requirements in one go. That is the whole trigger — nothing to configure, no threshold to
192
+ clear. **One item is not a batch:** a single task takes exactly the path it takes today —
193
+ no diagnosis fan-out, no rule pre-read, no topology step — and none of the machinery below
194
+ applies to it. Batch mode is an addition to this lane, never a substitute for it.
195
+
196
+ **The four phases.**
197
+
198
+ 1. **Parallel read-only diagnosis.** One reader per item, each reporting the root cause,
199
+ the files it expects to touch, and whether it hit a risk surface.
200
+ 2. **Topology.** The measured file sets decide what may run together: items whose file
201
+ sets are disjoint may proceed together, and an item that collides with another is
202
+ deferred behind it.
203
+ 3. **Fix.** Each item is fixed from its own diagnosis rather than from a fresh one, and
204
+ every item runs its scoped test as soon as it is fixed.
205
+ 4. **One unified verification.** The whole batch goes through the acceptance gate
206
+ **once** — the gate that §1 of `../peaks-code/references/fast-lane-norm.md` names, the
207
+ same one a single task runs. Only the count changes; the strictness does not. A red
208
+ unified verification points at the integration between items rather than at one item:
209
+ an item's own breakage is caught by its own scoped test.
210
+
211
+ **The diagnosis phase is read-only.** A diagnostician reads and reports; it does not edit.
212
+ `Edit`, `Write` and `MultiEdit` are forbidden there, and the reason is mechanical rather
213
+ than stylistic: the file set it reports is the only input the topology step has, so a
214
+ diagnostician that also wrote files would be reporting a guess.
215
+
216
+ **Risk surfaces are judged per item, not per batch.** An item that touches any of the risk
217
+ surfaces in §2 of `../peaks-code/references/fast-lane-norm.md` is pulled out of the batch
218
+ and takes the single-task path on its own. That list lives in the norm and is not restated
219
+ here; read it, judge each item against it, and pull the ones that hit it. A batch is not a
220
+ way to carry a task that does not belong in this lane.
221
+
222
+ **Where this lane leaves the window.** Batch mode is the only place it does, and only for
223
+ the read-only diagnosis phase: the diagnosis fan-out writes nothing, and every write stays
224
+ in this window.