@kontextmind/kxm 0.7.130 → 0.7.131
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/.claude-plugin/marketplace.json +1 -1
- package/.kxm/README.md +4 -1
- package/.kxm/agents/coordinator.yaml +1 -0
- package/.kxm/agents/critic-arch.yaml +1 -4
- package/.kxm/agents/critic-cli.yaml +1 -4
- package/.kxm/agents/implementer.yaml +1 -4
- package/.kxm/workflows/implement-only.yaml +1 -1
- package/.kxm/workflows/review-arch-only.yaml +1 -1
- package/.kxm/workflows/review-cli-only.yaml +1 -1
- package/CHANGELOG.md +22 -1
- package/docs/concepts/architecture.md +1 -1
- package/docs/contracts/routing.md +3 -3
- package/docs/contributing/assignment-runner.md +14 -15
- package/docs/contributing/development.md +19 -5
- package/docs/contributing/harness-routing-internals.md +8 -8
- package/docs/glossary.md +1 -1
- package/docs/guides/agent-skills.md +1 -1
- package/docs/operations/backup-and-restore.md +4 -4
- package/docs/reference/cli-reference.md +26 -8
- package/docs/reference/config-reference.md +76 -153
- package/docs/reference/harness-routing.md +29 -21
- package/docs/reference/workflow-catalog.md +4 -4
- package/docs/start/first-workflow.md +1 -1
- package/examples/project/.kxm/agents/coordinator.yaml +1 -2
- package/examples/project/.kxm/agents/critic-1.yaml +1 -3
- package/examples/project/.kxm/agents/critic-2.yaml +1 -2
- package/examples/project/.kxm/agents/critic-3.yaml +2 -3
- package/examples/project/.kxm/agents/implementer.yaml +1 -2
- package/examples/project/.kxm/agents/planner.yaml +1 -2
- package/examples/project/.kxm/agents/reproducer.yaml +1 -2
- package/examples/project/.kxm/agents/reviewer.yaml +1 -2
- package/examples/project/.kxm/workflows/fix.yaml +0 -12
- package/package.json +1 -1
- package/plugins/kxm/.claude-plugin/plugin.json +1 -1
- package/plugins/kxm/dist/cli.js +287 -249
- package/plugins/kxm/dist/mcp-server.js +1 -1
- package/plugins/kxm/dist/runtime-supervisor.js +222 -242
- package/plugins/kxm/dist/runtime.js +224 -244
- package/plugins/kxm/package.json +1 -1
- package/plugins/kxm/skills/kxm/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-definitions/SKILL.md +8 -0
- package/plugins/kxm/src/cli/project.ts +4 -4
- package/plugins/kxm/src/engine.ts +168 -163
- package/plugins/kxm/src/init-guide-setup.ts +75 -15
- package/plugins/kxm/src/mcp-server.ts +1 -1
- package/plugins/kxm/src/oneshot-producer.ts +3 -15
- package/plugins/kxm/src/project-config.ts +83 -70
- package/plugins/kxm/src/routes.ts +26 -18
- package/plugins/kxm/src/runtime-supervisor.ts +0 -18
- package/plugins/kxm/src/suggest.ts +2 -2
- package/plugins/kxm/src/template.ts +2 -14
- package/schemas/agent.schema.json +8 -0
- package/scripts/roster-policy.d.mts +2 -1
- package/scripts/roster-policy.mjs +119 -22
package/.kxm/README.md
CHANGED
|
@@ -15,7 +15,6 @@ a `default` workflow, `gates.yaml` and `template-provenance.yaml`.
|
|
|
15
15
|
| `agents/`, `models/`, `workflows/` | Agents, model profiles and workflows, one YAML file each | Tracked |
|
|
16
16
|
| `gates.yaml` | The executable gate registry | Tracked |
|
|
17
17
|
| `roles/`, `routes.yaml`, `prices.yaml` | Role rosters, admitted model routes, dated list prices | Tracked |
|
|
18
|
-
| `roster.yaml` | The developer assignment roster for this repository | Tracked, and must be committed |
|
|
19
18
|
| `template-provenance.yaml` | Hashes of the template `kxm init` used | Tracked |
|
|
20
19
|
| `models/inventory.yaml` | The discovered model catalog | Generated; track it for a reviewed snapshot |
|
|
21
20
|
| `config.yaml` | Shared personalization settings | Tracked if the project shares them |
|
|
@@ -26,6 +25,10 @@ a `default` workflow, `gates.yaml` and `template-provenance.yaml`.
|
|
|
26
25
|
| `state/` | The hub database `kxm.db`, Pi sessions and restart state | Ignored |
|
|
27
26
|
| `run/` | SSH control sockets from `kxm ssh` | Ignored |
|
|
28
27
|
|
|
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`.
|
|
31
|
+
|
|
29
32
|
The [configuration reference](../docs/reference/config-reference.md#workspace-layout-tracked-ignored-and-state)
|
|
30
33
|
describes every file, the ignore rules to add, and the state KXM keeps outside
|
|
31
34
|
the project.
|
package/CHANGELOG.md
CHANGED
|
@@ -138,6 +138,17 @@ All notable user-facing changes are documented here. The project follows [Semant
|
|
|
138
138
|
|
|
139
139
|
### Changed
|
|
140
140
|
|
|
141
|
+
- **Dispatch reads role and model files, and agents bind a role.**
|
|
142
|
+
`scripts/roster-policy.mjs` builds the developer policy from
|
|
143
|
+
`.kxm/models/*.yaml` and `.kxm/roles/*.yaml` at `refs/remotes/origin/main`.
|
|
144
|
+
The engine resolves harness, model, and effort from the agent's `role`
|
|
145
|
+
and that role's roster. A step `model` does not override that route.
|
|
146
|
+
`kxm routes` prints `policy` (`admitted`, `disabled`) and `membership`
|
|
147
|
+
from the role files. `.kxm/routes.yaml` keeps admitted and disabled
|
|
148
|
+
selectors. `reviewer-arch` resolves to `fable-claude`. `opus-claude` is
|
|
149
|
+
admitted and named by no roster, so it is absent from `routes` and the
|
|
150
|
+
lineups. `gemini-agy` is in the writer lineup. An agent `tools.preset`
|
|
151
|
+
may only narrow its role preset; that rule is recorded and enforced in P3.
|
|
141
152
|
- **Role and model files are live `kxm.role.v2` and `kxm.model.v2`.**
|
|
142
153
|
`schemas/role.schema.json` and `schemas/model.schema.json` are the files
|
|
143
154
|
`kxm config` validates. Each admitted roster route is a
|
|
@@ -153,7 +164,9 @@ All notable user-facing changes are documented here. The project follows [Semant
|
|
|
153
164
|
in the developer ceilings or the harness inventory can dispatch them:
|
|
154
165
|
`zai-coding-cn/glm-5.3-flash`, `qwen-token-plan/qwen3.8-flash`,
|
|
155
166
|
`qwen-token-plan/qwen3.8-max`, and `zai-coding-cn/glm-5.3`.
|
|
156
|
-
Dispatch
|
|
167
|
+
Dispatch resolves harness, provider, model, and effort from the role roster.
|
|
168
|
+
A live request with no harness is refused. A roster entry with no effort
|
|
169
|
+
leaves thinking unset.
|
|
157
170
|
|
|
158
171
|
- **Usage errors under `--json` print a `usage_error` envelope and exit 2.**
|
|
159
172
|
A missing required option, unknown command, or other Commander usage error
|
|
@@ -418,6 +431,14 @@ All notable user-facing changes are documented here. The project follows [Semant
|
|
|
418
431
|
|
|
419
432
|
### Removed
|
|
420
433
|
|
|
434
|
+
- **The developer roster file and the transport just recipes.**
|
|
435
|
+
The single roster document and the `impl`, `plan`, `review-arch`,
|
|
436
|
+
`review-cli`, `impl-bg`, and `dispatch` recipes are gone. One-step
|
|
437
|
+
workflows are the transport: `kxm lane run <unit> --brief <file> --workflow implement-only`,
|
|
438
|
+
and the same command with `review-arch-only` or `review-cli-only`.
|
|
439
|
+
Transfer policy from `.kxm/roster.yaml` to the role and model files and
|
|
440
|
+
delete the retired roster before running KXM. KXM refuses a leftover
|
|
441
|
+
`.kxm/roster.yaml`.
|
|
421
442
|
- **`.kxm/template-provenance.yaml` was removed from this project, a repository
|
|
422
443
|
change rather than a product change,** because the installed kxm no longer
|
|
423
444
|
recognizes its recorded revision and a project without the file validates as
|
|
@@ -211,7 +211,7 @@ The package ships a directory of `SKILL.md` suites that Pi and Claude Code both
|
|
|
211
211
|
Project behavior lives in Git under `.kxm/`: `project.yaml`, `agents/`, `models/`, `workflows/`, `gates.yaml`, `roles/`, `routes.yaml`, `memory/`, and `skills/`. The project bundle (`project.yaml`, `agents/`, `models/`, `workflows/`, and `gates.yaml`) is restricted YAML checked against a JSON Schema. `routes.yaml`, `roles/`, and the front matter in `memory/` and `skills/` are parsed as ordinary YAML with their own checks, and a live drive re-reads an agent file the same way to resolve its route. Git review is the activation boundary:
|
|
212
212
|
|
|
213
213
|
- Every run pins revision hashes of the project bundle, memory, executor policy, and tool policy. An edit affects only later runs, and a run whose pinned revisions drift is refused.
|
|
214
|
-
- `kxm trust diff` prints a structured permission diff against a base revision (default `HEAD`). `kxm trust check` exits non-zero when the change expands permissions. Neither covers `routes.yaml`, `roles/`, `
|
|
214
|
+
- `kxm trust diff` prints a structured permission diff against a base revision (default `HEAD`). `kxm trust check` exits non-zero when the change expands permissions. Neither covers `routes.yaml`, `roles/`, `the role files`, or `prices.yaml`, so admitting a route is not flagged.
|
|
215
215
|
- Legacy `.kxm/config/*.json` files are refused, never converted.
|
|
216
216
|
|
|
217
217
|
Webhook workflow definitions are separate JSON that the hub loads at start, with secrets named by environment variable. Personal settings merge built-in defaults, then `~/.config/kxm/config.yaml`, then the project's `.kxm/config.yaml`. See the [configuration file reference](../reference/config-reference.md) and [Configuration](../reference/configuration.md).
|
|
@@ -130,11 +130,11 @@ just accept /abs/task-dir <commit> /abs/writer-record /abs/arch-review /abs/cli-
|
|
|
130
130
|
# optional observed PR/CI (direct script; the five-argument just recipe cannot forward them):
|
|
131
131
|
# node scripts/assignment-run.mjs accept --task-dir /abs/task --commit <sha> --record-dir /abs/writer --critic /abs/arch --critic /abs/cli [--observed-pr <id>] [--observed-ci <id>]
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
kxm assign plan-current --task-dir /abs/task-dir --plan /abs/plan.md --sha256 <sha256> --base-commit <base-commit> --expected-generation <expected-generation>
|
|
134
134
|
just change-report /abs/task-dir
|
|
135
135
|
```
|
|
136
136
|
|
|
137
|
-
`
|
|
137
|
+
`kxm lane run` remain harness transport. They do not
|
|
138
138
|
create assignment identity, witness receipts, or `accepted.json`.
|
|
139
139
|
|
|
140
140
|
Distinctions the report and docs must keep:
|
|
@@ -161,7 +161,7 @@ learned policy and not a catalog feed. Phase 9 may use this report to
|
|
|
161
161
|
Per-candidate acceptance requires an actual native writer, the fixed witness,
|
|
162
162
|
and both designated native reviews. PR/CI/merge complete issue 127. This
|
|
163
163
|
document does not assert those gates have passed. Low-level
|
|
164
|
-
`
|
|
164
|
+
`kxm lane run` recipes remain harness transport.
|
|
165
165
|
|
|
166
166
|
## Implemented: v2 record
|
|
167
167
|
|
|
@@ -16,24 +16,25 @@ a KXM product feature.
|
|
|
16
16
|
## Before you begin
|
|
17
17
|
|
|
18
18
|
- A clean control checkout of this repository whose `HEAD` is an ancestor of
|
|
19
|
-
`origin/main`. The runner loads `.kxm/
|
|
19
|
+
`origin/main`. The runner loads `.kxm/roles/*.yaml` and `.kxm/models/*.yaml`
|
|
20
|
+
only from there.
|
|
20
21
|
- A separate worktree for the writer. `kxm lane create <unit>` creates one from
|
|
21
22
|
`origin/main`.
|
|
22
23
|
- The harness CLIs the roster admits, installed and logged in.
|
|
23
24
|
`node scripts/kxm.mjs harness list` shows which are. The loop below is
|
|
24
|
-
`kxm assign`. `
|
|
25
|
+
`kxm assign`. Transport is `kxm lane run <unit> --brief <file> --workflow implement-only`,
|
|
26
|
+
or the same command with `review-arch-only` or `review-cli-only`.
|
|
25
27
|
- A task directory whose final path segment equals the task ID. Every path you
|
|
26
28
|
pass to the runner must be absolute.
|
|
27
29
|
|
|
28
30
|
## Roles and routes
|
|
29
31
|
|
|
30
|
-
The trusted roster policy in
|
|
31
|
-
|
|
32
|
-
permissions:
|
|
32
|
+
The trusted roster policy in `.kxm/roles/*.yaml` and `.kxm/models/*.yaml`
|
|
33
|
+
admits each route for specific roles and permissions:
|
|
33
34
|
|
|
34
35
|
| Role | Admitted route (harness / model) | Vendor | Permission |
|
|
35
36
|
|---|---|---|---|
|
|
36
|
-
| `writer` | `grok` / `grok-4.7`; relief: `pi` / `openrouter/qwen/qwen3-coder-plus` | `xai`; `alibaba` | `edit` |
|
|
37
|
+
| `writer` | `grok` / `grok-4.7`; relief: `pi` / `openrouter/qwen/qwen3-coder-plus`; `agy` / `gemini-3.8-flash-high` | `xai`; `alibaba`; `google` | `edit` |
|
|
37
38
|
| `planner` | `claude` / `fable` | `anthropic` | `read-only` |
|
|
38
39
|
| `reviewer-arch` | `claude` / `fable` | `anthropic` | `read-only` |
|
|
39
40
|
| `reviewer-cli` | `codex` / `gpt-5.6-sol` | `openai` | `read-only` |
|
|
@@ -85,7 +86,7 @@ Use this slim loop for daily work and for docs. The 13-step `fix` workflow in
|
|
|
85
86
|
> runner validates anything. The process environment is passed through as it
|
|
86
87
|
> is. Export any variable you need before the command.
|
|
87
88
|
|
|
88
|
-
|
|
89
|
+
Transport is `kxm lane run <unit> --brief <file> --workflow implement-only`, or the same command with `review-arch-only` or `review-cli-only`. The transport recipes are deleted.
|
|
89
90
|
|
|
90
91
|
### 1. Pin the current plan
|
|
91
92
|
|
|
@@ -314,17 +315,15 @@ It writes `recording-resolved.json` in the record directory. It never changes
|
|
|
314
315
|
## Transport-only recipes
|
|
315
316
|
|
|
316
317
|
Drive a one-step workflow in a lane. Each command writes a drive receipt and
|
|
317
|
-
the checkout fingerprint.
|
|
318
|
-
`just review-cli`, and `just impl-bg` are retired in favor of these. The
|
|
319
|
-
recipes stay in the justfile until one real unit has been driven this way.
|
|
318
|
+
the checkout fingerprint.
|
|
320
319
|
|
|
321
320
|
```bash
|
|
322
|
-
kxm lane run <unit> --workflow implement-only
|
|
323
|
-
kxm lane run <unit> --workflow review-arch-only
|
|
324
|
-
kxm lane run <unit> --workflow review-cli-only
|
|
321
|
+
kxm lane run <unit> --brief <file> --workflow implement-only
|
|
322
|
+
kxm lane run <unit> --brief <file> --workflow review-arch-only
|
|
323
|
+
kxm lane run <unit> --brief <file> --workflow review-cli-only
|
|
325
324
|
```
|
|
326
325
|
|
|
327
|
-
`
|
|
326
|
+
`scripts/harness-run.mjs` still accepts one `kxm.harness-request.v1` envelope through
|
|
328
327
|
`scripts/harness-run.mjs` and prints a `kxm.harness-result.v2` envelope. It
|
|
329
328
|
mints no assignment, witness or acceptance proof, so its output cannot be
|
|
330
329
|
accepted. The retired recipes did the same.
|
|
@@ -430,4 +429,4 @@ gate-only workflows are supported. See the
|
|
|
430
429
|
- [Develop KXM](development.md): the commit gate the witness runs
|
|
431
430
|
- [CI and release](ci-and-release.md): what runs after you push
|
|
432
431
|
- [Harness routing](../reference/harness-routing.md): harness and model pairing
|
|
433
|
-
- [Configuration reference](../reference/config-reference.md#
|
|
432
|
+
- [Configuration reference](../reference/config-reference.md#developer-assignment-policy): the developer assignment policy
|
|
@@ -13,8 +13,16 @@ extension, the Claude Code plugin, or the bundled skills.
|
|
|
13
13
|
- Optional tools, needed only for the matching task:
|
|
14
14
|
- [Pi](https://pi.dev) to load the extension from source.
|
|
15
15
|
- The Claude Code CLI to validate the plugin manifests locally.
|
|
16
|
-
- [`just`](https://github.com/casey/just) for the
|
|
17
|
-
[assignment runner](assignment-runner.md)
|
|
16
|
+
- [`just`](https://github.com/casey/just) for the remaining
|
|
17
|
+
[assignment runner](assignment-runner.md) recipes only:
|
|
18
|
+
`assign`, `witness`, `accept`, `observe-cost`, `attribute`,
|
|
19
|
+
`change-report`, and `plan-current`. Those recipes are harness
|
|
20
|
+
transport for the issue 127 runner. They are not how a unit is
|
|
21
|
+
dispatched. Do not rename or delete them.
|
|
22
|
+
- `kxm lane run` to dispatch a unit. A writer unit uses
|
|
23
|
+
`kxm lane run <unit> --brief <file> --workflow implement-only`.
|
|
24
|
+
The read-only critic workflows on the same command are
|
|
25
|
+
`review-arch-only` and `review-cli-only`.
|
|
18
26
|
- Docker for the clean-container install smoke.
|
|
19
27
|
|
|
20
28
|
## Set up a checkout
|
|
@@ -116,7 +124,7 @@ excluded from the npm package.
|
|
|
116
124
|
├── .github/ CI, release, issue and PR templates (not shipped)
|
|
117
125
|
├── .claude/ Developer harness notes and commands (not shipped)
|
|
118
126
|
├── plans/ Internal planning and tracking (not shipped)
|
|
119
|
-
├── justfile
|
|
127
|
+
├── justfile Remaining issue 127 recipes (assign, witness, accept, observe-cost, attribute, change-report, plan-current)
|
|
120
128
|
└── AGENTS.md, CLAUDE.md, GEMINI.md Agent instructions with generated blocks
|
|
121
129
|
```
|
|
122
130
|
|
|
@@ -196,8 +204,14 @@ For what each skill covers, see [Agent skills](../guides/agent-skills.md).
|
|
|
196
204
|
8. Push and open a pull request. The template asks for the slice issue and the
|
|
197
205
|
`npm run verify` result.
|
|
198
206
|
|
|
199
|
-
Maintainers who delegate
|
|
200
|
-
|
|
207
|
+
Maintainers who delegate a unit dispatch it with
|
|
208
|
+
`kxm lane run <unit> --brief <file> --workflow implement-only`.
|
|
209
|
+
Read-only critics use the same command with `review-arch-only` or
|
|
210
|
+
`review-cli-only`. The [assignment runner](assignment-runner.md)
|
|
211
|
+
recipes (`assign`, `witness`, `accept`, `observe-cost`, `attribute`,
|
|
212
|
+
`change-report`, `plan-current`) stay on `just`. They are harness
|
|
213
|
+
transport for the issue 127 runner, not the unit transport, and they
|
|
214
|
+
cover steps 2 to 7 after a lane run.
|
|
201
215
|
|
|
202
216
|
## Generated artifacts
|
|
203
217
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This page records how the KXM repository applies [harness routing](../reference/harness-routing.md) to its own work: the routes this checkout admits, its writer roster, its price catalog, and the developer roster policy that `just assign` and the dev helper enforce. It is maintainer material. The snapshots were captured on 2026-09-23 on one operator machine, from a source checkout where `node scripts/kxm.mjs` is the same program as `kxm`; they change whenever an admission changes.
|
|
4
4
|
|
|
5
5
|
> [!IMPORTANT]
|
|
6
|
-
> The files are the authority, not this page: `.kxm/routes.yaml`, `.kxm/roles
|
|
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
8
|
## This checkout's routes and roster
|
|
9
9
|
|
|
@@ -59,9 +59,9 @@ On the capture machine, `kxm harness list` showed `claude` detected but logged o
|
|
|
59
59
|
|
|
60
60
|
`.kxm/prices.yaml` is dated `2026-09-16`, so every current run records `providerMetadata.priceCatalogStale: true` and no list estimate. The list prices below come from `.kxm/models/inventory.yaml`, fetched `2026-09-16T14:54:53Z`, in USD per 1M tokens. The checkout has no routing records yet, so none of the examples has recorded latency; for latency, run a bounded side-by-side experiment and compare p50 and p95 in `kxm routing report`.
|
|
61
61
|
|
|
62
|
-
## The developer roster
|
|
62
|
+
## The developer roster
|
|
63
63
|
|
|
64
|
-
The issue-127 runner (`
|
|
64
|
+
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
65
|
|
|
66
66
|
```yaml
|
|
67
67
|
grok-native:
|
|
@@ -100,7 +100,7 @@ The product brake, the dev helper and the roster policy now agree on the vendor
|
|
|
100
100
|
|
|
101
101
|
## Worked examples on this checkout
|
|
102
102
|
|
|
103
|
-
These extend the generic examples on the reference page with this checkout's admissions, developer
|
|
103
|
+
These extend the generic examples on the reference page with this checkout's admissions, developer policy routes, readiness on the capture machine, and inventory prices.
|
|
104
104
|
|
|
105
105
|
### Grok 4.6
|
|
106
106
|
|
|
@@ -174,19 +174,19 @@ The developer runner is stricter. Its only Pi writer is `openrouter/qwen/qwen3-c
|
|
|
174
174
|
|
|
175
175
|
| Symptom | Cause | Fix |
|
|
176
176
|
|---|---|---|
|
|
177
|
-
| `pi brake: xai has a native harness; refusing Pi impersonation` | A dev-helper request routed a native vendor through Pi. | Use the native harness
|
|
178
|
-
| `Roster policy refused: native vendor cannot use Pi` | A `.kxm/
|
|
177
|
+
| `pi brake: xai has a native harness; refusing Pi impersonation` | A dev-helper request routed a native vendor through Pi. | Use the native harness through `kxm lane run <unit> --brief <file> --workflow review-arch-only`. |
|
|
178
|
+
| `Roster policy refused: native vendor cannot use Pi` | A Pi route in `.kxm/models/*.yaml` names a native vendor, as in `openrouter/x-ai/…` or `nous-portal/anthropic/…`. | Remove the route. Only a native harness route is valid for that vendor. |
|
|
179
179
|
| The dev helper refuses a codex route. | `codex` is logged in with an API key. | Run `codex login` with the ChatGPT flow. |
|
|
180
180
|
|
|
181
181
|
For example, the native writer recipe:
|
|
182
182
|
|
|
183
183
|
```bash
|
|
184
|
-
|
|
184
|
+
kxm lane run <unit> --brief <file> --workflow implement-only
|
|
185
185
|
```
|
|
186
186
|
|
|
187
187
|
## Related
|
|
188
188
|
|
|
189
189
|
- [Harness routing](../reference/harness-routing.md): the rules, the decision procedure and the generic examples
|
|
190
190
|
- [Assignment runner](assignment-runner.md): the loop that enforces the developer roster
|
|
191
|
-
- [Configuration file reference](../reference/config-reference.md#
|
|
191
|
+
- [Configuration file reference](../reference/config-reference.md#developer-assignment-policy): the developer assignment policy fields
|
|
192
192
|
- [Routing and cost telemetry contract](../contracts/routing.md): the routing record, cost basis and dev-helper telemetry
|
package/docs/glossary.md
CHANGED
|
@@ -423,7 +423,7 @@ A `kxm.role.v2` definition in `.kxm/roles/`, managed with `kxm role`, that descr
|
|
|
423
423
|
|
|
424
424
|
### Roster
|
|
425
425
|
|
|
426
|
-
A list of allowed models. It means either a [role](#role)'s roster, or the developer roster `.kxm/
|
|
426
|
+
A list of allowed models. It means either a [role](#role)'s roster, or the developer roster in `.kxm/roles/*.yaml` and `.kxm/models/*.yaml` that the [assignment runner](contributing/assignment-runner.md) trusts to choose writers and critics. Neither one admits a route; see [admission](#admission).
|
|
427
427
|
|
|
428
428
|
### Route
|
|
429
429
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent skills
|
|
2
2
|
|
|
3
|
-
KXM ships a suite of Agent Skills that teach a coding agent how to use the `kxm` CLI and the `kxm_*` tools safely: which command owns a task, which verbs exist, and which steps belong to a person. This page is for anyone running KXM from Claude Code, Pi or Codex, and for contributors who edit the skills. Skills document the CLI; they grant no permission, admit no writer and replace no trusted `.kxm/
|
|
3
|
+
KXM ships a suite of Agent Skills that teach a coding agent how to use the `kxm` CLI and the `kxm_*` tools safely: which command owns a task, which verbs exist, and which steps belong to a person. This page is for anyone running KXM from Claude Code, Pi or Codex, and for contributors who edit the skills. Skills document the CLI; they grant no permission, admit no writer and replace no trusted policy in `.kxm/roles/*.yaml` and `.kxm/models/*.yaml`.
|
|
4
4
|
|
|
5
5
|
Governed skills that your own runs produce are a separate lifecycle; see [Governed skills](governed-skills.md).
|
|
6
6
|
|
|
@@ -15,7 +15,7 @@ KXM spreads state over six roots. Some of them move with environment variables,
|
|
|
15
15
|
```mermaid
|
|
16
16
|
flowchart TB
|
|
17
17
|
subgraph R["$R checkout root: the Git checkout, never moves"]
|
|
18
|
-
R1["Project definition: .kxm/project.yaml, config.yaml, agents/,
|
|
18
|
+
R1["Project definition: .kxm/project.yaml, config.yaml, agents/, workflows/, gates.yaml, .kxm/roles/, .kxm/models/, routes.yaml, prices.yaml, repo/, project/env.yaml"]
|
|
19
19
|
R2["Durable records: .kxm/memory/, skills/, goals/, tasks/, candidates/"]
|
|
20
20
|
end
|
|
21
21
|
subgraph D["$D workspace: KXM_WORKSPACE_DIR or --workspace, default $R/.kxm"]
|
|
@@ -31,7 +31,7 @@ flowchart TB
|
|
|
31
31
|
S2["hub-env.json, hub-binding.json, update.yaml, projects/HASH/repository-bindings.json"]
|
|
32
32
|
end
|
|
33
33
|
subgraph C["$C user config: KXM_USER_CONFIG_DIR, default ~/.config/kxm"]
|
|
34
|
-
C1["config.yaml,
|
|
34
|
+
C1["config.yaml, workflows/, session.token. Checkout routing lives in .kxm/roles/ and .kxm/models/"]
|
|
35
35
|
end
|
|
36
36
|
subgraph T["$T federated telemetry: XDG_CONFIG_HOME/kxm/telemetry"]
|
|
37
37
|
T1["model-metrics.jsonl, not written by any command today"]
|
|
@@ -71,13 +71,13 @@ The Runtime registry and the other projects' event stores are shared by every pr
|
|
|
71
71
|
| `$S/runtime/registry.db` | Runtime registry: projects, their roots and home Runtime, the supervisor identity and claim | Only with `--all-projects` (`registry`) |
|
|
72
72
|
| `$S/projects/<hash>/repository-bindings.json`, `$S/update.yaml` | Member repository paths; updater settings | No |
|
|
73
73
|
| `$S/hub-env.json`, `$S/hub-binding.json`, `$C/session.token` | Credentials and the machine's hub binding | No; prefer regenerating secrets to copying them |
|
|
74
|
-
| `$R/.kxm/` definition files and durable records | Project, roles
|
|
74
|
+
| `$R/.kxm/` definition files and durable records | Project, `.kxm/roles/`, `.kxm/models/`, routes, prices, memory, skills, goals, tasks, candidates | No; commit them to Git or copy the checkout |
|
|
75
75
|
| Each member repository's `.kxm/repo/*.yaml` | Member definition and environment | No; they live in the member's own checkout |
|
|
76
76
|
| `$W/worker-*.json`, `$W/pi-sessions/` | Worker routing and recovery manifests; Pi model history | No; manifests are required for resumable workers, Pi history is optional |
|
|
77
77
|
| `$D/assets/`, `$D/logs/` | Retrospectives and evidence; logs and local usage accounting (`telemetry.jsonl`) | No |
|
|
78
78
|
| `$C` | User-level roles, workflows and settings | No |
|
|
79
79
|
|
|
80
|
-
A restore without
|
|
80
|
+
A restore without `.kxm/roles/`, `.kxm/models/`, `routes.yaml`, or `prices.yaml` comes back healthy but with different admission and cost behavior, so treat them as part of the backup even though they are plain files. `kxm improve report --out-dir` can write candidates outside `$R/.kxm/candidates/`; include that directory if you use it.
|
|
81
81
|
|
|
82
82
|
These files are disposable and need no backup: `hub.pid`, `hub.stop`, `worker-*.pid`, `session-brief.json`, `update-check.json`, `runtime/supervisor.token`, `runtime/supervisor.error`.
|
|
83
83
|
|
|
@@ -177,7 +177,7 @@ kxm init [--name <name>] [--project-id <id>] [--repository <id=absolute-path>]..
|
|
|
177
177
|
|
|
178
178
|
Creates, validates, repairs, resumes, or joins a KXM project at the Git root that contains the current directory. A new project gets a minimal configuration: one coordinator agent, one implementer agent, a `test` command gate, and a `default` plan-implement-verify workflow. An existing project is validated without rewriting. Conflict-free template updates to non-authority fields are applied; authority changes, overlapping edits, and provenance-free or legacy state stay planning-only. `init` does not start a hub or the Runtime.
|
|
179
179
|
|
|
180
|
-
The starter `defaultHarness: pi` and `npm test` gate are generic settings, not repository detection. Creation and create-planning output include `guidance`: for Claude, set `defaultHarness: claude` in `.kxm/project.yaml
|
|
180
|
+
The starter `defaultHarness: pi` and `npm test` gate are generic settings, not repository detection. Initialized agents bind roles. Harness, model, and effort are set in `.kxm/roles/*.yaml` and `.kxm/models/*.yaml`. Creation and create-planning output include `guidance`: for Claude, set `defaultHarness: claude` in `.kxm/project.yaml`; for .NET or other non-npm repositories, set `.kxm/gates.yaml` → `gates.test.argv` to the repository's actual test command. Preflight reports an actionable prerequisite for `npm test` without a readable `package.json` test script; `task run` refuses it before creating a run.
|
|
181
181
|
|
|
182
182
|
| Option | Argument | Default | Description |
|
|
183
183
|
|---|---|---|---|
|
|
@@ -393,7 +393,7 @@ kxm completion install --shell zsh --dry-run
|
|
|
393
393
|
|
|
394
394
|
Compares the authority-bearing fields of the project configuration against a base Git revision. The base is materialized into a temporary shadow with a sanitized environment; nothing in the project is written. Both subcommands refuse `--workspace` (exit 2) and need no hub.
|
|
395
395
|
|
|
396
|
-
The comparison covers the loaded bundle only: `project.yaml`, `agents/`, `models/`, `workflows/`, `gates.yaml`, `project/env.yaml`, and each member repository's `repo.yaml` and `env.yaml`. It does not read `routes.yaml`, `roles/`, `
|
|
396
|
+
The comparison covers the loaded bundle only: `project.yaml`, `agents/`, `models/`, `workflows/`, `gates.yaml`, `project/env.yaml`, and each member repository's `repo.yaml` and `env.yaml`. It does not read `routes.yaml`, `roles/`, `the role files`, or `prices.yaml`, so a new route admission, roster entry, developer policy route, or price change never counts as an expansion. Review those files by hand.
|
|
397
397
|
|
|
398
398
|
### `kxm trust diff`
|
|
399
399
|
|
|
@@ -1069,14 +1069,32 @@ 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
|
|
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`.
|
|
1073
1073
|
|
|
1074
1074
|
```bash
|
|
1075
1075
|
kxm routes list
|
|
1076
1076
|
```
|
|
1077
1077
|
|
|
1078
1078
|
```text
|
|
1079
|
-
|
|
1079
|
+
admitted anthropic/fable
|
|
1080
|
+
admitted google/gemini-3.8-flash-high
|
|
1081
|
+
admitted google/gemini-3.8-flash-medium
|
|
1082
|
+
admitted openai/gpt-5.6-sol
|
|
1083
|
+
admitted openrouter/qwen/qwen3-coder-plus
|
|
1084
|
+
admitted openrouter/qwen/qwen3.8-flash
|
|
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
|
+
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
|
|
1080
1098
|
```
|
|
1081
1099
|
|
|
1082
1100
|
```bash
|
|
@@ -1084,7 +1102,7 @@ kxm routes list --json
|
|
|
1084
1102
|
```
|
|
1085
1103
|
|
|
1086
1104
|
```text
|
|
1087
|
-
{"schema":"kxm.cli-result.v1","ok":true,"command":"routes list","policy":{"schema":"kxm.routes.v2","updatedAt":"2026-09-
|
|
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"]}
|
|
1088
1106
|
```
|
|
1089
1107
|
|
|
1090
1108
|
### `kxm routes count`
|
|
@@ -1217,7 +1235,7 @@ Adds a role definition. Without a role ID, or with `--pick`, local scope offers
|
|
|
1217
1235
|
|
|
1218
1236
|
- Writes `.kxm/roles/<id>.yaml` in local scope, or `<KXM_USER_CONFIG_DIR>/roles/<id>.yaml` in global scope. `--dry-run` plans the write and writes nothing.
|
|
1219
1237
|
- Each `--route` is checked the same way as `kxm role modify --add-route`. If `.kxm/models/<route-id>.yaml` is missing, the command exits 1 and writes `kxm: route '<route-id>' is not a file under .kxm/models/` to stderr. It does not write the role file, including under `--dry-run`. `--file` checks every `roster[].route` the same way before writing, in local scope and in global scope.
|
|
1220
|
-
- Local scope belongs to a KXM project: the file lands in the project root's `.kxm/roles/` from any subdirectory, and outside a project the command refuses with `project_not_found` and creates nothing. Before writing, the project loader checks the project with the new role in place of any file of that ID.
|
|
1238
|
+
- Local scope belongs to a KXM project: the file lands in the project root's `.kxm/roles/` from any subdirectory, and outside a project the command refuses with `project_not_found` and creates nothing. Before writing, the project loader checks the project with the new role in place of any file of that ID. Validation is the role file schema, and every roster route must exist under `.kxm/models/`. If the project would not load, the command refuses with `role_invalid`, lists each issue and writes nothing, also under `--dry-run`, and `--overwrite` replaces a role file the loader refuses. Global scope is not checked, because no loader reads it.
|
|
1221
1239
|
- Refusals exit 2 and honor `--json`: `project_not_found` and `role_invalid` (with `issues`, each `{phase, code, file, message}`). A missing `--route` file, and an existing role without `--overwrite`, exit 1 with a plain stderr line, also under `--dry-run` (`kxm: route '<route-id>' is not a file under .kxm/models/`, or `role add failed: role_already_exists: ...`).
|
|
1222
1240
|
- JSON keys: `roleId`, `id`, `filePath`, `scope`.
|
|
1223
1241
|
|
|
@@ -1671,7 +1689,7 @@ kxm runs status --dry-run refused: the Runtime supervisor is not running and --d
|
|
|
1671
1689
|
kxm runs drive <runId> [--simulated] [--wait] [--timeout-ms <n>] [--lane <unit>]
|
|
1672
1690
|
```
|
|
1673
1691
|
|
|
1674
|
-
Opens a drive of the run. With `--simulated`, a model-free producer reports every agent step as passed. Without `--simulated` the drive runs in live mode: each agent step invokes its harness through a one-shot producer, and the agent's model must be an admitted route (otherwise `producer_route_not_admitted`; there is no fallback model). A read-only step runs with the harness's read-only flags. A step with `write` access runs with an audited writer profile, which only `pi` and `grok` have; it must be a single assignment in a project whose `limits.maxConcurrentRuns` is 1, and
|
|
1692
|
+
Opens a drive of the run. With `--simulated`, a model-free producer reports every agent step as passed. Without `--simulated` the drive runs in live mode: each agent step invokes its harness through a one-shot producer, and the agent's model must be an admitted route (otherwise `producer_route_not_admitted`; there is no fallback model). A read-only step runs with the harness's read-only flags. A step with `write` access runs with an audited writer profile, which only `pi` and `grok` have; it must be a single assignment in a project whose `limits.maxConcurrentRuns` is 1, and its route must be on the writer roster in `.kxm/roles/writer.yaml`. Otherwise the drive hands the run off with `step_unsupported`. Around each live attempt the Runtime fingerprints the checkout with `git status` and `git diff`: a write step settles `passed` only when the checkout changed (routing metadata `authored: true`), and a read-only step that changed it settles `failed` (`authoringWitness: readonly_mutated`).
|
|
1675
1693
|
|
|
1676
1694
|
| Option | Argument | Default | Description |
|
|
1677
1695
|
|---|---|---|---|
|
|
@@ -2843,7 +2861,7 @@ Recommends a flat workflow ID backed by a shipped template, with category metada
|
|
|
2843
2861
|
|
|
2844
2862
|
- Explicit `Claude only`, `Claude-only`, or `only Claude Code` constraints exclude other harnesses. A missing, unauthenticated, or unsupported required harness produces `harness_unavailable`; KXM never silently substitutes Grok or Codex.
|
|
2845
2863
|
- A write workflow requires an audited writer profile for the selected harness. Only Pi and Grok currently have one; Claude-only bug fixes produce `live_write_unsupported` with direct-Claude implementation guidance, never a Grok substitution. No misleading create/drive command is emitted for an unsupported profile.
|
|
2846
|
-
- For supported work, every suggested agent binding uses the selected detected, authenticated, dispatch-ready harness. Configure its compatible admitted model, install the exact template, validate project configuration, then use the separate create/live-drive/status/receipt commands. Writers also require single-assignment/single-run admission, any configured developer
|
|
2864
|
+
- For supported work, every suggested agent binding uses the selected detected, authenticated, dispatch-ready harness. Configure its compatible admitted model, install the exact template, validate project configuration, then use the separate create/live-drive/status/receipt commands. Writers also require single-assignment/single-run admission, any configured developer policy writer approval, and the repository's actual verification gate. An already-present recommended workflow ID produces `workflow_already_exists`; KXM will not assume its agents or permissions match the template.
|
|
2847
2865
|
- Arguments: `<prompt...>`; no command-specific options. No hub needed. `--dry-run` skips native authentication probes to avoid their side effects and does not claim verified availability.
|
|
2848
2866
|
- JSON keys: `prompt`, `workflowId`, `template`, `area`, `confidence`, `reasons`, `suggestedSkills`, `roles` (an array of `{agent, harness, role}`), `suggestedCommand` (installation only), and `execution`. Supported execution includes `prerequisites`, `shell`, `createCommand`, `driveCommand`, `statusCommand`, and `receiptCommand`; refusal includes `error`, `reason`, and `nextSteps`, sets `ok: false`, and exits 1.
|
|
2849
2867
|
|