developer-farm AGENTS.md

A set of project instructions for a Python code-generation system built with LangGraph, a framework for connecting workflow steps. It defines the environment, data boundaries, state shape, and validation rules.

In plain words
What is it for?
Use it when modifying LangGraph workflows, state schemas, validation loops, checkpointing, or generated code.
Why use it?
It keeps planning, execution, verification, and optimization stages from receiving information they should not see.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/illyar80/developer-farm/agents-md
Clone the repo
git clone --depth 1 https://github.com/illyar80/developer-farm

Made for: Codex, OpenCode.

Per session 1,021 This file is loaded in full into every session.
When invoked 1,021 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01021 $0.01021
Opus 5 $0.00511 $0.00511
Sonnet 5 $0.00204 $0.00204
Haiku 4.5 $0.00102 $0.00102

Measured 3d ago against content hash b30124ee7b33, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

developer-farm AGENTS.md 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 3d 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.

AGENTS.md · 98 lines

How it starts

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

CONTEXT FOR LANGGRAPH CODE GENERATION

1. Environment

  • LangGraph version: 1.2.1 (CHECK with pip show langgraph before generating)
  • Python: 3.11
  • Pydantic: v2 (use from pydantic import BaseModel, NOT v1)
  • Checkpointer: SqliteSaver (local file, no Postgres)

2. Architecture Constraints (GOODHART-PROOF ISOLATION)

This system implements 4-layer isolation. NEVER violate these boundaries:

  • PLANNING nodes receive ONLY: user_spec, tech_spec, codebase_index
  • EXECUTION nodes receive ONLY: task_description, context_files, git_worktree_path ❌ NEVER pass: acceptance_criteria, test_files, verification_rubric
  • VERIFICATION nodes receive ONLY: SealedArtifact (git_diff + logs), rubric ❌ NEVER pass: worker_id, original_task_prompt, chat_history, planning_context
  • OPTIMIZATION nodes receive ONLY: aggregated verdicts, metrics summary ❌ NEVER pass: artifact contents, current graph state, raw logs

All state schemas MUST use TypedDict with explicit field lists. If a field is not in the TypedDict, it CANNOT be passed between nodes.

3. Required Patterns

  • Use StateGraph (not MessageGraph)
  • Use add_conditional_edges for validation loops (max 3 iterations)
  • Use interrupt() from langgraph.types for human-in-the-loop (NOT deprecated NodeInterrupt)
  • Use Send() API for parallel fan-out in execution wave
  • Always compile with checkpointer: graph.compile(checkpointer=checkpointer)
  • Stream via graph.astream_events(config, version="v2")

4. Working Example Reference

from typing import TypedDict, Annotated
from langgraph.graph import StateGraph, END
from langgraph.checkpoint.sqlite import SqliteSaver
from langgraph.types import interrupt, Send

class ExecutionInput(TypedDict):
    task_description: str
    context_files: list[str]
    worktree_path: str
    # ❌ NO acceptance_criteria, NO rubric

class SealedArtifact(TypedDict):
    git_diff: str
    logs: str
    # ❌ NO worker_id, NO task_description

async def code_worker(state: ExecutionInput) -> dict:
    # Call local vLLM or API here
    artifact = await generate_code(state)
    return {"sealed_artifact": artifact}

async def blind_verifier(state: dict) -> dict:
    artifact = state["sealed_artifact"]
    rubric = state["rubric"]
    # ❌ Cannot access state["task_description"] or state["worker_id"]
    verdict = await verify(artifact, rubric)
    return {"verdict": verdict}

# Conditional edge for retry loop
def should_retry(state: dict) -> str:
    if state["verdict"]["passed"] or state["iteration"] >= 3:
        return "approved"
    return "revise"

builder = StateGraph(dict)
builder.add_node("code_worker", code_worker)
builder.add_node("blind_verifier", blind_verifier)
builder.add_conditional_edges("blind_verifier", should_retry, {
    "approved": END,
    "revise": "code_worker"
})
checkpointer = SqliteSaver.from_conn_string("./checkpoints.db")
graph = builder.compile(checkpointer=checkpointer)

Read the full file on GitHub · 98 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. 3d ago First seen · 98 lines · 1,021 tokens per session scan A b30124ee7b33

Subscribe to this mod's changes

developer-farm AGENTS.md is an instructions file published in the GitHub repository illyar80/developer-farm (11 stars, last pushed 2mo ago), licensed MIT. It adds 1,021 tokens to every session, about $0.0051 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-30.