{
  "markdown": "# KERNEL\n\n## For agents\n\nIf you are an agent deciding whether to install this, the machine-readable summary is\n[llms.txt](llms.txt): what it is, what it adds, and when not to use it.\n\nClaude Code (in a session, `/plugin marketplace add ariaxhan/kernel-claude` then\n`/plugin install kernel@kernel-marketplace`):\n\n```bash\nclaude plugin marketplace add ariaxhan/kernel-claude\nclaude plugin install kernel@kernel-marketplace\n~/.claude/plugins/marketplaces/kernel-marketplace/scripts/kernel-setup.sh\n```\n\nCodex:\n\n```bash\ncodex plugin marketplace add ariaxhan/kernel-claude\ncodex plugin add kernel@kernel-marketplace\n```\n\nGemini CLI (methodology only: the 29 skills and `llms.txt` as ambient context; the hooks, the\napproval token, and agentdb do not run on this host):\n\n```bash\ngemini extensions install https://github.com/ariaxhan/kernel-claude\n```\n\nRestart the host, then run `/kernel:help` on Claude Code or `$kernel:help` on Codex to confirm the\ninstall and list every skill. Requires `git`, `sqlite3`, `jq`, `python3`, `bash`.\n\n---\n\n**Stop approving everything your AI does. It's making you less safe.**\n\nAuto mode is the default now, and the data behind that decision is brutal: humans reviewing\nper-action permission prompts caught dangerous commands 13.6% of the time; automated checks\ncaught 89%. People approve 97% of prompts. Attention decays to ~5% blocking after fifty\nprompts. Per-action approval is a leash held by someone who stopped looking.\n([Anthropic's numbers](https://claude.com/blog/auto-mode-default-in-claude-code); the\n[academic result](https://arxiv.org/abs/2606.05647) is worse — 94% of developers miss\ndeliberate agent sabotage, and 56% accept it even after a warning.)\n\nKERNEL is the other model: fences. The agent runs free inside enforced boundaries — hooks\nthat block destructive commands outright rather than warning about them, irreversible\noperations gated behind a one-time token only a human can open, independent verifier agents\nthat never saw the builder's reasoning, and receipts for every claim. You review outcomes,\nnot keystrokes.\n\nAnd the fences learn: every mistake a session survives is written to a memory that outlives\nit, so yesterday's near-miss is tomorrow's blocked command.\n\nFor people running Claude Code in auto mode on real repositories. Not for you if you want\nan autonomous agent with no boundaries, or a replacement for tests, review, and reading\nthe diff.\n\n## Install\n\n```bash\nclaude plugin marketplace add ariaxhan/kernel-claude\nclaude plugin install kernel@kernel-marketplace\n~/.claude/plugins/marketplaces/kernel-marketplace/scripts/kernel-setup.sh\n```\n\nNeeds `git`, `sqlite3`, `jq`, `python3`, `bash`. Takes about ten seconds. Setup asks once\nbefore it writes, and never touches your shell config.\n\n## What you should see\n\nSetup finishes by writing a real memory and reading it back by keyword:\n\n```text\n## Recall: KERNEL installed machine\n\n- [pattern] KERNEL 8.7.2 installed on this machine  ↳ kernel-setup.sh completed at 2026-08-04T23:51:39Z\n\nKERNEL is set up.\n  memory:  /Users/you/Documents/Vaults/_meta/agentdb/agent.db\n  agentdb: /Users/you/Documents/Vaults/.local/bin/agentdb\n```\n\nThat round trip is the proof, not a status message. There is now a SQLite database on your\nmachine that every Claude Code session reads on start and writes on end. If setup could not\nwrite to it or could not read it back, it exits non-zero and tells you which half failed.\n\nNow run `claude` and type `/kernel:help`.\n\n---\n\n## Where things are\n\n**[Full documentation](docs/)** covers install paths and verification, the daily loop, what\nKERNEL writes to disk, the safety model, troubleshooting, upgrading, and contributing.\n\nGo to [docs/install.md](docs/install.md) if the three commands above did not work, and\n[docs/daily-use.md](docs/daily-use.md) once they did.\n\n## What it actually does\n\nThree things, in the order you notice them.\n\n**Memory.** `agentdb` is a SQLite database in your Vaults directory. Sessions recall from it\nbefore acting and write learnings at the end, so a failure you hit last week does not cost\nyou the same afternoon twice. Recall is FTS5 keyword search by default; local semantic search\nis opt-in and adds nothing to your network. See\n[docs/data-and-memory.md](docs/data-and-memory.md).\n\n**Bounded resume.** Handoffs, checkpoints, and retrospectives are validated JSON manifests,\nnot prose summaries. A new session reconstructs exactly the state the manifest pins rather\nthan inheriting a whole conversation. The manifest CLI is\n`validate | latest | divergence | preflight | compile | resume | activate | deactivate`.\n\n**Reversibility guards.** Hooks classify commands and writes by how hard they are to undo.\nRecoverable mistakes get a warning the model can correct; genuinely destructive ones\nhard-block and surface to you, with a one-time approval token that a prompt-injected command\ncannot forge. These are a tripwire, not a sandbox, and [docs/safety.md](docs/safety.md) is\nexplicit about where they stop working.\n\nUnderneath, KERNEL classifies each task by domain, work shape, and safety level, then loads\none domain pack for the announced route. Ordinary work runs with no ceremony.\n\nOne honest limit on that, current as of 9.0.0: the model-routing and\nseparate-builder-from-verifier rules are checked when receipt validation is run. They are not\nyet enforced on every request, and a request with no receipt at all proceeds normally. Treat\nthem as a convention the tooling helps you keep, not as a sandbox.\n\nOn context cost, the number you will see quoted elsewhere is wrong and this is the corrected\none. KERNEL's ambient cost to a plugin user is roughly **4,600 tokens**: about 1,900 from the\nSessionStart hook and about 2,700 from skill frontmatter the host keeps visible so routing can\nhappen. This repo's `CLAUDE.md` is **not** part of that; your host loads your own instruction\nfile, not ours. An earlier target of \"under 500 tokens\" came from a measurement that charged our\n`CLAUDE.md` to everyone, and it is withdrawn. Detail and the ratchets that now enforce it:\n[docs/kernel-9/INVENTORY.md](docs/kernel-9/INVENTORY.md).\n\n## Surfaces, and how Codex differs\n\nClaude Code terminal, Desktop (local and SSH), and VS Code. Remote Claude Code sessions do\nnot support plugins.\n\nCodex CLI and the Codex app load the same package through their Claude-marketplace\ncompatibility loader:\n\n```bash\ncodex plugin marketplace add ariaxhan/kernel-claude\ncodex plugin add kernel@kernel-marketplace\n```\n\nRestart Codex afterwards, then invoke `$kernel:init`. Skills are namespaced on both hosts:\nClaude Code invokes `/kernel:help`, Codex invokes `$kernel:help`. Two real differences.\nCodex runs the supported synchronous hook events, including `SessionEnd`, but does not\nimplement `PostToolUseFailure`. KERNEL's `capture-error.sh` is therefore not bound on that\nhost, and tool-error recording degrades to what `PostToolUse` can observe. That degradation is\nsilent at runtime, so the per-host matrix is worth reading before you rely on error history:\n[docs/kernel-9/HOST-CAPABILITIES.md](docs/kernel-9/HOST-CAPABILITIES.md), generated from\n`governance/hosts.json`. And Codex does\nnot register KERNEL's Claude Code agent definitions as native subagents; it maps the same\nroles onto its own during orchestration. Reasoning and detail:\n[docs/install.md](docs/install.md).\n\n## Updating\n\nClaude Code:\n\n```text\n/plugin marketplace update kernel-marketplace\n/plugin update kernel@kernel-marketplace\n/reload-plugins\n```\n\nCodex, where the marketplace upgrade also refreshes the installed cache:\n\n```bash\ncodex plugin marketplace upgrade kernel-marketplace\n```\n\nUpgrading from 7.23, the breaking changes, and rolling back without losing data:\n[docs/upgrading.md](docs/upgrading.md).\n\nIf update and reload both fail, reinstall. Claude Code takes\n`/plugin uninstall kernel@kernel-marketplace --keep-data` followed by a fresh install; Codex\ntakes `codex plugin remove kernel@kernel-marketplace` then\n`codex plugin add kernel@kernel-marketplace`. Removing the marketplace or clearing the plugin\ncache is not routine maintenance.\n\n## Rolling back\n\nCheck out the verified 7.23 release commit and point the installed selector at it:\n\n```bash\ngit clone https://github.com/ariaxhan/kernel-claude.git \"$HOME/kernel-claude-7.23\"\ngit -C \"$HOME/kernel-claude-7.23\" checkout 54a0053\nV8_SELECTOR=\"$HOME/.claude/plugins/cache/kernel-marketplace/kernel/current/scripts/select-runtime.sh\"\n\"$V8_SELECTOR\" \"$HOME/kernel-claude-7.23\"\nclaude --plugin-dir \"$HOME/kernel-claude-7.23\"\n```\n\nTo select a validated runtime explicitly, call a numbered selector directly, for example\n`\"$HOME/.claude/plugins/cache/kernel-marketplace/kernel/8.0.2/scripts/select-runtime.sh\" /path/to/runtime`.\nThat moves `current` backward on purpose; ordinary old sessions cannot. It selects code only\nand does not convert state formats.\n\n## Where your data lives\n\nEverything durable goes in the selected Vaults directory: `_meta/agentdb/agent.db` for\nmemory, `_meta/handoffs/` and `_meta/checkpoints/` for JSON state, `_meta/logs/` for runtime\nrecords. Detection order and the full list: [docs/data-and-memory.md](docs/data-and-memory.md).\n\nWhen the active project root exactly matches the Vaults root and a shared continuity engine\nwith an executable host adapter is present, that service owns compaction checkpoints and\nrestore injection, and KERNEL's compaction paths cleanly no-op rather than adding a second\nrestore. Nested repositories retain KERNEL's deterministic generic fallback.\n\n## Contributing\n\n```bash\ngit clone https://github.com/ariaxhan/kernel-claude.git\ncd kernel-claude\n./scripts/kernel-setup.sh\nclaude --plugin-dir ./\n./tests/run-tests.sh\n```\n\nSee [docs/contributing.md](docs/contributing.md). Fix defects here and release; do not edit\nan installed cache directory.\n\nMIT licensed.\n",
  "bytes": 9816,
  "sha": "0c2677de6e61ad2c5dec8a398dab473b87aa49bc588a01bd0529ef294f9a04c9",
  "repo_slug": "ariaxhan/kernel-claude",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_ariaxhan_kernel_claude_4a6e7c8f/readme"
}