agentleFS
aishwaryajayanth1820-gitaishwaryajayanth1820-git/code_graph_agentic_observable_coding/AGENTS.md

code_graph_agentic_observable_coding

AGENTS.md1 starsChanged 32 days agoApache-2.0View on GitHub

Guidance for AI coding agents working on this repository. People should start with README.md.

  • Installs packages
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,774 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 repository4 other files it gives its agents.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Keep adapters thin: new behaviour goes into GraphService, rules into rules.py, measurements into analytics.py.

    line 27
  2. Very specific:

    Add a test for every behaviour change.

    line 30
  3. Distinctive:

    Keep examples generic. The sample project is a notification platform.

    line 32
  4. Very specific:

    Read .claude/skills/code-graph/SKILL.md.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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

AGENTS.md

Guidance for AI coding agents working on this repository. People should start with README.md.

What this is

A C4 code graph tool (code_graph_tool/) and an agent layer (.claude/: agents, skills, playbooks) that lets coding agents plan, build and review software against a shared ledger. The graph records C4 nodes, function contracts (CALLS edges), tasks, ADRs, a utility registry and EVAL verdicts, and its policies block unapproved changes.

Setup and checks

cd code_graph_tool
pip install -r requirements.txt     # Python 3.10+
python -m pytest -q                 # must pass
python examples/demo.py             # must finish with "check: clean"
python cg.py --db examples/demo.db serve --port 8770   # UI at http://127.0.0.1:8770/ui/

Code map

  • codegraph/domain.py: vocabulary (node types, layers, lifecycle, errors). Extend types here.
  • codegraph/service.py: every use case. The CLI, HTTP API and UI all go through GraphService.
  • codegraph/rules.py: validation and governance policies (small Policy classes).
  • codegraph/analytics.py: impact, metrics, checks G01–G13, EVAL adherence. Deterministic, no I/O.
  • codegraph/repository.py: SQL only. codegraph/db.py: schema (SQLite, WAL).
  • codegraph/cli.py, codegraph/api.py: thin adapters. ui/: static JS, no build step, vendored Cytoscape.js.
  • tests/test_codegraph.py: the pytest suite. examples/: generic sample seed and demo.

Rules

  • Keep adapters thin: new behaviour goes into GraphService, rules into rules.py, measurements into analytics.py.
  • The CLI uses only the standard library. Output is JSON on stdout; errors are JSON on stderr with exit codes 1 (unexpected), 2 (invalid input or not found) and 3 (policy violation).
  • fan_in/fan_out are derived from CALLS edges and never stored.
  • Add a test for every behaviour change; keep the demo ending with a clean cg check.
  • Agent definitions and SKILL.md files stay short (about 20–40 lines); detail goes in .claude/playbooks/ and reference/ files.
  • Keep examples generic. The sample project is a notification platform.
  • Bundled libraries in ui/vendor/ are third-party; don't edit them (see THIRD_PARTY_NOTICES.md).

Using the graph as an agent on another project

Read .claude/skills/code-graph/SKILL.md. Coders follow .claude/playbooks/coder.md; reviewers follow .claude/playbooks/reviewer.md. Treat exit code 3 as a stop: propose an ADR and escalate, never work around it.

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.