Introduction¶
When writing code in Cursor, Codex, Claude Code, or DeepSeek Harness, a common issue is having to re-explain the same decision or release process every few days. Session compression, vector retrieval, or hosted memory APIs can squeeze the previous conversation into the next prompt, but they struggle to ensure the agent opens the page you approved next time. It’s even harder to make subsequent calls must hit the updated text after a correction.
DSH-KRouter (repository name runtime36) takes a different approach: it implements “memory” as daily logs, distillation, and promotion within an Obsidian vault, using short nouns with an alias table for retrieval locking, rather than maintaining a vector database. Below, we’ll introduce what it is, what it can do, and how to install and enable it in DSH.
What This Is¶
DSH-KRouter is maintained by 398894496-arch and categorized as “memory” on SkillHub. The current version in package.json is 0.4.0, under the MIT license.
In one sentence: The second-brain OS for coding agents – cloning gives you the protocol, skeleton, router, and daily writer; the nouns, projects, and correction records in the vault grow with your usage and don’t include the author’s private notes on clone. It supports Cursor, Codex, Claude Code, and DeepSeek Harness, sharing the same vault and canonical_sources.psv alias table.
The key difference from typical “agent memory” can be summarized as: it doesn’t rely on semantic neighbors or maintain vector databases. Corrections update the canonical page, and the next call must open that page and return a dual SHA-256 receipt.
Core Features¶
Four-Layer Pipeline¶
The README describes daily self-evolution using L1–L4 (timers are enabled by default):
| Layer | Purpose | What Not To Do |
|---|---|---|
| L1 Logs | Write one log daily under 05 |
Treat logs as reusable methods |
| L2 Distill | Distill summaries without replacing originals | Auto-write active methods |
| L3 Promote | Pass five gates → auto-write provisional that day; ask again next similar task; adopt and task accepted → active |
Skip provisional or write directly to active |
| L4 Lock | Short noun → corresponding page + dual SHA-256; requires python3 and rg; README claims tens of milliseconds on an 8 GB M2 |
Vector fallback, neighbor references |
Retrieval is a lock, not the product itself: hits return canonical-match and source verification fields; misses return canonical_match: false with a hint, not pretending to be a hit.
Promotion and Correction¶
- The first qualifying day automatically writes to a
provisionalmethod. - Formal
activeis not auto-written: it asks on similar tasks; only promotes after adoption and task acceptance. - Correction priority: after updating a canonical page, subsequent calls should open that page. This differs from “re-embed and hope old chunks decay.”
DSH-Side Capabilities¶
As a DSH plugin, it provides read-only tools: status, preference, correction, memory (vault routing, not chat memory), project, search, suggest. Uninstalling the plugin does not delete vault notes.
dsh plugin add mounts the router and bridge; daily distillation writes are handled by the cron job installed via install.sh. lamp: unused indicates the timer is off.
Dependencies and Environment¶
- Requires
python3,rg, and PyYAML to run. - Full test:
python3 -m pip install -r requirements-dev.txt && python3 -m pytest -q. - CI runs pytest,
first_run.sh, and DSH bridge on each push; queries keep data local.
Installation and Enabling¶
Install from Community Directory (DSH)¶
Official command from the README:
dsh plugin --profile web add github:398894496-arch/runtime36
If you have a local clone, you can mount the path:
dsh plugin add /path/to/this/repo
Before installing, review the repository source code and MIT license. Plugins run with current dsh process privileges, accessing local vault paths and key configurations.
Verify Retrieval Lock (~15 minutes)¶
The README provides a quick verification without GPU, Docker, or embedding services to prove the L4 lock, without distilling yesterday’s content:
git clone https://github.com/398894496-arch/runtime36.git
cd runtime36
python3 -m venv .venv && . .venv/bin/activate
python3 -m pip install -r requirements.txt
./scripts/first_run.sh
On a fresh clone, first_run.sh takes about 20 seconds; no account, API key, or network needed.
Start the Daily Writer¶
This is the product’s core emphasized in the README. Copy template/ to your vault, fill in your nouns in the alias table (the template includes ten examples), then run:
export OBSIDIAN_VAULT=/path/to/YourVault
./scripts/install.sh
API Key Path: Paste *__API_KEY on the vault page template/90 System Files/Automation/Self-Evolution Key.md; or let install.sh write to ~/.dsh-krouter-keys.env (chmod 600, not in vault). The writer reads both places, with vault page taking precedence.
No Key: Logged-in CLIs (grok, official Codex, claude) can still perform distillation and promotion without extra env files. Related files are in extras/host-daily-evolution/.
Note: OBSIDIAN_VAULT must be exported before install.sh, otherwise the timer won’t load. install.sh installs ~/.agents/skills/krouter-obsidian and ~/.cursor/rules/krouter-obsidian.mdc; if the target exists and --force isn’t used, it exits with code 1 and won’t overwrite the active obsidian-knowledge-router.
DSH Bridge Self-Test¶
node extras/dsh/test-bridge.mjs
Typical Usage¶
Retrieval Hits and Misses¶
Each route returns a receipt to distinguish authoritative hits from guesses:
retrieval_status: canonical-match
canonical_source: /YourVault/AgentSecondBrain.md
canonical_id: Q01
source_verified_at: 2026-01-01
source_sha256: d8c1d5af…
canonical_map_sha256: c55b8715…
canonical_match: true
On miss, canonical_match: false with a hint. Use suggest to view recent aliases (for hints only):
./scripts/krouter suggest homz
To add a new route, add a line to canonical_sources.psv, e.g.:
Q11|deploy;deployment;how we ship|02 Experience and Methods/Deploy/Release Process.md|Ship from main only
Four-End Mounting, Same Vault¶
| Mount | Deliverable |
|---|---|
| Cursor | extras/cursor/krouter-obsidian.mdc (via install.sh) |
| Codex | extras/codex/AGENTS.snippet.md |
| Claude Code | extras/claude-code/CLAUDE.snippet.md |
| DeepSeek Harness | DSH socket; read-only tools as above |
Cursor rules first run status, and if a host_action exists, it must notify the host.
Use Cases and Notes¶
Suitable for:
- Those who have or are willing to maintain an Obsidian vault and work in Cursor / Codex / Claude Code / DSH;
- Those repeatedly explaining the same decisions and processes to agents, wanting methods to reside in the vault rather than chat windows;
- Those accepting “short nouns + alias table + page lock” retrieval, not needing vector databases or hosted memory APIs;
- Those willing to let the daily timer (enabled by default) handle seal → distill → promote.
Not Suitable for:
- Those wanting to auto-inject chat into the next prompt;
- Those needing semantic neighbor search or a vault that’s full out-of-the-box (you clone the OS, not the author’s private notes);
- Those unwilling to maintain noun alias tables and canonical pages.
The README clarifies: this is not Mem0, nor a typical note app. The author’s vault reported consecutive sealing for 72 days as of 2026-08-21, which is the result of accumulated aliases and promotions on the author’s side; what you can reproduce locally is first_run.sh and the pytest suite.
Before installing and daily use, please verify the source code, permissions, and key storage yourself. SkillHub is an independent community directory, not officially affiliated with DeepSeek / High-Flyer.
Conclusion¶
DSH-KRouter makes “memory” an auditable vault pipeline: daily log sealing, distillation promotion, short noun retrieval locks, correction-first, and self-evolution timers enabled by default. If your pain point is agents forgetting your documented methods, start by verifying the lock with first_run.sh, then configure the vault and install.sh as per the README.
- SkillHub Directory: https://www.skillhub.cn/plugins/398894496-arch/runtime36
- GitHub Repository: https://github.com/398894496-arch/runtime36
- Chinese README: https://github.com/398894496-arch/runtime36/blob/main/README.zh.md