agentleFS
DarkWorldCoderDarkWorldCoder/arguseye/AGENTS.md

arguseye

AGENTS.md7 starsChanged 32 days agoMITView on GitHub

Arguseye is eyes for coding agents: it renders a real component or page from the user's project, looking exactly as it does in their app, with no dev server and no stories. The VS Code panel is the human view of the same engine. Before adding or cutting a feature, read docs/product.md (who it's for, what makes it different, what agents need back). Seams (the only places tests go): - Preview server HTTP: createPreviewServer (test/unit/): what URLs return. - Update…

  • 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 35,337 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 repository7 other files it gives its agents.

The file

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

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write one failing test at an agreed seam.

    line 6
  2. Distinctive:

    Write the least code that turns it green.

    line 7
  3. Very specific:

    Prefer native (Rust/Zig/Go) tools: oxc-* for parse/transform/resolve, Rolldown for bundling, Lightning CSS for CSS.

    line 23
  4. Very specific:

    All import resolution goes through createResolver() (src/server/resolver.ts), the single resolver config.

    line 29
  5. Very specific:

    Every render returns errors: string[] with stacks and file paths.

    line 39
  6. Very specific:

    Use the repo's git identity (already set in .git/config).

    line 43

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

Arguseye: rules for every agent working here

Arguseye is eyes for coding agents: it renders a real component or page from the user's project, looking exactly as it does in their app, with no dev server and no stories. The VS Code panel is the human view of the same engine. Before adding or cutting a feature, read docs/product.md (who it's for, what makes it different, what agents need back).

Workflow: red → green, one slice per commit

  1. Write one failing test at an agreed seam. Watch it go red for the right reason.
  2. Write the least code that turns it green.
  3. npm test and npm run typecheck both green, then commit the slice.

Seams (the only places tests go):

  • Preview server HTTP: createPreviewServer (test/unit/): what URLs return.
  • Update events + timing: buffer edits → update messages, inside the speed budget.
  • Headless render: createRenderer (test/browser/): render, listUsages; what an agent gets back.
  • VS Code integration: command → panel reports mounted; keep to one or two tests.

A test for anything else (a private helper, an internal class) is a new seam: agree it with the human first. Expected values come from the fixture or a literal you worked out by hand. Fixtures in test/fixtures/<name>/ are tiny real apps with their packages actually installed.

Speed is the product

  • Warm render ≤ 100 ms (enforced by a test); keystroke → pixels target is 50 ms.
  • App files go through oxc-transform one module at a time. npm packages are pre-bundled once by Rolldown (DepBundler) and served from memory. A change only ever re-transforms the edited file.
  • Browser, page and server stay warm: a new target is swapped in with __CP__.show(target), not a navigation.
  • Any change that adds work to the per-render or per-keystroke path ships with a timing assertion.
  • Prefer native (Rust/Zig/Go) tools: oxc-* for parse/transform/resolve, Rolldown for bundling, Lightning CSS for CSS.

Fidelity: the user's real code, the user's real packages

  • Render the user's actual files with their own react/vue/Tailwind from their node_modules. Only our runtime packages (e.g. react-refresh) resolve from this extension (OWN in depBundler.ts).
  • Stub only framework pieces that cannot run outside the app (next/navigation, next/image…); shims live in shims/, one file per module, matching the real module's exports.
  • Chromium (Blink) is the rendering engine, so pixels match the user's browser.
  • All import resolution goes through createResolver() (src/server/resolver.ts), the single resolver config.

Code shape

  • src/server/: preview HTTP server, module graph, dependency bundler, page runtime. src/agent/: headless renderer, MCP server, CLI. src/usages/: static analysis of the user's code. src/extension/: VS Code.
  • One concept per file, named after its main export in camelCase (createRenderer.ts, findUsages.ts). Public API = a createX factory returning a plain object of type X; classes are for internal stateful pieces (ModuleGraph, DepBundler).
  • ESM with .js suffixes on relative imports (NodeNext).
  • Code that runs in the preview page lives as template strings in src/server/page.ts and reaches the browser untranspiled: write plain modern JS there.
  • Each export gets a one-line doc comment saying why it exists; other comments explain a non-obvious why.

What agents get back

  • Every render returns errors: string[] with stacks and file paths. Render failures land there, so the agent can read them and fix the code. Invalid input (an unknown usage id, missing export) throws an Error naming the exact value.
  • Output is token-cheap: PNG cropped to the component, snapshot from the accessibility tree, ids an agent can pass back verbatim (app/page.tsx:9).

Commits

  • Use the repo's git identity (already set in .git/config). The message is one line saying what the slice gives the user. The commit carries only the author: no co-author or generated-by trailers.

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.