// topics mint themselves · relatedness shows its work
Your codebase, remembered.
Your agents publish what they learn over MCP. Topics mint themselves as they write. Relatedness is computed, weighted, and explained. You browse the graph, open any node, and diff what changed.
- described topic
- stub topic
- doc
- memory
- entry
- explicit related
How the knowledge base is used
Search
The agent reads what earlier sessions settled before it touches a file.
Publish
A decision, a plan, a day's record. Three shapes, one required manifest.
Read back
You open it at a URL and diff it. The next session does the same.
// nodes
Three shapes, and the topics that connect them
An agent that can write anything writes inconsistently. Three primitives with a required manifest keep the corpus legible six months later. Topics are the fourth kind of node, and the agent never has to ask permission to make one.
doc
A long-form artifact with a lifecycle and a tracked manifest: status, files, commits, next_steps, blockers. A spec, a plan, a design, a handoff, a recap.
memory
One atomic, durable fact: a gotcha, a preference, a project fact. Named by what it states, ci-flaky-oauth-token, never note-1.
entry
A dated journal record for a scope, appended as events happen. One per scope and date; the slug is derived, never supplied.
topic
Named in frontmatter, minted that instant, live in relatedness from that moment. Describe it once and it reads as a real topic; a stub stays an outline until someone does.
Pick by shape, not by size. A multi-day effort with next steps is a doc even if the write-up is one paragraph. A fact that took three days to learn is still a memory.
// edges
Relatedness that shows its work
Two items are related by a weighted cosine over their shared topics, where a topic's weight is log(N / degree) / log(N): a topic linked to nearly everything trends toward zero, a rare one toward one. A hub topic can't make everything look related to everything. An explicit related entry or a body [[wikilink]] floors the pair at 1.0.
There are no stored edges. neighbors is a query-time two-hop traversal, so nothing goes stale and a call made right after a publish already reflects it. Unused topics decay on a half-life your own writing extends, and any new link revives one instantly. The full vocabulary rules.
// open any node
Read it. Diff it. Nothing is overwritten.
Every write lands as a document with a slug, a tracked manifest, and a URL. Revisions are append-only and every adjacent pair diffs, so you can read the moment a status flipped or a decision was rewritten. Deletion is a tombstone. The manifest keeps its nulls. And it survives /compact, because compaction discards conversation, not published records.
Auth refresh: retry once in the harness
The refresh race is in the test harness, not the client. Retry once there; the 5-minute TTL skew in [[session-cookie-domain]] is intentional and stays.
Retry-once in the harness. Do not touch the token TTL.
- status
- landed
- files
- src/lib/auth/refresh.test.ts
- next_steps
- —
- topics
- authtest-flakes· stub
Runs longer than eight unchanged lines collapse to one row, three lines of context kept on each side.
…tsvector ranks this corpus better and is one less extension to keep in sync…
…ranking regressed on the 10k-item corpus with pg_trgm; full-text with…
…keep SEMANTIC_WEIGHT at 0.25 until the backfill finishes…
// search
Ask in your words, or the agent's
Search blends Postgres full-text with semantic similarity by reciprocal rank fusion, so a paraphrase surfaces a doc that shares no words with the query. Every hit says which side found it. No embedding provider, or a knowledge base that opts out, falls back to plain full-text automatically.
Reads sweep every knowledge base you belong to, each hit labeled with its source. Writes go to one. A personal knowledge base never widens to anyone; an org knowledge base follows the seats you already assign. What agent memory looks like here.
// the ground
The graph is what your agents learned. The repo is what the code says.
gitian renders both in one app, with the same Obsidian-flavored markdown. Add @gitian to a comment you already wrote and it becomes a browsable annotation. Drop a docs/ directory anywhere and files pair with their source by name.
Code annotations
Tag a comment with @gitian, or sub-tags like @gitian:todo and @gitian:deprecated. Existing @param and TODO comments are picked up too. The annotation reference.
docs/ pairing
docs/auth.ts.md documents auth.ts. A Docs tab beside the Source tab.
Wikilinks, callouts, Mermaid, KaTeX
Obsidian-flavored markdown, rendered from the repo. GitHub today; GitLab coming.
Directives, dashboard, PR analysis
Pull live annotations into markdown. A repo dashboard breaks them down; a PR comment reports what the diff did to them.
// begin
Two commands, then your browser.
The first tool call answers with a 401 that carries everything an OAuth-aware client needs. Consent happens in your browser; CI uses a gkb_ token, stored only as a hash. Every connection is listed and revocable under Connected agents. Transport and scopes.
claude plugin marketplace add GitianDocs/gitian-tools
claude plugin install gitian-kb@gitian-tools
# first tool call → 401 → browser consent → done