agentleFS
CloudflareKnown publishercloudflare/workerd/src/per_isolate/url/AGENTS.md

workerd / url

AGENTS.md9.2k starsChanged 8 months agoApache-2.0View on GitHub

URL and URLSearchParams in TypeScript, installed by main.ts under the TS_URL autogate in place of both C++ implementations (api/url-standard.h and api/url.h), which global-scope.h then leaves out. Parent directory conventions apply; see src/per_isolate/AGENTS.md. The graph is acyclic: url requires backend, one backend, runtime-class and serialization; the backends require only backend, urlencoded and internal-array. src/tests/url/AGENTS.md describes the behavior and keeps the ledger of every departure from the C++, toward WHATWG URL and WebIDL. Its suite runs against both implementations; change the code…

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 3 mentionsFeb 2026: 0 mentionsMar 2026: 2 mentionsApr 2026: 3 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 4 mentionsSep 2026: 4 mentionsOct 2026: 4 mentionsNov 2026: 3 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the cloudflare/workerd repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about cloudflare/workerd

The biggest 5 of 39 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 39

Talked about on GitHub, Bluesky, Hacker News and Stack Overflow (39 times).

On GitHub · 32

27 more on GitHub

On Hacker News · 2

On Stack Overflow · 1

The file

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

2 rules. About 0 are common, 0 are distinctive, and 2 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.

  • 2

    Very specific

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

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

    A URL's store is its query: Every ListStore mutation reserializes the URL's query, even one that changes nothing.

    line 45
  2. Very specific:

    Every instance, iterators included, is markUncloneable().

    line 51

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

src/per_isolate/url/

URL and URLSearchParams in TypeScript, installed by main.ts under the TS_URL autogate in place of both C++ implementations (api/url-standard.h and api/url.h), which global-scope.h then leaves out. Parent directory conventions apply; see src/per_isolate/AGENTS.md.

MODULES

ModuleRole
backend.tsThe facade-backend contract (UrlBackend, SearchParamsStore); exports the attribute numbers
url.tsThe facade: both classes, the iterator, every WebIDL conversion, the shape; picks the backend
ada-backend.tsurl_standard: href plus ada's offsets, sliced by the getters; ListStore
kj-backend.tsurl_original: adapts the native LegacyUrlHandle (api/url.h)
urlencoded.tsapplication/x-www-form-urlencoded parsing and serializing, for ListStore
internal-array.tsNull-prototype arrays for internal lists
cpp_exports.tsThe functions the C++ bridge calls

The graph is acyclic: url requires backend, one backend, runtime-class and serialization; the backends require only backend, urlencoded and internal-array.

SEMANTICS

src/tests/url/AGENTS.md describes the behavior and keeps the ledger of every departure from the C++, toward WHATWG URL and WebIDL. Its suite runs against both implementations; change the code and the ledger together.

  • The backend is chosen once per context from url_standard. It decides the parser and every attribute's value; the facade decides everything else, the same way for both.
  • The facade converts every argument before reaching the backend, so a backend sees only USVStrings.
  • URL.parse() and the searchParams getter hand their constructors an already-made state as the second argument, after the module-private kAdopt token. Not through module state: a constructor that throws on entry (a stack overflow) would leave it for the next construction.

INVARIANTS

  • Origin cache (ada-backend.ts): only the href, protocol, host, hostname and port setters clear it. src/tests/url/origin-cache.js checks it after every setter; a new setter path must keep that rule.
  • A URL's store is its query. Every ListStore mutation reserializes the URL's query, even one that changes nothing; the href and search setters reload the list. The kj backend's handle is both URL and store.
  • Internal lists are made with internalArray(): a push onto an ordinary array runs any index setter user code put on Array.prototype. Return them to user code through toUserArray().
  • Every instance, iterators included, is markUncloneable().

THE C++ CONTRACT

api/url-bridge.h defines JsUrl and JsUrlSearchParams, which take the TypeScript instances where C++ took the C++ classes: node:fs paths (FileSystemModule::FilePath) and body initializers (Body::Initializer).

  • They recognize an instance by the V8-private brand its constructor sets (workerd:URL, workerd:URLSearchParams), without running JavaScript.
  • They read it through cpp_exports.ts (urlHref, searchParamsSerialize), which uses the implementation's own state, so user code replacing toString() does not change what C++ sees.
  • The brand names and the export names are shared with url-bridge.c++.

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.