@andares/pi-toolkits 1.2.3 → 1.2.5

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
@@ -11,9 +11,19 @@ renames that heading to the version being published and refuses an empty section
11
11
 
12
12
  <!-- Notes for the next release go here; `pnpm release` renames this heading. -->
13
13
 
14
- ## 1.2.3 — 2026-11-26
14
+ ## 1.2.5 — 2026-11-30
15
15
 
16
- <!-- Notes for the next release go here; `pnpm release` renames this heading. -->
16
+ - **ask-spec** — `/ask-spec` without arguments now arms the phase instead of starting it from an empty topic: the next message you send (multi-line, pasted, whole paragraphs) becomes the spec brief, and its first line names the draft file. Running the bare command again, or `/ask-spec off`, cancels before anything starts.
17
+ - **host compatibility** — the supported pi range moves to `pi >= 1.0.0`, verified 1.0.0 through 1.7.0 (window 1.4–1.7 plus the 1.3/1.2/1.1/1.0 probes, every published version, full gate). Nothing in this plugin needed a code change for 1.7.0; the keys and the mirrored compaction files are unchanged.
18
+
19
+ ## 1.2.4 — 2026-11-28
20
+
21
+ - **ask-review / ask-spec** — the retired command spellings `/third-review` and `/ask-plan` are no longer registered; use `/ask-review` and `/ask-spec`. An autostart entry still spelled the old way is skipped with a warning instead of being sent to the model as chat.
22
+ - **spec** — a new note starts as `suggest` and the verdict pills read `suggest` / `must change` / `question`, so writing the everyday note no longer means undoing a default of `must change`.
23
+ - **release** — `pnpm release` now validates every release material before it runs a single gate: uncommitted work, an empty `## Unreleased`, a `package.json` without `CHANGELOG.md`, or a tag that already exists for the target version each stop it in seconds with a list of what to fix, instead of surfacing after the two-minute test run.
24
+ - **changelog** — released sections no longer keep the "notes for the next release go here" comment that used to be promoted along with them.
25
+
26
+ ## 1.2.3 — 2026-11-26
17
27
 
18
28
  - **spec/talk** — the contents panel keeps every heading row at its full height (a document with ~19 headings no longer squashes the rows into each other) and scrolls to the section you are reading when it opens.
19
29
  - **talk** — when a new reply replaces the snapshot, a draft still waiting to be saved belongs to the old reply and is dropped, so it no longer lands in the new one.
@@ -21,8 +31,6 @@ renames that heading to the version being published and refuses an empty section
21
31
 
22
32
  ## 1.2.2 — 2026-11-26
23
33
 
24
- <!-- Notes for the next release go here; `pnpm release` renames this heading. -->
25
-
26
34
  - **release** — `pnpm release` now treats a green `publish` workflow run as the release's success criterion and stops there: no more polling npm for the version and its attestation, just a summary with the tag, the run URL, the Release URL and a package-page link. Every child process it spawns has a deadline (ssh included), so the wait can no longer sit silently on a dead connection.
27
35
  - **quit-guard** — removed: `/quit-guard`, its settings file and the hang reports are gone. Force-exiting a hung shutdown never fixed the hang and hid the real cause, so pi is left to hang instead.
28
36
 
@@ -30,20 +38,14 @@ renames that heading to the version being published and refuses an empty section
30
38
 
31
39
  - **spec/talk** — both pages have a confirmed **Close** action that stops the review server without sending a decision or a reply, including a closed-state fallback when the server is already gone.
32
40
 
33
- <!-- Notes for the next release go here; `pnpm release` renames this heading. -->
34
-
35
41
  ## 1.2.0 — 2026-11-26
36
42
 
37
43
  - **talk** — `/ask-talk` opens the agent's last reply in the review page: one note per block plus a composer, and `Continue` sends just the notes and your message back — the reply itself is not re-quoted.
38
44
  - **spec** — the review page gets a contents strip at the reading column's edge: point at it to open a heading index, click a heading to jump; it follows the section you are reading.
39
45
  - **spec** — a `Back to top` button appears once the right-hand column has scrolled out of view, and stays above the footer.
40
46
 
41
- <!-- Notes for the next release go here; `pnpm release` renames this heading. -->
42
-
43
47
  ## 1.1.0 — 2026-11-25
44
48
 
45
- <!-- Notes for the next release go here; `pnpm release` renames this heading. -->
46
-
47
49
  - **spec** — running `/ask-spec` without arguments while a spec review is active now leaves the phase; `/ask-spec off` still works.
48
50
  - **spec** — after feedback, the next submitted revision starts a new review server and opens a new window instead of printing a dead URL; reopening a closed review restarts it, and the revision history is preserved.
49
51
  - **keep** — `/keep-quit` marks the current session unfinished and quits in one step; `/keep-load` lists that backlog, already-loaded rows dimmed but still selectable, and `/keep-drop` (or `ctrl+r` in the list) removes one.
@@ -53,8 +55,6 @@ renames that heading to the version being published and refuses an empty section
53
55
 
54
56
  ## 1.0.2 — 2026-11-24
55
57
 
56
- <!-- Notes for the next release go here; `pnpm release` renames this heading. -->
57
-
58
58
  - **host compatibility** — verified against every published pi release from 0.99.0 through 1.6.0 (window 1.3–1.6); the declared range stays `pi >= 0.99.0` with no upper bound, and the package loads cleanly on 1.6.0.
59
59
 
60
60
  ## 1.0.1 — 2026-11-17
@@ -64,8 +64,6 @@ renames that heading to the version being published and refuses an empty section
64
64
  - **spec review page** — the decision bar now carries *Only changed* and *Global notes* on the left and the total note count in the middle, with the explanatory footer text removed.
65
65
  - **ask-spec** — existing `<agent-dir>/ask-plan/` review histories are migrated to `<agent-dir>/ask-spec/` on first use.
66
66
 
67
- <!-- Notes for the next release go here; `pnpm release` renames this heading. -->
68
-
69
67
  ## 1.0.0 — 2026-11-15
70
68
 
71
69
  - **quit-guard** — a forced exit can no longer be defeated by a deadlock inside `process.exit` itself: after the report is written, a same-loop SIGKILL timer and then an independent worker thread guarantee the process ends (real hang observed 2026-11-13, process stuck 18 min with the pty already deleted).
@@ -76,8 +74,6 @@ renames that heading to the version being published and refuses an empty section
76
74
  - **ask** — phase guards: ask refuses to start on top of a plan review or the UAT page, a review exits ask mode and refuses while a plan is under review, and `/ask-init` refuses mutating runs while another phase owns the tree.
77
75
  - **init** — the audit now distinguishes a stale framework file from a hand edit, reports a missing workflow block, and treats bare legacy paths as a warning once the legacy directories are gone.
78
76
 
79
- <!-- Notes for the next release go here; `pnpm release` renames this heading. -->
80
-
81
77
  ## 0.14.0 — 2026-11-13
82
78
 
83
79
  - **whats-new** — the first interactive `pi` start after an upgrade shows what changed since the version you last ran, once, without registering a slash command.
@@ -110,9 +106,3 @@ renames that heading to the version being published and refuses an empty section
110
106
 
111
107
 
112
108
 
113
-
114
-
115
-
116
-
117
-
118
-
package/README.md CHANGED
@@ -10,12 +10,12 @@
10
10
  [![Pi package gallery](https://img.shields.io/badge/pi.dev-package%20gallery-6f42c1)](https://pi.dev/packages/@andares/pi-toolkits)
11
11
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
12
12
  [![Package Manager](https://img.shields.io/badge/package%20manager-pnpm-orange?logo=pnpm)](https://pnpm.io)
13
- [![pi >= 0.99](https://img.shields.io/badge/pi-%3E%3D0.99.0-blueviolet)](https://github.com/earendil-works/pi)
13
+ [![pi >= 1.0](https://img.shields.io/badge/pi-%3E%3D1.0.0-blueviolet)](https://github.com/earendil-works/pi)
14
14
  [![GitHub](https://img.shields.io/badge/github-andares%2Fpi--toolkits-181717?logo=github)](https://github.com/andares/pi-toolkits)
15
15
 
16
16
  In a nutshell: thirteen ready-to-use capabilities — **read-only consult mode** `ask`, **session-scoped boundary permission** `ask-perm`, **model favorites** `favorites`, **prompt stash** `stash`, **third-party code review** `ask-review`, **dedicated compaction model** `compact-model`, **session startup automation** `autostart`, an **agent memory framework** `ask-init`, a **spec review in the browser** `ask-spec`, **reply notes in the browser** `ask-talk`, an **acceptance ledger with a browser page** `ask-uat`, a **session backlog for parallel work** `keep`, and **release notes on the first start after an upgrade** `whats-new` — with more to come.
17
17
 
18
- **Requirements**: pi `>=0.99.0`. Every published pi release from 0.99.0 through 1.6.1 has been verified with the full gate (install → `tsc --noEmit` → full test suite → keybinding audit → hash compare of the host files this package patches), each in a sandbox with the whole `@earendil-works/*` family pinned to the version under test. Newer releases are verified as they ship and the floor moves only when the measurement says so; `pnpm check:compat` reproduces the result. Note: pi ≥ 0.99 hosts require host-provided packages to be declared in `peerDependencies` with a `"*"` range — `@earendil-works/pi-tui` and `typebox` (the `scratchpad` tool builds a TypeBox schema) are declared that way; an installed copy in `dependencies` would make pi warn.
18
+ **Requirements**: pi `>=1.0.0`. Every published pi release from 1.0.0 through 1.7.0 has been verified with the full gate (install → `tsc --noEmit` → full test suite → keybinding audit → hash compare of the host files this package patches), each in a sandbox with the whole `@earendil-works/*` family pinned to the version under test. There is no upper bound: newer releases are verified as they ship and the floor moves only when the measurement says so; `pnpm check:compat` reproduces the result. Note: pi ≥ 0.99 hosts require host-provided packages to be declared in `peerDependencies` with a `"*"` range — `@earendil-works/pi-tui` and `typebox` (the `scratchpad` tool builds a TypeBox schema) are declared that way; an installed copy in `dependencies` would make pi warn.
19
19
 
20
20
  ---
21
21
 
@@ -291,7 +291,9 @@ After a development task is done, type the `/ask-review` command to summon **a d
291
291
 
292
292
  <a name="spec"></a>
293
293
 
294
- `/ask-spec [topic]` opens a spec-review phase: the agent explores the code, asks what it cannot infer, and writes a spec — no code changes while the spec is under review. Then it calls `spec_submit`, the review opens in **your browser**, and you annotate it **paragraph by paragraph**: every blank-line-separated block can carry notes, and every note comes back to the agent as its next message. `/ask-plan` is kept as an alias.
294
+ `/ask-spec [topic]` opens a spec-review phase: the agent explores the code, asks what it cannot infer, and writes a spec — no code changes while the spec is under review. Then it calls `spec_submit`, the review opens in **your browser**, and you annotate it **paragraph by paragraph**: every blank-line-separated block can carry notes, and every note comes back to the agent as its next message. The pre-rename `/ask-plan` alias was removed.
295
+
296
+ - **A brief that does not fit on a command line.** Run `/ask-spec` with no arguments and the phase is only *armed*: nothing starts, nothing changes, and the next message you send — multi-line, pasted, whole paragraphs with lists and code — becomes the brief the review starts from. Its first line also names the default file (`specs/<slug>.md`). Typing the bare command again, or `/ask-spec off`, cancels before anything starts.
295
297
 
296
298
  - **Blocks are the unit of review.** Each paragraph is one block, with a badge telling you what changed since the previous round: `new`, `modified`, `moved`, `removed`. Unchanged blocks collapse, so a three-line edit does not look like a rewrite. Fenced code blocks stay whole.
297
299
  - **Two levels of notes.** On a block, or global. Nothing finer — no text ranges to re-anchor after an edit.
@@ -307,13 +309,15 @@ After a development task is done, type the `/ask-review` command to summon **a d
307
309
  **Browser on WSL**: the review server binds `0.0.0.0` and the URL is printed with the WSL address, because Windows cannot reach a loopback-only server inside WSL. The opener prefers a Windows-side launcher (`wslview`, `cmd.exe /c start`, `powershell Start-Process`) and only falls back to `xdg-open` elsewhere — that is the difference between "opens your browser" and "opens a browser inside WSL that you cannot see".
308
310
 
309
311
  ```text
310
- /ask-spec build the export feature # start the review
311
- /ask-spec open # re-open the review page
312
- /ask-spec # while reviewing: leave the phase
312
+ /ask-spec build the export feature # start the review from a one-line topic
313
+ /ask-spec # idle: arm it — your next message becomes the brief
314
+ /ask-spec # reviewing: leave the phase
313
315
  /ask-spec off # leave the phase (the draft stays where it is)
316
+ /ask-spec open # re-open the review page
314
317
  ```
315
318
 
316
- The spec lands in `specs/<slug>.md` — the same place `/ask-init` keeps specs. Without an
319
+ The spec lands in `specs/<slug>.md` — the same place `/ask-init` keeps specs, with the slug
320
+ coming from the topic or from the first line of an armed brief. Without an
317
321
  agent framework the review still works, but `record_change` and `/ask-uat` stay unavailable
318
322
  until `/ask-init`; the command says so when the review starts. Leave an open UAT page first:
319
323
  the two phases do not run on top of each other.
package/README.zh-CN.md CHANGED
@@ -10,12 +10,12 @@
10
10
  [![Pi package gallery](https://img.shields.io/badge/pi.dev-package%20gallery-6f42c1)](https://pi.dev/packages/@andares/pi-toolkits)
11
11
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
12
12
  [![Package Manager](https://img.shields.io/badge/package%20manager-pnpm-orange?logo=pnpm)](https://pnpm.io)
13
- [![pi >= 0.99](https://img.shields.io/badge/pi-%3E%3D0.99.0-blueviolet)](https://github.com/earendil-works/pi)
13
+ [![pi >= 1.0](https://img.shields.io/badge/pi-%3E%3D1.0.0-blueviolet)](https://github.com/earendil-works/pi)
14
14
  [![GitHub](https://img.shields.io/badge/github-andares%2Fpi--toolkits-181717?logo=github)](https://github.com/andares/pi-toolkits)
15
15
 
16
16
  一句话介绍:目前包含十三个开箱即用的功能——**只读咨询模式** `ask`、**会话级边界权限** `ask-perm`、**模型收藏** `favorites`、**提示词暂存** `stash`、**第三方代码评审** `ask-review`、**独立压缩模型** `compact-model`、**会话启动自动化** `autostart`、**agent 记忆框架** `ask-init`、**浏览器内规格评审** `ask-spec`、**回复批注** `ask-talk`、**验收台账与浏览器页面** `ask-uat`、**并行任务的会话暂存** `keep`、**升级后首次启动的版本变更提示** `whats-new`,后续持续追加。
17
17
 
18
- **版本要求**:pi `>=0.99.0`。0.99.0 到 1.6.1 的每一个已发布版本都用完整门禁实测过(install → `tsc --noEmit` → 全量测试 → 键位审计 → 对 patch 目标宿主文件做哈希比对),每个版本都在沙箱中把整个 `@earendil-works/*` 家族钉在同一版本。更新的版本随发布逐个验证,下限只在实测结果允许时移动;`pnpm check:compat` 可复现该结论。注:pi ≥ 0.99 的宿主要求「宿主提供的包」一律声明为 peerDependencies `"*"` —— `@earendil-works/pi-tui` 与 `typebox`(ask 的 `scratchpad` 用它构造参数 schema)都按此声明;若放进 `dependencies`,pi 会告警。
18
+ **版本要求**:pi `>=1.0.0`。1.0.0 到 1.7.0 的每一个已发布版本都用完整门禁实测过(install → `tsc --noEmit` → 全量测试 → 键位审计 → 对 patch 目标宿主文件做哈希比对),每个版本都在沙箱中把整个 `@earendil-works/*` 家族钉在同一版本。没有上界:更新的版本随发布逐个验证,下限只在实测结果允许时移动;`pnpm check:compat` 可复现该结论。注:pi ≥ 0.99 的宿主要求「宿主提供的包」一律声明为 peerDependencies `"*"` —— `@earendil-works/pi-tui` 与 `typebox`(ask 的 `scratchpad` 用它构造参数 schema)都按此声明;若放进 `dependencies`,pi 会告警。
19
19
 
20
20
  ---
21
21
 
@@ -291,7 +291,9 @@ run = ["/ask-perm allow allow allow ask"]
291
291
 
292
292
  <a name="spec"></a>
293
293
 
294
- `/ask-spec [主题]` 进入规格评审期:模型先调研、把代码里看不出来的问题问清楚,然后写一份 spec——评审期间不改代码。写完调用 `spec_submit`,评审页在**你的浏览器**里打开,你**逐段**批注:每个空行分隔的块都可以挂批注,批注会作为下一条消息回到模型。`/ask-plan` 保留为别名。
294
+ `/ask-spec [主题]` 进入规格评审期:模型先调研、把代码里看不出来的问题问清楚,然后写一份 spec——评审期间不改代码。写完调用 `spec_submit`,评审页在**你的浏览器**里打开,你**逐段**批注:每个空行分隔的块都可以挂批注,批注会作为下一条消息回到模型。改名前的 `/ask-plan` 别名已移除。
295
+
296
+ - **一整段需求塞不进命令行。** 不带参数执行 `/ask-spec` 只是**武装**:什么都不启动、什么都不改,你发下的**下一条消息**——多行、粘贴、带列表和代码的整篇需求——才是这次评审的依据,默认文件名 `specs/<slug>.md` 也取自它的第一行。再执行一次裸命令或用 `/ask-spec off`,在任何东西开始前取消。
295
297
 
296
298
  - **块是评审单位。** 每个空行分隔的段落是一块,徽标告诉你相对上一版改了什么:`new`、`modified`、`moved`、`removed`。未变的块会折叠,三行小改不会看起来像整篇重写;围栏代码块保持完整。
297
299
  - **两级批注。** 段落级,或全局;没有更细的文本范围批注,改完不需要重新锚定。
@@ -307,13 +309,15 @@ run = ["/ask-perm allow allow allow ask"]
307
309
  **WSL 下的浏览器**:评审服务器绑 `0.0.0.0`,URL 用 WSL 的地址打印,因为 Windows 连不到 WSL 里只绑 loopback 的服务器。打开器优先用 Windows 侧启动器(`wslview`、`cmd.exe /c start`、`powershell Start-Process`),其它平台才回落到 `xdg-open`——这决定了是「打开你的浏览器」还是「在 WSL 里打开一个你看不见的浏览器」。
308
310
 
309
311
  ```text
310
- /ask-spec 做导出功能 # 进入规格评审
311
- /ask-spec open # 重新打开评审页
312
- /ask-spec # 评审中再次执行:退出评审期
312
+ /ask-spec 做导出功能 # 用一行主题进入规格评审
313
+ /ask-spec # 空闲时:武装——下一条消息作为需求
314
+ /ask-spec # 评审中:退出评审期
313
315
  /ask-spec off # 退出评审期(草稿留在原处)
316
+ /ask-spec open # 重新打开评审页
314
317
  ```
315
318
 
316
- spec 落在 `specs/<slug>.md`——与 `/ask-init` 放 spec 的地方相同。没有 agent 框架时评审仍可用,
319
+ spec 落在 `specs/<slug>.md`——与 `/ask-init` 放 spec 的地方相同,slug 取自主题或武装时那条
320
+ 需求的第一行。没有 agent 框架时评审仍可用,
317
321
  但 `record_change` 与 `/ask-uat` 不可用,直到 `/ask-init`;命令在评审开始时会说明。
318
322
  UAT 页面开着时先退出:两个相位不叠在一起跑。
319
323
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andares/pi-toolkits",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Integrated toolkit extension for pi — ask mode (read-only Q&A), browser-reviewed planning, reply notes in the browser (/ask-talk), an acceptance ledger with a browser page, session-scoped permission checks, model favorites, prompt stash, third-party code review, session autostart, a dedicated compaction model, an agent memory framework (/ask-init), a session backlog (/keep-quit, /keep-load, /keep-drop), and release notes on the first start after an upgrade",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -53,7 +53,7 @@
53
53
  "session-backlog"
54
54
  ],
55
55
  "peerDependencies": {
56
- "@earendil-works/pi-coding-agent": ">=0.99.0",
56
+ "@earendil-works/pi-coding-agent": ">=1.0.0",
57
57
  "@earendil-works/pi-tui": "*",
58
58
  "typebox": "*"
59
59
  },
@@ -63,9 +63,9 @@
63
63
  "smol-toml": "^1.9.0"
64
64
  },
65
65
  "devDependencies": {
66
- "@earendil-works/pi-ai": "^1.6.0",
67
- "@earendil-works/pi-coding-agent": "^1.6.0",
68
- "@earendil-works/pi-tui": "^1.6.0",
66
+ "@earendil-works/pi-ai": "^1.7.0",
67
+ "@earendil-works/pi-coding-agent": "^1.7.0",
68
+ "@earendil-works/pi-tui": "^1.7.0",
69
69
  "@types/node": "^26.6.2",
70
70
  "typebox": "^1.3.27",
71
71
  "typescript": "^5.6.0",
@@ -48,7 +48,7 @@ export const RUNNABLE_REASONS: ReadonlySet<string> = new Set([
48
48
  * `-r` (`--resume`), `--session <path>` and `--fork <path>` all open an
49
49
  * existing session *before* the first runtime exists, and that runtime is
50
50
  * created without an explicit session_start event, so extensions see pi's
51
- * default reason — `startup` — not `resume` (verified on pi 1.2.0–1.6.0:
51
+ * default reason — `startup` — not `resume` (verified on pi 1.2.0–1.7.0:
52
52
  * `main.js` builds the initial session manager from those flags and calls
53
53
  * `createAgentSessionRuntime` with no `sessionStartEvent`;
54
54
  * `agent-session.js` defaults it to `{ reason: "startup" }`). `resume` is only
@@ -27,11 +27,11 @@
27
27
  * that flag is what routes "/cmd args" through _tryExecuteExtensionCommand
28
28
  * instead of the model prompt path. The wrapper defaults it to false in this
29
29
  * package. `_tryExecuteExtensionCommand` is byte-identical across every
30
- * published version of the supported window (1.3.0 → 1.6.0); `sendUserMessage`
30
+ * published version of the supported window (1.4.0 → 1.7.0); `sendUserMessage`
31
31
  * itself was refactored in 1.5.1 (the rest of the body moved into
32
32
  * `_preparePrompt`, #9154), but the extension-command branch is still the
33
33
  * first early exit of the wrapper, so `/cmd args` never reaches the model
34
- * prompt path (1.6.0 left `sendUserMessage` and `_preparePrompt`
34
+ * prompt path (1.6.0 → 1.7.0 left `sendUserMessage` and `_preparePrompt`
35
35
  * byte-identical). See AGENTS.md host-compat discipline for the version matrix.
36
36
  *
37
37
  * Only extension commands can run this way. Built-in commands (/compact,
@@ -135,7 +135,7 @@ async function completeSummary(
135
135
  * over).
136
136
  *
137
137
  * 1.4.0 changed two things this mirror covers, and we follow 1.4.0 for every
138
- * host in the supported window (1.2.0 → 1.5.1) because both are bug fixes
138
+ * host in the supported window (1.4.0 → 1.7.0) because both are bug fixes
139
139
  * rather than behavior we could sensibly keep per version:
140
140
  * - summaries no longer cap maxTokens at 0.8/0.5 × reserveTokens; the
141
141
  * request omits maxTokens so the provider uses the model's output limit
@@ -8,8 +8,8 @@
8
8
  * bindings — only the cycle semantics change (patch-cycle.ts), so no
9
9
  * keybinding conflicts arise.
10
10
  *
11
- * Verified against every published version of the supported range
12
- * (0.99.0 → 1.5.1) keybinding tables + pi-tui input dispatch on WSL2 +
11
+ * Keybinding tables audited against every published version in the supported
12
+ * range (1.0.0 → 1.7.0), with pi-tui input dispatch checked on WSL2 +
13
13
  * Windows Terminal; re-run `pnpm check:keybindings` after every host upgrade
14
14
  * before trusting this.
15
15
  */
@@ -15,9 +15,10 @@
15
15
  * model available" feedback); otherwise jump to it
16
16
  * - the apply logic mirrors pi's _cycleScopedModel/_cycleAvailableModel
17
17
  * (byte-identical across every published version in the supported window
18
- * 1.2.0 → 1.5.1 — `cycleModel` itself is untouched by 1.4.0's recovery and
19
- * tool-restore rewrites, by 1.5.0's auth-routing/loadout-ordering changes
20
- * and by 1.5.1's extraction of the index math into `getNextCycleIndex`
18
+ * 1.4.0 → 1.7.0 — `cycleModel` itself is untouched by 1.4.0's recovery and
19
+ * tool-restore rewrites, by 1.5.0's auth-routing/loadout-ordering changes,
20
+ * by the later 1.6.x changes and by 1.7.0, and by 1.5.1's extraction of
21
+ * the index math into `getNextCycleIndex`
21
22
  * (that refactor lives in `_cycleScopedModel`/`_cycleAvailableModel`, which
22
23
  * this patch replaces rather than calls; the semantics it encodes —
23
24
  * wrap-around, and "current model not in the list → forward first /
@@ -22,7 +22,7 @@
22
22
  * keeps loading and ctrl+p falls back to stock behavior. The prototype
23
23
  * shape touched here (handleInput/updateList/filterModels and the instance
24
24
  * fields below) is unchanged across the mandatory window
25
- * pi 1.3.0 → 1.6.0 (and exercised by the 0.99.0 → 1.2.0 backward probes).
25
+ * pi 1.4.0 → 1.7.0 (and exercised by the 1.0.0 → 1.3.0 backward probes).
26
26
  * updateList gained one layout change in 1.5.0 — the disambiguating model
27
27
  * name after the id — mirrored here; see distinctModelName below.
28
28
  * filterModels gained a second `preferredModel` argument in 1.5.1 (keep the
@@ -6,6 +6,7 @@ import { audit } from "./audit.js";
6
6
  import { stateToToml } from "./apply.js";
7
7
  import { detect } from "./detect.js";
8
8
  import { AUDIT_CODES, CONTRACT_FILE, UAT_CONTRACT_FILE } from "./spec.js";
9
+ import { isoMinute } from "../uat/records.js";
9
10
  import { installedProject, remove } from "./test-helpers.js";
10
11
 
11
12
  const roots: string[] = [];
@@ -64,8 +65,11 @@ describe("UAT audit findings", () => {
64
65
 
65
66
  it("warns about a recent non-canonical change record", () => {
66
67
  const root = installed();
68
+ // "Recent" is a 14-day window from now, so the fixture date has to move
69
+ // with the clock — a hardcoded day silently turned this green test red
70
+ // once the window passed it (2026-11-27).
67
71
  writeFileSync(
68
- join(root, ".agents/implementations/2026-11-13_handwritten.md"),
72
+ join(root, ".agents/implementations", `${isoMinute(new Date()).slice(0, 10)}_handwritten.md`),
69
73
  "# Handwritten\n\nno time\n",
70
74
  "utf8",
71
75
  );
@@ -6,7 +6,7 @@
6
6
  * (full tool access — this is check AND fix, not a read-only audit), runs a
7
7
  * review turn, and the session then stays on that model (no auto-restore).
8
8
  *
9
- * Trigger: the /ask-review slash command. `/third-review` stays registered as
9
+ * Trigger: the /ask-review slash command (the old `/third-review` spelling was
10
10
  * a compatibility alias (same handler, same state, no separate behaviour).
11
11
  * Bare-message keyword matching was deliberately removed — a plain
12
12
  * "ask-review" message goes to the model as ordinary text, so an accidental
@@ -52,20 +52,6 @@ import { getReviewStore, type ReviewStore } from "./store.js";
52
52
  */
53
53
  export const REVIEW_COMMAND = "ask-review";
54
54
 
55
- /**
56
- * Compatibility alias, registered on purpose and delegating to the same
57
- * runner. Why it exists: older session notes, muscle memory and autostart
58
- * configs (`/third-review` in `.pi/autostart.toml`) keep working across the
59
- * rename — a renamed command that silently disappears would turn those config
60
- * entries into plain chat messages sent to the model.
61
- *
62
- * **Slated for removal**: this is a deprecation shuttle, not a permanent
63
- * second name. It is deliberately absent from every external doc. Delete it
64
- * (`/third-review` constant + its `registerCommand` block + the registration
65
- * test case) once the old spelling has been unused for a release or two.
66
- */
67
- export const REVIEW_COMMAND_ALIAS = "third-review";
68
-
69
55
  /**
70
56
  * Let the user pick a review model with the /model-style picker and persist
71
57
  * the choice. Returns the picked model, or undefined when cancelled.
@@ -196,10 +182,10 @@ export function createReviewRunner(
196
182
  export function registerReview(pi: ExtensionAPI): void {
197
183
  const runReview = createReviewRunner(pi);
198
184
 
199
- // Slash-command triggers. The handler awaits the runner, which may block on
200
- // the model picker and the review turn. `ask-review` is canonical;
201
- // `third-review` is registered only as a compatibility alias (see the
202
- // constant's comment) — both reach the same runner and the same guards.
185
+ // Slash-command trigger. The handler awaits the runner, which may block on
186
+ // the model picker and the review turn. The pre-rename `/third-review`
187
+ // alias was removed 2026-11-27 (the name had been out of the docs since the
188
+ // `/ask-*` rename; a second entry point was only teaching the old spelling).
203
189
  pi.registerCommand(REVIEW_COMMAND, {
204
190
  description:
205
191
  "Pick the review model (defaults to the configured one) and review the just-completed work (check + fix)",
@@ -208,12 +194,6 @@ export function registerReview(pi: ExtensionAPI): void {
208
194
  },
209
195
  });
210
196
 
211
- pi.registerCommand(REVIEW_COMMAND_ALIAS, {
212
- description: "Same as /ask-review (compatibility alias)",
213
- handler: async (_args: string, ctx: ExtensionContext) => {
214
- await runReview(ctx);
215
- },
216
- });
217
197
 
218
198
  // Configuration has no command of its own: every /ask-review opens the
219
199
  // picker with the current default preselected, so "view" and "change" both
@@ -37,7 +37,6 @@ import {
37
37
  pickReviewModel,
38
38
  registerReview,
39
39
  REVIEW_COMMAND,
40
- REVIEW_COMMAND_ALIAS,
41
40
  } from "./index.js";
42
41
  import {
43
42
  modelKey,
@@ -498,7 +497,7 @@ describe("createReviewRunner", () => {
498
497
  // ─── command registration ──────────────────────────────────────
499
498
 
500
499
  describe("registerReview", () => {
501
- it("registers /ask-review and keeps /third-review as a working alias", async () => {
500
+ it("registers /ask-review only, with the retired alias gone", async () => {
502
501
  type RegisteredCommand = {
503
502
  description: string;
504
503
  handler: (args: string, ctx: ExtensionContext) => Promise<unknown>;
@@ -515,23 +514,21 @@ describe("registerReview", () => {
515
514
 
516
515
  registerReview(pi);
517
516
 
518
- // The canonical name carries the family prefix (/ask-*); the old spelling
519
- // stays registered so pre-rename notes and autostart configs keep working.
517
+ // One name only. `/third-review` was removed 2026-11-27 (崔总): it had
518
+ // been absent from the docs since the rename, so the second entry point
519
+ // only taught the old spelling. An autostart entry still using it is
520
+ // skipped by the pre-flight instead of being sent to the model.
520
521
  expect(REVIEW_COMMAND).toBe("ask-review");
521
- expect(REVIEW_COMMAND_ALIAS).toBe("third-review");
522
- expect([...commands.keys()]).toEqual([REVIEW_COMMAND, REVIEW_COMMAND_ALIAS]);
522
+ expect([...commands.keys()]).toEqual([REVIEW_COMMAND]);
523
+ expect(commands.has("third-review")).toBe(false);
523
524
 
524
525
  // `review-model` was removed 2026-11-10: every /ask-review already opens
525
526
  // the picker with the configured model preselected, so a second command
526
527
  // was a second way to do the same thing. Keep it gone.
527
528
  expect(commands.has("review-model")).toBe(false);
528
529
 
529
- // Both entry points reach the same runner: same picker, same guards, same
530
- // review turn — the alias is a name, not a second implementation.
531
530
  const { ctx } = fakeCtx({ customResult: MODELS[0] });
532
531
  await commands.get(REVIEW_COMMAND)?.handler("", ctx);
533
532
  expect(pi.sendUserMessage).toHaveBeenCalledTimes(1);
534
- await commands.get(REVIEW_COMMAND_ALIAS)?.handler("", ctx);
535
- expect(pi.sendUserMessage).toHaveBeenCalledTimes(2);
536
533
  });
537
534
  });