git-lex

Git Extensions for Knowledge Graphs

Rob Kunkle

x/twitter: @lux
linkedin: linkedin.com/in/robkunkle

ASIMOV DevLabs — Circuit Launch, Mountain View
April 2, 2026

The Insight

We built repolex—a parser that turns codebases into RDF knowledge graphs, queryable with SPARQL.

But then we noticed something:

"Git repos aren't just code. They're documentation, config, research, decisions, contacts, tasks—all versioned. What if every git repo could be a knowledge graph?"

What is git-lex?

A Rust CLI that turns any git repo into a SPARQL-queryable knowledge graph.

Git repo git-lex RDF triples SPARQL queries

Not just code repos. Any repo with markdown, YAML frontmatter, @mentions, [[wikilinks]].

Everything Becomes Triples

Git History

Commits, authors, timestamps, parent relationships—all as RDF.

?commit git:author "Rob"

File Tree

Directory structure, blob hashes, file paths at any ref.

?blob git:path "src/main.rs"

Frontmatter

YAML frontmatter from markdown files—structured data, extracted automatically.

?doc fm:solo.type "Task"

Relationships

@mentions and [[wikilinks]] extracted from document bodies and commit messages.

?doc lex:mentions ?agent

The Virtual Graph

git-lex doesn't copy your data into a separate database. It reads git directly.

Git objects → RDF

# Commits become triples
git lex log

# File tree becomes triples
git lex tree

# Refs become triples
git lex refs

Content → RDF

# Frontmatter extraction
git lex extract

# Sync everything into the store
git lex sync

# Query it all
git lex query "SELECT ..."

Virtual triples from git + extracted triples from content = one unified graph.

Kit System

Kits define document types, properties, and ontologies for different use cases.

solo

Personal knowledge management. Memory, Research, Contact, Note, Decision, Task.

squad

Multi-agent team coordination. Agent cards, Projects, Messages, Decisions.

Each kit ships with:

  • OWL ontology — defines the classes and properties
  • SHACL shapes — validates documents at commit time
  • Document templatesgit lex create <type>

The Ontology Stack

Kit Ontology (solo.ttl / squad.ttl) Upper Ontology (lex-o.ttl) Tool Ontology (lex.ttl) Git (git.ttl) Frontmatter (fm.ttl)

Layered ontologies. Each level builds on the one below. Kit authors extend without touching core.

Identity: Git as PKI

Every git-lex repo has a cryptographic identity—its first commit SHA.

# .lex/identity.yml
identity: e3d71e7f0e022e54d3cdfb3100862f21f10913ad
created: 2026-04-01T07:32:44Z
kit: solo

Agents join squads by exchanging tickets—mutual identity bindings verified by commit hash.

# .lex/tickets/7r1pl3f0rc3.ticket
squad_name: 7R1PL3F0RC3
squad_identity: 92d5c57d40b0e1443897f07ed17c4baf773de887
agent_name: W3BL0RD
agent_identity: e3d71e7f0e022e54d3cdfb3100862f21f10913ad
joined: 2026-04-01T07:32:55Z

No external PKI needed. Git's content-addressing gives us immutable, verifiable identity for free.

SHACL: Schemas That Enforce

SHACL shapes validate your documents at commit time via a pre-commit hook.

The Shape

solo:TaskShape a sh:NodeShape ;
  sh:targetClass solo:Task ;
  sh:property [
    sh:path solo:taskStatus ;
    sh:in ("todo" "in-progress"
           "done" "blocked") ;
  ] .

The Enforcement

$ git commit -m "add broken task"

SHACL validation failed:
  task/foo.md
    solo:taskStatus must be one of:
    todo, in-progress, done, blocked

Commit rejected.

Built on rudof. Your ontology isn't just documentation—it's enforced at the gate.

Extraction: @mentions and [[wikilinks]]

Write naturally. git-lex extracts the relationships.

Your Document

---
title: "Ship the demo"
solo:
  type: Task
  taskStatus: in-progress
---

Need to coordinate with @spaceGOAT
on the [[parser pipeline]].

Also cc @TR1P.L3X for ontology review.

Extracted Triples

<task/ship-demo>
  a solo:Task ;
  fm:title "Ship the demo" ;
  solo:taskStatus "in-progress" ;
  lex:mentions <agent/spaceGOAT> ;
  lex:mentions <agent/TR1P.L3X> ;
  lex:linksTo <parser-pipeline> .

Sync and Query

$ git lex sync
Synced in 107.7ms:
  Virtual: 715 git + 148 frontmatter
  Sync /sync/f1066a92/: +109 assertions, -0 retracted (654 quads)
  Total sync graphs: 1
Store: .lex/oxigraph
$ git lex query "SELECT ?name ?type WHERE {
    GRAPH ?g { ?doc fm:solo.type ?type ; fm:title ?name }
  } ORDER BY ?type"
name                          | type
------------------------------|----------
"TripleForce Team Roster"     | Memory
"repolex-www stack"           | Memory
"Nia (trynia.ai)"             | Research
"TR1P.L3X"                    | Contact
"spaceG.O.A.T."               | Contact

Provenance: RDF 1.2 Triple Terms

Every extracted triple carries its provenance—which file, which blob hash, which extractor produced it.

# The assertion
<doc/task-1> solo:taskStatus "in-progress" .

# The provenance (RDF 1.2 triple term annotation)
<< <doc/task-1> solo:taskStatus "in-progress" >>
    lex:filePath "task/ship-demo.md" ;
    lex:blobHash "a1f8e2..." ;
    lex:extractor "frontmatter" .

Append-only sync graphs with retraction tracking. You can trace any fact back to its source.

TripleForce: A Squad of Agents

git-lex isn't just a tool. It's how we run our team.

1UX

Human founder. Carbon-based. Caffeinated.

W4R3Z

git-lex builder. Rust + oxigraph engine.

TR1P.L3X

Ontology architect. OWL/RDFS/SHACL.

?M4RQ

SPARQL specialist. Graph truth-teller.

spaceG.O.A.T.

Core parser engineer. TreeSitter → RDF.

M3RCUR14L

MCP expert. Protocol bridge builder.

LSPy

Language server polyglot. 13+ languages.

W3BL0RD

Webmaster. Makes knowledge beautiful.

7 Claude agents + 1 human. Each has an identity repo. The squad repo is their shared knowledge graph.

Agent Architecture

Squad Repo 7R1PL3F0RC3/7R1PL3F0RC3 W4R3Z TR1P.L3X ?M4RQ spaceG.O.A.T. M3RCUR14L LSPy W3BL0RD 1UX (human)

Each agent has a solo repo (personal knowledge graph) linked to the squad repo (shared knowledge graph) via identity tickets.

Demo

Let's see it live.

What's Next

Shipped

Rust CLI • Virtual git triples • Frontmatter extraction • @mention / [[wikilink]] extraction • SHACL validation at commit • Sync graphs with provenance • Identity + squad join • Solo + Squad kits • oxigraph SPARQL store

In Progress

MCP server (git-lex-mcp) • LLM extraction • Semantic diff/merge drivers • Claude Code hooks for inbound context

The Vision

Git is the world's most popular version control system. What if every git repo was also a knowledge graph?

Not a separate database. Not a SaaS platform. Just git—with knowledge graph superpowers baked in.

Agents that can query instead of grep. Documents that validate against schemas. Identity that's cryptographic and built on git's own primitives.

Git for data. Git for knowledge. Git for agents.

repolex.ai

github.com/repolex-ai/git-lex

Rob Kunkle

x/twitter: @lux
linkedin: linkedin.com/in/robkunkle
rob.kunkle@gmail.com

RDF 1.2 SPARQL SHACL OWL Rust