@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.
- 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 +2 -2
- 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 -293
- package/docs/webhook-workflows.md +0 -240
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
# Write KXM documentation
|
|
2
|
+
|
|
3
|
+
Write a docs page that matches the rest of the KXM documentation and passes the
|
|
4
|
+
doc gates on the first try. This guide covers where a page goes, the page
|
|
5
|
+
template, the style rules, diagrams, and the checks that run on every pull
|
|
6
|
+
request.
|
|
7
|
+
|
|
8
|
+
## Before you begin
|
|
9
|
+
|
|
10
|
+
- Read the [glossary](../glossary.md). The normative vocabulary is
|
|
11
|
+
[Canonical terminology](../contracts/terminology.md).
|
|
12
|
+
- Run `npm ci` in your checkout so `markdownlint-cli2` is installed.
|
|
13
|
+
- Confirm every command you document against the code. Run
|
|
14
|
+
`node scripts/kxm.mjs <group> <command> --help` and check that the `Usage:`
|
|
15
|
+
line names the full command path: an unknown subcommand prints the group's
|
|
16
|
+
help instead.
|
|
17
|
+
|
|
18
|
+
## Choose where the page goes
|
|
19
|
+
|
|
20
|
+
| Directory | Holds | Page type |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| `docs/start/` | Install and first-run tutorials | Tutorial |
|
|
23
|
+
| `docs/guides/` | Task-focused guides for one feature | How-to |
|
|
24
|
+
| `docs/reference/` | Commands, tools, endpoints, configuration | Reference |
|
|
25
|
+
| `docs/concepts/` | How KXM works and why | Explanation |
|
|
26
|
+
| `docs/operations/` | Deploy, monitor, back up, upgrade, troubleshoot | How-to; the troubleshooting page is reference |
|
|
27
|
+
| `docs/contributing/` | Development, CI, tests, this guide | How-to or reference |
|
|
28
|
+
| `docs/contracts/` | Normative target contracts | Reference |
|
|
29
|
+
| `docs/adr/` | Architecture decision records | Explanation |
|
|
30
|
+
| `docs/kb/`, `docs/prompts/`, `docs/templates/` | Short answers, prompt templates, artifact templates | Frontmatter pages |
|
|
31
|
+
|
|
32
|
+
Everything under `docs/` ships in the npm package, so write for readers outside
|
|
33
|
+
this repository. Add every new page to [the docs index](../README.md).
|
|
34
|
+
|
|
35
|
+
## Choose the page type
|
|
36
|
+
|
|
37
|
+
Each page is one type. When a page needs two, split it.
|
|
38
|
+
|
|
39
|
+
| Type | Shape |
|
|
40
|
+
|---|---|
|
|
41
|
+
| Tutorial | Numbered steps on a single path, no options, and a verification step at the end |
|
|
42
|
+
| How-to | Goal-titled; options allowed; assumes the reader knows the concepts |
|
|
43
|
+
| Reference | No "Before you begin"; tables grouped by object; each entry is name, type, default, effect |
|
|
44
|
+
| Explanation | Few or no commands; a diagram first; "Why" and "Trade-offs" sections |
|
|
45
|
+
|
|
46
|
+
## Start from the page template
|
|
47
|
+
|
|
48
|
+
Copy this skeleton for human-facing pages. The `kxm.doc.v1` files in
|
|
49
|
+
`docs/templates/` are for machine-consumed artifacts, not for docs pages.
|
|
50
|
+
|
|
51
|
+
````markdown
|
|
52
|
+
# <Task- or topic-named title in sentence case>
|
|
53
|
+
|
|
54
|
+
<One paragraph, at most 3 sentences: what this page helps you do, who it is for,
|
|
55
|
+
and the outcome. Link the key concept on first mention, for example [hub](../glossary.md#hub).>
|
|
56
|
+
|
|
57
|
+
## Before you begin
|
|
58
|
+
|
|
59
|
+
- <Installed tools and minimum versions, for example the `kxm` CLI>
|
|
60
|
+
- <Running services, for example a hub started with `kxm hub start`>
|
|
61
|
+
- <Credentials or permissions, for example the project token, never the admin token>
|
|
62
|
+
|
|
63
|
+
## <Step or topic 1: imperative verb for how-tos>
|
|
64
|
+
|
|
65
|
+
<Short explanation, at most 80 words per paragraph.>
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
kxm <command> --flag value
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
<details><summary>PowerShell</summary>
|
|
72
|
+
|
|
73
|
+
```powershell
|
|
74
|
+
$env:KXM_EXAMPLE = "value"
|
|
75
|
+
kxm <command> --flag value
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
</details>
|
|
79
|
+
|
|
80
|
+
Expected output:
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
<exact, trimmed output>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
> [!NOTE]
|
|
87
|
+
> <Context that helps but is not required.>
|
|
88
|
+
|
|
89
|
+
## <Step or topic 2>
|
|
90
|
+
|
|
91
|
+
…
|
|
92
|
+
|
|
93
|
+
## Troubleshooting
|
|
94
|
+
|
|
95
|
+
| Symptom | Cause | Fix |
|
|
96
|
+
|---|---|---|
|
|
97
|
+
|
|
98
|
+
## Next steps
|
|
99
|
+
|
|
100
|
+
- <Next task>: [Page](…)
|
|
101
|
+
- <Deeper concept>: [Page](…)
|
|
102
|
+
- <Exact reference>: [Page](…)
|
|
103
|
+
````
|
|
104
|
+
|
|
105
|
+
## Follow the style rules
|
|
106
|
+
|
|
107
|
+
### Voice
|
|
108
|
+
|
|
109
|
+
- Write in the second person ("you"), present tense and active voice.
|
|
110
|
+
- Use the imperative for steps: "Start the hub", not "You should start the hub".
|
|
111
|
+
- Stay formal: no contractions. Use American spelling.
|
|
112
|
+
|
|
113
|
+
### Titles and headings
|
|
114
|
+
|
|
115
|
+
- One H1 per page, in sentence case, matching its entry in the docs index.
|
|
116
|
+
- Task titles start with a verb: "Back up and restore the hub".
|
|
117
|
+
- Do not skip heading levels, and do not use bold lines as headings.
|
|
118
|
+
- Keep version numbers out of headings.
|
|
119
|
+
|
|
120
|
+
### Openings and endings
|
|
121
|
+
|
|
122
|
+
- Open with one paragraph of at most three sentences: what, who, and outcome.
|
|
123
|
+
Never start with "This document describes".
|
|
124
|
+
- Every tutorial and how-to has a "Before you begin" list.
|
|
125
|
+
- End tutorials and how-tos with "Next steps", and reference and explanation
|
|
126
|
+
pages with "Related". Nothing comes after it.
|
|
127
|
+
|
|
128
|
+
### Code blocks
|
|
129
|
+
|
|
130
|
+
- Tag every fence with its language. Shell commands are `bash`, never `text`.
|
|
131
|
+
- Show Bash first. Add PowerShell only where it differs, in a second block or a
|
|
132
|
+
`<details><summary>PowerShell</summary>` block.
|
|
133
|
+
- Keep commands and output in separate blocks. Introduce output with
|
|
134
|
+
"Expected output:" and a `text` fence.
|
|
135
|
+
- Write one command per line with no `$` prompt. Use `#` comments for context.
|
|
136
|
+
- Write placeholders as `<lower-kebab>`. Write secrets as `replace-with-…`, and
|
|
137
|
+
never pass a secret as a command-line argument.
|
|
138
|
+
- Show `kxm …` in user docs. Show `node scripts/kxm.mjs …` only in contributing
|
|
139
|
+
docs.
|
|
140
|
+
- Put chat and slash commands in a `text` fence introduced by "In Claude Code:"
|
|
141
|
+
or "In Pi:".
|
|
142
|
+
- Name a configuration file on the line above its block, for example
|
|
143
|
+
"`.kxm/workflows/review.yaml`:".
|
|
144
|
+
|
|
145
|
+
### Tables, lists and length
|
|
146
|
+
|
|
147
|
+
- Use tables for enumerable facts: flags, variables, fields, error codes,
|
|
148
|
+
endpoints. Keep to four columns and 25 words per cell.
|
|
149
|
+
- Move anything longer into prose under its own subheading.
|
|
150
|
+
- Use numbered lists for ordered steps and bullets for unordered sets.
|
|
151
|
+
- Never put a blank line inside a table. GitHub stops the table there, and the
|
|
152
|
+
linter does not notice.
|
|
153
|
+
- Keep paragraphs under 80 words and sections under about 400 words. Split a
|
|
154
|
+
page over about 2,500 words unless it is a pure reference table.
|
|
155
|
+
|
|
156
|
+
### Callouts
|
|
157
|
+
|
|
158
|
+
Use GitHub alerts only, at most one per screen, never stacked:
|
|
159
|
+
|
|
160
|
+
| Alert | Use it for |
|
|
161
|
+
|---|---|
|
|
162
|
+
| `> [!NOTE]` | Context that helps but is not required |
|
|
163
|
+
| `> [!TIP]` | A shortcut |
|
|
164
|
+
| `> [!IMPORTANT]` | A prerequisite or status that silently breaks things if ignored |
|
|
165
|
+
| `> [!WARNING]` | Security or data-loss risk |
|
|
166
|
+
| `> [!CAUTION]` | An irreversible action |
|
|
167
|
+
|
|
168
|
+
### Links
|
|
169
|
+
|
|
170
|
+
- Use relative links, and link the first mention of a glossary term.
|
|
171
|
+
- Do not link from `docs/` into `plans/`. It is internal and is not in the npm
|
|
172
|
+
package.
|
|
173
|
+
- Do not cite source line numbers such as `hub.ts:1432`. Link a file, or name a
|
|
174
|
+
symbol.
|
|
175
|
+
- Mention test paths only in contributing docs.
|
|
176
|
+
|
|
177
|
+
### Status, versions and honesty
|
|
178
|
+
|
|
179
|
+
- Describe current behavior. No release numbers such as "0.4.x" in prose;
|
|
180
|
+
changes belong in `CHANGELOG.md`.
|
|
181
|
+
- Planned behavior appears only in `contracts/` and `adr/`, marked with
|
|
182
|
+
`> [!IMPORTANT]` and the word "Planned:".
|
|
183
|
+
- Cite a schema version only in a reference page that names the constant it
|
|
184
|
+
comes from.
|
|
185
|
+
- Say what is not guaranteed wherever a reader could over-read a feature: KXM
|
|
186
|
+
is single-node and at-least-once, is not a sandbox, and a quorum proves who
|
|
187
|
+
answered, not that the answer is true.
|
|
188
|
+
|
|
189
|
+
### Terminology
|
|
190
|
+
|
|
191
|
+
Follow the [glossary](../glossary.md). The rules that come up most:
|
|
192
|
+
|
|
193
|
+
- The product is **KXM**. KontextMind is the organization and the separate
|
|
194
|
+
knowledge plane. Retired product names fail a test (see
|
|
195
|
+
[Retired names](#retired-names)).
|
|
196
|
+
- Put tool, command, file and field names in code font.
|
|
197
|
+
- Qualify overloaded words: a **gate command**, an **evidence gate**, a
|
|
198
|
+
**witness gate**; a **hub workflow run** versus a **Runtime run**; a
|
|
199
|
+
**session manifest** versus a **Pi session**; a **suite skill** versus a
|
|
200
|
+
**governed skill**.
|
|
201
|
+
- Keep internal jargon, such as issue numbers, phase names, tracking labels and
|
|
202
|
+
model nicknames, out of every page outside `docs/contributing/`.
|
|
203
|
+
|
|
204
|
+
### Frontmatter
|
|
205
|
+
|
|
206
|
+
Only pages in `kb/`, `prompts/`, `templates/` and `adr/` carry `kxm.doc.v1`
|
|
207
|
+
YAML frontmatter. Human-facing guides have none. No JSON Schema for `kxm.doc.v1`
|
|
208
|
+
exists yet, so nothing validates those fields: keep them consistent with the
|
|
209
|
+
neighboring files.
|
|
210
|
+
|
|
211
|
+
## Draw diagrams
|
|
212
|
+
|
|
213
|
+
A diagram earns its place when it shows a topology, an interaction or a
|
|
214
|
+
lifecycle that prose would need several paragraphs for.
|
|
215
|
+
|
|
216
|
+
- Use Mermaid only: `flowchart LR` for topology, `sequenceDiagram` for
|
|
217
|
+
interactions, `stateDiagram-v2` for lifecycles.
|
|
218
|
+
- Keep to about 12 nodes and label every edge.
|
|
219
|
+
- Precede each diagram with a one-sentence summary for screen readers and
|
|
220
|
+
raw-Markdown readers.
|
|
221
|
+
- Check every node and edge against the code before you draw it.
|
|
222
|
+
- Do not add ASCII diagrams. Replace one when you edit its page.
|
|
223
|
+
|
|
224
|
+
For example, a simplified lifecycle with its summary sentence:
|
|
225
|
+
|
|
226
|
+
A message is queued, delivered to its recipient, then settled by a reply,
|
|
227
|
+
a cancellation or its expiry.
|
|
228
|
+
|
|
229
|
+
```mermaid
|
|
230
|
+
stateDiagram-v2
|
|
231
|
+
[*] --> queued
|
|
232
|
+
queued --> delivered: recipient acknowledges
|
|
233
|
+
delivered --> replied: recipient replies
|
|
234
|
+
queued --> cancelled: sender cancels
|
|
235
|
+
delivered --> cancelled: sender cancels
|
|
236
|
+
queued --> expired: TTL passes
|
|
237
|
+
delivered --> expired: TTL passes
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Pass the doc gates
|
|
241
|
+
|
|
242
|
+
Markdown lint runs on every pull request. The docs-copy test and the
|
|
243
|
+
pinned-path tests run only in your local `npm run verify`: CI skips code
|
|
244
|
+
validation for documentation-only changes and runs a compact test set
|
|
245
|
+
otherwise. Run them locally first.
|
|
246
|
+
|
|
247
|
+
### Markdown lint
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
npm run lint:docs
|
|
251
|
+
# Or lint the files you changed (the config's globs are still applied).
|
|
252
|
+
npx --no-install markdownlint-cli2 docs/guides/my-page.md
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
`.markdownlint-cli2.jsonc` covers the root `*.md` files, `docs/`, `.kxm/`,
|
|
256
|
+
`plans/`, `plugins/` and `.github/`. It turns off line length (MD013), table
|
|
257
|
+
column style (MD060), single H1 (MD025, because frontmatter carries a `title`)
|
|
258
|
+
and inline HTML (MD033). The linter does not catch a table split by a blank
|
|
259
|
+
line, a dead link, or a PowerShell-only example, so check those yourself.
|
|
260
|
+
|
|
261
|
+
### Retired names
|
|
262
|
+
|
|
263
|
+
`test/core/docs-copy.test.ts` fails when a scanned file contains a retired
|
|
264
|
+
product name, a retired command, a retired doc path, or a bare binary name from
|
|
265
|
+
the old packaging. The exact list is the `FORBIDDEN` array in that test.
|
|
266
|
+
|
|
267
|
+
It scans `README.md`, `AGENTS.md`, `CLAUDE.md`, everything under `docs/` and
|
|
268
|
+
`.claude/`, every `README.md` under `plugins/`, and every Markdown file a bundled
|
|
269
|
+
skill ships. It does not scan `CONTRIBUTING.md`, `SECURITY.md` or the READMEs
|
|
270
|
+
under `.kxm/`, so take extra care there.
|
|
271
|
+
|
|
272
|
+
### Pinned paths
|
|
273
|
+
|
|
274
|
+
Some documents are read by tests or code at a fixed path. Renaming one, or
|
|
275
|
+
removing the text a test expects, breaks the build. Update the reader in the
|
|
276
|
+
same pull request.
|
|
277
|
+
|
|
278
|
+
| Document | Read by | What must stay true |
|
|
279
|
+
|---|---|---|
|
|
280
|
+
| `docs/guides/provenance-gates.md` | `test/core/examples.test.ts` | The file exists and keeps the project-token JSON and the three `--name … --project provenance-demo` commands |
|
|
281
|
+
| `docs/contributing/assignment-runner.md`, `docs/contracts/routing.md`, `docs/operations/troubleshooting.md`, `docs/reference/workflow-catalog.md` | `test/core/harness-run.test.ts` | Each file exists, and every `just <verb>` it shows is a recipe in `justfile` |
|
|
282
|
+
| `docs/guides/browser-automation.md` | `plugins/kxm/src/modes.ts` | The `browser` mode loads it as a context file at run time; a rename drops it silently |
|
|
283
|
+
| `docs/reference/workflow-catalog.md` | `plugins/kxm/src/init-guide-setup.ts`, `plugins/kxm/src/cli/system.ts` | Interactive `kxm init` prints this path; the code transcribes its catalog |
|
|
284
|
+
| `docs/contributing/tui-components.md` | `packages/core/tui/README.md` | The package README links it |
|
|
285
|
+
| `docs/contracts/validation.md` | `schemas/README.md` | The schemas README links it |
|
|
286
|
+
| `docs/contracts/synchronization.md` | `plugins/kxm/src/sync-transform.ts` | A code comment cites it |
|
|
287
|
+
| `plugins/kxm/README.md` | `test/core/claude-plugin-docs.test.ts` | Its tool table lists every tool the MCP server publishes |
|
|
288
|
+
| `README.md` | `test/core/docs-copy.test.ts`, the npm `files` list | Stays at the repository root |
|
|
289
|
+
| `AGENTS.md`, `SECURITY.md` | `plugins/kxm/src/modes.ts` | Mode context files; they stay at the repository root |
|
|
290
|
+
|
|
291
|
+
### Documented `just` recipes
|
|
292
|
+
|
|
293
|
+
For the four documents in the `harness-run.test.ts` row above, the test reads
|
|
294
|
+
every `just <verb>` written in inline code or at the start of a fenced line. A
|
|
295
|
+
verb that is not a `justfile` recipe fails the test. Name a recipe that does not
|
|
296
|
+
exist only in prose, never in command form.
|
|
297
|
+
|
|
298
|
+
### Check links
|
|
299
|
+
|
|
300
|
+
No CI job checks links yet. Before you open a pull request, run this check on
|
|
301
|
+
the files you changed; it prints each relative link whose target is missing:
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
node --input-type=module -e '
|
|
305
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
306
|
+
import { dirname, resolve } from "node:path";
|
|
307
|
+
let bad = 0;
|
|
308
|
+
for (const file of process.argv.slice(1)) {
|
|
309
|
+
const text = readFileSync(file, "utf8").replace(/```[\s\S]*?```/g, "");
|
|
310
|
+
for (const [, link] of text.matchAll(/\]\(([^)\s#]+)(?:#[^)\s]*)?\)/g)) {
|
|
311
|
+
if (/^[a-z]+:/.test(link) || existsSync(resolve(dirname(file), link))) continue;
|
|
312
|
+
console.log(`${file}: ${link}`);
|
|
313
|
+
bad += 1;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
process.exitCode = bad ? 1 : 0;
|
|
317
|
+
' docs/guides/my-page.md
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
It does not check `#anchor` fragments. Open the rendered page on GitHub and
|
|
321
|
+
follow each anchor link once.
|
|
322
|
+
|
|
323
|
+
## Checklist before you open a pull request
|
|
324
|
+
|
|
325
|
+
1. The page has one H1, an opening paragraph, "Before you begin" where it
|
|
326
|
+
applies, and ends with "Next steps" or "Related".
|
|
327
|
+
2. Every command was run, or checked with `node scripts/kxm.mjs <group> <command> --help`.
|
|
328
|
+
3. Every code fence has a language, and Bash comes before PowerShell.
|
|
329
|
+
4. No table has a blank line inside it, and no cell runs past 25 words.
|
|
330
|
+
5. The page is in [the docs index](../README.md), and pages that should point
|
|
331
|
+
to it do.
|
|
332
|
+
6. `npm run lint:docs` passes and the link check prints nothing.
|
|
333
|
+
7. If you moved or renamed a doc, you updated every reader in
|
|
334
|
+
[Pinned paths](#pinned-paths) and ran `npm run verify`.
|
|
335
|
+
|
|
336
|
+
## Next steps
|
|
337
|
+
|
|
338
|
+
- Set up a checkout and run the full gate: [Develop KXM](development.md)
|
|
339
|
+
- See which CI jobs run on a docs-only change: [CI and release](ci-and-release.md)
|
|
340
|
+
- Look up a term: [Glossary](../glossary.md)
|