Knowledge System Architecture Comparison
Side-by-side analysis of Kevin's flat-file wiki with qmd search vs a pgvector-backed knowledge brain. The two approaches share ~70% of their architecture (brain-agent loop, compiled truth, skills-as-markdown, no-one-off-work). The gap is in the infrastructure layer: pgvector uses Postgres + RRF hybrid search, while Kevin's wiki uses flat files + qmd local search. Source: GBrain production brain docs; hwchase17 memory-as-markdown frame; wiki upgrade notes, 2026-04-12
Source Tweet Artifacts
Shared Architecture (70% Overlap)
Both systems independently converged on the same core patterns:
| Pattern | LLM Wiki | GBrain |
|---|---|---|
| Brain-agent loop (read-write cycle) | Enforced in AGENTS.md, documented in The Brain-Agent Loop | guides/brain-agent-loop.md |
| Compiled truth + timeline | Documented, now enforced via lint | Core structural primitive, --- separator |
| No-one-off-work / codification | AGENTS.md "The Compounding Rule" | ethos/THIN_HARNESS_FAT_SKILLS.md |
| Skills as markdown | 40+ installed skills, skill-creator |
Same pattern via OpenClaw |
| Deterministic collectors | scripts/ directory |
guides/deterministic-collectors.md |
| Brain-first lookup | qmd search mandatory |
gbrain search mandatory |
| Three-layer architecture | raw/ + wiki/ + AGENTS.md |
sources/ + brain/ + schema.md |
| Automations on cron | 14 automations in automations/ |
20+ cron jobs |
| The memex vision | Vannevar Bush reference in The Brain-Agent Loop | Opening of skillpack doc |
Where GBrain Pulls Ahead
Search Infrastructure
The wiki uses qmd (BM25 + vector + query expansion + LLM re-ranking, all on-device via GGUF models). GBrain uses Postgres + pgvector with OpenAI embeddings (text-embedding-3-large, 1536-dim), Reciprocal Rank Fusion (RRF) merging vector and keyword results, and 4-layer deduplication (source dedup, Jaccard similarity, diversity caps, page caps).
At 180 pages, qmd performs well. At GBrain's 14,700+ brain files in the current skillpack snapshot, the Postgres-backed approach with HNSW indexing and structured dedup is materially better. The README also describes a larger production deployment with 146,646 pages, 24,585 people, 5,339 companies, and 66 cron jobs; treat that as deployment evidence, while the skillpack's 14,700+ file count is the public reference-architecture baseline. Source: GBrain README and docs/GBRAIN_SKILLPACK.md, 2026-07-03
Database Primitives
GBrain has four structured database primitives the wiki lacks:
- Entity registry - canonical IDs, all aliases, external IDs. Identity resolution is a database operation, not a file merge.
- Event ledger - immutable signal log with provenance. Timeline sections are generated from this.
- Fact store - structured claims with source + confidence. Contradictions are structural, not textual.
- Relationship graph - typed edges (knows, works_at, invested_in). Enables graph traversal queries.
The wiki approximates these with frontmatter aliases, append-only timelines in markdown, source citations in prose, and typed backlinks in _backlinks.json. These approximations work at current scale but would break down past ~1,000 pages.
Enrichment Pipeline
GBrain has a tiered enrichment pipeline (Tier 1: 10-15 API calls, Tier 2: 3-5, Tier 3: 1-2) with external API integration (CrustData, Brave Search, Twitter, Google Contacts). The wiki now has enrichment tiers defined in AGENTS.md but no external API integration beyond web search.
RESOLVER.md
GBrain has a master filing decision tree with per-directory resolvers. The wiki now has this too (adopted in this upgrade cycle).
Three-Layer Memory
GBrain explicitly separates world knowledge (brain), operational state (agent memory), and session context. The wiki now has this documented in AGENTS.md's Memory Routing section.
What We Adopted (April 2026)
- RESOLVER.md - Filing decision tree + per-directory README.md resolvers
- Entity Identity Protocol - Aliases in frontmatter, dedup-before-create, merge protocol
- Typed backlinks -
_backlinks.jsonnow includes relationship types (related, mention, uses, extends, contradicts, supersedes) - Compiled truth enforcement -
---separator required for person/project/tool pages and pages over 50 lines. Lint rule enforces this. - Enrichment tiers - Tier 1/2/3 protocol in AGENTS.md with
tierfrontmatter field - Memory routing - Explicit three-layer separation (wiki vs agent config vs session)
What We Explicitly Defer
| Feature | Why Deferred | Revisit Trigger |
|---|---|---|
| Postgres + pgvector backend | qmd works at <500 pages | Page count > 1,000 or qmd latency > 2s |
| Entity registry as database table | Aliases in frontmatter + lint dedup sufficient | Frequent entity merge conflicts |
| Fact store with claim-level provenance | Source attribution in markdown sufficient | Contradictions spanning 100+ pages |
| Formal graph queries | Typed backlinks + qmd cover 90% of use cases | Need for multi-hop traversals at scale |
| External API enrichment | No current need for CrustData/Brave/Twitter auto-enrichment | When the wiki tracks people professionally |
What v0.10.0 Changed (2026-04-14 Historical Snapshot)
GBrain v0.10.0 shipped 16 new skills (24 total), generalized from a 17,888-page production brain. This widens the gap in several areas while validating the shared architectural patterns.
New Gaps (GBrain pulls further ahead)
| Feature | What it does | Kevin's Wiki equivalent |
|---|---|---|
| Signal detector (always-on) | Cheap sub-agent spawns on every message to capture original thinking and entity mentions. Brain compounds on autopilot. | No equivalent - ingest is explicit, triggered by user request. Highest-value pattern to consider adopting. |
| SOUL.md / USER.md / ACCESS_POLICY.md | 6-phase interview generates agent identity, user profile, and 4-tier privacy policy (Full/Work/Family/None). | Agent identity spread across .cursorrules, AGENTS.md, CLAUDE.md. No structured interview. No access tiers. |
| Skill conformance standard | YAML frontmatter (name, version, triggers, tools, mutating) + Contract + Anti-Patterns + Output Format. Validated by test files. | SKILL.md format varies by author. No conformance validation. |
| Cross-modal review | Quality gate via second model with refusal routing chain. | Not implemented. |
| Data research recipes | Parameterized YAML for structured data extraction from email (investor updates, expenses, metrics). | Not implemented. |
gbrain doctor trajectory |
Tracks improvement: "intent classifier: 87% deterministic, up from 40% in week 1." Fail-improve loop generates better regex from LLM fallback logs. | check-freshness.ts tracks staleness, not improvement trajectory. |
Gaps That Narrowed
- RESOLVER.md - Both systems now have this. GBrain's is a 215-line production dispatcher with categorized routing; Kevin's is directory-focused.
- Enrichment tiers - Both now have Tier 1/2/3. GBrain's auto-escalates (1 mention → Tier 3, 3 mentions → Tier 2, meeting → Tier 1). Kevin's requires manual tier assignment.
- Ingest specialization - GBrain now has a thin ingest router delegating to idea-ingest, media-ingest, and meeting-ingestion. Kevin's wiki has single ingest operation but with recipe-based collectors.
Scale Gap (growing)
| Metric | GBrain (production) | Kevin's Wiki |
|---|---|---|
| Total pages | 17,888 | ~210 |
| People tracked | 4,383 | ~1 |
| Companies tracked | 723 | 0 |
| Autonomous cron jobs | 21 | 14 automations |
| Skills | 25 (tested, conformant) | 98 skill wiki pages (varying quality) |
Current Upstream Snapshot (2026-07-03)
The v0.10.0 row above is a dated release comparison. Current upstream GBrain has moved to 0.42.56.0, default branch master at 646179047a8e4ad9c462d83ce9a67a50ba076de8, with 55 top-level skills/ directories. The user-facing docs simultaneously talk about 43 curated installer skills and 40+ skills in the skillpack, so capability coverage should separate repo surface from packaged installer surface. The architectural lesson is the same: route off the current repo for capability audit and use the v0.10 image only as evidence for when the conformance and signal-detection pattern appeared. Source: GitHub garrytan/gbrain, 2026-07-03; Source: X/@garrytan, 2026-04-10
The current skillpack also sharpens the comparison frame. It is not merely "skills as markdown"; it is a reference architecture for an agent-operated brain: run entity detection on every message, capture originals, look up the brain before external APIs, separate compiled truth from timelines, cite every fact, ingest meetings/media/diligence with deterministic collectors, run maintenance through cron/Minions, and keep integrations as recipes. Kevin's wiki already implements many of these locally; the remaining gap is stronger automatic capture and maintenance, not another static note-taking layer. Source: docs/GBRAIN_SKILLPACK.md, 2026-07-03
The Harrison Chase Frame
From hwchase17's tweet:
"Memory is markdown. Skills are markdown. Brain is a git repo. The harness is a thin conductor - it reads the files, it doesn't own them."
Both systems embody this. The philosophical gap is zero. The infrastructure gap is real but not urgent at current scale. The wiki's thin-harness architecture (AGENTS.md + qmd + scripts/) is the right foundation. The database layer is an additive upgrade when scale demands it, not a rewrite.
Timeline
- 2026-07-03 | Refreshed current GBrain source snapshot to
0.42.56.0at6461790and added the skillpack reference-architecture distinction: repo skills, curated installer skills, and skillpack claims are different count surfaces. Source: GitHubgarrytan/gbrain, 2026-07-03; Source: X/@garrytan, 2026-04-10 - 2026-06-30 | Deep-reviewed the v0.10.0 bookmark artifact and refreshed current upstream GBrain versioning; clarified that the 24-skill count is historical and current source has 53 top-level skills. Source: X/@garrytan, 2026-04-15; Source: GitHub
garrytan/gbrain, 2026-06-30 - 2026-05-17 | Recontextualized as Kevin's own architectural comparison.
- 2026-04-14 | UX behavioral foundations added to quality review stack. Steve Krug's "Don't Make Me Think" codified into agent-executable usability tests. See Quality Review Stack.
- 2026-04-12 | Full architectural comparison. Adopted 6 incremental upgrades (RESOLVER, entity identity, typed backlinks, compiled truth enforcement, enrichment tiers, memory routing). Deferred database layer.