tmbspaceships: Building a Digital Twin of a Technical Mind

A SurrealDB-backed graph, Claude-powered extraction, and agentic chat turn 583 tweets into a navigable map of one engineer’s physics obsession.

8 min read • View on GitHub • More from postrv

A lone engineer at a desk watches scattered tweet fragments get threaded into a dense graph of nodes and edges. The scene explains the core idea of the project: turning loose technical posts into a structured map of concepts, entities, themes, and relationships.
The repository treats a stream of tweets like raw field notes, then rewires them into a graph that can be explored instead of merely searched.
Key Takeaways

The weirdly compelling thing about tmbspaceships is not that it searches tweets. It tries to preserve a technical worldview. The repository turns 583 terse posts from a retired USAF engineer into something closer to a digital twin of expertise, where concepts, entities, and themes can be queried as a living structure rather than flattened into a feed.

The project is trying to preserve a mind, not just index tweets

That distinction matters. A keyword index can tell you where a term appears, but it cannot tell you why it matters in a specialist’s internal taxonomy. This corpus is full of shorthand, recurring obsessions, and domain-specific references, so the real problem is not retrieval. It is interpretation.

The repository’s core move is to treat the posts as evidence of a worldview. Once the text is structured into a graph, the system can answer questions about relationships, not just similarity. That changes the unit of search from a sentence to a network of ideas.

Why tweet search fails for this kind of material

Flat search breaks down when the corpus is dense and idiosyncratic. A query like "antigravity" or "E-M-K axis" may surface the right tweet, but miss the surrounding cluster of related concepts that gives the phrase its meaning. Vector search helps with fuzzy similarity, but it still tends to rank neighbors. It does not naturally explain structure.

raw tweet -> Claude extraction -> structured JSON -> SurrealDB graph

Entities: people, papers, phenomena
Themes: recurring ideas across tweets
Topics: searchable buckets of discussion
Edges: cites, relates_to, belongs_to, discusses
ApproachWhat it is good atWhat it missesWhy tmbspaceships is different
Keyword searchExact matches and simple lookupMeaning that depends on contextIt needs relationships, not just terms
Vector searchLoose semantic similarityInternal taxonomy and multi-hop reasoningIt models concepts as connected graph nodes
Graph traversalPaths between ideasWeak recall without structureIt combines traversal with extracted semantic labels

Claude does the extraction, but the schema does the thinking

The ingestion pipeline, centered in ingest.py and schema.py, is the project’s real intelligence. Claude turns messy posts into JSON, but the schema decides what counts as a topic, what counts as a theme, and how those pieces are allowed to relate. That means the database is not passive storage. It is an interpretation layer.

The source model is deliberately lean. Raw tweets are enriched into node types like tweet, topic, theme, entity, and image, then tied together with semantic edges such as discusses, cites, belongs_to, and relates_to. The result is a graph that can be queried as if the corpus had always been structured that way.

The pipeline is less about one retrieval call and more about a sequence of graph-aware decisions that turn a question into a routed investigation.

Two distant clusters of concepts are connected by a deliberately traced path through intermediate nodes. The image explains how the system finds conceptual bridges instead of relying only on nearest-neighbor similarity.
The most elegant part of the product is the bridge between ideas. It does not just fetch neighbors, it walks the shortest useful path across the graph.

SurrealDB collapses the stack

This project would feel much larger if it were split across a vector store, a graph database, and a relational backend. SurrealDB lets it collapse those jobs into one system. That matters because the article of record here is not infrastructure sprawl. It is how much expressive power a small stack can hold.

LayerTypical stacktmbspaceshipsWhy it matters
StorageRelational DB plus object storeSurrealDBThe data stays in one transactional system
SimilarityVector databaseSurrealDB full-text plus graph traversalThe corpus can be searched and walked
ReasoningSeparate agent layerClaude with graph toolsThe model can inspect structure, then answer
OpsMultiple servicesOne lean backendThe project stays auditable and compact

The real trick is not retrieval, it is traversal

The chat agent in chat.py is the clearest sign that this is not a conventional RAG wrapper. It can search topics, inspect details, fetch tweets for a topic, and chain tool calls when one hop is not enough. That makes it behave less like a summarizer and more like a researcher moving through a corpus.

That difference is subtle but important. Retrieval asks, "Which chunk looks relevant?" Traversal asks, "What path through the knowledge structure gets me to the answer?" The second question is harder, but it is also the right one when the corpus has internal logic.

This is also where the repository becomes legible as a knowledge-engineering project. The system is not trying to sound intelligent. It is trying to expose the steps needed to justify an answer.

ModeUser question becomesSystem behaviorFailure mode
Single-hop retrievalOne search resultReturns the nearest-looking textMisses context and conceptual links
Multi-hop traversalA route through the graphChains tools across topics, entities, and tweetsCan take more steps, but reveals structure
tmbspaceshipsA navigable inquiryThe agent inspects, branches, and synthesizesBetter for dense expert corpora

The bridge query is the most elegant part of the product

The /bridge?a=&b= endpoint is the project’s sharpest idea. It asks a graph question instead of a search question: how do two concepts connect, and what sits between them? That makes the corpus explorable in a way a typical chatbot cannot match.

A bridge query is valuable because it surfaces structure that no single tweet owns. It can show how a niche topic links to another through shared themes, entities, or related discussions. In a corpus like this, that is often the most useful answer available.

This is a boutique knowledge graph, and that is a strength

The project is scoped to one person, one voice, and one archive. That makes it modest in scale, but unusually coherent in design. A generic knowledge base has to survive every kind of content. This one only has to explain a single expert’s intellectual footprint.

That constraint is not a compromise. It is why the system can be precise. The schema can reflect the source material’s quirks, the extraction prompt can preserve its taxonomy, and the interface can focus on exploration rather than generality.

In other words, the boutique nature of the graph is the point. It is a prototype for expertise preservation, not a platform pretending to know everything.

What the project suggests about AI infrastructure

The broader lesson is that AI infrastructure gets more interesting when the scope gets sharper. You do not always need a bigger model or a more sprawling stack. Sometimes the better move is a tighter schema, a more deliberate graph, and an agent that knows how to ask follow-up questions.

tmbspaceships is a compact example of that philosophy. It turns a narrow corpus into a navigable system of meaning, and it does so with a small enough codebase that the design stays visible. That is the real appeal. The machinery is modern, but the idea is old-school: organize knowledge well, and it becomes easier to think with it.