@kontextmind/kxm 0.7.125 → 0.7.127
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/roles/planner.yaml +6 -7
- package/.kxm/roles/reviewer-arch.yaml +6 -7
- package/.kxm/roles/reviewer-cli.yaml +6 -7
- package/.kxm/roles/writer.yaml +8 -17
- package/CHANGELOG.md +17 -0
- package/docs/README.md +2 -0
- package/docs/architecture/access.md +2 -4
- package/docs/architecture/inventory.md +4 -0
- package/docs/contracts/validation.md +1 -1
- package/docs/contributing/harness-routing-internals.md +1 -1
- package/docs/contributing/learnings.md +105 -0
- package/docs/contributing/operating-rules.md +107 -0
- package/docs/contributing/test-matrix.md +1 -1
- package/docs/glossary.md +1 -1
- package/docs/guides/agent-skills.md +1 -1
- package/docs/operations/backup-and-restore.md +2 -2
- package/docs/reference/cli-reference.md +31 -74
- package/docs/reference/config-reference.md +83 -118
- package/docs/reference/harness-routing.md +15 -8
- package/examples/project/.kxm/models/critic-claude.yaml +6 -2
- package/examples/project/.kxm/models/critic-gemini.yaml +6 -2
- package/examples/project/.kxm/models/critic-grok.yaml +6 -2
- package/examples/project/.kxm/models/implementation.yaml +6 -2
- package/examples/project/.kxm/models/primary.yaml +6 -2
- package/examples/project/.kxm/roles/planner.yaml +8 -0
- package/examples/project/.kxm/roles/reviewer-arch.yaml +8 -0
- package/examples/project/.kxm/roles/reviewer-cli.yaml +8 -0
- package/examples/project/.kxm/roles/writer.yaml +8 -0
- package/package.json +1 -1
- package/plugins/kxm/.claude-plugin/plugin.json +1 -1
- package/plugins/kxm/dist/cli.js +1759 -1306
- package/plugins/kxm/dist/mcp-server.js +1 -1
- package/plugins/kxm/dist/runtime-supervisor.js +994 -245
- package/plugins/kxm/dist/runtime.js +1018 -269
- package/plugins/kxm/dist/server.js +55 -1
- package/plugins/kxm/package.json +1 -1
- package/plugins/kxm/skills/kxm/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-definitions/SKILL.md +3 -7
- package/plugins/kxm/src/autocomplete.ts +1 -1
- package/plugins/kxm/src/cli/project.ts +7 -1
- package/plugins/kxm/src/cli/roles.ts +46 -150
- package/plugins/kxm/src/cli.ts +8 -22
- package/plugins/kxm/src/engine.ts +24 -1
- package/plugins/kxm/src/init-guide-setup.ts +38 -4
- package/plugins/kxm/src/mcp-server.ts +1 -1
- package/plugins/kxm/src/permission.ts +11 -0
- package/plugins/kxm/src/policy-draft.mjs +56 -16
- package/plugins/kxm/src/project-config.ts +121 -10
- package/plugins/kxm/src/repair.ts +1 -0
- package/plugins/kxm/src/role.ts +40 -440
- package/plugins/kxm/src/routes.ts +28 -5
- package/plugins/kxm/src/template.ts +34 -1
- package/schemas/README.md +2 -1
- package/schemas/model.schema.json +111 -13
- package/schemas/role.schema.json +61 -31
- package/schemas/policy-draft/README.md +0 -17
- package/schemas/policy-draft/model.v2.schema.json +0 -140
- package/schemas/policy-draft/role.v2.schema.json +0 -91
package/.kxm/roles/planner.yaml
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
schema: kxm.role.
|
|
1
|
+
schema: kxm.role.v2
|
|
2
2
|
id: planner
|
|
3
|
-
|
|
3
|
+
purpose: planner
|
|
4
|
+
permission: read-only
|
|
5
|
+
description: Plans the change before implementation.
|
|
6
|
+
# fable primary (proven planning).
|
|
4
7
|
roster:
|
|
5
|
-
-
|
|
8
|
+
- route: fable-claude
|
|
6
9
|
effort: medium
|
|
7
|
-
enabled: true
|
|
8
|
-
- model: qwen-token-plan/qwen3.8-max
|
|
9
|
-
effort: medium
|
|
10
|
-
enabled: true
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
schema: kxm.role.
|
|
1
|
+
schema: kxm.role.v2
|
|
2
2
|
id: reviewer-arch
|
|
3
|
-
|
|
3
|
+
purpose: reviewer-arch
|
|
4
|
+
permission: read-only
|
|
5
|
+
description: Independent architecture critic.
|
|
6
|
+
# fable is the required arch critic.
|
|
4
7
|
roster:
|
|
5
|
-
-
|
|
8
|
+
- route: fable-claude
|
|
6
9
|
effort: medium
|
|
7
|
-
enabled: true
|
|
8
|
-
- model: zai-coding-cn/glm-5.3
|
|
9
|
-
effort: medium
|
|
10
|
-
enabled: true
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
schema: kxm.role.
|
|
1
|
+
schema: kxm.role.v2
|
|
2
2
|
id: reviewer-cli
|
|
3
|
-
|
|
3
|
+
purpose: reviewer-cli
|
|
4
|
+
permission: read-only
|
|
5
|
+
description: Independent CLI and docs critic.
|
|
6
|
+
# sol is the required cli critic.
|
|
4
7
|
roster:
|
|
5
|
-
-
|
|
8
|
+
- route: sol-codex
|
|
6
9
|
effort: low
|
|
7
|
-
enabled: true
|
|
8
|
-
- model: zai-coding-cn/glm-5.3-flash
|
|
9
|
-
effort: low
|
|
10
|
-
enabled: true
|
package/.kxm/roles/writer.yaml
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
schema: kxm.role.
|
|
1
|
+
schema: kxm.role.v2
|
|
2
2
|
id: writer
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
#
|
|
3
|
+
purpose: writer
|
|
4
|
+
permission: edit
|
|
5
|
+
description: Primary implementation agent.
|
|
6
|
+
# Rotation priority = order. Effort default: medium for implementation.
|
|
7
7
|
roster:
|
|
8
|
-
-
|
|
8
|
+
- route: grok-native
|
|
9
9
|
effort: medium
|
|
10
|
-
|
|
11
|
-
- model: openrouter/qwen/qwen3-coder-plus
|
|
10
|
+
- route: qwen-openrouter-pi
|
|
12
11
|
effort: medium
|
|
13
|
-
|
|
14
|
-
- model: zai-coding-cn/glm-5.3-flash
|
|
15
|
-
effort: medium
|
|
16
|
-
enabled: true
|
|
17
|
-
- model: qwen-token-plan/qwen3.8-flash
|
|
18
|
-
effort: medium
|
|
19
|
-
enabled: true
|
|
20
|
-
- model: google/gemini-3.8-flash-high
|
|
21
|
-
enabled: true
|
|
12
|
+
- route: gemini-agy
|
package/CHANGELOG.md
CHANGED
|
@@ -138,6 +138,23 @@ All notable user-facing changes are documented here. The project follows [Semant
|
|
|
138
138
|
|
|
139
139
|
### Changed
|
|
140
140
|
|
|
141
|
+
- **Role and model files are live `kxm.role.v2` and `kxm.model.v2`.**
|
|
142
|
+
`schemas/role.schema.json` and `schemas/model.schema.json` are the files
|
|
143
|
+
`kxm config` validates. Each admitted roster route is a
|
|
144
|
+
`.kxm/models/<route-id>.yaml` (`harness`, `model`, `vendor`, `status`,
|
|
145
|
+
`permissions`, and `origin` when the route records one). Native routes may now carry an `origin` block; the validator's `origin_unexpected` refusal was removed. `kxm role modify`
|
|
146
|
+
takes `--add-route <route-id>` and `--remove-route <route-id>`. `kxm role add`
|
|
147
|
+
takes repeatable `--route <route-id>` (the first id is primary) instead of
|
|
148
|
+
`--harness` and `--model`. Adding a
|
|
149
|
+
route exits 1 when `.kxm/models/<route-id>.yaml` is missing
|
|
150
|
+
(`kxm: route '<route-id>' is not a file under .kxm/models/`).
|
|
151
|
+
The writer roster again includes `google/gemini-3.8-flash-high` as
|
|
152
|
+
`gemini-agy`. These selectors stayed off the v2 rosters because nothing
|
|
153
|
+
in the developer ceilings or the harness inventory can dispatch them:
|
|
154
|
+
`zai-coding-cn/glm-5.3-flash`, `qwen-token-plan/qwen3.8-flash`,
|
|
155
|
+
`qwen-token-plan/qwen3.8-max`, and `zai-coding-cn/glm-5.3`.
|
|
156
|
+
Dispatch still reads `.kxm/roster.yaml` until P2.
|
|
157
|
+
|
|
141
158
|
- **Usage errors under `--json` print a `usage_error` envelope and exit 2.**
|
|
142
159
|
A missing required option, unknown command, or other Commander usage error
|
|
143
160
|
writes `kxm.cli-result.v1` to stdout with `command`, `error`, and `detail`.
|
package/docs/README.md
CHANGED
|
@@ -114,6 +114,8 @@ KXM connects coding agents through a durable, authenticated [hub](glossary.md#hu
|
|
|
114
114
|
| [Packages and workspaces](contributing/packages.md) | Maintainers | Workspace layout, Nx targets, Bun task running and the layer gate |
|
|
115
115
|
| [KXM terminal components](contributing/tui-components.md) | Maintainers, integrators | The panel kit behind `kxm dash` |
|
|
116
116
|
| [Repository work delivery skill](contributing/repo-work-delivery.md) | Contributors | The repository-local skill for delivering a change |
|
|
117
|
+
| [Operating rules](contributing/operating-rules.md) | Agents, maintainers | The operator's standing instructions, dated, and where each is enforced |
|
|
118
|
+
| [Learnings](contributing/learnings.md) | Agents, maintainers | Durable lessons from running the writer, landing, and docs loops |
|
|
117
119
|
| [Artifact templates](templates/README.md) | Workflow authors | Document templates and where workflows use them |
|
|
118
120
|
|
|
119
121
|
The templates: [feature](templates/feature.md) · [bug fix](templates/bug-fix.md) · [ADR](templates/adr.md) · [architecture](templates/architecture.md) · [research](templates/research.md) · [review](templates/review.md) · [test plan](templates/test-plan.md) · [test report](templates/test-report.md) · [runbook](templates/runbook.md) · [postmortem](templates/postmortem.md) · [handoff](templates/handoff.md).
|
|
@@ -5,12 +5,10 @@ Read from `.kxm/roles/writer.yaml`, `.kxm/roles/planner.yaml`,
|
|
|
5
5
|
`plugins/kxm/src/role.ts`, `plugins/kxm/src/commands.ts`,
|
|
6
6
|
`plugins/kxm/src/harness.ts`, and `plugins/kxm/src/project-config.ts`.
|
|
7
7
|
|
|
8
|
-
The four principals in this checkout are the role files under `.kxm/roles
|
|
8
|
+
The four principals in this checkout are the v2 role files under `.kxm/roles/`:
|
|
9
|
+
`writer.yaml`, `planner.yaml`, `reviewer-arch.yaml`, and `reviewer-cli.yaml`.
|
|
9
10
|
None of those files sets `tools`. `listRoles` in `plugins/kxm/src/role.ts`
|
|
10
11
|
sets `toolsCount` from `tools.allow.length` and does not apply the list.
|
|
11
|
-
`DEFAULT_ROLES` in the same file carries preset names such as `author` and
|
|
12
|
-
`read_only`. Those defaults are not the files in `.kxm/roles/`, and those
|
|
13
|
-
preset strings are not the `BUILTIN_TOOL_PRESETS` list.
|
|
14
12
|
|
|
15
13
|
`isToolAllowed` in `plugins/kxm/src/commands.ts` enforces `preset: read-only`
|
|
16
14
|
by denying mutating `kxm_*` tools. `oneShotReadOnlyArgs` and
|
|
@@ -23,6 +23,10 @@ Read from `plugins/kxm/src/cli.ts`, `scripts/kxm-hub.mjs`, `plugins/kxm/src/hub.
|
|
|
23
23
|
| Workspace logs | `workspaceDirs` | `.kxm/logs`, or `KXM_LOGS_DIR` | log files | `plugins/kxm/src/cli/types.ts` |
|
|
24
24
|
| Workspace assets | `workspaceDirs` | `.kxm/assets`, or `KXM_ASSETS_DIR` | asset files | `plugins/kxm/src/cli/types.ts` |
|
|
25
25
|
| Workspace state | `workspaceDirs` | `.kxm/state`, or `KXM_STATE_DIR` | `kxm.db` when the hub uses this directory | `plugins/kxm/src/cli/types.ts` |
|
|
26
|
+
| Lane registry | `kxm lane create` | no listener | `lanes.json` under the workspace state dir | `plugins/kxm/src/cli/lanes.ts` |
|
|
27
|
+
| Landing | `kxm land` via `scripts/pr-land.mjs` | no listener | `land-release-context.json` and `land-phases-before.json` under `.kxm/logs` | `scripts/pr-land.mjs` |
|
|
28
|
+
| Assignment runner entry | `kxm assign <verb>` | no listener | none; the runner writes task records | `plugins/kxm/src/cli/assign.ts` |
|
|
29
|
+
| Docs site | `kxm docs serve` via `ops/docs-site/serve.py` | the tailnet IPv4 from `tailscale ip -4` and one port; refuses any other address | none; serves the built `site/` | `ops/docs-site/serve.py` |
|
|
26
30
|
|
|
27
31
|
On macOS the user state root is `Library/Application Support/KXM` under the
|
|
28
32
|
home directory (`kxmUserStateRoot` in `plugins/kxm/src/bindings.ts`). Windows
|
|
@@ -29,7 +29,7 @@ messages.
|
|
|
29
29
|
`schemas/policy-draft` (`kxm.model.v2`, `kxm.role.v2`) and
|
|
30
30
|
`validatePolicyDraft` are non-authoritative scaffolding. They are not live
|
|
31
31
|
registry identities, operator settings, or admission. Live model files remain
|
|
32
|
-
`kxm.model.
|
|
32
|
+
`kxm.model.v2` under `schemas`.
|
|
33
33
|
|
|
34
34
|
## Validation pipeline
|
|
35
35
|
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Learnings"
|
|
3
|
+
description: "Durable lessons from running the writer, critic, and landing loop on this repository. One entry per lesson, with the evidence and where it applies. Pruned when a lesson stops being true."
|
|
4
|
+
audience: "agents and maintainers"
|
|
5
|
+
updated: "2026-09-26"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Learnings
|
|
9
|
+
|
|
10
|
+
A lesson earns a line here when it would save a future session more than a
|
|
11
|
+
few minutes. Each entry: the lesson, the evidence, where it applies. An
|
|
12
|
+
entry whose fix has landed is deleted, not archived.
|
|
13
|
+
|
|
14
|
+
## Dispatch and lanes
|
|
15
|
+
|
|
16
|
+
- **Branch every lane from the current `origin/main`, and rebase before
|
|
17
|
+
review, not after.** Three branches cut before #330 and #331 landed each
|
|
18
|
+
needed a hand rebase with the same additive conflicts (`cli.ts`
|
|
19
|
+
registrations, skill ownership lists, skill mirrors, changelog, dist).
|
|
20
|
+
Evidence: kxm-assign, docs-site, run-driver-timeouts on 2026-09-26.
|
|
21
|
+
Applies to: every brief; `kxm land`'s rebase stage only knows three
|
|
22
|
+
conflict unions.
|
|
23
|
+
- **After an additive rebase, check the skill frontmatter and heading
|
|
24
|
+
spacing.** Keeping both sides doubled a `description:` key in a SKILL.md
|
|
25
|
+
(strict-YAML test) and butted two `##` headings together (MD022).
|
|
26
|
+
Evidence: kxm-assign verify failures, 2026-09-26. Applies to: any
|
|
27
|
+
hand-resolved conflict in `plugins/kxm/skills/` or the CLI reference.
|
|
28
|
+
- **Never run more than two `npm run verify` at once on this machine.**
|
|
29
|
+
Six concurrent runs stretched a seven-minute gate past thirty minutes and
|
|
30
|
+
starved a landing. Evidence: 2026-09-26, 02:10 to 02:40. Applies to: the
|
|
31
|
+
supervisor tick and any batch of writers finishing together.
|
|
32
|
+
- **The transport's stdin read can fail with `EAGAIN` under concurrent
|
|
33
|
+
detached dispatch.** Retry once; the request itself is fine. Evidence:
|
|
34
|
+
two occurrences on 2026-09-26 (backlog S18). Applies to: `just impl-bg`
|
|
35
|
+
and `just review-cli` until they retire.
|
|
36
|
+
- **Do not launch a writer under the Bash tool's ten-minute background
|
|
37
|
+
cap.** It kills the harness mid-run. Use the detached recipe or
|
|
38
|
+
`kxm lane run`. Evidence: the first lane-cli dispatch, 2026-09-26.
|
|
39
|
+
- **Do not run a standalone `npm run verify` on a branch that `kxm land`
|
|
40
|
+
will land.** The `verify` stage runs it again, so the standalone run
|
|
41
|
+
only spends one of the two verify slots twice. Run the critics on the
|
|
42
|
+
writer's own verify evidence, then go straight to `kxm land`. Evidence:
|
|
43
|
+
docs-site, 2026-09-26. Applies to: every lane after its writer finishes.
|
|
44
|
+
|
|
45
|
+
## Engine and runtime
|
|
46
|
+
|
|
47
|
+
- **The improvement loop is blind while writers bypass `kxm run`.** Every
|
|
48
|
+
writer this week ran through the harness runner (`just impl-bg` and the
|
|
49
|
+
critic recipes), which records no engine events, so `kxm improve report`
|
|
50
|
+
and `kxm routing report` both return zero records and no candidates.
|
|
51
|
+
Evidence: both reports on 2026-09-26 at 08:14 UTC list the engine store as
|
|
52
|
+
absent and telemetry as empty. Applies to: dispatch. Once the one-step
|
|
53
|
+
workflows land, dispatch through `kxm lane run --workflow implement-only`
|
|
54
|
+
so attempts land in the run-events store; until then the sixth-tick
|
|
55
|
+
improvement loop reports nothing by design.
|
|
56
|
+
|
|
57
|
+
- **A live agent step had a hard 120 second timeout with no configuration
|
|
58
|
+
path.** The supervisor built the one-shot producer without a timeout.
|
|
59
|
+
Fixed on the run-driver-timeouts branch (step `timeoutMs`, project
|
|
60
|
+
`limits.agentStepTimeoutMs`, default one hour). Delete this entry when
|
|
61
|
+
that lands.
|
|
62
|
+
- **A run with an unreconciled executing attempt could not be cancelled or
|
|
63
|
+
driven again**, and that survived a supervisor restart; deleting the
|
|
64
|
+
lane's Runtime project store was the only recovery. Fixed on the same
|
|
65
|
+
branch (`executing_unrecorded`, admission released on a handoff receipt).
|
|
66
|
+
Delete when it lands.
|
|
67
|
+
- **The engine sends `--reasoning-effort low` on a first attempt regardless
|
|
68
|
+
of the role's effort.** `engine.ts` hard-codes it. Open; covered by the
|
|
69
|
+
role alignment plan P2 and P6.
|
|
70
|
+
- **Template provenance is refused when the installed kxm moves ahead of
|
|
71
|
+
the stamped revision, and a project without the file validates as
|
|
72
|
+
ready.** Deleting the file is the sanctioned state until `kxm init` can
|
|
73
|
+
re-stamp. Evidence: every fresh lane on 2026-09-26 until #330 removed it.
|
|
74
|
+
|
|
75
|
+
## `kxm land`
|
|
76
|
+
|
|
77
|
+
- **Auto-merge cannot be enabled on a PR that is already `CLEAN`**; the
|
|
78
|
+
mutation answers "clean status" and the REST squash merge is the path.
|
|
79
|
+
While CI is paused every PR is clean, so this is the normal path.
|
|
80
|
+
- **The Release workflow's run is titled `Release`, never the PR title.**
|
|
81
|
+
Match it by time after the Auto-Release run. Fixed on kxm-land-followup;
|
|
82
|
+
delete when it lands.
|
|
83
|
+
- **A verify failure inside `kxm land` shows only the child's last output
|
|
84
|
+
line.** Re-run verify by hand to see the cause until backlog S19 lands.
|
|
85
|
+
|
|
86
|
+
## Reviews
|
|
87
|
+
|
|
88
|
+
- **A CLI critic reviewing a branch cut from an older base will report
|
|
89
|
+
main's later additions as deletions.** Say the base commit in the brief
|
|
90
|
+
and tell the critic to review against it. Evidence: docs-site review,
|
|
91
|
+
two of five findings were base artifacts.
|
|
92
|
+
- **Usage errors are Commander prose even under `--json` in every group.**
|
|
93
|
+
Repo-wide, one fix in `mapCommanderError`; on kxm-land-followup. Delete
|
|
94
|
+
when it lands.
|
|
95
|
+
|
|
96
|
+
## omp research, kept for the alignment plan
|
|
97
|
+
|
|
98
|
+
- **omp's roster is `modelRoles` plus `retry.fallbackChains`**, walked on
|
|
99
|
+
provider errors with a revert policy; KXM's roster is a membership test
|
|
100
|
+
and never rotates. The passive `kxm.role.v2` draft already has the
|
|
101
|
+
better shape (routes with status and fallbacks); activate it rather than
|
|
102
|
+
invent a new v2. Source: `plans/research-omp-config-schema.md`.
|
|
103
|
+
- **omp has no workflow file.** Its `workflowz` is a prompt contract over
|
|
104
|
+
an eval kernel. Nothing to port; KXM's workflow file is the stronger
|
|
105
|
+
model.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Operating rules"
|
|
3
|
+
description: "Standing instructions from the operator that every agent session on this repository follows, with the date each was given. Read before planning, dispatching, landing, or editing the roadmap."
|
|
4
|
+
audience: "agents and maintainers"
|
|
5
|
+
updated: "2026-09-26"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Operating rules
|
|
9
|
+
|
|
10
|
+
These are the operator's standing instructions, recorded so a session does
|
|
11
|
+
not have to be told twice. Each rule names the date it was given and where
|
|
12
|
+
it is enforced. A rule that is retired is deleted, not kept beside its
|
|
13
|
+
replacement.
|
|
14
|
+
|
|
15
|
+
## Roles and routes
|
|
16
|
+
|
|
17
|
+
- **The planner does not write product code.** Claude plans, reviews, and
|
|
18
|
+
lands. The default writer is the native Grok CLI (`grok-4.7`), a starting
|
|
19
|
+
rotation rather than a sole writer. If Grok is logged out, use a relief
|
|
20
|
+
route the tracker admits or stop and say what was hit. (`CLAUDE.md`,
|
|
21
|
+
standing.)
|
|
22
|
+
- **One writer per checkout.** Each unit of work runs in its own lane
|
|
23
|
+
worktree (`kxm lane create <unit>`). Two writers in one tree clobber each
|
|
24
|
+
other. (2026-09-25.)
|
|
25
|
+
|
|
26
|
+
## Landing
|
|
27
|
+
|
|
28
|
+
- **Every PR is landed without asking.** Once a PR is open: monitor it,
|
|
29
|
+
rebase onto `main` when it falls behind, resolve conflicts and blockers,
|
|
30
|
+
merge, and follow through to the auto-release tag and the npm publish.
|
|
31
|
+
Report the outcome; do not stop to ask for the merge. Enforced by
|
|
32
|
+
`kxm land` (verify, docs, push, pr, rebase, unblock, merge, release,
|
|
33
|
+
milestone) and, until every stage is proven, by hand. (2026-09-26.)
|
|
34
|
+
- **Documentation is regenerated after a green pipeline and before the
|
|
35
|
+
merge.** The `docs` stage of `kxm land` runs the roadmap generator and
|
|
36
|
+
commits the regenerated pages on the branch. (2026-09-26.)
|
|
37
|
+
- **After every phase or milestone, the intense pass runs, not the
|
|
38
|
+
refresh.** `/reanalyze-roadmap` (the `kxm-roadmap-review` skill with its
|
|
39
|
+
read-only critic), triggered by the `milestone` stage reporting
|
|
40
|
+
`deep_review_required`. (2026-09-26.)
|
|
41
|
+
- **`npm run verify` stays the pre-push gate.** It is the first stage of
|
|
42
|
+
landing and is never replaced by it. CI's validate leg runs the same
|
|
43
|
+
script. (2026-09-26.)
|
|
44
|
+
- **After every publish, the workflow runs on the improvements it just
|
|
45
|
+
landed.** `kxm update --kxm`, then `kxm update --extensions`, then
|
|
46
|
+
`kxm plugin install --all`, so the CLI and the kxm plugin in pi, omp, and
|
|
47
|
+
Claude Code are current; the Claude Code session then needs
|
|
48
|
+
`/reload-plugins`, which only the operator can run. The supervisor tick
|
|
49
|
+
does this after any `PUBLISHED` line. (2026-09-26.)
|
|
50
|
+
|
|
51
|
+
## Entry points
|
|
52
|
+
|
|
53
|
+
- **No new just recipes.** The repository is migrating off `just`. A needed
|
|
54
|
+
entry point is a `kxm` command: a group under `plugins/kxm/src/cli/`,
|
|
55
|
+
registered in `cli.ts`, owned by a bundled skill so `check:generated`
|
|
56
|
+
passes, documented in the CLI reference. Existing recipes retire as their
|
|
57
|
+
`kxm` verbs land; the transport recipes (`impl`, `plan`, `review-*`,
|
|
58
|
+
`impl-bg`) retire last, after one real unit has run through the one-step
|
|
59
|
+
workflows. (2026-09-26.)
|
|
60
|
+
|
|
61
|
+
## Decisions and debt
|
|
62
|
+
|
|
63
|
+
- **Every option comes with pros and cons and two recommendations**, the
|
|
64
|
+
solid-product answer and the interim answer. (2026-09-26.)
|
|
65
|
+
- **Every shortcut goes on the backlog the same turn it is taken**, as an
|
|
66
|
+
item in `plans/backlog-shortcuts.md` with what was skipped and the proper
|
|
67
|
+
fix. (2026-09-26.)
|
|
68
|
+
|
|
69
|
+
## Roadmap and plan content
|
|
70
|
+
|
|
71
|
+
- **No stale data.** A fact that no longer holds is replaced, never kept
|
|
72
|
+
beside its replacement.
|
|
73
|
+
- **History is brief.** One short line per material change, capped by the
|
|
74
|
+
generator; never a running narrative.
|
|
75
|
+
- **No stale contacts.** A contact carries a role and a confirmation date;
|
|
76
|
+
unconfirmed past 90 days is dropped. Empty is fine.
|
|
77
|
+
- **Present and upcoming only.** Superseded material leaves the roadmap.
|
|
78
|
+
- **Progressive detail.** A far-off phase or task is brief but complete
|
|
79
|
+
(goal, scope, done criterion, evidence needed) and gains detail as it
|
|
80
|
+
nears implementation. A task cannot be `ready` without a template and a
|
|
81
|
+
source.
|
|
82
|
+
- **Tasks use the artifact templates** under `docs/templates/`.
|
|
83
|
+
|
|
84
|
+
All six enforced by the `kxm.roadmap.v1` schema, the generator's semantic
|
|
85
|
+
refusals, and the two roadmap skills. (2026-09-26.)
|
|
86
|
+
|
|
87
|
+
## Monitoring
|
|
88
|
+
|
|
89
|
+
- **Background monitors emit progress, not only results**, in this line
|
|
90
|
+
form: `[{lane}/{agent}]: {phrase}. {No action|Review needed}. -
|
|
91
|
+
{E}e|{D}d ({M}m{S}s)`. Routine lines are not echoed back in chat.
|
|
92
|
+
(2026-09-26, formatter at `~/.claude/scripts/evt-monitor.sh`.)
|
|
93
|
+
- **A supervisor tick runs every five minutes** while a session is open:
|
|
94
|
+
sweep the lanes, act on "Review needed", cap concurrent verifies at two,
|
|
95
|
+
regenerate the roadmap after a merge, and run the improvement loop every
|
|
96
|
+
sixth tick. Its prompt is checked in at
|
|
97
|
+
`plans/kxm-roadmap/supervisor-prompt.md`; a tick that finds the schedule
|
|
98
|
+
missing or expiring recreates it from that file in the same chat session,
|
|
99
|
+
never a new one, so the loop continues under the same task. (2026-09-26.)
|
|
100
|
+
|
|
101
|
+
## Where the same rules live for agents
|
|
102
|
+
|
|
103
|
+
The session memory under `~/.claude/projects/…/memory/` mirrors these as
|
|
104
|
+
`pr-landing-autonomy`, `pipeline-docs-then-merge`, `no-just-prefer-kxm-cli`,
|
|
105
|
+
`decisions-pros-cons-backlog`, `roadmap-editorial-rules`, and
|
|
106
|
+
`monitor-progress-events`. This page is the checked-in copy; when the two
|
|
107
|
+
disagree, this page is updated and the memory follows.
|
|
@@ -67,7 +67,7 @@ to run one file is in [Develop KXM](development.md#run-one-file-or-one-test).
|
|
|
67
67
|
| Explicit local YAML validates with runner schema/transitions; webhook environment sources retain JSON/secret checks | `gate-validation.test.ts` |
|
|
68
68
|
| `kxm workflow add` writes a local workflow only where the loader reads it and only if the project still loads; outside a project it refuses | `role-and-workflow-manager.test.ts` ("workflow add writes only what the project loader accepts, at the project root, and loadKxmProject still loads") |
|
|
69
69
|
| `kxm workflow add --pick <global-id>` copies the global definition into the project, not the scaffold, and the loader check refuses one that does not fit | `role-and-workflow-manager.test.ts` ("workflow add --pick <global-id> copies that global definition into the project, and refuses one the project loader rejects") |
|
|
70
|
-
| `kxm role add --pick <global-id>` copies the global role into the project, not an empty role, with `--description`, `--skills` and `--
|
|
70
|
+
| `kxm role add --pick <global-id>` copies the global role into the project, not an empty role, with `--description`, `--skills` and `--route` applied over it | `role-and-workflow-manager.test.ts` ("role add --pick <global-id> copies that global role into the project, with --description, --skills and --route applied over it") |
|
|
71
71
|
| `kxm role add` writes a local role only at the project root and only if the project still loads, so a `writer` roster without the implementer's model is refused; outside a project it refuses | `role-and-workflow-manager.test.ts` ("role add writes a local role only at the project root, and only if the project loader accepts it") |
|
|
72
72
|
| `default.yaml` and the 13-step `fix.yaml` compile deterministically; back edges need budgets | `engine-compile.test.ts` |
|
|
73
73
|
| Artifact gate: non-empty regular files pass; missing, empty, non-file and escaping paths fail | `artifacts-exist.test.ts` |
|
package/docs/glossary.md
CHANGED
|
@@ -419,7 +419,7 @@ A [trust diff](#trust-diff) change that widens what agents may do, such as a new
|
|
|
419
419
|
|
|
420
420
|
### Role
|
|
421
421
|
|
|
422
|
-
A `kxm.role.
|
|
422
|
+
A `kxm.role.v2` definition in `.kxm/roles/`, managed with `kxm role`, that describes a seat such as `planner`, `writer` or `verifier` and its model roster. When a role file exists, a Runtime step that uses the role may run only routes in its roster.
|
|
423
423
|
|
|
424
424
|
### Roster
|
|
425
425
|
|
|
@@ -57,7 +57,7 @@ Every top-level `kxm` command is owned by exactly one skill. A skill can own sev
|
|
|
57
57
|
| `kxm-session` | `session`, `dash`, `studio` | Read session and hub status and open dashboard or studio screens |
|
|
58
58
|
| `kxm-peer` | `peer` | Delegate to, fan out to, await and answer other agents |
|
|
59
59
|
| `kxm-workflow` | `workflow`, `gate` | Record journal entries, pass checkpoints and wait on signed callbacks |
|
|
60
|
-
| `kxm-definitions` | `role` | Inspect or edit roles
|
|
60
|
+
| `kxm-definitions` | `role` | Inspect or edit roles and model rosters without granting writer admission |
|
|
61
61
|
| `kxm-runs` | `run`, `runs`, `lane`, `assign` | Create, drive, inspect and cancel runs, manage worktree lanes, smoke-test a workflow, or call the assignment runner |
|
|
62
62
|
| `kxm-context-memory` | `context`, `memory`, `explain` | Recall what the project knows, explain a context footprint, record memory candidates |
|
|
63
63
|
| `kxm-skill-lifecycle` | `skills` | Turn a repeated practice into a governed skill candidate |
|
|
@@ -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/, models/, workflows/, gates.yaml, roles/,
|
|
18
|
+
R1["Project definition: .kxm/project.yaml, config.yaml, agents/, models/, workflows/, gates.yaml, roles/, roles, routes.yaml, roster.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, roles/, workflows/,
|
|
34
|
+
C1["config.yaml, roles/, workflows/, roles, session.token"]
|
|
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"]
|