peaks-loop 4.0.39 → 4.0.41

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 CHANGED
@@ -1,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.41 — 2026-09-11 (闸门指导不再鼓励"每次编辑前念一遍")
4
+
5
+ **Highlights**:
6
+
7
+ 1. **4.0.40 的措辞修好了"误读",但没修"频率" —— 这一版修频率。** 用户在 Mac 上继续工作时反馈:闸门仍然频繁打断。查下去发现**真正被烧掉的时间不是拒绝本身,而是一个仪式** —— 被告诉"预期每个文件被拦一次"之后,模型很自然地选择**预防**:在每次编辑前先把那四条事实念一遍,好让拒绝根本不出现。用户日志里那些重复的 `[Fact-Force Gate] 1..4` 块**是模型自己的话,不是闸门的输出**(闸门自称 `Fact-Forcing`,列的问题也不同)。每次编辑多一次「思考 10 秒 + 复述」,累起来就是他看到的 5 分钟。
8
+
9
+ - 现在指导明确要求:**不要预防性复述,闸门问的时候再答。** 拒绝是减速带,不是飞行前检查单。
10
+
11
+ 2. **顺带记录了一条会读成"我退步了"的闸门行为。** 闲置约 30 分钟后,钩子会**删掉自己的状态文件**(`SESSION_TIMEOUT_MS`),清空"已通过"清单 —— 于是**之前已经放行的文件会再次被拦**。不知情的话,这读起来像模型又犯了错。指导里现在写明了:那是闸门在重置,不是你在退步。
12
+
13
+ 3. **同时记下三个可用的旋钮**(闸门自带,非 peaks 引入):`GATEGUARD_EXEMPT_GLOBS`(逗号分隔 glob,加进去的路径直接豁免 —— peaks 写入时**取并集**,不会覆盖你写的)、`GATEGUARD_FACT_FORCE_FULL_DENIALS`(拒绝预算)、`GATEGUARD_DISABLED=1`(整个关掉)。**测试目录这类"没什么事实可建立"的路径,加一条 glob 就不再拦**。
14
+
15
+ **验证**:三个版本常量一致(4.0.41);`tsc -p tsconfig.build.json` exit 0;宽 `tsconfig.json` 保持 **142** 基线;`tests/unit` **188 files / 1794 passed / 3 skipped / 0 failed**。
16
+
17
+ ## 4.0.40 — 2026-09-11 (两条被 4.0.39 暴露出来的既有缺陷)
18
+
19
+ **Highlights**:
20
+
21
+ 1. **4.0.39 的闸门指导写了一个错误的因果 —— 已更正。** 那段文字告诉每个技能:"编辑前先读这个文件,**跳过这一步会撞上闸门**"。**这是假的。** 用户在 Mac 上装完 4.0.39 后拿实际日志打回来,促使我们去读 ECC 闸门的源码(`gateguard-fact-force.js`):
22
+
23
+ ```js
24
+ if (!isChecked(filePath)) {
25
+ markCheckedAndCountDenial(filePath); // 同一个调用里:先标记,再拒绝
26
+ return denyResult(...);
27
+ }
28
+ return rawInput; // 第二次直接放行
29
+ ```
30
+
31
+ **它是"每个路径首次接触拒绝一次"的减速带,不是"你有没有读过"的检查。** 先读**并不能**避免拒绝;拒绝由"编辑"触发,与是否读过无关。而给一个错的因果**比不给更糟** —— 模型照做了、仍被拦时,会得出"我哪里做错了",这正是这段指导本来要防的误读。现在它陈述真实机制与真实对策:每个文件预期被拦一次,**那不是失败、编辑未被应用、重试即放行**。
32
+
33
+ - 顺带记录边界:子代理豁免(父会话已过闸);`.peaks/**` 经 `GATEGUARD_EXEMPT_GLOBS` 豁免;**重试是否放行与"有没有列出那四条事实"无关** —— 闸门不校验事实。
34
+ - **闸门本身以后仍会拦**,那是它被设计成这样的;peaks 不该也无法替非 `.peaks/**` 路径压制它。能改的只是让模型别误读。
35
+
36
+ 2. **四个 `SKILL.md` 的 frontmatter 是无效 YAML,其中两个的 `description` 从未被加载过。** `peaks-perf-audit` 与 `peaks-security-audit` 的 `sources:` 里有未加引号的 `schemaVersion: 2`,YAML 把其中的冒号+空格读成嵌套映射的开头,整个 frontmatter 解析失败 —— 而 Claude Code 在解析失败时会**回退到闭合 `---` 之后的第一行**,于是它们的 description 从未生效,**两个技能都无法按自己的描述被发现**。
37
+
38
+ - **这个缺陷为何一直看不见:** 回退渲染出来的是紧跟其后的标题(`# peaks-perf-audit`),**读起来像标题而不像损坏**。只有当 4.0.39 把 loop-hygiene 块放进那个位置后,技能列表开始显示块里的 HTML 注释,它才显形。
39
+ - `peaks-issue-fix-orchestrator` 与 `peaks-sop` 带同样的病(值里未加引号的 `: `)。Claude Code 自己的解析器足够宽松能读它们,所以看着正常,但它们不是合法 YAML,任何更严格的读取方都会拒绝。
40
+ - 四处均已加引号,**逐字验证无损**(重写的两条描述 662 / 654 字符前后完全一致)。
41
+ - 新增守卫:每个 `SKILL.md` 的 frontmatter 必须能解析为 YAML 且产出可用的 `description`。
42
+
43
+ **验证**:三个版本常量一致(4.0.40);`tsc -p tsconfig.build.json` exit 0;宽 `tsconfig.json` 保持 **142** 基线;`tests/unit` **188 files / 1794 passed / 3 skipped / 0 failed**。
44
+
3
45
  ## 4.0.39 — 2026-09-11 (四条"死机制" + 可见的 OCR 获取)
4
46
 
5
47
  **Highlights**:
package/README-en.md CHANGED
@@ -140,7 +140,7 @@ Every lane opens with **one slash command**.
140
140
 
141
141
  | | |
142
142
  | --- | --- |
143
- | **Latest** | [![npm](https://img.shields.io/npm/v/peaks-loop?style=for-the-badge&logo=npm&logoColor=white&color=cb3837)](https://www.npmjs.com/package/peaks-loop) — 4.0.39 (2026-09-11) |
143
+ | **Latest** | [![npm](https://img.shields.io/npm/v/peaks-loop?style=for-the-badge&logo=npm&logoColor=white&color=cb3837)](https://www.npmjs.com/package/peaks-loop) — 4.0.41 (2026-09-11) |
144
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`) |
145
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 |
146
146
  | **Test suite** | 285+ cases · 4 packages (peaks-loop / peaks-loop-mut / peaks-loop-shared-channel / peaks-loop-shared) · **0 timeouts** · 14 BDD caller-binding edge cases |
package/README.md CHANGED
@@ -140,7 +140,7 @@ npm i -g peaks-loop
140
140
 
141
141
  | | |
142
142
  | --- | --- |
143
- | **最新版本** | [![npm](https://img.shields.io/npm/v/peaks-loop?style=for-the-badge&logo=npm&logoColor=white&color=cb3837)](https://www.npmjs.com/package/peaks-loop) — 4.0.39(2026-09-11) |
143
+ | **最新版本** | [![npm](https://img.shields.io/npm/v/peaks-loop?style=for-the-badge&logo=npm&logoColor=white&color=cb3837)](https://www.npmjs.com/package/peaks-loop) — 4.0.41(2026-09-11) |
144
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` 切片) |
145
145
  | **沉淀池** | `~/.peaks/` 本地池 · 跑两次自动晋升成 bee · 跑翻车让你重定义 · bee 跟着你的口味长 |
146
146
  | **测试套件** | 1096 cases · 4 packages (peaks-loop 1015 / runtime 39 / mut 22 / shared-channel 20) · **CI 首次全绿**(ubuntu + windows) · 14 BDD caller-binding coverage |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peaks-loop",
3
- "version": "4.0.39",
3
+ "version": "4.0.41",
4
4
  "description": "Loop Engineering CLI — workflow primitive / loop guards / evaluators / slice orchestration",
5
5
  "author": "SquabbyZ",
6
6
  "keywords": [
@@ -101,10 +101,10 @@
101
101
  "fzf": "^0.5.2",
102
102
  "yaml": "^2.9.0",
103
103
  "zod": "^4.4.3",
104
- "peaks-loop-internal-runtime": "0.0.24",
105
- "peaks-loop-shared-channel": "0.0.41",
106
- "peaks-loop-shared": "0.0.73",
107
- "peaks-loop-mut": "0.1.37"
104
+ "peaks-loop-internal-runtime": "0.0.26",
105
+ "peaks-loop-shared-channel": "0.0.43",
106
+ "peaks-loop-mut": "0.1.39",
107
+ "peaks-loop-shared": "0.0.75"
108
108
  },
109
109
  "devDependencies": {
110
110
  "@changesets/cli": "2.31.1",
@@ -6,9 +6,9 @@ metadata:
6
6
  appliesTo: peaks-loop v2.12.0+
7
7
  replaces: peaks-rd 5-way fan-out perf-baseline-reviewer slot (per AC-3.x)
8
8
  sources:
9
- - handoff: .peaks/_runtime/<sessionId>/prd/handoff.md (sha256-locked, schemaVersion: 2)
10
- - template: .peaks/project-scan/perf-template.md (git-tracked, schemaVersion: 1)
11
- - output: .peaks/_runtime/<sessionId>/audit/perf-<rid>.md (frontmatter schemaVersion: 1)
9
+ - handoff: ".peaks/_runtime/<sessionId>/prd/handoff.md (sha256-locked, schemaVersion: 2)"
10
+ - template: ".peaks/project-scan/perf-template.md (git-tracked, schemaVersion: 1)"
11
+ - output: ".peaks/_runtime/<sessionId>/audit/perf-<rid>.md (frontmatter schemaVersion: 1)"
12
12
  - schema: .peaks/project-scan/audit-output-schema.md
13
13
  ---
14
14
 
@@ -27,13 +27,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
27
27
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
28
28
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
29
29
 
30
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
31
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
32
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
33
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
34
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
35
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
36
- Do not switch tools, do not give up, do not retry blindly.
30
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
31
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
32
+ config); `.peaks/**` writes are exempt.
33
+
34
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
35
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
36
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
37
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
38
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
39
+ denial actually arrives.
40
+
41
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
42
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
43
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
44
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
45
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
46
+ denied again after a long pause. That is the gate resetting, not you regressing.
37
47
  <!-- /peaks:loop-hygiene -->
38
48
 
39
49
  # peaks-perf-audit
@@ -23,13 +23,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
23
23
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
24
24
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
25
25
 
26
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
27
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
28
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
29
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
30
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
31
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
32
- Do not switch tools, do not give up, do not retry blindly.
26
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
27
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
28
+ config); `.peaks/**` writes are exempt.
29
+
30
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
31
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
32
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
33
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
34
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
35
+ denial actually arrives.
36
+
37
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
38
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
39
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
40
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
41
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
42
+ denied again after a long pause. That is the gate resetting, not you regressing.
33
43
  <!-- /peaks:loop-hygiene -->
34
44
  ---
35
45
 
@@ -23,13 +23,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
23
23
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
24
24
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
25
25
 
26
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
27
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
28
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
29
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
30
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
31
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
32
- Do not switch tools, do not give up, do not retry blindly.
26
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
27
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
28
+ config); `.peaks/**` writes are exempt.
29
+
30
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
31
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
32
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
33
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
34
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
35
+ denial actually arrives.
36
+
37
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
38
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
39
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
40
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
41
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
42
+ denied again after a long pause. That is the gate resetting, not you regressing.
33
43
  <!-- /peaks:loop-hygiene -->
34
44
  ---
35
45
 
@@ -24,13 +24,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
24
24
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
25
25
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
26
26
 
27
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
28
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
29
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
30
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
31
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
32
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
33
- Do not switch tools, do not give up, do not retry blindly.
27
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
28
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
29
+ config); `.peaks/**` writes are exempt.
30
+
31
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
32
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
33
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
34
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
35
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
36
+ denial actually arrives.
37
+
38
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
39
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
40
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
41
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
42
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
43
+ denied again after a long pause. That is the gate resetting, not you regressing.
34
44
  <!-- /peaks:loop-hygiene -->
35
45
  ---
36
46
 
@@ -19,13 +19,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
19
19
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
20
20
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
21
21
 
22
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
23
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
24
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
25
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
26
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
27
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
28
- Do not switch tools, do not give up, do not retry blindly.
22
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
23
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
24
+ config); `.peaks/**` writes are exempt.
25
+
26
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
27
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
28
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
29
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
30
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
31
+ denial actually arrives.
32
+
33
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
34
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
35
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
36
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
37
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
38
+ denied again after a long pause. That is the gate resetting, not you regressing.
29
39
  <!-- /peaks:loop-hygiene -->
30
40
 
31
41
  ## Single-scope-axis naming convention
@@ -23,13 +23,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
23
23
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
24
24
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
25
25
 
26
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
27
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
28
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
29
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
30
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
31
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
32
- Do not switch tools, do not give up, do not retry blindly.
26
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
27
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
28
+ config); `.peaks/**` writes are exempt.
29
+
30
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
31
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
32
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
33
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
34
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
35
+ denial actually arrives.
36
+
37
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
38
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
39
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
40
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
41
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
42
+ denied again after a long pause. That is the gate resetting, not you regressing.
33
43
  <!-- /peaks:loop-hygiene -->
34
44
  ---
35
45
 
@@ -6,9 +6,9 @@ metadata:
6
6
  appliesTo: peaks-loop v2.12.0+
7
7
  replaces: peaks-rd 5-way fan-out security-reviewer slot (per AC-2.x)
8
8
  sources:
9
- - handoff: .peaks/_runtime/<sessionId>/prd/handoff.md (sha256-locked, schemaVersion: 2)
10
- - template: .peaks/project-scan/security-template.md (git-tracked, schemaVersion: 1)
11
- - output: .peaks/_runtime/<sessionId>/audit/security-<rid>.md (frontmatter schemaVersion: 1)
9
+ - handoff: ".peaks/_runtime/<sessionId>/prd/handoff.md (sha256-locked, schemaVersion: 2)"
10
+ - template: ".peaks/project-scan/security-template.md (git-tracked, schemaVersion: 1)"
11
+ - output: ".peaks/_runtime/<sessionId>/audit/security-<rid>.md (frontmatter schemaVersion: 1)"
12
12
  - schema: .peaks/project-scan/audit-output-schema.md
13
13
  ---
14
14
 
@@ -27,13 +27,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
27
27
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
28
28
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
29
29
 
30
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
31
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
32
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
33
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
34
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
35
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
36
- Do not switch tools, do not give up, do not retry blindly.
30
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
31
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
32
+ config); `.peaks/**` writes are exempt.
33
+
34
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
35
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
36
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
37
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
38
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
39
+ denial actually arrives.
40
+
41
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
42
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
43
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
44
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
45
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
46
+ denied again after a long pause. That is the gate resetting, not you regressing.
37
47
  <!-- /peaks:loop-hygiene -->
38
48
 
39
49
  # peaks-security-audit
@@ -23,13 +23,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
23
23
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
24
24
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
25
25
 
26
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
27
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
28
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
29
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
30
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
31
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
32
- Do not switch tools, do not give up, do not retry blindly.
26
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
27
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
28
+ config); `.peaks/**` writes are exempt.
29
+
30
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
31
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
32
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
33
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
34
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
35
+ denial actually arrives.
36
+
37
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
38
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
39
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
40
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
41
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
42
+ denied again after a long pause. That is the gate resetting, not you regressing.
33
43
  <!-- /peaks:loop-hygiene -->
34
44
  ---
35
45
 
@@ -23,13 +23,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
23
23
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
24
24
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
25
25
 
26
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
27
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
28
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
29
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
30
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
31
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
32
- Do not switch tools, do not give up, do not retry blindly.
26
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
27
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
28
+ config); `.peaks/**` writes are exempt.
29
+
30
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
31
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
32
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
33
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
34
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
35
+ denial actually arrives.
36
+
37
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
38
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
39
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
40
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
41
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
42
+ denied again after a long pause. That is the gate resetting, not you regressing.
33
43
  <!-- /peaks:loop-hygiene -->
34
44
  ---
35
45
 
@@ -18,13 +18,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
18
18
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
19
19
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
20
20
 
21
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
22
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
23
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
24
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
25
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
26
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
27
- Do not switch tools, do not give up, do not retry blindly.
21
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
22
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
23
+ config); `.peaks/**` writes are exempt.
24
+
25
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
26
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
27
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
28
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
29
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
30
+ denial actually arrives.
31
+
32
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
33
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
34
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
35
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
36
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
37
+ denied again after a long pause. That is the gate resetting, not you regressing.
28
38
  <!-- /peaks:loop-hygiene -->
29
39
 
30
40
  ## Single-scope-axis naming convention
@@ -18,13 +18,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
18
18
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
19
19
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
20
20
 
21
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
22
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
23
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
24
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
25
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
26
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
27
- Do not switch tools, do not give up, do not retry blindly.
21
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
22
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
23
+ config); `.peaks/**` writes are exempt.
24
+
25
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
26
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
27
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
28
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
29
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
30
+ denial actually arrives.
31
+
32
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
33
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
34
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
35
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
36
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
37
+ denied again after a long pause. That is the gate resetting, not you regressing.
28
38
  <!-- /peaks:loop-hygiene -->
29
39
 
30
40
  > **Detached sub-agent mode (Phase A, slice 2026-08-10).** When the orchestrator requires true parallelism with isolated context windows and survives orchestrator session exit, dispatch sub-agents with `--mode detached --vendor <claude|codex|copilot>`. The CLI spawns a real OS process via `ProcessSupervisor` (Windows `DETACHED_PROCESS` + `CREATE_NEW_PROCESS_GROUP`, POSIX `setsid` + `nohup`); the child vendor LLM receives a 5–8KB minimum prompt slice (no orchestrator session history) and self-compacts at 0.85 / 0.95 against the vendor window via the `<peaks-auto-compact>` marker (G8 — unlimited spend authorized). Orchestrator MUST emit one line of prose before every detached dispatch: `⏳ Spawning detached sub-agent via <vendor>: rid=<rid> (ETA ~60s)`. Status is read from `.peaks/_runtime/<sid>/detached/<rid>/status.json`; `LifecycleOwner` enforces 100% cleanup of `pid` / `log.txt` / `status.json` / `owner-session` on every exit path. `--no-throttle --max-concurrent <N>` bypasses `ResourceBudgetGuard` (user accepts risk; default max=8). See `references/sub-agent-dispatch.md` §"Detached Mode" for the full contract. Default mode remains `in-process` for backward compat (existing 106+ dispatch tests untouched).
@@ -18,13 +18,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
18
18
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
19
19
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
20
20
 
21
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
22
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
23
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
24
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
25
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
26
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
27
- Do not switch tools, do not give up, do not retry blindly.
21
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
22
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
23
+ config); `.peaks/**` writes are exempt.
24
+
25
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
26
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
27
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
28
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
29
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
30
+ denial actually arrives.
31
+
32
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
33
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
34
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
35
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
36
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
37
+ denied again after a long pause. That is the gate resetting, not you regressing.
28
38
  <!-- /peaks:loop-hygiene -->
29
39
 
30
40
  # peaks-content
@@ -19,13 +19,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
19
19
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
20
20
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
21
21
 
22
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
23
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
24
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
25
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
26
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
27
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
28
- Do not switch tools, do not give up, do not retry blindly.
22
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
23
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
24
+ config); `.peaks/**` writes are exempt.
25
+
26
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
27
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
28
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
29
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
30
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
31
+ denial actually arrives.
32
+
33
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
34
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
35
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
36
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
37
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
38
+ denied again after a long pause. That is the gate resetting, not you regressing.
29
39
  <!-- /peaks:loop-hygiene -->
30
40
  ---
31
41
 
@@ -18,13 +18,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
18
18
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
19
19
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
20
20
 
21
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
22
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
23
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
24
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
25
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
26
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
27
- Do not switch tools, do not give up, do not retry blindly.
21
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
22
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
23
+ config); `.peaks/**` writes are exempt.
24
+
25
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
26
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
27
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
28
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
29
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
30
+ denial actually arrives.
31
+
32
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
33
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
34
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
35
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
36
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
37
+ denied again after a long pause. That is the gate resetting, not you regressing.
28
38
  <!-- /peaks:loop-hygiene -->
29
39
 
30
40
  ## Single-scope-axis naming convention
@@ -19,13 +19,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
19
19
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
20
20
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
21
21
 
22
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
23
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
24
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
25
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
26
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
27
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
28
- Do not switch tools, do not give up, do not retry blindly.
22
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
23
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
24
+ config); `.peaks/**` writes are exempt.
25
+
26
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
27
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
28
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
29
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
30
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
31
+ denial actually arrives.
32
+
33
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
34
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
35
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
36
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
37
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
38
+ denied again after a long pause. That is the gate resetting, not you regressing.
29
39
  <!-- /peaks:loop-hygiene -->
30
40
  ---
31
41
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: peaks-issue-fix-orchestrator
3
- description: End-to-end orchestrator that surveys open issues in a target repo, classifies them by difficulty, mines reference merged-PRs, fixes each issue with real commits (with Repository + AI-modified declaration), writes normalized PR description files, and emits a one-line submit script. Use when the user wants to drive a "fix N open issues and prepare PRs" run on an upstream repo (any language; primarily Python + TypeScript). Reuses Loop Engineering primitives: 4-layer asset model, Darwin ratchet, karpathy-engineered red lines, Human-NL-Choice-Only. Triggers on `/peaks-issue-fix-orchestrator`, "fix 30 issues", "dogfood on <repo>", "open-issue sweep on <repo>".
3
+ description: 'End-to-end orchestrator that surveys open issues in a target repo, classifies them by difficulty, mines reference merged-PRs, fixes each issue with real commits (with Repository + AI-modified declaration), writes normalized PR description files, and emits a one-line submit script. Use when the user wants to drive a "fix N open issues and prepare PRs" run on an upstream repo (any language; primarily Python + TypeScript). Reuses Loop Engineering primitives: 4-layer asset model, Darwin ratchet, karpathy-engineered red lines, Human-NL-Choice-Only. Triggers on `/peaks-issue-fix-orchestrator`, "fix 30 issues", "dogfood on <repo>", "open-issue sweep on <repo>".'
4
4
  ---
5
5
 
6
6
  <!-- peaks:loop-hygiene — generated block; keep byte-identical in every SKILL.md -->
@@ -18,13 +18,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
18
18
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
19
19
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
20
20
 
21
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
22
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
23
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
24
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
25
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
26
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
27
- Do not switch tools, do not give up, do not retry blindly.
21
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
22
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
23
+ config); `.peaks/**` writes are exempt.
24
+
25
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
26
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
27
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
28
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
29
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
30
+ denial actually arrives.
31
+
32
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
33
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
34
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
35
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
36
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
37
+ denied again after a long pause. That is the gate resetting, not you regressing.
28
38
  <!-- /peaks:loop-hygiene -->
29
39
 
30
40
  # peaks-issue-fix-orchestrator
@@ -18,13 +18,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
18
18
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
19
19
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
20
20
 
21
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
22
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
23
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
24
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
25
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
26
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
27
- Do not switch tools, do not give up, do not retry blindly.
21
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
22
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
23
+ config); `.peaks/**` writes are exempt.
24
+
25
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
26
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
27
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
28
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
29
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
30
+ denial actually arrives.
31
+
32
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
33
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
34
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
35
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
36
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
37
+ denied again after a long pause. That is the gate resetting, not you regressing.
28
38
  <!-- /peaks:loop-hygiene -->
29
39
 
30
40
  # Peaks-Loop Code Resume (wrapper)
@@ -18,13 +18,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
18
18
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
19
19
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
20
20
 
21
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
22
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
23
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
24
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
25
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
26
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
27
- Do not switch tools, do not give up, do not retry blindly.
21
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
22
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
23
+ config); `.peaks/**` writes are exempt.
24
+
25
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
26
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
27
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
28
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
29
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
30
+ denial actually arrives.
31
+
32
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
33
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
34
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
35
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
36
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
37
+ denied again after a long pause. That is the gate resetting, not you regressing.
28
38
  <!-- /peaks:loop-hygiene -->
29
39
 
30
40
  ## Single-scope-axis naming convention
@@ -29,13 +29,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
29
29
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
30
30
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
31
31
 
32
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
33
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
34
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
35
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
36
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
37
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
38
- Do not switch tools, do not give up, do not retry blindly.
32
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
33
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
34
+ config); `.peaks/**` writes are exempt.
35
+
36
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
37
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
38
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
39
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
40
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
41
+ denial actually arrives.
42
+
43
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
44
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
45
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
46
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
47
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
48
+ denied again after a long pause. That is the gate resetting, not you regressing.
39
49
  <!-- /peaks:loop-hygiene -->
40
50
 
41
51
  # peaks-solo — Dispatcher (分诊员)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: peaks-sop
3
- description: Authoring skill for user-defined SOPs (standard operating procedures) in Peaks. Use when a user wants to create, edit, debug, or register their own gated workflow — ordered phases plus gates that block advancement until conditions are met — by describing it in natural language instead of hand-writing JSON or memorizing CLI commands. DOMAIN-AGNOSTIC: not just software/release flows — equally for content publishing, compliance and approval checklists, data pipelines, onboarding, ops runbooks, or any personal repeatable procedure, wherever "don't enter the next stage until X is true" applies and X is checkable via a file, file content, or a command.
3
+ description: 'Authoring skill for user-defined SOPs (standard operating procedures) in Peaks. Use when a user wants to create, edit, debug, or register their own gated workflow — ordered phases plus gates that block advancement until conditions are met — by describing it in natural language instead of hand-writing JSON or memorizing CLI commands. DOMAIN-AGNOSTIC: not just software/release flows — equally for content publishing, compliance and approval checklists, data pipelines, onboarding, ops runbooks, or any personal repeatable procedure, wherever "don''t enter the next stage until X is true" applies and X is checkable via a file, file content, or a command.'
4
4
  ---
5
5
 
6
6
  <!-- peaks:loop-hygiene — generated block; keep byte-identical in every SKILL.md -->
@@ -18,13 +18,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
18
18
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
19
19
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
20
20
 
21
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
22
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
23
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
24
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
25
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
26
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
27
- Do not switch tools, do not give up, do not retry blindly.
21
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
22
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
23
+ config); `.peaks/**` writes are exempt.
24
+
25
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
26
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
27
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
28
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
29
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
30
+ denial actually arrives.
31
+
32
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
33
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
34
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
35
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
36
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
37
+ denied again after a long pause. That is the gate resetting, not you regressing.
28
38
  <!-- /peaks:loop-hygiene -->
29
39
 
30
40
  # Peaks-Loop SOP Authoring
@@ -18,13 +18,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
18
18
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
19
19
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
20
20
 
21
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
22
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
23
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
24
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
25
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
26
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
27
- Do not switch tools, do not give up, do not retry blindly.
21
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
22
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
23
+ config); `.peaks/**` writes are exempt.
24
+
25
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
26
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
27
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
28
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
29
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
30
+ denial actually arrives.
31
+
32
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
33
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
34
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
35
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
36
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
37
+ denied again after a long pause. That is the gate resetting, not you regressing.
28
38
  <!-- /peaks:loop-hygiene -->
29
39
 
30
40
  # Peaks-Loop Code Status (wrapper)
@@ -18,13 +18,23 @@ ratio in one line if it helps, but never hand them the compaction step: asking t
18
18
  run `/compact` is the regression the zero-pause contract forbids. This holds in **every
19
19
  mode** — standard *and* 24h. The mode moves the threshold, never the obligation.
20
20
 
21
- **Read before you edit.** Read a file BEFORE your first `Edit` / `Write` / `MultiEdit` on
22
- it — for every path outside `.peaks/**` (source, tests, docs, config); `.peaks/**` writes
23
- are exempt. Skipping that read trips a `PreToolUse` gate (ECC's "Fact-Forcing Gate"),
24
- which denies the edit. **A denial is not a failure and the tool is not broken — your edit
25
- was not applied.** Read the file, state the facts the gate asks for (importers, affected
26
- API, data schemas if any, the user's verbatim instruction), then retry the same operation.
27
- Do not switch tools, do not give up, do not retry blindly.
21
+ **Read before you edit.** Read a file before your first `Edit` / `Write` / `MultiEdit` on
22
+ it — the normal way to work here — for every path outside `.peaks/**` (source, tests, docs,
23
+ config); `.peaks/**` writes are exempt.
24
+
25
+ **Expect one denial per file anyway — and do NOT pre-empt it.** A `PreToolUse` gate (ECC's
26
+ "Fact-Forcing Gate") denies the FIRST edit a session makes to any given path, once, by
27
+ design. Reading does NOT prevent it: the gate keys on the path's first touch, not on whether
28
+ you read it. **Do not recite its four questions before every edit** — it asks when it wants
29
+ them, and reciting unprompted burns a round-trip per file for nothing. Answer only when a
30
+ denial actually arrives.
31
+
32
+ **When one does arrive:** a denial is not a failure and the tool is not broken — your edit
33
+ was NOT applied. State the facts it asks for (importers, affected API, data schemas if any,
34
+ the user's verbatim instruction), then retry the SAME operation. The retry is allowed. Do not
35
+ switch tools, do not give up, do not retry blindly. One more thing worth knowing: an idle gap
36
+ of ~30 minutes clears the gate's "already passed" list, so a file you cleared earlier can be
37
+ denied again after a long pause. That is the gate resetting, not you regressing.
28
38
  <!-- /peaks:loop-hygiene -->
29
39
 
30
40
  # Peaks-Loop Code Test (wrapper)