@kal-elsam/kairo-runtime 0.13.0 → 0.14.0

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/README.md CHANGED
@@ -1,1228 +1,100 @@
1
1
  # Kairo Runtime
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@kal-elsam/kairo-runtime.svg)](https://www.npmjs.com/package/@kal-elsam/kairo-runtime)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
4
5
 
5
- **Kairo Runtime** is a local agent operating systemnot a template dumper and not an
6
- installer for AI apps. It detects agents you already use (Cursor, Codex, OpenCode,
7
- Claude), writes managed sections into their configs, installs coordination components
8
- under `~/.harness`, and keeps that ecosystem healthy with status, sync, backups,
9
- and rollback.
6
+ Kairo finds the AI agents you already useCursor, Codex, Claude, OpenCode and keeps
7
+ their configuration under control. One place to see what's set up, repair what drifted,
8
+ and roll back when something breaks.
10
9
 
11
- The npm package (`@kal-elsam/kairo-runtime`) is how Kairo Runtime is distributed. The
12
- product identity is the local control plane: setup, status, sync, doctor (with `update`
13
- as a technical alias).
10
+ It does not install AI apps and it does not dump templates. It manages marked sections
11
+ inside the configs you already have, and it never writes without asking.
14
12
 
15
- `@kal-elsam/harness` remains available as a **compatibility bridge** that delegates to
16
- Kairo Runtime and prints a migration warning. Prefer `@kal-elsam/kairo-runtime` and the
17
- `kairo` CLI for new installs. See [`packages/harness-bridge/README.md`](packages/harness-bridge/README.md).
18
-
19
- Terminal UX is **terminal-first**: bare `kairo` opens the Ink Control Center (or Setup
20
- when unconfigured). Explicit commands (`setup`, `status`, `sync`, `doctor`, `monitor`,
21
- `shell`, …) keep their current behavior. Progressive disclosure keeps paths and IDs in
22
- Details, list caps honest (`… N more`), and Callout reserved for status — never for
23
- primary values. No web loopback / `kairo ui` in this release.
24
-
25
- - **npm:** https://www.npmjs.com/package/@kal-elsam/kairo-runtime
26
- - **repo:** https://github.com/Kal-elSam/harness
27
-
28
- ## Quick start
29
-
30
- Recommended entry — run Kairo Runtime in your terminal:
13
+ ## Start
31
14
 
32
15
  ```bash
33
16
  npx @kal-elsam/kairo-runtime
34
- # or, after a global install:
35
- kairo
36
- ```
37
-
38
- **First run** (no `~/.harness/state.json`): semantic Setup (Detect → Agents →
39
- Components → Preview → Confirm) → full-screen Control Center.
40
-
41
- **Later runs** (state present): semantic Cockpit — Overview, Governance, Activity,
42
- Orchestration, Usage, Settings — plus Alerts inbox. Layout adapts to terminal size:
43
-
44
- | Mode | Size | Layout |
45
- |------|------|--------|
46
- | Wide | ≥100 cols × ≥28 rows | TopBar + nav strip + main panel + footer |
47
- | Compact | ≥72×20 | Same single-panel shell (tighter lists) |
48
- | Minimal | 60–71 cols or short height | Selected section + essential readiness/next |
49
- | Below gate | <60 cols | Explicit TTY fallback (Ink disabled) |
50
-
51
- Keys: `↑↓` navigate · `Enter` open/activate · `/` actions palette ·
52
- `Esc` back (exit only from Overview) · `R` refresh/retry · `C` cancel run ·
53
- `?` help. `Tab` switches region when content is interactive (runs, alerts,
54
- Activity, Settings, launch).
55
-
56
- Navigation: Overview · Governance · Activity · Orchestration · Usage · Settings.
57
-
58
- ### Monitor (opt-in)
59
-
60
- ```bash
61
- kairo monitor enable
62
- kairo monitor status
63
- kairo monitor tick
64
- kairo monitor disable
65
- ```
66
-
67
- Scans governance drift and orphan/failed runs into the alert store. On macOS,
68
- `enable` can install a LaunchAgent; other OS degrade honestly. Notifications fire
69
- only when a new alert claim succeeds.
70
-
71
- ### Settings (curated integrations)
72
-
73
- Settings browses a curated catalog (pinned `pi-usage-widget@0.2.1`, MIT).
74
- Preview → confirm shows an in-session confirmation receipt (`wroteFiles: false`);
75
- it does not persist or install anything.
76
-
77
- ### Usage evidence
78
-
79
- Usage shows measured budget pairs, profile limits, and finite run `tokenUsage`
80
- fields only. It never invents totals, costs, or savings.
81
-
82
- Respects `NO_COLOR`, `HARNESS_ASCII=1`, and `HARNESS_INK=0`. Status is always labeled
83
- in text, never color alone.
84
-
85
- Explicit commands and setup flags keep their current behavior (`kairo setup`,
86
- `kairo --dry-run`, `kairo shell`, non-TTY scripts, etc.).
87
-
88
- Preview setup without writing anything:
89
-
90
- ```bash
91
- npx @kal-elsam/kairo-runtime --dry-run
92
- ```
93
-
94
- One-liner bootstrap (checks Node/npm, previews the plan, writes nothing by default):
95
-
96
- ```bash
97
- curl -fsSL https://raw.githubusercontent.com/Kal-elSam/harness/main/scripts/install.sh | sh
98
- ```
99
-
100
- Preview the installer plan only (no download, no network package run):
101
-
102
- ```bash
103
- curl -fsSL https://raw.githubusercontent.com/Kal-elSam/harness/main/scripts/install.sh | sh -s -- --dry-run
104
- ```
105
-
106
- The bootstrap installer:
107
-
108
- - requires Node.js 20.12+ and npm
109
- - installs `@kal-elsam/kairo-runtime` globally (`kairo` CLI)
110
- - runs `kairo setup --dry-run` by default (no agent configs, no `~/.harness` writes)
111
- - never uses `sudo`, never modifies shell profiles, and never installs AI apps
112
-
113
- Apply the plan when you are ready:
114
-
115
- ```bash
116
- kairo setup --yes
117
- # or
118
- curl -fsSL https://raw.githubusercontent.com/Kal-elSam/harness/main/scripts/install.sh | sh -s -- --yes
119
- ```
120
-
121
- CI, scripts, and advanced non-interactive configure:
122
-
123
- ```bash
124
- kairo install --agents cursor,codex --yes
125
- kairo setup --yes --agents all
126
- ```
127
-
128
- Passthrough examples:
129
-
130
- ```bash
131
- curl -fsSL https://raw.githubusercontent.com/Kal-elSam/harness/main/scripts/install.sh | sh -s -- --agents all --yes
132
- curl -fsSL https://raw.githubusercontent.com/Kal-elSam/harness/main/scripts/install.sh | sh -s -- --components orchestrator,sdd-core --yes
133
- ```
134
-
135
- Control plane:
136
-
137
- ```bash
138
- kairo status
139
- kairo sync
140
- kairo upgrade --dry-run
141
- kairo setup --yes
142
17
  ```
143
18
 
144
- After `install.sh --yes`, verify health with `kairo status`, repair drift with `kairo sync`,
145
- and preview upgrades with `kairo upgrade --dry-run`.
146
-
147
- ### Version and updates
148
-
149
- ```bash
150
- # Installed CLI version (local package / PATH)
151
- kairo --version
152
- npx @kal-elsam/kairo-runtime --version
153
-
154
- # Latest published version on npm
155
- npm view @kal-elsam/kairo-runtime version
19
+ That's it. The first run walks you through setup; after that it opens the cockpit:
156
20
 
157
- # Converge to the latest published package
158
- kairo upgrade --dry-run
159
- npx @kal-elsam/kairo-runtime@latest setup --yes
160
- npx @kal-elsam/kairo-runtime@latest sync
161
21
  ```
22
+ KAIRO
162
23
 
163
- ### npm alternative
164
-
165
- If you prefer npm directly (no curl):
166
-
167
- ```bash
168
- npx @kal-elsam/kairo-runtime
169
- npx @kal-elsam/kairo-runtime --dry-run
170
- npx @kal-elsam/kairo-runtime install --agents cursor,codex --components orchestrator,sdd-core --yes
171
- ```
24
+ Needs attention · 4/4 agents · drift pending
25
+ Kairo coordinates installed AI agents for this project.
172
26
 
173
- Optional global install:
27
+ Repair 3 changes
28
+ You will see the exact plan before anything is written.
174
29
 
175
- ```bash
176
- npm i -g @kal-elsam/kairo-runtime
177
- kairo --version
30
+ Configure
31
+ Agents, Obsidian vault, integrations.
178
32
  ```
179
33
 
180
- Legacy opt-in: scaffold governance files into a repository:
181
-
182
- ```bash
183
- npx @kal-elsam/kairo-runtime install --scope=workspace
184
- ```
34
+ `↑↓` move · `Enter` open · `Tab` nav · `Space` details · `R` refresh · `Esc` back · `?` help
185
35
 
186
- ## CLI commands
36
+ ## Day-to-day commands
187
37
 
188
- | Command | Description |
38
+ | Command | What it does |
189
39
  |---|---|
190
- | `kairo` | Primary short and direct |
191
- | `kairo-runtime` | Descriptive alias |
192
- | `harness` | Legacy alias (prefer `kairo`) |
193
- | `agentic-harness` | Legacy descriptive alias |
194
-
195
- ```bash
196
- kairo --version
197
- kairo
198
- kairo --dry-run
199
- kairo setup
200
- kairo setup --dry-run
201
- kairo setup --agents all
202
- kairo install --agents cursor,codex --yes
203
- kairo status
204
- kairo status --json
205
- kairo adapters
206
- kairo adapters --json
207
- kairo sync
208
- kairo sync --dry-run
209
- kairo sync --dry-run --json
210
- kairo policy
211
- kairo policy --json
212
- kairo policy set profile safe
213
- kairo policy reset
214
- kairo install
215
- kairo install --agents all
216
- kairo install --agents cursor,codex --components orchestrator,sdd-core
217
- kairo doctor
218
- kairo doctor --json
219
- kairo orchestrator --json
220
- kairo intelligence status
221
- kairo intelligence models
222
- kairo intelligence context --json
223
- kairo intelligence route --task "explain architecture"
224
- kairo intelligence ask --prompt "Summarize project risks" --json
225
- # Cloud (OpenRouter/free) only after explicit consent + confirm:
226
- # OPENROUTER_API_KEY=... kairo intelligence ask --prompt "..." --cloud-consent --yes
227
- kairo update # technical alias; prefer sync
228
- kairo detect
229
- kairo components
230
- kairo components validate
231
- kairo components init <id> --label "<label>"
232
- kairo components pack <id> --out <file> # advanced
233
- kairo components import <file> # advanced
234
- kairo backups
235
- kairo history
236
- kairo history --command sync --action repaired
237
- kairo history last --json
238
- kairo report
239
- kairo report --json
240
- kairo report --out ./diagnostics.txt
241
- kairo rollback --to <snapshot> [--apply]
242
- kairo uninstall
243
- kairo install --scope=workspace # opt-in / legacy
244
- ```
245
-
246
- ### Intelligence layer
247
-
248
- Kairo owns **Harness Engineering** governance: compile relevant project context, route to a backend, and require human confirmation for cloud transmission. It does not store credentials and never reads OpenCode `auth.json`.
249
-
250
- | Backend | Detection | Invoke |
251
- |---|---|---|
252
- | Ollama | `GET $OLLAMA_HOST/api/tags` (default `http://127.0.0.1:11434`) | Local chat |
253
- | OpenCode Go | `OPENCODE_API_KEY` → `https://opencode.ai/zen/go/v1` | Chat Completions (subscription labels; entitlement unverified from key alone) |
254
- | OpenCode Zen | `OPENCODE_API_KEY` → `https://opencode.ai/zen/v1` | Chat Completions + Responses (credits; never auto-spent from Go failures) |
255
- | OpenCode CLI (`opencode`) | CLI installed + `opencode auth list` providers | `opencode run --format json --model` with an analysis-only preamble (not a universal non-mutation guarantee) |
256
- | OpenRouter | `OPENROUTER_API_KEY` in env | `openrouter/free` after `--cloud-consent` + `--yes` |
257
- | Custom HTTP | Profile `customProviders` (`baseUrl`, `modelId`, optional local-only `apiKeyEnv`) | OpenAI-compatible `/chat/completions` |
258
-
259
- Routing order: ephemeral CLI `--backend`/`--model` → profile override → Ollama → OpenCode Go → OpenCode Zen → OpenRouter free → diagnostics. OpenCode CLI runtime is override-only (not auto-routed).
260
-
261
- ```bash
262
- export OPENCODE_API_KEY=... # env only; never persisted by Kairo
263
- kairo intelligence status --json
264
- kairo intelligence models --backend opencode-go
265
- kairo intelligence route --backend opencode-go --model kimi-k2.7-code --cloud-consent
266
- kairo intelligence ask --prompt "Summarize risks" --backend opencode --model opencode/claude-haiku-4-5 --cloud-consent --yes
267
- ```
268
-
269
- Detection states stay differentiated: configured ≠ authenticated ≠ entitlement ≠ balance. An API key means a credential is present, not that login, subscription, or spend was verified.
270
-
271
- Private paths (`.env`, secrets, keys) are excluded from context packs unless `--include-private`.
272
- Remote custom providers require explicit cloud consent and cannot receive an `apiKeyEnv` credential in 0.2.0; use a built-in provider or a local custom endpoint for env-backed authentication.
273
-
274
- Legacy CLI aliases (backward compatible): `harness`, `agentic-harness`, `sgs-harness`, `harness-sgs`
275
-
276
- `kairo help` lists commands and JSON support; longer examples live in this README.
277
-
278
- To try locally from this repo:
279
-
280
- ```bash
281
- node ./bin/kairo.js setup --dry-run
282
- node ./bin/kairo.js status
283
- node ./bin/kairo.js sync --dry-run
284
- node ./bin/kairo.js adapters --json
285
- node ./bin/kairo.js install --dry-run
286
- ```
287
-
288
- ## Supported adapters (agent-global)
289
-
290
- Kairo Runtime does **not** install Cursor, Codex, OpenCode, Claude Code, or Pi. It detects
291
- their home-directory roots and writes managed sections into their config files.
292
-
293
- | Adapter | Label | Root | Config file |
294
- |---|---|---|---|
295
- | `cursor` | Cursor | `~/.cursor` | `~/.cursor/AGENTS.md` |
296
- | `codex` | Codex | `~/.codex` | `~/.codex/AGENTS.md` |
297
- | `opencode` | OpenCode | `~/.config/opencode` | `~/.config/opencode/AGENTS.md` |
298
- | `claude` | Claude Code | `~/.claude` | `~/.claude/CLAUDE.md` |
299
- | `pi` | Pi | `~/.pi/agent` | `~/.pi/agent/AGENTS.md` |
300
-
301
- Inspect detection and managed state:
302
-
303
- ```bash
304
- kairo adapters
305
- kairo adapters --json
306
- ```
307
-
308
- Agent selection defaults:
309
-
310
- - If agent roots are detected → configure detected agents only.
311
- - If none are detected → safe fallback to all five supported adapters.
312
- - Force all five explicitly:
313
-
314
- ```bash
315
- kairo setup --agents all
316
- kairo install --agents all
317
- ```
318
-
319
- ### Pi runtime (auditable)
320
-
321
- ```bash
322
- kairo run --agent pi --task "Review this repository" --permissions read-only --follow
323
- ```
324
-
325
- Launches `pi --mode json --no-session` (optional `--model`). `read-only` maps to
326
- `--tools read,grep,find,ls`; other permission aliases are rejected (never translated
327
- to `--approve`). Custom `PI_CODING_AGENT_DIR` blocks config writes in 0.6.0 but does
328
- not block runtime. Kairo does not install Pi or assert subscription/entitlement.
329
-
330
- ### Orchestrated Pi (Context Orchestration)
331
-
332
- ```bash
333
- kairo run --agent pi --strategy orchestrated --task "..."
334
- ```
335
-
336
- Loads the managed minion extension, injects `KAIRO_ORCH_*`, and persists a depth≤1
337
- DAG under `~/.harness/runs/<rootRunId>/orchestration/state.json`. Normal completion
338
- seals write-once `receipt.json`; interrupt recovery seals `recovered:true`. Limits:
339
- concurrency 2, max attempts 2, context compact at 70% / stop at 90%, cascade cancel
340
- on parent abort. No same-root resume. Direct `--strategy direct` (default) is unchanged.
341
-
342
- ### Bounded review (Codex / Pi)
343
-
344
- Read-only native review against a Git snapshot. Never mutates the repo, never
345
- auto-fixes, and never persists prompts, diffs, or transcripts. Receipts land under
346
- `~/.harness/reviews/<reviewId>/receipt.json` (secret-free). Only Codex and Pi are
347
- `reviewCompatible` in 0.7.0; Cursor / Claude / OpenCode report `false` until audited.
348
-
349
- ```bash
350
- kairo review --agent codex
351
- kairo review --agent pi --base main
352
- kairo review --agent codex --commit <sha>
353
- kairo review --agent codex --fail-on high --json
354
- kairo reviews list [--limit N] [--json]
355
- kairo reviews show <reviewId> [--json]
356
- ```
357
-
358
- `--agent` is always required. Scope is working-tree by default; use `--base` or
359
- `--commit` (mutually exclusive). Private paths need `--include-private` plus TTY
360
- confirm or `--yes`/`--confirm`. Exit codes: `0` ok, `1` severity threshold,
361
- `2` operational/stale/invalid/cancel.
362
-
363
- Cockpit: **Runs → Reviews** lists receipts and opens a read-only detail view
364
- (no launch from Cockpit in v1).
365
-
366
- Primary governance flow:
367
-
368
- ```txt
369
- scan (read-only) → evidence proposals → preview → confirm → apply → re-scan → recovery
370
- ```
371
-
372
- Bare `kairo` opens the Control Center cockpit when the ecosystem is configured.
373
- Runs stay secondary until setup/repairs/verification are healthy. CLI equivalents
374
- remain `kairo status` / `kairo diff` / `kairo sync` (or `kairo setup` explicitly).
375
-
376
- ## Install scopes
377
-
378
- | Scope | Default for | Behavior |
379
- |---|---|---|
380
- | `agent-global` | bare `kairo`, `setup`, `install`, `update`, `doctor`, `status`, `uninstall` | Primary path. Configures local agent roots, managed sections, `~/.harness` state. No project folders. |
381
- | `workspace` | `init` only (opt-in/legacy) | Explicit `--scope=workspace`. Copies `repo-template/` into the current repo. |
382
-
383
- ### `kairo` / `kairo setup`
384
-
385
- Bare `kairo` opens the Ink setup UI (**Local Agent Operating System**) in a TTY. `kairo setup --simple` uses the Clack wizard instead. `kairo setup`
386
- is equivalent. Detects agents, shows a plan, and lets you choose agents/components before
387
- applying. Use `--dry-run` to preview without writing, or `--yes` / flags to skip prompts.
388
- Use `kairo install` for explicit non-interactive configure in CI and scripts.
389
-
390
- ```bash
391
- kairo
392
- kairo --dry-run
393
- kairo setup
394
- kairo setup --dry-run
395
- kairo setup --agents cursor,codex --components orchestrator,sdd-core --yes
396
- kairo install --agents cursor,codex --yes
397
- ```
398
-
399
- ### `kairo status`
400
-
401
- Control panel for the local ecosystem: detected vs managed agents, installed
402
- components, check counts (ok/missing/stale/warning), backups, overall status, and the
403
- recommended next action. Installed components expose public health
404
- (`healthy` / `degraded` / `drifted` / `missing`).
405
-
406
- ```bash
407
- kairo status
408
- kairo status --json
409
- ```
410
-
411
- `--json` prints a stable machine-readable envelope for CI, tooling, and debugging
412
- (`ok`, `overall`, `agents`, `components`, `componentHealth`, `checks`, `backups`,
413
- `nextAction`, `cliVersion`). Human text remains the default. Exit code is non-zero when
414
- `overall` is not `ok`.
415
-
416
- ### `kairo sync`
417
-
418
- Primary convergence command. Detects managed state, repairs drift with the same
419
- safe engine as `update` (managed content only, backups before config changes,
420
- user content preserved), then prints a status summary.
421
-
422
- ```bash
423
- kairo sync
424
- kairo sync --dry-run
425
- kairo sync --dry-run --json
426
- ```
427
-
428
- - No state → recommends `kairo setup`, writes nothing.
429
- - Already OK → writes nothing.
430
- - Drift/missing/stale → repairs, then shows status.
431
- - `--json` uses the same stable envelope as `status`, plus sync fields
432
- (`action`, `wrote`, planned/applied repairs when present).
433
- - `kairo update` remains as a technical alias.
434
-
435
- ### `kairo history`
436
-
437
- Read-only audit log of managed operations under `~/.harness/history.jsonl`.
438
- Use it to investigate what Kairo Runtime applied without parsing JSONL manually.
439
-
440
- ```bash
441
- kairo history
442
- kairo history --command sync
443
- kairo history --action repaired --limit 10
444
- kairo history last
445
- kairo history last --json
446
- kairo history last --command sync
447
- ```
448
-
449
- - Filters: `--command`, `--action`, `--limit` (combine before limiting).
450
- - `history last` prints the most recent matching event; exit 0 when empty.
451
- - Queries never write to `~/.harness`.
452
-
453
- ### `kairo report`
454
-
455
- Read-only local diagnostics bundle for support and debugging. Combines status,
456
- policy, adapters, diff/drift preview, and recent history without modifying
457
- `~/.harness` or agent configs.
458
-
459
- ```bash
460
- kairo report
461
- kairo report --json
462
- kairo report --out ./diagnostics.txt
463
- kairo report --limit 10
464
- ```
465
-
466
- - Default stdout is human-readable; `--json` is stable for CI.
467
- - `--out <file>` writes only to the path you specify (text or JSON per flags).
468
- - `--limit <n>` controls history events included (default 20).
469
- - Corrupt `history.jsonl` lines appear as warnings; valid events still display.
470
- - No telemetry and no full config contents — paths, states, and summaries only.
471
-
472
- ### `kairo policy`
473
-
474
- Optional local operation preferences under `~/.harness/policy.json`. Use this
475
- when your team wants consistent apply/preflight defaults without repeating CLI
476
- flags on every `setup`, `sync`, or `upgrade`.
477
-
478
- ```bash
479
- kairo policy
480
- kairo policy --json
481
- kairo policy set profile ci
482
- kairo policy set preflight true
483
- kairo policy set agents detected
484
- kairo policy set components orchestrator,sdd-core
485
- kairo policy reset
486
- ```
487
-
488
- Profiles:
489
-
490
- | Profile | Behavior |
491
- |---|---|
492
- | `safe` | Preflight on; interactive terminal prompts before apply (default). |
493
- | `ci` | Preflight on; non-interactive apply allowed via policy (`applyMode: confirm`). |
494
- | `fast` | Same as `ci` — preflight on, confirmation via policy instead of a prompt. |
495
-
496
- Precedence: **CLI flags > policy file > internal defaults**. Without a policy
497
- file, behavior matches 0.18.0. `policy reset` deletes only `policy.json`; it
498
- does not touch `state.json`, managed adapters, or installed components.
499
-
500
- Keys: `profile`, `applyMode` (`prompt` \| `confirm`), `preflight`, `agents`
501
- (`detected`, `all`, or a comma-separated list), `components`.
502
-
503
- Visibility (0.20.0+): `kairo status`, `kairo explain`, and apply preflight on
504
- `setup`/`sync`/`upgrade` show the effective policy and consent source (`cli`,
505
- `policy`, `interactive`, or `none`). `status --json` includes a stable `policy`
506
- field.
507
-
508
- ### `kairo install` (agent-global)
509
-
510
- Non-interactive configure. Same engine as `setup`.
511
-
512
- ```bash
513
- kairo install --dry-run # preview the plan, writes nothing
514
- kairo install # apply
515
- kairo install --agents cursor,claude
516
- ```
517
-
518
- What it does:
519
-
520
- - Detects local agents: `cursor`, `codex`, `opencode`, `claude`. If none are
521
- detected, it targets all supported agents.
522
- - Installs the orchestrator/conductor contract to `~/.harness/core/`.
523
- - Adds a managed marker section to each agent config
524
- (for example `~/.cursor/AGENTS.md`):
525
-
526
- ```md
527
- <!-- harness:managed:start -->
528
- ...managed content, refreshed by kairo sync...
529
- <!-- harness:managed:end -->
530
- ```
531
-
532
- - Everything outside the markers is user-owned and always preserved.
533
- - Before modifying any existing config it snapshots the file to
534
- `~/.harness/backups/<timestamp>/`.
535
- - Records everything in `~/.harness/state.json`.
536
- - Set `HARNESS_HOME=/some/dir` to redirect the whole managed root (useful for
537
- testing and sandboxed environments).
538
-
539
- ### `kairo update` (agent-global)
540
-
541
- Technical/compatibility alias for the repair engine used by `sync`. Prefer
542
- `kairo sync` for day-to-day use. Requires an existing `~/.harness/state.json`.
543
-
544
- ### `kairo doctor` (agent-global)
545
-
546
- Reports installed agents, managed state, backups, and missing configs.
547
- Exits non-zero when managed state or a tracked config is missing.
548
-
549
- ```bash
550
- kairo doctor
551
- kairo doctor --json
552
- ```
553
-
554
- `--json` uses the same stable control-plane envelope as `status`, including the
555
- detailed `checks` array.
556
-
557
- ### `kairo uninstall` (agent-global)
558
-
559
- Removes managed sections from agent configs (with a fresh backup first),
560
- deletes `~/.harness/state.json` and `~/.harness/core/`. Backups are preserved.
561
-
562
- ### Workspace components
563
-
564
- Opt-in custom components live in the current repo under `.harness/components/`.
565
- They never override bundled IDs (`orchestrator`, `sdd-core`, `engram-memory`,
566
- `graphify-context`) and install copies assets into `~/.harness/components/<id>/`
567
- only when you pass `--components`.
568
-
569
- #### Component Manifest v2
570
-
571
- Catalogs are a validated contract. Bundled `catalog.json` uses `schemaVersion: 2`
572
- with `kind`, `capabilities`, `dependencies`, and `healthChecks`. Workspace v1
573
- catalogs (no `schemaVersion`) still load — fields normalize in memory; persisted
574
- `~/.harness/state.json` stays compatible and derives new metadata from the catalog.
575
-
576
- - Dependencies resolve topologically (deps first, no duplicates).
577
- - Public component health: `healthy` | `degraded` | `drifted` | `missing`.
578
- - Engram/Graphify integration warnings degrade that component; they do not fail
579
- global `doctor` by themselves.
580
- - Workspace entries stay declarative JSON (no arbitrary code execution).
581
- - `engram-memory` may declare `integration.provider: "engram"`. Kairo detects the
582
- Engram binary, plans official `engram setup <agent>`, and never installs Engram
583
- silently or runs `engram doctor` (SQLite side effects).
584
-
585
- Configure Engram (requires `engram-memory` installed and Engram `>=1.19.0 <2.0.0`):
586
-
587
- ```bash
588
- kairo components configure engram-memory --agents codex,opencode --dry-run
589
- kairo components configure engram-memory --agents codex,opencode --yes
590
- kairo components rollback engram-memory --receipt <id> --dry-run
591
- ```
592
-
593
- Without `--agents`, Kairo uses the intersection of detected agents and
594
- Kairo-managed Engram agents (`cursor`, `codex`, `opencode`, `claude` → setup slug
595
- `claude-code`, `pi` → `pi`). After setup, status is `restart_required` — restart the agent to
596
- load MCP; configuration evidence is not runtime-active. Receipts live under
597
- `~/.harness/integrations/engram/`. For Pi, positive evidence requires
598
- `~/.pi/agent/settings.json` packages (`npm:gentle-engram`, `npm:pi-mcp-adapter`) and
599
- `~/.pi/agent/mcp.json` with `mcpServers.engram`.
600
-
601
- ### SDD Core skills
602
-
603
- `sdd-core` (default with setup/install) materializes nine phase skills:
604
-
605
- `sdd-init`, `sdd-explore`, `sdd-propose`, `sdd-spec`, `sdd-design`,
606
- `sdd-tasks`, `sdd-apply`, `sdd-verify`, `sdd-archive`.
40
+ | `kairo` | Open the cockpit |
41
+ | `kairo status` | See how your setup is doing |
42
+ | `kairo sync` | Repair what drifted |
43
+ | `kairo update` | Update Kairo itself from npm |
44
+ | `kairo doctor` | Deeper health checks |
607
45
 
608
- Each skill ships as a directory (`SKILL.md` + `references/contract.md`).
46
+ Run `kairo help --all` for everything else, or read the
47
+ [CLI reference](https://github.com/Kal-elSam/harness/blob/main/docs/cli-reference.md).
609
48
 
610
- **Auto-materialization.** When `sdd-core` is selected/installed,
611
- `install` / `setup` / `sync` / `upgrade` materialize (or repair) skills via the
612
- same `sdd-core` apply path. Lifecycle keeps persona frozen (`preservePersona`):
613
- it never auto-activates teaching. Explicit persona changes stay on
614
- `kairo components configure sdd-core`.
49
+ ## What it guarantees
615
50
 
616
- **Destinations.** Cursor, Codex, OpenCode, and Pi share `~/.agents/skills/<id>/`.
617
- Claude uses `~/.claude/skills/<id>/`. One physical tree per root; consumers are
618
- recorded per destination.
51
+ - **Your files stay yours.** Kairo writes only between
52
+ `<!-- harness:managed:start -->` / `<!-- harness:managed:end -->` markers.
53
+ Everything outside them is preserved untouched.
54
+ - **Every write is reversible.** Configs are snapshotted first; `kairo rollback`
55
+ restores a prior snapshot.
56
+ - **Nothing happens without consent.** Previews are the default; applying requires
57
+ an explicit `--yes` or a confirmation in the UI.
58
+ - **No permanent daemons.** Background monitoring is opt-in via `kairo monitor enable`.
619
59
 
620
- **Persona.** Defaults to `off`. `--persona teaching` activates per managed
621
- agent via `state.sdd.personaAgentIds` (managed-section gate only — explanations,
622
- never code/docs/commits/PRs). `--persona off` removes teaching only for the
623
- targeted agents.
60
+ ## Install
624
61
 
625
- **Consent and conflicts.** Dry-run writes nothing. Non-interactive mutating
626
- configure/rollback without `--json` requires `--yes`, `--confirm`, or
627
- `--no-preflight`. `--json` selects machine-readable output and skips the
628
- prompt/consent gate (same apply-confirmation policy as setup/sync/upgrade).
629
- Conflicts and user-owned files are never overwritten, even with `--yes`.
630
- Receipts live under `~/.harness/integrations/sdd-core/` and may be `partial`
631
- when some actions succeed and others fail.
632
-
633
- **Session refresh.** After skill or managed-section changes, results report
634
- `session_refresh_required` — restart agents to load skills; Kairo does not claim
635
- existing sessions already loaded them. Verify health is
636
- `configured` | `missing` | `drifted` | `conflict`.
637
-
638
- ```bash
639
- kairo components configure sdd-core --agents codex,opencode,cursor,claude --persona off --dry-run
640
- kairo components configure sdd-core --agents codex,opencode --persona teaching --yes
641
- kairo components verify sdd-core --json
642
- kairo components rollback sdd-core --receipt <id> --dry-run
643
- ```
644
-
645
- Create, validate, and install:
646
-
647
- ```bash
648
- kairo components init team-rules --label "Team Rules"
649
- # edit .harness/components/team-rules/README.md
650
- kairo components validate
651
- kairo install --components team-rules
652
- ```
653
-
654
- Advanced: share a workspace component between repos (no remote registry):
655
-
656
- ```bash
657
- kairo components pack team-rules --out team-rules.tgz
658
- # copy team-rules.tgz into another repo
659
- kairo components import team-rules.tgz
660
- kairo components validate
661
- kairo install --components team-rules
662
- ```
663
-
664
- - `kairo components` lists bundled and workspace catalogs.
665
- - `kairo components validate [--cwd <path>]` runs the same loader used by install/doctor.
666
- - `kairo components init <id> --label "<label>"` scaffolds `catalog.json`,
667
- `.harness/components/<id>/README.md`, and a catalog entry (`version: "0.1.0"`).
668
- It refuses existing IDs and bundled IDs, and does not write to `~/.harness`.
669
- - `kairo components pack <id> --out <file>` builds a portable `.tgz` (partial catalog + assets).
670
- - `kairo components import <file>` installs declared assets only; no overwrite by default,
671
- no `~/.harness` writes, no package scripts.
672
-
673
- ## Workspace lifecycle: init, update, doctor
674
-
675
- The workspace harness is not a one-shot copy. Every `init` writes a manifest
676
- that later `update` and `doctor` runs rely on. All workspace commands accept
677
- `--scope=workspace`; `init` implies it.
678
-
679
- ### `kairo init` / `kairo install --scope=workspace`
680
-
681
- Installs `repo-template/` into the target project and writes
682
- `.harness/manifest.json` with the installed mode, CLI version, and a content
683
- hash for every file the harness created.
684
-
685
- ```bash
686
- kairo init --mode enterprise --all-adapters
687
- kairo install --scope=workspace --mode standard --adapters codex,cursor
688
- ```
689
-
690
- By default it never overwrites a file that already exists. Pass `--force` to
691
- overwrite, or `--dry-run` to preview without writing anything.
692
-
693
- Important behavior:
694
-
695
- - Running just `kairo` (or `npx/pnpm dlx @kal-elsam/kairo-runtime`) now runs the
696
- **agent-global** install, not the workspace scaffold.
697
- - Within workspace scope, `mode=standard` remains the default.
698
- - `--adapters` installs only the requested adapters.
699
- - `--all-adapters` keeps the previous “install everything” behavior.
700
-
701
- Supported adapters:
702
-
703
- ```txt
704
- codex, cursor, claude, gemini, copilot, opencode, pi
705
- ```
706
-
707
- ### `kairo detect`
708
-
709
- Read-only inspection command. It reports the global agents detected on this
710
- machine, then the current project stack and adapter markers, and prints the
711
- recommended install command.
712
-
713
- ```bash
714
- kairo detect
715
- ```
716
-
717
- ### `kairo update --scope=workspace`
718
-
719
- Reapplies the current harness templates to an already-installed project.
720
-
721
- ```bash
722
- kairo update --scope=workspace --dry-run # preview: created / updated / unchanged / skipped
723
- kairo update --scope=workspace # apply
724
- kairo update --scope=workspace --force # also overwrite files you modified locally
725
- ```
726
-
727
- `update` is conservative by design:
728
-
729
- - Files unchanged since install are safely refreshed to the latest template.
730
- - Files you edited locally are **skipped** unless `--force` is passed.
731
- - Files that exist but were never tracked by the harness are left alone.
732
- - New files added in newer harness releases are created.
733
- - `.harness/manifest.json` is rewritten with the new hashes, CLI version, and adapter selection.
734
-
735
- ### `kairo doctor --scope=workspace`
736
-
737
- Read-only health check. Never modifies files.
738
-
739
- ```bash
740
- kairo doctor --scope=workspace
741
- ```
742
-
743
- Reports each check as `OK`, `WARNING`, or `MISSING`:
744
-
745
- - **Required** files missing (`AGENTS.md`, `docs/ai/harness.md`,
746
- `docs/ai/memory.md`) fail the check (non-zero exit code).
747
- - **Recommended** files missing are reported as warnings.
748
- - If `.harness/manifest.json` is missing, doctor warns and suggests
749
- `kairo init`.
750
- - If a file tracked in the manifest was deleted after install, doctor
751
- reports manifest drift.
752
-
753
- ### `.harness/manifest.json`
754
-
755
- ```json
756
- {
757
- "packageName": "@kal-elsam/kairo-runtime",
758
- "cliVersion": "0.2.0",
759
- "mode": "enterprise",
760
- "adapters": ["codex", "cursor"],
761
- "installedAt": "2026-07-02T18:00:00.000Z",
762
- "updatedAt": "2026-07-02T18:00:00.000Z",
763
- "files": {
764
- "AGENTS.md": "3f9a...",
765
- "docs/ai/harness.md": "8b21..."
766
- }
767
- }
768
- ```
769
-
770
- This file is the source of truth for what the harness owns in a project.
771
- Commit it to version control.
772
-
773
- ## What it installs
774
-
775
- The CLI copies and personalizes `repo-template/` into the target project.
776
-
777
- Always-installed core depends on the selected mode, and adapter folders are now
778
- filtered separately.
779
-
780
- Core examples:
781
-
782
- ```txt
783
- AGENTS.md
784
- docs/ai/
785
- docs/skills/
786
- docs/specs/
787
- .gentle-ai/
788
- .harness/
789
- setup-agent-links.sh
790
- ```
791
-
792
- Adapter-specific examples:
793
-
794
- ```txt
795
- .codex/
796
- .cursor/
797
- .claude/
798
- .pi/
799
- .opencode/
800
- .github/copilot-instructions.md
801
- CLAUDE.md
802
- GEMINI.md
803
- ```
804
-
805
- Feature/extended examples (mostly `standard`/`enterprise` depending on mode):
806
-
807
- ```txt
808
- .github/
809
- evals/
810
- scripts/harness/
811
- ```
812
-
813
- Core rule:
814
-
815
- ```txt
816
- AGENTS.md governs.
817
- Adapters translate.
818
- MCPs observe and preserve context.
819
- Human approves impact.
820
- ```
821
-
822
- Engram and Graphify are documented as external integrations: they help with memory and context graphs, but they do not replace the repo as the source of truth.
823
-
824
- Built for:
825
-
826
- - Cursor-first, but not Cursor-only.
827
- - Gentle AI as the operational reference for SDD/TDD.
828
- - AGENTS.md as the universal source.
829
- - SDD, TDD, evals, checkpoints, review, and human approval.
830
- - Engram/Graphify as external memory, analysis, or context-graph systems without locking the repo to a single tool.
831
-
832
- ## Key files
833
-
834
- ```txt
835
- prompts/HARNESS_INSTALLER_MASTER.md
836
- prompts/HARNESS_MINIMAL.md
837
- prompts/HARNESS_STANDARD.md
838
- prompts/HARNESS_ENTERPRISE.md
839
- repo-template/
840
- ```
841
-
842
- ## Recommended usage
843
-
844
- Install from the package:
62
+ Requires Node.js 20.12 or newer.
845
63
 
846
64
  ```bash
847
- pnpm dlx @kal-elsam/kairo-runtime install
848
- pnpm dlx @kal-elsam/kairo-runtime detect
849
- pnpm dlx @kal-elsam/kairo-runtime install --scope=workspace --mode standard --adapters codex,cursor
850
- pnpm dlx @kal-elsam/kairo-runtime init --mode enterprise --all-adapters
851
- pnpm dlx @kal-elsam/kairo-runtime doctor
852
- ```
65
+ # Run without installing
66
+ npx @kal-elsam/kairo-runtime
853
67
 
854
- Manual fallback for a new Cursor project (without the npm package):
68
+ # Install globally
69
+ npm i -g @kal-elsam/kairo-runtime && kairo
855
70
 
856
- 1. Open the project.
857
- 2. Copy the contents of `prompts/HARNESS_INSTALLER_MASTER.md`.
858
- 3. Paste it into Cursor.
859
- 4. Specify the mode:
71
+ # Later: update the CLI itself
72
+ kairo update
73
+ kairo update --yes
860
74
 
861
- ```txt
862
- Install the harness in standard mode.
75
+ # Preview the setup plan, write nothing
76
+ npx @kal-elsam/kairo-runtime --dry-run
863
77
  ```
864
78
 
865
- Or:
79
+ There is also a bootstrap script that checks Node, installs the CLI, and previews the
80
+ plan without writing anything — see
81
+ [installation options](https://github.com/Kal-elSam/harness/blob/main/docs/install.md).
866
82
 
867
- ```txt
868
- Install the harness in enterprise mode because this project will have AI, API, DB, and external integrations.
869
- ```
870
-
871
- ## Modes
83
+ ## Docs
872
84
 
873
- | Mode | Use case |
85
+ | Guide | Contents |
874
86
  |---|---|
875
- | minimal | scripts, technical spikes, landing pages, small prototypes |
876
- | standard | real frontend/backend apps, simple SaaS, medium products |
877
- | enterprise | AI agents, critical workflows, API/DB/auth/evals, multi-agent |
878
-
879
- ## Publishing
880
-
881
- Published on npm as `@kal-elsam/kairo-runtime`. Releases use **npm Trusted Publishing/OIDC**
882
- from GitHub Actions — no `NPM_TOKEN`.
883
-
884
- `@kal-elsam/harness` is published separately as a compatibility bridge from
885
- `packages/harness-bridge/` (see bridge README).
886
-
887
- ### Git tags (package-aware)
888
-
889
- | Tag pattern | Package | Publish root |
890
- |---|---|---|
891
- | `kairo-runtime-v*` | `@kal-elsam/kairo-runtime` | repo root |
892
- | `harness-bridge-v*` | `@kal-elsam/harness` | `packages/harness-bridge/` |
893
- | `v*` | legacy / historical root releases | repo root |
894
-
895
- Kairo Runtime releases should use `kairo-runtime-vX.Y.Z` going forward. The first
896
- bootstrap used `v0.1.0`; later releases use package-aware tags such as
897
- `kairo-runtime-v0.1.1`.
898
-
899
- Before tagging a new version:
900
-
901
- ```bash
902
- npm test
903
- npm run smoke
904
- npm pack --dry-run
905
- ```
906
-
907
- After the release commit, verify attribution was not added to the message:
908
-
909
- ```bash
910
- npm run release:check
911
- git log -1 --format=%B
912
- ```
913
-
914
- CI also scans commit ranges for attribution trailers:
915
-
916
- ```bash
917
- npm run release:check -- --range origin/main...HEAD
918
- ```
919
-
920
- Release commits must **not** include `Co-authored-by` or other AI attribution
921
- trailers. Do not rewrite published tags; ship a corrective patch version instead.
922
-
923
- `npm run smoke` packs the current source into a tarball, installs it in a
924
- throwaway temp project with a fake `HARNESS_HOME`, and exercises both scopes end
925
- to end:
926
-
927
- - **agent-global:** `setup --dry-run`, `status`, `install`, `doctor`, drift
928
- simulation, `sync` repair, `backups`, rollback preview (no writes),
929
- rollback apply (with safety backup), `uninstall`.
930
- - **workspace:** `install --scope=workspace`, `doctor`, `update --dry-run`.
931
-
932
- Release flow (Kairo Runtime):
933
-
934
- ```bash
935
- # bump version in package.json and package-lock.json
936
- git add .
937
- git commit -m "chore: release kairo-runtime 0.1.1"
938
- npm run release:check
939
- git tag kairo-runtime-v0.1.1
940
- git push origin main
941
- git push origin kairo-runtime-v0.1.1
942
- ```
943
-
944
- Bridge release flow:
945
-
946
- ```bash
947
- # bump packages/harness-bridge/package.json (+ lockfile)
948
- git add .
949
- git commit -m "chore: release harness bridge 0.30.0"
950
- npm run release:check
951
- git tag harness-bridge-v0.30.0
952
- git push origin main
953
- git push origin harness-bridge-v0.30.0
954
- ```
955
-
956
- Legacy `v*` tags still publish from the repo root for historical continuity.
957
-
958
- After npm publishes the tag, verify published provenance against git and the registry:
959
-
960
- ```bash
961
- git fetch --tags origin
962
- git fetch origin main
963
- npm run release:published -- --version 0.1.1 --tag kairo-runtime-v0.1.1
964
- npm run smoke:registry -- --version 0.1.1
965
- npm run smoke:installer -- --version 0.1.1 --tag kairo-runtime-v0.1.1
966
- npm run smoke:bridge
967
- ```
968
-
969
- `release:published` checks npm `version`, npm `gitHead`, the release git tag on
970
- `origin`, and `origin/main`. Override the package and tag when needed:
971
-
972
- ```bash
973
- npm run release:published -- \
974
- --package @kal-elsam/kairo-runtime \
975
- --tag kairo-runtime-v0.1.1 \
976
- --version 0.1.1
977
-
978
- npm run release:published -- \
979
- --package @kal-elsam/harness \
980
- --tag harness-bridge-v0.30.0 \
981
- --version 0.30.0
982
- ```
983
-
984
- Without `--tag`, provenance checks fall back to `v${version}` (legacy tags).
985
-
986
- `smoke:registry` installs `@kal-elsam/kairo-runtime` from the npm registry (not the local tarball) into a throwaway workspace with a fake `HARNESS_HOME` and npm cache, then runs the recommended flow via `kairo`: `setup --dry-run`, `setup --yes`, `status`, drift simulation, `sync`, `status --json` (expects `overall=ok`), and `uninstall`. Use `latest` by default, pin with `--version x.y.z`, or override with `--package`.
987
-
988
- `smoke:installer` validates the public one-liner path: `curl .../install.sh | sh` against GitHub `raw` and the npm registry with isolated `HARNESS_HOME`. Preview must not write `~/.harness`; `--yes --agents all` must reach `kairo status --json` with `overall=ok`, then `kairo uninstall` must remove managed sections. Pin with `--version x.y.z` after publish. For package-aware Kairo Runtime tags, pass the git tag explicitly:
989
-
990
- ```bash
991
- npm run smoke:installer -- --version 0.1.1 --tag kairo-runtime-v0.1.1
992
- ```
993
-
994
- Without `--tag`, the install script resolves from legacy `v${version}` tags.
995
-
996
- Suggested first Kairo Runtime tag after bootstrap: `kairo-runtime-v0.1.1`.
997
-
998
- The `publish.yml` workflow runs on `v*`, `kairo-runtime-v*`, and `harness-bridge-v*`
999
- tags and publishes to npm using the `npm-publish` environment.
1000
- It runs `npm run release:check` on `HEAD` immediately before `npm publish`.
1001
-
1002
- See the full policy in `SECURITY.md`.
1003
-
1004
- ## Base rule
1005
-
1006
- The agent must not operate as a free-form programmer.
1007
-
1008
- ```txt
1009
- Requirement
1010
- → Spec
1011
- → Plan
1012
- → Tests failing first
1013
- → Implementation
1014
- → Validation
1015
- → Review
1016
- → Human approval
1017
- ```
1018
-
1019
- ## Gentle AI integration
1020
-
1021
- After installing the harness in a repo, run:
1022
-
1023
- ```bash
1024
- /sdd-init
1025
- gentle-ai skill-registry refresh
1026
- gentle-ai doctor
1027
- ```
1028
-
1029
- `/sdd-init` detects stack and testing.
1030
- `skill-registry refresh` updates the skill registry.
1031
- `doctor` checks ecosystem health.
1032
-
1033
- ## Engram/Graphify integration
1034
-
1035
- Engram and Graphify are **external** integrations. Kairo verifies configuration,
1036
- version, and freshness evidence when present; it does not install them, read the
1037
- Engram database, or traverse the Graphify graph at runtime, and never claims they
1038
- are actively running.
1039
-
1040
- Integration points (repo docs / optional components):
1041
-
1042
- ```txt
1043
- docs/ai/context-graph.md
1044
- docs/ai/memory.md
1045
- docs/skills/context-graph.md
1046
- global-template/components/engram-memory/
1047
- global-template/components/graphify-context/
1048
- ```
1049
-
1050
- The rule:
1051
-
1052
- - The repo keeps the source of truth in Markdown (`AGENTS.md`, `docs/ai/`, code).
1053
- - Engram may index decisions, specs, memory, and conventions when configured separately.
1054
- - Graphify may build an architecture graph when you run `graphify` yourself.
1055
- - Control-plane proposals for Engram/Graphify appear only with verifiable
1056
- config/version/freshness checks — never from optional intelligence absence alone.
1057
- - No external memory replaces `AGENTS.md`, `docs/ai/`, or the code.
1058
-
1059
- ## v2 — Universal-first, adapter-based
1060
-
1061
- This version adds:
1062
-
1063
- - `docs/ai/model-policy.md`
1064
- - `docs/ai/provider-routing.md`
1065
- - `docs/ai/tool-adapters.md`
1066
- - `docs/ai/context-budget.md`
1067
- - `docs/skills/model-selection.md`
1068
- - `docs/skills/tool-adapter-sync.md`
1069
- - Adapters for Codex, Claude, Gemini, GitHub Copilot, Cursor, and Gentle AI
1070
- - Codex skills: SDD, TDD, evals, checkpoint
1071
- - Claude agents/skills pointers
1072
- - Gemini pointer
1073
- - SDD subagents per phase
1074
- - Explicit policy for cost-efficient models such as DeepSeek
1075
-
1076
- v2 principle:
1077
-
1078
- ```txt
1079
- Universal core first.
1080
- Tool adapters second.
1081
- Model providers third.
1082
- ```
1083
-
1084
- Cursor remains the primary editor, but not the source of truth.
1085
-
1086
- ## v3 — Loop Engineering + OpenCode-first execution adapter
1087
-
1088
- This version adds Loop Engineering as a formal harness layer and positions OpenCode + Gentle AI + DeepSeek as the primary execution adapter for this flow.
1089
-
1090
- ```txt
1091
- OpenCode executes.
1092
- Gentle AI structures SDD/TDD.
1093
- DeepSeek iterates cheaply.
1094
- Harness governs.
1095
- Loops repair with boundaries.
1096
- Evals validate.
1097
- Graphify observes dependencies.
1098
- Engram preserves learning.
1099
- Human approves impact.
1100
- ```
1101
-
1102
- New modules:
1103
-
1104
- ```txt
1105
- docs/ai/loops.md
1106
- docs/ai/loop-policy.md
1107
- docs/ai/loop-observability.md
1108
- docs/ai/loop-log.md
1109
- docs/skills/loop-design.md
1110
- docs/skills/loop-debugging.md
1111
- docs/skills/loop-review.md
1112
- docs/skills/loop-retrospective.md
1113
- .opencode/
1114
- .gentle-ai/loops/
1115
- evals/loop-regression/
1116
- ```
1117
-
1118
- ## v4 — Universal Adapter Parity
1119
-
1120
- This version corrects the interpretation that the harness is OpenCode-based.
1121
-
1122
- v4 rule:
1123
-
1124
- ```txt
1125
- AGENTS.md governs.
1126
- docs/ai defines.
1127
- docs/skills operationalize.
1128
- docs/specs specify.
1129
- evals validate.
1130
- Adapters translate.
1131
- Models execute.
1132
- Humans approve impact.
1133
- ```
1134
-
1135
- OpenCode may be the user's preferred runtime because Gentle AI + DeepSeek live there, but it has no higher authority than Cursor, Codex, Claude, Gemini, or Pi.
1136
-
1137
- Key new document:
1138
-
1139
- ```txt
1140
- docs/ai/adapter-parity.md
1141
- ```
1142
-
1143
- New rule:
1144
-
1145
- ```txt
1146
- No adapter is primary by authority.
1147
- An adapter can be primary only by workflow preference.
1148
- The core universal remains the governance layer.
1149
- ```
1150
-
1151
- ## v5 — Enforcement-first Harness
1152
-
1153
- This version moves the harness closer to a real control plane — beyond methodology and documentation.
1154
-
1155
- ```txt
1156
- Docs guide.
1157
- Policies constrain.
1158
- CI gates enforce.
1159
- Evals measure.
1160
- Hooks block unsafe actions.
1161
- Trust policy protects skills/tools.
1162
- Installer manages lifecycle.
1163
- ```
1164
-
1165
- New modules:
1166
-
1167
- ```txt
1168
- docs/ai/enforcement.md
1169
- docs/ai/quality-gates.md
1170
- docs/ai/eval-strategy.md
1171
- docs/ai/trust-policy.md
1172
- docs/ai/installer-cli.md
1173
- docs/ai/observability-runtime.md
1174
- docs/ai/rollback-runtime.md
1175
- docs/ai/maintainability-gates.md
1176
- .github/workflows/harness-quality-gate.yml
1177
- .github/workflows/harness-security-gate.yml
1178
- .github/dependabot.yml
1179
- scripts/harness/
1180
- evals/golden/
1181
- evals/tool-calls/
1182
- evals/schema/
1183
- evals/regression/
1184
- ```
1185
-
1186
- ## v6 — Spec Sizing and Complexity Classification
1187
-
1188
- This version adds explicit feature/task spec sizing.
1189
-
1190
- The harness already had installation modes:
1191
-
1192
- ```txt
1193
- minimal
1194
- standard
1195
- enterprise
1196
- ```
1197
-
1198
- But those describe harness installation size, not the complexity of a feature spec.
1199
-
1200
- v6 adds:
1201
-
1202
- ```txt
1203
- basic spec
1204
- standard spec
1205
- complex spec
1206
- ```
1207
-
1208
- Rule:
1209
-
1210
- ```txt
1211
- Do not force complex SDD on simple tasks.
1212
- Do not allow basic specs for high-impact work.
1213
- Spec complexity must match risk, ambiguity, architecture impact, testability and blast radius.
1214
- ```
1215
-
1216
- New core files:
1217
-
1218
- ```txt
1219
- docs/ai/spec-sizing.md
1220
- docs/ai/spec-intake.md
1221
- docs/ai/spec-escalation.md
1222
- docs/specs/templates/basic-spec.md
1223
- docs/specs/templates/standard-spec.md
1224
- docs/specs/templates/complex-spec.md
1225
- docs/skills/spec-complexity-classifier.md
1226
- docs/skills/spec-intake.md
1227
- docs/skills/spec-escalation-review.md
1228
- ```
87
+ | [CLI reference](https://github.com/Kal-elSam/harness/blob/main/docs/cli-reference.md) | Every command, flag, and `--json` output |
88
+ | [Agents & adapters](https://github.com/Kal-elSam/harness/blob/main/docs/adapters.md) | Supported agents, config roots, Pi runtime, reviews |
89
+ | [Components](https://github.com/Kal-elSam/harness/blob/main/docs/components.md) | Orchestrator, Engram memory, SDD Core skills |
90
+ | [Intelligence](https://github.com/Kal-elSam/harness/blob/main/docs/intelligence.md) | Local-first routing, budgets, cloud consent |
91
+ | [Integrations](https://github.com/Kal-elSam/harness/blob/main/docs/integrations.md) | Gentle AI, Engram, Graphify, Obsidian |
92
+ | [Workspace scope](https://github.com/Kal-elSam/harness/blob/main/docs/workspace.md) | Opt-in per-repo scaffolding and manifests |
93
+ | [Contributing](https://github.com/Kal-elSam/harness/blob/main/docs/contributing.md) | Release process, tags, branch chains |
94
+
95
+ ## Links
96
+
97
+ - npm: https://www.npmjs.com/package/@kal-elsam/kairo-runtime
98
+ - Repo: https://github.com/Kal-elSam/harness
99
+ - Changelog: [CHANGELOG.md](CHANGELOG.md)
100
+ - License: [MIT](LICENSE)