What is a topic?
A topic is the atomic unit of context in Driftless. It connects a slice of your system to the team’s shared knowledge about it. The slice can be TypeScript, Python, Rust, Go, docs, config, infrastructure, or a workflow that spans repos. A topic has:
Topics are content-first: the markdown
content body IS the topic. The structured fields (gotcha / decision / invariant / check) are optional highlights layered on top. Add one only when you want that specific thing surfaced to a future agent’s brief. Use tags to label and group topics.
Create your first topic
Start with the smallest useful topic: a durable note that explains one area well enough for a future human or agent to work there.Anchoring topics to code
Topics are connected to code through glob patterns and file paths. This is language-agnostic: Driftless matches paths, not ASTs. When anchored code changes, the topic drifts.✓ pattern "src/auth/**" matches 12 files: healthy anchor⚠ over-broad anchor: pattern matches over 100 files; consider splitting✗ pattern "src/nonexistent/**" matches 0 files: blocked; fix the glob
Topic classification
A topic is content-first: the markdowncontent body IS the topic. Use tags to label and group topics. The only trust axis is status.
Status: governance lifecycle
A note becomes Knowledge once it’s merged in:draft → proposed → reviewed → archived. reviewed is Knowledge; the read response carries governance.authoritative. Agents propose; merging is an owner/admin act (an agent runs it only when explicitly asked). See Governance.
Visibility
A topic lives in the workspace and is visible to all its members. The exception is a private Note (a draft withis_private set), visible only to its creator until put up for review or un-marked. Need isolation between groups? Use a separate workspace.
Typed relations
Topics connect to each other through typed relations, building a semantic graph:Wiki-links
Use[[slug]] syntax inside any free-text field (what, how, decisions, gotchas, invariants, content). The API auto-parses these into forward and backward references.
billing-webhook and stripe-webhook-ingest will show each other in their references when fetched.
Cross-repo context
A topic can span multiple repositories. When you rundriftless context update <slug> from any repo, that repo is added to the topic’s where_repos list. Topics accumulate repos organically without manual wiring.
Use one cross-repo topic when the same concept truly spans repos, for example billing-contracts across an API repo, worker repo, and frontend repo. Use separate topics plus relations when each repo has its own implementation details, for example billing-api depends_on:billing-worker.
To explicitly link the current repo to a topic:
