Repolex, re-processed
5,327 git repos · 480 GiB of RDF — as a handful of phexts. A deep dive into what repolex does, and whether phext helps it. (Spoiler: they were searching for phext.)
74 seconds. Every terminal output on screen is a real captured run — nothing retyped.
What repolex does
Repolex is building a knowledge graph of all of open source, plus agent memory on the same substrate — "code intelligence for the rest of us." Three layers:
- Parse: tree-sitter ASTs (173 dialects) + LSP semantics + git history for 5,327 upstream projects, stored as gzipped N-Quads, one git repo per project (480.2 GiB total). Git is their database: storage, versioning, and distribution in one move.
- Query:
lexq(Python, agent-facing) andrlex(Rust) run SPARQL over OxiGraph, unioning named graphs across repos. - Memory: git-lex applies the same trick to Markdown — agent "souls," ontology seeds, squad kits — persistent, queryable memory for long-lived agents (Subtexture).
Side by side
| dimension | repolex as built | the phext network |
|---|---|---|
| storage unit | one git repo per project (5,327 repos) | one phext per project + one index phext for the org |
| node identity | IRI + fragment smuggling coordinates: #echo_54_2_54_9 | the coordinate is the address: layer = book, subject = scroll |
| table of contents | none natively — extra index repos | corpus.phext: 6,547 scrolls, 1.36 MB, every repo one fetch |
| cross-repo edge | download the second repo (up to 19 GiB) + SPARQL union | a coordinate reference in the same file — follow resolves it |
| project setup | clone graph repo, download, load a store | repolex convert <project> — clone + all layers + fidelity proof, ~45 s for 530K triples |
| query | full SPARQL: joins, paths, aggregates | PhextQL selection (scroll-granular) + pattern query — SPARQL is strictly stronger today |
| compression | gzip: bigiron's shards ≈ 3.0 MB | 30.6 MB phext (2.46× smaller than raw quads, larger than gz — ratio traded for addressability) |
| parsing | tree-sitter + LSP (theirs) | identical input — phext starts where their parser ends |
Where phext helps
- The index. 5,327 repos have no native TOC; corpus.phext is the TOC, every entry addressable.
- Identity. Their fragments already encode coordinates in strings. Phext makes position the address itself — subject stated once per scroll is where the 2.46× over raw quads comes from.
- Edges.
repolex follow corpus.phext 1.1.1/347.2.1/2.1.1walks bigiron's dependency scroll to pytest's record in one step. - Setup + hosting. One command converts a project; the result serves whole under the reference phext tools — phext-edit: 46,283 of 46,283 scrolls, deep coordinates included; SQ: 283 of 283.
Where it doesn't (yet)
- SPARQL. Call-graph traversal and joins are real work rlex does today. The honest architecture is phext underneath, their query engine on top.
- Compression. gzip's ~10× is real; localizing the IRIs still repeated in object positions would close much of the gap. Not built.
- Enrichment gaps are theirs either way — two of three sampled repos ship empty LSP shards; phext's
analyzemakes the gaps visible, it doesn't fill them.
Verdict
Repolex is searching for a coordinate-addressed substrate and paying for its absence in index repos, fragment-encoded positions, and per-triple IRI repetition. Phext supplies that substrate — measurably, on their own data — while their parser and SPARQL engine remain the stronger halves of their stack. The network is the proof: their whole sprawl, re-processed into eight phexts, queryable by selection, walkable by coordinate, readable by the reference phext tools.
Full analysis: SIDE-BY-SIDE.md · Tool + network: github.com/wbic16/repolex · Prepared EE 2076 · © Phext, Inc.