Specs that fail the build when the code drifts.

Typed Graph ties your design docs to the code that implements them, checks the links in CI, and gives developers, architects, product people and agents one vocabulary.

See it work

Real tg output on an example checkout API with requirements, @tg: annotations and an OpenSpec change folder. A query finds the requirement with no implementation; one typed comment closes it; a typo fails the check.

Point code at the decision

A comment says which design section a function implements, and how.

// @lat: [[auth#Token expiry]]
export function verifyToken(t: string) {}

// @tg: implements:: [[auth#Token expiry]] {since: 2}
// @tg: -contradicts:: [[design#Stateless sessions]]
function legacyCheck() {}

Ask what the graph knows

Sections and code symbols are nodes in one graph.

tg cypher "MATCH (c:CodeSymbol)-[:implements]->(s:Section)
           RETURN s.title, count(c) AS functions
           ORDER BY functions DESC"

Which sections have no implementation, which have many, which docs nothing links to.

A gate your CI and your agents both use

tg check validates links, symbols, section rules, index files and test-spec coverage, with the same verdicts as lat.md. It exits non-zero on findings.

- run: npm install -g @typedgraph/cli
- run: tg check
✓

Docs that cannot rot quietly

Broken links, missing symbols and untested spec sections fail the build, not a review a month later.

⚙

The same gate for agents

A stop hook blocks an agent from finishing while tg check fails. Agents guide.

◆

One vocabulary

tg init installs a small code ontology, so people and agents use the same edge names. By role.

⇄

Plain files in git

No server or database. Reviews, blame and history work as they do for code.