airbroke / app
AGENTS.md221 starsChanged 6 months agoMITView on GitHub
app/ owns route composition and HTTP transport; reusable behavior belongs in components/ or lib/. - Await typed params and searchParams; use notFound() for absent domain records rather than rendering partial detail pages. - Keep pages and layouts server-side by default. Route-local interactive files use explicit "use client" and delegate mutations to lib/actions/. - Keep URL-driven filters and sort state in search parameters; shared parsing and URL updates live under lib/routing/. - API handlers retain transport concerns: credentials, CORS, content encoding,…
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,736 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 repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- components/AGENTS.mdAGENTS.md
- lib/AGENTS.mdAGENTS.md
- prisma/AGENTS.mdAGENTS.md
- __tests__/AGENTS.mdAGENTS.md
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 34
Keep pages and layouts server-side by default.
- Very specific: line 36
Keep URL-driven filters and sort state in search parameters.
- Distinctive: line 46
Do not move collector normalization or occurrence grouping back into route handlers.
- Distinctive: line 48
Do not weaken accepted Airbrake content types or Sentry compressed and decompressed payload limits without protocol tests.
- Very specific: line 50
Do not add AppShell to pass-through project layouts.
- Very specific: line 52
Do not put reusable feature UI in route folders once another route consumes it.
- Distinctive: line 54
Do not add stateful, node-local API session storage.
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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
APP ROUTER GUIDE
OVERVIEW
app/ owns route composition and HTTP transport; reusable behavior belongs in
components/ or lib/.
STRUCTURE
api/ # Auth, MCP, completion, health, and collectors
projects/[project_id]/ # Project shell, notice index, filters, and edit
notices/[notice_id]/ # Notice detail and occurrence list
occurrences/[occurrence_id]/ # Occurrence analysis and actions
bookmarks/ # User bookmark list
signin/ # Server provider setup plus client OAuth UIWHERE TO LOOK
| Task | Location | Notes |
| Root document | layout.tsx | Fonts, metadata, dark theme, global CSS |
| Project shell | projects/[project_id]/layout.tsx | Breadcrumbs, AppShell |
| Airbrake | api/v3/notices/route.ts | JSON and text/plain |
| Sentry | api/sentry/[project_id]/envelope/route.ts | Body limits |
| Better Auth | api/auth/[...all]/route.ts | Lazy construction |
| MCP adapter | api/mcp/route.ts | Delegates to lib/mcp/ |
CONVENTIONS
- Await typed
paramsandsearchParams; usenotFound()for absent domain records rather than rendering partial detail pages. - Keep pages and layouts server-side by default. Route-local interactive files
use explicit
"use client"and delegate mutations tolib/actions/. - Keep URL-driven filters and sort state in search parameters; shared parsing
and URL updates live under
lib/routing/. - API handlers retain transport concerns: credentials, CORS, content encoding,
status codes, body limits, and response compatibility. Parsing and shared
persistence belong under
lib/intake/. - Collector routes are public data-plane endpoints authenticated by project
keys. They do not inherit page authentication from
proxy.ts.
ANTI-PATTERNS
- Do not move collector normalization or occurrence grouping back into route handlers; both protocols converge on the shared intake service.
- Do not weaken accepted Airbrake content types or Sentry compressed and decompressed payload limits without protocol tests.
- Do not add
AppShellto pass-through project layouts; nested shells cause duplicate navigation. - Do not put reusable feature UI in route folders once another route consumes
it; move it to the matching
components/domain. - Do not add stateful, node-local API session storage. The app must remain safe across multiple replicas.
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.

