@thincoder/core 0.11.1 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (333) hide show
  1. package/CHANGELOG.md +46 -2
  2. package/advisor/convergence.mjs +34 -3
  3. package/advisor/loop.mjs +42 -10
  4. package/advisor/messages.mjs +42 -25
  5. package/advisor/project-context.mjs +171 -42
  6. package/advisor/run.mjs +7 -4
  7. package/advisor.mjs +29 -43
  8. package/agent/batch-attribution.mjs +87 -0
  9. package/agent/batch-changed-surface.mjs +129 -0
  10. package/agent/completion.mjs +44 -3
  11. package/agent/dispatch-gates.mjs +6 -0
  12. package/agent/dispatch.mjs +8 -3
  13. package/agent/family-tools.mjs +27 -12
  14. package/agent/helpers.mjs +122 -1
  15. package/agent/offload.mjs +25 -29
  16. package/agent/post-turn.mjs +24 -10
  17. package/agent/record-results.mjs +18 -1
  18. package/agent/run-stages.mjs +77 -32
  19. package/agent/run-start.mjs +37 -0
  20. package/agent/setup-reminders.mjs +9 -2
  21. package/agent/setup.mjs +24 -11
  22. package/agent/spawn-child.mjs +38 -1
  23. package/agent/timers.mjs +5 -3
  24. package/agent/turn-loop.mjs +30 -5
  25. package/agent/turn-projection.mjs +386 -0
  26. package/agent/turn-task-state.mjs +274 -0
  27. package/agent/turn-tool-process.mjs +168 -0
  28. package/agent/write-gate-ledger.mjs +569 -0
  29. package/agent/write-gate.mjs +29 -352
  30. package/agent-tools/advisor-async.mjs +29 -169
  31. package/agent-tools/advisor-launch.mjs +178 -0
  32. package/agent-tools/advisor-settle.mjs +28 -1
  33. package/agent-tools/advisor.mjs +36 -47
  34. package/agent-tools/audit-block.mjs +6 -6
  35. package/agent-tools/batch-closeout.mjs +273 -35
  36. package/agent-tools/batch-gate.mjs +142 -342
  37. package/agent-tools/batch-ledger-bind.mjs +226 -17
  38. package/agent-tools/batch-ledger-view.mjs +109 -0
  39. package/agent-tools/batch-lifecycle.mjs +169 -46
  40. package/agent-tools/batch-paths.mjs +29 -8
  41. package/agent-tools/batch-record-write.mjs +417 -0
  42. package/agent-tools/batch-regions.mjs +215 -0
  43. package/agent-tools/batch-reopen.mjs +23 -11
  44. package/agent-tools/batch-segment-vocab.mjs +379 -0
  45. package/agent-tools/batch-skeleton.mjs +192 -239
  46. package/agent-tools/batch-supersede.mjs +232 -0
  47. package/agent-tools/batch-tier-gate.mjs +297 -0
  48. package/agent-tools/batch.mjs +182 -439
  49. package/agent-tools/consult.mjs +7 -4
  50. package/agent-tools/context.mjs +44 -17
  51. package/agent-tools/design-review-record.mjs +225 -0
  52. package/agent-tools/design-slots.mjs +1 -1
  53. package/agent-tools/design-token.mjs +279 -81
  54. package/agent-tools/doc-check.mjs +43 -33
  55. package/agent-tools/doc-graph.mjs +140 -0
  56. package/agent-tools/eng.mjs +9 -8
  57. package/agent-tools/escalate-async.mjs +2 -2
  58. package/agent-tools/manifest.mjs +34 -18
  59. package/agent-tools/read-history.mjs +112 -11
  60. package/agent-tools/review-facts.mjs +10 -3
  61. package/agent-tools/settings.mjs +23 -2
  62. package/agent-tools/spawn-gates.mjs +9 -8
  63. package/agent-tools/ssh-session.mjs +2 -2
  64. package/agent-tools/ssh-text.mjs +155 -0
  65. package/agent-tools/ssh-transport.mjs +19 -148
  66. package/agent-tools/subagent-actions-query.mjs +10 -6
  67. package/agent-tools/subagent-async.mjs +8 -9
  68. package/agent-tools/subagent-brief.mjs +76 -0
  69. package/agent-tools/subagent-design-token.mjs +168 -0
  70. package/agent-tools/subagent-run.mjs +1 -1
  71. package/agent-tools/subagent-scheduler.mjs +4 -4
  72. package/agent-tools/subagent-spawn.mjs +90 -110
  73. package/agent-tools/subagent.mjs +11 -10
  74. package/agent-tools/taskbook-block.mjs +94 -0
  75. package/agent-tools/timer.mjs +12 -8
  76. package/agent-tools/verify.mjs +13 -4
  77. package/agent-tools.mjs +7 -3
  78. package/agent.mjs +20 -1
  79. package/attachments.mjs +3 -3
  80. package/browser/actions.mjs +9 -3
  81. package/browser/cdp.mjs +45 -17
  82. package/browser/launch.mjs +25 -43
  83. package/browser/pool.mjs +299 -0
  84. package/browser/queue.mjs +2 -0
  85. package/browser/session-state.mjs +450 -0
  86. package/browser/session.mjs +127 -151
  87. package/browser/snapshot.mjs +89 -0
  88. package/client-identity.mjs +1 -1
  89. package/config-defaults.mjs +2 -1
  90. package/config-migrate.mjs +40 -0
  91. package/config-normalize.mjs +28 -2
  92. package/config-reload.mjs +59 -0
  93. package/config.mjs +62 -98
  94. package/context-degrade.mjs +38 -10
  95. package/context-echo.mjs +11 -0
  96. package/context.mjs +149 -83
  97. package/conventions.mjs +11 -9
  98. package/declaration.mjs +31 -5
  99. package/declared-repos.mjs +94 -0
  100. package/doc-check/doc-names.mjs +73 -0
  101. package/doc-check/doc-tokens.mjs +110 -0
  102. package/doc-check/existence.mjs +160 -0
  103. package/doc-check/index.mjs +309 -213
  104. package/doc-check/line-refs.mjs +27 -101
  105. package/doc-check/paragraph.mjs +218 -102
  106. package/doc-graph/anchors.mjs +474 -0
  107. package/doc-graph/doc-batch-face.mjs +59 -0
  108. package/doc-graph/doc-suffix.mjs +27 -0
  109. package/doc-graph/graph-tokens.mjs +160 -0
  110. package/doc-graph.mjs +778 -0
  111. package/explore-distill.mjs +11 -5
  112. package/i18n.mjs +1 -1
  113. package/instance-inbox-watch.mjs +272 -0
  114. package/instance-inbox.mjs +218 -0
  115. package/instance-registry.mjs +179 -0
  116. package/knowledge/README.md +3 -0
  117. package/knowledge/prompt-resources.md +6 -0
  118. package/ledger-close-proof.mjs +100 -49
  119. package/ledger-close.mjs +188 -0
  120. package/ledger-cmd.mjs +47 -91
  121. package/ledger-consistency.mjs +113 -0
  122. package/ledger-db.mjs +47 -15
  123. package/ledger-executors.mjs +1 -1
  124. package/ledger-tools.mjs +78 -19
  125. package/ledger-write-ops.mjs +130 -41
  126. package/ledger.mjs +1 -1
  127. package/manifest-discovery.mjs +3 -1
  128. package/manifest-schema.mjs +27 -5
  129. package/memory/schema.mjs +2 -2
  130. package/package.json +3 -1
  131. package/path-resolve.mjs +338 -57
  132. package/prompt-files.mjs +91 -1
  133. package/prompt-overlays.mjs +9 -6
  134. package/prompts/advisor-design.md +62 -21
  135. package/prompts/advisor-round1.md +34 -1
  136. package/prompts/advisor-round2.md +40 -7
  137. package/prompts/advisor-round3.md +39 -6
  138. package/prompts/common.md +14 -387
  139. package/prompts/consult-base.md +5 -1
  140. package/prompts/discipline-engineering.md +226 -51
  141. package/prompts/discipline-normal.md +4 -255
  142. package/prompts/knowledge/business-gates.md +22 -0
  143. package/prompts/knowledge/decision-quality.md +23 -0
  144. package/prompts/knowledge/doc-lookup.md +35 -0
  145. package/prompts/knowledge/document-writing.md +51 -0
  146. package/prompts/knowledge/documentation-evaluation.md +56 -0
  147. package/prompts/knowledge/evidence-discipline.md +57 -0
  148. package/prompts/knowledge/normal-coding-workflow.md +104 -0
  149. package/prompts/knowledge/normal-delivery-collaboration.md +108 -0
  150. package/prompts/knowledge/normal-work-management.md +57 -0
  151. package/prompts/knowledge/product-security.md +23 -0
  152. package/prompts/knowledge/project-records.md +62 -0
  153. package/prompts/knowledge/tool-advisor.md +29 -0
  154. package/prompts/knowledge/tool-apply-patch.md +18 -0
  155. package/prompts/knowledge/tool-bash.md +39 -0
  156. package/prompts/knowledge/tool-batch-eng-coder.md +12 -0
  157. package/prompts/knowledge/tool-batch-eng-designer.md +12 -0
  158. package/prompts/knowledge/tool-batch-review.md +12 -0
  159. package/prompts/knowledge/tool-batch.md +80 -0
  160. package/prompts/knowledge/tool-browser.md +57 -0
  161. package/prompts/knowledge/tool-code-search.md +4 -0
  162. package/prompts/knowledge/tool-consult-start.md +12 -0
  163. package/prompts/knowledge/tool-consult-stop.md +6 -0
  164. package/prompts/knowledge/tool-context.md +6 -0
  165. package/prompts/knowledge/tool-delete.md +17 -0
  166. package/prompts/knowledge/tool-doc-check.md +70 -0
  167. package/prompts/knowledge/tool-doc-graph-read.md +20 -0
  168. package/prompts/knowledge/tool-doc-graph.md +49 -0
  169. package/prompts/knowledge/tool-doc-search.md +6 -0
  170. package/prompts/knowledge/tool-edit.md +38 -0
  171. package/prompts/knowledge/tool-eng.md +2 -0
  172. package/prompts/knowledge/tool-execute.md +16 -0
  173. package/prompts/knowledge/tool-fetch.md +12 -0
  174. package/prompts/knowledge/tool-file-ops.md +16 -0
  175. package/prompts/knowledge/tool-get-current-time.md +7 -0
  176. package/prompts/knowledge/tool-git-read.md +19 -0
  177. package/prompts/knowledge/tool-git.md +29 -0
  178. package/prompts/knowledge/tool-glob.md +15 -0
  179. package/prompts/knowledge/tool-goal.md +8 -0
  180. package/prompts/knowledge/tool-grep.md +18 -0
  181. package/prompts/knowledge/tool-hashline-edit.md +14 -0
  182. package/prompts/knowledge/tool-insert-after.md +15 -0
  183. package/prompts/knowledge/tool-instance-list.md +6 -0
  184. package/prompts/knowledge/tool-instance-send.md +10 -0
  185. package/prompts/knowledge/tool-knowledge.md +18 -0
  186. package/prompts/knowledge/tool-ledger-read.md +35 -0
  187. package/prompts/knowledge/tool-ledger.md +42 -0
  188. package/prompts/knowledge/tool-lint.md +16 -0
  189. package/prompts/knowledge/tool-ls.md +13 -0
  190. package/prompts/knowledge/tool-lsp.md +11 -0
  191. package/prompts/knowledge/tool-main-history.md +2 -0
  192. package/prompts/knowledge/tool-manifest-read.md +14 -0
  193. package/prompts/knowledge/tool-manifest.md +31 -0
  194. package/prompts/knowledge/tool-memory-read.md +20 -0
  195. package/prompts/knowledge/tool-memory.md +15 -0
  196. package/prompts/knowledge/tool-notify-parent.md +12 -0
  197. package/prompts/knowledge/tool-operations.md +114 -0
  198. package/prompts/knowledge/tool-peer-instances.md +2 -0
  199. package/prompts/knowledge/tool-plan.md +6 -0
  200. package/prompts/knowledge/tool-process-read.md +13 -0
  201. package/prompts/knowledge/tool-process.md +15 -0
  202. package/prompts/knowledge/tool-question.md +16 -0
  203. package/prompts/knowledge/tool-read-history-batch.md +22 -0
  204. package/prompts/knowledge/tool-read-history.md +36 -0
  205. package/prompts/knowledge/tool-read-image.md +11 -0
  206. package/prompts/knowledge/tool-read.md +21 -0
  207. package/prompts/knowledge/tool-recent-changes.md +6 -0
  208. package/prompts/knowledge/tool-repo-outline.md +4 -0
  209. package/prompts/knowledge/tool-settings-read.md +12 -0
  210. package/prompts/knowledge/tool-settings.md +18 -0
  211. package/prompts/knowledge/tool-skill.md +6 -0
  212. package/prompts/knowledge/tool-ssh.md +52 -0
  213. package/prompts/knowledge/tool-subagent.md +59 -0
  214. package/prompts/knowledge/tool-task.md +12 -0
  215. package/prompts/knowledge/tool-team-ledger-read.md +11 -0
  216. package/prompts/knowledge/tool-team-ledger.md +11 -0
  217. package/prompts/knowledge/tool-timer.md +23 -0
  218. package/prompts/knowledge/tool-tree.md +14 -0
  219. package/prompts/knowledge/tool-verify.md +19 -0
  220. package/prompts/knowledge/tool-wait-for.md +25 -0
  221. package/prompts/knowledge/tool-websearch.md +19 -0
  222. package/prompts/knowledge/tool-write.md +9 -0
  223. package/prompts/knowledge/upstream-protocol.md +43 -0
  224. package/prompts/persona-eng-coder.md +21 -3
  225. package/prompts/persona-eng-designer.md +131 -169
  226. package/prompts/persona-engineering.md +142 -84
  227. package/prompts/persona-explore.md +1 -1
  228. package/prompts/persona-plan.md +5 -1
  229. package/prompts/subagent-base.md +2 -0
  230. package/provider/anthropic.mjs +6 -4
  231. package/provider/core.mjs +3 -2
  232. package/provider/errors.mjs +29 -4
  233. package/provider/google.mjs +24 -7
  234. package/provider/responses.mjs +3 -1
  235. package/provider-flows.mjs +2 -2
  236. package/session-index-build.mjs +1 -1
  237. package/session-index-pass.mjs +1 -1
  238. package/session-index-query.mjs +1 -1
  239. package/session-index.mjs +1 -1
  240. package/session-lifecycle.mjs +72 -17
  241. package/session-slot-write.mjs +37 -5
  242. package/session.mjs +24 -8
  243. package/skip-dirs.mjs +2 -2
  244. package/team-ledger.mjs +13 -9
  245. package/token-ttl.mjs +73 -4
  246. package/token-window.mjs +167 -33
  247. package/tool-docs/advisor.md +2 -27
  248. package/tool-docs/apply_patch.md +1 -15
  249. package/tool-docs/bash.md +2 -41
  250. package/tool-docs/batch-eng-coder.md +3 -0
  251. package/tool-docs/batch-eng-designer.md +3 -0
  252. package/tool-docs/batch-review.md +3 -0
  253. package/tool-docs/batch.md +2 -84
  254. package/tool-docs/browser.md +2 -49
  255. package/tool-docs/code_search.md +2 -2
  256. package/tool-docs/consult_start.md +2 -8
  257. package/tool-docs/consult_stop.md +2 -4
  258. package/tool-docs/context.md +1 -5
  259. package/tool-docs/delete.md +2 -17
  260. package/tool-docs/doc_check.md +2 -107
  261. package/tool-docs/doc_graph-read.md +3 -0
  262. package/tool-docs/doc_graph.md +3 -0
  263. package/tool-docs/doc_search.md +2 -4
  264. package/tool-docs/edit.md +1 -38
  265. package/tool-docs/eng.md +3 -1
  266. package/tool-docs/execute.md +2 -18
  267. package/tool-docs/fetch.md +2 -14
  268. package/tool-docs/file_ops.md +2 -18
  269. package/tool-docs/get_current_time.md +1 -6
  270. package/tool-docs/git-read.md +3 -0
  271. package/tool-docs/git.md +2 -35
  272. package/tool-docs/glob.md +2 -10
  273. package/tool-docs/goal.md +1 -6
  274. package/tool-docs/grep.md +2 -18
  275. package/tool-docs/hashline_edit.md +2 -15
  276. package/tool-docs/insert_after.md +2 -16
  277. package/tool-docs/instance_list.md +3 -0
  278. package/tool-docs/instance_send.md +3 -0
  279. package/tool-docs/knowledge.md +3 -0
  280. package/tool-docs/ledger-read.md +3 -0
  281. package/tool-docs/ledger.md +3 -8
  282. package/tool-docs/lint.md +2 -10
  283. package/tool-docs/ls.md +2 -11
  284. package/tool-docs/lsp.md +2 -9
  285. package/tool-docs/main_history.md +3 -1
  286. package/tool-docs/manifest-read.md +2 -8
  287. package/tool-docs/manifest.md +2 -35
  288. package/tool-docs/memory-read.md +3 -0
  289. package/tool-docs/memory.md +2 -20
  290. package/tool-docs/notify_parent.md +2 -13
  291. package/tool-docs/peer_instances.md +3 -1
  292. package/tool-docs/plan.md +1 -5
  293. package/tool-docs/process-read.md +3 -0
  294. package/tool-docs/process.md +2 -13
  295. package/tool-docs/question.md +3 -17
  296. package/tool-docs/read.md +2 -19
  297. package/tool-docs/read_history-batch.md +3 -0
  298. package/tool-docs/read_history.md +2 -18
  299. package/tool-docs/read_image.md +2 -9
  300. package/tool-docs/recent_changes.md +2 -2
  301. package/tool-docs/repo_outline.md +2 -2
  302. package/tool-docs/settings-read.md +3 -0
  303. package/tool-docs/settings.md +1 -12
  304. package/tool-docs/skill.md +2 -6
  305. package/tool-docs/ssh.md +1 -62
  306. package/tool-docs/subagent.md +2 -100
  307. package/tool-docs/task.md +1 -7
  308. package/tool-docs/team_ledger-read.md +3 -0
  309. package/tool-docs/team_ledger.md +3 -9
  310. package/tool-docs/timer.md +2 -19
  311. package/tool-docs/tree.md +2 -13
  312. package/tool-docs/verify.md +2 -12
  313. package/tool-docs/wait_for.md +2 -32
  314. package/tool-docs/websearch.md +2 -19
  315. package/tool-docs/write.md +2 -12
  316. package/tools/browser.mjs +52 -7
  317. package/tools/doc-write-gate.mjs +73 -0
  318. package/tools/edit-batch.mjs +170 -92
  319. package/tools/edit-diff.mjs +78 -62
  320. package/tools/edit-receipt.mjs +39 -0
  321. package/tools/execute.mjs +1 -1
  322. package/tools/file.mjs +16 -8
  323. package/tools/git.mjs +24 -9
  324. package/tools/index.mjs +6 -0
  325. package/tools/knowledge.mjs +143 -0
  326. package/tools/linter.mjs +3 -3
  327. package/tools/ops.mjs +3 -1
  328. package/tools/patch.mjs +123 -43
  329. package/tools/shared.mjs +28 -27
  330. package/tools/write-gate-params.mjs +31 -0
  331. package/tools/write-path.mjs +16 -4
  332. package/window-policy.mjs +203 -0
  333. package/doc-check/anchors.mjs +0 -235
package/CHANGELOG.md CHANGED
@@ -3,6 +3,50 @@
3
3
  All notable changes to the core package are documented here.
4
4
  Format: Keep a Changelog · 中文 · 号在发布时定(CalVer——见 `docs/RELEASE.md` §4)。
5
5
 
6
+ ## [0.11.2] — 2026-11-16
7
+
8
+ ### Added
9
+
10
+ - **设计评审射程天花板**:`§4`/`§5`/`§6` 永在判域之外——它们写在本轮 pass 之后,空着不是发现;可判面 = `§1–§3` 与评审范围文档。**读不受限**:挡的是「对段的发现」,不是读代码。
11
+ - **设计评审判据不随轮次衰减**:第 N 轮可判的发现范围与第 1 轮相同;上一轮输出改由 `buildPriorReviewBlock` 作背景传入,不是本轮的验证清单。
12
+ - **收口门「被取代」边**:对象已消失、永不会实施且能指名后继的批档走 `supersede` 冻结,不靠补写四段内容去过 `close`。
13
+ - **收口门改动面按批归属**:写时归属为主判据、提交 diff 按认领收窄;已收口批的区间上界取它自己的收口提交,取不到则不认领。
14
+ - **写前文档机检门**:`.md` 每一笔写盘前判本笔触碰的段落,区外存量一条不出。
15
+ - **行号坐标成为交付门第三判据**。
16
+ - **`index.docCheckExcludePaths`**:项目可声明文档检查的排除目录。
17
+ - **`index.publicRepos` 出边机检**:跨仓引用未声明即拒、成环即拒。
18
+ - **工具参数零默认值**:缺了就拒,不替调用方拿主意。
19
+ - **`commit` 携未跟踪 path 逐条预检**:调 git 前点名,不为一个 path 回滚整批。
20
+ - **`edit` 行号形态空 `new_string` 按删除生效**。
21
+ - **任务书按角色分**:eng-coder 读批档 §2、eng-designer 读整档;任务书正文进 spawn 系统固块。
22
+ - **批档 §3 只承载本轮结论表**:轮次块由结算自写,评审回执全文不再进档。
23
+ - **单池共享浏览器**。
24
+ - **knowledge 检索**:分词剥首尾标点,停用词过滤;tiny 档常驻查询指引。
25
+ - **tiny 档有效窗口覆盖 256K**。
26
+
27
+ ### Changed
28
+
29
+ - **收口门越线支改判 800**(收口线),与设计时线 500 各归各判者。
30
+ - **收口门判域 = 本批变更区**:区内照判三件,区外一个字都不出。
31
+ - **窗口预算单向派生**,压缩线封顶 262144,基线重定并补处置链。
32
+ - **工作模式 `minimal` → `tiny`** 全链改名;工具描述一句话化并按档装配。
33
+ - **引用三形按作用域分工**:正文 / 工具参数 / 证据各一形;编号作用域 = 发它的那份档,跨档带档名。
34
+ - **段落写作标准改挂 `doc_check`**:停用字数自量。
35
+ - **「一把尺子」**:同一读数的不同取法不可互比,射程放开到任何读数。
36
+
37
+ ### Fixed
38
+
39
+ - **设计评审第 2 轮起被判据降级为收敛轮**——只验上一轮点名项、不再读全文;`§5 实施记录为空` 这类发现正是从这条路径出来的。
40
+ - **推回预算不再被每轮工具批清零**:未评审的收尾必带一句声明。
41
+ - **段判据认中文项目符号**:合法列表文档不再被写门挡住。
42
+ - **`batch edit` 触达账接上改动区**;`standards` 键根解析修复。
43
+ - **设计收尾不判红**;设计轮提醒有上限;`timer` 行去字形。
44
+
45
+ ### Removed
46
+
47
+ - **退役措辞族清场**。
48
+ - **fragment 档退役**。
49
+
6
50
  ## [0.11.1] — 2026-11-04
7
51
 
8
52
  ### Added
@@ -10,7 +54,7 @@ Format: Keep a Changelog · 中文 · 号在发布时定(CalVer——见 `docs
10
54
  - **`ssh` 文件传输**:工具新增 `put` / `get` 两动作(单文件、二进制安全)——执行体 = 系统 `scp`,缺省 `-O`(经典协议,网络设备普遍只实现这一支),`protocol:"sftp"` 可覆盖;硬超时杀树;`get` 半截档按「字节数或 mtime 变过」才删,未被动过的旧档不删。
11
55
  - **写门射程扩到十三把**:`ssh` 入入口集,但**只 `get` 要号**(`put` 写远端,本门不判);`touchedPaths` 钩子回绝对形,`~` 落点不再被判成「项目内虚构路径」。
12
56
  - **项目标准档声明口 `docRoot.standards`**:评审的「方法论符合度」维度不再是空跑。
13
- - **`path-resolve.mjs`** ∥ **`tools/process-doc-mark.mjs`** ∥ **`persona-tester.md`**(tester 角色人格)。
57
+ - **`path-resolve.mjs`** ∥ **`tools/process-doc-mark.mjs`** ∥ **`thincoder-core/prompts/persona-tester.md`**(tester 角色人格)。
14
58
  - **SSE 首 chunk 与流中途分窗**:长 prefill 不再被 120s 静默超时误杀。
15
59
  - **`x-opencode-session` 改为每会话一个**(值位模板 `${sessionId}`)。
16
60
  - **`ledger/count` 跨项目读面**:界改用调用方 `cwd`。
@@ -113,7 +157,7 @@ Format: Keep a Changelog · 中文 · 号在发布时定(CalVer——见 `docs
113
157
 
114
158
  ### Fixed
115
159
 
116
- - **核包 `files` 白名单补 `browser/`**(P0——0.10.5 装机缺该目录 ⇒ CLI 装后启动崩(`ERR_MODULE_NOT_FOUND`):`tools/browser.mjs:13-15` ∥ `permission.mjs:16` 引 `../browser/*` 而白名单未列;台账 #1362)。发布守则教训:白名单须覆盖运行时引用闭包——发布预检现只对根 `.mjs` ∥ `prompts/` ∥ `tool-docs/` 计数(引闭包断言待另轮补,已登记)。
160
+ - **核包 `files` 白名单补 `browser/`**(P0——0.10.5 装机缺该目录 ⇒ CLI 装后启动崩(`ERR_MODULE_NOT_FOUND`):`tools/browser.mjs` ∥ `permission.mjs` 引 `../browser/*` 而白名单未列;台账 #1362)。发布守则教训:白名单须覆盖运行时引用闭包——发布预检现只对根 `.mjs` ∥ `prompts/` ∥ `tool-docs/` 计数(引闭包断言待另轮补,已登记)。
117
161
 
118
162
  ## [0.10.5] — 2026-10-13
119
163
 
@@ -1,8 +1,11 @@
1
1
  /**
2
2
  * advisor/convergence.mjs — shared convergence-round message building (round 2+).
3
- * SINGLE source for the round-2+ sections used by BOTH the normal advisor flow
3
+ * buildConvergenceBody / buildConvergenceInstructions: SINGLE source for the
4
+ * round-2+ sections of CODE reviews, used by BOTH the normal flow
4
5
  * (buildAdvisorFollowUp) and the legacy path (buildAdvisorUserMessage) — fixes must
5
- * not be replicated in two places. Lives in its own module to avoid the advisor-entry
6
+ * not be replicated in two places. buildPriorReviewBlock serves the design-review
7
+ * round 2+, whose prior output is a reference rather than a verification list.
8
+ * Lives in its own module to avoid the advisor-entry
6
9
  * ↔ message-building import cycle.
7
10
  */
8
11
 
@@ -24,7 +27,7 @@ export function buildConvergenceInstructions(round, scopeFiles = null) {
24
27
  "2. STALE-CONTEXT WARNING: any diff or file content from earlier messages is a historical snapshot — treat it as expired. Only fresh `read` results describe the current state.",
25
28
  "3. You have no git tool; git output in earlier messages is historical and untrustworthy (committed fixes never show in a diff).",
26
29
  "4. `read` the files named in the prior review output (or the review surface above) in full — ALWAYS. Batch reads/greps in a single reply.",
27
- "5. Evidence rule: every 'Unfixed'/'New' finding MUST quote the exact line content from THIS round's `read` output (e.g. `run.mjs:180: timeoutId = setTimeout(() => {`). Line numbers alone are NOT evidence — they may be stale or fabricated. Findings without a fresh quoted line are treated as unverified and will not be accepted.",
30
+ "5. Evidence rule: every 'Unfixed'/'New' finding MUST quote the exact line content from THIS round's `read` output — one CONTIGUOUS excerpt, quoted exactly as it stands. Line numbers alone are NOT evidence — they may be stale or fabricated. Findings without a fresh quoted line are treated as unverified and will not be accepted.",
28
31
  "6. Produce your verification table. Do not re-read content you already have.",
29
32
  round === 2
30
33
  ? "7. You may flag obvious NEW issues introduced by the fixes (crashes, data loss, logic errors — not style)."
@@ -78,3 +81,31 @@ export function buildConvergenceBody(p, response, round, scopeFiles) {
78
81
  ]
79
82
  return parts.join("\n")
80
83
  }
84
+
85
+ /**
86
+ * Design-review reference block for round 2+ (decision 2026-11-16 — a design
87
+ * review has NO convergence decay). The prior review output and the agent's fix
88
+ * claims travel so the reviewer does not re-report what is already fixed, but
89
+ * both are REFERENCE: the round is a full review at the same standard as the
90
+ * first, and the prior items are not the verification list.
91
+ * Deliberately separate from buildConvergenceBody — that one keeps serving code
92
+ * reviews, whose rounds DO narrow (round 2 semi-convergence, round 3+ strict).
93
+ * @param {string} p — full prior review output (verbatim)
94
+ * @param {string} response — agent fix-claims table (or fallback text)
95
+ * @returns {string} the reference block
96
+ */
97
+ export function buildPriorReviewBlock(p, response) {
98
+ return [
99
+ "## Prior Review Output (previous round — reference, not the verification list)",
100
+ p,
101
+ "",
102
+ "## Agent Response (fix claims — reference only)",
103
+ response,
104
+ "",
105
+ "## Instructions",
106
+ "1. This round is a FULL review at the same standard as the first: the system prompt's complete criteria apply, and every document in the review scope is read in full.",
107
+ "2. The prior review output above is a reference, not the verification list: report an item as still open only where the current file state shows it, and report anything new you find.",
108
+ "3. Evidence rule: every finding MUST quote the exact line content from THIS round's `read` output — one CONTIGUOUS excerpt, quoted exactly as it stands. Line numbers alone are NOT evidence.",
109
+ "",
110
+ ].join("\n")
111
+ }
package/advisor/loop.mjs CHANGED
@@ -13,6 +13,18 @@ import { providerSpec, assistantToolCallMessage } from "../config.mjs"
13
13
  import { toOpenAISchema } from "../tools/index.mjs"
14
14
  import { truncateAdvisorResult } from "./truncate.mjs"
15
15
  import { batchTool } from "../agent-tools/batch.mjs"
16
+ // 文档工具面(`docs/core/design/AGENT-LOOP-SUBAGENT.md` §6.60.2 ③ · 需求 `docs/core/requirements/DOC-GRAPH.md`
17
+ // §4 AC-10):评审段拿到两件只读工具:`doc_check` 本体 ∥ `doc_graph` 只读变体(三动作、无 `scan`)。
18
+ // **工具在场 ≠ 义务**:评审的判据来自文档本体(读那一节、与代码和需求对出来),机检的 PASS 只说明锚点与段长
19
+ // 合规、`doc_graph` 只回答「谁引了谁」——两者都不是判据面。拿到它们是为了「核一个锚在不在盘」这类局部事实时
20
+ // 不必上抛,而不是给它一条结论捷径;没有机制禁止它调用,也不该有。静态 import(同 `batchTool` 那条):
21
+ // `doc-graph.mjs` 的静态闭包不达 `node:sqlite`(机制档只在 execute 里动态 import);`doc-check.mjs` 的静态闭包
22
+ // 经 `doc-check/index.mjs → declaration.mjs → memory/file-walk.mjs` 到达 `node:sqlite`。而本档**原有**的 `batchTool`
23
+ // 静态链早已同达(可逐跳核到的一条:`agent-tools/batch.mjs → batch-paths.mjs → path-resolve.mjs →
24
+ // declared-repos.mjs → declaration.mjs → memory/file-walk.mjs → memory/schema.mjs`)⇒ 本条不是本批新引入的
25
+ // 通路;本批只按同一条静态 import 先例接入,模块域零新增 TLA(两档都不是 TLA import)。
26
+ import { docCheckTool } from "../agent-tools/doc-check.mjs"
27
+ import { docGraphReadTool } from "../agent-tools/doc-graph.mjs"
16
28
  import {
17
29
  shouldBudgetNudge, budgetNudgeText, timeoutTail, renderTimeline, compactContextIfNeeded,
18
30
  MAX_ADVISOR_TURNS, advisorContextBudget, TOOL_TIMEOUT_MS, REVIEW_TIMEOUT_MS, MAX_RESULT_CHARS,
@@ -25,11 +37,13 @@ const { lspTool } = await import("../tools/lsp.mjs")
25
37
  const { codeSearchTool } = await import("../memory/code-sync.mjs")
26
38
 
27
39
  /**
28
- * Advisor tool set — ZERO git, read-only ONLY, every round. The change surface comes from the
40
+ * Advisor tool set — ZERO git, every round:只读六件 + 文档工具面两件(`doc_check` ∥ `doc_graph` 只读变体)
41
+ * + 绑定档时追加 `batch`(写面限 `§3`;工程设计轨不追加——`BATCH-RECORD.md` §4.3)。
42
+ * The change surface comes from the
29
43
  * review scope (paths / _touchedFiles injected by the caller), never from git: git output misled
30
44
  * reviews (committed fixes never show in `git diff HEAD`, so "no changes" was read as "not
31
45
  * fixed") and the user mandate is full decoupling (7d49a52 + d3be613). The reviewer reads files
32
- * and searches code; it never touches git and never writes. No round parameter — the set is
46
+ * and searches code; it never touches git. No round parameter — the set is
33
47
  * constant across all rounds. 检索面**恒在**(与索引绑定解耦):`code_search` 永远在集内,
34
48
  * 未绑定索引的会话在**执行面**降级为一句端中立说明(不崩、不伪造结果)——工具清单恒定。
35
49
  * @param {Object} agent — 索引面载体(`agent.memory`);缺省时执行面降级。
@@ -40,12 +54,25 @@ function advisorCodeSearchTool(agent) {
40
54
  : { ...codeSearchTool(undefined), async execute() { return "(code index not available in this session)" } }
41
55
  }
42
56
 
43
- function advisorToolsFor(agent, reviewType = "code", batchDoc = null) {
44
- const tools = [readTool, globTool, grepTool, lsTool, lspTool, advisorCodeSearchTool(agent)]
45
- // BATCH-RECORD.md §4.3(第 4 批):**只有绑定了批次档的设计评审**额外拿到写通道——代码评审工具集
46
- // 逐字节不变(零 git + 只读不变量,BATCH-RECORD.md §4.7 #1);未绑定 → 不挂载(fail-closed)。
47
- if (reviewType === "design" && batchDoc) tools.push(batchTool(batchDoc, { review: true }))
48
- return { schemas: tools.map(toOpenAISchema), byName: new Map(tools.map((t) => [t.name, t])) }
57
+ /**
58
+ * 评审侧工具表(纯函数)。
59
+ * @param {Object} agent — 索引面载体(`agent.memory`)+ 模式位(`agent.config.agent.engineering`)。
60
+ * @param {string} reviewType — 本评审实例的**评审轨**(`"design"` ∥ `"code"`)——挂载判据的一半
61
+ * (`docs/core/design/BATCH-RECORD.md` §4.3)。**不给默认值**:模式 × 评审轨两项缺一即判不出,
62
+ * 用默认值顶替就等于替调用方选了一条路。
63
+ * @param {string|null} [batchDoc] — 本评审逐笔绑定的批次档(绝对路径);非空 ⇒ 按下方判据追加 `batch`(写面限 `§3`)。
64
+ * @returns {{schemas: object[], byName: Map<string, object>}}
65
+ */
66
+ function advisorToolsFor(agent, reviewType, batchDoc = null) {
67
+ const tools = [readTool, globTool, grepTool, lsTool, lspTool, advisorCodeSearchTool(agent), docCheckTool, docGraphReadTool]
68
+ // BATCH-RECORD.md §4.3:挂载判据 = 绑定 ∧ ¬(工程模式 ∧ 设计轨)。工程设计轨的 §3 对一切工具通道只读、
69
+ // 轮次块由结算写,工具给了它也只会收到一条拒——不发(fail-closed)。代码轨与普通模式照旧追加:那两条路
70
+ // 没有设计结算可代写,而收口门读的是 §3 的段级状态行(工具面批走代码轨,评审员要写 §3 就靠这一条)。
71
+ // 未绑定 → 不挂载(fail-closed)。
72
+ const engineering = !!agent?.config?.agent?.engineering
73
+ if (batchDoc && !(engineering && reviewType !== "code")) tools.push(batchTool(batchDoc, { review: true, reviewType }))
74
+ // 工具描述取完整档(设计 TOOLS §1):评审是独立基底,不随会话 mode 变化(requirements §9.1)。
75
+ return { schemas: tools.map((tool) => toOpenAISchema(tool, "normal")), byName: new Map(tools.map((t) => [t.name, t])) }
49
76
  }
50
77
  // Test seam: the tool set is pure(恒在六工具 + 批次档绑定條件)。
51
78
  export { advisorToolsFor, advisorToolsFor as _advisorToolsFor }
@@ -62,7 +89,7 @@ export { advisorToolsFor, advisorToolsFor as _advisorToolsFor }
62
89
  * @param {{now?: Function, chat?: Function, describeArgs?: Function}} [seams] — 测试缝 + ④ 端差注入点
63
90
  * (默认 Date.now / chat / 无进度行——生产调用不传时进度行由端装配层补齐)。
64
91
  */
65
- async function runAdvisorToolLoop(provider, messages, onOutput, signal, agent, cwd, toolsOverride = null, reviewType = "code", batchDoc = null, pinned = null, seams = {}) {
92
+ async function runAdvisorToolLoop(provider, messages, onOutput, signal, agent, cwd, toolsOverride = null, reviewType, batchDoc = null, pinned = null, seams = {}) {
66
93
  const now = seams.now ?? Date.now
67
94
  const chatCall = seams.chat ?? chat
68
95
  // ④ 端差注入点(CORE-UNIFICATION §2.5 #109「进度行按端注入」):工具进度行的参数摘要
@@ -252,7 +279,12 @@ async function runAdvisorToolLoop(provider, messages, onOutput, signal, agent, c
252
279
  })
253
280
  let toolPromise
254
281
  try {
255
- toolPromise = p.tool.execute(p.args, { cwd, agent, onOutput, signal })
282
+ // 归一成 Promise(设计单源 = `docs/core/design/ADVISOR-CONVERGENCE.md` §18):工具的 `execute` 允许同步
283
+ // 返回(`doc_check` 就是一个),而下面 `finally` 里要给同一返回值挂 `.catch`——同步值上没有 `.catch`,
284
+ // 收尾句抱 `TypeError` 盖过竞速结果,一次成功的工具调用被归成 `: "execution_error"`。
285
+ // **别以为评审的工具集特殊**:主代理侧是 `await item.tool.execute(...)`,`await` 对同步值与 Promise 同判,
286
+ // 那里不产生 `.catch`;评审循环是唯一在 `finally` 里挂 `.catch` 的地方,于是只有它撞。
287
+ toolPromise = Promise.resolve(p.tool.execute(p.args, { cwd, agent, onOutput, signal }))
256
288
  return await Promise.race([toolPromise, timeoutPromise])
257
289
  } finally {
258
290
  clearTimeout(timeoutId)
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { join, relative, sep } from "node:path"
9
9
  import { findReviewRepos, collectRepoSnapshots, collectChangedFiles } from "./repos.mjs"
10
- import { buildConvergenceBody, buildConvergenceInstructions } from "./convergence.mjs"
10
+ import { buildConvergenceBody, buildConvergenceInstructions, buildPriorReviewBlock } from "./convergence.mjs"
11
11
  import { loadAdvisorMd, extractConversationBackground, extractAgentResponseTable } from "./history.mjs"
12
12
  import { injectProjectGuide, injectDocumentMap, injectProjectStandards, NO_GIT_NOTICE } from "./project-context.mjs"
13
13
 
@@ -87,7 +87,7 @@ export function buildAdvisorUserMessage(agent, prior, reviewType, designToken =
87
87
  return `${body}\n\n${buildDesignApprovalBlock(designToken, designId)}`
88
88
  }
89
89
 
90
- /** 内层构建(无自愈尾包)——出口、分支与消息形态与拆分前逐字一致。 */
90
+ /** 内层构建(无自愈尾包)。设计评审每轮走这里:首轮无 prior 参考块,轮 2+ 带 prior 参考块,其余消息形态相同。 */
91
91
  function buildAdvisorUserMessageInner(agent, prior, reviewType, designToken = null, documents = null, paths = null, object = null, designId = null) {
92
92
  // prior = the full prior review output (string) when a convergence round is
93
93
  // being built (decision 2026-08-08 — verbatim injection, model understands it).
@@ -96,24 +96,29 @@ function buildAdvisorUserMessageInner(agent, prior, reviewType, designToken = nu
96
96
 
97
97
  const parts = []
98
98
  // Review-object declaration FIRST — D-OA1: at the start of the user message
99
- // (after the system prompt, before the review content). Covers round 1
100
- // design/code and the legacy convergence path; the round-2+ normal path
101
- // prepends it in buildAdvisorFollowUp (T-OA2 — every round stays anchored).
99
+ // (after the system prompt, before the review content). Covers every design
100
+ // round and code round 1 here; the code-review round-2+ path prepends it in
101
+ // buildAdvisorFollowUp (T-OA2 — every round stays anchored).
102
102
  const declaration = buildObjectDeclarationBlock(object)
103
103
  if (declaration) parts.push(declaration)
104
104
  const docList = Array.isArray(documents) ? documents.filter((d) => typeof d === "string" && d.trim()) : []
105
105
  const pathList = Array.isArray(paths) ? [...new Set(paths.filter((p) => typeof p === "string" && p.trim()))] : []
106
+ // 评审范围项 = 指南 ∥ 标准层 ∥ 文档地图共用的**同一份操作数**(序 = 喂给 `findGuideRoot` 的那个序)。
107
+ // 只算一处:两条 base 推导同源的前提是三个调用点拿到的确实是同一份列表。
108
+ const scopeFiles = [...pathList, ...docList]
106
109
 
107
- // Project guide FIRST in EVERY review path (code AND design round 0): the map
110
+ // Project guide FIRST in EVERY review path (code AND design): the map
108
111
  // to the requirements docs is needed for design reviews too (design must fit
109
- // the requirements, not just the methodology). Design round 0 early-returns
112
+ // the requirements, not just the methodology). The design branch early-returns
110
113
  // below — the guide must be injected before that return. Project root is
111
114
  // discovered from the review scope (code paths AND design-doc paths, so a
112
115
  // documents-only design review still finds the subproject guide).
113
- const guideRoot = injectProjectGuide(agent, parts, [...pathList, ...docList])
116
+ const guideRoot = injectProjectGuide(agent, parts, scopeFiles)
114
117
 
115
- // Design review: simplified message — focus on the design doc, not code
116
- if (reviewType === "design" && (agent._advisorRound || 0) === 0) {
118
+ // Design review — EVERY round (decision 2026-11-16: no convergence decay; each
119
+ // round re-reads the whole scope against the complete criteria). Round 2+ adds
120
+ // the prior review output as a REFERENCE block below.
121
+ if (reviewType === "design") {
117
122
  const repos = findReviewRepos(agent)
118
123
  parts.push("## Design Review")
119
124
  // FR15/P8: no git → change-set context is unavailable. Say it (never silent).
@@ -126,7 +131,7 @@ function buildAdvisorUserMessageInner(agent, prior, reviewType, designToken = nu
126
131
  // doc list — the advisor reviews ONLY these. No git-diff change-set
127
132
  // collection: diff-based discovery reviewed unrelated files, and untracked
128
133
  // design docs were invisible to git diff anyway (ENGINEERING-MODE.md §2.4).
129
- parts.push("The documents below are the review scope. Review ONLY these files — do not scan git diff or read any other files.")
134
+ parts.push("The documents below are the review scope — the review target is these documents only. Do not scan git diff; reading other files is allowed where a criterion needs it (feasibility, affected-file size), but findings outside these documents are out of scope.")
130
135
  parts.push("")
131
136
  parts.push("## Documents to Review")
132
137
  parts.push(docList.map((d) => `- ${d} — Read this file in full`).join("\n"))
@@ -159,13 +164,17 @@ function buildAdvisorUserMessageInner(agent, prior, reviewType, designToken = nu
159
164
  // Engineering mode: the project standards section — read from the project's own
160
165
  // declaration (`docRoot.standards`); three states, each machine-distinguishable:
161
166
  // undeclared / declared-but-unreadable / injected. Never a probed convention name (PO-2).
167
+ // The base is derived inside the injector from this review's scope (the owning project of
168
+ // those paths) — NOT from `guideRoot`: the guide's root is the nearest AGENTS.md, which is a
169
+ // different question, and under a workspace anchor it is the anchor (no manifest ⇒ state 1).
162
170
  if (agent.config?.agent?.engineering) {
163
- injectProjectStandards(agent, parts, guideRoot)
171
+ injectProjectStandards(agent, parts, scopeFiles)
164
172
  }
165
173
 
166
174
  // Document map: derived from the manifest `docRoot` (declared roots' README, then their common
167
- // ancestor); neither → explicit degradation sentence (never a silent skip).
168
- injectDocumentMap(agent, parts, guideRoot ?? agent.cwd)
175
+ // ancestor); neither → explicit degradation sentence (never a silent skip). Same base as the
176
+ // standards face (one derivation, two consumers).
177
+ injectDocumentMap(agent, parts, scopeFiles)
169
178
 
170
179
  parts.push("## Instructions")
171
180
  if (docList.length > 0) {
@@ -177,6 +186,16 @@ function buildAdvisorUserMessageInner(agent, prior, reviewType, designToken = nu
177
186
  parts.push("3. If the ## Project Guide (AGENTS.md) section above is present, also check requirement fit: does the design match what the requirements documents it points to actually ask for?")
178
187
  parts.push("4. Do NOT run git diff or look for code changes — there are none at this stage.")
179
188
  parts.push("5. If you find issues, produce your review table with the format: | # | Category | Severity | Issue | Suggestion |. If the design passes, no table is needed.")
189
+ // Round 2+: the prior review output and the agent's fix claims travel as
190
+ // REFERENCE — they keep the reviewer from re-reporting what is already fixed,
191
+ // and they are explicitly NOT the verification list (this round is a full
192
+ // review at the same standard as the first).
193
+ if (p && (agent._advisorRound || 0) > 0) {
194
+ const response = extractAgentResponseTable(agent.history, agent._advisorResponseAnchor ?? undefined)
195
+ || "(Agent did not provide a response table — report every issue the current file state shows)"
196
+ parts.push("")
197
+ parts.push(buildPriorReviewBlock(p, response))
198
+ }
180
199
  if (designToken) {
181
200
  parts.push("")
182
201
  parts.push(buildDesignApprovalBlock(designToken, designId))
@@ -184,11 +203,11 @@ function buildAdvisorUserMessageInner(agent, prior, reviewType, designToken = nu
184
203
  return parts.join("\n")
185
204
  }
186
205
 
187
- // Convergence data (round 2+). LEGACY COMPATIBILITY PATH: the normal advisor
206
+ // Convergence data (round 2+). LEGACY COMPATIBILITY PATH: the normal code-review
188
207
  // flow routes convergence rounds through buildAdvisorFollowUp (fresh session,
189
- // decision d698434); this block only fires for direct external callers of
190
- // buildAdvisorUserMessage with a stored prior review output. Kept to avoid
191
- // breaking those. Same rule as buildAdvisorFollowUp: the FULL prior review
208
+ // decision d698434); a design review never reaches here (it returns above, every round).
209
+ // This block only fires for direct external callers of buildAdvisorUserMessage
210
+ // with a stored prior review output. Kept to avoid breaking those. Same rule as buildAdvisorFollowUp: the FULL prior review
192
211
  // output is injected verbatim (decision 2026-08-08 — the model understands it;
193
212
  // no table/header/phrase parsing).
194
213
  // NOTE: this legacy path does NOT apply escapeLiteralEscapes (that lives in
@@ -218,11 +237,8 @@ function buildAdvisorUserMessageInner(agent, prior, reviewType, designToken = nu
218
237
  parts.push("")
219
238
  }
220
239
  if (docList.length > 0) {
221
- if (reviewType === "design") {
222
- parts.push("The documents below are the review scope. Review ONLY these files — do NOT scan git diff or read any other files.")
223
- } else {
224
- parts.push("The documents below define acceptance criteria and review context. Read them for context, then read the code files specified in the review scope. Judge the implementation against these documents.")
225
- }
240
+ // Code-review path only — a design review returns inside its own branch above.
241
+ parts.push("The documents below define acceptance criteria and review context. Read them for context, then read the code files specified in the review scope. Judge the implementation against these documents.")
226
242
  parts.push("")
227
243
  parts.push("## Documents to Review")
228
244
  parts.push(docList.map((d) => `- ${d} — Read this file in full`).join("\n"))
@@ -250,9 +266,10 @@ function buildAdvisorUserMessageInner(agent, prior, reviewType, designToken = nu
250
266
  parts.push("")
251
267
 
252
268
  // Engineering mode: project standards (declaration-only, same helper as the
253
- // design path) — undeclared degrades visibly (PO-2).
269
+ // design path) — undeclared degrades visibly (PO-2). Base = this review's scope's owning
270
+ // project (same derivation as the document map), not `guideRoot`.
254
271
  if (agent.config?.agent?.engineering) {
255
- injectProjectStandards(agent, parts, guideRoot)
272
+ injectProjectStandards(agent, parts, scopeFiles)
256
273
  }
257
274
 
258
275
  // Instructions — round-aware: re-reviews skip convention discovery entirely.