agentleFS
zaebeezaebee/codegraph-brain/ui/AGENTS.md

codegraph-brain / ui

AGENTS.md2 starsChanged 11 days agoMITView on GitHub

Interactive call-graph visualizer for Python codebases (src/cgis/). Vite + React 19 + @xyflow/react v12.

  • 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 32,671 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

1 rule. About 0 are common, 1 is distinctive, and 0 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.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Search dims nodes via opacity — triggers ResizeObserver loop error (benign, ignore it).

    line 37

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

Graph Debugger

Interactive call-graph visualizer for Python codebases (src/cgis/). Vite + React 19 + @xyflow/react v12.

Quick commands

bun run dev        # dev server (localhost:3000)
bun run test       # vitest watch mode
bun run test:run   # single run
bun run build      # production build
bun run analyze    # build + bundle visualization (opens dist/stats.html)

Architecture

FilePurpose
src/App.jsxMain component: state, UI panels, export, search, flow view
src/layout.jsDagre TB layout + greedy vertical group overlap resolution
src/grouping.jsFile-path based grouping via groupId metadata
src/flow.jsBidirectional DFS execution flow (direction: "outgoing"/"incoming"/"both")
src/GroupNode.jsxCustom ReactFlow group node (visual container only)
src/graph.json68 nodes, 297 edges — the input data

Key design decisions

  • No ReactFlow parentNode: Groups use metadata-only groupId. ReactFlow v12 parent-child fights dagre layout.
  • CLASS nodes excluded from dagre: Positioned at group center after layout to avoid bounding-box distortion.
  • Groups are visual containers: Positioned from children bounding boxes; children keep absolute dagre positions.
  • layoutGraph for both views: Full graph AND flow view go through dagre layout.
  • addExternalNodes cached in ref: Computed once on first render, not per click.

Gotchas

  • html-to-image at ^1.11.13 — verified compatible with export tests.
  • Search dims nodes via opacity — triggers ResizeObserver loop error (benign, ignore it).
  • extractClass(n) returns n.file_path — used as class prop for grouping, not class-based grouping.
  • Export targets .react-flow__viewport, filters out minimap/controls by class name.
  • bun test (Bun native) vs bun run test (vitest): Canonical runner is vitest (bun run test:run). bun test lacks vi global and vi.mock() hoisting — component tests (*.test.tsx) and any file using vi.mock silently fail under Bun native. Pure-logic tests (utils, layout, grouping) work fine. See src/setup-bun.ts for happy-dom DOM setup.

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.