airbroke / components
AGENTS.md221 starsChanged 12 days agoMITView on GitHub
components/ contains maintained feature UI; components/ui/ is a separate registry-managed primitive surface with its own guide. - Default to server components. Add "use client" only for browser APIs, event handlers, hooks, or local interactive state. - Keep data access and secret-bearing work in server parents; pass the minimum serializable data into client children. - Client mutations use server actions and the shared mutation/error patterns; canonical server-rendered state must refresh or revalidate after success. - Prefer existing primitives from components/ui/ and…
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 35,337 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
- app/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
9 rules. About 1 is common, 2 are distinctive, and 6 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
Default to server components.
- Common: line 34
Keep data access and secret-bearing work in server parents.
- Very specific: line 38
Prefer existing primitives from components/ui/ and domain components before introducing another wrapper or visual vocabulary.
- Very specific: line 40
Keep domain components with their entity family.
- Very specific: line 45
Do not import lib/db.ts, server auth internals, or other server-only modules into client components.
- Distinctive: line 47
Do not mirror server props into local state with an effect.
- Very specific: line 49
Do not move auth and project queries from AppShell into client navigation.
- Very specific: line 50
Do not normalize components/ui/ with project formatting.
- Distinctive: line 52
Do not add tests beside production components.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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
COMPONENT GUIDE
OVERVIEW
components/ contains maintained feature UI; components/ui/ is a separate
registry-managed primitive surface with its own guide.
STRUCTURE
layout/ # Authenticated shell, navigation, and shared page chrome
project/ # Project forms, charts, settings, and destructive controls
notice/ # Notice tables, filters, and resolution controls
occurrence/ # Detail panels, charts, actions, replay, and diagnostics
remark/ # Remark forms and threads
common/ # Cross-domain rendering and chart boundaries
ui/ # shadcn Base UI primitives; read ui/AGENTS.mdWHERE TO LOOK
| Task | Location | Notes |
| Server shell | layout/AppShell.tsx | Server auth and reads |
| Project mutations | project/ | Forms call server actions |
| Occurrence tools | occurrence/toolbox/ | AI, cURL, and replay boundaries |
| Chart boundary | common/RechartsWrapper.tsx | SSR disabled |
| Component tests | ../__tests__/components/ | Centralized, never colocated |
CONVENTIONS
- Default to server components. Add
"use client"only for browser APIs, event handlers, hooks, or local interactive state. - Keep data access and secret-bearing work in server parents; pass the minimum serializable data into client children.
- Client mutations use server actions and the shared mutation/error patterns; canonical server-rendered state must refresh or revalidate after success.
- Prefer existing primitives from
components/ui/and domain components before introducing another wrapper or visual vocabulary. - Keep domain components with their entity family. Nested
cards/andtoolbox/folders remain owned by their feature parent.
ANTI-PATTERNS
- Do not import
lib/db.ts, server auth internals, or other server-only modules into client components. - Do not mirror server props into local state with an effect. Derive values or use event-owned optimistic state that clears when canonical props catch up.
- Do not move auth and project queries from
AppShellinto client navigation. - Do not normalize
components/ui/with project formatting; its generated style and verification contract differ. - Do not add tests beside production components; Next packaging can include colocated test files.
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.

