Knowledge Graph
Wiki-links, embeddings, semantic search, and RAG for connecting everything in your workspace.
Wiki-Links
Trellis uses [[wiki-links]] to create bidirectional references across all workspace entities:
[[TRL-5]]— Link to an issue[[src/engine.ts]]— Link to a file[[src/engine.ts#createIssue]]— Link to a specific symbol[[decision:DEC-1]]— Link to a decision trace
import { parseFileRefs, resolveRef, RefIndex } from "trellis/links";
const refs = parseFileRefs("src/engine.ts", source);
const resolved = resolveRef(ref, context);
const index = new RefIndex();
index.indexFile("README.md", refs, context);
index.getIncoming("issue:TRL-5"); // All refs pointing to this issue
Embeddings & Semantic Search
Trellis can embed issues, milestones, files, code entities, and decisions into a vector store for intelligent discovery:
trellis ask "authentication code"
trellis ask "show me auth code" --rag
import { EmbeddingManager } from "trellis/ai";
const manager = new EmbeddingManager(engine, { dbPath: "embeddings.db" });
await manager.reindex();
const results = await manager.search("auth flow");
RAG Context
Generate context for LLMs from your codebase:
const context = await manager.getRAGContext("authentication implementation");
// Returns relevant code, issues, and decisions as structured context
Cross-Repository References
Link knowledge across repositories:
index.addCrossRepoLink("frontend", "proj:app", "backend", "api:users");