agent-thread
AGENTS.md1 starsChanged 7 months agoMITView on GitHub
This repository is a Bun-managed Next.js/OpenNext app. Use Bun for project commands and dependency management, and keep changes aligned with the existing Next.js App Router and Cloudflare Worker deployment path. Use the narrowest meaningful verification for the change:
- Reads credentials
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 31,700 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 repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 9
Use bun install instead of npm install, yarn install, or pnpm install.
- Very specific: line 11
Use bun test for tests.
- Very specific: line 12
Use bunx <package> <command> instead of npx <package> <command>.
- Distinctive: line 13
Do not introduce Vite, Express, Jest, Vitest, npm, yarn, or pnpm.
- Very specific: line 14
When a dependency exposes a Node-oriented CLI, invoke it through Bun, matching the existing scripts.
- Very specific: line 20
Run the Next.js dev server: bun run dev
- Very specific: line 27
Run the local CLI entrypoint: bun run cli
- Very specific: line 31
When updating the CLI version, title the pull request Release cli {version}, replacing {version} with the exact version being released.
- Very specific: line 37
Keep next.config.ts compatible with the OpenNext build path, including output: "standalone", unless the deployment strategy is …
- Distinctive: line 38
Keep server-side rendering and public transcript rendering in the Next app rather than reintroducing a separate Bun.serve frontend.
- Distinctive: line 39
Keep Cloudflare bindings and runtime-specific code isolated behind the existing helper modules.
- Distinctive: line 43
Prefer existing local patterns over introducing new abstractions.
- Very specific: line 44
Use Bun APIs in Bun-only scripts when they fit, such as Bun.file, Bun.write, Bun.$, and bun:sqlite.
- Distinctive: line 51
Use the narrowest meaningful verification for the change:
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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.
Files
Agent Instructions
This repository is a Bun-managed Next.js/OpenNext app. Use Bun for project commands and dependency management, and keep changes aligned with the existing Next.js App Router and Cloudflare Worker deployment path.
Tooling
- Use
bun installinstead ofnpm install,yarn install, orpnpm install. - Use
bun run <script>instead ofnpm run <script>,yarn run <script>, orpnpm run <script>. - Use
bun testfor tests. - Use
bunx <package> <command>instead ofnpx <package> <command>. - Do not introduce Vite, Express, Jest, Vitest, npm, yarn, or pnpm.
- When a dependency exposes a Node-oriented CLI, invoke it through Bun, matching the existing scripts. For example:
bun --bun ./node_modules/next/dist/bin/next build. - Codex or editor host tooling may use its own configured Node runtime when that tool requires it, such as
js_replor browser automation. That exception does not justify adding Node setup, npm scripts, or a project-level Node workflow.
Project Commands
- Install dependencies:
bun install - Run the Next.js dev server:
bun run dev - Build the app and CLI:
bun run build - Build only the CLI:
bun run build:cli - Preview the Cloudflare Worker:
bun run preview - Deploy through OpenNext/Cloudflare:
bun run deploy - Type-check:
bun run check - Run tests:
bun test - Run the local CLI entrypoint:
bun run cli
Release Workflow
- When updating the CLI version, title the pull request
Release cli {version}, replacing{version}with the exact version being released.
Architecture
- The frontend and API routes live in Next.js App Router.
- The Cloudflare Worker is produced by
@opennextjs/cloudflare;wrangler.tomlpoints at.open-next/worker.js. - Keep
next.config.tscompatible with the OpenNext build path, includingoutput: "standalone", unless the deployment strategy is intentionally changed. - Keep server-side rendering and public transcript rendering in the Next app rather than reintroducing a separate Bun.serve frontend.
- Keep Cloudflare bindings and runtime-specific code isolated behind the existing helper modules.
Code Style
- Prefer existing local patterns over introducing new abstractions.
- Use Bun APIs in Bun-only scripts when they fit, such as
Bun.file,Bun.write,Bun.$, andbun:sqlite. - Node built-in imports such as
node:pathandnode:fs/promisesare acceptable where the existing runtime target needs them, including Next.js, OpenNext, Cloudflare compatibility, and the published CLI bundle. - The CLI bundle intentionally targets Node compatibility and may keep
#!/usr/bin/env node. - Bun loads
.envautomatically; do not adddotenv.
Testing
Use the narrowest meaningful verification for the change:
bun testfor behavior covered by tests.bun run checkfor TypeScript and route typing.bun run buildwhen touching Next/OpenNext build behavior, deployment config, or the CLI bundle.
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
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.

