Version 2.0 · stack version 1.0.0 · see CHANGELOG for history and ADR-007 for the versioning decision.
The brain: how a plain folder of Markdown becomes a durable, connected, self-maintaining knowledge system, operated by an agent such as Hermes Agent. This document is the reference for every skill in the stack. If you only read one file, read this one.
Memory is not a flat dump of context. Every fact, preference, decision and observation has a type, a confidence, a provenance and a lifecycle. Notes are not files — they are atomic nodes in a graph, connected by links that must be maintained or they silently rot.
The system is a three-layer pipeline, mirroring how memory actually works:
Layer 1 - REAL-TIME CAPTURE (during conversation / reading)
Layer 2 - NIGHTLY CONSOLIDATION (the dream cycle)
Layer 3 - CROSS-SESSION INTELLIGENCE (weekly distillation)
Each layer feeds the next. Capture without consolidation is a junk drawer; consolidation without capture is a library with no new books; intelligence without both is a blog no one reads.
Around this pipeline sits the agent layer: one orchestrator, several domain workers, and a credential boundary that decides what each may do.
┌────────────────────────────── AGENT LAYER ──────────────────────────────┐
│ Orchestrator (main agent) │
│ loads context modes · delegates to workers · delivers to the human │
│ │ │ │
│ ▼ ▼ │
│ Workers (isolated context) Credential boundary │
│ research · network · content · work flows upward, │
│ finance · vault credentials do not flow down │
└──────────────────────────────┬──────────────────────────────────────────┘
▼
┌────────────────────────── KNOWLEDGE LAYER ──────────────────────────────┐
│ Capture → Atomic notes → Graph (Iron Law backlinks) → Retrieval │
│ Memory (typed, decaying) · NOW.md · Tree Index · MOCs │
└──────────────────────────────┬──────────────────────────────────────────┘
▼
┌────────────────────────── INFRASTRUCTURE LAYER ─────────────────────────┐
│ Plain Markdown + git · regenerable indexes · secrets outside the repo │
└──────────────────────────────────────────────────────────────────────────┘
- Smart extraction — long documents (PDFs, articles, transcripts) become a summary + bullets. NEVER the full text. Full text is for the original file, not for notes.
- Atomic note — one note = one concept. A document with 5 themes becomes 5 notes. Titles are clear and unique.
- Wikilinks — 4-8 high-value links per note. A note without links is not a note; it is a tombstone.
- MOC update — update an existing Map of Content; create a new one only when 3+ notes exist on the theme.
- Tree Index — add the new concept/entity to the Tree Index if it's new.
- NOW log — one line in
now/recent.md(the changelog). - Log & preserve — record in
log.md; the original stays immutable in00-Inbox/→ moved toProcessed/after analysis.
| Trigger | Action |
|---|---|
| Decision made | Decision log entry (DEC-###) + memory |
| Correction received | Memory entry with high confidence (0.9) |
| Preference discovered | Memory entry, typed preference |
| Tool/workflow learning | Memory entry + note in References/ |
| Pattern seen 2nd/3rd time | Memory entry with counter; 3rd occurrence → procedural memory |
| Stray thought / principle / insight | Captured verbatim with an ID (SIG-###) — the original voice is the value |
| Deep-dive (article, thesis, framework) | Reference note with standardized frontmatter |
A note that mentions an entity (person, company, project) that has its own page MUST add a backlink to that entity's page.
A mention without a backlink is a broken synapse. The entity page gains a reverse-chronological "Referenced in" section. This is what turns a folder of notes into a graph — and it is the single most violated rule in every vault that doesn't enforce it. The dream cycle repairs violations nightly.
Modeled on how biological memory consolidates during sleep. Runs nightly (cron or manual "good night" trigger), and is idempotent — running it twice is safe. It is the reason the system does not rot. See ADR-003.
- Dedupe — people, companies, concepts with duplicate pages; merge, archive the loser (never delete — provenance survives).
- Backlink repair — find mentions that violate the Iron Law; add the missing backlinks.
- Tree Index refresh — add new entities, retitle stale ones.
- NOW.md cleanup — prune
essentials.md(today-only urgency), close resolved threads inthreads.md, updaterecent.md. - Contradiction detection — compare active memory entries on the same
topic; resolve by recency + confidence (newest and most confident wins);
the loser is archived with a
superseded_bynote, never deleted. - Memory decay — apply TTL decay (see schema below). Stale facts lose confidence; expired facts are flagged, not silently removed.
- Next-day priorities — write the 3 priorities for tomorrow.
The knowledge layers are inert without an agent operating them. The agent layer has three parts:
The main agent (the orchestrator) does the reasoning and delivers results.
For well-defined domains it delegates to workers — sub-agents with
isolated context that write files and hand results upward. See
ADR-008 and the agents skill.
| Worker | Domain | Output |
|---|---|---|
| Research | Deep dives, data collection | report file |
| Network | People CRM, prospecting | CRM updates + summary |
| Content | Posts, threads, newsletters | drafts folder |
| Finance | Portfolio, revenue, cash flow | finance folder |
| Vault | Maintenance, inbox, lint | maintenance report |
Rules:
- Workers write files; the orchestrator reads and delivers. Workers never talk to the human directly.
- Fresh-context isolation: each worker gets only its briefing card — never the full system state. Cheaper, faster, less leakage.
- Model routing: cheap model does I/O (search, collection, lint), expensive model does reasoning (strategy, voice, judgment).
The orchestrator changes behavior per domain by loading a context mode
file at the start of each work block (see 00-Hermes/contexts/ in the vault
template). A mode adjusts tone, data sources, and allowed tools — e.g. board
work, content creation, development, personal finance. Modes keep one agent
from behaving like a one-size-fits-all assistant.
Work flows upward. Credentials do not flow downward.
- Workers do not inherit MCP servers, messaging credentials, or public gateways automatically.
- Publishing (Telegram, LinkedIn, X, WhatsApp, email) always goes through the main profile with explicit approval.
- If a worker identifies an action it cannot perform, it hands the work upward — that is the boundary working, not a limitation.
This rule is the difference between a helpful delegation and a liability.
It is enforced by the agents skill and documented in the AGENTS.md template
so every agent in the system is trained on it. See
ADR-005.
| Type | TTL | Default confidence | Heuristic |
|---|---|---|---|
raw |
7d | 0.3 | Lives in 00-Inbox/ |
working |
30d | 0.5 | Default |
semantic |
365d | 0.8 | >500 chars, formal content |
episodic |
180d | 0.7 | Has date + meeting/call context |
procedural |
365d | 0.8 | "How to", workflow, playbook |
preference |
365d | 0.6 | "I like", "I prefer", style statements |
decision |
730d | 0.7 | "I decided", "approved", "signed" |
Every entry: id, type, title, content(≤2000), source, confidence, created/updated, valid_until, ttl_days, tags, links, superseded_by, hash.
The 7 above plus relationship, instruction, goal, commitment, context, event, observation, artifact, error — reserved for human curation. These live as
Markdown files with YAML frontmatter: type, confidence, provenance, status, supersedes/superseded_by, tags, source.
| Type | Rule |
|---|---|
preference |
-0.1 @ 30d, -0.2 @ 90d |
decision |
-0.05 @ 180d |
context |
-0.1 @ 14d |
observation |
-0.15 @ 7d, -0.3 @ 30d |
learning |
+0.05 per validation (reinforcement) |
Decay is healthy: preferences change, observations age. TTL marks expiry but does not delete — the compiler keeps the store clean.
Conflict is not an error — it is an opportunity to refine.
- Detect contradiction between active entries of the same type/topic.
- Resolve by recency + confidence: newest and most confident wins.
- Loser is archived with a conflict note, never deleted.
- Unresolved conflict becomes silent contradiction — apply policy automatically.
- Every entry has a type.
- Archiving is not deleting — history preserves provenance.
- One entry = one concept.
- Fact ≠ opinion — "X is a good leader" is an
observation, notsemantic. - Drafts enter with confidence < 0.5 so they don't inflate the signal.
- Hot cache (the agent's context) ≠ cold storage (the vault). Neither substitutes for the other.
Two complementary paths:
- Semantic index (
bin/semantic-index.py,bin/semantic-search.py) — embed notes locally, query by meaning. Hybrid search: keyword + vector. Indexes are regenerable and never committed (ADR-006). - Iron Law backlinks — the graph. Entity pages accumulate "Referenced in" entries, so any question that starts at a person/company/project walks the graph instead of searching strings.
Retrieval protocol (the skills enforce it):
- Brain-first: consult the vault before any external API.
- Synthesize + gap analysis: answer from the vault, then say what is missing and where to get it.
- Never answer from memory alone when the vault has the source.
| File | Function | Cadence |
|---|---|---|
now/essentials.md |
Urgent today, deadlines | Daily; keep lean, remove what lost relevance |
now/threads.md |
Open threads with owner/deadline/status | Every thread; close resolved |
now/recent.md |
Vault changelog (~10 entries) | Every modification |
NOW.md is what makes the vault usable in the morning: it answers "what is alive right now?" without searching.
00-Inbox/ Raw incoming (immutable; Processed/ after analysis)
00-Hermes/ The operating system (see below)
01-Wiki/ Atomic evergreen notes
Articles/ Media/ Signals/ Briefings/ Meeting-Notes/
now/ essentials.md, threads.md, recent.md
02-MOCs/ Maps of Content + Tree Index.md
People/ People and relationships
Organizations/ Companies, institutions, boards
Projects/ Active projects and engagements
References/ Deep-dive reference notes (standardized frontmatter)
00-SECRETS/ Encrypted secrets (*.age) — never plaintext, ADR-004
Archive/ Cold storage
log.md Audit trail
00-Hermes/ is where the machine keeps its own memory — the agent's contexts,
decisions, typed memory store, and worker briefing cards:
00-Hermes/
contexts/ Context modes (board, content, dev, finance, ...)
decisions/ DEC-### decision log
memory/ Typed memory store (working/semantic/procedural/...)
workers/ Worker briefing cards
references/ Deep-dive reference notes
Every entity page has typed frontmatter (person, organization, meeting,
financial, ...) with expected fields and edges — the schema is what makes
automation reliable. The contract lives in vault-template/schemas/.
Decisions are first-class citizens: DEC-### entries with context, options
considered, rationale, and owner. A decision without a log entry didn't happen;
a logged decision without a revisit date is a bet without a check-in. The log
is the difference between "we discussed this" and "we decided this, and here is
why".
Signals (stray thoughts, principles, insights) get SIG-### IDs so the Iron
Law, references and distillation can anchor to them. The signal skill
enforces this.
- Never copy a full document into a note.
00-Inbox/is immutable;log.mdrecords everything.- Under 30s per item — if it takes longer, extract less.
- Never overwrite notes the human edits manually.
- Lean storage: contacts ≤ 5KB, conversations only summaries, raw emails never enter the vault.
- The brain belongs to the human. The agent maintains it, never owns it.
- Secrets never enter the repository (ADR-004).
- Indexes are regenerable; a broken index is deleted and rebuilt, not "repaired" (ADR-006).
- No lock-in: any editor, any agent, any OS.
- Diffable: every change is reviewable; rollback is a git command.
- Portable: the whole brain is a folder you can copy, back up, or gift.
- Durable: Markdown will outlive every proprietary format you could pick.
The cost (no fancy database) is repaid by the consolidation layer, which reorganizes the mess nightly. Structure is a process, not a schema. See ADR-001.
The stack is versioned like the software it is: Semantic Versioning (VERSION
- git tags), Keep a Changelog (
CHANGELOG.md), and decision records (docs/adr/) for every structural choice (ADR-007). The release procedure is in RELEASING.md.
The stack replicates without its content: ./setup scaffolds the vault
skeleton, installs skills and the engine, and wires the nightly cron. To stand
it up somewhere new — another machine, another person, a team — follow
REPLICATION.md. The architecture is the product; the
knowledge belongs to its owner.
- ADRs — every decision with alternatives considered (8 records)
- RELEASING.md — release procedure
- REPLICATION.md — replication playbook
- CONTRIBUTING.md — how to contribute