agentleFS
Sign inSign up

AGENTS.md examples from real projects

How real projects brief Codex, Cursor and every other agent that reads AGENTS.md.

Most stars first · from page 37Worked for most · soon
CloudflareAGENTS.md

workerd / readable

cloudflare/workerd/src/tests/streams/readable/AGENTS.md

Informal specification of the value-oriented ReadableStream as implemented in workerd, derived from — and kept in lockstep with — this suite. The tests are the normative artifact. Byte streams (type:'bytes', BYOB) belong to the readable-byte suite; the pipeTo/ pipeThrough matrix belongs to piping/. The suite COMPLEMENTS WPT (//src/wpt:streams). Probing the C++ expectedFailures showed many root-cause to a handful of construction divergences (hwm Infinity rejection, validation order) rather than behavioral gaps; the reentrancy family is mostly parity at finite hwm.

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / readable-byte

cloudflare/workerd/src/tests/streams/readable-byte/AGENTS.md

Informal specification of byte-oriented ReadableStreams as implemented in workerd, derived from — and kept in lockstep with — this suite. The tests are the normative artifact. Value streams live in readable/; the pipeTo/pipeThrough matrix belongs to piping/. The suite COMPLEMENTS WPT (//src/wpt:streams). Probing showed the C++ failures in readable-byte-streams/* root-cause to a few construction and pump divergences plus the close-with-partial and read-min shapes below; the releaseLock→second-reader cluster and the buffer-hazard families are behavior-parity (messages aside).

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / scaling

cloudflare/workerd/src/tests/streams/scaling/AGENTS.md

Dequeue cost stays linear in every internal queue of both streams implementations: buffered chunks, pending reads, pending pull-intos, write requests, the writable controller's chunk queue, and the identity stream's write snapshots. Each test drives one queue to 80k-160k entries (identity: 80k, over a 16x range) and asserts, through helpers.js, that the time grows by at most 4x the linear multiple of a run at 1/8 (identity: 1/16) the size. The ratio is machine-independent; the sizes sit well past the ~20k…

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / sockets

cloudflare/workerd/src/tests/streams/sockets/AGENTS.md

The readable/writable stream halves of connect() TCP sockets under both stream implementations. The tests are the normative artifact. The general Socket surface (startTls, secureTransport, DNS overrides, the connect-handler protocol, HTTP-over-socket) is owned by src/workerd/api/tests/ (http-socket-test, connect-handler-test, starttls-*); this suite owns the STREAMS interaction only. A node sidecar (echo-server.js) runs two TCP servers, their ports delivered through fromEnvironment bindings (STREAMSECHOPORT, STREAMSGREETPORT, plus SIDECAR_HOSTNAME): - echo: echoes every byte; on client half-close, flushes and ends (the client's readable reaches EOF after the…

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / strategies

cloudflare/workerd/src/tests/streams/strategies/AGENTS.md

An informal specification of the two WHATWG queuing strategy classes as implemented in workerd, derived from — and kept in lockstep with — the test suite in this directory. The tests are the normative artifact. Both the C++ implementation (src/workerd/api/streams/readable.h) and the TypeScript implementation (src/perisolate/webstreams/strategies.ts, behind typescriptimplemented_streams) are covered. The WPT streams/queuing-strategies.any.js runs against both implementations; its 12 C++ expectedFailures in src/wpt/streams-test.ts correspond exactly to ledger entries #1–#6 below — the suite pins what the C++ side actually does where…

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / transform

cloudflare/workerd/src/tests/streams/transform/AGENTS.md

An informal specification of the JS-backed TransformStream as implemented in workerd, derived from — and kept in lockstep with — the test suite in this directory. The tests are the normative artifact. Both the C++ implementation (src/workerd/api/streams/transform.c++ over standard.c++'s TransformStreamDefaultController) and the TypeScript implementation (behind typescriptimplementedstreams) are covered. The suite COMPLEMENTS WPT (//src/wpt:streams runs transform-streams/ against both implementations). Probing the 30+ C++ expectedFailures showed most narrow to a handful of root causes (below); several WPT "failures" (properties.any's arg counts/prototype-chain, the…

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / writable

cloudflare/workerd/src/tests/streams/writable/AGENTS.md

An informal specification of the JS-backed writable stream classes as implemented in workerd, derived from — and kept in lockstep with — the test suite in this directory. The tests are the normative artifact. Both the C++ implementation (src/workerd/api/streams/writable.{h,c++} over standard.c++'s WritableImpl/WritableStreamJsController) and the TypeScript implementation (src/perisolate/webstreams/writable.ts, behind typescriptimplemented_streams) are covered. The suite COMPLEMENTS WPT (//src/wpt:streams runs writable-streams/ against both implementations): behaviors WPT already asserts identically on both sides are not duplicated here. The WPT C++ expectedFailures for writable-streams/ in…

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / api

cloudflare/workerd/src/workerd/api/AGENTS.md

All JavaScript APIs exposed to Workers: HTTP, crypto, streams, WebSocket, Cache, KV, R2, SQL, encoding, events, timers, scheduled/alarm handlers.

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / crypto

cloudflare/workerd/src/workerd/api/crypto/AGENTS.md

WebCrypto API + Node.js crypto C++ implementations over BoringSSL. crypto.h defines public JSG types (CryptoKey, SubtleCrypto, CryptoKeyUsageSet). impl.h defines internal CryptoKey::Impl base class with per-algorithm static ImportFunc/GenerateFunc dispatch. Algorithm files implement Impl subclasses. OSSLCALL() macro wraps all BoringSSL calls with error translation.

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / node

cloudflare/workerd/src/workerd/api/node/AGENTS.md

C++ implementations of Node.js built-in modules. Each module = JSG-bound class registered via NODEJS_MODULES(V) macro in node.h. TypeScript counterpart lives in src/node/. Tests in tests/. Naming: <module>-test.js + <module>-test.wd-test; -nodejs- infix when needing compat flags. All tests set compatibilityFlags = ["nodejscompat", "nodejscompatv2", "experimental"]. Network tests (net, tls, http) use sidecar jsbinary targets. fixtures/ has 46 PEM files for crypto. process-stdio tests use shtest with .expectedstdout/.expectedstderr. C++ unit test: buffer-test.c++ via kjtest.

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / streams

cloudflare/workerd/src/workerd/api/streams/AGENTS.md

Web Streams API: ReadableStream, WritableStream, TransformStream. See README.md for terse reference (classification, state machines, safety patterns). See docs/streams.md for narrative tutorial. NOTE: C++ code outside this directory does not use jsg::Ref<ReadableStream> or jsg::Ref<WritableStream> directly; it goes through the JsReadableStream / JsWritableStream abstractions in src/workerd/api/js-{readable,writable}-stream.{h,c++}, which hide which stream implementation backs a given stream (and provide JsReadableWritablePair + pipeTo/pipeThrough for abstraction-level pipelines). New C++ consumers of streams should use those abstractions, not the types defined here. Allocating the types defined here…

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / io

cloudflare/workerd/src/workerd/io/AGENTS.md

I/O lifecycle, per-request context, worker/isolate management, actor storage, consistency gates, and compatibility flags.

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / jsg

cloudflare/workerd/src/workerd/jsg/AGENTS.md

See README.md for terse reference (type mappings, macro catalog, error catalog). See docs/jsg.md for narrative tutorial. Macro-driven C++/V8 binding layer: declares C++ types as JS-visible resources/structs with automatic type conversion.

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / server

cloudflare/workerd/src/workerd/server/AGENTS.md

Binary + orchestration layer. :workerd is a Rust binary: the :workerd-cli crate (cli/) parses the command line (clap), produces the encoded config (schema files via config-compiler.c++), handles --watch and compile, and runs each serving subcommand (serve, compile, test, fuzzilli, pyodide-lock, make-pyodide-baseline-snapshot) through a run_* function in cli-main.c++. Server (server.c++, ~6K lines) is the god object: parses workerd.capnp config, constructs all service types as nested inner classes, wires sockets/bindings/actors, runs the event loop.

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / util

cloudflare/workerd/src/workerd/util/AGENTS.md

Shared utility library: data structures, SQLite wrapper, feature gating, logging, thread-local scopes. No workerd-specific API dependencies — consumed across api/, io/, server/.

8.8k7mo agoDiscuss
CloudflareAGENTS.md

workerd / types

cloudflare/workerd/types/AGENTS.md

Generates @cloudflare/workers-types .d.ts files from C++ RTTI (via jsg/rtti.capnp) + hand-written defines/*.d.ts. A workerd-hosted Worker extracts RTTI at runtime per compat-date; TypeScript transforms post-process into ambient and importable outputs. CI validates generated-snapshot/ matches. Types in this project come from three layers. Changes must be made in the correct layer: Do not edit files in generated-snapshot/ directly — they are overwritten by just generate-types. If the generated output looks wrong, fix the source layer (C++ RTTI, JSGTSOVERRIDE, or defines/). Types in…

8.8k7mo agoDiscuss
SentryAGENTS.md

sentry-javascript

getsentry/sentry-javascript/AGENTS.md

Monorepo with 40+ packages in @sentry/*, managed with Yarn workspaces and Nx. Prefer LSP over Grep/Read for code navigation — it's faster, precise, and avoids reading entire files: Use Grep only when LSP isn't available or for text/pattern searches (comments, strings, config). After writing or editing code, check LSP diagnostics and fix errors before proceeding. Use yarn, never npm or pnpm. Scripts live in the root package.json. yarn build:dev:filter @sentry/<pkg> builds one package and its deps. Single package: cd packages/<name>…

8.7k4d agoReads credentialsDiscuss
SentryAGENTS.md

sentry-javascript / browser

getsentry/sentry-javascript/packages/browser/AGENTS.md

Bundle size is critical. Be mindful of imports and tree-shaking. Use /add-cdn-bundle skill to create new CDN bundles.

8.7k4d agoDiscuss
SentryAGENTS.md

sentry-javascript / nextjs

getsentry/sentry-javascript/packages/nextjs/AGENTS.md

Next.js apps use either webpack or turbopack as their bundler. This fundamentally changes how Sentry instruments the application. Detection: process.env.TURBOPACK or --turbo CLI flag (see src/config/util.ts:detectActiveBundler). Webpack builds use loaders and templates to wrap user code at compile time: Template files and what they wrap: Config options that control wrapping: autoInstrumentServerFunctions, autoInstrumentMiddleware, autoInstrumentAppDirectory, excludeServerRoutes. Turbopack does NOT use the wrapping loader or templates. There is no build-time function wrapping. What turbopack does support: What turbopack does NOT support: Instrumentation with…

8.7k4d agoReads credentialsDiscuss
MongoDBAGENTS.md

mongo-go-driver

mongodb/mongo-go-driver/AGENTS.md

Official MongoDB Go Driver (go.mongodb.org/mongo-driver/v2). Correctness, backward compatibility, and conformance to MongoDB Driver Specifications are top priorities. Uses Task, not make. Tests require a running mongod on localhost:27017 (or MONGODB_URI). The full test suite is serial (-p 1) — integration tests share server state. Do not parallelize. Evergreen's project configuration lives in .evergreen/config.yml, where every task, variant, and expansion is declared; supporting CI scripts live alongside it. Validate any change with evergreen validate -p mongo-go-driver -f .evergreen/config.yml (authenticate with evergreen…

8.5k5mo agoDiscuss
CLAUDE.md vs AGENTS.md

About AGENTS.md

What is AGENTS.md?

An open format for instructions to coding agents, read by Codex, Cursor and others. Think of it as a README written for agents.

Where does it go?

At the repository root, with more specific files in subdirectories. Agents read the one closest to the file they're editing.

What should it contain?

Setup and test commands, code style, and the rules a new contributor would need to know.

Does Claude Code read it?

Claude Code reads CLAUDE.md. A one-line CLAUDE.md that points at AGENTS.md covers both.