A harness primitive for AI coding agents: one connected graph over code, intent, plan, and memory — legible (token-cheap retrieval) and enforceable (intent↔code drift checks).
Project description
yigraf
"Why I Graph?" — the memory your coding agent doesn't have.
yigraf gives your AI coding agent a memory that survives /clear: one connected graph over your
code, what it's for, what's left to do, and why it ended up this way — and it hands the agent
exactly the right slice of that, right when it's working.
It's a tool for the agent, not another dashboard for you. You're the principal: you set the direction and answer the occasional judgment call. The agent does the work — and now it does it without forgetting.
Why
Your agent is brilliant and amnesiac. Every /clear wipes what it knew. And the code itself never
told the whole story: it records what runs, never why it's shaped that way, what it's supposed
to guarantee, or what you were halfway through changing. So every session your agent relearns the
repo from scratch, re-reads files it already understood, and re-litigates decisions you settled weeks
ago — sometimes undoing them.
yigraf keeps that missing context as a living graph next to your code, and feeds the relevant piece back to the agent at the moment it acts. The agent stops starting over.
What yigraf gives your agent
Four questions an agent can't answer from source alone — and loses on every reset:
| The question | yigraf calls it | What it holds |
|---|---|---|
| What is this? | structure |
your code — files, symbols, calls (parsed, 16 languages) |
| What is it for? | intent |
the specs and guarantees the code must uphold |
| What am I doing? | plan |
goals and tasks, and which code implements them |
| Why is it this way? | memory |
the decisions, the reasoning, the roads not taken |
The magic is in the links between them. A task points at the symbols that implement it. A decision is pinned to the code it concerns. A spec governs a region of the repo. So when your agent asks "what governs this file?", yigraf can answer — and when code drifts away from the thing that was supposed to hold, yigraf notices and says so.
Get started — just tell your agent
yigraf is a tool for agents, so setting it up is a job for your agent. In any repo, say:
"Install github.com/mansilla/yigraf and wire it into this project."
A capable agent installs the CLI, indexes your code, and connects yigraf to your host — Claude Code,
Codex, Cursor, and friends are auto-detected; anything else gets the universal MCP server. It won't
touch your requirements.txt (yigraf is a dev tool, not a runtime dependency).
Rather do it yourself? Three lines:
pipx install yigraf # isolated CLI (or: pip install yigraf / uv tool install yigraf)
yigraf init && yigraf build # create the workspace + index your code
yigraf install # wire your agent host (auto-detects; falls back to MCP)
Full install options (per-OS, from source, MCP config, semantic-recall tuning) live in the guide.
Using it — just talk to your agent
You don't run yigraf; you tell your agent to. It listens on your repo and speaks up at the right moments — but you can always prompt it directly:
- Starting something? "Before you change the auth flow, ask yigraf what governs it." Your agent pulls the intent, the plan, and the past decisions that touch that code — so it works with the grain instead of relearning from scratch.
- Saw a drift warning? "Check what yigraf's drifts are about." Each one means code moved away from something that was supposed to hold. Your agent walks them and either confirms it still holds or flags what changed.
- yigraf flagged a conflict? "Let's go through the conflicts one by one." Two live beliefs disagree about the same code. You decide which wins — yigraf never silently picks.
- Made a real decision? "Remember why we did this, and what we ruled out." It's saved as a memory and resurfaces the next time someone touches that code.
- Coming back to a project? "Ask yigraf what's in flight." The active plan and open tasks come back, so a thread dropped last week picks up where it left off.
That's the whole loop. Your agent handles the mechanics (context,
link, drift,
remember); you stay in plain language. The deeper mechanics — how drift is
detected, how conflicts resolve, how a memory earns trust — are in the guide.
Works with your host
yigraf reaches your agent two ways: pull (the agent asks yigraf for context over MCP — works everywhere) and push (yigraf injects the governing slice the moment the agent edits a file — where the host has the hooks for it). You always get pull; you get push at the best fidelity your host allows.
| Host | Pull | Push | Wire it |
|---|---|---|---|
| Claude Code, Codex | ✓ | edit-time hooks | yigraf install |
| Cursor, Windsurf, Kilo, Antigravity | ✓ | always-on rule | yigraf install |
| any other MCP host | ✓ | — | point it at yigraf mcp |
Details and the full per-host matrix: docs/hosts.md.
Learn more
- Guide — install in depth, the full workflow, and how drift, conflicts, and memory maturity actually work.
- Hosts · MCP setup · Statusline — wiring yigraf into your tools.
- Language support — the tested capability matrix across 16 languages.
Status
yigraf 1.0 is local — everything runs self-contained inside a single repo/folder, no network, no account. Multi-user, hosted, real-time collaboration is the 2.0 roadmap. MIT licensed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yigraf-1.0.0.tar.gz.
File metadata
- Download URL: yigraf-1.0.0.tar.gz
- Upload date:
- Size: 660.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
533952c25ba87d030f454a63fe840afa1eafc23bb8ba133fe86d3438ffcf14af
|
|
| MD5 |
5441d6f5cef718b84036feae6fae5e5b
|
|
| BLAKE2b-256 |
6814f6641607cb667cf66cc670368bd285f9b7e1519ef235d8b738586d74efa5
|
Provenance
The following attestation bundles were made for yigraf-1.0.0.tar.gz:
Publisher:
release.yml on mansilla/yigraf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yigraf-1.0.0.tar.gz -
Subject digest:
533952c25ba87d030f454a63fe840afa1eafc23bb8ba133fe86d3438ffcf14af - Sigstore transparency entry: 2186224026
- Sigstore integration time:
-
Permalink:
mansilla/yigraf@16695d0f9a328e0ca4ca97bb8a5e4bc7b49af16e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/mansilla
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16695d0f9a328e0ca4ca97bb8a5e4bc7b49af16e -
Trigger Event:
release
-
Statement type:
File details
Details for the file yigraf-1.0.0-py3-none-any.whl.
File metadata
- Download URL: yigraf-1.0.0-py3-none-any.whl
- Upload date:
- Size: 197.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
992aaacf319d8e490ad49c52e957bee25403d5ad91bad988d423699a04f54d75
|
|
| MD5 |
463441d1d8b368adf0c64a3a8fb909aa
|
|
| BLAKE2b-256 |
11cf30be405a7c1d3611bae50b8a3783b5f1e3270fe2b6d628f056617d4b21a3
|
Provenance
The following attestation bundles were made for yigraf-1.0.0-py3-none-any.whl:
Publisher:
release.yml on mansilla/yigraf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yigraf-1.0.0-py3-none-any.whl -
Subject digest:
992aaacf319d8e490ad49c52e957bee25403d5ad91bad988d423699a04f54d75 - Sigstore transparency entry: 2186224141
- Sigstore integration time:
-
Permalink:
mansilla/yigraf@16695d0f9a328e0ca4ca97bb8a5e4bc7b49af16e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/mansilla
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16695d0f9a328e0ca4ca97bb8a5e4bc7b49af16e -
Trigger Event:
release
-
Statement type: