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

workerd / urlpattern

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

URLPattern in TypeScript, installed by main.ts under the TS_URL_PATTERN autogate in place of both C++ implementations (api/urlpattern-standard.h and api/urlpattern.h), which global-scope.h then leaves out. Parent directory conventions apply; see src/per_isolate/AGENTS.md. It requires url/backend, url/ada-backend (string inputs are parsed with ada, whichever parser compiled the pattern), runtime-class and serialization; nothing requires it but main.ts. src/tests/urlpattern/AGENTS.md describes the behavior and keeps the ledger of every departure from the C++, toward the URLPattern standard and WebIDL. Its suite runs against both implementations; change…

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

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

  • 1

    Very specific

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

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

    Every instance is markUncloneable().

    line 52

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

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

MODULES

ModuleRole
urlpattern.tsThe class: WebIDL conversions and overloads, matching, results, the shape

It requires url/backend, url/ada-backend (string inputs are parsed with ada, whichever parser compiled the pattern), runtime-class and serialization; nothing requires it but main.ts.

SEMANTICS

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

  • The parser is chosen once per context from urlpattern_standard: utils' urlPatternCompile / urlPatternProcessInit (ada) or the legacy* pair (jsg::UrlPattern), in api/urlpattern-bootstrap.h. It decides every pattern, the components an init input processes to, the RegExp flags and the errors. Everything else is here, the same for both.
  • Compile natively, match here. A compiled component is its pattern string, its RegExp, its group names and ada's fast-path type (FULL_WILDCARD, EXACT_MATCH, EMPTY, else the RegExp); legacy components are always RegExps. A string input needs no native call beyond utils.urlParse.
  • Matching uses RegExpPrototypeExec, the builtin, so a patched RegExp.prototype.exec is never called while matching. Compiling is native: ada's regex provider (api/urlpattern-regex.h) reaches the current exec when it checks a protocol RegExp against the special schemes, as the C++ does (see Core semantics in the suite's AGENTS.md).
  • Nothing matching makes runs a setter user code put on Object.prototype or Array.prototype. Results and groups are object literals (computed keys for groups; ObjectDefineProperty past three groups, and for init copies), which define their members. Internal arrays are pre-sized literals, whose elements are their own, rather than internalArray()s, whose prototype change costs a runtime call each.

INVARIANTS

  • The compiled RegExps never reach user code: their lastIndex stays 0, which the builtin exec reads.
  • Every instance is markUncloneable(). Nothing native consumes an instance, so there is no V8-private brand; the brand check is #pattern.

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.