agentleFS
pixvantapixvanta/agent-visibility-template/AGENTS.md

agent-visibility-template

AGENTS.md0 starsChanged 5 months agoMITView on GitHub

Notes for AI agents working on this template. One enriched content store (Resource[]) projected onto many agent-discovery surfaces. The data is enriched once by Workers AI and cached in KV; every surface (/llms.txt, /index.json, /<slug>.md, /robots.txt, JSON-LD) is just a different rendering of that same store. - surfaces.ts is pure. Render functions take RenderCtx and return strings/objects. No I/O. This keeps surfaces easy to test and add to. - Enrichment must never hard-fail. enrichResource falls back to fallbackEnrichment on any…

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. cloudflare/templates★ 2.1k100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • 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.

The file

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

5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    Add a pure renderer to src/enrichment/surfaces.ts.

    line 39
  2. Very specific:

    Add a route in src/worker/index.ts (send the Content-Signal header for text/JSON surfaces.

    line 40
  3. Very specific:

    Add it to the /api/site surfaces list so the UI shows it.

    line 42
  4. Very specific:

    Add a test in test/index.test.ts.

    line 43
  5. Very specific:

    After editing wrangler.jsonc, rerun npx wrangler types.

    line 52

≈ “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

AGENTS.md — Agent Visibility Template

Notes for AI agents working on this template.

What this template is

One enriched content store (Resource[]) projected onto many agent-discovery surfaces. The data is enriched once by Workers AI and cached in KV; every surface (/llms.txt, /index.json, /<slug>.md, /robots.txt, JSON-LD) is just a different rendering of that same store.

Architecture

src/
  worker/index.ts        Hono app: routes for every surface + JSON API
  enrichment/index.ts    Workers AI enrichment (raw page -> structured Resource)
  enrichment/surfaces.ts Pure render functions, one per surface
  lib/store.ts           KV-backed enriched store (get / upsert / clear)
  lib/content.ts         Sample content (zero-config demo data)
  lib/types.ts           Shared types (Resource, RawResource, Env, SiteConfig)
  lib/web-bot-auth.ts    OPTIONAL agent-identity module (off by default)
  react-app/             Surface-explorer UI
test/index.test.ts       Worker tests (vitest-pool-workers, via SELF.fetch)

Conventions

  • surfaces.ts is pure. Render functions take RenderCtx and return strings/objects. No I/O. This keeps surfaces easy to test and add to.
  • Enrichment must never hard-fail. enrichResource falls back to fallbackEnrichment on any model/parse error so surfaces always render.
  • Keep readability and identity separate. Web Bot Auth is about who an agent is, not what it can read. It lives in its own module and is gated by ENABLE_WEB_BOT_AUTH. Don't wire it into the core surfaces.

Adding a surface

  1. Add a pure renderer to src/enrichment/surfaces.ts.
  2. Add a route in src/worker/index.ts (send the Content-Signal header for text/JSON surfaces; add cors() if agents fetch it cross-origin).
  3. Add it to the /api/site surfaces list so the UI shows it.
  4. Add a test in test/index.test.ts.

Validating changes

npm run build   # tsc -b && vite build
npm test        # vitest (hits live Workers AI — needs credentials)

After editing wrangler.jsonc, rerun npx wrangler types.

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.