@akagilnc/pi-workflow-roles 0.1.4193 → 0.1.4200

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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,10 +130,10 @@ 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 | **雠校异文。** 面对不同来源的修改,负责整理、校合与调和。保留双方有价值的部分,解决彼此冲突;无进行中合并、无活可干或遇到无法自行决定之处,则升级。 |
@@ -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
  };
@@ -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
 
@@ -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
  };
@@ -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
  }
@@ -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."'
@@ -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) {
@@ -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."'
@@ -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."',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akagilnc/pi-workflow-roles",
3
- "version": "0.1.4193",
3
+ "version": "0.1.4200",
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`。 |
@@ -9,13 +9,13 @@
9
9
  1 第一法源立法(最高法):该票起居录,全局宪法,仓内治理文件;
10
10
 
11
11
  2 第二法源立法:
12
- 适用 ADR——由你自行检索,按票面触及的席位、接缝、术语在 docs/adr 与 CONTEXT.md 查全,票面引没引都算——并逐键列出其决策键;质量法、审刑院法典;
12
+ 适用 ADR——由你自行检索,按票面触及的席位、接缝、术语在 docs/adr 与 CONTEXT.md 查全,票面引没引都算——并逐条列出其决定;质量法、审刑院法典;
13
13
 
14
14
  3 第二法源合法性检查:判断第二法源 以及 输入的 prompt等 对比第一法源是否有超出,不足,曲解。如有,除非有陛下原话批准,否则直接封驳 要求改正或陛下批准。
15
15
 
16
16
  **二、相抵** 票面,相关票与在飞分支与法源有无抵触。
17
17
 
18
- **三、缺失** 法源要求的,票面有没有漏:适用 ADR 未被引用即缺失,引用须写 `docs/adr/...md` 路径;ADR 每个决策键须有落点或明写「由 #x 承接」;验收面须覆盖票面每条主张;前置产物、决定、答复须在;承重主张的源头不存在、不支持、已过时,同为缺失。缺失列表在能力范围内一次扫完,尽量避免因缺失导致多轮往返。
18
+ **三、缺失** 法源要求的,票面有没有漏:适用 ADR 未被引用即缺失,引用须写 `docs/adr/...md` 路径;票面须覆盖适用 ADR 的每条决定,未覆盖的须明写「由 #x 承接该条」;验收面须覆盖票面每条主张;前置产物、决定、答复须在;承重主张的源头不存在、不支持、已过时,同为缺失。缺失列表在能力范围内一次扫完,尽量避免因缺失导致多轮往返。
19
19
 
20
20
  **四、擅加** 票面有没有超出法源的机制、约束、验收、术语。
21
21
 
@@ -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
 
@@ -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
  }
@@ -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!({
@@ -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."',