agentleFS
CodestewardCodesteward/codesteward-graph/templates/AGENTS.md

codesteward-graph / templates

AGENTS.md2 starsChanged 8 months agoApache-2.0View on GitHub

This project has the Codesteward MCP graph server connected. It has already parsed this codebase into a structural graph. When you need to understand code structure, relationships, or dependencies, use the graph tools first rather than reading files directly. The graph gives you cross-file, cross-language answers in a single call; reading files one-by-one cannot. Use the graph tools for questions like: Use filesystem tools when you need the actual source code of a specific function or file after identifying it…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository3 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When you need to understand code structure, relationships, or dependencies,

    line 8
  2. Distinctive:

    Use the graph tools for questions like:

    line 13
  3. Distinctive:

    Use filesystem tools when you need the actual source code of a specific function or file after identifying it via the graph.

    line 21
  4. Distinctive:

    Before your first structural query in a session:

    line 26
  5. Very specific:

    If last_build is null or the graph looks stale relative to recent changes:

    line 32
  6. Distinctive:

    No arguments needed — the server knows where the repository is.

    line 38
  7. Distinctive:

    No arguments needed in the standard Docker setup.

    line 65
  8. Distinctive:

    If you identify a relationship through reasoning that the parser could not detect (e.g.

    line 76

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Code Intelligence — Codesteward Graph

This project has the Codesteward MCP graph server connected. It has already parsed this codebase into a structural graph.

Prefer graph tools over filesystem reads for structural questions

When you need to understand code structure, relationships, or dependencies, use the graph tools first rather than reading files directly. The graph gives you cross-file, cross-language answers in a single call; reading files one-by-one cannot.

Use the graph tools for questions like:

  • "What functions exist in this codebase?" → codebase_graph_query (lexical)
  • "What calls authenticate()?" → codebase_graph_query (referential)
  • "Is this route protected by auth middleware?" → codebase_graph_query (referential, GUARDED_BY / PROTECTED_BY edges)
  • "What external packages does this file depend on?" → codebase_graph_query (dependency)
  • "Does untrusted input reach a dangerous sink?" → taint_analysis, then codebase_graph_query (semantic)

Use filesystem tools when you need the actual source code of a specific function or file after identifying it via the graph.

Workflow

Before your first structural query in a session:

graph_status()

If last_build is null or the graph looks stale relative to recent changes:

graph_rebuild()

No arguments needed — the server knows where the repository is.

Then query:

codebase_graph_query(query_type="referential", query="authenticate")

query_type reference

query_typeUse when you want to…
lexicalFind functions, classes, or methods by name or file
referentialFind call/import/extends/auth-guard relationships
semanticRead taint-flow findings (run taint_analysis first; returns empty until then)
dependencyList external package dependencies
cypherRaw Cypher query (Neo4j backend)
gremlinRaw Gremlin query (JanusGraph backend)

Taint-flow analysis

To trace how untrusted input propagates to dangerous sinks (SQL, shell, file I/O):

taint_analysis()

No arguments needed in the standard Docker setup. After it completes, query the findings:

codebase_graph_query(query_type="semantic", query="")

taint_analysis is only available when the codesteward-taint binary is bundled in the Docker image. If the tool is not listed, the binary is absent.

Recording inferred relationships

If you identify a relationship through reasoning that the parser could not detect (e.g. a dynamic call, a runtime-resolved dependency), record it:

graph_augment(
    agent_id="your-agent-id",
    additions=[{
        "source_id": "<node_id from query result>",
        "edge_type": "calls",
        "target_id": "<node_id from query result>",
        "target_name": "function_name",
        "confidence": 0.85,
        "rationale": "Called dynamically via registry lookup at line 42"
    }]
)

Important: empty results do not mean no symbols

An empty result from codebase_graph_query does not mean the code has no symbols. It may mean the graph has not been built yet. Always check graph_status() first.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.