@akagilnc/pi-workflow-roles 0.1.4196 → 0.1.4204

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 (55) hide show
  1. package/CLAUDE.md +1 -1
  2. package/README.zh-CN.md +9 -7
  3. package/dist/acp-host/production-host.js +8 -8
  4. package/dist/analyst-gate-cycles-read.js +1 -1
  5. package/dist/diarist-contracts.js +1 -1
  6. package/dist/gatekeeper-role.js +1 -1
  7. package/dist/headless-host/production-host.js +8 -8
  8. package/dist/host-contracts.js +1 -1
  9. package/dist/host-transition-prior-native.js +1 -1
  10. package/dist/inspector-contracts.js +2 -2
  11. package/dist/migrate-book-topology.js +1 -1
  12. package/dist/packaged-role-registry.js +1 -1
  13. package/dist/pi/role-turn-host.js +2 -1
  14. package/dist/public-cli/auto-resume.js +2 -2
  15. package/dist/public-cli/case-dossier-delivery.js +2 -2
  16. package/dist/public-cli/invocation.js +1 -1
  17. package/dist/public-cli/main.js +3 -3
  18. package/dist/public-cli/option-definitions.js +1 -1
  19. package/dist/public-cli/post-admission.js +6 -6
  20. package/dist/public-cli/seat-ticket-binding.js +1 -1
  21. package/dist/ticket-provenance.js +1 -1
  22. package/package.json +1 -1
  23. package/resources/836-deleted-machine-instruction-inventory.md +1 -1
  24. package/resources/diarist-collect.md +13 -20
  25. package/souls/gatekeeper.md +2 -2
  26. package/souls/inspector.md +2 -2
  27. package/src/activation-ledger.ts +1 -1
  28. package/src/activation-reconciliation.ts +1 -1
  29. package/src/analyst-gate-cycles-read.ts +1 -1
  30. package/src/diarist-contracts.ts +4 -4
  31. package/src/diarist.ts +1 -1
  32. package/src/doctor-contracts.ts +2 -2
  33. package/src/gatekeeper-role.ts +2 -2
  34. package/src/host-contracts.ts +1 -1
  35. package/src/host-transition-prior-native.ts +1 -1
  36. package/src/inspector-contracts.ts +3 -3
  37. package/src/inspector-role.ts +4 -4
  38. package/src/judge-role.ts +1 -1
  39. package/src/package-resources/engine-material.ts +1 -1
  40. package/src/packaged-role-registry.ts +1 -1
  41. package/src/pi/role-turn-host.ts +2 -1
  42. package/src/public-cli/auto-resume.ts +2 -2
  43. package/src/public-cli/case-dossier-delivery.ts +2 -2
  44. package/src/public-cli/cli.ts +1 -1
  45. package/src/public-cli/countersign-run.ts +9 -10
  46. package/src/public-cli/diarist-run.ts +2 -2
  47. package/src/public-cli/invocation.ts +1 -1
  48. package/src/public-cli/option-definitions.ts +1 -1
  49. package/src/public-cli/post-admission.ts +6 -6
  50. package/src/public-cli/seat-ticket-binding.ts +1 -1
  51. package/src/public-role-summons.ts +1 -1
  52. package/src/role-envelope.ts +2 -1
  53. package/src/ticket-provenance.ts +1 -1
  54. package/src/work-subject-identity.ts +1 -1
  55. package/src/worker-submission-gates.ts +1 -1
package/CLAUDE.md CHANGED
@@ -82,7 +82,7 @@ A probe is temporary evidence. After its evidence purpose is disposed, either de
82
82
 
83
83
  **票面先过给事中再开工;决策问题上呈陛下。**(ADR 0074:票庭审读由大理寺移交门下省给事中。)
84
84
 
85
- **设计修订后重新过庭。** 施工中实质设计变更须由陛下拍定;拍定后将修订后的票重新送给事中,由起居郎补录修订依据(ADR 0075;起居郎与票庭的先后归调用者,`no-call-rule`),给事中通过后再按新设计继续施工。既定设计内的实现取舍不属设计修订。
85
+ **设计修订后重新过庭。** 施工中实质设计变更须由陛下拍定;拍定后将修订后的票重新送给事中,由起居郎补录修订依据(ADR 0075:不规定谁调用起居郎、顺序归调用者),给事中通过后再按新设计继续施工。既定设计内的实现取舍不属设计修订。
86
86
 
87
87
  丞相编排建议:御史台 findings 宜经大理寺裁决后再派修理腿(劾→判→修)。
88
88
 
package/README.zh-CN.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @akagilnc/pi-workflow-roles
2
2
 
3
- 为 [Pi](https://pi.dev) 打包的工作流角色:大理寺(judge)、给事中(countersign)、左拾遗(gleaner-left)、修内司(fixer)、将作监(coder)、御史台(reviewer)、通进司(collector)、太医署(doctor)、校书郎(merger)、符宝郎(notary)、察院(inspector)、太史(analyst)。English: [README.md](https://github.com/Akagilnc/ak-pi-workflow-roles/blob/main/README.md)。
3
+ 为 [Pi](https://pi.dev) 打包的工作流角色:大理寺(judge)、给事中(countersign)、左拾遗(gleaner-left)、修内司(fixer)、将作监(coder)、御史台(reviewer)、通进司(collector)、太医署(doctor)、校书郎(merger)、符宝郎(notary)、台院(inspector)、太史(analyst)。English: [README.md](https://github.com/Akagilnc/ak-pi-workflow-roles/blob/main/README.md)。
4
4
 
5
5
  ## 安装
6
6
 
@@ -25,7 +25,7 @@ ak-role judge --attach ./plan.md "Review this plan." > result.txt
25
25
 
26
26
  退出码报的是生命周期诚实,不是业务成败:一切合法 typed 终态(含 `audit_escalation`)退出零;无合法终态的失败退出非零,其 Terminal 携带 Error Artifact 引用与原始原因,不伪造回执。
27
27
 
28
- `ak-role resume <runId> [message]` 按**现行席位表**的 model / host / engine 续跑该次运行——与新起角色腿同一解析(调用旗 → 席位持久 → 包默认)。角色 `escalate`(直通御前)后拿到 owner 裁定,标准续跑是 `ak-role resume <runId> "<裁定>"`——把裁定喂回同一 run,角色继续走到终局。`[message]` 只适用于接收 caller instruction 的席位:对这些席位,`runId` 后可选的 `message` 原样作为续跑 prompt(opaque:不进全局旗标语法);省略则用包自带 resume envelope。Notary/符宝郎必须省略 `message`,仅从既有 source-run/案卷绑定自取证。全局 `--model` / `--thinking` / `--host` / `--engine` 仅覆盖本次 resume——须置于 `<runId>` 之前(放 `resume` 之前或 `resume` 与 `<runId>` 之间均可,例如 `ak-role --model xai/grok-4.5 resume 01abc…` 或 `ak-role resume --model xai/grok-4.5 01abc…`);`<runId>` 之后的那一个 argv 恒为原样透传的 message,绝非旗位(#471)。真实换宿主时(现行席位 host 与上一次 invocation host 不同),将前序宿主原生卷宗一次性作为 context 交付目标宿主;同宿主续跑不重复注入。各宿主仅直写自身原生卷宗(Pi:`session/session.jsonl`;Grok CLI 原始会话留在操作员 grok 家,工厂卷宗为该 run 的司天台记录),统一账目归入司天台。要不要续跑由调用者决定:不再要求 typed HTTP 429,也不要求 `resumable` 状态。未知 run ID、session 主体不在则拒绝。所有可调用角色均可手动 resume:给事中、左拾遗始于 #599,通进司、太医署、符宝郎、察院始于 #633。
28
+ `ak-role resume <runId> [message]` 按**现行席位表**的 model / host / engine 续跑该次运行——与新起角色腿同一解析(调用旗 → 席位持久 → 包默认)。角色 `escalate`(直通御前)后拿到 owner 裁定,标准续跑是 `ak-role resume <runId> "<裁定>"`——把裁定喂回同一 run,角色继续走到终局。`[message]` 只适用于接收 caller instruction 的席位:对这些席位,`runId` 后可选的 `message` 原样作为续跑 prompt(opaque:不进全局旗标语法);省略则用包自带 resume envelope。Notary/符宝郎必须省略 `message`,仅从既有 source-run/案卷绑定自取证。全局 `--model` / `--thinking` / `--host` / `--engine` 仅覆盖本次 resume——须置于 `<runId>` 之前(放 `resume` 之前或 `resume` 与 `<runId>` 之间均可,例如 `ak-role --model xai/grok-4.5 resume 01abc…` 或 `ak-role resume --model xai/grok-4.5 01abc…`);`<runId>` 之后的那一个 argv 恒为原样透传的 message,绝非旗位(#471)。真实换宿主时(现行席位 host 与上一次 invocation host 不同),将前序宿主原生卷宗一次性作为 context 交付目标宿主;同宿主续跑不重复注入。各宿主仅直写自身原生卷宗(Pi:`session/session.jsonl`;Grok CLI 原始会话留在操作员 grok 家,工厂卷宗为该 run 的司天台记录),统一账目归入司天台。要不要续跑由调用者决定:不再要求 typed HTTP 429,也不要求 `resumable` 状态。未知 run ID、session 主体不在则拒绝。所有可调用角色均可手动 resume:给事中、左拾遗始于 #599,通进司、太医署、符宝郎、台院始于 #633。
29
29
 
30
30
  全部可调用角色在单次调用内对非 lawful LLM 终态原地续跑(同一 `runId` 与 session),次数上限为 `autoResumeLimit`。缺键默认 2;`ak-role config set-auto-resume-limit <N>` 写入(`0` 关闭自动续)。lawful typed 终态(`accepted` / `audit_escalation` / `no_receipt`)立即停止。手动 `ak-role resume` 仍可用。
31
31
 
@@ -34,7 +34,7 @@ ak-role judge --attach ./plan.md "Review this plan." > result.txt
34
34
  ```bash
35
35
  ak-role config set judge <provider/model[:thinking]>
36
36
  ak-role config set navigator <provider/model[:thinking]>
37
- # 门下省官席(DONE 交卷直接传召察院/符宝郎;门下省仍可独立直调;给事中票庭由调用者直召,见「调用百官」)
37
+ # 门下省官席(DONE 交卷直接传召台院/符宝郎;门下省仍可独立直调;给事中票庭由调用者直召,见「调用百官」)
38
38
  ak-role config set gatekeeper <provider/model[:thinking]>
39
39
  ak-role config set inspector <provider/model[:thinking]>
40
40
  ak-role config set notary <provider/model[:thinking]>
@@ -95,7 +95,7 @@ ak-role merger --project /path/to/worktree "Reconcile the merge."
95
95
  # 符宝郎——文书核验一份留存 source run;票号从 source-run admitted form 继承
96
96
  ak-role notary --source-run <runId@role|path>
97
97
 
98
- # 察院——直调复杂度与测试质量两轴
98
+ # 台院——直调复杂度与测试质量两轴
99
99
  ak-role inspector --attach ./change.patch "Review this material."
100
100
 
101
101
  # 门下省——直调省审:派官或放行
@@ -130,15 +130,15 @@ ak-role resume <runId> "<裁定>"
130
130
  | **御史台** | reviewer | **察举百弊,风闻奏事。** 置身事外审视成果;Standards/Spec 两条取证腿由 runtime 代跑,本席收腿报告出薄回执与 amendment。弹章须指明所劾之处,言不为狱——不负坐实义务,坐实归大理寺。 |
131
131
  | **大理寺** | judge | **审理定谳。** 承接各方意见与材料,依照既定规则逐项判断,辨明是非曲直。可以准行、退回或请示更高决定,但自身不参与建设与修改。 |
132
132
  | **审刑院** | judge-auditor/doctor-auditor(无 CLI,共享内部接缝;御史台侧闸已退役) | **复核成案。** 不重新争论事情本身,而是检查整个办理过程是否合乎规矩。关注是否有人越过职责、是否遗漏必要步骤、是否以错误方式得出正确结果。直属陛下,不入门下省编制。 |
133
- | **门下省** | gatekeeper(交卷闸不再自动出席;可 `ak-role gatekeeper` 独立直调) | **审署诏敕与质量保证的省。** 交卷闸按受审物直接传召察院/符宝郎,本省不介入选席;调用者仍可独立传召本省作 dispatch/pass;给事中票庭由调用者开工前传召;左拾遗由调用者合并前传召;省内政,不是外层编排器。规范见 [ADR 0067](docs/adr/0067-menxia-province-founding-jishizhong-fubaolang.md)、[ADR 0072](docs/adr/0072-menxia-pre-pr-submission-hooks.md)、[ADR 0074](docs/adr/0074-gate-province-reorg-jishizhong-chaiyuan-split.md)、[ADR 0079](docs/adr/0079-direct-officer-summons-ticket-memory-pointer-input.md)。 |
133
+ | **门下省** | gatekeeper(交卷闸不再自动出席;可 `ak-role gatekeeper` 独立直调) | **审署诏敕与质量保证的省。** 交卷闸按受审物直接传召台院/符宝郎,本省不介入选席;调用者仍可独立传召本省作 dispatch/pass;给事中票庭由调用者开工前传召;左拾遗由调用者合并前传召;省内政,不是外层编排器。规范见 [ADR 0067](docs/adr/0067-menxia-province-founding-jishizhong-fubaolang.md)、[ADR 0072](docs/adr/0072-menxia-pre-pr-submission-hooks.md)、[ADR 0074](docs/adr/0074-gate-province-reorg-jishizhong-chaiyuan-split.md)、[ADR 0079](docs/adr/0079-direct-officer-summons-ticket-memory-pointer-input.md)。 |
134
134
  | **给事中** | countersign(无交卷闸派发;开工前由调用者传召) | **票庭审读五问。** 制度符合/授权真实(以起居录为据)/文书符意/退回重议/发布资格;读码取证是本职,实现细节不上票面。受理内自动先起居郎再本席(#742,调用者无感);其余衙门前的起居郎由调用者传召;交卷闸出席符宝郎。署=放行开工,封驳=退票重议,上呈=陛下裁决。规范见 [ADR 0074](docs/adr/0074-gate-province-reorg-jishizhong-chaiyuan-split.md)、[ADR 0075](docs/adr/0075-ticket-provenance-diarist-pipeline.md)。 |
135
135
  | **左拾遗** | gleaner-left(无交卷闸派发;合并前由调用者传召) | **合并前无锚定风闻。** 对全幅合并候选作冷眼评审;只上弹章、不封驳不裁决。规范见 [ADR 0067](docs/adr/0067-menxia-province-founding-jishizhong-fubaolang.md) 修正案。 |
136
- | **察院** | inspector | **事后察举:复杂度与测试质量两轴。** 受审物是将作监/修内司完成侧交卷;封驳=当场打回重写,不是本局失败。可被门下省派发,也可 `ak-role inspector` 单独调。原给事中,ADR 0074 分立。 |
136
+ | **台院** | inspector | **纠举推鞫:复杂度与测试质量两轴。** 受审物是将作监/修内司完成侧交卷;封驳=当场打回重写,不是本局失败。可被门下省派发,也可 `ak-role inspector` 单独调。原给事中,ADR 0074 分立;中文名由 #584 修订为台院,机器键不动。 |
137
137
  | **符宝郎** | notary | **首责唯一:核实实际授权出处**(防乱编乱扩)。行事两步:读该票起居录→以录核旨;引语真伪与票面对齐为手段。受审物是大理寺拟判与给事中署章;可被门下省派发,也可 `ak-role notary` 单独调。规范见 [ADR 0075](docs/adr/0075-ticket-provenance-diarist-pipeline.md)。 |
138
138
  | **通进司** | collector | **承接百议/收证。** 门下省下的收证衙门:收集外部 GitHub PR 材料与意见,只收不审、不替人裁决。canonical 键仍为 `collector`。 |
139
139
  | **校书郎** | merger | **雠校异文。** 面对不同来源的修改,负责整理、校合与调和。保留双方有价值的部分,解决彼此冲突;无进行中合并、无活可干或遇到无法自行决定之处,则升级。 |
140
140
  | **游奕使** | navigator(随公开入口顶层腿自动出席,亦可 `ak-role navigator` 直调) | **巡行问路。** 不掌具体事务,而是观察全局变化,结合当前局面提醒下一步方向。它提供建议与路径参考,但最终选择仍由执掌之人决定。 |
141
- | **起居郎** | diarist(`ak-role diarist` 单独传召;给事中受理内自动先起,#742) | **修起居录。** 为本票搜集、整理决策依据,写进每票起居录;LLM 自行搜集、整理、认票(#779 后无机械验真,机械只做 IO;起居录供符宝郎读录核旨)。只记录已作出的决定,不立法、不批准设计、不指挥施工。规范见 [ADR 0075](docs/adr/0075-ticket-provenance-diarist-pipeline.md) `diarist-is-role`、[ADR 0081](docs/adr/0081-diarist-case-context-and-delivery.md)。 |
141
+ | **起居郎** | diarist(`ak-role diarist` 单独传召;给事中受理内自动先起,#742) | **修起居录。** 为本票搜集、整理决策依据,写进每票起居录;LLM 自行搜集、整理、认票(#779 后无机械验真,机械只做 IO;起居录供符宝郎读录核旨)。只记录已作出的决定,不立法、不批准设计、不指挥施工。规范见 [ADR 0075](docs/adr/0075-ticket-provenance-diarist-pipeline.md)(起居郎是 LLM 角色)、[ADR 0081](docs/adr/0081-diarist-case-context-and-delivery.md)。 |
142
142
 
143
143
  其余席位:
144
144
 
@@ -148,6 +148,8 @@ ak-role resume <runId> "<裁定>"
148
148
  | analyst | **太史** | 司天台分析席:只读司天记录、出高阶指标;确定性机制,非 LLM,可单独调用 | 已建([ADR 0068](docs/adr/0068-taishi-analysis-seat-reads-records-writes-sibling-home.md);机器面键 `analyst`,[#445](https://github.com/Akagilnc/ak-pi-workflow-roles/issues/445) 拼音清零) |
149
149
  | — | **司天台** | 记候簿——只打点、只指针,不分析不执法;二期含每票起居录 kind `ticket-provenance` | **一期不是角色**([ADR 0047](docs/adr/0047-sitian-phase-one-mechanism-not-role.md):零 LLM 双面对账);分析席已由太史承担;起居录见 [ADR 0075](docs/adr/0075-ticket-provenance-diarist-pipeline.md);机器面键 `archivist`([#445](https://github.com/Akagilnc/ak-pi-workflow-roles/issues/445)) |
150
150
  | marshal | **尚书省** | 审→判→修 质量收敛环的省部级驱动角色:调用方递票号与 baseline,尚书省驱动御史台/大理寺/修内司滚到收敛(converged 唯庭可判)或 escalate 上呈,交回 typed 报告;不弹、不判、不修,只让链条转到收敛 | 已定名(#145);席位待落地(#146) |
151
+ | — | **殿院** | [#560](https://github.com/Akagilnc/ak-pi-workflow-roles/issues/560) 机械定点测试巡查件(产物 kind `test-report`) | 在建/待落地,非席位,不占机器键 |
152
+ | — | **察院** | 巡按层名号占位 | 悬置,仅保留名号,巡按机制未建 |
151
153
  | — | **兰台** | 读档议制——耗时/缺口/冗余三条,上奏不执法 | 未建 |
152
154
  | — | **考功司** | 考具体效率——角色与档位的升档率、一次通过率、每票成本 | 留档,需要时另立票 |
153
155
  | — | **主簿** | 合并后勾稽销案:核实确已合上、清理残留、报到达 | 未建 |
@@ -1190,11 +1190,11 @@ var init_inspector_contracts = __esm({
1190
1190
  "src/inspector-contracts.ts"() {
1191
1191
  "use strict";
1192
1192
  INSPECTOR_OUTPUT_TOOL_NAME = "ak_inspector_output";
1193
- INSPECTOR_ACCEPTED_TEXT = "\u5BDF\u9662\u56DE\u6267\u5DF2\u63A5\u53D7";
1193
+ INSPECTOR_ACCEPTED_TEXT = "\u53F0\u9662\u56DE\u6267\u5DF2\u63A5\u53D7";
1194
1194
  INSPECTOR_SOURCE_RUN_FLAG = {
1195
1195
  name: "ak-inspector-source-run",
1196
1196
  definition: {
1197
- description: "\u5BDF\u9662\u521D\u94F8\u7ED1\u5B9A\u7684\u7236 run \u7EDD\u5BF9\u8DEF\u5F84",
1197
+ description: "\u53F0\u9662\u521D\u94F8\u7ED1\u5B9A\u7684\u7236 run \u7EDD\u5BF9\u8DEF\u5F84",
1198
1198
  type: "string"
1199
1199
  }
1200
1200
  };
@@ -2353,7 +2353,7 @@ var init_packaged_role_registry = __esm({
2353
2353
  activationStage: "load-and-install",
2354
2354
  sessionMaterials: AUDITOR_PUBLIC_SESSION_MATERIALS
2355
2355
  },
2356
- // #708 / ADR 0075 `diarist-is-role` / #779: 起居郎 is a seat like any other.
2356
+ // #708 / ADR 0075(起居郎是 LLM 角色)/ #779: 起居郎 is a seat like any other.
2357
2357
  // No input flag — LLM finds materials itself (caller-transparent).
2358
2358
  {
2359
2359
  role: "diarist",
@@ -7137,7 +7137,7 @@ var init_option_definitions = __esm({
7137
7137
  },
7138
7138
  inspector: {
7139
7139
  command: "inspector",
7140
- summary: "Direct Inspector (\u5BDF\u9662) complexity and test-quality check; pass or bounce.",
7140
+ summary: "Direct Inspector (\u53F0\u9662) complexity and test-quality check; pass or bounce.",
7141
7141
  usage: ["ak-role inspector [options] [instruction]"],
7142
7142
  examples: [
7143
7143
  'ak-role inspector --attach ./change.patch "Review this material."'
@@ -18851,7 +18851,7 @@ var init_public_role_summons = __esm({
18851
18851
 
18852
18852
  // src/gatekeeper-role.ts
18853
18853
  function gateSeatLabel(stage) {
18854
- if (stage === "inspector") return "\u5BDF\u9662";
18854
+ if (stage === "inspector") return "\u53F0\u9662";
18855
18855
  if (stage === "auditor") return "\u5BA1\u5211\u9662";
18856
18856
  return "\u7B26\u5B9D\u90CE";
18857
18857
  }
@@ -20660,9 +20660,9 @@ var inspectorOutputSchema = withInfrastructureFailureDeclaration(
20660
20660
  );
20661
20661
  var INSPECTOR_TOOL_SPEC = {
20662
20662
  name: INSPECTOR_OUTPUT_TOOL_NAME,
20663
- label: "\u5BDF\u9662\u8F93\u51FA",
20664
- description: "\u5BDF\u9662\u7EC8\u5C40\u56DE\u6267\uFF0C\u72B6\u6001\u4E3A pass\u3001bounce \u6216 escalate\u3002",
20665
- promptSnippet: "\u5BDF\u9662\u7EC8\u5C40\u56DE\u6267",
20663
+ label: "\u53F0\u9662\u8F93\u51FA",
20664
+ description: "\u53F0\u9662\u7EC8\u5C40\u56DE\u6267\uFF0C\u72B6\u6001\u4E3A pass\u3001bounce \u6216 escalate\u3002",
20665
+ promptSnippet: "\u53F0\u9662\u7EC8\u5C40\u56DE\u6267",
20666
20666
  parameters: inspectorOutputSchema
20667
20667
  };
20668
20668
 
@@ -19,7 +19,7 @@
19
19
  * the same throw→ledger `auditor-roles` unreadable seam. Unknown/non-contract
20
20
  * dispatch status stays loud (#475 abolished Gatekeeper incomplete special-case).
21
21
  * Lawful province non-dispatch release (`pass` on a dispatch tool) opens no
22
- * round and must not throw (#597 / ADR 0074 gate-non-mandatory).
22
+ * round and must not throw (#597 / ADR 0074: 角色调动无强制,交卷闸派发不断).
23
23
  * True non-gate volumes (soul-audit noise, etc.) stay omitted from pairing.
24
24
  * Historical dispatch↔officer pairing requires a shared typed
25
25
  * `ak_auditor_parent_attempt_binding.parent.attemptEntryId` — never seat/time guessing.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Public 起居郎 (diarist) terminating receipt contracts — ADR 0075 `diarist-is-role`.
2
+ * Public 起居郎 (diarist) terminating receipt contracts — ADR 0075(起居郎是 LLM 角色)。
3
3
  * Lawful explicit releases: completed (入录) | escalate (认不出本庭对象上抛).
4
4
  * Machine facts about the volume come from the mechanical sitian seam, never
5
5
  * from model self-report (锚定宪法); this module owns the receipt shape only.
@@ -6,7 +6,7 @@ export const INSPECTOR_OUTPUT_TOOL = INSPECTOR_OUTPUT_TOOL_NAME;
6
6
  export const NOTARY_OUTPUT_TOOL = "ak_notary_output";
7
7
  function gateSeatLabel(stage) {
8
8
  if (stage === "inspector")
9
- return "察院";
9
+ return "台院";
10
10
  if (stage === "auditor")
11
11
  return "审刑院";
12
12
  return "符宝郎";
@@ -1228,11 +1228,11 @@ var init_inspector_contracts = __esm({
1228
1228
  "src/inspector-contracts.ts"() {
1229
1229
  "use strict";
1230
1230
  INSPECTOR_OUTPUT_TOOL_NAME = "ak_inspector_output";
1231
- INSPECTOR_ACCEPTED_TEXT = "\u5BDF\u9662\u56DE\u6267\u5DF2\u63A5\u53D7";
1231
+ INSPECTOR_ACCEPTED_TEXT = "\u53F0\u9662\u56DE\u6267\u5DF2\u63A5\u53D7";
1232
1232
  INSPECTOR_SOURCE_RUN_FLAG = {
1233
1233
  name: "ak-inspector-source-run",
1234
1234
  definition: {
1235
- description: "\u5BDF\u9662\u521D\u94F8\u7ED1\u5B9A\u7684\u7236 run \u7EDD\u5BF9\u8DEF\u5F84",
1235
+ description: "\u53F0\u9662\u521D\u94F8\u7ED1\u5B9A\u7684\u7236 run \u7EDD\u5BF9\u8DEF\u5F84",
1236
1236
  type: "string"
1237
1237
  }
1238
1238
  };
@@ -2656,7 +2656,7 @@ var init_packaged_role_registry = __esm({
2656
2656
  activationStage: "load-and-install",
2657
2657
  sessionMaterials: AUDITOR_PUBLIC_SESSION_MATERIALS
2658
2658
  },
2659
- // #708 / ADR 0075 `diarist-is-role` / #779: 起居郎 is a seat like any other.
2659
+ // #708 / ADR 0075(起居郎是 LLM 角色)/ #779: 起居郎 is a seat like any other.
2660
2660
  // No input flag — LLM finds materials itself (caller-transparent).
2661
2661
  {
2662
2662
  role: "diarist",
@@ -6528,7 +6528,7 @@ var init_option_definitions = __esm({
6528
6528
  },
6529
6529
  inspector: {
6530
6530
  command: "inspector",
6531
- summary: "Direct Inspector (\u5BDF\u9662) complexity and test-quality check; pass or bounce.",
6531
+ summary: "Direct Inspector (\u53F0\u9662) complexity and test-quality check; pass or bounce.",
6532
6532
  usage: ["ak-role inspector [options] [instruction]"],
6533
6533
  examples: [
6534
6534
  'ak-role inspector --attach ./change.patch "Review this material."'
@@ -18217,7 +18217,7 @@ var init_public_role_summons = __esm({
18217
18217
 
18218
18218
  // src/gatekeeper-role.ts
18219
18219
  function gateSeatLabel(stage) {
18220
- if (stage === "inspector") return "\u5BDF\u9662";
18220
+ if (stage === "inspector") return "\u53F0\u9662";
18221
18221
  if (stage === "auditor") return "\u5BA1\u5211\u9662";
18222
18222
  return "\u7B26\u5B9D\u90CE";
18223
18223
  }
@@ -21759,9 +21759,9 @@ var inspectorOutputSchema = withInfrastructureFailureDeclaration(
21759
21759
  );
21760
21760
  var INSPECTOR_TOOL_SPEC = {
21761
21761
  name: INSPECTOR_OUTPUT_TOOL_NAME,
21762
- label: "\u5BDF\u9662\u8F93\u51FA",
21763
- description: "\u5BDF\u9662\u7EC8\u5C40\u56DE\u6267\uFF0C\u72B6\u6001\u4E3A pass\u3001bounce \u6216 escalate\u3002",
21764
- promptSnippet: "\u5BDF\u9662\u7EC8\u5C40\u56DE\u6267",
21762
+ label: "\u53F0\u9662\u8F93\u51FA",
21763
+ description: "\u53F0\u9662\u7EC8\u5C40\u56DE\u6267\uFF0C\u72B6\u6001\u4E3A pass\u3001bounce \u6216 escalate\u3002",
21764
+ promptSnippet: "\u53F0\u9662\u7EC8\u5C40\u56DE\u6267",
21765
21765
  parameters: inspectorOutputSchema
21766
21766
  };
21767
21767
 
@@ -15,7 +15,7 @@ export class ExplicitInternalActivationError extends Error {
15
15
  }
16
16
  }
17
17
  }
18
- /** Gate review officers (察院 / 符宝郎 / 审刑院). Single authority for seat checks. */
18
+ /** Gate review officers (台院 / 符宝郎 / 审刑院). Single authority for seat checks. */
19
19
  export function isOfficerReviewSeat(role) {
20
20
  return role === "notary" || role === "inspector" || role === "auditor";
21
21
  }
@@ -58,7 +58,7 @@ async function listSitianRecordPaths(sessionParent) {
58
58
  * still yields a typed switch (empty path list).
59
59
  *
60
60
  * Pi wrote its own session.jsonl; every other host's run volume is the sitian
61
- * record set on the live run (ADR 0077 `record-scope-phase-two`, #717) — the CLI's
61
+ * record set on the live run (ADR 0077 全宿主 session 卷宗统一直写, #717) — the CLI's
62
62
  * own journals stay in the operator home and are never copied here.
63
63
  */
64
64
  export async function projectHostTransitionPriorNative(input) {
@@ -1,9 +1,9 @@
1
1
  const INSPECTOR_OUTPUT_TOOL_NAME = "ak_inspector_output";
2
- const INSPECTOR_ACCEPTED_TEXT = "\u5BDF\u9662\u56DE\u6267\u5DF2\u63A5\u53D7";
2
+ const INSPECTOR_ACCEPTED_TEXT = "\u53F0\u9662\u56DE\u6267\u5DF2\u63A5\u53D7";
3
3
  const INSPECTOR_SOURCE_RUN_FLAG = {
4
4
  name: "ak-inspector-source-run",
5
5
  definition: {
6
- description: "\u5BDF\u9662\u521D\u94F8\u7ED1\u5B9A\u7684\u7236 run \u7EDD\u5BF9\u8DEF\u5F84",
6
+ description: "\u53F0\u9662\u521D\u94F8\u7ED1\u5B9A\u7684\u7236 run \u7EDD\u5BF9\u8DEF\u5F84",
7
7
  type: "string"
8
8
  }
9
9
  };
@@ -14681,7 +14681,7 @@ var init_option_definitions = __esm({
14681
14681
  },
14682
14682
  inspector: {
14683
14683
  command: "inspector",
14684
- summary: "Direct Inspector (\u5BDF\u9662) complexity and test-quality check; pass or bounce.",
14684
+ summary: "Direct Inspector (\u53F0\u9662) complexity and test-quality check; pass or bounce.",
14685
14685
  usage: ["ak-role inspector [options] [instruction]"],
14686
14686
  examples: [
14687
14687
  'ak-role inspector --attach ./change.patch "Review this material."'
@@ -195,7 +195,7 @@ const PUBLIC_ROLE_RECORDS = [
195
195
  activationStage: "load-and-install",
196
196
  sessionMaterials: AUDITOR_PUBLIC_SESSION_MATERIALS
197
197
  },
198
- // #708 / ADR 0075 `diarist-is-role` / #779: 起居郎 is a seat like any other.
198
+ // #708 / ADR 0075(起居郎是 LLM 角色)/ #779: 起居郎 is a seat like any other.
199
199
  // No input flag — LLM finds materials itself (caller-transparent).
200
200
  {
201
201
  role: "diarist",
@@ -72,7 +72,8 @@ function buildMethodArgs(methods) {
72
72
  return skillArgs;
73
73
  }
74
74
  /**
75
- * Pi-native `/skill:<name>` for a single forced method (ADR 0082 `pi-no-privilege`).
75
+ * Pi-native `/skill:<name>` for a single forced method (ADR 0082: pi is one adapter
76
+ * with no privilege; Pi-only seams stay inside the pi adapter).
76
77
  * Driven by typed RoleTurnRequest.methods — middle-layer decision, Pi-only syntax.
77
78
  * Zero/many methods leave the prompt alone (Fixer optional pair stays `--skill` only).
78
79
  */
@@ -70,8 +70,8 @@ async function finalizeExceptionRunBestEffort(runDirectory, io) {
70
70
  /**
71
71
  * Thrown by dispatchPostAdmissionTurn when a failure happens inside its own
72
72
  * settlement authority (presentControlledFailure) after the host turn
73
- * genuinely started — never to fabricate a replacement terminal (ADR 0080
74
- * single-settlement-disposition: settlement stays exactly presentControlledFailure
73
+ * genuinely started — never to fabricate a replacement terminal (ADR 0080:
74
+ * one settlement disposition owner — settlement stays exactly presentControlledFailure
75
75
  * / settleFailureTerminalResult, or — once the retry budget is exhausted —
76
76
  * this loop's own dispatchExceptionFailureTerminal). Its only job is to carry
77
77
  * the "turn already started" fact across the throw boundary so this loop
@@ -1,7 +1,7 @@
1
1
  /**
2
- * 系统随案递送本票起居录的中立指针段(ADR 0081 `automatic-case-material`;
2
+ * 系统随案递送本票起居录的中立指针段(ADR 0081:公共入口直接挂案卷,Soul 只说明用途不负责派送;
3
3
  * #709 公共入口通用递送与 #742 给事中受理链路同源;
4
- * 指针输入沿 ADR 0079 `summons-pointer-input`,不把卷宗正文塞进提示词)。
4
+ * 指针输入沿 ADR 0079(指针是绑定材料由代码精准递送),不把卷宗正文塞进提示词)。
5
5
  * 只读已有案卷:不刷新、不生成、不校验内容、不新增拒收或停工条件。
6
6
  * 机器文本仅中立标识材料(ADR 0073),用途说明归角色材料所有。
7
7
  *
@@ -675,7 +675,7 @@ export async function admitJudgeInvocation(options) {
675
675
  return admitStandardMaterialInvocation("judge", options);
676
676
  }
677
677
  /**
678
- * Admit a direct Inspector (察院) run: freeze attachments, persist the request,
678
+ * Admit a direct Inspector (台院) run: freeze attachments, persist the request,
679
679
  * and reserve session placement. Same instruction-seat face as Judge (#568).
680
680
  */
681
681
  export async function admitInspectorInvocation(options) {
@@ -15142,7 +15142,7 @@ var init_packaged_role_registry = __esm({
15142
15142
  activationStage: "load-and-install",
15143
15143
  sessionMaterials: AUDITOR_PUBLIC_SESSION_MATERIALS
15144
15144
  },
15145
- // #708 / ADR 0075 `diarist-is-role` / #779: 起居郎 is a seat like any other.
15145
+ // #708 / ADR 0075(起居郎是 LLM 角色)/ #779: 起居郎 is a seat like any other.
15146
15146
  // No input flag — LLM finds materials itself (caller-transparent).
15147
15147
  {
15148
15148
  role: "diarist",
@@ -20436,7 +20436,7 @@ var init_option_definitions = __esm({
20436
20436
  },
20437
20437
  inspector: {
20438
20438
  command: "inspector",
20439
- summary: "Direct Inspector (\u5BDF\u9662) complexity and test-quality check; pass or bounce.",
20439
+ summary: "Direct Inspector (\u53F0\u9662) complexity and test-quality check; pass or bounce.",
20440
20440
  usage: ["ak-role inspector [options] [instruction]"],
20441
20441
  examples: [
20442
20442
  'ak-role inspector --attach ./change.patch "Review this material."'
@@ -30294,7 +30294,7 @@ async function invokeCourtDiarist(input, env, io) {
30294
30294
  ...env.signal === void 0 ? {} : { signal: env.signal },
30295
30295
  ...input.boundTicketNumber === void 0 ? {} : { boundTicketNumber: input.boundTicketNumber },
30296
30296
  // Child seat selects from the composition-root table. Do not pass the
30297
- // already-selected parent adapter (#840 / ADR 0082 host-flag-two-channels).
30297
+ // already-selected parent adapter (#840 / ADR 0082: --host 旗标>席位配置>缺省 pi).
30298
30298
  ...env.hostAdapters === void 0 ? {} : { hostAdapters: env.hostAdapters }
30299
30299
  });
30300
30300
  const roleOutcome = result2.terminal?.roleOutcome;
@@ -1011,7 +1011,7 @@ const ROLE_COMMAND_HELP = {
1011
1011
  },
1012
1012
  inspector: {
1013
1013
  command: "inspector",
1014
- summary: "Direct Inspector (察院) complexity and test-quality check; pass or bounce.",
1014
+ summary: "Direct Inspector (台院) complexity and test-quality check; pass or bounce.",
1015
1015
  usage: ["ak-role inspector [options] [instruction]"],
1016
1016
  examples: [
1017
1017
  'ak-role inspector --attach ./change.patch "Review this material."',
@@ -209,8 +209,8 @@ export async function presentControlledFailure(admitted, failureInput, adapters,
209
209
  /**
210
210
  * presentControlledFailure, called only where the host turn has already
211
211
  * genuinely started (#840 r9 判词 class 1 boundary). If presentControlledFailure
212
- * itself fails, this never fabricates a replacement terminal (ADR 0080
213
- * single-settlement-disposition — presentControlledFailure /
212
+ * itself fails, this never fabricates a replacement terminal (ADR 0080:
213
+ * one settlement disposition owner — presentControlledFailure /
214
214
  * settleFailureTerminalResult stays the one authority); it re-throws a
215
215
  * TurnDispatchedFailure so runWithAutoResumeLoop still learns the turn
216
216
  * started and selects a resume payload on the next attempt, while settling
@@ -230,8 +230,8 @@ async function settleAfterTurnStarted(admitted, failureInput, adapters, authorit
230
230
  * (needsPersist — station-child / resumable auto-resume loop, #416/#840):
231
231
  * that write must land outside the loop's own retried-dispatch try, but its
232
232
  * failure still settles through the single existing controlled-failure
233
- * authority (settleAfterTurnStarted / presentControlledFailure, ADR 0080
234
- * single-settlement-disposition) — never a second hand-rolled
233
+ * authority (settleAfterTurnStarted / presentControlledFailure, ADR 0080:
234
+ * one settlement disposition owner) — never a second hand-rolled
235
235
  * classify/artifact/Terminal (#836 r12 class 3), and never lawful/non-lawful
236
236
  * settling differently (#836 r13 class 2: a caller's io here may be a no-op,
237
237
  * so a stderr-only trace is never seen and the failure is otherwise
@@ -437,8 +437,8 @@ export async function dispatchPostAdmissionTurn(input) {
437
437
  // 判词 class 1 boundary — 覆盖 executeTurn 已启动后至返回带 turnDispatched
438
438
  // 结果前的全部异常). Each fallible step routes any failure through the
439
439
  // single existing settlement authority (presentControlledFailure /
440
- // settleFailureTerminalResult) rather than a second one (ADR 0080
441
- // single-settlement-disposition) — never by fabricating a terminal here.
440
+ // settleFailureTerminalResult) rather than a second one (ADR 0080:
441
+ // one settlement disposition owner) — never by fabricating a terminal here.
442
442
  // A cleanup step that runs only after a real settlement (clearCurrentCourt)
443
443
  // is protected by logging and keeping that already-obtained result, never
444
444
  // by discarding it (#840 已交劳动只整理终局不重做). A failure inside the
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Shared ticket identity seam for public court seats (#635 / #637 / #709 / #747 / #771).
3
3
  *
4
- * ADR 0075 `diarist-resolves-ticket-llm-layer`: the diarist LLM recognizes the
4
+ * ADR 0075(起居郎 LLM 自行认票): the diarist LLM recognizes the
5
5
  * court target; recognized ticket → provenance, truly unbound → no provenance,
6
6
  * or escalate when it cannot recognize one. Code does not re-judge the ticket
7
7
  * (锚定宪法; owner 2026-09-08: 代码不准做判断). Other seats reuse a typed
@@ -222,7 +222,7 @@ export function renderTicketProvenanceMarkdown(input) {
222
222
  /**
223
223
  * Ensure the per-ticket JSONL volume partition exists (empty file OK).
224
224
  * Every bound-ticket court establishes the volume even with zero diary entries
225
- * (ADR 0075 ticket-provenance-file — 每票一份起居录). Does not forge entries.
225
+ * (ADR 0075: 每票一份起居录送司天台). Does not forge entries.
226
226
  */
227
227
  export function ensureTicketProvenanceVolume(ticketNumber, cwd, home) {
228
228
  const volume = resolveTicketProvenanceVolume(ticketNumber, cwd, home);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akagilnc/pi-workflow-roles",
3
- "version": "0.1.4196",
3
+ "version": "0.1.4204",
4
4
  "description": "Soul-bound workflow roles for Pi",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -6,7 +6,7 @@
6
6
  |---|---|---|
7
7
  | `role-envelope.ts` `buildSkillExpansion` | `References are relative to ${dirname}.` | 删。方法体原文即可。 |
8
8
  | `role-runtime.ts` reviewer parent prompt | `权威 Spec 不存在;未启动 Spec 取证腿。` | 删。Spec 有无由本席读材料自判。 |
9
- | `compliance-transport.ts` `AUDITOR_DOSSIER_PROMPT` | `本 run 卷宗已就绪。` | 改为察院同形路径指针。 |
9
+ | `compliance-transport.ts` `AUDITOR_DOSSIER_PROMPT` | `本 run 卷宗已就绪。` | 改为台院同形路径指针。 |
10
10
  | `doctor-role.ts` case catalog | `provenance: "由留存 session 字节推导,封入受理回执。"` | 删。catalog 只留 cost 与证据指针。 |
11
11
  | `collector-role.ts` bounceInfrastructure | `请省略该字段后重新提交。` | 代码打回推翻自报已删。 |
12
12
  | `reviewer-role.ts` output description | `Standards/Spec 评审腿由 runtime 以取证子会话代跑…` | 改为「本席自调 code-review skill」。方法步骤在 `resources/methods/code-review/SKILL.md`。 |
@@ -1,44 +1,37 @@
1
- # 起居郎收集方法(owner-domain)
1
+ # 起居郎收集方法
2
2
 
3
- 本文件是起居郎语义收集的方法真源(ADR 0075 `diarist-llm-collector` / `transcribe-whole-blocks`;#779 调用方无感)。
3
+ 本文件是起居郎语义收集的方法真源(ADR 0075;#779 调用方无感)。
4
4
 
5
5
  ## 任务
6
6
 
7
- 为本案找出决策相关材料,以**整块**交卷入本票起居录。材料由你自己去找——不要等调用方贴路径、附件或预切清单。
7
+ 判断本庭对象是哪张票、本票对话起止于何处并交出边界;正文与定位由机械按边界从会话卷投影。不整块誊录正文,不自行搜集材料替代机械投影;本文件不新立职掌、不替 soul 立法、不复制 schema 与 CLI 说明。
8
8
 
9
- ## 如何找材料
9
+ ## 如何定边界
10
10
 
11
- 你是 LLM,自己读:
11
+ 你是 LLM,自己读以判断边界:
12
12
 
13
- - 本仓 Claude 会话卷:`~/.claude/projects/` 下与本仓相关的目录(路径里的 `_` 在目录名里常写作 `-`;主 clone 与 worktree 可能共用或分列,自行辨认)
13
+ - 本仓相关会话卷(路径里的 `_` 在目录名里常写作 `-`;主 clone 与 worktree 可能共用或分列,自行辨认)
14
14
  - 本票票面与评论:用 `gh` 或等价方式读 GitHub issue
15
- - 票面引用的 ADR 原件:仓内 `docs/adr/`
16
15
 
17
- 调用方只给传召文与 `--project`;不附清单、不写候选路径。找不到就如实说明,不编造。
16
+ 调用方只给传召文与 `--project`。边界定不下来就如实说明并走既有 reask/escalate,不编造。
18
17
 
19
- ## 何谓决策相关
18
+ ## 何谓本票对话
20
19
 
21
- 与下列任一有关的整块均应入选:
20
+ 与本票决策相关的陛下与 runner 对话均应落入边界:
22
21
 
23
22
  - 本票要立什么、不立什么、范围如何收束
24
23
  - 命名、工序先后、调用面、闸位、存量是否补档等裁决
25
24
  - 对既有 ADR / 法源的采纳、修正或明确不适用
26
25
  - 陛下(owner)原话、确认、否决、收口条件
27
- - 为上述裁决提供必要上下文的紧邻块
26
+ - 为上述裁决提供必要上下文的紧邻对话
28
27
 
29
- 无关闲聊、纯工具噪声、与本票决策无涉的他票材料不选。相关性由你裁决。
30
-
31
- ## 誊录整块
32
-
33
- - 入选即整块保留:交卷对象里写完整 `transcript`,并带上可回指的 `sourceRef`(会话文件+entry、issue URL、ADR path 等)。
34
- - 不指针化、不摘要替代正文。
35
- - 宁多勿漏:拿不准是否决策相关时入选。
28
+ 工具输出与机器块不入录。无关闲聊、与本票决策无涉的他票材料不划进边界。相关性由你裁决。
36
29
 
37
30
  ## 本票身份
38
31
 
39
- 由你(本席 LLM)判断当前要办的是哪张票,在交卷对象上以 typed 字段交出——代码不做认票裁定(ADR 0075 `diarist-resolves-ticket-llm-layer`;owner:代码不准做判断/机械层不判断 LLM 输出)。
32
+ 由你(本席 LLM)判断当前要办的是哪张票,在交卷对象上以 typed 字段交出——代码不做认票裁定(ADR 0075:起居郎 LLM 自行认票;认得出→有录,真无票→无录;机械层不做引文/票号/相关性判定)。
40
33
 
41
- - 认得出本庭对象:`status: completed` 且 `ticketNumber: N`,并交 `entries`(可空)。
34
+ - 认得出本庭对象:`status: completed` 且 `ticketNumber: N`,并交边界。
42
35
  - 真无票对象(方案/派单/处置案等):`status: completed` 且 `ticketNumber: null`(或省略)。真无票是合法结果,不入录。
43
36
  - 认不出本庭对象是哪一张:`status: escalate` 并写明 `reason`。识别不了就上抛,不得省略票号假装无录,也不得猜一个号。
44
37
  - 不得从旁及的他票或任何猜测里挑一个号顶替认不出的身份。
@@ -3,12 +3,12 @@
3
3
  你是门下省,审署诏敕与质量保证的省。你判断目前流程,该谁审。
4
4
 
5
5
  交卷闸派发对象:
6
- - 察院:审复杂度与测试质量(事后察举)。
6
+ - 台院:审复杂度与测试质量(事后察举)。
7
7
  - 符宝郎:核票面与判词有无加戏(逐条追陛下原话);判词与票面对齐不归它。
8
8
  票庭审读官给事中由调用者开工前传召,非闸派。
9
9
  通进司:收证,只收不审。目前只在 PR 开出以后才会用。
10
10
 
11
- 交卷闸派官基本规则:将作监、修内司 → 察院;大理寺 → 符宝郎。
11
+ 交卷闸派官基本规则:将作监、修内司 → 台院;大理寺 → 符宝郎。
12
12
  原则上只许加不许减少;确需减少,派官时写明实际理由。
13
13
 
14
14
  官的判词回到你手。该审的没审,或实证指其有错——退回该官重出。
@@ -1,6 +1,6 @@
1
- # 察院 Soul
1
+ # 台院 Soul
2
2
 
3
- 你是察院。主责:代码正确性、代码复杂度、测试质量与时长、测试复杂度。
3
+ 你是台院。主责:代码正确性、代码复杂度、测试质量与时长、测试复杂度。
4
4
 
5
5
  先立法源:起居录,票面,相关adr, content, 陛下原话等。
6
6
 
@@ -100,7 +100,7 @@ export function correlationIdentityFromEnv(
100
100
 
101
101
  /**
102
102
  * Descriptor-driven top-level pick: only ACCEPTED_ACTIVATION_FACT_KEYS leave this boundary.
103
- * Nested session/correlation are rebuilt closed before the pick (ADR 0049 zero-content by construction).
103
+ * Nested session/correlation are rebuilt closed before the pick (ADR 0049: first-phase ledger holds zero content bytes by construction).
104
104
  */
105
105
  function projectAcceptedActivationFact(
106
106
  input: AcceptedActivationFactInput,
@@ -28,7 +28,7 @@ export type DispatchStubFactInput = Omit<DispatchStubFact, "event">;
28
28
 
29
29
  /**
30
30
  * Construct the closed dispatch stub from trusted typed inputs only.
31
- * Nested dispatch/correlation are rebuilt closed (ADR 0049 zero-content by construction).
31
+ * Nested dispatch/correlation are rebuilt closed (ADR 0049: first-phase ledger holds zero content bytes by construction).
32
32
  */
33
33
  export function buildDispatchStubFact(input: DispatchStubFactInput): DispatchStubFact {
34
34
  return {
@@ -19,7 +19,7 @@
19
19
  * the same throw→ledger `auditor-roles` unreadable seam. Unknown/non-contract
20
20
  * dispatch status stays loud (#475 abolished Gatekeeper incomplete special-case).
21
21
  * Lawful province non-dispatch release (`pass` on a dispatch tool) opens no
22
- * round and must not throw (#597 / ADR 0074 gate-non-mandatory).
22
+ * round and must not throw (#597 / ADR 0074: 角色调动无强制,交卷闸派发不断).
23
23
  * True non-gate volumes (soul-audit noise, etc.) stay omitted from pairing.
24
24
  * Historical dispatch↔officer pairing requires a shared typed
25
25
  * `ak_auditor_parent_attempt_binding.parent.attemptEntryId` — never seat/time guessing.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Public 起居郎 (diarist) terminating receipt contracts — ADR 0075 `diarist-is-role`.
2
+ * Public 起居郎 (diarist) terminating receipt contracts — ADR 0075(起居郎是 LLM 角色)。
3
3
  * Lawful explicit releases: completed (入录) | escalate (认不出本庭对象上抛).
4
4
  * Machine facts about the volume come from the mechanical sitian seam, never
5
5
  * from model self-report (锚定宪法); this module owns the receipt shape only.
@@ -21,7 +21,7 @@ export const DIARIST_OUTPUT_TOOL_NAME = "ak_diarist_output";
21
21
  export const DIARIST_ACCEPTED_TEXT = "起居郎回执已接受";
22
22
 
23
23
  /**
24
- * One whole block the diarist chose to enter (ADR 0075 `transcribe-whole-blocks`).
24
+ * One whole block the diarist chose to enter (ADR 0075 誊录整块对话)。
25
25
  * LLM supplies the block bytes + source pointer; mechanical layer appends as-is.
26
26
  */
27
27
  export type DiaristEntrySubmission = {
@@ -38,13 +38,13 @@ export type DiaristOutput =
38
38
  | {
39
39
  readonly status: "completed";
40
40
  /**
41
- * Typed court-target assertion (ADR 0075 `diarist-resolves-ticket-llm-layer`).
41
+ * Typed court-target assertion (ADR 0075 起居郎 LLM 自行认票)。
42
42
  * Positive integer = 本庭对象=票N; null/absent = true-unbound (真无票→无录).
43
43
  * LLM owns recognition; mechanical layer does not re-judge the number.
44
44
  */
45
45
  readonly ticketNumber?: number | null;
46
46
  /**
47
- * #871 typed co-review set (ADR 0075 `diarist-resolves-ticket-llm-layer` narrow extension).
47
+ * #871 typed co-review set (ADR 0075 合审票集 narrow extension)。
48
48
  * Positive integers = tickets that should each receive a diary this court (includes main).
49
49
  * Field absent → no new set this turn (resume keeps stored run fact; first court defaults to [main]).
50
50
  * Explicit empty array → single-ticket face [main] whole-set replace.
package/src/diarist.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 起居郎 volume commit — ADR 0075 `diarist-is-role` / #779.
2
+ * 起居郎 volume commit — ADR 0075(起居郎是 LLM 角色)/ #779.
3
3
  * Semantic collection is the diarist role's own LLM turn (finds materials itself).
4
4
  * This module only appends submitted whole blocks idempotently and refreshes the
5
5
  * human view. No frozen catalog, no quote reverse-verify, no ticket-number
@@ -48,7 +48,7 @@ export type DoctorCase = { version: 1; identity: DoctorCaseIdentity; evidence: D
48
48
 
49
49
  // #836 r16 class 1: case/finding/assetEvidence/guardrails/prescription/
50
50
  // lastRealBite/missingEvidence are LLM/human-read narrative content — Judge/
51
- // 察院 read the original volume, no code branches on their length or nested
51
+ // 台院 read the original volume, no code branches on their length or nested
52
52
  // presence (src/doctor-contracts.ts:136-138 passes the submission through
53
53
  // unprojected). Field/type/description/Literal value stay; provider
54
54
  // required/minLength/minItems/minimum/nested additionalProperties:false is deleted.
@@ -144,7 +144,7 @@ export class DoctorEvidenceStore {
144
144
  /**
145
145
  * #836: cross-check rejection deleted (2.6). Shape guidance only — code does not
146
146
  * re-verify evidence citations, case identity, or bite completeness against the store.
147
- * Judge/察院 read the original volume.
147
+ * Judge/台院 read the original volume.
148
148
  */
149
149
  export function validateDoctorOutput(value: unknown, _patient: DoctorCase, _store: DoctorEvidenceStore): DoctorSubmission {
150
150
  return validateDoctorSubmissionShape(value);
@@ -15,7 +15,7 @@ import type { TerminalResult } from "./public-cli/terminal.ts";
15
15
  export const INSPECTOR_OUTPUT_TOOL = INSPECTOR_OUTPUT_TOOL_NAME;
16
16
  export const NOTARY_OUTPUT_TOOL = "ak_notary_output";
17
17
 
18
- /** Gate review officers — 察院 / 符宝郎 / 审刑院 (#753 / #756). */
18
+ /** Gate review officers — 台院 / 符宝郎 / 审刑院 (#753 / #756). */
19
19
  export type GateOfficer = "inspector" | "notary" | "auditor";
20
20
 
21
21
  /** Officer routing only — content is self-fetched via the shared run-dossier tool (#632). */
@@ -62,7 +62,7 @@ export type GatekeeperNonPassResult = Extract<
62
62
  >;
63
63
 
64
64
  function gateSeatLabel(stage: GateOfficer): string {
65
- if (stage === "inspector") return "察院";
65
+ if (stage === "inspector") return "台院";
66
66
  if (stage === "auditor") return "审刑院";
67
67
  return "符宝郎";
68
68
  }
@@ -160,7 +160,7 @@ export type RoleTurnHostTransition = {
160
160
  readonly priorNativePaths: readonly string[];
161
161
  };
162
162
 
163
- /** Gate review officers (察院 / 符宝郎 / 审刑院). Single authority for seat checks. */
163
+ /** Gate review officers (台院 / 符宝郎 / 审刑院). Single authority for seat checks. */
164
164
  export function isOfficerReviewSeat(role: string): boolean {
165
165
  return role === "notary" || role === "inspector" || role === "auditor";
166
166
  }
@@ -57,7 +57,7 @@ async function listSitianRecordPaths(sessionParent: string): Promise<string[]> {
57
57
  * still yields a typed switch (empty path list).
58
58
  *
59
59
  * Pi wrote its own session.jsonl; every other host's run volume is the sitian
60
- * record set on the live run (ADR 0077 `record-scope-phase-two`, #717) — the CLI's
60
+ * record set on the live run (ADR 0077 全宿主 session 卷宗统一直写, #717) — the CLI's
61
61
  * own journals stay in the operator home and are never copied here.
62
62
  */
63
63
  export async function projectHostTransitionPriorNative(input: {
@@ -1,15 +1,15 @@
1
1
  /**
2
- * Public Inspector (察院) terminating receipt contracts.
2
+ * Public Inspector (台院) terminating receipt contracts.
3
3
  * Lawful explicit releases: pass | bounce | escalate.
4
4
  * Dual path: gate-dispatched and independently callable (#568 / ADR 0074).
5
5
  */
6
6
 
7
7
  export const INSPECTOR_OUTPUT_TOOL_NAME = "ak_inspector_output" as const;
8
- export const INSPECTOR_ACCEPTED_TEXT = "察院回执已接受";
8
+ export const INSPECTOR_ACCEPTED_TEXT = "台院回执已接受";
9
9
  export const INSPECTOR_SOURCE_RUN_FLAG = {
10
10
  name: "ak-inspector-source-run",
11
11
  definition: {
12
- description: "察院初铸绑定的父 run 绝对路径",
12
+ description: "台院初铸绑定的父 run 绝对路径",
13
13
  type: "string" as const,
14
14
  },
15
15
  } as const;
@@ -18,7 +18,7 @@ export { INSPECTOR_OUTPUT_TOOL_NAME as INSPECTOR_OUTPUT_TOOL };
18
18
  export type { InspectorOutput };
19
19
  export { validateRecordedInspectorOutput };
20
20
 
21
- /** 察院事后察举交卷形状;形状指引,非 schema 闸。 */
21
+ /** 台院事后察举交卷形状;形状指引,非 schema 闸。 */
22
22
  export const inspectorOutputSchema = withInfrastructureFailureDeclaration(
23
23
  openToolObject(
24
24
  Type.Object({
@@ -46,8 +46,8 @@ export type InspectorRuntimeDependencies = {
46
46
  */
47
47
  export const INSPECTOR_TOOL_SPEC = {
48
48
  name: INSPECTOR_OUTPUT_TOOL_NAME,
49
- label: "察院输出",
50
- description: "察院终局回执,状态为 pass、bounce 或 escalate。",
51
- promptSnippet: "察院终局回执",
49
+ label: "台院输出",
50
+ description: "台院终局回执,状态为 pass、bounce 或 escalate。",
51
+ promptSnippet: "台院终局回执",
52
52
  parameters: inspectorOutputSchema,
53
53
  } as const;
package/src/judge-role.ts CHANGED
@@ -125,7 +125,7 @@ export function createJudgeRoleRuntime(
125
125
  // #879: this-turn typed payload — identity-bound at submit site.
126
126
  submission: parameters,
127
127
  });
128
- // #756: 审刑院合规路径 — same review-queue law as 符宝郎/察院.
128
+ // #756: 审刑院合规路径 — same review-queue law as 符宝郎/台院.
129
129
  // pass → accept; bounce|escalate → raw auditor receipt back to judge;
130
130
  // not three-state → resume auditor; no round cap; no disposeCompliance mapping.
131
131
  await pi.requireGatekeeperPass!({
@@ -87,7 +87,7 @@ export function resolveEngineMaterialPath(
87
87
  /**
88
88
  * Path-safety syntax gate for engine labels at real I/O seams.
89
89
  * Returns the canonical name on success; throws Error on illegal syntax.
90
- * Does not consult any material catalog (ADR 0069 pool-directive axis).
90
+ * Does not consult any material catalog (ADR 0069: 引擎权威是 owner 池令;能力通用可插拔).
91
91
  */
92
92
  export function assertLegalEngineName(name: string): string {
93
93
  if (!isEngineNameSyntax(name)) {
@@ -211,7 +211,7 @@ export const PUBLIC_ROLE_RECORDS = [
211
211
  activationStage: "load-and-install",
212
212
  sessionMaterials: AUDITOR_PUBLIC_SESSION_MATERIALS,
213
213
  },
214
- // #708 / ADR 0075 `diarist-is-role` / #779: 起居郎 is a seat like any other.
214
+ // #708 / ADR 0075(起居郎是 LLM 角色)/ #779: 起居郎 is a seat like any other.
215
215
  // No input flag — LLM finds materials itself (caller-transparent).
216
216
  {
217
217
  role: "diarist",
@@ -92,7 +92,8 @@ function buildMethodArgs(methods: readonly MethodBinding[]): string[] {
92
92
  }
93
93
 
94
94
  /**
95
- * Pi-native `/skill:<name>` for a single forced method (ADR 0082 `pi-no-privilege`).
95
+ * Pi-native `/skill:<name>` for a single forced method (ADR 0082: pi is one adapter
96
+ * with no privilege; Pi-only seams stay inside the pi adapter).
96
97
  * Driven by typed RoleTurnRequest.methods — middle-layer decision, Pi-only syntax.
97
98
  * Zero/many methods leave the prompt alone (Fixer optional pair stays `--skill` only).
98
99
  */
@@ -119,8 +119,8 @@ export type AutoResumeDispatchResult = {
119
119
  /**
120
120
  * Thrown by dispatchPostAdmissionTurn when a failure happens inside its own
121
121
  * settlement authority (presentControlledFailure) after the host turn
122
- * genuinely started — never to fabricate a replacement terminal (ADR 0080
123
- * single-settlement-disposition: settlement stays exactly presentControlledFailure
122
+ * genuinely started — never to fabricate a replacement terminal (ADR 0080:
123
+ * one settlement disposition owner — settlement stays exactly presentControlledFailure
124
124
  * / settleFailureTerminalResult, or — once the retry budget is exhausted —
125
125
  * this loop's own dispatchExceptionFailureTerminal). Its only job is to carry
126
126
  * the "turn already started" fact across the throw boundary so this loop
@@ -1,7 +1,7 @@
1
1
  /**
2
- * 系统随案递送本票起居录的中立指针段(ADR 0081 `automatic-case-material`;
2
+ * 系统随案递送本票起居录的中立指针段(ADR 0081:公共入口直接挂案卷,Soul 只说明用途不负责派送;
3
3
  * #709 公共入口通用递送与 #742 给事中受理链路同源;
4
- * 指针输入沿 ADR 0079 `summons-pointer-input`,不把卷宗正文塞进提示词)。
4
+ * 指针输入沿 ADR 0079(指针是绑定材料由代码精准递送),不把卷宗正文塞进提示词)。
5
5
  * 只读已有案卷:不刷新、不生成、不校验内容、不新增拒收或停工条件。
6
6
  * 机器文本仅中立标识材料(ADR 0073),用途说明归角色材料所有。
7
7
  *
@@ -361,7 +361,7 @@ function createRoleEnvironment(
361
361
  // host-facing provider (table > unique directory > fail). Bad host never
362
362
  // reaches model resolution.
363
363
  // Nested summons reuse this table and select by the child seat — never the
364
- // already-selected parent adapter (#840 / ADR 0082 host-flag-two-channels).
364
+ // already-selected parent adapter (#840 / ADR 0082: --host 旗标>席位配置>缺省 pi).
365
365
  const hostAdapters = composeRoleTurnHostAdapters(
366
366
  {
367
367
  packageRoot: env.packageRoot,
@@ -2,15 +2,14 @@
2
2
  * Public Countersign Role run: admit ticket materials → court-pipeline prior
3
3
  * station (起居郎) → shared post-admission coordinator → settle Terminal result
4
4
  * (#572 / ADR 0074 / ADR 0075 / #742 / #771). #599: manual resume continues the
5
- * exact session. ADR 0079: same-ticket re-summons resume the seat's previous run
6
- * (`ticket-seat-memory-countersign-principal`); explicit `ak-role new` mints fresh
7
- * (`explicit-fresh-summons`).
5
+ * exact session. ADR 0079: same-ticket re-summons resume the seat's previous run;
6
+ * explicit `ak-role new` mints fresh (显式派新腿入口与显式 resume 并列).
8
7
  *
9
8
  * Court admission auto-runs 起居郎 so the 起居郎 LLM asserts the court target;
10
9
  * mechanical layer only verifies; countersign reuses that typed identity for bind
11
10
  * and same-ticket resume lookup (ADR 0075 / 0081 / 0079). Code never matches
12
11
  * instruction text against book-known numbers. Who may call 起居郎 and in what
13
- * order is not written into law (ADR 0075 `no-call-rule`); the present admission
12
+ * order is not written into law (ADR 0075 不规定谁调用起居郎、顺序归调用者); the present admission
14
13
  * effect is what this seat currently does. 起居录 path delivery is owned once by
15
14
  * post-admission (#709 / ADR 0081).
16
15
  *
@@ -20,7 +19,7 @@
20
19
  * (incl. verification failure) settle as countersign controlled failure — never
21
20
  * wash into 真无票. Only a true missing lawful typed terminal stays unbound and
22
21
  * continues the body (r5 unbound-continue). Bound refresh hands the typed key to
23
- * 起居郎 so freeze loads issue face (`refresh-every-court` / typed handoff).
22
+ * 起居郎 so freeze loads issue face (ADR 0075: 每次过庭都跑是调用者用法 / typed handoff).
24
23
  */
25
24
  import type { DurablePrincipalAuthority, RoleTurnRequest } from "../host-contracts.ts";
26
25
  import { engineSessionMaterialFromOptions, pickEngineAxis } from "../package-resources/engine-material.ts";
@@ -223,7 +222,7 @@ async function invokeCourtDiarist(input: {
223
222
  ? {}
224
223
  : { boundTicketNumber: input.boundTicketNumber }),
225
224
  // Child seat selects from the composition-root table. Do not pass the
226
- // already-selected parent adapter (#840 / ADR 0082 host-flag-two-channels).
225
+ // already-selected parent adapter (#840 / ADR 0082: --host 旗标>席位配置>缺省 pi).
227
226
  ...(env.hostAdapters === undefined ? {} : { hostAdapters: env.hostAdapters }),
228
227
  });
229
228
 
@@ -267,7 +266,7 @@ async function invokeCourtDiarist(input: {
267
266
 
268
267
  /**
269
268
  * Court-pipeline prior station: refresh this ticket's 起居录 before the
270
- * countersign body turn when already bound (ADR 0075 `refresh-every-court`).
269
+ * countersign body turn when already bound (ADR 0075 每次过庭都跑)。
271
270
  * Caller-invisible — no diarist argv on the countersign command line.
272
271
  *
273
272
  * Missing ticketNumber (true-unbound / identity deferred) skips the refresh
@@ -285,7 +284,7 @@ export async function runCountersignCourtDiaristStation(
285
284
  await env.runCourtDiaristStation(admitted);
286
285
  return;
287
286
  }
288
- // Production refresh-every-court only under a known ticket identity.
287
+ // Production court refresh (ADR 0075: 每次过庭都跑是调用者用法) only under a known ticket identity.
289
288
  // First-entry unbound identity is owned by runPublicCountersign.
290
289
  if (admitted.ticketNumber === undefined) return;
291
290
 
@@ -461,7 +460,7 @@ export async function runPublicCountersign(
461
460
  await relocateAdmittedRunToTicket(admitted, env.principalAuthority);
462
461
  await markRunTerminal(admitted.runDirectory);
463
462
  // Identity 起居郎 asserted unbound (no issue face). Resume still runs
464
- // the bound refresh station under the typed key (refresh-every-court).
463
+ // the bound refresh station under the typed key (ADR 0075: 每次过庭都跑是调用者用法).
465
464
  // #871: hand the identity set so resume can whole-replace the run fact
466
465
  // when this summons produced a new typed set (never union).
467
466
  return await runPublicCountersignResume(
@@ -590,7 +589,7 @@ function countersignAdapters(options?: {
590
589
  /**
591
590
  * Resume a previously admitted Countersign run (#599 / DK-3 / #637).
592
591
  * Restores role/ticket/session identity. Bound court re-entry runs the diarist
593
- * refresh station first (ADR 0075 `refresh-every-court`); unbound skips refresh.
592
+ * refresh station first (ADR 0075 每次过庭都跑); unbound skips refresh.
594
593
  * Same-ticket summons deliver this turn's instruction + frozen attachments on
595
594
  * the resume prompt; manual resume keeps package-envelope / caller-message
596
595
  * semantics and birth attachments. 起居录 path delivery remains post-admission's
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Public Diarist (起居郎) Role run — #708 / ADR 0075 `diarist-is-role` / #779.
2
+ * Public Diarist (起居郎) Role run — #708 / ADR 0075(起居郎是 LLM 角色)/ #779.
3
3
  * Same admit → post-admission → settle shape as the other instruction seats.
4
4
  * Semantic collection is the role's own turn: LLM finds materials itself
5
5
  * (no frozen candidate catalog, no path/attachment burden on the caller).
6
- * Who calls it and in what order is the caller's business (ADR 0010 `no-call-rule`).
6
+ * Who calls it and in what order is the caller's business (ADR 0010; ADR 0075 不规定调用顺序).
7
7
  */
8
8
  import type { DurablePrincipalAuthority, RoleTurnRequest } from "../host-contracts.ts";
9
9
  import { engineSessionMaterialFromOptions, pickEngineAxis } from "../package-resources/engine-material.ts";
@@ -1345,7 +1345,7 @@ export async function admitJudgeInvocation(
1345
1345
  }
1346
1346
 
1347
1347
  /**
1348
- * Admit a direct Inspector (察院) run: freeze attachments, persist the request,
1348
+ * Admit a direct Inspector (台院) run: freeze attachments, persist the request,
1349
1349
  * and reserve session placement. Same instruction-seat face as Judge (#568).
1350
1350
  */
1351
1351
  export async function admitInspectorInvocation(
@@ -1239,7 +1239,7 @@ const ROLE_COMMAND_HELP = {
1239
1239
  },
1240
1240
  inspector: {
1241
1241
  command: "inspector",
1242
- summary: "Direct Inspector (察院) complexity and test-quality check; pass or bounce.",
1242
+ summary: "Direct Inspector (台院) complexity and test-quality check; pass or bounce.",
1243
1243
  usage: ["ak-role inspector [options] [instruction]"],
1244
1244
  examples: [
1245
1245
  'ak-role inspector --attach ./change.patch "Review this material."',
@@ -467,8 +467,8 @@ export async function presentControlledFailure<
467
467
  /**
468
468
  * presentControlledFailure, called only where the host turn has already
469
469
  * genuinely started (#840 r9 判词 class 1 boundary). If presentControlledFailure
470
- * itself fails, this never fabricates a replacement terminal (ADR 0080
471
- * single-settlement-disposition — presentControlledFailure /
470
+ * itself fails, this never fabricates a replacement terminal (ADR 0080:
471
+ * one settlement disposition owner — presentControlledFailure /
472
472
  * settleFailureTerminalResult stays the one authority); it re-throws a
473
473
  * TurnDispatchedFailure so runWithAutoResumeLoop still learns the turn
474
474
  * started and selects a resume payload on the next attempt, while settling
@@ -505,8 +505,8 @@ async function settleAfterTurnStarted<
505
505
  * (needsPersist — station-child / resumable auto-resume loop, #416/#840):
506
506
  * that write must land outside the loop's own retried-dispatch try, but its
507
507
  * failure still settles through the single existing controlled-failure
508
- * authority (settleAfterTurnStarted / presentControlledFailure, ADR 0080
509
- * single-settlement-disposition) — never a second hand-rolled
508
+ * authority (settleAfterTurnStarted / presentControlledFailure, ADR 0080:
509
+ * one settlement disposition owner) — never a second hand-rolled
510
510
  * classify/artifact/Terminal (#836 r12 class 3), and never lawful/non-lawful
511
511
  * settling differently (#836 r13 class 2: a caller's io here may be a no-op,
512
512
  * so a stderr-only trace is never seen and the failure is otherwise
@@ -816,8 +816,8 @@ export async function dispatchPostAdmissionTurn<
816
816
  // 判词 class 1 boundary — 覆盖 executeTurn 已启动后至返回带 turnDispatched
817
817
  // 结果前的全部异常). Each fallible step routes any failure through the
818
818
  // single existing settlement authority (presentControlledFailure /
819
- // settleFailureTerminalResult) rather than a second one (ADR 0080
820
- // single-settlement-disposition) — never by fabricating a terminal here.
819
+ // settleFailureTerminalResult) rather than a second one (ADR 0080:
820
+ // one settlement disposition owner) — never by fabricating a terminal here.
821
821
  // A cleanup step that runs only after a real settlement (clearCurrentCourt)
822
822
  // is protected by logging and keeping that already-obtained result, never
823
823
  // by discarding it (#840 已交劳动只整理终局不重做). A failure inside the
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Shared ticket identity seam for public court seats (#635 / #637 / #709 / #747 / #771).
3
3
  *
4
- * ADR 0075 `diarist-resolves-ticket-llm-layer`: the diarist LLM recognizes the
4
+ * ADR 0075(起居郎 LLM 自行认票): the diarist LLM recognizes the
5
5
  * court target; recognized ticket → provenance, truly unbound → no provenance,
6
6
  * or escalate when it cannot recognize one. Code does not re-judge the ticket
7
7
  * (锚定宪法; owner 2026-09-08: 代码不准做判断). Other seats reuse a typed
@@ -272,7 +272,7 @@ export async function summonPublicRole(
272
272
  options.credentials ?? (await loadCredentialProviders(agentDir));
273
273
  const config = await loadPublicCliConfig(home);
274
274
  // Nested summons resolve host on the officer seat only (flag>seat>default pi).
275
- // Parent run host is not an override channel (#821 / ADR 0082 host-flag-two-channels).
275
+ // Parent run host is not an override channel (#821 / ADR 0082: --host 旗标>席位配置>缺省 pi).
276
276
  const seat = resolveEffectiveSeat(config, options.role, credentials);
277
277
  let summonEnv;
278
278
  try {
@@ -46,7 +46,8 @@ type ContentPart = { type: "text"; text: string } | { type: "image"; data: strin
46
46
 
47
47
  /**
48
48
  * Build host-side Skill expansion evidence from pre-read RoleTurnRequest.methods.
49
- * Non-pi hosts never parse Pi `/skill:` syntax (ADR 0082 `pi-no-privilege`);
49
+ * Non-pi hosts never parse Pi `/skill:` syntax (ADR 0082: pi is one adapter with
50
+ * no privilege; Pi-only seams stay inside the pi adapter);
50
51
  * a single bound method treats the plain prompt as the preserved user message.
51
52
  * Pi-native slash forms stay inside `src/pi/` only.
52
53
  */
@@ -302,7 +302,7 @@ export function renderTicketProvenanceMarkdown(input: {
302
302
  /**
303
303
  * Ensure the per-ticket JSONL volume partition exists (empty file OK).
304
304
  * Every bound-ticket court establishes the volume even with zero diary entries
305
- * (ADR 0075 ticket-provenance-file — 每票一份起居录). Does not forge entries.
305
+ * (ADR 0075: 每票一份起居录送司天台). Does not forge entries.
306
306
  */
307
307
  export function ensureTicketProvenanceVolume(
308
308
  ticketNumber: number,
@@ -38,7 +38,7 @@ function workIdentityFromCwd(cwd: string): string | undefined {
38
38
  return undefined;
39
39
  }
40
40
 
41
- /** Machine-ledger session paths are not work identity (ADR 0048 session-in-home). */
41
+ /** Machine-ledger session paths are not work identity (ADR 0048: session 直落家). */
42
42
  function isMachineLedgerSessionPath(sessionPath: string): boolean {
43
43
  // Physical containment under the package ledger home — never directory spelling,
44
44
  // and stable across macOS /var ↔ /private/var realpath asymmetry. Path → ledger
@@ -23,7 +23,7 @@ export const WORKER_COMMIT_BASELINE_ENTRY_TYPE = "commit-baseline";
23
23
  export const WORKER_COMMIT_REMINDER_BOUNCE_ENTRY_TYPE = "commit-reminder-bounce";
24
24
  export const WORKER_PREFIX_REMINDER_BOUNCE_ENTRY_TYPE = "prefix-reminder-bounce";
25
25
 
26
- /** Statuses that enter the officer submission gate (ADR 0066 gate-1-status-matrix / ADR 0072 skip-statuses). */
26
+ /** Statuses that enter the officer submission gate (ADR 0066: completed/partially_completed 进闸①;planned/refused/unfinished 零 commit 合法). */
27
27
  export const WORKER_DONE_STATUSES: ReadonlySet<string> = new Set(["completed", "partially_completed"]);
28
28
  /** Historical package hook ownership marker — uninstall criterion only. */
29
29
  const HOOK_MARKER = "ak-roles: worker-submission-gates reference-transaction";