@akagilnc/pi-workflow-roles 0.1.4528 → 0.1.4620

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/README.md +5 -4
  2. package/README.zh-CN.md +6 -5
  3. package/dist/acp-host/production-host.js +1834 -637
  4. package/dist/archivist-record-topology.js +27 -35
  5. package/dist/headless-host/description.js +7 -4
  6. package/dist/headless-host/production-host.js +1652 -519
  7. package/dist/migrate-book-topology.js +8 -11
  8. package/dist/navigator-attendance.js +146 -241
  9. package/dist/navigator-public-session.js +81 -15
  10. package/dist/package-contracts/navigator-output.js +30 -12
  11. package/dist/public-cli/invocation.js +10 -4
  12. package/dist/public-cli/judge-run.js +2 -2
  13. package/dist/public-cli/main.js +879 -410
  14. package/dist/public-cli/option-definitions.js +6 -6
  15. package/dist/public-cli/post-admission.js +25 -10
  16. package/dist/public-cli/reviewer-run.js +339 -0
  17. package/dist/public-cli/run-lifecycle.js +29 -7
  18. package/dist/public-cli/settlement.js +46 -32
  19. package/dist/public-cli/terminal.js +17 -27
  20. package/dist/public-cli/turn-request.js +1 -1
  21. package/dist/public-role-summons.js +370 -20
  22. package/dist/submission-ledger.js +56 -23
  23. package/package.json +1 -1
  24. package/resources/836-deleted-machine-instruction-inventory.md +2 -0
  25. package/resources/navigator-route-playbook.md +9 -0
  26. package/scripts/build-package.mjs +6 -1
  27. package/src/acp-host/role-turn-host.ts +129 -13
  28. package/src/headless-host/description.ts +17 -7
  29. package/src/headless-host/role-turn-host.ts +42 -11
  30. package/src/host-contracts.ts +0 -1
  31. package/src/navigator-attendance.ts +290 -425
  32. package/src/navigator-public-session.ts +126 -25
  33. package/src/navigator-role.ts +2 -2
  34. package/src/package-contracts/navigator-output.ts +41 -25
  35. package/src/public-cli/coder-run.ts +2 -2
  36. package/src/public-cli/fixer-run.ts +2 -2
  37. package/src/public-cli/invocation.ts +19 -9
  38. package/src/public-cli/judge-run.ts +2 -2
  39. package/src/public-cli/merger-run.ts +2 -2
  40. package/src/public-cli/option-definitions.ts +6 -6
  41. package/src/public-cli/post-admission.ts +41 -10
  42. package/src/public-cli/reviewer-run.ts +238 -53
  43. package/src/public-cli/run-lifecycle.ts +37 -7
  44. package/src/public-cli/settlement.ts +42 -34
  45. package/src/public-cli/terminal.ts +39 -37
  46. package/src/public-cli/turn-request.ts +7 -1
  47. package/src/public-role-summons.ts +544 -22
  48. package/src/reviewer-role.ts +1 -2
  49. package/src/role-envelope.ts +89 -4
  50. package/src/role-runtime.ts +76 -16
  51. package/src/submission-ledger.ts +63 -21
  52. package/dist/public-cli/command-renderer.js +0 -5
  53. package/dist/public-command-renderer.js +0 -29
  54. package/src/public-cli/command-renderer.ts +0 -9
  55. package/src/public-command-renderer.ts +0 -55
package/README.md CHANGED
@@ -60,7 +60,7 @@ ak-role config set-auto-resume-limit 3
60
60
 
61
61
  For Gate officers (`gatekeeper` / `inspector` / `notary`) resolution is officer pin → province (`gatekeeper`) pin → inherit parent session; an explicit selection that fails is loud and does not fall back. Configuration usage and refusal text are owned by `ak-role config` / `ak-role help config`. The persistent file is machine-wide and shared across CLI builds: seat keys this build does not know are skipped on read (not an error); unknown field-level keys on known seats keep their existing tolerance.
62
62
 
63
- Receipts are typed, so callers compose roles without parsing prose; ordering and stopping stay caller-owned ([ADR 0010](docs/adr/0010-callers-own-role-composition-and-repetition.md)). Programmatic consumers derive contracts from the exported schemas in `src/package-contracts/`, not from this guide.
63
+ Receipts are typed by default so callers compose roles without parsing prose; navigator is the prose-exit exception ([#959](https://github.com/Akagilnc/ak-pi-workflow-roles/issues/959)) — its final words are presented as-is. Ordering and stopping stay caller-owned ([ADR 0010](docs/adr/0010-callers-own-role-composition-and-repetition.md)). Programmatic consumers derive contracts from the exported schemas in `src/package-contracts/`, not from this guide.
64
64
 
65
65
  Gate submission gate: on DONE-side submissions (`completed` / `partially_completed`) the package summons the subject officer directly (`inspector` for worker completion; `notary` for judge draft / countersign verdict) — it does not spawn a Gatekeeper child to choose the seat; bounce means rewrite-and-resubmit in that same session, not role failure; `planned` / `refused` / `unfinished` skip the officer summons and settle; `ak-role gatekeeper` remains available for independent province dispatch/pass; read gate history from the typed gate section of the receipt, never from session prose. Pointers: [ADR 0067](docs/adr/0067-menxia-province-founding-jishizhong-fubaolang.md), [ADR 0072](docs/adr/0072-menxia-pre-pr-submission-hooks.md), [ADR 0079](docs/adr/0079-direct-officer-summons-ticket-memory-pointer-input.md). A labor-engine detour that fails to spawn, exits nonzero, or produces no usable output stops the run through the existing infrastructure-failure path with the original cause visible ([ADR 0071](docs/adr/0071-engine-detour-failure-seat-fallback-declaration.md)). Runtime fact `decisiveFacts.engineDetourToolUsage` (#537) counts only the package tool `ak_engine_detour`; the bash/CLI ordinary path is a permanent blind spot and must not be read as "this seat did not use an engine".
66
66
 
@@ -89,8 +89,9 @@ ak-role judge --model <provider/model[:thinking]> --attach ./findings.md --attac
89
89
  ak-role coder --model <provider/model[:thinking]> plan "Propose the first implementation plan."
90
90
  ak-role coder --model <provider/model[:thinking]> apply --attach ./plan.md "Implement the approved slice."
91
91
 
92
- # reviewer — fixed-target single-lens review (completeness|correctness); completed ≠ approved, read the findings
93
- ak-role reviewer --model <provider/model[:thinking]> --base main --lens completeness --authority-ref docs/adr/0001-roles-grow-by-demand.md "Review the branch."
92
+ # reviewer — fixed-target parallel completeness + correctness review; completed ≠ approved, read the findings
93
+ ak-role reviewer --model <provider/model[:thinking]> --base main --authority-ref docs/adr/0001-roles-grow-by-demand.md "Review the branch."
94
+ # optional single-lens override
94
95
  ak-role reviewer --model <provider/model[:thinking]> --base main --lens correctness --authority-ref CLAUDE.md
95
96
 
96
97
  # collector — GitHub PR review evidence (bind target, read handbook/field activity, trigger as needed, wait window, return materials)
@@ -117,7 +118,7 @@ ak-role inspector --model <provider/model[:thinking]> --attach ./change.patch "R
117
118
  # gatekeeper — direct Gate province review; dispatch an officer or pass
118
119
  ak-role gatekeeper --model <provider/model[:thinking]> --attach ./submission.json "审:这批材料该谁审?"
119
120
 
120
- # navigator — direct route advice (ordered next-role candidates); attends automatically on top-level public entry legs only
121
+ # navigator — direct free-form prose route advice; attends automatically on top-level public entry legs only
121
122
  ak-role navigator --model <provider/model[:thinking]> "刚完成 coder apply 收敛,下一步?"
122
123
 
123
124
  # diarist — gather and organize this case's decision basis into its per-ticket 起居录 (LLM resolves the ticket itself, no mechanical verification since #779; countersign admission runs it automatically, other stations summon it explicitly)
package/README.zh-CN.md CHANGED
@@ -60,7 +60,7 @@ ak-role config set-auto-resume-limit 3
60
60
 
61
61
  门下省官席解析顺序:官自钉 → 省钉(`gatekeeper`)→ 继承父 session;显式指定失败响亮、不回退。配置用法与拒绝文案以 `ak-role config`/`ak-role help config` 为准。持久配置是全机共享单文件、多 CLI 版本同读:本构建不认识的席位键读时跳过(不报错);已知席位上的未知字段沿用现行容忍。
62
62
 
63
- 回执是 typed 的,调用者不必解析散文即可组合角色;顺序与停止归调用者([ADR 0010](docs/adr/0010-callers-own-role-composition-and-repetition.md))。编程消费者从 `src/package-contracts/` 导出推导契约,不从本文。
63
+ 回执默认是 typed 的,调用者不必解析散文即可组合角色;游奕使是散文出口例外([#959](https://github.com/Akagilnc/ak-pi-workflow-roles/issues/959))——终局原样呈现它说的话。顺序与停止归调用者([ADR 0010](docs/adr/0010-callers-own-role-composition-and-repetition.md))。编程消费者从 `src/package-contracts/` 导出推导契约,不从本文。
64
64
 
65
65
  门下省交卷闸:DONE 侧交卷(`completed`/`partially_completed`)时包按受审物直接传召官(将作监/修内司→`inspector`;大理寺判牒/给事中署章→`notary`),不再起门下省子 session 选席;封驳=当场重写重交,不是角色失败;`planned`/`refused`/`unfinished` 不传召官、直接结算;`ak-role gatekeeper` 仍可独立 dispatch/pass;闸史读回执 typed gate 段,勿刮 session 散文。指针:[ADR 0067](docs/adr/0067-menxia-province-founding-jishizhong-fubaolang.md)、[ADR 0072](docs/adr/0072-menxia-pre-pr-submission-hooks.md)、[ADR 0079](docs/adr/0079-direct-officer-summons-ticket-memory-pointer-input.md)。劳务引擎绕行失败沿既有基础设施故障路径停止、真因可见([ADR 0071](docs/adr/0071-engine-detour-failure-seat-fallback-declaration.md))。运行时事实 `decisiveFacts.engineDetourToolUsage`(#537)只计 package 工具 `ak_engine_detour`;bash/CLI ordinary path 是永久观测盲区,不得读成「该腿没用引擎」。
66
66
 
@@ -79,8 +79,9 @@ ak-role judge --model <provider/model[:thinking]> --attach ./findings.md --attac
79
79
  ak-role coder --model <provider/model[:thinking]> plan "Propose the first implementation plan."
80
80
  ak-role coder --model <provider/model[:thinking]> apply --attach ./plan.md "Implement the approved slice."
81
81
 
82
- # 御史台——固定目标、调用者选定单 lens 察举;completed ≠ 准行,findings 在 Terminal 里
83
- ak-role reviewer --model <provider/model[:thinking]> --base main --lens completeness --authority-ref docs/adr/0001-roles-grow-by-demand.md "Review the branch."
82
+ # 御史台——固定目标,默认并行察举 completeness 与 correctness;completed ≠ 准行,findings 在 Terminal 里
83
+ ak-role reviewer --model <provider/model[:thinking]> --base main --authority-ref docs/adr/0001-roles-grow-by-demand.md "Review the branch."
84
+ # 可选单 lens 覆盖
84
85
  ak-role reviewer --model <provider/model[:thinking]> --base main --lens correctness --authority-ref CLAUDE.md
85
86
 
86
87
  # 通进司——GitHub PR 收证(认票、读手册/现场活动、按需触发、等待窗、交回材料)
@@ -107,7 +108,7 @@ ak-role inspector --model <provider/model[:thinking]> --attach ./change.patch "R
107
108
  # 门下省——直调省审:派官或放行
108
109
  ak-role gatekeeper --model <provider/model[:thinking]> --attach ./submission.json "审:这批材料该谁审?"
109
110
 
110
- # 游奕使——直调路线建议(有序的下一步角色候选);随公开入口顶层腿自动出席
111
+ # 游奕使——直调散文路线建议;随公开入口顶层腿自动出席
111
112
  ak-role navigator --model <provider/model[:thinking]> "刚完成 coder apply 收敛,下一步?"
112
113
 
113
114
  # 给事中——票庭五问;票号经由 instruction 识别;受理内先自动起居郎再本席(#742,调用者无感)
@@ -136,7 +137,7 @@ ak-role --model <provider/model[:thinking]> resume <runId> "<裁定>"
136
137
  | --- | --- | --- |
137
138
  | **将作监** | coder | **营造新作。** 承接新的谋划与需求,从一片空白开始设计、建造,直到形成可供使用的新成果。讲究先明其意,再定其形,不妄增枝节,只做当下所需之事。 |
138
139
  | **修内司** | fixer | **缮修旧物。** 面对已有问题,不急于表面修补,而是追寻问题根源,找到真正需要修整之处。既要修复眼前缺漏,也要防止同类问题再次出现。 |
139
- | **御史台** | reviewer | **察举百弊,风闻奏事。** 置身事外审视成果;调用者选定单 lens(completeness/correctness),本席自跑包内 `ak-cross-m-review`,交薄回执与 amendment。弹章须指明所劾之处,言不为狱——不负坐实义务,坐实归大理寺。 |
140
+ | **御史台** | reviewer | **察举百弊,风闻奏事。** 置身事外审视成果;默认并行执行 completeness/correctness 两轴,调用者可显式覆盖为单轴,本席自跑包内 `ak-cross-m-review`,交薄回执与 amendment。弹章须指明所劾之处,言不为狱——不负坐实义务,坐实归大理寺。 |
140
141
  | **大理寺** | judge | **审理定谳。** 承接各方意见与材料,依照既定规则逐项判断,辨明是非曲直。可以准行、退回或请示更高决定,但自身不参与建设与修改。 |
141
142
  | **审刑院** | judge-auditor/doctor-auditor(无 CLI,共享内部接缝;御史台侧闸已退役) | **复核成案。** 不重新争论事情本身,而是检查整个办理过程是否合乎规矩。关注是否有人越过职责、是否遗漏必要步骤、是否以错误方式得出正确结果。直属陛下,不入门下省编制。 |
142
143
  | **门下省** | 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)。 |