Skip to content

Instantly share code, notes, and snippets.

@tyoung515-svg
tyoung515-svg / layered-knowledge-system-gist-v2.md
Created April 16, 2026 12:06
LLM Wiki Layered Memory System

LAYERED KNOWLEDGE SYSTEM — GIST v2

Karpathy-style compressed spec. Read once, execute against. Deterministic by default; testable by construction.

TL;DR

Tiered knowledge graph where JSON is truth, wiki is a pure function of JSON, rollups splice mechanically, retrieval traverses by rule, and an Opus-led audit keeps coherence as the graph grows. Every non-deterministic surface (LLM calls) is bounded, logged, and replayable. Tier slots exist from day one; deployments activate slots, never add them. Solo and enterprise run the same architecture at different activation levels.

v2 CHANGES (vs v1)

@tyoung515-svg
tyoung515-svg / lks-writeup.md
Created May 8, 2026 09:45
A four-layer local memory system for Claude — Qdrant + llama.cpp + MCP. Architecture write-up

Building a Local Memory Substrate for Claude

A four-layer knowledge system that gives Claude persistent, queryable memory across sessions. Runs entirely on-host — Qdrant + llama.cpp + Python. No cloud, no API keys, no per-token cost on the embedding or memory layer.

This write-up walks through what it is, why it exists, the architecture, the phased build (with the bugs we hit and what they taught us), measured results, and how to set up your own.


The problem

@tyoung515-svg
tyoung515-svg / Build_workflow_v2.drawio
Last active June 6, 2026 06:51
Using multiple models to extend long context tasks, and increase build viability
<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/29.5.2 Chrome/142.0.7444.265 Electron/39.6.1 Safari/537.36" version="29.5.2">
<diagram name="Build-Workflow-v2" id="WrTtcerdQPlLpfKY2O-s">
<mxGraphModel dx="1749" dy="1771" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1700" pageHeight="1700" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="title" parent="1" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fillColor=none;strokeColor=none;fontSize=42;" value="&lt;b&gt;&lt;font&gt;Build Workflow&lt;/font&gt;&lt;/b&gt;" vertex="1">
<mxGeometry height="40" width="600" x="1110" y="440" as="geometry" />
</mxCell>
<mxCell id="idea" parent="1" style="ellipse;shape=cloud;whiteSpace=wrap;html=1;fillColor=#1ba1e2;strokeColor=#006EAF;fontColor=#ffffff;" value=