{"slug": "harness-session-capture-rehydration-feedback", "title": "Harness session capture/rehydration/feedback", "summary": "LLM-Wiki released v0.16.0, adding a compact read-only query protocol and token benchmarks across multiple AI agent runtimes including Claude Code and OpenAI Codex. The tool provides LLM-compiled knowledge bases with automated session capture, feedback curation, and thesis-driven research capabilities.", "body_md": "\n\n```\n██╗     ██╗     ███╗   ███╗    ██╗    ██╗██╗██╗  ██╗██╗\n██║     ██║     ████╗ ████║    ██║    ██║██║██║ ██╔╝██║\n██║     ██║     ██╔████╔██║    ██║ █╗ ██║██║█████╔╝ ██║\n██║     ██║     ██║╚██╔╝██║    ██║███╗██║██║██╔═██╗ ██║\n███████╗███████╗██║ ╚═╝ ██║    ╚███╔███╔╝██║██║  ██╗██║\n╚══════╝╚══════╝╚═╝     ╚═╝     ╚══╝╚══╝ ╚═╝╚═╝  ╚═╝╚═╝\n```\n\nLLM-compiled knowledge bases for any AI agent. Parallel multi-agent research, collector catalogs, automated session capture, feedback curation, thesis-driven investigation, source ingestion, wiki compilation, truth-seeking audits, querying, and artifact generation. Ships as a Claude Code plugin, an OpenAI Codex plugin, an OpenCode instruction file, or a portable AGENTS.md for any other LLM agent. Obsidian-compatible.\n\n[Install](#install) · [Quick Start](#quick-start) · [Sessions](#session-memory) · [Commands](#commands) · [How It Works](#how-it-works) · [Research Modes](#research-modes) · [Thesis Research](#thesis-driven-research) · [Query Depths](#query-depths) · [Linking](#linking-works-everywhere) · [Obsidian](#obsidian-integration) · [Architecture](#claude-first-multi-runtime) · [Nono Sandbox](#nono-sandbox-permissions) · [Upgrade](#upgrade) · [Changelog](#changelog) · [Credits](#credits)\n\n**v0.16.0** — **Query Lite and token benchmarks.** Adds a compact read-only query protocol across Claude Code, Codex, Pi, DS4, OpenCode, and portable agents; reduces Claude `/wiki:query`\n\ninstructions by 72.54%; adds explicit `$wiki-query`\n\n, read-only Pi launchers, static context budgets, corpus-identity gates, and reproducible Codex/Claude/DS4 benchmark lanes. OpenCode live-model behavior remains best effort.\n\n**v0.15.0** — **Topic guides.** Reframes `schema.md`\n\nas a human-owned topic guide, adds the friendlier `llm-wiki schema adopt`\n\nhelper, keeps `schema migrate --apply`\n\nas a compatibility alias, and updates librarian docs to talk about conventions proposals instead of database-style schema migrations.\n\n**v0.14.0** — **Default topic guides.** Adds advisory `schema.md`\n\nby default, safe adoption helpers for older wikis, proposal-only librarian convention updates, deterministic docs/lint checks, and clarifies the optional index/server layer as a rebuildable non-authoritative cache.\n\n**v0.12.0** — **Feedback curator.** Captures high-signal corrections, preferences, approvals, and plan acceptance as redacted feedback candidates under `HUB/.sessions/feedback/`\n\n; ignores generic acknowledgements; adds review/manual-capture/promotion workflows; and keeps promotion into topic `raw/notes/`\n\nexplicit.\n\n**v0.11.1** — **Session helper compatibility.** Small hotfix so automated session capture works on Python 3.9/macOS system Python as well as newer Python runtimes.\n\n**v0.11.0** — **Automated session capture.** Default-on redacted checkpoints under `HUB/.sessions/`\n\n, opt-out via `session disable`\n\n, compact context rehydration, explicit digest promotion, and a tested Codex hook bundle.\n\n**Claude Code** (native plugin):\n\n```\nclaude plugin install wiki@llm-wiki\n```\n\n**OpenAI Codex** (marketplace plugin):\n\nInstall from GitHub:\n\n```\ncodex plugin marketplace add nvk/llm-wiki\ncodex plugin add wiki@llm-wiki\n# Start a new Codex thread, then use @wiki or type $ to select wiki-query\n```\n\nInstall from a local checkout with the managed bootstrap helper:\n\n```\n./scripts/bootstrap-codex-plugin.sh --scope user --verify\n```\n\nOr register the local checkout manually:\n\n```\ncodex plugin marketplace add /absolute/path/to/llm-wiki\ncodex plugin add wiki@llm-wiki\n```\n\nCanonical explicit invocation:\n\n```\n$wiki-query \"What does the wiki say about hardware wallet threat models?\"\n@wiki research \"hardware wallet threat models\"\n@wiki collect \"bitcoin memes\" --wiki memes-bitcoin\n@wiki ingest https://example.com/article\n@wiki audit --project coldcard-threat-model\n@wiki session status\n@wiki feedback list --unpromoted\n@wiki session disable   # optional opt-out\n@wiki ll \"codex plugin install gotchas\"\n```\n\nUpgrade:\n\n```\ncodex plugin marketplace upgrade llm-wiki\ncodex plugin add wiki@llm-wiki\n```\n\nRemove:\n\n```\ncodex plugin remove wiki@llm-wiki\ncodex plugin marketplace remove llm-wiki\n```\n\nTroubleshooting:\n\n`codex plugin marketplace add`\n\nregisters the catalog;`codex plugin add wiki@llm-wiki`\n\ninstalls and enables the cached plugin non-interactively.- Open\n`/hooks`\n\nto review and trust the bundled hooks if you want automated session capture. The`@wiki`\n\nskill works without hook trust. `$wiki-query`\n\nis the small, explicit, read-only skill for lookups. In Codex CLI/IDE, type`$`\n\nor open`/skills`\n\nand select it. It never activates implicitly or changes wiki files.`@wiki`\n\nis the full research and maintenance entry point. Natural-language wiki requests can still auto-activate it.- Restart Codex after changing config if an existing session does not pick up the new plugin state.\n- If you run Codex under a sandbox wrapper like\n`nono`\n\n, see[Nono Sandbox Permissions](#nono-sandbox-permissions)— Codex needs r+w to`$HOME/.codex`\n\nfor plugin install.\n\n**OpenCode** (instruction file):\n\nAdd to your `opencode.json`\n\n(project-level or `~/.config/opencode/.opencode.json`\n\nfor global):\n\n```\n{\n  \"instructions\": [\"https://raw.githubusercontent.com/nvk/llm-wiki/master/plugins/llm-wiki-opencode/skills/wiki-manager/SKILL.md\"],\n  \"permission\": {\n    \"external_directory\": {\n      \"~/.config/llm-wiki/**\": \"allow\",\n      \"~/Library/Mobile Documents/com~apple~CloudDocs/wiki/**\": \"allow\"\n    }\n  }\n}\n```\n\nOpenCode fetches the URL fresh on every session start — no manual updates needed. If you prefer a local copy instead:\n\n```\ncurl -sL https://raw.githubusercontent.com/nvk/llm-wiki/master/plugins/llm-wiki-opencode/skills/wiki-manager/SKILL.md > ~/.config/opencode/AGENTS.md\n```\n\nFor a smaller read-only setup, use the best-effort query preset instead:\n\n```\n{\n  \"instructions\": [\"https://raw.githubusercontent.com/nvk/llm-wiki/master/plugins/llm-wiki-opencode/skills/wiki-query/SKILL.md\"]\n}\n```\n\nThe OpenCode profile is sync- and budget-tested, but not tied to one model, so it does not have a provider-specific live quality gate. Treat it as a portable best-effort preset and keep OpenCode's write and shell permissions disabled for query-only sessions.\n\nThe `external_directory`\n\npermission is required because the wiki hub lives outside the project directory. Set the paths to match your hub location. Alternatively, use `--local`\n\nmode (`.wiki/`\n\nin the project) to skip permissions entirely.\n\nWeb search requires `export OPENCODE_ENABLE_EXA=1`\n\n.\n\n**Pi** (skill file, best for local models):\n\nPi's minimal system prompt leaves room for on-demand wiki workflows on local models. Load the full skill for research and write-capable maintenance:\n\n```\npi --skill path/to/llm-wiki/plugins/llm-wiki-opencode/skills/wiki-manager/SKILL.md\n```\n\nInvoke it as `/skill:wiki-manager`\n\n, or let Pi load it when the request clearly\nmatches its description.\n\nFor fast read-only queries with Pi's currently configured provider, use the generic launcher. It disables discovery and write tools and loads the compact shared query protocol:\n\n```\n./scripts/pi-wiki-query\n```\n\nFor DS4, the provider-specific launcher additionally creates an isolated Pi state directory and pins the local model settings:\n\n```\n./scripts/pi-ds4-wiki-query\n```\n\nSet `PI_CLI`\n\n, `DS4_BASE_URL`\n\n, or `LLM_WIKI_PI_DS4_STATE_DIR`\n\nonly when your\nlocal setup differs from the defaults. Both launchers accept `--dry-run`\n\nto\nshow the exact command. The equivalent generic Pi settings are:\n\n```\npi \\\n  --append-system-prompt path/to/llm-wiki/profiles/query-lite/SKILL.md \\\n  --tools read,grep,find,ls \\\n  --no-extensions --no-skills --no-prompt-templates --no-themes\n```\n\nThe DS4 query profile is intentionally unable to write. Switch to the full\nskill for ingest, research, compile, lint, or other mutating workflows. See\n[ profiles/ds4/README.md](/nvk/llm-wiki/blob/master/profiles/ds4/README.md) and the reproducible\n\n[DS4 lane.](/nvk/llm-wiki/blob/master/benchmarks/README.md)\n\n`benchmarks/README.md`\n\n**Any LLM Agent** (portable instruction file):\n\n```\n# Read-only queries: small default\ncp profiles/query-lite/SKILL.md ~/your-project/AGENTS.md\n\n# Research and maintenance: complete protocol\ncp AGENTS.md ~/your-project/AGENTS.md\n```\n\nThe query-lite profile works with agents that can read and search files. The\nroot `AGENTS.md`\n\ncontains the complete write-capable protocol for agents that\ncan also edit files and search the web.\n\nClaude Code is the principal user. Keep one shared behavior layer and thin packaging layers per runtime:\n\n`claude-plugin/`\n\nis the primary distribution target and UX surface.`claude-plugin/skills/wiki-manager/`\n\nis the behavioral source of truth.`plugins/llm-wiki/skills/wiki/`\n\nis the generated Codex packaging target behind`@wiki`\n\n.`claude-plugin/skills/wiki-manager/references/query-lite.md`\n\nis the canonical read-only query protocol.`profiles/query-lite/SKILL.md`\n\nand generated`wiki-query`\n\nskills expose that protocol without the full research context.`plugins/llm-wiki-opencode/`\n\nis the OpenCode and Pi packaging target.`.agents/plugins/marketplace.json`\n\nmakes the Codex plugin installable from this repo.`AGENTS.md`\n\nis the portable single-file protocol for any other LLM agent.\n\n**Query and research presets:**\n\n| Client | Read-only query path | Full research path | Validation |\n|---|---|---|---|\n| Claude Code | `/wiki:query` command plus shared query protocol |\nNative plugin skill and commands | Deterministic fixtures plus live Sonnet/Opus runs |\n| Codex | Explicit-only `$wiki-query` (~2.8 KB) |\n`@wiki` (~11.7 KB before lazy references) |\nDeterministic fixtures plus app-server live runs |\n| Pi / DS4 | `scripts/pi-wiki-query` , or the isolated DS4 launcher, with read-only tools (~2.8 KB profile) |\n`pi --skill .../wiki-manager/SKILL.md` |\nDeterministic fixtures plus exact DS4 provider-payload measurement |\n| OpenCode | `wiki-query/SKILL.md` (~2.8 KB) |\n`wiki-manager/SKILL.md` (~25.2 KB) |\nStatic budgets and generated-package sync; live model is best effort |\n| Any agent | Copy `profiles/query-lite/SKILL.md` (~2.8 KB) |\nCopy root `AGENTS.md` (~51.2 KB) |\nStatic budgets |\n\nSizes are checked-in UTF-8 bytes, not provider token estimates. Use query mode for lookups, evidence checks, lists, and inventory status. Use the full profile for research, ingestion, compilation, lint fixes, or any workflow that writes.\n\nBoth runtime mirrors are generated, not hand-maintained. Rebuild from the Claude source of truth:\n\n```\n./scripts/sync-codex-plugin.sh      # regenerates plugins/llm-wiki/\n./scripts/sync-opencode-plugin.sh   # regenerates plugins/llm-wiki-opencode/\n./scripts/sync-query-lite-profile.sh # regenerates profiles/query-lite/\n```\n\nEach sync script:\n\n- copies\n`claude-plugin/skills/wiki-manager/SKILL.md`\n\ninto the target tree and reapplies a small list of runtime-specific wording patches - copies\n`references/`\n\nfrom the Claude source — references are runtime-neutral and shared verbatim (previously a symlink, now a real copy so Codex marketplace caching works) - generates compact\n`wiki-query`\n\npackages from the canonical query-lite reference - (Codex only) recreates\n`agents/openai.yaml`\n\nfor Codex UI metadata and syncs the plugin version\n\nDrift is caught by `./tests/test-codex-sync.sh`\n\nand `./tests/test-opencode-sync.sh`\n\n, which run the sync scripts and fail (with self-healing fix instructions) if the generated directories differ from `HEAD`\n\n.\n\nPractical rule: design workflows first for Claude commands and behavior, but keep the underlying knowledge model and references runtime-neutral. Runtime wrappers adapt invocation and metadata, not wiki logic.\n\nIf you run any AI coding agent inside a [nono](https://github.com/always-further/nono) sandbox, the wiki needs filesystem access beyond the default profile.\n\n```\n{\n  \"extends\": \"claude-code\",\n  \"policy\": {\n    \"add_allow_read\": [\n      \"$HOME/.config/llm-wiki\"\n    ],\n    \"add_allow_readwrite\": [\n      \"$HOME/Library/Mobile Documents/com~apple~CloudDocs/wiki\"\n    ]\n  }\n}\n```\n\nReplace `\"extends\": \"claude-code\"`\n\nwith `\"opencode\"`\n\nfor OpenCode.\n\nCodex needs r+w to its own `$HOME/.codex`\n\ndirectory for plugin install, marketplace cache, state, and skill registration:\n\n```\n{\n  \"extends\": \"codex\",\n  \"policy\": {\n    \"add_allow_read\": [\n      \"$HOME/.config/llm-wiki\"\n    ],\n    \"add_allow_readwrite\": [\n      \"$HOME/.codex\",\n      \"$HOME/Library/Mobile Documents/com~apple~CloudDocs/wiki\"\n    ]\n  }\n}\n```\n\n| Path | Access | Purpose |\n|---|---|---|\n`$HOME/.config/llm-wiki` |\nread | Hub path config — checked first during resolution (v0.4.2+) |\n| Wiki data dir | readwrite | The wiki itself — use the actual path, not `$HOME/wiki` (see below) |\n`$HOME/.codex` |\nreadwrite | Codex only — plugin cache, skills, state, marketplace temp files |\n\nHub resolution checks `~/.config/llm-wiki/config.json`\n\nfirst and only falls back to `~/wiki`\n\nwhen no config exists. If your wiki lives on iCloud or any non-default path, set the config and you don't need `$HOME/wiki`\n\nin the sandbox at all:\n\n```\n# Set once — agents will resolve from config, never touch ~/wiki\n/wiki config hub-path \"~/Library/Mobile Documents/com~apple~CloudDocs/wiki\"\n```\n\nUse a portable `hub_path`\n\nwith `~`\n\nfor iCloud-shared hubs. Older configs may\ncontain `resolved_path`\n\n; llm-wiki treats it as a fallback cache because an\nabsolute `/Users/<name>/...`\n\npath from one Mac will not be valid on another.\nThe shared `wikis.json`\n\nshould likewise store hub topic paths as\n`topics/<slug>`\n\n, not absolute user-home paths.\n\nIf you prefer `~/wiki`\n\nas a symlink to iCloud, nono's Seatbelt follows symlinks — the target path must be allowed, not the symlink itself.\n\nWithout the right permissions, Seatbelt or macOS privacy controls can block file\naccess. A useful diagnostic pattern is: `stat`\n\nsucceeds for the iCloud wiki path,\nbut reading `wikis.json`\n\nor listing `topics/`\n\nfails with `Operation not permitted`\n\n. That means the configured `hub_path`\n\nis correct; grant Full Disk\nAccess or iCloud Drive access to the exact app launching the agent, restart it,\nand do not switch to a machine-local `resolved_path`\n\nor `~/wiki`\n\nfallback. Use\n`nono why`\n\nto diagnose sandbox rules:\n\n```\nnono why --path ~/.config/llm-wiki --op read\nnono why --path ~/Library/Mobile\\ Documents/com~apple~CloudDocs/wiki --op readwrite\n```\n\n**OpenCode** also needs the `external_directory`\n\npermission in `opencode.json`\n\n(see [Install](#install)) — nono and OpenCode have independent sandboxes that both need the same paths allowed.\n\nAgents and sandboxed sessions should use GitHub CLI web login with HTTPS git\ntransport, not SSH. This avoids SSH host-key prompts and `known_hosts`\n\nwrites\ninside nono:\n\n```\ngh auth login --web --git-protocol https\ngh auth setup-git\n```\n\n**Claude Code** — if `claude plugin update`\n\npulls the latest correctly:\n\n```\ngit -C ~/.claude/plugins/marketplaces/llm-wiki remote set-url origin https://github.com/nvk/llm-wiki.git\nclaude plugin update wiki@llm-wiki\n# Restart Claude Code to apply\n```\n\nIf the update command doesn't pick up the new version (stale marketplace cache), sync manually from the repo:\n\n```\n# Clone or pull the latest\ngit clone https://github.com/nvk/llm-wiki.git  # or: git -C ~/llm-wiki pull\n\n# Sync plugin files to Claude Code's plugin cache\nREPO=~/llm-wiki/claude-plugin\nDEST=~/.claude/plugins/cache/llm-wiki/wiki\nVERSION=$(grep '\"version\"' \"$REPO/.claude-plugin/plugin.json\" | grep -o '[0-9.]*')\nrm -rf \"$DEST\"/*\nmkdir -p \"$DEST/$VERSION\"\ncp -R \"$REPO/.claude-plugin\" \"$REPO/commands\" \"$REPO/skills\" \"$DEST/$VERSION/\"\n\n# Restart Claude Code to apply\n```\n\n**Codex** — upgrade from the marketplace:\n\n```\ncodex plugin marketplace upgrade llm-wiki\ncodex plugin add wiki@llm-wiki\n```\n\n**OpenCode** — if using the GitHub URL in `instructions`\n\n, updates are automatic (fetched every session). If using a local copy:\n\n```\ncurl -sL https://raw.githubusercontent.com/nvk/llm-wiki/master/plugins/llm-wiki-opencode/skills/wiki-manager/SKILL.md > ~/.config/opencode/AGENTS.md\n```\n\n**AGENTS.md** — just pull the latest and replace:\n\n```\ncurl -sL https://raw.githubusercontent.com/nvk/llm-wiki/master/AGENTS.md > ~/your-project/AGENTS.md\n```\n\nCheck your installed version:\n\n- Claude Code: look for the version in\n`/wiki`\n\nstatus output or check`~/.claude/plugins/installed_plugins.json`\n\n- Codex: run\n`./scripts/verify-codex-plugin.sh --scope user`\n\nand confirm the installed cache path and marketplace source match this repo\n\nNew to a topic? One command, from anywhere:\n\n```\n/wiki:research \"gut microbiome\" --new-topic --min-time 1h\n```\n\nCreates a topic wiki, launches parallel agents, and keeps researching for an hour — drilling into subtopics each round finds. Come back to a fully compiled wiki.\n\n```\n/wiki:research \"nutrition\" --new-topic            # Create wiki + research in one shot\n/wiki:research \"gut-brain axis\" --wiki nutrition   # Add more research to existing wiki\n/wiki:research \"fasting\" --deep --min-time 2h     # 8 agents, keep going for 2 hours\n/wiki:research \"keto\" --retardmax                 # 10 agents, max speed, ingest everything\n/wiki:research \"What makes long form articles go viral?\" --new-topic  # Question → decompose → playbook\n/wiki:thesis \"fiber reduces neuroinflammation via SCFAs\"  # Thesis-driven: evidence for + against → verdict\n/wiki:thesis \"cold exposure upregulates BDNF\" --min-time 1h  # Deep thesis investigation\n/wiki:collect \"bitcoin memes\" --wiki memes-bitcoin  # Find, dedupe, download media, catalog, and optionally inventory artifacts\n/wiki:collect \"bitcoin memes\" --scale medium --media reference --inventory corpus  # Catalog media without binary downloads\n/wiki:query \"How does fiber affect mood?\"         # Ask the wiki\n/wiki:query \"compare keto and mediterranean\" --deep  # Deep cross-referenced answer\n/wiki:query --resume                              # Where did I leave off?\n/wiki add https://example.com/article             # Fuzzy router detects URL → ingest\n/wiki what do we know about CRISPR?               # Fuzzy router detects question → query\n/wiki:ingest https://example.com/article          # Manually ingest a source\n/wiki:ingest --inbox                              # Process files dropped in inbox/\n/wiki:ingest-collection https://github.com/bitcoin/bips --wiki bitcoin  # Bulk import spec repos\n/wiki:ingest-collection https://dump.bitcoin.it/dump_20260429_en.xml.bz2 --wiki bitcoin  # Import MediaWiki dumps\n/wiki:ingest-collection messages.csv --adapter csv-messages --wiki bitcoin  # Split message archives\n/wiki:ingest-collection \"https://example.com/*\" --adapter wayback-cdx --from 20100101 --to 20200101  # Import archived snapshots\n/wiki:inventory add ingest-candidate \"Bitcointalk archive\" --wiki bitcoin  # Track source queues and next actions\n/wiki:inventory add item \"TRX-4M ring and pinion\" --wiki trx4m-1-18  # Track actual parts, tools, hosts, or assets\n/wiki:inventory list --view actions --limit 10   # Compact chat table of current inventory next actions\n/wiki:inventory scan-outputs --dry-run          # Preview queues/backlogs before any inventory pivot\n/wiki:dataset add \"Bitcointalk Temporal Graph\" --location https://figshare.com/articles/dataset/BitcoinTemporalGraph/26305093 --wiki bitcoin  # Index data that stays external\n/wiki:dataset list --view schema --limit 10      # Compact chat table of dataset schema/readiness state\n/wiki:dataset scan-outputs --dry-run            # Find legacy data reports that could become dataset manifests\n/wiki:archive topic old-interest --reason \"No longer active\"  # Preserve a topic but hide it from normal context\n/wiki:archive list --archived                   # Show active and archived topic wikis\n/wiki:archive restore old-interest              # Bring an archived topic back\n/wiki:compile                                     # Compile any unprocessed sources\n/wiki:audit --project gut-brain-playbook          # Truth-seeking audit across outputs + wiki + fresh research\n/wiki:output report --topic gut-brain             # Generate a report\n/wiki:output slides --retardmax                   # Ship a rough slide deck NOW\n/wiki:assess /path/to/my-app --wiki nutrition     # Gap analysis: repo vs wiki vs market\n/wiki:lint --fix                                  # Clean up inconsistencies\n```\n\nWhen working from this repository checkout, you can also run deterministic checks without an agent:\n\n```\n./scripts/llm-wiki lint /path/to/wiki\n./scripts/llm-wiki lint --fix /path/to/wiki\n./scripts/llm-wiki schema status /path/to/wiki\n./scripts/llm-wiki schema adopt /path/to/wiki          # add starter topic guide\n./scripts/llm-wiki schema adopt --dry-run /path/to/wiki # preview without writing\n./scripts/llm-wiki archive --hub /path/to/hub topic old-interest --reason \"No longer active\"\n./scripts/llm-wiki archive --hub /path/to/hub list --archived\n./scripts/llm-wiki archive --hub /path/to/hub restore old-interest\n./scripts/llm-wiki-session --hub /path/to/hub status\n./scripts/llm-wiki-session --hub /path/to/hub disable   # optional opt-out\n./scripts/llm-wiki-session --hub /path/to/hub enable --mode balanced --tool-events 50\n./scripts/llm-wiki-session --hub /path/to/hub rehydrate --cwd \"$PWD\"\n./scripts/llm-wiki-session --hub /path/to/hub feedback list --unpromoted\n```\n\nThis local helper covers structural checks and safe migrations that do not\nrequire an LLM. The agentic `/wiki:lint`\n\nworkflow remains the full protocol for\neditorial and deep verification passes. The local schema helper creates only a\nstarter advisory topic guide (`schema.md`\n\n); run librarian conventions advice\nfor established wikis before adopting topic-specific vocabulary. The local archive helper\nperforms the deterministic folder move plus `wikis.json`\n\n, hub index, and log\nupdates.\n\nLong agent runs can lose useful context when a chat compacts, a terminal closes,\nor work moves between runtimes. LLM Wiki keeps a separate operational-memory\nlayer under `HUB/.sessions/`\n\n(or `.wiki/.sessions/`\n\nfor a local wiki) so a later\nturn can recover the thread without copying full transcripts into the knowledge\nbase.\n\n| Feature | How it works |\n|---|---|\nCapture |\nTrusted hooks use balanced mode by default. They record harness metadata, current directory and Git context, small redacted events, per-session state, and Markdown digests. Full transcript bodies are not stored by default. |\nSession ID |\nAn ID such as `codex:abc123` combines the harness name with that runtime's native session ID. It is a local lookup key—not a secret, transcript, wiki, or topic ID. |\nRehydrate |\n`/wiki:session rehydrate` returns a compact context block and pointers to matching digests instead of bulk-pasting chat history. |\nFeedback |\nHigh-signal corrections, preferences, approvals, and plan acceptance become reviewable candidates under `.sessions/feedback/` ; generic acknowledgements are ignored. |\nPromote |\nDigests and feedback remain operational memory until an explicit `promote` writes a distilled note to a topic's `raw/notes/` . Only then can normal compilation turn it into topic knowledge. |\nOpt out |\n`/wiki:session disable` makes trusted capture hooks no-ops; `/wiki:session enable` turns capture back on. |\n\n```\n/wiki:session status\n/wiki:session list --limit 10\n/wiki:session show codex:abc123\n/wiki:session rehydrate --cwd \"$PWD\"\n/wiki:session promote codex:abc123 --topic meta-llm-wiki\n/wiki:feedback list --unpromoted\n/wiki:feedback promote fb-abc123 --topic meta-llm-wiki\n```\n\nThis harness-session layer is distinct from `.research-session.json`\n\nand\n`.thesis-session.json`\n\ncrash recovery, and from `.session-events.jsonl`\n\nand\n`.session-checkpoint.json`\n\nworkflow provenance. See the\n[session reference](/nvk/llm-wiki/blob/master/claude-plugin/skills/wiki-manager/references/sessions.md)\nfor the storage layout, privacy defaults, capture modes, and adapter contract.\n\n| Command | Description |\n|---|---|\n`/wiki <natural language>` |\nFuzzy intent router — say what you want and it routes to the right subcommand |\n`/wiki` |\nShow wiki status, stats, and list all topic wikis |\n`/wiki init <name>` |\nCreate a topic wiki at `~/wiki/topics/<name>/` |\n`/wiki init <name> --local` |\nCreate a project-local wiki at `.wiki/` |\n`/wiki:ingest <source>` |\nIngest a URL, file path, PDF, or quoted text |\n`/wiki:ingest --inbox` |\nProcess all files in the topic wiki's inbox/ |\n`/wiki:ingest-collection <source>` |\nBulk-ingest Git doc repos, BIP-style proposal sets, MediaWiki dumps/API sites, message archives, or Wayback CDX snapshots |\n`/wiki:ingest-collection <source> --adapter git|mediawiki-dump|mediawiki-api|csv-messages|wayback-cdx` |\nForce a collection adapter |\n`/wiki:ingest-collection <source> --limit <N> --dry-run` |\nPreview or cap a large collection import |\n`/wiki:collect \"<things>\"` |\nFind, dedupe, and catalog artifacts, examples, resources, media, memes, tools, entities, or source candidates |\n`/wiki:collect \"<things>\" --scale tiny|small|medium|large|huge` |\nControl write behavior by operational scale, not just row count |\n`/wiki:collect \"<things>\" --media archive|thumbnail|reference` |\nDownload/cache bounded originals by default; use thumbnail for previews or reference to opt out |\n`/wiki:collect \"<things>\" --inventory records` |\nCreate per-item inventory records when the collected set is small enough to stay useful |\n`/wiki:collect \"<things>\" --inventory corpus` |\nTrack a large, unstable, or media-heavy collection as one corpus record linked to the catalog output |\n`/wiki:inventory list` |\nList durable tracking records as compact chat-friendly tables or bullets |\n`/wiki:inventory list --view actions` |\nShow current inventory next actions without dumping full records |\n`/wiki:inventory add <kind> \"title\"` |\nAdd an inventory record after checking that inventory is the right layer |\n`/wiki:inventory save-view \"name\"` |\nSave a derived reusable table/list under `inventory/views/` |\n`/wiki:inventory scan-outputs --dry-run` |\nFind old queue/backlog outputs and preview sample records before migration |\n`/wiki:inventory migrate-output <path> --apply` |\nAdditively create inventory records from a legacy output; never moves or deletes the output |\n`/wiki:dataset list` |\nList dataset manifests as compact chat-friendly tables or bullets |\n`/wiki:dataset list --view schema` |\nShow schema/readiness state without opening samples or data |\n`/wiki:dataset add \"title\" --location <path-or-url>` |\nAdd a dataset manifest without copying data into the wiki |\n`/wiki:dataset profile <slug> --dry-run` |\nPreview lightweight profiling of size, format, headers, or schema observations |\n`/wiki:dataset migrate-output <path> --apply` |\nAdditively create dataset manifests from a legacy output; never moves or copies the underlying data |\n`/wiki:archive list [--archived]` |\nList active topic wikis and optionally archived topic wikis |\n`/wiki:archive topic <slug> --reason \"why\"` |\nMove a topic wiki to `topics/.archive/<slug>` and hide it from default context |\n`/wiki:archive restore <slug>` |\nRestore an archived topic wiki to active status |\n`/wiki:archive peek <query>` |\nSearch archived topic indexes without reading archived articles |\n`/wiki:session status` |\nShow automated session-capture mode, root, and indexed session count |\n`/wiki:session disable` |\nOpt out of automated redacted session capture |\n`/wiki:session enable --mode balanced` |\nRe-enable or tune automated capture and soft rehydration |\n`/wiki:session capture` |\nForce a manual session digest checkpoint |\n`/wiki:session rehydrate` |\nPrint compact context from matching session digests |\n`/wiki:session promote <id> --topic <slug>` |\nPromote a distilled digest into a topic raw note |\n`/wiki:feedback list --unpromoted` |\nReview high-signal user-feedback candidates captured from session hooks |\n`/wiki:feedback show <id>` |\nInspect a candidate with distilled lesson, confidence, scope, and redacted preview |\n`/wiki:feedback promote <id> --topic <slug>` |\nPromote a selected feedback candidate into topic `raw/notes/` |\n`/wiki:compile` |\nCompile new sources into wiki articles |\n`/wiki:compile --full` |\nRecompile everything from scratch |\n`/wiki:query <question>` |\nQ&A against the wiki (standard depth) |\n`/wiki:query <question> --quick` |\nFast answer from indexes only |\n`/wiki:query <question> --deep` |\nThorough — reads everything, checks raw + sibling wikis |\n`/wiki:query <question> --include-archived` |\nExplicitly search/read archived material, with archived citations labeled |\n`/wiki:query <terms> --list` |\nFind content by keyword, tag, or category (replaces old `/wiki:search` ) |\n`/wiki:query --resume` |\nReload context after a session break — recent activity, stats, last-updated articles |\n`/wiki:plan <goal>` |\nGenerate wiki-grounded implementation plan (interview → gap research → phased plan) |\n`/wiki:plan <goal> --quick` |\nPlan from wiki content only — skip interview and gap research |\n`/wiki:plan <goal> --format rfc|adr|spec` |\nOutput as RFC, ADR, or tech spec instead of roadmap |\n`/wiki:research <topic>` |\n5 parallel agents: academic, technical, applied, news, contrarian |\n`/wiki:research <topic> --new-topic` |\nCreate a topic wiki and start researching — works from any directory |\n`/wiki:research <topic> --min-time 1h` |\nKeep researching in rounds until time budget is spent |\n`/wiki:research <topic> --plan` |\nDecompose into 3-5 parallel paths, confirm, then dispatch all at once |\n`/wiki:research <topic> --deep` |\n8 agents: adds historical, adjacent, data/stats |\n`/wiki:research <topic> --retardmax` |\n10 agents: skip planning, max speed, ingest aggressively |\n`/wiki:thesis <claim>` |\nThesis-driven research: evidence for + against → verdict |\n`/wiki:thesis <claim> --min-time 1h` |\nMulti-round thesis investigation with anti-confirmation-bias |\n`/wiki:lint` |\nRun health checks on the wiki |\n`/wiki:lint --fix` |\nAuto-fix structural issues |\n`/wiki:lint --deep` |\nWeb-verify facts and suggest improvements |\n`/wiki:audit` |\nUmbrella trust audit: wiki, outputs, provenance, and fresh research when needed |\n`/wiki:audit --artifact <path>` |\nAudit one article or output artifact and follow its evidence chain |\n`/wiki:audit --project <slug>` |\nAudit one project's outputs and upstream wiki state |\n`/wiki:audit report` |\nDisplay the latest umbrella audit report |\n`/wiki:librarian` |\nFocused wiki maintenance: staleness and quality scan for the `wiki/` layer |\n`/wiki:librarian --article <path>` |\nScan a single article |\n`/wiki:librarian scan --passes staleness,quality,conventions` |\nGenerate topic-guide advice/proposals for established wikis without rewriting `schema.md` |\n`/wiki:librarian report` |\nDisplay the latest librarian scan report |\n| `/wiki:refresh [ | --due]` |\n`/wiki:output <type>` |\nGenerate: summary, report, study-guide, slides, timeline, glossary, comparison |\n`/wiki:output <type> --retardmax` |\nShip it now — rough but comprehensive, iterate later |\n`/wiki:project new <slug> \"goal\"` |\nGroup related outputs under `output/projects/<slug>/` with a plain `WHY.md` rationale |\n`/wiki:project list|show|add|archive` |\nManage output project folders without duplicating project state into frontmatter |\n`/wiki:retract <source-path> --reason \"why\"` |\nRemove a bad source, map blast radius, and flag downstream claims for review |\n`/wiki:ll` |\nExtract lessons learned from the current session into the wiki |\n`/wiki:ll --dry-run` |\nPreview extracted lessons without writing |\n`/wiki:ll --rules` |\nAlso suggest CLAUDE.md / AGENTS.md rule additions |\n`/wiki:assess <path>` |\nAssess a repo against wiki research + market. Gap analysis. |\n`/wiki:assess <path> --retardmax` |\nWide net — adds adjacent fields and failure analysis |\n\nAll commands accept `--wiki <name>`\n\nto target a specific topic wiki and `--local`\n\nto target the project wiki. Archived topic wikis are skipped by default; commands that support `--include-archived`\n\nrequire that explicit flag before reading or writing archived material. Commands that generate content (`query`\n\n, `output`\n\n, `plan`\n\n) also accept `--with <wiki>`\n\nto load supplementary wikis as cross-wiki context — e.g., `--with article-writing`\n\napplies writing craft knowledge when generating output from a domain wiki.\n\n`/wiki:librarian`\n\nis the focused wiki-maintenance tool. `/wiki:audit`\n\nis broader and may perform fresh research to decide whether the current knowledge or generated outputs are still trustworthy.\n\n```\n~/wiki/                                 # Hub — lightweight, no content\n├── wikis.json                          # Registry of all topic wikis\n├── _index.md                           # Lists topic wikis with stats\n├── log.md                              # Global activity log\n├── .sessions/                          # Optional session capture + feedback candidates\n└── topics/                             # Each topic is an isolated wiki\n    ├── nutrition/                      # Example topic wiki\n    │   ├── .obsidian/                  # Optional Obsidian vault config\n    │   ├── inbox/                      # Drop zone for this topic\n    │   ├── inventory/                  # Lazy: durable tracking records + derived views\n    │   ├── datasets/                   # Lazy: manifests for large/external data\n    │   ├── raw/                        # Immutable sources\n    │   ├── wiki/                       # Compiled articles\n    │   │   ├── concepts/\n    │   │   ├── topics/\n    │   │   └── references/\n    │   ├── output/                     # Generated artifacts\n    │   ├── _index.md\n    │   ├── config.md\n    │   ├── schema.md                  # Human-owned topic guide\n    │   └── log.md\n    ├── woodworking/                    # Another topic wiki\n    ├── .archive/                       # Archived topic wikis, hidden by default\n    └── ...\n```\n\nThe hub is just a registry — no content directories, no `.obsidian/`\n\n. All content lives in topic sub-wikis with isolated indexes, articles, and a human-owned advisory topic guide (`schema.md`\n\n). Init creates the core wiki skeleton first; optional inventory and dataset layers are created when you use them. Queries stay focused. The multi-wiki peek finds overlap across topics when relevant.\n\n**Research** a topic — parallel agents search the web, ingest sources, and compile articles in one command**Ingest** additional sources — URLs, files, text, tweets (via Grok MCP), or bulk via inbox**Collect** catalogs of discoverable things — examples, media, memes, tools, projects, entities, or source candidates — then optionally inventory them**Inventory** items, candidates, entities, corpora, watch lists, and next actions that should persist; the agent tells you when inventory is the wrong layer**Index datasets** that are too large for markdown — manifests, profiles, samples, and query recipes**Archive** whole topic wikis that should stay preserved but quiet**Compile** raw sources into synthesized wiki articles with cross-references and confidence scores**Query** the wiki — quick (indexes), standard (articles), or deep (everything active, archived indexes separated)**Session capture**— automatically preserve redacted Codex/Claude/OpenCode/Gemini checkpoints under`.sessions/`\n\nand rehydrate future turns**Feedback curator**— capture reviewable correction/preference/approval candidates under`.sessions/feedback/`\n\nand promote only what matters**Lessons learned**— extract knowledge from the current session (errors, fixes, gotchas) into the wiki** Assess**a repo against the wiki — gap analysis: what aligns, what's missing, what the market offers** Lint**for consistency — broken links, missing indexes, orphan articles, archive registry drift** Output**artifacts — summaries, reports, slides — filed back into the wiki\n\n**One topic, one wiki**— each research area gets its own sub-wiki with isolated indexes. No cross-topic noise.** Canonical collection slugs**— collection families use kind-first topic names such as`memes-bitcoin`\n\n,`memes-ethereum`\n\n, or`tools-bitcoin`\n\nso related catalogs group naturally as the hub grows.**Parallel research agents**— 5 standard, 8 deep, 10 retardmax. Each agent searches from a different angle.** Collector workflow**— search-driven catalogs for objects, media, and examples; saves a provenance map first, then inventories only the durable subset.— every existing wiki-managed directory has an index. Claude reads indexes first, never scans blindly.`_index.md`\n\nnavigation**Articles are synthesized**, not copied — they explain, contextualize, cross-reference.** Raw is immutable**— once ingested, sources are never modified.** Multi-wiki aware**— queries peek at sibling wiki indexes for overlap.** Archive-aware**— archived topic wikis stay preserved under`topics/.archive/`\n\nbut are hidden from default query/compile/research/collect/output and maintenance workflows.**Dual-linking**— both`[[wikilinks]]`\n\n(Obsidian) and standard markdown links on every cross-reference. Works everywhere.**Confidence scoring**— articles rated high/medium/low based on source quality and corroboration.** Structural guardian**— auto-checks wiki integrity after operations, fixes trivial issues silently.** Activity log**—`log.md`\n\ntracks every operation, append-only, grep-friendly.**Opinionated inventory**— durable tracking gets records; one-off sources stay ingest/query; large row-like data becomes datasets or collection ingests. Big pivots start with a sample table before records are written.**Media-safe catalogs**— bounded public binary media is cached under`output/assets/collect-<slug>/`\n\nby default; raw sources remain textual evidence, and large media sets become dataset manifests. Bulk downloads use timeouts, file-size caps, content-type checks, and IPv4 retry when needed.**Feedback is candidate memory**— corrections, preferences, approvals, and plan acceptance are saved as redacted candidates under`.sessions/feedback/`\n\n; generic acknowledgements are ignored, and promotion into topic notes is explicit.**Zero dependencies**— runs entirely on built-in tools (Claude Code, OpenCode, or Codex).\n\n| Mode | Flag | Agents | Style |\n|---|---|---|---|\n| Standard | (default) |\n5 | Academic, technical, applied, news, contrarian |\n| Deep | `--deep` |\n8 | Adds historical, adjacent fields, data/stats |\n| Retardmax | `--retardmax` |\n10 | Adds rabbit-hole agents. Skip planning, cast widest net, ingest aggressively, compile fast. Lint later. |\n\n**Smart input detection** — `/wiki:research`\n\nauto-detects whether you're passing a topic or a question:\n\n| Input | Detected as | Behavior |\n|---|---|---|\n`\"nutrition\"` |\nTopic | Standard research — explore the field |\n`\"What makes articles go viral?\"` |\nQuestion | Decompose into sub-questions → one agent per sub-question → synthesize → generate playbook → suggest theses |\n\nQuestion mode produces a **playbook** (actionable output artifact) and suggests **testable theses** derived from the findings.\n\n**Modifiers** (combine with any mode):\n\n| Flag | What it does |\n|---|---|\n`--new-topic` |\nCreate a topic wiki from the research topic and start immediately. Works from any directory. |\n`--plan` |\nDecompose into 3-5 parallel research paths, confirm, then dispatch all paths simultaneously. Parallel ingest, sequential compile. |\n`--min-time <duration>` |\nKeep running research rounds until the time budget is spent (`30m` , `1h` , `2h` , `4h` ). Each round drills into gaps the previous round found. |\n`--sources <N>` |\nSources per round (default: 5, retardmax: 15) |\n\n```\n# The full combo — new topic, 2 hours of deep research, from anywhere\n/wiki:research \"CRISPR gene therapy\" --new-topic --deep --min-time 2h\n```\n\nRetardmax mode is inspired by [Elisha Long's retardmaxxing philosophy](https://www.retardmaxx.com/) — act first, think later. The antidote to analysis paralysis. Works for both `/wiki:research`\n\nand `/wiki:output`\n\n.\n\nUnlike open-ended research, `/wiki:thesis`\n\nstarts with a specific claim and evaluates it:\n\n```\n/wiki:thesis \"intermittent fasting reduces neuroinflammation via glymphatic upregulation\"\n```\n\n**How it works:**\n\n- Decomposes the thesis into key variables, testable predictions, and falsification criteria\n- Launches parallel agents — but each agent has the thesis as a FILTER. Irrelevant sources get skipped (this prevents bloat)\n- Agents are split:\n**supporting**,** opposing**,** mechanistic**,** meta/review**,** adjacent**— balanced by design - Compiles evidence into wiki articles + a thesis file with evidence tables\n- Delivers a\n**verdict**: supported / partially supported / contradicted / insufficient evidence / mixed\n\n**Anti-confirmation-bias**: When using `--min-time`\n\n, Round 2 automatically focuses harder on the WEAKER side of the evidence. If Round 1 found mostly supporting evidence, Round 2 hunts for counter-evidence.\n\n**The thesis is the bloat filter.** Sources that don't relate to the claim's variables don't get ingested. Higher skip rate = tighter focus.\n\nEvery cross-reference in the wiki uses dual-link format:\n\n```\n[[gut-brain-axis|Gut-Brain Axis]] ([Gut-Brain Axis](../concepts/gut-brain-axis.md))\n```\n\nThe wiki is **not locked into any tool**:\n\n**Obsidian** reads the`[[wikilink]]`\n\n— graph view, backlinks panel, quick-open**Claude Code** follows the standard`(relative/path.md)`\n\nlink**GitHub/any markdown viewer** renders the standard link as clickable**No viewer at all**— plain markdown, readable in any text editor\n\nEach topic wiki has its own `.obsidian/`\n\nconfig and can be opened as an independent vault:\n\n```\nopen ~/wiki/topics/nutrition/     # Open in Obsidian — focused graph for one topic\n```\n\nThe hub (`~/wiki/`\n\n) has no `.obsidian/`\n\nto avoid nested vault confusion. If you want a cross-topic view, open `~/wiki/`\n\nmanually and let Obsidian create its own config.\n\nWhat works out of the box:\n\n`.obsidian/`\n\nconfig can be created on init with sane defaults`[[wikilinks]]`\n\npower the graph view`aliases`\n\nin frontmatter enable search by alternate names`tags`\n\nin frontmatter are natively read`inbox/`\n\nworks as a drop zone in both Obsidian and the CLI\n\nClaude Code is the compiler. Obsidian is an optional viewer.\n\n| Depth | Flag | What it does |\n|---|---|---|\n| Quick | `--quick` |\nReads indexes only. Fastest. For simple lookups. |\n| Standard | (default) |\nReads relevant articles + full-text search. For most questions. |\n| Deep | `--deep` |\nReads everything active, searches raw sources, peeks sibling wikis, and surfaces archived index matches separately. |\n| List | `--list` |\nReturns ranked article list instead of synthesized answer. Supports `--tag` and `--category` filters. |\n\nArchived topics are excluded from quick, standard, and list results unless you\npass `--include-archived`\n\n. Deep mode may show archived index hits, but it does\nnot cite archived material as active evidence without explicit inclusion.\n\nToken-efficiency changes are tested with deterministic context budgets and\noptional real Codex and Claude Code AB/BA harnesses. See\n[ benchmarks/README.md](/nvk/llm-wiki/blob/master/benchmarks/README.md) for commands, quality gates, and\ncache-metric caveats.\n\n[Andrej Karpathy](https://x.com/karpathy)— the[LLM wiki concept](https://x.com/karpathy/status/2039805659525644595)and[idea file](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f)[Elisha Long](https://www.retardmaxx.com/)— retardmaxxing philosophy (act first, think later)[tobi/qmd](https://github.com/tobi/qmd)— recommended local search engine for scaling beyond ~100 articles[rvk7895/llm-knowledge-bases](https://github.com/rvk7895/llm-knowledge-bases)— prior art in Claude Code wiki plugins\n\nMIT License. Copyright (c) 2026 nvk.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, subject to the following conditions: the above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", "url": "https://wpnews.pro/news/harness-session-capture-rehydration-feedback", "canonical_source": "https://github.com/nvk/llm-wiki", "published_at": "2026-07-15 17:51:28+00:00", "updated_at": "2026-07-15 17:58:11.642317+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-tools", "ai-agents", "developer-tools"], "entities": ["LLM-Wiki", "Claude Code", "OpenAI Codex", "OpenCode", "Obsidian"], "alternates": {"html": "https://wpnews.pro/news/harness-session-capture-rehydration-feedback", "markdown": "https://wpnews.pro/news/harness-session-capture-rehydration-feedback.md", "text": "https://wpnews.pro/news/harness-session-capture-rehydration-feedback.txt", "jsonld": "https://wpnews.pro/news/harness-session-capture-rehydration-feedback.jsonld"}}