@kontextmind/kxm 0.7.144 → 0.7.146

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 (48) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.kxm/README.md +20 -2
  3. package/.kxm/agents/{coordinator.yaml → planner.yaml} +2 -0
  4. package/.kxm/agents/{critic-arch.yaml → reviewer-arch.yaml} +2 -0
  5. package/.kxm/agents/{critic-cli.yaml → reviewer-cli.yaml} +2 -0
  6. package/.kxm/agents/{implementer.yaml → writer.yaml} +2 -0
  7. package/.kxm/roles/planner.yaml +4 -2
  8. package/.kxm/roles/reviewer-arch.yaml +4 -2
  9. package/.kxm/roles/reviewer-cli.yaml +4 -2
  10. package/.kxm/roles/writer.yaml +6 -3
  11. package/.kxm/workflows/default.yaml +20 -12
  12. package/.kxm/workflows/land.yaml +1 -1
  13. package/.kxm/workflows/{review-arch-only.yaml → reviewer-arch-only.yaml} +7 -3
  14. package/.kxm/workflows/{review-cli-only.yaml → reviewer-cli-only.yaml} +7 -3
  15. package/.kxm/workflows/{implement-only.yaml → writer-only.yaml} +8 -4
  16. package/CHANGELOG.md +22 -5
  17. package/docs/contributing/harness-routing-internals.md +17 -11
  18. package/docs/reference/cli-reference.md +23 -24
  19. package/docs/reference/config-reference.md +69 -62
  20. package/docs/reference/harness-routing.md +6 -5
  21. package/docs/reference/workflow-catalog.md +3 -3
  22. package/package.json +3 -3
  23. package/plugins/kxm/.claude-plugin/plugin.json +1 -1
  24. package/plugins/kxm/dist/cli.js +1144 -804
  25. package/plugins/kxm/dist/mcp-server.js +1 -1
  26. package/plugins/kxm/dist/runtime-supervisor.js +636 -308
  27. package/plugins/kxm/dist/runtime.js +707 -379
  28. package/plugins/kxm/dist/server.js +49 -5
  29. package/plugins/kxm/package.json +1 -1
  30. package/plugins/kxm/skills/kxm-project-setup/SKILL.md +3 -3
  31. package/plugins/kxm/src/cli/project.ts +2 -1
  32. package/plugins/kxm/src/cli/roles.ts +3 -4
  33. package/plugins/kxm/src/engine.ts +9 -6
  34. package/plugins/kxm/src/mcp-server.ts +1 -1
  35. package/plugins/kxm/src/policy-draft.mjs +11 -5
  36. package/plugins/kxm/src/project-config.ts +49 -11
  37. package/plugins/kxm/src/runtime-service.ts +2 -1
  38. package/plugins/kxm/src/template.ts +39 -10
  39. package/plugins/kxm/src/workflow-manager.ts +34 -28
  40. package/plugins/kxm/src/workforce-names.d.mts +38 -0
  41. package/plugins/kxm/src/workforce-names.mjs +317 -0
  42. package/schemas/agent.schema.json +7 -0
  43. package/schemas/model.schema.json +12 -0
  44. package/schemas/workflow.schema.json +14 -0
  45. package/scripts/harness-run.mjs +1 -1
  46. package/scripts/native-critic.mjs +5 -5
  47. package/scripts/roster-policy.mjs +9 -3
  48. package/scripts/workforce-lint.mjs +18 -0
@@ -11,7 +11,7 @@
11
11
  "name": "kxm",
12
12
  "source": "./plugins/kxm",
13
13
  "description": "Durable workflows, peer agents, and kxm tui",
14
- "version": "0.7.144",
14
+ "version": "0.7.146",
15
15
  "category": "development",
16
16
  "tags": ["kxm", "multi-agent", "workflows", "mcp"]
17
17
  }
package/.kxm/README.md CHANGED
@@ -26,8 +26,26 @@ a `default` workflow, `gates.yaml` and `template-provenance.yaml`.
26
26
  | `run/` | SSH control sockets from `kxm ssh` | Ignored |
27
27
 
28
28
  The role files under `.kxm/roles/` and the model files under `.kxm/models/`
29
- carry the developer policy. The assignment runner reads them at
30
- `refs/remotes/origin/main`.
29
+ carry the developer policy. The assignment runner reads them at one commit
30
+ (`HEAD`, which must be an ancestor of `refs/remotes/origin/main`). A rename
31
+ does not rewrite a commit that still uses the old ids. An old id resolves
32
+ only when that id is absent and the other side is present.
33
+
34
+ Ids in this checkout follow one convention per kind:
35
+
36
+ | Kind | Convention | This checkout |
37
+ |---|---|---|
38
+ | Role | The purpose: `planner`, `writer`, `reviewer-arch`, `reviewer-cli` | Unchanged |
39
+ | Agent | The same id as its `role` | `planner`, `writer`, `reviewer-arch`, `reviewer-cli` |
40
+ | Route | `<harness>-<model-slug>[-<provider>]`, with `.` written as `-` | `grok-grok-4-7`, `claude-fable`, `pi-qwen3-coder-plus-openrouter` |
41
+ | Workflow | `default`, `land`, or `<role>-only` | `default`, `land`, `writer-only`, `reviewer-arch-only`, `reviewer-cli-only` |
42
+ | Agent step | The agent's role id | `writer`, `reviewer-arch`, `reviewer-cli` |
43
+
44
+ `coordinator`, `implementer`, `critic-arch`, and `critic-cli` are aliases of
45
+ the agent ids. `implement`, `review-arch`, and `review-cli` are aliases of
46
+ the step ids. Route aliases include `grok-native`, `fable-claude`, and
47
+ `sol-codex`. Using an alias prints `kxm: deprecated <kind> id '<from>' resolves to '<to>'`.
48
+ `opus-claude` does not resolve to another model.
31
49
 
32
50
  The [configuration reference](../docs/reference/config-reference.md#workspace-layout-tracked-ignored-and-state)
33
51
  describes every file, the ignore rules to add, and the state KXM keeps outside
@@ -1,6 +1,8 @@
1
1
  schema: kxm.agent.v1
2
2
  purpose: Coordinate the pinned workflow and emit schema-validated commands.
3
3
  role: planner
4
+ aliases:
5
+ - coordinator
4
6
  tools:
5
7
  preset: coordinator
6
8
  defaultRepositoryAccess: read
@@ -1,6 +1,8 @@
1
1
  schema: kxm.agent.v1
2
2
  purpose: Architecture critic for the approved workflow change.
3
3
  role: reviewer-arch
4
+ aliases:
5
+ - critic-arch
4
6
  tools:
5
7
  preset: read-only
6
8
  defaultRepositoryAccess: read
@@ -1,6 +1,8 @@
1
1
  schema: kxm.agent.v1
2
2
  purpose: CLI and verification critic for the approved workflow change.
3
3
  role: reviewer-cli
4
+ aliases:
5
+ - critic-cli
4
6
  tools:
5
7
  preset: read-only
6
8
  defaultRepositoryAccess: read
@@ -1,6 +1,8 @@
1
1
  schema: kxm.agent.v1
2
2
  purpose: Implement the approved change within the declared repository scope.
3
3
  role: writer
4
+ aliases:
5
+ - implementer
4
6
  tools:
5
7
  preset: workspace-writer
6
8
  defaultRepositoryAccess: none
@@ -3,7 +3,9 @@ id: planner
3
3
  purpose: planner
4
4
  permission: read-only
5
5
  description: Plans the change before implementation.
6
- # fable primary (proven planning).
6
+ # claude-fable is primary. The Pi fallback is a different vendor.
7
7
  roster:
8
- - route: fable-claude
8
+ - route: claude-fable
9
+ effort: medium
10
+ - route: pi-qwen3-8-flash-openrouter
9
11
  effort: medium
@@ -3,7 +3,9 @@ id: reviewer-arch
3
3
  purpose: reviewer-arch
4
4
  permission: read-only
5
5
  description: Independent architecture critic.
6
- # fable is the required arch critic.
6
+ # claude-fable is the required arch critic. The Pi fallback is a different vendor.
7
7
  roster:
8
- - route: fable-claude
8
+ - route: claude-fable
9
+ effort: medium
10
+ - route: pi-glm-5-3-flash-openrouter
9
11
  effort: medium
@@ -3,7 +3,9 @@ id: reviewer-cli
3
3
  purpose: reviewer-cli
4
4
  permission: read-only
5
5
  description: Independent CLI and docs critic.
6
- # sol is the required cli critic.
6
+ # codex-gpt-5-6-sol is the required cli critic. The Pi fallback is a different vendor.
7
7
  roster:
8
- - route: sol-codex
8
+ - route: codex-gpt-5-6-sol
9
+ effort: low
10
+ - route: pi-qwen3-8-flash-openrouter
9
11
  effort: low
@@ -5,8 +5,11 @@ permission: edit
5
5
  description: Primary implementation agent.
6
6
  # Rotation priority = order. Effort default: medium for implementation.
7
7
  roster:
8
- - route: grok-native
8
+ - route: grok-grok-4-7
9
9
  effort: medium
10
- - route: qwen-openrouter-pi
10
+ - route: pi-qwen3-coder-plus-openrouter
11
+ effort: medium
12
+ - route: agy-gemini-3-8-flash-high
13
+ effort: medium
14
+ - route: agy-gemini-3-8-flash-medium
11
15
  effort: medium
12
- - route: gemini-agy
@@ -1,37 +1,45 @@
1
1
  schema: kxm.workflow.v1
2
2
  description: Canonical 4-stage KXM delivery workflow
3
- coordinator: coordinator
3
+ coordinator: planner
4
4
  limits:
5
5
  maxTransitions: 8
6
6
  steps:
7
- - id: implement
7
+ - id: writer
8
+ aliases:
9
+ - implement
8
10
  kind: agent
9
- agent: implementer
11
+ agent: writer
10
12
  repositories:
11
13
  control: write
12
14
  maxAttempts: 3
13
15
  on:
14
- passed: review-arch
16
+ passed: reviewer-arch
15
17
  failed:
16
18
  target: $terminal
17
19
  terminalStatus: failed
18
- - id: review-arch
20
+ - id: reviewer-arch
21
+ aliases:
22
+ - review-arch
23
+ - critic-arch
19
24
  kind: agent
20
- agent: critic-arch
25
+ agent: reviewer-arch
21
26
  maxAttempts: 2
22
27
  on:
23
- passed: review-cli
28
+ passed: reviewer-cli
24
29
  failed:
25
- target: implement
30
+ target: writer
26
31
  maxTransitions: 2
27
- - id: review-cli
32
+ - id: reviewer-cli
33
+ aliases:
34
+ - review-cli
35
+ - critic-cli
28
36
  kind: agent
29
- agent: critic-cli
37
+ agent: reviewer-cli
30
38
  maxAttempts: 2
31
39
  on:
32
40
  passed: verify
33
41
  failed:
34
- target: implement
42
+ target: writer
35
43
  maxTransitions: 2
36
44
  - id: verify
37
45
  kind: gate
@@ -45,5 +53,5 @@ steps:
45
53
  target: $terminal
46
54
  terminalStatus: completed
47
55
  implementation-failure:
48
- target: implement
56
+ target: writer
49
57
  maxTransitions: 2
@@ -3,7 +3,7 @@
3
3
  # `kxm run land --dry-run --json`.
4
4
  schema: kxm.workflow.v1
5
5
  description: Land the current branch through verify, docs, rebase, merge, release, and milestone gates.
6
- coordinator: coordinator
6
+ coordinator: planner
7
7
  limits:
8
8
  maxTransitions: 24
9
9
  steps:
@@ -1,12 +1,16 @@
1
1
  schema: kxm.workflow.v1
2
2
  description: One read-only architecture critic step.
3
- coordinator: coordinator
3
+ aliases:
4
+ - review-arch-only
5
+ coordinator: planner
4
6
  limits:
5
7
  maxTransitions: 2
6
8
  steps:
7
- - id: critic-arch
9
+ - id: reviewer-arch
10
+ aliases:
11
+ - critic-arch
8
12
  kind: agent
9
- agent: critic-arch
13
+ agent: reviewer-arch
10
14
  repositories:
11
15
  control: read
12
16
  maxAttempts: 1
@@ -1,12 +1,16 @@
1
1
  schema: kxm.workflow.v1
2
2
  description: One read-only CLI critic step.
3
- coordinator: coordinator
3
+ aliases:
4
+ - review-cli-only
5
+ coordinator: planner
4
6
  limits:
5
7
  maxTransitions: 2
6
8
  steps:
7
- - id: critic-cli
9
+ - id: reviewer-cli
10
+ aliases:
11
+ - critic-cli
8
12
  kind: agent
9
- agent: critic-cli
13
+ agent: reviewer-cli
10
14
  repositories:
11
15
  control: read
12
16
  maxAttempts: 1
@@ -1,12 +1,16 @@
1
1
  schema: kxm.workflow.v1
2
- description: One implementer step with a drive receipt.
3
- coordinator: coordinator
2
+ description: One writer step with a drive receipt.
3
+ aliases:
4
+ - implement-only
5
+ coordinator: planner
4
6
  limits:
5
7
  maxTransitions: 2
6
8
  steps:
7
- - id: implement
9
+ - id: writer
10
+ aliases:
11
+ - implement
8
12
  kind: agent
9
- agent: implementer
13
+ agent: writer
10
14
  repositories:
11
15
  control: write
12
16
  maxAttempts: 1
package/CHANGELOG.md CHANGED
@@ -13,8 +13,9 @@ All notable user-facing changes are documented here. The project follows [Semant
13
13
  effective value is written on the one-shot evidence. A `cancelling` run whose
14
14
  executing attempt's child already exited settles `executing_unrecorded`.
15
15
  Admission is released when a drive closes with a handoff, so a later drive
16
- is admitted, and `runs status` names the attempt. `implement-only`,
17
- `review-arch-only`, and `review-cli-only` are one-step workflows, driven with
16
+ is admitted, and `runs status` names the attempt. `writer-only`,
17
+ `reviewer-arch-only`, and `reviewer-cli-only` are one-step workflows
18
+ (`implement-only`, `review-arch-only`, and `review-cli-only` still resolve), driven with
18
19
  `kxm lane run <unit> --workflow <id> --brief <file>`. See
19
20
  [kxm lane](docs/reference/cli-reference.md#kxm-lane),
20
21
  [runs status](docs/reference/cli-reference.md#kxm-runs-status),
@@ -141,6 +142,22 @@ All notable user-facing changes are documented here. The project follows [Semant
141
142
 
142
143
  ### Changed
143
144
 
145
+ - **Workforce ids use one convention, and old ids still resolve.**
146
+ Role ids stay `planner`, `writer`, `reviewer-arch`, and `reviewer-cli`.
147
+ Agent ids and agent-step ids use those same names. Route ids are
148
+ `<harness>-<model-slug>[-<provider>]`. `kxm init` writes `planner.yaml`
149
+ and `writer.yaml`; `coordinator` and `implementer` remain aliases.
150
+ `opus-claude` is removed because `opus` is not an admitted selector.
151
+ `qwen-token-plan/*` and `zai-coding-cn/*` left `.kxm/routes.yaml` because
152
+ those harnesses are not allowlisted. `node scripts/workforce-lint.mjs`
153
+ fails `npm run check` and `npm run validate:pr` when a route, a roster
154
+ entry, or an id breaks the convention, and when a roster entry omits
155
+ `effort` or names one outside `off`, `minimal`, `low`, `medium`, `high`,
156
+ `xhigh`, and `max`. An admitted selector with no route is a warning.
157
+ The Claude helper accepts `fable` only. #343's architecture critic ran on
158
+ `opus` because the justfile recipe review-arch hardcoded that model while
159
+ `reviewer-arch` listed only `fable-claude`. That recipe is gone; a request
160
+ for `opus` fails closed.
144
161
  - **Dispatch reads role and model files, and agents bind a role.**
145
162
  `scripts/roster-policy.mjs` builds the developer policy from
146
163
  `.kxm/models/*.yaml` and `.kxm/roles/*.yaml` at `refs/remotes/origin/main`.
@@ -148,9 +165,9 @@ All notable user-facing changes are documented here. The project follows [Semant
148
165
  and that role's roster. A step `model` does not override that route.
149
166
  `kxm routes` prints `policy` (`admitted`, `disabled`) and `membership`
150
167
  from the role files. `.kxm/routes.yaml` keeps admitted and disabled
151
- selectors. `reviewer-arch` resolves to `fable-claude`. `opus-claude` is
152
- admitted and named by no roster, so it is absent from `routes` and the
153
- lineups. `gemini-agy` is in the writer lineup. An agent `tools.preset`
168
+ selectors. `reviewer-arch` resolves to `claude-fable` (alias `fable-claude`).
169
+ `agy-gemini-3-8-flash-high` (alias `gemini-agy`) is in the writer lineup.
170
+ An agent `tools.preset`
154
171
  may only narrow its role preset; that rule is recorded and enforced in P3.
155
172
 
156
173
  - **Role and model files are live `kxm.role.v2` and `kxm.model.v2`.**
@@ -5,6 +5,12 @@ This page records how the KXM repository applies [harness routing](../reference/
5
5
  > [!IMPORTANT]
6
6
  > The files are the authority, not this page: `.kxm/routes.yaml`, `.kxm/roles/*.yaml`, `.kxm/models/*.yaml`, and `.kxm/prices.yaml`. Product routing decisions are recorded under Tracking → Decided in `plans/implementation-plan.md`.
7
7
 
8
+ ## Current ids (2026-09-27)
9
+
10
+ The command transcripts below are the 2026-09-23 capture. The files now use one id shape per kind. A route id is `<harness>-<model-slug>[-<provider>]`, with `.` written as `-`. An agent id equals its role. A workflow id is `default`, `land`, or `<role>-only`. An agent step id equals that role.
11
+
12
+ This checkout's routes are `grok-grok-4-7`, `pi-qwen3-coder-plus-openrouter`, `agy-gemini-3-8-flash-high`, `agy-gemini-3-8-flash-medium`, `claude-fable`, `codex-gpt-5-6-sol`, `pi-qwen3-8-flash-openrouter`, and `pi-glm-5-3-flash-openrouter`. Agents are `planner`, `writer`, `reviewer-arch`, and `reviewer-cli`. `opus-claude` was removed because `opus` is not an admitted selector. `qwen-token-plan/*` and `zai-coding-cn/*` left the admitted list because those harnesses are not allowlisted; their `prices.yaml` rows stay. Old ids resolve as aliases. Every roster entry names an effort. `reviewer-arch` dispatches `claude-fable`. #343's architecture critic ran on opus because the justfile recipe review-arch hardcoded that model; the role file on that commit listed only `fable-claude`. The helper now refuses `opus`.
13
+
8
14
  ## This checkout's routes and roster
9
15
 
10
16
  `node scripts/kxm.mjs role get writer`:
@@ -64,11 +70,11 @@ On the capture machine, `kxm harness list` showed `claude` detected but logged o
64
70
  The issue-127 runner (`kxm assign`, see the [assignment runner](assignment-runner.md)) reads `.kxm/roles/*.yaml` and `.kxm/models/*.yaml` at `refs/remotes/origin/main`. See [Developer assignment policy](../reference/config-reference.md#developer-assignment-policy). Routes there name the harness, the model and the vendor explicitly:
65
71
 
66
72
  ```yaml
67
- grok-native:
73
+ grok-grok-4-7:
68
74
  harness: grok
69
- model: grok-4.6
75
+ model: grok-4.7
70
76
  vendor: xai
71
- qwen-openrouter-pi:
77
+ pi-qwen3-coder-plus-openrouter:
72
78
  harness: pi
73
79
  model: openrouter/qwen/qwen3-coder-plus
74
80
  vendor: alibaba
@@ -107,19 +113,19 @@ These extend the generic examples on the reference page with this checkout's adm
107
113
  | | Native `grok` | Pi + OpenRouter |
108
114
  |---|---|---|
109
115
  | Selector | `xai/grok-4.6`: admitted, and first in the writer roster | `openrouter/x-ai/grok-4.6`: not admitted |
110
- | Developer roster | `grok-native`, the writer route with `edit` | Refused: `native vendor cannot use Pi` |
116
+ | Developer roster | `grok-grok-4-7`, the writer route with `edit` | Refused: `native vendor cannot use Pi` |
111
117
  | Readiness | `grok` shows auth `yes` | `pi auth check --provider openrouter` returned `not_ready` |
112
118
  | Billing | grok.com subscription (OAuth) | $2.00 input, $6.00 output, $0.50 cached input |
113
119
  | Context | 500K (Pi's `xai` row; `grok models` does not print one) | 500,000 |
114
120
 
115
- Pi's own `xai` provider reported `ready` (OAuth) on the capture machine. When the grok quota runs out, the next writer in the lineup is `qwen-openrouter-pi`, a different vendor.
121
+ Pi's own `xai` provider reported `ready` (OAuth) on the capture machine. When the grok quota runs out, the next writer in the lineup is `pi-qwen3-coder-plus-openrouter`, a different vendor.
116
122
 
117
123
  ### GPT-5.6 Sol
118
124
 
119
125
  | | Native `codex` | Pi + OpenRouter |
120
126
  |---|---|---|
121
127
  | Selector | `openai/gpt-5.6-sol`: admitted, the CLI critic | `openrouter/openai/gpt-5.6-sol`: not admitted |
122
- | Developer roster | `sol-codex`: `reviewer-cli`, `read-only` | Refused |
128
+ | Developer roster | `codex-gpt-5-6-sol`: `reviewer-cli`, `read-only` | Refused |
123
129
  | Billing | ChatGPT subscription | $2.00 input, $10.00 output, $0.20 cached input |
124
130
  | Context | Pi's `openai-codex` row, the same ChatGPT backend, lists 272K | 1,050,000 |
125
131
 
@@ -130,7 +136,7 @@ In the inventory, `openai/gpt-5.6-sol` has sources `openrouter+nous` and carries
130
136
  | | Native `claude` | Pi + OpenRouter |
131
137
  |---|---|---|
132
138
  | Selector | `anthropic/fable`: admitted, planner and architecture critic | `openrouter/anthropic/claude-fable-5.1`: not admitted |
133
- | Developer roster | `fable-claude`: `planner` and `reviewer-arch`, `read-only` | Refused |
139
+ | Developer roster | `claude-fable`: `planner` and `reviewer-arch`, `read-only` | Refused |
134
140
  | Readiness | Detected `yes`, auth `no`, dispatch `no (not_authenticated)` | `not_ready` |
135
141
  | Billing | claude.ai subscription | $10.00 input, $50.00 output, $0.25 cached input |
136
142
  | Context | 1M (Pi's `anthropic` row) | 1,000,000 |
@@ -159,10 +165,10 @@ The code differs from that decision: `.kxm/routes.yaml` admits `google/gemini-3.
159
165
 
160
166
  | Model | Vendor-plan route | OpenRouter route | Notes |
161
167
  |---|---|---|---|
162
- | Qwen3.8 Flash | `qwen-token-plan/qwen3.8-flash`: admitted, in the writer roster; `ready` (`api_key`) | `openrouter/qwen/qwen3.8-flash`: admitted; $0.15 input, $0.47 output | `prices.yaml` gives both routes the same rates. Prefer the plan when it is authenticated. |
163
- | Qwen3 Coder Plus | none | `openrouter/qwen/qwen3-coder-plus`: $0.65 input, $3.25 output | The only admitted Pi writer: exact model, `edit` permission. |
164
- | GLM 5.3 and 5.3 Flash | `zai-coding-cn/glm-5.3` and `…/glm-5.3-flash`: admitted as failover critics and writer | `openrouter/z-ai/glm-5.3-flash`: admitted; $0.09 input, $0.30 output | Z.ai has no native harness. |
165
- | DeepSeek V4.1 Flash | `qwen-token-plan/deepseek-v4.1-flash`: admitted | `deepseek/deepseek-v4.1-flash` in the OpenRouter feed: $0.15 input, $0.60 output | Bills a DeepSeek model through Alibaba's plan, and passes the product brake because it names no vendor segment. An open admission question, not a precedent. |
168
+ | Qwen3.8 Flash | `qwen-token-plan/qwen3.8-flash`: removed from the admitted list on 2026-09-27; `qwen-token-plan` is not allowlisted | `openrouter/qwen/qwen3.8-flash`: admitted, route `pi-qwen3-8-flash-openrouter`, read-only fallback for planner and reviewer-cli | `prices.yaml` keeps both rows. |
169
+ | Qwen3 Coder Plus | none | `openrouter/qwen/qwen3-coder-plus`: route `pi-qwen3-coder-plus-openrouter` | The only admitted Pi writer: exact model, `edit` permission. |
170
+ | GLM 5.3 and 5.3 Flash | `zai-coding-cn/glm-5.3` and `…/glm-5.3-flash`: removed from the admitted list on 2026-09-27; `zai-coding-cn` is not allowlisted | `openrouter/z-ai/glm-5.3-flash`: admitted, route `pi-glm-5-3-flash-openrouter`, read-only fallback for reviewer-arch | Z.ai has no native harness. |
171
+ | DeepSeek V4.1 Flash | `qwen-token-plan/deepseek-v4.1-flash`: removed from the admitted list on 2026-09-27 | `deepseek/deepseek-v4.1-flash` in the OpenRouter feed | Bills a DeepSeek model through Alibaba's plan. `deepseek` is a native-vendor Pi brake, so this is not a route. |
166
172
 
167
173
  The developer runner is stricter. Its only Pi writer is `openrouter/qwen/qwen3-coder-plus`, and it does not allowlist `qwen-token-plan` or `zai-coding-cn`. Today OpenRouter is the right answer here for Qwen3 Coder Plus, Qwen3.8 Flash and GLM 5.3 Flash.
168
174
 
@@ -188,7 +188,7 @@ The starter `defaultHarness: pi` and `npm test` gate are generic settings, not r
188
188
  - Global options: `--json` and `--dry-run` only; `--workspace` exits 2 with `workspace_option_unsupported`.
189
189
  - `--project-id` must match `prj_` followed by 6 to 128 letters, digits, `_`, or `-`. `--repository` is repeatable; each value must be `<id>=<absolute path>`, and a repeated ID fails with `repository_binding_argument_duplicate`.
190
190
  - Needs a Git repository. Does not need a hub or the Runtime.
191
- - Writes `.kxm/project.yaml`, `.kxm/agents/coordinator.yaml`, `.kxm/agents/implementer.yaml`, `.kxm/gates.yaml`, `.kxm/repo/repo.yaml`, `.kxm/workflows/default.yaml`, and `.kxm/template-provenance.yaml`, using a `.kxm-init-transaction` directory at the Git root while a create or repair is in flight. Repository bindings are written under the user state root, never into Git. `--dry-run` writes nothing.
191
+ - Writes `.kxm/project.yaml`, `.kxm/agents/planner.yaml`, `.kxm/agents/writer.yaml`, `.kxm/gates.yaml`, `.kxm/repo/repo.yaml`, `.kxm/workflows/default.yaml`, and `.kxm/template-provenance.yaml`, using a `.kxm-init-transaction` directory at the Git root while a create or repair is in flight. `planner.yaml` keeps the alias `coordinator`, and `writer.yaml` keeps the alias `implementer`. Repository bindings are written under the user state root, never into Git. `--dry-run` writes nothing.
192
192
  - On an interactive terminal without `--json` or `--dry-run`, a successful create or join offers to install shell completion (suppress with `KXM_SKIP_COMPLETION_PROMPT=1`) and to write workflow-guide agents (suppress with `KXM_SKIP_GUIDE_SETUP_PROMPT=1`). Guided setup keeps a role only when one of its guide candidates is on a fixed map of reviewed harness/model pairs and that harness is authenticated; it writes the agent and workflow files, appends those selectors to `.kxm/routes.yaml`, and skips every other candidate. Google candidates are not on the map and are always skipped, because the Runtime's Pi one-shot cannot reach Google's `antigravity` Pi provider yet (see [Harness routing](harness-routing.md#google-through-the-antigravity-pi-provider)).
193
193
  - JSON keys: `action` (`planned`, `created`, `joined`, `repaired`, `resumed`, or `validated`), `mode`, `inspectedFrom`, `projectRoot`, `changesRequired`, `legacyInputs`, `issues`, `configRevision`, `files`, `plannedOnly`, and, when relevant, `guidance`, `localBindingFile`, `bindingsChanged`, `repairPlan`, `resumePending`, `transactionKind`.
194
194
  - Exit 0 for every completed action and every dry-run plan. Exit 1 when the result is planning-only (legacy state, blocked repair, partial state without provenance) or for `initialization_failed` (with `issues`) and `initialization_io_failed`. A planning-only text result prints the reason and then one `<file>: <code>: <message>` line per validation issue, for example `.kxm/workflows/first.yaml: gate_outcome_impossible: ...`.
@@ -200,7 +200,7 @@ kxm init --dry-run --json
200
200
  ```
201
201
 
202
202
  ```text
203
- {"schema":"kxm.cli-result.v1","ok":true,"command":"init","action":"planned","mode":"create","inspectedFrom":"/work/proj","projectRoot":"/work/proj","changesRequired":true,"legacyInputs":[],"issues":[],"files":[".kxm/agents/coordinator.yaml",".kxm/agents/implementer.yaml",".kxm/gates.yaml",".kxm/project.yaml",".kxm/repo/repo.yaml",".kxm/template-provenance.yaml",".kxm/workflows/default.yaml"],"plannedOnly":true}
203
+ {"schema":"kxm.cli-result.v1","ok":true,"command":"init","action":"planned","mode":"create","inspectedFrom":"/work/proj","projectRoot":"/work/proj","changesRequired":true,"legacyInputs":[],"issues":[],"files":[".kxm/agents/planner.yaml",".kxm/agents/writer.yaml",".kxm/gates.yaml",".kxm/models/claude-fable.yaml",".kxm/models/grok-grok-4-6.yaml",".kxm/project.yaml",".kxm/repo/repo.yaml",".kxm/roles/planner.yaml",".kxm/roles/writer.yaml",".kxm/routes.yaml",".kxm/template-provenance.yaml",".kxm/workflows/default.yaml"],"plannedOnly":true}
204
204
  ```
205
205
 
206
206
  Create the project:
@@ -419,7 +419,7 @@ kxm trust diff
419
419
 
420
420
  ```text
421
421
  permission diff: sha256:80457232cbfc… -> sha256:7428fde55ca4…
422
- EXPANSION .kxm/agents/coordinator.yaml /repositories/control repository-access changed (expansion)
422
+ EXPANSION .kxm/agents/planner.yaml /repositories/control repository-access changed (expansion)
423
423
  1 expansion(s) require explicit reviewed trust action
424
424
  ```
425
425
 
@@ -452,7 +452,7 @@ kxm trust check
452
452
 
453
453
  ```text
454
454
  permission diff: sha256:80457232cbfc… -> sha256:7428fde55ca4…
455
- EXPANSION .kxm/agents/coordinator.yaml /repositories/control repository-access changed (expansion)
455
+ EXPANSION .kxm/agents/planner.yaml /repositories/control repository-access changed (expansion)
456
456
  1 expansion(s) require explicit reviewed trust action
457
457
  trust check failed: review every expansion above before merging
458
458
  ```
@@ -462,7 +462,7 @@ kxm trust check --json
462
462
  ```
463
463
 
464
464
  ```text
465
- {"schema":"kxm.cli-result.v1","ok":false,"command":"trust check",...,"requiresReview":true,"expansions":1,"narrowings":0,"neutralChanges":0,"changes":[{"resource":".kxm/agents/coordinator.yaml","path":"/repositories/control","field":"repository-access","direction":"expansion",...}]}
465
+ {"schema":"kxm.cli-result.v1","ok":false,"command":"trust check",...,"requiresReview":true,"expansions":1,"narrowings":0,"neutralChanges":0,"changes":[{"resource":".kxm/agents/planner.yaml","path":"/repositories/control","field":"repository-access","direction":"expansion",...}]}
466
466
  ```
467
467
 
468
468
  <a id="hub-commands"></a>
@@ -1069,7 +1069,7 @@ Lists admitted and disabled routes.
1069
1069
 
1070
1070
  No command-specific options.
1071
1071
 
1072
- - Reads only. JSON keys: `policy` (`schema`, `updatedAt`, `admitted`, `disabled`) and `membership` (strings `<role> <route-id>` from `.kxm/roles/*.yaml`). `policy` has no `roles` field. A model file named by no roster, such as `opus-claude`, is absent from `membership`.
1072
+ - Reads only. JSON keys: `policy` (`schema`, `updatedAt`, `admitted`, `disabled`) and `membership` (strings `<role> <route-id>` from `.kxm/roles/*.yaml`). `policy` has no `roles` field. A model file named by no roster is absent from `membership`, and this repository's workforce lint fails on that file.
1073
1073
 
1074
1074
  ```bash
1075
1075
  kxm routes list
@@ -1083,18 +1083,17 @@ admitted openai/gpt-5.6-sol
1083
1083
  admitted openrouter/qwen/qwen3-coder-plus
1084
1084
  admitted openrouter/qwen/qwen3.8-flash
1085
1085
  admitted openrouter/z-ai/glm-5.3-flash
1086
- admitted qwen-token-plan/deepseek-v4.1-flash
1087
- admitted qwen-token-plan/qwen3.8-flash
1088
- admitted qwen-token-plan/qwen3.8-max
1089
1086
  admitted xai/grok-4.7
1090
- admitted zai-coding-cn/glm-5.3
1091
- admitted zai-coding-cn/glm-5.3-flash
1092
- planner fable-claude
1093
- reviewer-arch fable-claude
1094
- reviewer-cli sol-codex
1095
- writer grok-native
1096
- writer qwen-openrouter-pi
1097
- writer gemini-agy
1087
+ planner claude-fable
1088
+ planner pi-qwen3-8-flash-openrouter
1089
+ reviewer-arch claude-fable
1090
+ reviewer-arch pi-glm-5-3-flash-openrouter
1091
+ reviewer-cli codex-gpt-5-6-sol
1092
+ reviewer-cli pi-qwen3-8-flash-openrouter
1093
+ writer grok-grok-4-7
1094
+ writer pi-qwen3-coder-plus-openrouter
1095
+ writer agy-gemini-3-8-flash-high
1096
+ writer agy-gemini-3-8-flash-medium
1098
1097
  ```
1099
1098
 
1100
1099
  ```bash
@@ -1102,7 +1101,7 @@ kxm routes list --json
1102
1101
  ```
1103
1102
 
1104
1103
  ```text
1105
- {"schema":"kxm.cli-result.v1","ok":true,"command":"routes list","policy":{"schema":"kxm.routes.v2","updatedAt":"2026-09-24T00:00:00.000Z","admitted":["anthropic/fable","google/gemini-3.8-flash-high","google/gemini-3.8-flash-medium","openai/gpt-5.6-sol","openrouter/qwen/qwen3-coder-plus","openrouter/qwen/qwen3.8-flash","openrouter/z-ai/glm-5.3-flash","qwen-token-plan/deepseek-v4.1-flash","qwen-token-plan/qwen3.8-flash","qwen-token-plan/qwen3.8-max","xai/grok-4.7","zai-coding-cn/glm-5.3","zai-coding-cn/glm-5.3-flash"],"disabled":[]},"membership":["planner fable-claude","reviewer-arch fable-claude","reviewer-cli sol-codex","writer grok-native","writer qwen-openrouter-pi","writer gemini-agy"]}
1104
+ {"schema":"kxm.cli-result.v1","ok":true,"command":"routes list","policy":{"schema":"kxm.routes.v2","updatedAt":"2026-09-27T00:00:00.000Z","admitted":["anthropic/fable","google/gemini-3.8-flash-high","google/gemini-3.8-flash-medium","openai/gpt-5.6-sol","openrouter/qwen/qwen3-coder-plus","openrouter/qwen/qwen3.8-flash","openrouter/z-ai/glm-5.3-flash","xai/grok-4.7"],"disabled":[]},"membership":["planner claude-fable","planner pi-qwen3-8-flash-openrouter","reviewer-arch claude-fable","reviewer-arch pi-glm-5-3-flash-openrouter","reviewer-cli codex-gpt-5-6-sol","reviewer-cli pi-qwen3-8-flash-openrouter","writer grok-grok-4-7","writer pi-qwen3-coder-plus-openrouter","writer agy-gemini-3-8-flash-high","writer agy-gemini-3-8-flash-medium"]}
1106
1105
  ```
1107
1106
 
1108
1107
  ### `kxm routes count`
@@ -1247,10 +1246,10 @@ kxm role add demo-role --description "Demo role" --dry-run --json
1247
1246
  {"schema":"kxm.cli-result.v1","ok":true,"command":"role add","roleId":"demo-role","id":"demo-role","filePath":"/work/proj/.kxm/roles/demo-role.yaml","scope":"local","dryRun":true,"planned":[{"action":"write","target":"/work/proj/.kxm/roles/demo-role.yaml"}]}
1248
1247
  ```
1249
1248
 
1250
- Add a reviewer whose primary route is `fable-claude`, with `grok-native` second (Not run):
1249
+ Add a reviewer whose primary route is `claude-fable`, with `grok-grok-4-7` second (Not run):
1251
1250
 
1252
1251
  ```bash
1253
- kxm role add reviewer --description "Independent reviewer" --route fable-claude --route grok-native --skills kxm
1252
+ kxm role add reviewer --description "Independent reviewer" --route claude-fable --route grok-grok-4-7 --skills kxm
1254
1253
  ```
1255
1254
 
1256
1255
  ```bash
@@ -1307,7 +1306,7 @@ kxm role get writer --json
1307
1306
  ```
1308
1307
 
1309
1308
  ```text
1310
- {"schema":"kxm.cli-result.v1","ok":true,"command":"role get","roleId":"writer","scope":"local","filePath":"/work/kxm/.kxm/roles/writer.yaml","role":{"schema":"kxm.role.v2","id":"writer","purpose":"writer","permission":"edit","description":"Primary implementation agent.","skills":[],"roster":[{"route":"grok-native","effort":"medium"},{"route":"qwen-openrouter-pi","effort":"medium"},{"route":"gemini-agy"}]}}
1309
+ {"schema":"kxm.cli-result.v1","ok":true,"command":"role get","roleId":"writer","scope":"local","filePath":"/work/kxm/.kxm/roles/writer.yaml","role":{"schema":"kxm.role.v2","id":"writer","purpose":"writer","permission":"edit","description":"Primary implementation agent.","skills":[],"roster":[{"route":"grok-grok-4-7","effort":"medium"},{"route":"pi-qwen3-coder-plus-openrouter","effort":"medium"},{"route":"agy-gemini-3-8-flash-high"},{"route":"agy-gemini-3-8-flash-medium"}]}}
1311
1310
  ```
1312
1311
 
1313
1312
  Captured from this checkout with `node scripts/kxm.mjs role get writer --json`. The path is shortened to `/work/kxm`.
@@ -1317,13 +1316,13 @@ kxm role modify writer --add-skill kxm --dry-run --json
1317
1316
  ```
1318
1317
 
1319
1318
  ```text
1320
- {"schema":"kxm.cli-result.v1","ok":true,"command":"role modify","roleId":"writer","id":"writer","role":{"schema":"kxm.role.v2","id":"writer","purpose":"writer","permission":"edit","description":"Primary implementation agent.","skills":["kxm"],"roster":[{"route":"grok-native","effort":"medium"},{"route":"qwen-openrouter-pi","effort":"medium"},{"route":"gemini-agy"}]},"filePath":"/work/kxm/.kxm/roles/writer.yaml","scope":"local","dryRun":true,"planned":[{"action":"write","target":"/work/kxm/.kxm/roles/writer.yaml"}]}
1319
+ {"schema":"kxm.cli-result.v1","ok":true,"command":"role modify","roleId":"writer","id":"writer","role":{"schema":"kxm.role.v2","id":"writer","purpose":"writer","permission":"edit","description":"Primary implementation agent.","skills":["kxm"],"roster":[{"route":"grok-grok-4-7","effort":"medium"},{"route":"pi-qwen3-coder-plus-openrouter","effort":"medium"},{"route":"agy-gemini-3-8-flash-high"},{"route":"agy-gemini-3-8-flash-medium"}]},"filePath":"/work/kxm/.kxm/roles/writer.yaml","scope":"local","dryRun":true,"planned":[{"action":"write","target":"/work/kxm/.kxm/roles/writer.yaml"}]}
1321
1320
  ```
1322
1321
 
1323
1322
  Add an existing route to a role's roster (Not run):
1324
1323
 
1325
1324
  ```bash
1326
- kxm role modify reviewer --add-route fable-claude --add-skill kxm-peer
1325
+ kxm role modify reviewer --add-route claude-fable --add-skill kxm-peer
1327
1326
  ```
1328
1327
 
1329
1328
  ### `kxm role resume`
@@ -1411,7 +1410,7 @@ Refusals (exit 1): `lane_missing`, `lane_dirty`, `lane_run_open`, `lane_git_fail
1411
1410
 
1412
1411
  Creates the lane when the record is absent (same rules as `create`), refuses `lane_run_open` when the last run is not settled, then runs the same path as `kxm run --lane <unit> --brief <file>` and `kxm runs drive <runId> --lane <unit>`. `--wait` and `--timeout-ms` are passed through. The run id is stored on the record. Prints the run envelope and the drive result. That open-run check may start the Runtime supervisor; `--dry-run` only attaches to a supervisor that is already running. `kxm lane status` never starts the supervisor.
1413
1412
 
1414
- `--brief` is required. `--workflow` defaults to the lane project's `defaultWorkflow`. `--base` applies only when the lane is created. A live agent step uses the step `timeoutMs` when it is set, otherwise the project `limits.agentStepTimeoutMs` (default 3,600,000). This repository's `implement-only`, `review-arch-only`, and `review-cli-only` workflows are the lane forms of the retired transport recipes.
1413
+ `--brief` is required. `--workflow` defaults to the lane project's `defaultWorkflow`. `--base` applies only when the lane is created. A live agent step uses the step `timeoutMs` when it is set, otherwise the project `limits.agentStepTimeoutMs` (default 3,600,000). This repository's `writer-only`, `reviewer-arch-only`, and `reviewer-cli-only` workflows are the lane forms of the retired transport recipes. `implement-only`, `review-arch-only`, and `review-cli-only` still resolve.
1415
1414
 
1416
1415
  Refusals (exit 1): `brief_unreadable`, `lane_unit_invalid`, `lane_exists`, `lane_base_unresolved`, `lane_run_open`, `lane_git_failed`, `lane_not_project`, `lanes_unreadable`.
1417
1416