@kontextmind/kxm 0.7.95 → 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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.kxm/README.md +39 -9
- package/CHANGELOG.md +1 -1
- package/README.md +147 -257
- package/SECURITY.md +21 -12
- package/docs/README.md +133 -54
- package/docs/adr/ADR-0002-browser-automation-steel-doks.md +24 -18
- package/docs/adr/ADR-0003-sqlite-only-store.md +100 -0
- package/docs/adr/ADR-0004-edge-identity-authentik.md +99 -0
- package/docs/adr/README.md +33 -0
- package/docs/concepts/architecture.md +262 -0
- package/docs/concepts/data-and-storage.md +194 -0
- package/docs/concepts/trust-model.md +152 -0
- package/docs/contracts/README.md +22 -14
- package/docs/contracts/effects-and-recovery.md +3 -0
- package/docs/contracts/migration.md +2 -2
- package/docs/contracts/routing.md +6 -5
- package/docs/contributing/assignment-runner.md +388 -0
- package/docs/contributing/ci-and-release.md +231 -0
- package/docs/contributing/development.md +362 -0
- package/docs/contributing/harness-routing-internals.md +192 -0
- package/docs/{packages.md → contributing/packages.md} +13 -15
- package/docs/{skills → contributing}/repo-work-delivery.md +20 -21
- package/docs/contributing/test-matrix.md +208 -0
- package/docs/{tui-components.md → contributing/tui-components.md} +30 -22
- package/docs/contributing/writing-docs.md +340 -0
- package/docs/glossary.md +471 -0
- package/docs/guides/agent-skills.md +137 -0
- package/docs/guides/browser-automation.md +160 -0
- package/docs/guides/context-and-memory.md +352 -0
- package/docs/guides/continuous-improvement.md +228 -0
- package/docs/guides/governed-skills.md +173 -0
- package/docs/guides/nous-providers.md +186 -0
- package/docs/guides/peer-messaging.md +304 -0
- package/docs/guides/pi-workers.md +219 -0
- package/docs/guides/provenance-gates.md +313 -0
- package/docs/guides/webhook-workflows.md +364 -0
- package/docs/kb/how-credentials-retrieved-safely.md +38 -12
- package/docs/kb/how-to-capture-and-annotate-section.md +15 -13
- package/docs/kb/how-to-connect-playwright-to-steel.md +16 -11
- package/docs/kb/how-to-recover-expired-session-or-orphan.md +26 -16
- package/docs/kb/how-to-resume-after-mfa.md +19 -11
- package/docs/kb/how-to-take-over-session.md +17 -13
- package/docs/kb/why-authentication-disappeared.md +22 -14
- package/docs/kb/why-automation-opened-different-browser.md +23 -14
- package/docs/kb/why-session-viewer-cannot-control.md +13 -12
- package/docs/operations/backup-and-restore.md +248 -0
- package/docs/operations/deploy.md +307 -0
- package/docs/operations/monitoring.md +209 -0
- package/docs/operations/runtime-sync.md +192 -0
- package/docs/operations/troubleshooting.md +265 -0
- package/docs/operations/upgrade.md +124 -0
- package/docs/prompts/browser-annotate-feedback.md +7 -7
- package/docs/prompts/browser-diagnose-recover.md +11 -10
- package/docs/prompts/browser-explore.md +7 -7
- package/docs/prompts/browser-repro-fix.md +7 -7
- package/docs/prompts/browser-start.md +12 -11
- package/docs/prompts/browser-takeover.md +8 -8
- package/docs/{cli-reference.md → reference/cli-reference.md} +83 -41
- package/docs/{config-reference.md → reference/config-reference.md} +159 -148
- package/docs/reference/configuration.md +299 -0
- package/docs/reference/harness-routing.md +508 -0
- package/docs/reference/http-api.md +203 -0
- package/docs/reference/tools.md +370 -0
- package/docs/{workflow-guide.md → reference/workflow-catalog.md} +92 -153
- package/docs/reference/workflow-definitions.md +286 -0
- package/docs/start/first-workflow.md +287 -0
- package/docs/start/install.md +146 -0
- package/docs/start/quickstart-claude-code.md +405 -0
- package/docs/start/quickstart-pi.md +213 -0
- package/docs/templates/README.md +78 -73
- package/docs/templates/adr.md +13 -13
- package/docs/templates/architecture.md +55 -71
- package/docs/templates/bug-fix.md +13 -16
- package/docs/templates/feature.md +14 -19
- package/docs/templates/handoff.md +44 -46
- package/docs/templates/postmortem.md +30 -43
- package/docs/templates/research.md +15 -20
- package/docs/templates/review.md +49 -50
- package/docs/templates/runbook.md +38 -30
- package/docs/templates/test-plan.md +16 -23
- package/docs/templates/test-report.md +14 -17
- package/examples/README.md +9 -5
- package/examples/provenance-workflow.json +1 -1
- package/examples/webhook-workflows/jira-development.json +59 -0
- package/examples/webhook-workflows/jira-issue-updated.json +12 -0
- package/package.json +1 -1
- package/packages/core/tui/README.md +1 -1
- package/plugins/kxm/.claude-plugin/plugin.json +1 -1
- package/plugins/kxm/README.md +31 -32
- package/plugins/kxm/dist/cli.js +5 -5
- package/plugins/kxm/dist/mcp-server.js +1 -1
- package/plugins/kxm/dist/runtime.js +1 -1
- package/plugins/kxm/package.json +1 -1
- package/plugins/kxm/skills/kxm/references/protocol.md +3 -1
- package/plugins/kxm/skills/kxm-browser-auth/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-browser-diagnostics/SKILL.md +5 -5
- package/plugins/kxm/skills/kxm-browser-explore/SKILL.md +2 -2
- package/plugins/kxm/skills/kxm-browser-session/SKILL.md +10 -13
- package/plugins/kxm/skills/kxm-browser-takeover/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-browser-verify/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-context-memory/SKILL.md +13 -4
- package/plugins/kxm/skills/kxm-hub-ops/SKILL.md +3 -1
- package/plugins/kxm/skills/kxm-mind-setup/SKILL.md +2 -1
- package/plugins/kxm/skills/kxm-project-setup/SKILL.md +31 -54
- package/plugins/kxm/skills/kxm-projects/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-protocol/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-routing-improve/SKILL.md +15 -7
- package/plugins/kxm/skills/kxm-runs/SKILL.md +11 -5
- package/plugins/kxm/skills/kxm-session/SKILL.md +1 -1
- package/plugins/kxm/skills/kxm-tasks/SKILL.md +9 -7
- package/plugins/kxm/skills/kxm-workflow/SKILL.md +10 -2
- package/plugins/kxm/src/cli/system.ts +1 -1
- package/plugins/kxm/src/cli.ts +3 -3
- package/plugins/kxm/src/init-guide-setup.ts +1 -1
- package/plugins/kxm/src/mcp-server.ts +1 -1
- package/plugins/kxm/src/modes.ts +1 -1
- package/schemas/README.md +1 -1
- package/docs/agent-communication-envelopes-and-gates.md +0 -553
- package/docs/agent-skills.md +0 -198
- package/docs/architecture.md +0 -245
- package/docs/assignment-runner.md +0 -264
- package/docs/browser-automation.md +0 -139
- package/docs/configuration.md +0 -437
- package/docs/continuous-improvement.md +0 -226
- package/docs/getting-started.md +0 -277
- package/docs/harness-routing.md +0 -616
- package/docs/kb/qa-authentik-authentication.md +0 -97
- package/docs/kb/qa-extension-install-and-hub-bootstrap.md +0 -85
- package/docs/kb/qa-hub-on-a-public-host.md +0 -48
- package/docs/kb/qa-sqlite-vs-duckdb.md +0 -35
- package/docs/kb/qa-what-the-hub-stores.md +0 -64
- package/docs/kxm-handbook.md +0 -1181
- package/docs/operations.md +0 -510
- package/docs/operator-pi-packages.md +0 -67
- package/docs/provenance-gates.md +0 -295
- package/docs/skills.md +0 -47
- package/docs/test-matrix.md +0 -132
- package/docs/troubleshooting.md +0 -322
- package/docs/webhook-workflows.md +0 -240
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
schema: "kxm.doc.v1"
|
|
3
3
|
id: "BUG-0001"
|
|
4
4
|
type: "bug"
|
|
5
|
-
title: "
|
|
5
|
+
title: "Bug: <observable failure>"
|
|
6
6
|
project: "kxm"
|
|
7
7
|
status: "draft" # draft | in_review | approved | superseded | archived
|
|
8
8
|
owner: "@owner"
|
|
@@ -19,9 +19,9 @@ details:
|
|
|
19
19
|
reproducibility: "always" # always | intermittent | environment_specific
|
|
20
20
|
---
|
|
21
21
|
|
|
22
|
-
# Bug: <Observable
|
|
22
|
+
# Bug: <Observable failure / defect summary>
|
|
23
23
|
|
|
24
|
-
## Impact
|
|
24
|
+
## Impact and affected scope
|
|
25
25
|
|
|
26
26
|
- **User / Operator Impact:** <What fails, crashes, or produces incorrect outputs?>
|
|
27
27
|
|
|
@@ -29,35 +29,35 @@ details:
|
|
|
29
29
|
|
|
30
30
|
- **Workaround:** <Temporary safe mitigation if available>
|
|
31
31
|
|
|
32
|
-
## Expected
|
|
32
|
+
## Expected and actual behavior
|
|
33
33
|
|
|
34
34
|
- **Expected:** <Precise, observable contract expectation>
|
|
35
35
|
|
|
36
36
|
- **Actual:** <Exact error message, stack trace, or wrong output>
|
|
37
37
|
|
|
38
|
-
## Environment
|
|
38
|
+
## Environment and baseline state
|
|
39
39
|
|
|
40
40
|
- **Baseline Commit:** `<git-sha-before-fix>`
|
|
41
41
|
|
|
42
|
-
- **Node
|
|
42
|
+
- **Node version:** `<for example 22.19.0 or 24>`
|
|
43
43
|
|
|
44
44
|
- **Active Harness / Model:** `<Harness and model if relevant>`
|
|
45
45
|
|
|
46
46
|
- **OS:** `macOS / Linux`
|
|
47
47
|
|
|
48
|
-
## Mandatory
|
|
48
|
+
## Mandatory reproduction before the fix
|
|
49
49
|
|
|
50
50
|
To prevent phantom fixes, a failing reproduction test MUST be established before modifying production code:
|
|
51
51
|
|
|
52
52
|
- **Failing Test File:** `test/core/<bug-name>.test.ts`
|
|
53
53
|
|
|
54
|
-
- **Reproduction Command:** `node --test test/core/<bug-name>.test.ts`
|
|
54
|
+
- **Reproduction Command:** `node --disable-warning=ExperimentalWarning --experimental-strip-types --test test/core/<bug-name>.test.ts`
|
|
55
55
|
|
|
56
56
|
- **Baseline Observed Result:** `FAIL` (exit code 1)
|
|
57
57
|
|
|
58
58
|
- **Repro Failure Receipt:** `artifact:.kxm/assets/repro-fail.log@sha256:...`
|
|
59
59
|
|
|
60
|
-
## Failure
|
|
60
|
+
## Failure path sequence
|
|
61
61
|
|
|
62
62
|
```mermaid
|
|
63
63
|
sequenceDiagram
|
|
@@ -74,7 +74,7 @@ sequenceDiagram
|
|
|
74
74
|
|
|
75
75
|
*Failure sequence: Unhandled contention leads to ungraceful crash instead of deterministic retry or clean fail-closed error.*
|
|
76
76
|
|
|
77
|
-
## Root
|
|
77
|
+
## Root cause analysis
|
|
78
78
|
|
|
79
79
|
- **Immediate Cause:** <What line or condition directly triggered the symptom?>
|
|
80
80
|
|
|
@@ -82,7 +82,7 @@ sequenceDiagram
|
|
|
82
82
|
|
|
83
83
|
- **Rejected Hypotheses:** <What initial assumptions were investigated and ruled out?>
|
|
84
84
|
|
|
85
|
-
## Proposed
|
|
85
|
+
## Proposed fix and contract changes
|
|
86
86
|
|
|
87
87
|
- **Code Changes:** <Summary of modifications to code or schemas>
|
|
88
88
|
|
|
@@ -90,19 +90,16 @@ sequenceDiagram
|
|
|
90
90
|
|
|
91
91
|
- **Security / Isolation:** <Does the fix maintain fail-closed invariants?>
|
|
92
92
|
|
|
93
|
-
## Verification
|
|
93
|
+
## Verification witness matrix
|
|
94
94
|
|
|
95
95
|
| Verification Check | Target Commit / Tree | Expected Result | Actual Result | Witness Artifact |
|
|
96
|
-
|
|
97
96
|
|---|---|---|---|---|
|
|
98
97
|
| Repro Test (Before Fix) | `<baseline-commit>` | FAIL | FAIL | `artifact:...@sha256` |
|
|
99
|
-
|
|
100
98
|
| Repro Test (After Fix) | `<candidate-commit>` | PASS | PASS | `artifact:...@sha256` |
|
|
101
99
|
| Full Core Test Suite | `<candidate-commit>` | 100% PASS | 100% PASS | `npm run test:core` |
|
|
102
|
-
|
|
103
100
|
| Full Verify Gate | `<candidate-commit>` | PASS | PASS | `npm run verify` |
|
|
104
101
|
|
|
105
|
-
## Regression
|
|
102
|
+
## Regression prevention
|
|
106
103
|
|
|
107
104
|
- **Automated Gate Added:** <New unit test or lint check preventing recurrence>
|
|
108
105
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
schema: "kxm.doc.v1"
|
|
3
3
|
id: "FEAT-0001"
|
|
4
4
|
type: "feature"
|
|
5
|
-
title: "Feature
|
|
5
|
+
title: "Feature: <feature name>"
|
|
6
6
|
project: "kxm"
|
|
7
7
|
status: "draft" # draft | in_review | approved | superseded | archived
|
|
8
8
|
owner: "@owner"
|
|
@@ -15,12 +15,12 @@ tags: []
|
|
|
15
15
|
related: []
|
|
16
16
|
details:
|
|
17
17
|
delivery_status: "proposed"
|
|
18
|
-
target_workflow: "feature-
|
|
18
|
+
target_workflow: "build-feature" # a workflow slug from docs/reference/workflow-catalog.md
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
# Feature: <Feature
|
|
21
|
+
# Feature: <Feature name>
|
|
22
22
|
|
|
23
|
-
## Problem
|
|
23
|
+
## Problem and users
|
|
24
24
|
|
|
25
25
|
- **Who needs this:** <Describe primary user persona or operator role>
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ details:
|
|
|
28
28
|
|
|
29
29
|
- **Evidence / Driver:** <User friction, issue link, or performance data demonstrating the need>
|
|
30
30
|
|
|
31
|
-
## Goals
|
|
31
|
+
## Goals and non-goals
|
|
32
32
|
|
|
33
33
|
- **Goals:**
|
|
34
34
|
- <Measurable outcome 1>
|
|
@@ -37,16 +37,14 @@ details:
|
|
|
37
37
|
- **Non-Goals:**
|
|
38
38
|
- <Explicitly excluded behavior or deferred capability>
|
|
39
39
|
|
|
40
|
-
## Requirements
|
|
40
|
+
## Requirements and acceptance criteria
|
|
41
41
|
|
|
42
42
|
| ID | Requirement | Acceptance Criterion (Given / When / Then) | Verification Kind |
|
|
43
|
-
|
|
44
43
|
|---|---|---|---|
|
|
45
44
|
| REQ-01 | <Observable behavior> | Given ..., when ..., then ... | gate / witness |
|
|
46
|
-
|
|
47
45
|
| REQ-02 | <Error or permission boundary> | Given invalid input, when submitted, then fail closed with ... | gate / witness |
|
|
48
46
|
|
|
49
|
-
## User
|
|
47
|
+
## User and execution flow
|
|
50
48
|
|
|
51
49
|
```mermaid
|
|
52
50
|
flowchart LR
|
|
@@ -60,7 +58,7 @@ flowchart LR
|
|
|
60
58
|
|
|
61
59
|
*Flow description: The request is validated against permissions and schema before execution. Invalid calls fail closed with actionable errors.*
|
|
62
60
|
|
|
63
|
-
## Behavior
|
|
61
|
+
## Behavior and interface contracts
|
|
64
62
|
|
|
65
63
|
- **Inputs & CLI Flags:** <Specify syntax and types>
|
|
66
64
|
|
|
@@ -70,24 +68,21 @@ flowchart LR
|
|
|
70
68
|
|
|
71
69
|
- **Concurrency & Idempotency:** <Timeout limits, lock keys, and duplicate dispatch protection>
|
|
72
70
|
|
|
73
|
-
## Quality
|
|
71
|
+
## Quality and resource budgets
|
|
74
72
|
|
|
75
73
|
| Dimension | Target Budget | Measurement Condition | Verification Method |
|
|
76
|
-
|
|
77
74
|
|---|---|---|---|
|
|
78
75
|
| Latency P50 | < e.g., 200ms | Local CLI dispatch | Benchmark test |
|
|
79
|
-
|
|
80
76
|
| Token Budget | < e.g., 8,000 tokens | Context packet compilation | Context Arbiter log |
|
|
81
|
-
| Test Coverage | >=
|
|
77
|
+
| Test Coverage | >= 91% lines, >= 80% branches, >= 92% functions | `npm run test:coverage` | Node test runner (`node:test`) |
|
|
82
78
|
|
|
83
|
-
## Dependencies
|
|
79
|
+
## Dependencies and risks
|
|
84
80
|
|
|
85
81
|
| Dependency / Risk | Potential Impact | Mitigation Strategy | Owner |
|
|
86
|
-
|
|
87
82
|
|---|---|---|---|
|
|
88
83
|
| <Dependency> | <Failure mode> | <Fallback or isolation> | <Role> |
|
|
89
84
|
|
|
90
|
-
## Validation
|
|
85
|
+
## Validation and verification gates
|
|
91
86
|
|
|
92
87
|
- **Unit / Core Suite:** `npm run test:core`
|
|
93
88
|
|
|
@@ -95,7 +90,7 @@ flowchart LR
|
|
|
95
90
|
|
|
96
91
|
- **Combined Commit Gate:** `npm run verify`
|
|
97
92
|
|
|
98
|
-
## Rollout
|
|
93
|
+
## Rollout and rollback
|
|
99
94
|
|
|
100
95
|
- **Rollout Strategy:** <Staged feature flag, CLI release, or workflow gate>
|
|
101
96
|
|
|
@@ -103,6 +98,6 @@ flowchart LR
|
|
|
103
98
|
|
|
104
99
|
- **Rollback Action:** <Git revert or toggle flag>
|
|
105
100
|
|
|
106
|
-
## Open
|
|
101
|
+
## Open questions
|
|
107
102
|
|
|
108
103
|
1. <Unresolved design question, assigned owner, and target decision milestone>
|
|
@@ -2,71 +2,69 @@
|
|
|
2
2
|
schema: "kxm.doc.v1"
|
|
3
3
|
id: "HND-0001"
|
|
4
4
|
type: "handoff"
|
|
5
|
-
title: "Structured
|
|
5
|
+
title: "Structured handoff manifest"
|
|
6
6
|
project: "kxm"
|
|
7
|
-
status: "approved
|
|
8
|
-
owner: "@
|
|
7
|
+
status: "draft" # draft | in_review | approved | superseded | archived
|
|
8
|
+
owner: "@source-role"
|
|
9
9
|
created: "2026-09-08"
|
|
10
10
|
updated: "2026-09-08"
|
|
11
11
|
authority: "evidence"
|
|
12
12
|
confidence: "verified"
|
|
13
|
-
summary: "
|
|
13
|
+
summary: "Handoff from <source-role> to <target-role> for workflow run <run-id>."
|
|
14
14
|
tags: ["handoff", "workflow", "stage-transition"]
|
|
15
15
|
related: []
|
|
16
16
|
details:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
manifest_schema: "kxm.handoff-manifest.v1"
|
|
18
|
+
workflow_run_id: "<run-id>"
|
|
19
|
+
handoff_id: "<handoff-id>"
|
|
20
|
+
intent: "request_review" # request_review | dispatch_fix | request_approval | complete_workflow
|
|
21
|
+
handoff_status: "pending" # pending | accepted | rejected | superseded
|
|
22
|
+
rework_of: null
|
|
20
23
|
---
|
|
21
24
|
|
|
22
|
-
#
|
|
25
|
+
# Handoff: <source-role> to <target-role>
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
> [!IMPORTANT]
|
|
28
|
+
> Planned: the `kxm.handoff-manifest.v1` schema exists, but no KXM command or Runtime step writes handoff manifests yet, so record each handoff by hand.
|
|
25
29
|
|
|
26
|
-
|
|
30
|
+
This page is the readable view of one `kxm.handoff-manifest.v1` record, defined
|
|
31
|
+
in `schemas/handoff-manifest.schema.json`. Keep its field names so the two stay
|
|
32
|
+
aligned.
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
## Stage transition
|
|
29
35
|
|
|
30
|
-
- **
|
|
36
|
+
- **Workflow run ID:** `<run-id>`
|
|
37
|
+
- **Task ID:** `<task-id>`
|
|
38
|
+
- **Source:** role `writer`, agent `<agent-id>`, harness `grok`, model
|
|
39
|
+
`grok-4.6`, step `<step-id>`, attempt `<attempt-id>`
|
|
40
|
+
- **Target:** role `reviewer-arch`, permission `read-only`
|
|
41
|
+
- **Intent:** `request_review` (one of `request_review`, `dispatch_fix`,
|
|
42
|
+
`request_approval`, `complete_workflow`)
|
|
43
|
+
- **Rework of:** `<handoff-id>`, or none
|
|
31
44
|
|
|
32
|
-
|
|
45
|
+
## Repository anchors
|
|
33
46
|
|
|
34
|
-
- **
|
|
47
|
+
- **Base commit:** `<base-commit-sha>`
|
|
48
|
+
- **Candidate tree hash:** `<candidate-tree-sha>`
|
|
49
|
+
- **Branch:** `kxm/run-<run-id>-<description>`
|
|
35
50
|
|
|
36
|
-
##
|
|
51
|
+
## Deliverables
|
|
37
52
|
|
|
38
|
-
- **
|
|
53
|
+
- **Patches:** `artifact:.kxm/assets/<run-id>/changes.patch@sha256:<digest>`
|
|
54
|
+
- **Reports:** `artifact:.kxm/assets/<run-id>/test-report.md@sha256:<digest>`
|
|
55
|
+
- **Artifacts:** `<name>`: `artifact:<path>@sha256:<digest>`
|
|
39
56
|
|
|
40
|
-
|
|
57
|
+
## Verification evidence
|
|
41
58
|
|
|
42
|
-
- **
|
|
59
|
+
- **Witness command:** `npm run verify`
|
|
60
|
+
- **Witness exit code:** `0`
|
|
61
|
+
- **Witness passed:** `true`
|
|
62
|
+
- **Critic verdicts:** `<critic>`: `PASS`, with a one-line summary. The
|
|
63
|
+
manifest accepts `PASS`, `FAIL`, `WARN` or `UNKNOWN`.
|
|
43
64
|
|
|
44
|
-
|
|
65
|
+
## Transferred context
|
|
45
66
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- `artifact:.kxm/assets/changes.patch@sha256:abc...`
|
|
51
|
-
|
|
52
|
-
- `artifact:.kxm/assets/witness.log@sha256:def...`
|
|
53
|
-
|
|
54
|
-
### 2. Witness Receipt
|
|
55
|
-
|
|
56
|
-
- **Command:** `npm run verify`
|
|
57
|
-
|
|
58
|
-
- **Exit Code:** `0`
|
|
59
|
-
|
|
60
|
-
- **Receipt Hash:** `sha256:fedcba0987654321...`
|
|
61
|
-
|
|
62
|
-
## Transferred Context & Decisions
|
|
63
|
-
|
|
64
|
-
- **Settled Decisions:**
|
|
65
|
-
- Used SQLite `external_effects` table for CAS leasing.
|
|
66
|
-
- Implemented descriptive branch slugification with de-duplication.
|
|
67
|
-
|
|
68
|
-
- **Assumptions:**
|
|
69
|
-
- Remote repository branch protection requires PR merge.
|
|
70
|
-
|
|
71
|
-
- **Open Questions / Notes for Target Role:**
|
|
72
|
-
- Please verify memory revision hash changes deterministically when files in `.kxm/memory/` are touched.
|
|
67
|
+
- **Settled decisions:** <decisions the target role must not reopen>
|
|
68
|
+
- **Assumptions:** <assumptions the target role should verify>
|
|
69
|
+
- **Open questions:** <questions for the target role>
|
|
70
|
+
- **Suggested next step:** step `<step-id>`, action `<action>`
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
schema: "kxm.doc.v1"
|
|
3
3
|
id: "PM-0001"
|
|
4
4
|
type: "postmortem"
|
|
5
|
-
title: "Incident
|
|
5
|
+
title: "Incident postmortem: <incident title>"
|
|
6
6
|
project: "kxm"
|
|
7
|
-
status: "approved
|
|
7
|
+
status: "draft" # draft | in_review | approved | superseded | archived
|
|
8
8
|
owner: "@incident-lead"
|
|
9
9
|
created: "2026-09-08"
|
|
10
10
|
updated: "2026-09-08"
|
|
@@ -20,58 +20,45 @@ details:
|
|
|
20
20
|
time_to_mitigate_minutes: 20
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
# Incident
|
|
23
|
+
# Incident postmortem: <incident title>
|
|
24
24
|
|
|
25
|
-
##
|
|
25
|
+
## Summary
|
|
26
26
|
|
|
27
|
-
- **Incident
|
|
27
|
+
- **Incident period:** `<start UTC>` to `<end UTC>` (<duration>)
|
|
28
|
+
- **User impact:** <number of workflow runs blocked or delayed, and for whom>
|
|
29
|
+
- **Root cause:** <one sentence on the failure mechanism>
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- **Root Cause:** <One-sentence summary of failure mechanism>
|
|
32
|
-
|
|
33
|
-
## Incident Timeline (UTC)
|
|
34
|
-
|
|
35
|
-
| Time | Event Description | Detected By |
|
|
31
|
+
## Timeline (UTC)
|
|
36
32
|
|
|
33
|
+
| Time | Event | Detected by |
|
|
37
34
|
|---|---|---|
|
|
38
|
-
|
|
|
39
|
-
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
43
|
-
| 14:30 | Fix committed; lease expiration policy patched | Operator |
|
|
44
|
-
| 14:35 | Hub restarted; all queued workflow runs completed | Verifier |
|
|
45
|
-
|
|
46
|
-
## Root Cause Analysis (5 Whys)
|
|
47
|
-
|
|
48
|
-
1. **Why did the retry fail?** Because the CAS effect lease was locked in `dispatched` state.
|
|
49
|
-
|
|
50
|
-
2. **Why was it still locked?** Because the previous worker process exited abnormally without calling abort.
|
|
51
|
-
|
|
52
|
-
3. **Why did the lease not expire?** Because the lease had no automated heartbeat timeout.
|
|
53
|
-
|
|
54
|
-
4. **Why was there no timeout?** Because CAS leasing was assumed to be synchronous.
|
|
55
|
-
|
|
56
|
-
5. **Systemic Root Cause:** Missing failure recovery watchdog for unconfirmed external side-effect leases.
|
|
57
|
-
|
|
58
|
-
## What Went Well / What Went Wrong
|
|
35
|
+
| <hh:mm> | <first symptom, for example a worker exits during `git push`> | <log watcher, `kxm dash`, a user> |
|
|
36
|
+
| <hh:mm> | <what the operator saw next, for example retries refused on a held lease> | <source> |
|
|
37
|
+
| <hh:mm> | <mitigation, for example the operator degrades the run from `kxm dash` with `d`> | <source> |
|
|
38
|
+
| <hh:mm> | <fix committed or configuration changed> | <source> |
|
|
39
|
+
| <hh:mm> | <service restored and verified, for example queued runs complete> | <source> |
|
|
59
40
|
|
|
60
|
-
|
|
41
|
+
## Root cause analysis (five whys)
|
|
61
42
|
|
|
62
|
-
|
|
43
|
+
1. **Why did <symptom> happen?** <Because …>
|
|
44
|
+
2. **Why did <cause 1> happen?** <Because …>
|
|
45
|
+
3. **Why did <cause 2> happen?** <Because …>
|
|
46
|
+
4. **Why did <cause 3> happen?** <Because …>
|
|
47
|
+
5. **Systemic root cause:** <the missing control, test, or gate>
|
|
63
48
|
|
|
64
|
-
|
|
49
|
+
## What went well and what went wrong
|
|
65
50
|
|
|
66
|
-
### What
|
|
51
|
+
### What went well
|
|
67
52
|
|
|
68
|
-
-
|
|
53
|
+
- <For example: state stayed consistent and no duplicate pull request was created>
|
|
69
54
|
|
|
70
|
-
|
|
55
|
+
### What went wrong
|
|
71
56
|
|
|
72
|
-
|
|
57
|
+
- <For example: the error message did not say how to recover>
|
|
73
58
|
|
|
74
|
-
|
|
75
|
-
| Add 300s automated lease timeout to `ExternalEffectsLedger` | Prevent | Platform Lead | 2026-09-10 | #165 |
|
|
59
|
+
## Corrective and preventive actions
|
|
76
60
|
|
|
77
|
-
|
|
|
61
|
+
| Action | Type | Owner | Tracking |
|
|
62
|
+
|---|---|---|---|
|
|
63
|
+
| <Add a failing test that reproduces the incident> | Prevent | <role> | <issue link> |
|
|
64
|
+
| <Improve the error message to name the recovery command> | Mitigate | <role> | <issue link> |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
schema: "kxm.doc.v1"
|
|
3
3
|
id: "RES-0001"
|
|
4
4
|
type: "research"
|
|
5
|
-
title: "Research
|
|
5
|
+
title: "Research: <topic or spike question>"
|
|
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_decision_date: "2026-09-15"
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
-
# Research: <Research
|
|
21
|
+
# Research: <Research topic / spike question>
|
|
22
22
|
|
|
23
|
-
## Decision to
|
|
23
|
+
## Decision to enable
|
|
24
24
|
|
|
25
25
|
- **Pending Decision:** <What exact architectural, model routing, or product decision depends on this investigation?>
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ details:
|
|
|
28
28
|
|
|
29
29
|
- **Constraints & Guardrails:** <Budget limits, latency thresholds, security boundaries>
|
|
30
30
|
|
|
31
|
-
## Questions
|
|
31
|
+
## Questions and falsifiable hypotheses
|
|
32
32
|
|
|
33
33
|
- **Primary Question:** <What are we trying to discover or prove?>
|
|
34
34
|
|
|
@@ -36,7 +36,7 @@ details:
|
|
|
36
36
|
|
|
37
37
|
- **Falsification Condition:** <What exact result or metric will prove this hypothesis wrong?>
|
|
38
38
|
|
|
39
|
-
## Methodology
|
|
39
|
+
## Methodology and verification setup
|
|
40
40
|
|
|
41
41
|
```mermaid
|
|
42
42
|
flowchart LR
|
|
@@ -50,48 +50,43 @@ flowchart LR
|
|
|
50
50
|
|
|
51
51
|
*Methodology flow: Establish bounds, execute reproducible trials, analyze telemetry metrics, and recommend concrete next actions.*
|
|
52
52
|
|
|
53
|
-
- **Harness & Model Arms:** <List evaluated routes,
|
|
53
|
+
- **Harness & Model Arms:** <List evaluated routes, for example native `grok` versus `pi` with an OpenRouter model>
|
|
54
54
|
|
|
55
55
|
- **Test Fixture / Workload:** <Exact repository task or test suite executed>
|
|
56
56
|
|
|
57
57
|
- **Budget Ceiling:** <Maximum dollar or token limit for this spike>
|
|
58
58
|
|
|
59
|
-
## Evidence
|
|
59
|
+
## Evidence register
|
|
60
60
|
|
|
61
61
|
| Evidence ID | Claim / Finding | Source Artifact / Telemetry Run | Version / Date | Confidence |
|
|
62
|
-
|
|
63
62
|
|---|---|---|---|---|
|
|
64
63
|
| EV-01 | <Empirical claim> | `artifact:.kxm/logs/telemetry.jsonl@sha256:...` | 2026-09-08 | verified |
|
|
64
|
+
| EV-02 | <Model behavior observation> | `<run-id>` transcript | 2026-09-08 | probable |
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## Option Comparison Matrix
|
|
69
|
-
|
|
70
|
-
| Evaluation Criterion | Weight | Option A (e.g., Native) | Option B (e.g., Wrapper) | Measured Evidence |
|
|
66
|
+
## Option comparison matrix
|
|
71
67
|
|
|
68
|
+
| Evaluation Criterion (example values) | Weight | Option A (e.g., Native) | Option B (e.g., Wrapper) | Measured Evidence |
|
|
72
69
|
|---|---|---|---|---|
|
|
73
70
|
| Verification Pass Rate | High | 84.0% | 40.0% | EV-01 |
|
|
74
|
-
|
|
75
71
|
| Latency P50 | Medium | 187s | 284s | EV-01 |
|
|
76
72
|
| Cost per Successful Run | High | $0.20 | $1.03 | EV-01 |
|
|
77
|
-
|
|
78
73
|
| Rework Rate | High | 68% | 100% | EV-01 |
|
|
79
74
|
|
|
80
|
-
## Findings
|
|
75
|
+
## Findings and distinctions
|
|
81
76
|
|
|
82
|
-
### Verified
|
|
77
|
+
### Verified observations (backed by evidence IDs)
|
|
83
78
|
|
|
84
79
|
- <Direct observation referencing EV-xx>
|
|
85
80
|
|
|
86
|
-
### Inferences
|
|
81
|
+
### Inferences and working hypotheses
|
|
87
82
|
|
|
88
83
|
- <Reasoning or extrapolation; clearly separated from hard evidence>
|
|
89
84
|
|
|
90
|
-
### Unresolved
|
|
85
|
+
### Unresolved unknowns
|
|
91
86
|
|
|
92
87
|
- <Gaps that remain uncertain or could not be measured>
|
|
93
88
|
|
|
94
|
-
## Recommendation
|
|
89
|
+
## Recommendation and revisit conditions
|
|
95
90
|
|
|
96
91
|
- **Recommended Course of Action:** <Specific choice or architectural pattern>
|
|
97
92
|
|
package/docs/templates/review.md
CHANGED
|
@@ -2,84 +2,83 @@
|
|
|
2
2
|
schema: "kxm.doc.v1"
|
|
3
3
|
id: "REV-0001"
|
|
4
4
|
type: "review"
|
|
5
|
-
title: "Dual-
|
|
5
|
+
title: "Dual-critic review report"
|
|
6
6
|
project: "kxm"
|
|
7
|
-
status: "
|
|
7
|
+
status: "draft" # draft | in_review | approved | superseded | archived
|
|
8
8
|
owner: "@critics"
|
|
9
9
|
created: "2026-09-08"
|
|
10
10
|
updated: "2026-09-08"
|
|
11
11
|
authority: "evidence"
|
|
12
12
|
confidence: "verified"
|
|
13
|
-
summary: "Independent dual-critic
|
|
13
|
+
summary: "Independent dual-critic review of candidate tree <tree-sha>."
|
|
14
14
|
tags: ["review", "critics", "quorum"]
|
|
15
15
|
related: []
|
|
16
16
|
details:
|
|
17
|
-
|
|
18
|
-
target_commit: "<
|
|
17
|
+
outcome: "accepted" # accepted | repair_required
|
|
18
|
+
target_commit: "<commit-sha>"
|
|
19
|
+
judged_tree: "<tree-sha>"
|
|
19
20
|
critics:
|
|
20
|
-
-
|
|
21
|
+
- kind: "review-arch"
|
|
22
|
+
role: "reviewer-arch"
|
|
21
23
|
harness: "claude"
|
|
22
|
-
model: "
|
|
23
|
-
verdict: "
|
|
24
|
-
-
|
|
24
|
+
model: "fable"
|
|
25
|
+
verdict: "PASS" # PASS | BLOCK
|
|
26
|
+
- kind: "review-cli"
|
|
27
|
+
role: "reviewer-cli"
|
|
25
28
|
harness: "codex"
|
|
26
29
|
model: "gpt-5.6-sol"
|
|
27
|
-
verdict: "
|
|
30
|
+
verdict: "PASS" # PASS | BLOCK
|
|
28
31
|
---
|
|
29
32
|
|
|
30
|
-
# Dual-
|
|
33
|
+
# Dual-critic review report
|
|
31
34
|
|
|
32
|
-
## Review
|
|
35
|
+
## Review scope and provenance
|
|
33
36
|
|
|
34
|
-
- **Candidate
|
|
37
|
+
- **Candidate commit:** `<commit-sha>`
|
|
38
|
+
- **Judged tree:** `<tree-sha>`. Each critic records the exact tree it
|
|
39
|
+
reviewed; a verdict on any other tree does not count.
|
|
40
|
+
- **Branch:** `kxm/run-<run-id>-<description>`
|
|
41
|
+
- **Independence rule:** each critic comes from a different vendor than the
|
|
42
|
+
writer and than each other. For example, a Grok (xAI) writer with Claude
|
|
43
|
+
(Anthropic) and Codex (OpenAI) critics.
|
|
35
44
|
|
|
36
|
-
|
|
45
|
+
## Critic 1: architecture (`review-arch`)
|
|
37
46
|
|
|
38
|
-
- **
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## Critic 1: Claude Fable 5.1 (Planning & Architecture Critic)
|
|
43
|
-
|
|
44
|
-
- **Role:** `reviewer-arch`
|
|
45
|
-
|
|
46
|
-
- **Focus Areas:** Fail-closed security boundaries, memory isolation, permission ceilings, state consistency.
|
|
47
|
-
|
|
48
|
-
- **Verdict:** **PASS WITH STIPULATIONS**
|
|
47
|
+
- **Role:** `reviewer-arch`, read-only
|
|
48
|
+
- **Focus:** fail-closed security boundaries, permission ceilings, state
|
|
49
|
+
consistency, memory isolation.
|
|
50
|
+
- **Verdict:** `PASS` or `BLOCK`
|
|
49
51
|
|
|
50
52
|
### Findings
|
|
51
53
|
|
|
52
|
-
| ID | Severity |
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
|
54
|
+
| ID | Severity | Location | Finding |
|
|
55
|
+
|---|---|---|---|
|
|
56
|
+
| A-01 | warning | `<path>:<symbol>` | <What is wrong and why it matters> |
|
|
57
|
+
| A-02 | info | `<path>:<symbol>` | <Observation that needs no change> |
|
|
56
58
|
|
|
57
|
-
|
|
59
|
+
## Critic 2: CLI and docs (`review-cli`)
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- **Focus Areas:** CLI flags, error messages, terminal output, performance, failure resilience.
|
|
64
|
-
|
|
65
|
-
- **Verdict:** **PASS**
|
|
61
|
+
- **Role:** `reviewer-cli`, read-only
|
|
62
|
+
- **Focus:** CLI flags, error messages, terminal output, documentation,
|
|
63
|
+
failure modes.
|
|
64
|
+
- **Verdict:** `PASS` or `BLOCK`
|
|
66
65
|
|
|
67
66
|
### Findings
|
|
68
67
|
|
|
69
|
-
| ID | Severity |
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
| A-01 | info | ergonomics | `plugins/kxm/src/external-effects.ts` | 80 | Descriptive branch slugging provides clean readability in `git branch`. |
|
|
73
|
-
|
|
74
|
-
## Quorum & Dissent Reconciliation
|
|
75
|
-
|
|
76
|
-
| Finding ID | Raised By | Severity | Author Response / Resolution | Status |
|
|
68
|
+
| ID | Severity | Location | Finding |
|
|
69
|
+
|---|---|---|---|
|
|
70
|
+
| C-01 | info | `<path>:<symbol>` | <Observation> |
|
|
77
71
|
|
|
78
|
-
|
|
79
|
-
| F-01 | Claude Fable | warning | Implemented 300s expiration check in `claimEffect()`. | Resolved |
|
|
72
|
+
## Resolution of findings
|
|
80
73
|
|
|
81
|
-
|
|
74
|
+
| Finding | Raised by | Resolution | Status |
|
|
75
|
+
|---|---|---|---|
|
|
76
|
+
| A-01 | `review-arch` | <Change made, or why none is needed> | Resolved |
|
|
82
77
|
|
|
83
|
-
|
|
78
|
+
## Outcome
|
|
84
79
|
|
|
85
|
-
- **
|
|
80
|
+
- **Both critics `PASS` on the judged tree:** ready for acceptance, through
|
|
81
|
+
the workflow's next step or, in the KXM repository, `just accept`.
|
|
82
|
+
- **Either critic `BLOCK`:** send the work back for repair, re-run the witness,
|
|
83
|
+
and review the new tree. In the KXM repository that is a `repair` assignment
|
|
84
|
+
with `rework_of`; see [Assignment runner](../contributing/assignment-runner.md).
|