@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
@@ -2,9 +2,9 @@
2
2
  schema: "kxm.doc.v1"
3
3
  id: "RB-0001"
4
4
  type: "runbook"
5
- title: "Operational Runbook Title"
5
+ title: "Operational runbook title"
6
6
  project: "kxm"
7
- status: "approved"
7
+ status: "draft" # draft | in_review | approved | superseded | archived
8
8
  owner: "@ops"
9
9
  created: "2026-09-08"
10
10
  updated: "2026-09-08"
@@ -14,60 +14,68 @@ summary: "Procedures for diagnosing and mitigating <operational incident>."
14
14
  tags: ["operations", "runbook", "triage"]
15
15
  related: []
16
16
  details:
17
- service: "hub"
17
+ service: "hub" # hub | runtime | worker | plugin
18
18
  target_environment: "local-or-server"
19
19
  ---
20
20
 
21
- # Operational Runbook: <Incident / Procedure Name>
21
+ # Operational runbook: <incident or procedure name>
22
22
 
23
- ## Symptoms & Alerts
23
+ ## Symptoms and alerts
24
24
 
25
- - **Alert / Observable Signal:** <Describe alert, log error code, or metric spike>
25
+ - **Observable signal:** <alert, log event, error code, or metric>
26
+ - **Impact:** <stuck workflow run, idle worker, refused sync, or failed signal>
26
27
 
27
- - **Impact:** <Worker starvation, stuck approval, or failed signal dispatch>
28
+ ## Triage
28
29
 
29
- ## Triage & Diagnostic Steps
30
+ Check the hub first, then the Runtime, then the workers.
30
31
 
31
32
  ```mermaid
32
33
  flowchart TD
33
- Detect[Alert Detected] --> CheckHub{Is kxm hub running?}
34
- CheckHub -->|No| Restart[Run kxm hub start]
35
- CheckHub -->|Yes| CheckDB{Is SQLite DB locked?}
36
- CheckDB -->|Yes| ClearLocks[Check .git/*.lock & WAL mode]
37
- CheckDB -->|No| CheckLogs[Inspect .kxm/logs/telemetry.jsonl]
38
-
34
+ Detect[Signal detected] --> Hub{kxm hub view healthy?}
35
+ Hub -->|No| Start[Restart the hub]
36
+ Hub -->|Yes| Runtime{kxm runtime status running?}
37
+ Runtime -->|No| RtStart[kxm runtime start]
38
+ Runtime -->|Yes| Procs["Inspect workers in kxm dash --screen procs"]
39
+ Procs --> Logs[Read .kxm/logs/ for the failing component]
39
40
  ```
40
41
 
41
- *Triage decision tree: Verify hub daemon health, inspect database locks, and triage worker logs.*
42
-
43
- 1. **Verify Hub Daemon Status:**
42
+ 1. Check hub health and readiness:
44
43
 
45
44
  ```bash
46
45
  kxm hub view
47
46
  ```
48
47
 
49
- 2. **Inspect Active Worker Processes:**
48
+ 2. Check the Runtime supervisor:
50
49
 
51
50
  ```bash
52
- kxm procs --json
51
+ kxm runtime status
53
52
  ```
54
53
 
55
- 3. **Check SQLite Integrity:**
54
+ 3. Inspect supervised worker processes:
56
55
 
57
56
  ```bash
58
- sqlite3 .kxm/state/kxm.db "PRAGMA integrity_check;"
57
+ kxm dash --screen procs
59
58
  ```
60
59
 
61
- ## Safe Mitigation Commands
60
+ 4. Check SQLite integrity, read-only, after taking a backup:
62
61
 
63
- | Issue | Remediation Command | Expected Outcome |
64
- |---|---|---|
65
- | Orphaned Worktree Lock | `rm -f .git/kxm-worktree.lock` | Restores concurrent worktree creation |
66
- | Stale Dispatched Effect | `kxm routing unquarantine <routeId>` | Restores model route to roster |
67
- | Stuck Active Run | `kxm workflow signal <runId> cancel` | Safely aborts and cleans up attempt token |
62
+ ```bash
63
+ kxm backup --out <backup-dir>
64
+ sqlite3 -readonly .kxm/state/kxm.db "PRAGMA integrity_check;"
65
+ ```
66
+
67
+ ## Safe mitigation commands
68
68
 
69
- ## Rollback & Escalation
69
+ | Issue | Command | Expected outcome |
70
+ |---|---|---|
71
+ | Hub unhealthy or wedged | `kxm hub stop`, then `kxm hub start` | Hub restarts; queued messages are pushed again until acknowledged, and delivered messages are not replayed |
72
+ | Runtime run stuck | `kxm runs cancel <run-id>` | A durable cancellation request is recorded for the run |
73
+ | Model route misbehaving | `kxm routes disable --model <provider/model>` | The route moves to the disabled list in `.kxm/routes.yaml`; commit it |
74
+ | Sync rows refused by the hub | Fix the hub-side cause, then `kxm runtime sync-retry` | Refused outbox rows are queued again |
75
+ | Hub workflow waiting on a lost callback | `kxm gate signal <run-id> <signal-key> failed "<summary>"` | The wait settles with a `failed` result; needs the callback secret |
70
76
 
71
- - **Rollback Procedure:** <Exact command to restore previous database backup: `kxm restore <backup>`>
77
+ ## Rollback and escalation
72
78
 
73
- - **Escalation Path:** <Primary on-call or human operator contact>
79
+ - **Rollback:** restore the last verified backup with
80
+ `kxm restore <manifest>` while the hub is stopped.
81
+ - **Escalation:** <primary on-call or human operator contact>
@@ -2,7 +2,7 @@
2
2
  schema: "kxm.doc.v1"
3
3
  id: "TEST-0001"
4
4
  type: "test_plan"
5
- title: "Test Plan for Feature / Refactor"
5
+ title: "Test plan: <feature or refactor>"
6
6
  project: "kxm"
7
7
  status: "draft" # draft | in_review | approved | superseded | archived
8
8
  owner: "@owner"
@@ -18,9 +18,9 @@ details:
18
18
  target_suite: "core" # core | simulations | complete
19
19
  ---
20
20
 
21
- # Test Plan: <Feature / Refactor Name>
21
+ # Test plan: <Feature / refactor name>
22
22
 
23
- ## Objective & Scope
23
+ ## Objective and scope
24
24
 
25
25
  - **Feature / Change Under Test:** <Link to FEAT-xx, BUG-xx, or ARCH-xx>
26
26
 
@@ -28,34 +28,30 @@ details:
28
28
 
29
29
  - **Excluded Behavior:** <Explicitly list deferred or out-of-scope scenarios>
30
30
 
31
- ## Risks & Coverage Strategy
31
+ ## Risks and coverage strategy
32
32
 
33
33
  | Risk / Failure Mode | Test Tier | Rationale for Selected Coverage | Target File |
34
-
35
34
  |---|---|---|---|
36
35
  | Race condition on git index | Unit (Concurrency) | Immediate lock failure detection | `test/core/external-effects.test.ts` |
37
-
38
36
  | Context packet token overflow | Unit (Arbiter) | Verifies token pruning order | `test/core/context-packet.test.ts` |
39
- | Multi-agent peer deadlock | Simulation | Replays multi-turn timeout | `test/simulations/deadlock.test.ts` |
37
+ | Multi-agent peer deadlock | Simulation | Replays multi-turn timeout | `test/simulations/<scenario>.test.ts` |
40
38
 
41
- ## Test Environment & Preconditions
39
+ ## Test environment and preconditions
42
40
 
43
- - **Runtime:** Node 22.19.0 / Node 24.15.0
41
+ - **Runtime:** Node 22.19 or newer on the 22 line, and Node 24
44
42
 
45
- - **Database Fixture:** In-memory `:memory:` SQLite or isolated `.kxm/tmp/test.db`
43
+ - **Database Fixture:** In-memory `:memory:` SQLite, or a database under a `mkdtemp` directory
46
44
 
47
45
  - **Harness Preflight:** `kxm harness list` verifying mock or native CLI status
48
46
 
49
- ## Detailed Test Cases
47
+ ## Detailed test cases
50
48
 
51
49
  | Case ID | Requirement | Precondition | Test Action | Expected Result |
52
-
53
50
  |---|---|---|---|---|
54
- | TC-01 | REQ-01 | Clean database | Call `claimEffect()` twice concurrently | One succeeds, one returns `ok: false, conflict: true` |
55
-
51
+ | TC-01 | REQ-01 | Clean database | Call `claimEffect()` twice for one effect key | The first claim succeeds; the second is refused |
56
52
  | TC-02 | REQ-02 | Valid lease | Call `commitEffect()` with effect key | Status transitions to `confirmed` |
57
53
 
58
- ## Test Execution Workflow
54
+ ## Test execution workflow
59
55
 
60
56
  ```mermaid
61
57
  flowchart LR
@@ -68,20 +64,17 @@ flowchart LR
68
64
 
69
65
  *Verification flow: Build runtime artifacts, run core tests, enforce types and linting, and verify generated dist files match staged index.*
70
66
 
71
- ## Execution Commands
67
+ ## Execution commands
72
68
 
73
69
  | Suite | Command | Expected Output |
74
-
75
70
  |---|---|---|
76
- | Core Tests | `npm run test:core` | `tests >= 1008, fail 0` |
77
-
71
+ | Core Tests | `npm run test:core` | `# fail 0` |
78
72
  | Typecheck | `npm run typecheck` | Clean exit code 0 |
79
- | Docs Lint | `npm run lint:docs` | `0 issues in 0 files` |
80
-
73
+ | Docs Lint | `npm run lint:docs` | `Summary: 0 issues` |
81
74
  | Generated Dist | `npm run check:generated` | `generated artifacts are tracked and current` |
82
75
 
83
- ## Entry & Exit Criteria
76
+ ## Entry and exit criteria
84
77
 
85
78
  - **Entry Criteria:** Clean git working tree; `npm run build` succeeds without warnings.
86
79
 
87
- - **Exit Criteria:** All test cases pass with zero failures; coverage thresholds met (lines >= 92%, branches >= 80%).
80
+ - **Exit Criteria:** All test cases pass with zero failures; coverage floors met (91% lines, 80% branches, 92% functions for `npm run test:coverage`).
@@ -2,7 +2,7 @@
2
2
  schema: "kxm.doc.v1"
3
3
  id: "REP-0001"
4
4
  type: "test_report"
5
- title: "Test Execution Witness Report"
5
+ title: "Test execution witness report"
6
6
  project: "kxm"
7
7
  status: "approved" # draft | approved | archived
8
8
  owner: "@verifier"
@@ -20,52 +20,49 @@ details:
20
20
  branch: "kxm/run-<id>-<description>"
21
21
  ---
22
22
 
23
- # Test Execution Witness Report
23
+ # Test execution witness report
24
24
 
25
- ## Metadata & Execution Environment
25
+ ## Metadata and execution environment
26
26
 
27
27
  - **Tested Commit:** `<git-sha>`
28
28
 
29
29
  - **Active Branch:** `kxm/run-<id>-<description>`
30
30
 
31
- - **Test Plan:** [`TEST-0001`](../testing/plans/TEST-0001.md)
31
+ - **Test Plan:** `TEST-0001` (`<path to the test plan>`)
32
32
 
33
33
  - **Executed At:** `2026-09-08T15:45:00Z`
34
34
 
35
35
  - **Verifier:** `npm run verify` witness gate runner
36
36
 
37
- - **OS & Runtime:** macOS / Node v24.15.0
37
+ - **OS & Runtime:** `<operating system>` / Node `<version>`
38
38
 
39
- ## Summary of Results
39
+ ## Summary of results
40
40
 
41
- | Suite | Total Tests | Passed | Failed | Skipped | Duration | Status |
41
+ Replace the example values below with the run's actual counts.
42
42
 
43
+ | Suite | Total Tests | Passed | Failed | Skipped | Duration | Status |
43
44
  |---|---|---|---|---|---|---|
44
45
  | `test:core` | 1008 | 1003 | 0 | 5 (Windows) | 271s | PASS |
45
-
46
46
  | `typecheck` | N/A | N/A | 0 | 0 | 3s | PASS |
47
47
  | `lint:docs` | 57 files | 57 | 0 | 0 | 2s | PASS |
48
-
49
48
  | `check:generated` | 14 files | 14 | 0 | 0 | 4s | PASS |
50
49
 
51
- ## Test Case Execution Details
50
+ ## Test case execution details
52
51
 
53
52
  | Case ID | Suite File | Result | Duration | Artifact Reference |
54
-
55
53
  |---|---|---|---|---|
56
54
  | TC-01 | `test/core/external-effects.test.ts` | PASS | 1.8ms | `artifact:.kxm/assets/witness.log@sha256:...` |
57
-
58
55
  | TC-02 | `test/core/context-packet.test.ts` | PASS | 0.9ms | `artifact:.kxm/assets/witness.log@sha256:...` |
59
56
 
60
- ## Test Coverage Metrics
57
+ ## Test coverage metrics
61
58
 
62
- - **Line Coverage:** 92.4% (Threshold: >= 92%)
59
+ - **Line Coverage:** 92.4% (floor: 91%)
63
60
 
64
- - **Branch Coverage:** 81.2% (Threshold: >= 80%)
61
+ - **Branch Coverage:** 81.2% (floor: 80%)
65
62
 
66
- - **Function Coverage:** 93.5% (Threshold: >= 93%)
63
+ - **Function Coverage:** 93.5% (floor: 92%)
67
64
 
68
- ## Verdict & Recommendation
65
+ ## Verdict and recommendation
69
66
 
70
67
  - **Witness Verdict:** **VERIFIED PASS**
71
68
 
@@ -2,7 +2,11 @@
2
2
 
3
3
  These examples demonstrate the transport without requiring an AI model. Run them from the repository root after `npm ci`.
4
4
 
5
- The [`.kxm/workflows/default.yaml`](../.kxm/workflows/default.yaml) workspace configuration is a production-oriented definition for a long-lived coordinator. It covers reproduction, single-agent or three-agent planning, plan review, implementation, local and repository gates, documentation, push/watch retries, merge, Jira update, and continuous improvement. Follow [Webhook workflows](../docs/webhook-workflows.md) to configure it.
5
+ The [`webhook-workflows/jira-development.json`](webhook-workflows/jira-development.json)
6
+ definition turns a signed Jira `issue_updated` webhook into a five-stage hub
7
+ workflow run for a long-lived coordinator: reproduce, plan, implement, checks,
8
+ and report. Follow [Webhook workflows](../docs/guides/webhook-workflows.md) to
9
+ configure it.
6
10
 
7
11
  The [`workflow-signal.ts`](workflow-signal.ts) sender demonstrates the signed callback that resumes a coordinator after CI, review, merge, or Jira work completes. The webhook guide documents its required environment and arguments.
8
12
 
@@ -12,12 +16,12 @@ one exact run, stage, requirement, and attempt, while demonstrating an optional
12
16
  admin-approved one-peer degradation. Its tested topology is project
13
17
  `provenance-demo`, coordinator `coordinator`, and reviewers `reviewer-claude`
14
18
  and `reviewer-grok`. Follow
15
- [Peer provenance and quorum gates](../docs/provenance-gates.md) for the complete
19
+ [Peer provenance and quorum gates](../docs/guides/provenance-gates.md) for the complete
16
20
  runbook and trust boundary.
17
21
 
18
- The [`runtime`](kxm/README.md) directory is a machine-validated planned-contract
19
- fixture for the local-first KXM architecture. Production configuration
20
- loader tests consume it, but no current Runtime executes its workflows.
22
+ The [`project`](project/README.md) directory is a machine-validated project
23
+ fixture for the local-first KXM contracts. The configuration loader and
24
+ workflow compiler tests consume it.
21
25
 
22
26
  ## Self-contained round trip
23
27
 
@@ -11,7 +11,7 @@
11
11
  {
12
12
  "id": "review",
13
13
  "label": "Independent review",
14
- "instructions": "Ask both eligible reviewers independently with one kxm_fanout call. Set correlationId to the exact run ID, timeoutMs to 120000, and idempotencyKeyPrefix to the deterministic value provenance-review:<runId>:review:<attempt>. The tool call itself must include workflowContext for this run, stage review, requirement independent peer reviews, and the current attempt; stating that context in a plan is not sufficient. Treat every returned messageId as the durable handle immediately. Use kxm_get to verify each stored message has the exact run, stage, requirement, and attempt binding. For every pending reply, call kxm_await with that messageId and timeoutMs 120000; never replace pending work with a new idempotency prefix. On interruption or uncertain delivery, repeat the exact fanout parameters so the hub returns the same messages. Re-read and verify each durable message after it replies. Compare findings, record contradictions and the chosen resolution, then cite only the bound durable replied message IDs.",
14
+ "instructions": "Ask both eligible reviewers independently with one kxm_fanout call. Set correlationId to the exact run ID, timeoutMs to 120000, and idempotencyKeyPrefix to the deterministic value provenance-review:<runId>:review:<attempt>. The tool call itself must include workflowContext for this run, stage review, requirement independent peer reviews, and the current attempt; stating that context in a plan is not sufficient. Treat every returned messageId as the durable handle immediately. Use kxm_get to verify each stored message has the exact run, stage, requirement, and attempt binding. For every pending reply, call kxm_await with that messageId and timeoutMs 60000 (its maximum), repeating the call while it stays pending; never replace pending work with a new idempotency prefix. On interruption or uncertain delivery, repeat the exact fanout parameters so the hub returns the same messages. Re-read and verify each durable message after it replies. Compare findings, record contradictions and the chosen resolution, then cite only the bound durable replied message IDs.",
15
15
  "requiredEvidence": [
16
16
  "independent peer reviews",
17
17
  "coordinator decision"
@@ -0,0 +1,59 @@
1
+ [
2
+ {
3
+ "id": "jira-development",
4
+ "source": "jira",
5
+ "project": "product",
6
+ "target": "coordinator",
7
+ "secretEnv": "JIRA_WEBHOOK_SECRET",
8
+ "signalSecretEnv": "WORKFLOW_SIGNAL_SECRET",
9
+ "event": "jira:issue_updated",
10
+ "filter": {
11
+ "path": "issue.fields.status.name",
12
+ "equals": "In Progress"
13
+ },
14
+ "delivery": "followUp",
15
+ "promptTemplate": "Jira issue {{issue.key}} moved to In Progress: {{issue.fields.summary}}. Deliver a reviewed fix on a branch and a pull request. Do not merge.",
16
+ "stages": [
17
+ {
18
+ "id": "reproduce",
19
+ "label": "Reproduce",
20
+ "instructions": "Reproduce the reported behavior with a deterministic failing test or script before changing product code. Cite the test path and the failing command.",
21
+ "requiredEvidence": ["reproduction"],
22
+ "maxAttempts": 3,
23
+ "area": "implementation"
24
+ },
25
+ {
26
+ "id": "plan",
27
+ "label": "Plan and review",
28
+ "instructions": "Write a bounded plan with file ownership. Ask one peer to review it with kxm_send, record contradictions and decisions with kxm_workflow_record, and revise the plan before implementing.",
29
+ "requiredEvidence": ["plan", "plan review"],
30
+ "maxAttempts": 3,
31
+ "area": "workflow"
32
+ },
33
+ {
34
+ "id": "implement",
35
+ "label": "Implement and verify locally",
36
+ "instructions": "Implement the plan. Run lint, typecheck, and the test suite, and make the reproduction pass. Cite each command and its result.",
37
+ "requiredEvidence": ["changed files", "local checks"],
38
+ "maxAttempts": 3,
39
+ "area": "implementation"
40
+ },
41
+ {
42
+ "id": "checks",
43
+ "label": "Pull request checks",
44
+ "instructions": "Push the branch and open or update the pull request. Then call kxm_workflow_wait on this stage with signal key github-pr-<number>-checks and settle your turn. An operator or CI job runs kxm gate github watch, which posts the signed result.",
45
+ "requiredEvidence": ["github.check:ci"],
46
+ "maxAttempts": 3,
47
+ "area": "gates"
48
+ },
49
+ {
50
+ "id": "report",
51
+ "label": "Update Jira and record lessons",
52
+ "instructions": "Comment on the Jira issue with the pull request link and the evidence summary, using your own authorized Jira tool. Record at least one lesson with kxm_workflow_record. Do not merge the pull request.",
53
+ "requiredEvidence": ["jira comment", "lessons"],
54
+ "maxAttempts": 2,
55
+ "area": "documentation"
56
+ }
57
+ ]
58
+ }
59
+ ]
@@ -0,0 +1,12 @@
1
+ {
2
+ "webhookEvent": "jira:issue_updated",
3
+ "issue": {
4
+ "key": "PROD-123",
5
+ "fields": {
6
+ "summary": "Checkout total ignores the discount code",
7
+ "status": {
8
+ "name": "In Progress"
9
+ }
10
+ }
11
+ }
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontextmind/kxm",
3
- "version": "0.7.94",
3
+ "version": "0.7.96",
4
4
  "description": "KXM local-first multi-agent orchestration and operator dashboard",
5
5
  "type": "module",
6
6
  "author": "KontextMind",
@@ -48,7 +48,7 @@
48
48
  "verify": "npm test && npm run check && npm run check:generated",
49
49
  "validate:claude": "claude plugin validate . --strict && claude plugin validate plugins/kxm --strict",
50
50
  "validate:ci": "npm run test:coverage && npm run check && npm pack --dry-run",
51
- "validate:pr": "npm run test:core && npm run check && npm run check:generated",
51
+ "validate:pr": "npm run build && npm run typecheck && node --disable-warning=ExperimentalWarning --experimental-strip-types --test --test-concurrency=4 test/core/artifacts-exist.test.ts test/core/ci-contract.test.ts test/core/envelope.test.ts test/core/envelope-contract.test.ts test/core/protocol.test.ts test/core/repo-root.test.ts test/core/routes-count.test.ts test/core/smoke.test.ts test/core/version-surfaces.test.ts && npm run check:versions && node scripts/check-generated.mjs",
52
52
  "validate": "npm run validate:ci && npm run validate:claude",
53
53
  "test:packages": "npx nx run-many -t test --output-style=static",
54
54
  "check:packages": "npx nx run-many -t build,test:coverage,typecheck --output-style=static",
@@ -5,7 +5,7 @@ one input decoder, one contribution registry, and thin host adapters.
5
5
 
6
6
  `kxm dash` and every configuration surface draw from here so a field looks,
7
7
  keys, and fails the same way across the product. Guide:
8
- [`docs/tui-components.md`](../../../docs/tui-components.md).
8
+ [`docs/tui-components.md`](../../../docs/contributing/tui-components.md).
9
9
 
10
10
  ## Layout
11
11
 
@@ -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.94",
5
+ "version": "0.7.96",
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",