@kontextmind/kxm 0.7.94 → 0.7.96

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 (140) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.kxm/README.md +39 -9
  3. package/CHANGELOG.md +1 -1
  4. package/README.md +147 -257
  5. package/SECURITY.md +21 -12
  6. package/docs/README.md +133 -54
  7. package/docs/adr/ADR-0002-browser-automation-steel-doks.md +24 -18
  8. package/docs/adr/ADR-0003-sqlite-only-store.md +100 -0
  9. package/docs/adr/ADR-0004-edge-identity-authentik.md +99 -0
  10. package/docs/adr/README.md +33 -0
  11. package/docs/concepts/architecture.md +262 -0
  12. package/docs/concepts/data-and-storage.md +194 -0
  13. package/docs/concepts/trust-model.md +152 -0
  14. package/docs/contracts/README.md +22 -14
  15. package/docs/contracts/effects-and-recovery.md +3 -0
  16. package/docs/contracts/migration.md +2 -2
  17. package/docs/contracts/routing.md +6 -5
  18. package/docs/contributing/assignment-runner.md +388 -0
  19. package/docs/contributing/ci-and-release.md +231 -0
  20. package/docs/contributing/development.md +362 -0
  21. package/docs/contributing/harness-routing-internals.md +192 -0
  22. package/docs/{packages.md → contributing/packages.md} +13 -15
  23. package/docs/{skills → contributing}/repo-work-delivery.md +20 -21
  24. package/docs/contributing/test-matrix.md +208 -0
  25. package/docs/{tui-components.md → contributing/tui-components.md} +30 -22
  26. package/docs/contributing/writing-docs.md +340 -0
  27. package/docs/glossary.md +471 -0
  28. package/docs/guides/agent-skills.md +137 -0
  29. package/docs/guides/browser-automation.md +160 -0
  30. package/docs/guides/context-and-memory.md +352 -0
  31. package/docs/guides/continuous-improvement.md +228 -0
  32. package/docs/guides/governed-skills.md +173 -0
  33. package/docs/guides/nous-providers.md +186 -0
  34. package/docs/guides/peer-messaging.md +304 -0
  35. package/docs/guides/pi-workers.md +219 -0
  36. package/docs/guides/provenance-gates.md +313 -0
  37. package/docs/guides/webhook-workflows.md +364 -0
  38. package/docs/kb/how-credentials-retrieved-safely.md +38 -12
  39. package/docs/kb/how-to-capture-and-annotate-section.md +15 -13
  40. package/docs/kb/how-to-connect-playwright-to-steel.md +16 -11
  41. package/docs/kb/how-to-recover-expired-session-or-orphan.md +26 -16
  42. package/docs/kb/how-to-resume-after-mfa.md +19 -11
  43. package/docs/kb/how-to-take-over-session.md +17 -13
  44. package/docs/kb/why-authentication-disappeared.md +22 -14
  45. package/docs/kb/why-automation-opened-different-browser.md +23 -14
  46. package/docs/kb/why-session-viewer-cannot-control.md +13 -12
  47. package/docs/operations/backup-and-restore.md +248 -0
  48. package/docs/operations/deploy.md +307 -0
  49. package/docs/operations/monitoring.md +209 -0
  50. package/docs/operations/runtime-sync.md +192 -0
  51. package/docs/operations/troubleshooting.md +265 -0
  52. package/docs/operations/upgrade.md +124 -0
  53. package/docs/prompts/browser-annotate-feedback.md +7 -7
  54. package/docs/prompts/browser-diagnose-recover.md +11 -10
  55. package/docs/prompts/browser-explore.md +7 -7
  56. package/docs/prompts/browser-repro-fix.md +7 -7
  57. package/docs/prompts/browser-start.md +12 -11
  58. package/docs/prompts/browser-takeover.md +8 -8
  59. package/docs/{cli-reference.md → reference/cli-reference.md} +83 -41
  60. package/docs/{config-reference.md → reference/config-reference.md} +159 -148
  61. package/docs/reference/configuration.md +299 -0
  62. package/docs/reference/harness-routing.md +508 -0
  63. package/docs/reference/http-api.md +203 -0
  64. package/docs/reference/tools.md +370 -0
  65. package/docs/{workflow-guide.md → reference/workflow-catalog.md} +92 -153
  66. package/docs/reference/workflow-definitions.md +286 -0
  67. package/docs/start/first-workflow.md +287 -0
  68. package/docs/start/install.md +146 -0
  69. package/docs/start/quickstart-claude-code.md +405 -0
  70. package/docs/start/quickstart-pi.md +213 -0
  71. package/docs/templates/README.md +78 -73
  72. package/docs/templates/adr.md +13 -13
  73. package/docs/templates/architecture.md +55 -71
  74. package/docs/templates/bug-fix.md +13 -16
  75. package/docs/templates/feature.md +14 -19
  76. package/docs/templates/handoff.md +44 -46
  77. package/docs/templates/postmortem.md +30 -43
  78. package/docs/templates/research.md +15 -20
  79. package/docs/templates/review.md +49 -50
  80. package/docs/templates/runbook.md +38 -30
  81. package/docs/templates/test-plan.md +16 -23
  82. package/docs/templates/test-report.md +14 -17
  83. package/examples/README.md +9 -5
  84. package/examples/provenance-workflow.json +1 -1
  85. package/examples/webhook-workflows/jira-development.json +59 -0
  86. package/examples/webhook-workflows/jira-issue-updated.json +12 -0
  87. package/package.json +2 -2
  88. package/packages/core/tui/README.md +1 -1
  89. package/plugins/kxm/.claude-plugin/plugin.json +1 -1
  90. package/plugins/kxm/README.md +31 -32
  91. package/plugins/kxm/dist/cli.js +5 -5
  92. package/plugins/kxm/dist/mcp-server.js +1 -1
  93. package/plugins/kxm/dist/runtime.js +1 -1
  94. package/plugins/kxm/package.json +1 -1
  95. package/plugins/kxm/skills/kxm/references/protocol.md +3 -1
  96. package/plugins/kxm/skills/kxm-browser-auth/SKILL.md +1 -1
  97. package/plugins/kxm/skills/kxm-browser-diagnostics/SKILL.md +5 -5
  98. package/plugins/kxm/skills/kxm-browser-explore/SKILL.md +2 -2
  99. package/plugins/kxm/skills/kxm-browser-session/SKILL.md +10 -13
  100. package/plugins/kxm/skills/kxm-browser-takeover/SKILL.md +1 -1
  101. package/plugins/kxm/skills/kxm-browser-verify/SKILL.md +1 -1
  102. package/plugins/kxm/skills/kxm-context-memory/SKILL.md +13 -4
  103. package/plugins/kxm/skills/kxm-hub-ops/SKILL.md +3 -1
  104. package/plugins/kxm/skills/kxm-mind-setup/SKILL.md +2 -1
  105. package/plugins/kxm/skills/kxm-project-setup/SKILL.md +31 -54
  106. package/plugins/kxm/skills/kxm-projects/SKILL.md +1 -1
  107. package/plugins/kxm/skills/kxm-protocol/SKILL.md +1 -1
  108. package/plugins/kxm/skills/kxm-routing-improve/SKILL.md +15 -7
  109. package/plugins/kxm/skills/kxm-runs/SKILL.md +11 -5
  110. package/plugins/kxm/skills/kxm-session/SKILL.md +1 -1
  111. package/plugins/kxm/skills/kxm-tasks/SKILL.md +9 -7
  112. package/plugins/kxm/skills/kxm-workflow/SKILL.md +10 -2
  113. package/plugins/kxm/src/cli/system.ts +1 -1
  114. package/plugins/kxm/src/cli.ts +3 -3
  115. package/plugins/kxm/src/init-guide-setup.ts +1 -1
  116. package/plugins/kxm/src/mcp-server.ts +1 -1
  117. package/plugins/kxm/src/modes.ts +1 -1
  118. package/schemas/README.md +1 -1
  119. package/docs/agent-communication-envelopes-and-gates.md +0 -553
  120. package/docs/agent-skills.md +0 -198
  121. package/docs/architecture.md +0 -245
  122. package/docs/assignment-runner.md +0 -264
  123. package/docs/browser-automation.md +0 -139
  124. package/docs/configuration.md +0 -437
  125. package/docs/continuous-improvement.md +0 -226
  126. package/docs/getting-started.md +0 -277
  127. package/docs/harness-routing.md +0 -616
  128. package/docs/kb/qa-authentik-authentication.md +0 -97
  129. package/docs/kb/qa-extension-install-and-hub-bootstrap.md +0 -85
  130. package/docs/kb/qa-hub-on-a-public-host.md +0 -48
  131. package/docs/kb/qa-sqlite-vs-duckdb.md +0 -35
  132. package/docs/kb/qa-what-the-hub-stores.md +0 -64
  133. package/docs/kxm-handbook.md +0 -1181
  134. package/docs/operations.md +0 -510
  135. package/docs/operator-pi-packages.md +0 -67
  136. package/docs/provenance-gates.md +0 -295
  137. package/docs/skills.md +0 -47
  138. package/docs/test-matrix.md +0 -132
  139. package/docs/troubleshooting.md +0 -293
  140. package/docs/webhook-workflows.md +0 -240
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: kxm-project-setup
3
- description: Set up KXM in a new or existing Git repository and run a first workflow, especially with Claude Code. The agent runs kxm init, kxm trust diff and check, writes a first workflow, and drives a model-free first run, while the user starts the hub, installs the kxm Claude Code plugin, and reviews and commits .kxm permission changes. Use when asked to install, set up, onboard, initialize, upgrade, or get started with KXM.
3
+ description: Set up KXM in a new or existing Git repository and run a first workflow, especially with Claude Code. The agent runs kxm init, adds a first workflow from the spec-and-plan template, runs kxm trust diff and check, and drives a model-free first run, while the user starts the hub, installs the kxm Claude Code plugin, and reviews and commits .kxm permission changes. Use when asked to install, set up, onboard, initialize, upgrade, or get started with KXM.
4
4
  ---
5
5
 
6
6
  # KXM project setup and first workflow
7
7
 
8
8
  One guide from a Git repository to a completed first run. Run the agent steps
9
- in order and stop where a phase says STOP. Everything under Operator steps is
10
- the user's to run in their own terminal or in Claude Code.
9
+ in order and stop at every STOP. Everything under Operator steps is the user's
10
+ to run in their own terminal or in Claude Code.
11
11
 
12
12
  - Read `kxm <group> <verb> --help` before a mutation; flags differ per command.
13
13
  - Never commit `.kxm` changes yourself. The user's reviewed commit is the trust
@@ -16,7 +16,7 @@ the user's to run in their own terminal or in Claude Code.
16
16
 
17
17
  ## Agent steps
18
18
 
19
- ### Phase 1: initialize
19
+ ### Initialize the project
20
20
 
21
21
  1. `kxm init --dry-run --json` plans without writing. `mode` is `create`,
22
22
  `ready`, `repair`, or `legacy`, and `issues` lists anything to fix first.
@@ -31,51 +31,22 @@ the user's to run in their own terminal or in Claude Code.
31
31
  3. Add `.kxm/state/` and `.kxm/logs/` to `.gitignore`. `kxm init` writes no
32
32
  ignore rules.
33
33
  4. `kxm hub view` reads hub health. It exits 1 with `hub health=false` until
34
- the user has started a hub; that does not block phases 2 and 3.
34
+ the user has started a hub; that does not block the first workflow or the
35
+ first run.
35
36
  5. STOP. Ask the user to review `.kxm/` and `.gitignore` and commit them.
36
37
  Until they do, `kxm trust diff` fails with `resource_missing` for
37
38
  `.kxm/project.yaml` at base `HEAD`.
38
39
 
39
- ### Phase 2: write a first workflow
40
+ ### Add a first workflow from a template
40
41
 
41
42
  After the user's commit:
42
43
 
43
- 1. Write `.kxm/workflows/first.yaml`, a slim agent-only workflow the Runtime
44
- can drive end to end:
45
-
46
- ```yaml
47
- schema: kxm.workflow.v1
48
- description: Plan, then implement. A first workflow you can drive end to end.
49
- coordinator: coordinator
50
- limits:
51
- maxTransitions: 6
52
- steps:
53
- - id: plan
54
- kind: agent
55
- agent: coordinator
56
- maxAttempts: 2
57
- repositories:
58
- control: read
59
- on:
60
- passed: implement
61
- failed:
62
- target: $terminal
63
- terminalStatus: failed
64
- - id: implement
65
- kind: agent
66
- agent: implementer
67
- maxAttempts: 2
68
- repositories:
69
- control: write
70
- on:
71
- passed:
72
- target: $terminal
73
- terminalStatus: completed
74
- failed:
75
- target: $terminal
76
- terminalStatus: failed
77
- ```
78
-
44
+ 1. `kxm workflow add first --template spec-and-plan` prints
45
+ `Added workflow 'first' to local (<root>/.kxm/workflows/first.yaml)`. Add
46
+ `--dry-run` first to see the path without writing. The template has two
47
+ steps, `plan` then `review-arch`, both run by the `coordinator` agent with
48
+ `repositories: control: read`. It writes nothing and runs no test command,
49
+ and a failed review goes back to `plan` at most twice.
79
50
  2. `kxm init` validates it and prints `validated KXM project at <root>`.
80
51
  3. `kxm workflow definitions` lists `default` and `first`.
81
52
  4. `kxm trust diff`, then `kxm trust check`. Both print
@@ -83,32 +54,37 @@ After the user's commit:
83
54
  `1 expansion(s) require explicit reviewed trust action`. `kxm trust check`
84
55
  adds `trust check failed: review every expansion above before merging` and
85
56
  exits 1.
86
- 5. STOP. Show the user each EXPANSION line, ask them to review it and commit
87
- the file themselves, and wait. The `implement` step gets
88
- `repositories: control: write`. Never commit `.kxm` changes yourself; the
57
+ 5. STOP. Show the user each EXPANSION line, ask them to review the file and
58
+ commit it themselves, and wait. Never commit `.kxm` changes yourself; the
89
59
  reviewed commit is the trust approval.
90
60
 
91
- ### Phase 3: drive a model-free first run
61
+ ### Drive a model-free first run
92
62
 
93
63
  After the user's commit:
94
64
 
95
65
  1. `kxm trust check` prints `no authority-bearing or prose changes` and exits 0.
96
66
  2. `kxm run first "<prompt>" --dry-run` prints
97
- `run plan: workflow first at sha256:… (no run created)`.
67
+ `run plan: workflow first at sha256:… (no run created)`. Keep secrets out of
68
+ the prompt: its full text is kept on disk (`kxm-runs`).
98
69
  3. `kxm run first "<prompt>"` prints `run created: run_<id> …` and starts the
99
70
  Runtime supervisor.
100
71
  4. `kxm runs status <runId>` prints `created`.
101
72
  5. `kxm runs drive <runId> --simulated --wait --timeout-ms 60000` prints a
102
73
  `kxm.drive-receipt.v1` whose settlement is terminal `completed`, and exits 0.
103
- Always pass `--simulated`; without it, drive calls live harnesses.
74
+ The run moves from `plan` to `review-arch` to `completed`. Always pass
75
+ `--simulated`; without it, drive calls live harnesses.
104
76
  6. `kxm runs status <runId>` prints `completed … (receipt verified)`.
105
77
  7. `kxm runs receipt <runId>` and `kxm runs list`. Cancel a stuck run with
106
78
  `kxm runs cancel <runId>`.
107
79
  8. `kxm runtime stop` when you are done.
108
80
 
109
- To add more workflows, write the YAML by hand as in phase 2, or see
110
- `kxm workflow add --help`. Validate any new definition with
111
- `kxm init --dry-run --json`, then repeat the phase 2 trust review.
81
+ To add more workflows, run `kxm workflow add <id> --template <name>` with
82
+ `implement-and-verify` (an `implement` step with write access, then the `test`
83
+ gate) or `dual-critic-review` (`implement`, two reviews, then the `test` gate),
84
+ or write the YAML by hand; see `kxm workflow add --help`. A gate step runs its
85
+ command from `.kxm/gates.yaml` even in a simulated drive. Validate any new
86
+ definition with `kxm init --dry-run --json`, then repeat the trust review and
87
+ the user's commit.
112
88
 
113
89
  ## Operator steps
114
90
 
@@ -119,7 +95,8 @@ or store the admin or project token in the conversation. The user enters
119
95
  1. Create a project token and export `KXM_PROJECT_TOKENS` before starting the
120
96
  hub. The map must list every project's token, because it replaces the saved
121
97
  map rather than merging with it. When a hub already serves other projects,
122
- use the merge command in the KXM README.
98
+ use the merge command in the KXM documentation's Claude Code quick start
99
+ (docs/start/quickstart-claude-code.md, section "Start the hub").
123
100
  2. `kxm hub start` in a second terminal. It generates and persists an admin
124
101
  credential in `hub-env.json` under the user state root; that token never
125
102
  goes to an agent.
@@ -127,8 +104,8 @@ or store the admin or project token in the conversation. The user enters
127
104
  4. In Claude Code, `/plugin marketplace add kontextmind/kxm`,
128
105
  `/plugin install kxm@kxm`, then `/plugin configure kxm@kxm` for
129
106
  `server_url`, `auth_token`, `agent_name`, `agent_purpose`, and `project`.
130
- 5. Review and commit `.kxm/` and `.gitignore` after phase 1, and every
131
- `kxm trust diff` EXPANSION after phase 2, for example
107
+ 5. Review and commit `.kxm/` and `.gitignore` after `kxm init`, and every
108
+ `kxm trust diff` EXPANSION after adding a workflow, for example
132
109
  `git add .kxm .gitignore && git commit`.
133
110
  6. `kxm session token --clear` when kxm_* tools report `tool_policy_denied`
134
111
  for an expired or malformed session token file.
@@ -24,7 +24,7 @@ A project is a mind repo (`repos` row). Pages bind to the caller namespace. Ther
24
24
  | `km_projects` | any authorized caller | `{projects[], active, count}` + freshness |
25
25
  | `km_project_add` | steward/owner | `name`, optional `path` (local git, indexed now), optional `github_full` |
26
26
  | `km_reindex` | authorized | `project` as id or `github_full`. Idempotent reconcile vs HEAD. Returns `{head_sha, indexed_sha, drifted, repaired}` |
27
- | `km_invite` | steward/owner | `email`, `role` member/steward/owner. Link-only delivery (`accept_url`, expiry). No SMTP in v0.1 |
27
+ | `km_invite` | steward/owner | `email`, `role` member/steward/owner. Link-only delivery (`accept_url`, expiry). No SMTP |
28
28
 
29
29
  If the tool returns a role error, stop and tell the user they need steward/owner. Do not retry as a different identity.
30
30
 
@@ -15,7 +15,7 @@ metadata:
15
15
 
16
16
  Canonical docs live in `kontextmind/mind` — `docs/protocol.md`, `docs/session-spine.md`, `docs/consistency-contract.md`, `docs/webhooks.md`, `docs/hosted-auth.md`, `docs/trust-modes.md`, `docs/secret-gates.md`, `docs/authz-matrix.md`, `docs/threat-model.md`.
17
17
 
18
- Protocol status — v0.1 pre-freeze. Additive changes only within a major.
18
+ Protocol status — pre-freeze. Additive changes only within a major.
19
19
 
20
20
  ## Transports
21
21
 
@@ -41,10 +41,12 @@ exits 1 with `improve_source_unreadable`. Simulated drives are excluded, and a
41
41
  Runtime attempt is `accepted` only when its run completed without the step
42
42
  being re-entered.
43
43
 
44
- - Grouping is by workflow, step, agent role and ask.
45
- - A coded-repeat candidate needs the same ask decided in at least 2 runs, an
46
- accepted share of at least 0.75, and a step that writes no repository. A
47
- passing group that misses says `writes-repository` or `ask-not-repeated`.
44
+ - Grouping is by workflow, step, agent role and ask. The ask is a digest of
45
+ the step's definition, so one step keeps one ask across runs.
46
+ - A coded-repeat candidate needs the same objective decided in at least 2
47
+ runs (`askRecurrence`), an accepted share of at least 0.75, and a step that
48
+ writes no repository. A passing group that misses says `writes-repository`
49
+ or `ask-not-repeated`.
48
50
  - Each candidate has kind `gate`, `skill`, or `workflow-step` and status
49
51
  `proposed`.
50
52
  - Without `--dry-run` it writes `<candidateId>.diff` and `<candidateId>.json`
@@ -77,6 +79,12 @@ Never apply a candidate diff yourself or treat `readyForReview` as approval.
77
79
  fixed placeholder figures in this build; never cite them as measured cost or
78
80
  quality. Use `kxm routing report` for recorded spend.
79
81
 
82
+ `--equivalent-list-cost` loads the price catalog (`.kxm/prices.yaml`, or
83
+ `--prices <path>`) without a freshness check, so an old catalog quotes old
84
+ prices. A missing or invalid catalog leaves the equivalent list cost empty
85
+ (`-` in text). Check the catalog's `date` before citing an equivalent list
86
+ cost.
87
+
80
88
  ```bash
81
89
  kxm routing report --json
82
90
  kxm routing report --equivalent-list-cost --json
@@ -84,6 +92,6 @@ kxm improve report --dry-run --json
84
92
  ```
85
93
 
86
94
  Do not invent list, get, compare, or top-models verbs, prices, or a ranking
87
- from missing cost. A stale price catalog must not silently underquote.
88
- Improvement candidates still need Git-reviewed activation; telemetry cannot
89
- grant tools or skip a gate.
95
+ from missing cost. Never present an equivalent list cost from an old catalog
96
+ as current. Improvement candidates still need Git-reviewed activation;
97
+ telemetry cannot grant tools or skip a gate.
@@ -14,13 +14,18 @@ the Runtime supervisor. A created run stays `created` until
14
14
 
15
15
  | Command | Purpose | Options / arguments |
16
16
  |---|---|---|
17
- | `kxm run [workflow] [prompt...]` | Create a run; the prompt is hashed, never stored raw | `--dry-run` (plan only), `--json` |
17
+ | `kxm run [workflow] [prompt...]` | Create a run; the full prompt is kept on disk (see below) | `--dry-run` (plan only), `--json` |
18
18
  | `kxm runs drive <runId>` | Drive a run; with `--wait`, exits 0 only for a verified completed settlement | `--simulated`, `--wait`, `--timeout-ms <n>` (default 60000, max 600000), `--json` |
19
19
  | `kxm runs status <runId>` | Projected run status plus drive receipt state (open, receipt verified, unsettled, orphaned) | `--json` |
20
20
  | `kxm runs receipt <runId>` | Newest drive receipt for a run | `--all`, `--json` |
21
21
  | `kxm runs cancel <runId>` | Durably request cancellation | `--json` |
22
22
  | `kxm runs list` | Recent runs for the current project | `--json` |
23
23
 
24
+ The run record and its events keep only the prompt's hash, but the full
25
+ prompt text is kept in a local `run-events.db.run-prompts.json` file (mode
26
+ `0600`) next to the project's run store under the user state root. Keep
27
+ secrets out of run prompts.
28
+
24
29
  `kxm runs drive <runId> --simulated --wait [--timeout-ms <n>]` executes the run
25
30
  with the model-free simulation producer. Always pass `--simulated`; without it,
26
31
  drive calls live harnesses. When you are finished, stop the supervisor with
@@ -29,12 +34,13 @@ drive calls live harnesses. When you are finished, stop the supervisor with
29
34
  ## Smoke-test the first workflow
30
35
 
31
36
  Run this only after the user has reviewed and committed
32
- `.kxm/workflows/first.yaml` (`kxm-project-setup`, phase 2), so
33
- `kxm trust check` exits 0.
37
+ `.kxm/workflows/first.yaml`, which `kxm-project-setup` adds with
38
+ `kxm workflow add first --template spec-and-plan`, so `kxm trust check`
39
+ exits 0.
34
40
 
35
41
  ```bash
36
- kxm run first "add a hello script" --dry-run
37
- kxm run first "add a hello script" --json
42
+ kxm run first "Plan a hello script" --dry-run
43
+ kxm run first "Plan a hello script" --json
38
44
  kxm runs status run_12345
39
45
  kxm runs drive run_12345 --simulated --wait --timeout-ms 60000 --json
40
46
  kxm runs status run_12345
@@ -65,7 +65,7 @@ paste it into a conversation.
65
65
 
66
66
  | Command | Purpose | Options |
67
67
  |---|---|---|
68
- | `kxm session brief` | Recent hub tasks (workflow runs) and plans (journal `plan` rows) from the local hub store; every form saves the session token | `--status` (status line only), `--json` |
68
+ | `kxm session brief` | Recent tasks (hub workflow runs from the local hub store and Runtime runs under the user state root) and plans (journal `plan` rows); every form saves the session token | `--status` (status line only), `--json` |
69
69
  | `kxm session token --status` | Report the active session token | `--json` |
70
70
  | `kxm session token --clear` | Delete the session token file | `--json` |
71
71
  | `kxm session stop` | Request managed hub and worker shutdown | `--wait-ms <ms>` |
@@ -1,13 +1,14 @@
1
1
  ---
2
2
  name: kxm-tasks
3
- description: Recommend workflows and manage goals and tasks with explicit SCM and tracker boundaries. Use when asked what workflow fits, to plan work as goals and tasks, or to sync with GitHub or Jira. Run a kxm suggest workflow ID only after kxm workflow definitions lists it.
3
+ description: Recommend workflows and manage goals and tasks, recording a GitHub issue or Jira key on a task without contacting either tracker. Use when asked what workflow fits, to plan work as goals and tasks, or to link a task to a GitHub or Jira issue. Run a kxm suggest workflow ID only after kxm workflow definitions lists it.
4
4
  ---
5
5
 
6
6
  # KXM suggest, goals, and tasks
7
7
 
8
- Bind SCM and issue trackers from this repo's conventions. Implemented today:
9
- GitHub and Jira. An unimplemented tracker fails closed. Do not invent
10
- `suggest workflows` or extra task verbs.
8
+ A task can record a GitHub issue or Jira key, but no command contacts either
9
+ tracker: `kxm task sync` marks only the local task record synced, and
10
+ `--tracker` is not validated. Do not invent `suggest workflows` or extra task
11
+ verbs.
11
12
 
12
13
  ## Commands
13
14
 
@@ -20,7 +21,7 @@ GitHub and Jira. An unimplemented tracker fails closed. Do not invent
20
21
  | `kxm task list` | List project tasks | `--goal`, `--status todo\|in_progress\|blocked\|in_review\|done` |
21
22
  | `kxm task get <taskId>` | Task details and linked workflow status | `--json` |
22
23
  | `kxm task run <taskId>` | Launch a workflow run driven by this task | `--json` |
23
- | `kxm task sync <taskId>` | Sync status and evidence with the linked issue board | `--json` |
24
+ | `kxm task sync <taskId>` | Mark the local task record synced; contacts no tracker | `--json` |
24
25
 
25
26
  ```bash
26
27
  kxm suggest "implement trusted roster policy brakes" --json
@@ -41,5 +42,6 @@ one with the user (`kxm-project-setup`).
41
42
 
42
43
  `--issue` on `kxm task create` is a tracker issue number or Jira key, not a
43
44
  credential. In this build `kxm task sync` marks only the local task record
44
- synced; it does not contact GitHub or Jira. Do not silently use GitHub when
45
- the operator picked an unimplemented tracker.
45
+ synced; it does not contact GitHub or Jira. `kxm task create` accepts any
46
+ `--tracker` value and records it unchecked, so pass only `github` or `jira`,
47
+ and never report a task as synced with a tracker.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: kxm-workflow
3
- description: Work inside a durable KXM workflow run. Read it, record plan, decision, contradiction, error and lesson journal entries, pass stage checkpoints with keyed evidence and peer evidence refs, wait for signed CI or review callbacks, start webhook workflows, and export retrospectives (kxm_workflow_get, kxm_workflow_record, kxm_workflow_checkpoint, kxm_workflow_wait). Use when a workflow run ID is involved or the user asks to checkpoint, gate, or wait on CI.
3
+ description: Work inside a durable KXM workflow run. Read it, record journal entries in any of the ten categories (plan, decision, contradiction, error, lesson, observation, hypothesis, experiment, state-change, skill-candidate) bound to a stageId, pass stage checkpoints with keyed evidence and peer evidence refs, wait for signed CI or review callbacks, start webhook workflows, and export retrospectives (kxm_workflow_get, kxm_workflow_record, kxm_workflow_checkpoint, kxm_workflow_wait). Use when a workflow run ID is involved or the user asks to checkpoint, gate, or wait on CI.
4
4
  ---
5
5
 
6
6
  # KXM workflow and gates
@@ -31,10 +31,18 @@ with `kxm run` are Runtime runs; inspect them with `kxm runs list`
31
31
  | `kxm workflow start [definitionId]` | POST a signed workflow-start webhook | `--payload <json\|@file>`, `--delivery-id`, `--event` |
32
32
  | `kxm workflow export <runId>` | Export a proposed retrospective | `--input`, `--out-dir` |
33
33
  | `kxm workflow definitions` | List project and global workflow definitions | `--scope all\|global\|local` |
34
- | `kxm workflow add [workflowId]` | Add a definition | `--file`, `--description`, `--scope`, `--overwrite`, `--pick` |
34
+ | `kxm workflow add [workflowId]` | Add a definition | `--template spec-and-plan\|implement-and-verify\|dual-critic-review`, `--file`, `--description`, `--scope`, `--overwrite`, `--pick` |
35
35
  | `kxm workflow remove [workflowId]` | Remove a definition | `--scope`, `--pick` |
36
36
  | `kxm workflow modify [workflowId]` | Modify a definition | `--description`, `--scope`, `--pick` |
37
37
 
38
+ `kxm workflow add <id> --template <spec-and-plan|implement-and-verify|dual-critic-review>`
39
+ writes a complete definition to `.kxm/workflows/<id>.yaml` (the default local
40
+ scope); the file name is the workflow ID. `spec-and-plan` only reads (`plan`,
41
+ then `review-arch`). `implement-and-verify` and `dual-critic-review` add an
42
+ `implement` step with write access and the `test` gate. Validate with
43
+ `kxm init`, then have the user review the `kxm trust diff` expansion and
44
+ commit it (`kxm-project-setup`).
45
+
38
46
  ```bash
39
47
  kxm workflow get run_12345 --json
40
48
  kxm workflow checkpoint run_12345 implement passed "Implementation complete" --evidence '{"tests":"npm test passed"}' --json
@@ -853,7 +853,7 @@ export async function maybeOfferGuideSetup(runtime: Runtime): Promise<void> {
853
853
  runtime.io.stdout(`skipped; set ${GUIDE_SETUP_OPT_OUT_ENV}=1 to suppress this offer, or re-run on a fresh project\n`);
854
854
  return;
855
855
  }
856
- const lines = ["", "Workflow-guide software-engineering workflows (docs/workflow-guide.md):"];
856
+ const lines = ["", "Workflow-guide software-engineering workflows (docs/reference/workflow-catalog.md):"];
857
857
  GUIDE_WORKFLOWS.forEach((workflow, index) => {
858
858
  lines.push(` ${index + 1}) ${workflow.slug.padEnd(32)} ${workflow.summary}`);
859
859
  });
@@ -402,7 +402,7 @@ function createProgram(ctx: CliContext, result: { code: number }): Command {
402
402
  });
403
403
  });
404
404
 
405
- addGlobalOptions(program.command("backup").description("Create a verified SQLite backup of all stores with a hashed manifest"))
405
+ addGlobalOptions(program.command("backup").description("Create a verified SQLite backup of the project hub store with a hashed manifest (Runtime stores under the user state root are not included)"))
406
406
  .option("--out <dir>", "Directory to write backup and manifest")
407
407
  .action(async function backupAction(this: Command, options: { out?: string }) {
408
408
  result.code = await cmdBackup(runtimeFrom(ctx, this), options);
@@ -415,7 +415,7 @@ function createProgram(ctx: CliContext, result: { code: number }): Command {
415
415
 
416
416
  addGlobalOptions(program.command("run").description("Create a KXM run (offline-first; kxm runs drive <runId> --simulated executes it model-free)")
417
417
  .argument("[workflow]", "Workflow id to run")
418
- .argument("[prompt...]", "Run prompt (hashed, never stored raw)")
418
+ .argument("[prompt...]", "Run prompt (events keep its hash; the full text is kept in a local 0600 sidecar file)")
419
419
  .action(async function runAction(this: Command, workflow: string | undefined, promptParts: string[]) {
420
420
  result.code = await cmdKxmRun(runtimeFrom(ctx, this), workflow, promptParts);
421
421
  }));
@@ -426,7 +426,7 @@ function createProgram(ctx: CliContext, result: { code: number }): Command {
426
426
  .action(async function runStatusAction(this: Command, runId: string) {
427
427
  result.code = await cmdKxmRunStatus(runtimeFrom(ctx, this), runId);
428
428
  });
429
- addGlobalOptions(runCmd.command("drive").description("Drive a run with an explicit model-free simulation"))
429
+ addGlobalOptions(runCmd.command("drive").description("Drive a run with live harness calls, or with the model-free simulation when --simulated is passed"))
430
430
  .argument("<runId>", "Run id")
431
431
  .option("--simulated", "Use the model-free simulation producer")
432
432
  .option("--wait", "Wait until a drive receipt is recorded; exits 0 only for a VERIFIED COMPLETED settlement")
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Interactive post-init setup for workflow-guide agents and workflows.
3
3
  *
4
- * Source of truth: `docs/workflow-guide.md`. The catalog below transcribes the
4
+ * Source of truth: `docs/reference/workflow-catalog.md`. The catalog below transcribes the
5
5
  * software-engineering area (workflows, stages, role slugs, and the guide's
6
6
  * ordered candidate lists). Guide candidates are dated research; each role's
7
7
  * first candidate whose harness is installed AND authenticated wins. No
@@ -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.94";
14
+ const VERSION = "0.7.96";
15
15
  const CONFIGURE_PLUGIN = "/plugin configure kxm@kxm";
16
16
  const inbox = new Map<string, MessageRecord>();
17
17
  const notifiedInbox = new Set<string>();
@@ -99,7 +99,7 @@ export const DEFAULT_MODES_CONFIG: ModesConfig = Object.freeze({
99
99
  browser: {
100
100
  description: "Web application exploration, screenshotting, and UI testing",
101
101
  baseTools: ["read", "bash"],
102
- contextFiles: ["docs/browser-automation.md"],
102
+ contextFiles: ["docs/guides/browser-automation.md"],
103
103
  thinkingLevel: "medium" as const,
104
104
  model: "grok/grok-4.6",
105
105
  },
package/schemas/README.md CHANGED
@@ -28,7 +28,7 @@ Runtime-local records, and JSON events/results for the planned KXM contract.
28
28
  one validation layer; cross-file references, state-machine semantics,
29
29
  permission diffs, model diversity, path portability, and snapshot reproduction
30
30
  are deterministic semantic checks described in
31
- [`docs/contracts/validation.md`](../../docs/contracts/validation.md).
31
+ [`docs/contracts/validation.md`](../docs/contracts/validation.md).
32
32
 
33
33
  Unknown fields fail closed. A new field requires a reviewed schema revision;
34
34
  do not add generic metadata escape hatches to event or synchronization payloads.