@akagilnc/pi-workflow-roles 0.1.5037 → 0.1.5063

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 (82) hide show
  1. package/README.md +2 -2
  2. package/README.zh-CN.md +2 -2
  3. package/THIRD_PARTY_NOTICES.md +8 -8
  4. package/dist/acp-host/production-host.js +410 -878
  5. package/dist/headless-host/description.js +0 -2
  6. package/dist/headless-host/production-host.js +413 -914
  7. package/dist/host-descriptions.js +2 -3
  8. package/dist/migrate-book-topology.js +4 -10
  9. package/dist/packaged-role-registry.js +17 -16
  10. package/dist/pi/role-turn-host.js +3 -27
  11. package/dist/public-cli/cli.js +6 -0
  12. package/dist/public-cli/instruction-seat-run.js +12 -40
  13. package/dist/public-cli/machine-method-skills.js +150 -0
  14. package/dist/public-cli/main.js +378 -579
  15. package/dist/public-cli/post-admission.js +2 -0
  16. package/dist/public-cli/registry.js +2 -1
  17. package/dist/public-cli/settlement.js +12 -99
  18. package/dist/public-cli/turn-request.js +16 -8
  19. package/package.json +5 -1
  20. package/scripts/build-package.mjs +1 -6
  21. package/src/headless-host/description.ts +0 -3
  22. package/src/headless-host/role-turn-host.ts +2 -23
  23. package/src/host-contracts.ts +2 -23
  24. package/src/host-descriptions.ts +2 -3
  25. package/src/packaged-role-registry.ts +14 -14
  26. package/src/pi/adapter.ts +0 -27
  27. package/src/pi/role-turn-host.ts +3 -31
  28. package/src/public-cli/cli.ts +6 -0
  29. package/src/public-cli/instruction-seat-run.ts +9 -42
  30. package/src/public-cli/machine-method-skills.ts +153 -0
  31. package/src/public-cli/post-admission.ts +2 -0
  32. package/src/public-cli/registry.ts +1 -0
  33. package/src/public-cli/settlement.ts +6 -138
  34. package/src/public-cli/turn-request.ts +24 -16
  35. package/src/reviewer-role.ts +1 -12
  36. package/src/role-envelope.ts +0 -13
  37. package/src/role-runtime-dependencies.ts +0 -13
  38. package/src/role-runtime.ts +4 -56
  39. package/src/worker-role.ts +1 -81
  40. package/dist/method-host-plugin/.claude-plugin/plugin.json +0 -5
  41. package/dist/method-host-plugin/skills/ak-cross-m-review/CONTEXT.md +0 -48
  42. package/dist/method-host-plugin/skills/ak-cross-m-review/LICENSE +0 -21
  43. package/dist/method-host-plugin/skills/ak-cross-m-review/SKILL.md +0 -170
  44. package/dist/method-host-plugin/skills/ak-cross-m-review/prompts/cmr-completeness.md +0 -118
  45. package/dist/method-host-plugin/skills/ak-cross-m-review/prompts/cmr-reviewer.md +0 -128
  46. package/dist/method-host-plugin/skills/ak-cross-m-review/provenance.json +0 -41
  47. package/dist/method-host-plugin/skills/diagnosing-bugs/SKILL.md +0 -134
  48. package/dist/method-host-plugin/skills/diagnosing-bugs/agents/openai.yaml +0 -3
  49. package/dist/method-host-plugin/skills/diagnosing-bugs/provenance.json +0 -31
  50. package/dist/method-host-plugin/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -41
  51. package/dist/method-host-plugin/skills/resolving-merge-conflicts/SKILL.md +0 -14
  52. package/dist/method-host-plugin/skills/resolving-merge-conflicts/agents/openai.yaml +0 -3
  53. package/dist/method-host-plugin/skills/resolving-merge-conflicts/provenance.json +0 -26
  54. package/dist/method-host-plugin/skills/tdd/SKILL.md +0 -38
  55. package/dist/method-host-plugin/skills/tdd/agents/openai.yaml +0 -3
  56. package/dist/method-host-plugin/skills/tdd/mocking.md +0 -59
  57. package/dist/method-host-plugin/skills/tdd/provenance.json +0 -36
  58. package/dist/method-host-plugin/skills/tdd/tests.md +0 -77
  59. package/dist/package-resources/method-skill.js +0 -259
  60. package/resources/method-host-plugin/.claude-plugin/plugin.json +0 -5
  61. package/resources/methods/ak-cross-m-review/CONTEXT.md +0 -48
  62. package/resources/methods/ak-cross-m-review/LICENSE +0 -21
  63. package/resources/methods/ak-cross-m-review/SKILL.md +0 -170
  64. package/resources/methods/ak-cross-m-review/prompts/cmr-completeness.md +0 -118
  65. package/resources/methods/ak-cross-m-review/prompts/cmr-reviewer.md +0 -128
  66. package/resources/methods/ak-cross-m-review/provenance.json +0 -41
  67. package/resources/methods/diagnosing-bugs/SKILL.md +0 -134
  68. package/resources/methods/diagnosing-bugs/agents/openai.yaml +0 -3
  69. package/resources/methods/diagnosing-bugs/provenance.json +0 -31
  70. package/resources/methods/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -41
  71. package/resources/methods/resolving-merge-conflicts/SKILL.md +0 -14
  72. package/resources/methods/resolving-merge-conflicts/agents/openai.yaml +0 -3
  73. package/resources/methods/resolving-merge-conflicts/provenance.json +0 -26
  74. package/resources/methods/tdd/SKILL.md +0 -38
  75. package/resources/methods/tdd/agents/openai.yaml +0 -3
  76. package/resources/methods/tdd/mocking.md +0 -59
  77. package/resources/methods/tdd/provenance.json +0 -36
  78. package/resources/methods/tdd/tests.md +0 -77
  79. package/src/canonical-skill-binding.ts +0 -118
  80. package/src/host-native-method.ts +0 -185
  81. package/src/package-resources/method-skill-binding.ts +0 -60
  82. package/src/package-resources/method-skill.ts +0 -363
package/README.md CHANGED
@@ -52,7 +52,7 @@ ak-role config unset-host judge
52
52
  ak-role config set-auto-resume-limit 3
53
53
  ```
54
54
 
55
- **Host axis (invocation-insensible after default):** `--host` is a global public option on every callable role and on `resume`. Resolution is invocation `--host` → persistent seat host (`config set-host`) → package default (`pi`). After `config set-host <seat> <name>`, the same command face used with Pi runs that seat on the named host with zero extra flags and zero caller-side changes; bare `resume` follows the same table. Public callable roles and their institutional sub-legs (soul audit, doctor audit) share the in-process institutional session seam; Reviewer method Skill delivery is Pi-native `/skill:ak-cross-m-review` today — non-Pi host-native loader remains OPEN ([#922](https://github.com/Akagilnc/ak-pi-workflow-roles/issues/922)).
55
+ **Host axis (invocation-insensible after default):** `--host` is a global public option on every callable role and on `resume`. Resolution is invocation `--host` → persistent seat host (`config set-host`) → package default (`pi`). After `config set-host <seat> <name>`, the same command face used with Pi runs that seat on the named host with zero extra flags and zero caller-side changes; bare `resume` follows the same table. Public callable roles and their institutional sub-legs (soul audit, doctor audit) share the in-process institutional session seam.
56
56
 
57
57
  **Recommended hosts (token saving, [#971](https://github.com/Akagilnc/ak-pi-workflow-roles/issues/971)):** long legs are capped by each host's own auto-compaction; the threshold lives in that host's own config. This package neither writes those files nor adds a compaction mechanism of its own.
58
58
 
@@ -66,7 +66,7 @@ Set a seat with `ak-role config set-host <seat> <host>`; use `--host` for a one-
66
66
 
67
67
  **Host providers (#788):** seat rows keep one provider name. Owner edits `~/.ak-roles/host-providers.json` (`{ "hermes": { "xai": "xai-oauth" } }`); code only reads it. Missing table entries ask the host directory (hermes this ticket): unique match wins, zero or many fail loud. Priority is table > unique > fail — no package discretion. `config show` prints the table as written.
68
68
 
69
- **Forced method skills (#922):** Pi uses `--skill`. Claude uses `--plugin-dir` and its native slash command when a role binds exactly one Skill; its current print harness cannot issue multiple slash commands for one turn, so multi-Skill roles such as Fixer have no forced-method call on Claude. Codex discovers the packaged methods through its documented project `.agents/skills` catalog, which is created only when absent and then left in place; existing entries are never replaced, and Codex receives every official `$skill-name` invocation. Hermes ACP and Grok ACP cannot force a Skill call through their current harness interfaces. These gaps are documentation only: the package does not invent an adapter, capability probe, typed failure, catalog, or operator prerequisite for them. The package never changes host trust or configuration.
69
+ **Machine method Skills:** Run `ak-role setup` to install missing required Skills under `~/.agents/skills` and update those names through the Skills CLI (`skills update -g`). An occupied path is warned and left untouched. Setup adds links for installed Claude Code and Hermes when needed. This directory is the sole machine installation source. Roles warn on stdout when their required Skill is missing and continue. Pi receives paths from that directory through native `--skill`. Claude Code and Codex use native Skill discovery; Hermes ACP and Grok ACP cannot force Skills through their current harnesses. The package does not prepend or strip Skill commands in role requests, or modify host trust or configuration.
70
70
 
71
71
  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.
72
72
 
package/README.zh-CN.md CHANGED
@@ -52,7 +52,7 @@ ak-role config unset-host judge
52
52
  ak-role config set-auto-resume-limit 3
53
53
  ```
54
54
 
55
- **宿主轴(配置默认 host 后调用无感):** `--host` 为全局公开旗,全部可调用角色与 `resume` 受理。解析序为调用 `--host` → 席位持久 host(`config set-host`)→ 包默认(`pi`)。`config set-host <seat> <name>` 之后,与 Pi 完全相同的命令面即可在该席跑命名宿主——零额外旗、零调用侧改动;裸 `resume` 同序取表。可调用角色及其机构子腿(审刑审计、太医审计)共享进程内机构子会话接缝;御史台方法 Skill 现行仅 Pi 原生 `/skill:ak-cross-m-review` 交付——非 Pi 宿主原生装载仍 OPEN([#922](https://github.com/Akagilnc/ak-pi-workflow-roles/issues/922))。
55
+ **宿主轴(配置默认 host 后调用无感):** `--host` 为全局公开旗,全部可调用角色与 `resume` 受理。解析序为调用 `--host` → 席位持久 host(`config set-host`)→ 包默认(`pi`)。`config set-host <seat> <name>` 之后,与 Pi 完全相同的命令面即可在该席跑命名宿主——零额外旗、零调用侧改动;裸 `resume` 同序取表。可调用角色及其机构子腿(审刑审计、太医审计)共享进程内机构子会话接缝。
56
56
 
57
57
  **推荐宿主(省 token,[#971](https://github.com/Akagilnc/ak-pi-workflow-roles/issues/971)):** 长腿的上下文靠宿主自带的自动压缩封顶,阈值写在各宿主自己的配置里,本包不代写、不另造压缩机制。
58
58
 
@@ -66,7 +66,7 @@ ak-role config set-auto-resume-limit 3
66
66
 
67
67
  **宿主 provider 表(#788):** 席位行只写一份 provider 名。owner 手改 `~/.ak-roles/host-providers.json`(形如 `{ "hermes": { "xai": "xai-oauth" } }`);代码只读。表里没有的问宿主目录(本票 hermes):唯一即用,零个或多个响亮失败。优先级:表 > 唯一 > 失败,代码无裁量。`config show` 原样打印该表。
68
68
 
69
- **强制方法 Skill(#922):** Pi 使用 `--skill`。角色只绑定一个 Skill 时,Claude 使用 `--plugin-dir` 与原生 slash command;当前 print harness 无法在一轮发出多个 slash command,所以 Fixer 等多 Skill 角色在 Claude 上没有强制方法调用。Codex 通过官方项目 `.agents/skills` 目录发现随包方法:目录缺失时创建常设软链,既有项不覆盖;调用时显式传入每个官方 `$skill-name`。Hermes ACP 与 Grok ACP 当前 harness 无法强制 Skill 调用。这些缺口只在文档说明:本包不为其另造适配、能力探测、typed failure、catalog 或操作员前置,也不改宿主 trust/配置。
69
+ **机器方法 Skill:** 运行 `ak-role setup`,在 `~/.agents/skills` 安装缺失的所需 Skill,并经 Skills CLI(`skills update -g`)升级这些名字。路径已被占用则警告并原样保留。setup 为已安装的 Claude Code、Hermes 建必要软链。该目录是唯一机器安装源。角色发现所需 Skill 缺失时向 stdout 警告并继续。Pi 仅从该目录向原生 `--skill` 传路径;Claude Code 与 Codex 遵从原生 Skill 发现;Hermes ACP 与 Grok ACP 当前 harness 无法强制 Skill。本包不拼剥角色任务文本中的 Skill 命令,也不修改宿主 trust 或配置。
70
70
 
71
71
  门下省官席解析顺序:官自钉 → 省钉(`gatekeeper`)→ 继承父 session;显式指定失败响亮、不回退。配置用法与拒绝文案以 `ak-role config`/`ak-role help config` 为准。持久配置是全机共享单文件、多 CLI 版本同读:本构建不认识的席位键读时跳过(不报错);已知席位上的未知字段沿用现行容忍。
72
72
 
@@ -8,20 +8,20 @@ license authority. Do not treat them as dual-licensing the package.
8
8
 
9
9
  Upstream provenance: [mattpocock/skills](https://github.com/mattpocock/skills).
10
10
 
11
- This package ships or will ship pinned snapshots of the following skills from
12
- that upstream repository. Each shipped method records immutable upstream
13
- commit/tag identity, per-file digests and git blob OIDs, and attribution under
14
- `resources/methods/<name>/provenance.json`.
11
+ `ak-role setup` installs the following skills from that upstream repository
12
+ into the user's machine Skill directory. The repository retains historical
13
+ snapshots under `resources/methods/` until after release, but they are not
14
+ included in the npm package.
15
15
 
16
- - `tdd` — shipped unchanged under `resources/methods/tdd/` from upstream
16
+ - `tdd` — historical repository snapshot from upstream
17
17
  `skills/engineering/tdd` at commit `8b36d4fb2635b3c21998dcd8144439c9e5ba7302`
18
18
  (tag `v1.2.2`) (#109)
19
- - `diagnosing-bugs` — shipped under `resources/methods/diagnosing-bugs/` from
19
+ - `diagnosing-bugs` — historical repository snapshot from
20
20
  upstream `skills/engineering/diagnosing-bugs` at the same commit/tag, with
21
21
  package adaptation `fixer-boundary-no-external-skill-chain` so the Fixer
22
22
  method cannot automatically launch architecture Grill or other role-external
23
23
  Skill chains (#110)
24
- - `resolving-merge-conflicts` — shipped under `resources/methods/resolving-merge-conflicts/` from
24
+ - `resolving-merge-conflicts` — historical repository snapshot from
25
25
  upstream `skills/engineering/resolving-merge-conflicts` at the same commit/tag, with
26
26
  package adaptation `merger-merge-only-escalate-new-intent` so Merger stays merge-only,
27
27
  escalates new intent/authority instead of guessing, and does not inherit upstream
@@ -55,7 +55,7 @@ SOFTWARE.
55
55
 
56
56
  ## First-party method (not third-party)
57
57
 
58
- - `ak-cross-m-review` — shipped verbatim under `resources/methods/ak-cross-m-review/`
58
+ - `ak-cross-m-review` — historical repository snapshot under `resources/methods/ak-cross-m-review/`
59
59
  from [Akagilnc/ak-cross-m-review](https://github.com/Akagilnc/ak-cross-m-review)
60
60
  commit `57b10e2cea9ff008e2b36b98b55610e58cdfd512` (VERSION `0.5.2.0`, MIT,
61
61
  Copyright (c) 2026 Akagi). `packageAdaptation` = `verbatim-upstream`. This is