ADR 0005 — Put page bodies in Postgres, not in a directory walk
ga · floor-software-engineer
Decision
Put page bodies in Postgres, not in a directory walk
Why
Past a few hundred documents, searching by walking and regexing is a different algorithm rather than a slower one, and it degrades every crawl. PGlite is real Postgres, so a GIN index over a generated tsvector is the real thing.
Measured
7,870 documents across 159 MB. The test that justifies the layer asserts what a LIKE scan cannot do: searching 'fetching' finds a document that only says 'fetches'.
Inputs and outputs
This decision declares none. Every name in this section, when present, resolves against the capability vocabulary or the floor registry -- a typo fails the generator rather than rendering.
Where it is
| Floor | floor-software-engineer |
| Stage | ga |
| Pull request | akwlabs-ai/akw-workplace-agents#304 |
| Routed | 2026-09-02 |
| Id | a4e4a17149948a34 |