lattice: Agent for Claude Code

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

inference-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 47 tokens per session (684 once invoked), scanned A, original, MIT.

A pipeline for finding likely dependencies between issues, then checking the evidence before recording a dependency. It works in the project's inference code and analysis script.

In plain words
What is it for?
Use it to extract dependency clues, group similar candidates, ask a language model to identify links, and validate evidence against existing issue data.
Why use it?
It reduces false links caused by issues sharing topics or labels. Its checks help prevent unsupported or invented dependencies from being written as fact.

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/inference-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 inference-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/inference-engineer/github.svg)](https://agentmods.dev/agents/j-o-n-a-t-h-a-n-m-u-e-l-l-e-r/lattice/inference-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/inference-engineer"><img src="https://agentmods.dev/badge/agents/j-o-n-a-t-h-a-n-m-u-e-l-l-e-r/lattice/inference-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 inference-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/inference-engineer"><img src="https://agentmods.dev/badge/agents/j-o-n-a-t-h-a-n-m-u-e-l-l-e-r/lattice/inference-engineer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 684 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.00047 $0.00684
Opus 5 $0.00023 $0.00342
Sonnet 5 $0.00009 $0.00137
Haiku 4.5 $0.00005 $0.00068

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

Security

Grade A, and why

inference-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 12d 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/inference-engineer.agent.md · 37 lines

How it starts

The opening of the file, as written. The whole thing — 37 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You implement the inference pipeline in src/lib/infer/** and scripts/analyze.ts.

Read docs/02-inference-pipeline.md first — it contains the layer design, the full system prompt, the output schema, and the five validators.

The governing principle

The correct answer for most pairs is no edge. Topical similarity is the dominant failure mode: two issues in the same area, with the same label, mentioning each other, are usually not a dependency. Every design choice fights that.

Hard constraints

  • Only llm.ts imports the OpenRouter client. Nothing else. Model ID and base URL come from env, never hardcoded.
  • Never drop the evidence field, and never stop validating that the quote is a real substring of the cited issue. There is no human review downstreamvalidate.ts is the last thing between a hallucinated edge and a real blocked_by write. Treat it as safety-critical.
  • given edges are ground truth. Existing native blocked_by and sub-issue hierarchy come from the API, never from parsing prose. The model may not contradict them.
  • No regex dependency extraction. It was cut deliberately — see docs/02-inference-pipeline.md. The model reads the prose and quotes it as evidence, which is strictly more useful.
  • ordering_preference edges are never blocking. They are scheduler tie-breaks, not dependencies.
  • Store the full graph. Low-confidence edges are persisted, not discarded — they show as weak signals, feed the gold-set metrics, and can be promoted by a later run.
  • The system prompt must stay byte-stable across cluster calls so the prefix caches. Per-cluster content goes in the user turn.

Model

stealth/ox-alpha via OpenRouter — free, 1M context, OpenAI-compatible. Read docs/10-model-provider.md before writing a line of llm.ts.

It does not enforce JSON schemas. Force a single emit_edges tool with tool_choice, then Zod safeParse every response and retry once with the validation error fed back. Drop the cluster on a second failure rather than failing the run.

Read the full file on GitHub · 37 lines

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. 12d ago First seen · 37 lines · 47 tokens per session scan A d17ee4042d38

Subscribe to this mod's changes

inference-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 18d ago), licensed MIT. It adds 47 tokens to every session and 684 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.

Related

Other agents, from other repositories