@kontextmind/kxm 0.7.125 → 0.7.126

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.
@@ -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.125",
14
+ "version": "0.7.126",
15
15
  "category": "development",
16
16
  "tags": ["kxm", "multi-agent", "workflows", "mcp"]
17
17
  }
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).
@@ -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
@@ -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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontextmind/kxm",
3
- "version": "0.7.125",
3
+ "version": "0.7.126",
4
4
  "description": "KXM local-first multi-agent orchestration and operator dashboard",
5
5
  "type": "module",
6
6
  "author": "KontextMind",
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "kxm",
4
4
  "displayName": "KXM",
5
- "version": "0.7.125",
5
+ "version": "0.7.126",
6
6
  "description": "Headless multi-agent orchestration, durable workflows, and a live operator dashboard for Pi and Claude Code",
7
7
  "author": {
8
8
  "name": "KontextMind",
@@ -17313,7 +17313,7 @@ function sessionTokenFixHint(policy) {
17313
17313
  }
17314
17314
 
17315
17315
  // plugins/kxm/src/mcp-server.ts
17316
- var VERSION = "0.7.125";
17316
+ var VERSION = "0.7.126";
17317
17317
  var CONFIGURE_PLUGIN = "/plugin configure kxm@kxm";
17318
17318
  var inbox = /* @__PURE__ */ new Map();
17319
17319
  var notifiedInbox = /* @__PURE__ */ new Set();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-plugin",
3
- "version": "0.7.125",
3
+ "version": "0.7.126",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "engines": {
@@ -11,7 +11,7 @@ import { deliverInboxNotification } from "./inbox.ts";
11
11
  import type { HubEvent, MessageRecord } from "./protocol.ts";
12
12
  import { sessionTokenFixHint } from "./session-token-hint.ts";
13
13
 
14
- const VERSION = "0.7.125";
14
+ const VERSION = "0.7.126";
15
15
  const CONFIGURE_PLUGIN = "/plugin configure kxm@kxm";
16
16
  const inbox = new Map<string, MessageRecord>();
17
17
  const notifiedInbox = new Set<string>();