lattice: Agent for Claude Code

.github/agents/graph-engineer.agent.md

graph-engineer is an agent for Claude Code from J-o-n-a-t-h-a-n-M-u-e-l-l-e-r/lattice. It costs 35 tokens per session (402 once invoked), scanned A, original, MIT.

A code agent for graph algorithms and scheduling in Lattice's graph modules. It works with graphs, including directed acyclic graphs (DAGs), where edges describe relationships between items.

In plain words
What is it for?
Use it to find strongly connected components, break cycles, order dependent work, calculate critical paths, measure blast radius, and write unit tests for graph cases.
Why use it?
It keeps graph code isolated from files, networks, environment settings, and AI services, while preserving information about edges removed to break cycles.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

This is J-o-n-a-t-h-a-n-M-u-e-l-l-e-r/lattice's own configuration. It tells Claude Code how to work on lattice itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything lattice configures →

Reuse

Borrowing it

Nothing to install: this file belongs to J-o-n-a-t-h-a-n-M-u-e-l-l-e-r/lattice. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/J-o-n-a-t-h-a-n-M-u-e-l-l-e-r/lattice/main/.github/agents/graph-engineer.agent.md
Clone the repo
git clone --depth 1 https://github.com/J-o-n-a-t-h-a-n-M-u-e-l-l-e-r/lattice

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for graph-engineer

README.md
[![agentmods](https://agentmods.dev/badge/agents/j-o-n-a-t-h-a-n-m-u-e-l-l-e-r/lattice/graph-engineer/github.svg)](https://agentmods.dev/agents/j-o-n-a-t-h-a-n-m-u-e-l-l-e-r/lattice/graph-engineer)
Your own site
<a href="https://agentmods.dev/agents/j-o-n-a-t-h-a-n-m-u-e-l-l-e-r/lattice/graph-engineer"><img src="https://agentmods.dev/badge/agents/j-o-n-a-t-h-a-n-m-u-e-l-l-e-r/lattice/graph-engineer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for graph-engineer

Your own site · 80×15
<a href="https://agentmods.dev/agents/j-o-n-a-t-h-a-n-m-u-e-l-l-e-r/lattice/graph-engineer"><img src="https://agentmods.dev/badge/agents/j-o-n-a-t-h-a-n-m-u-e-l-l-e-r/lattice/graph-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 402 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.00402
Opus 5 $0.00017 $0.00201
Sonnet 5 $0.00007 $0.00080
Haiku 4.5 $0.00003 $0.00040

Measured 11d ago against content hash 986e4c08a755, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

graph-engineer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/agents/graph-engineer.agent.md · 27 lines

What it actually says

You implement the graph and scheduling core of Lattice, in apps/backend/src/graph/**.

Read docs/03-graph-scheduling.md before writing anything. It contains the algorithms, the weighting scheme for cycle breaking, and the required tests.

Hard constraints

  • These modules are pure. No I/O, no network, no process.env, no Octokit, no LLM client. If you find yourself needing any of those, the design has drifted — say so on the issue instead of importing them.
  • The DAG invariant in makeAcyclic() must throw if the graph is still cyclic after feedback-arc-set removal. Never weaken that assertion to make a test pass. Everything downstream is undefined on a cyclic graph.
  • Removed edges are never silently dropped. Every cycle break produces a CycleBreak record with the actual cycle path, the chosen victim, and up to three alternatives, so a human can pick differently.

Style

Prefer a small named function over a clever one-liner. These algorithms get explained out loud to judges, so the code should read like the explanation.

Testing

Real unit tests against hand-built fixtures — a known DAG, a planted cycle, a diamond, an all-given cycle. These are cheap and they are the ones that matter.

npm test at the root also emits artifacts/graph.json from your serialiser. Treat that file as a review artifact: if a change to the weights shifts the critical path, it should show up as a readable diff.

One thing you deliberately do not compute: any file-overlap or conflict-risk score. Wave 0 is already the exact parallel-safe set — see the tombstone on that issue.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 27 lines · 35 tokens per session scan A 986e4c08a755

Subscribe to this mod's changes

graph-engineer is an agent published in the GitHub repository J-o-n-a-t-h-a-n-M-u-e-l-l-e-r/lattice (0 stars, last pushed 17d ago), licensed MIT. It adds 35 tokens to every session and 402 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.