Skip to main content

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

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.x 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yigraf-1.1.1.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yigraf-1.1.1-py3-none-any.whl (206.0 kB view details)

Uploaded Python 3

File details

Details for the file yigraf-1.1.1.tar.gz.

File metadata

  • Download URL: yigraf-1.1.1.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for yigraf-1.1.1.tar.gz
Algorithm Hash digest
SHA256 6f7240a358337dd106b62bd8d5f763d5947958a4bcf58aed3ade095cef88ed5d
MD5 4d44e0b29d116db3950e845ee0289e57
BLAKE2b-256 239bcd10a46488ac90b6cc76b6f4deb9a72e93f5187bdd5c9a13f708c628d2df

See more details on using hashes here.

Provenance

The following attestation bundles were made for yigraf-1.1.1.tar.gz:

Publisher: release.yml on mansilla/yigraf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file yigraf-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: yigraf-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 206.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for yigraf-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b529c470b6ded655b01d573fd92d6d42cc978ada81f956c2b7b1854bc2f2ffd
MD5 780e950aa493d1290db4027d5e17cfc1
BLAKE2b-256 ba5a9a4e9e37d413d5e4a7ac556d6d498655034186125e58b0bd72b45be5b2e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for yigraf-1.1.1-py3-none-any.whl:

Publisher: release.yml on mansilla/yigraf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page