SpandrelA framework that turns markdown file trees into governed knowledge graphs — philosophy, spec, and reference implementation

Architecture

Spandrel's three phases — compile markdown to graph, store in a pluggable backend, serve via REST and MCP through one access policy

Architecture

Spandrel has three phases: compile, store, serve.

  1. Compile — walk a directory tree of markdown files, parse frontmatter, resolve hierarchy and links, produce a graph of nodes and edges.
  2. Store — write the compiled graph to a backend. In-memory for local dev, Postgres for production. Any backend that satisfies the GraphStore interface works.
  3. Serve — expose the graph through one or more wire surfaces, all gated by a single Access Policy. MCP and REST are peer wire surfaces; CLI wires them together. Web UIs and other consumers ride on top of these.

All wire surfaces — MCP, REST, CLI, web UIs — call the same Access Policy before serializing a response or performing a write. One policy, one enforcement point, one set of rules.