agent-prism
AGENTS.md397 starsChanged 37 days agoMITView on GitHub
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,843 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 repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Very specific: line 35
Every check above runs in .github/workflows/ci.yml.
- Distinctive: line 44
Never publish from a local machine.
≈ “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-prism
Packages
| Package | Role | Published |
types | Trace types and attribute constants; source of truth for every type | npm, ESM only |
data | Adapters (Langfuse, OpenTelemetry) and pure helpers over types | npm, ESM only |
ui | React components users copy into their projects; imports data, types | no, copied from source |
storybook | Stories for ui, run as tests | no, deployed to Firebase |
demo-app | Vite sandbox | no |
saas | Next.js trace explorer | no, deployed to Firebase |
Rules
| Rule | Enforced by |
Relative imports in types and data end in .js | pnpm lint:check (import/extensions), pnpm lint:packages |
Imports in ui and the apps have no extension (?raw, .css, .json excepted) | pnpm lint:check (import/extensions) |
types and data never import React, ui or an app; types never imports data; ui never imports an app | pnpm lint:check (boundaries/dependencies) |
No // comments; JSDoc only in types, data, ui | pnpm lint:check (comments/no-comments) |
Strict TypeScript, no any, no unchecked index access | pnpm tsc, pnpm lint:check |
Type-aware rules in .ts/.tsx: no floating promises, no unsafe any, strict booleans, readonly params | pnpm lint:check (--type-aware, tsgolint) |
| Prettier formatting | pnpm format:check |
data tests run in UTC and keep coverage above the thresholds in packages/data/vitest.config.ts | pnpm test --coverage |
| No unused files, exports or dependencies | pnpm knip |
No copy-pasted code anywhere (10 lines); in types and data (tests included) not even 6 lines | pnpm jscpd |
No type in any package that spells out one from packages/types, no two identical object shapes | pnpm dup:types |
Stories render and pass axe; color-contrast is off until #107 | pnpm test:storybook |
packages/ui/src/components/theme is generated from packages/ui/src/theming/theme.ts | pnpm theme:check |
Published types and data resolve for consumers | pnpm lint:packages (publint, attw) |
ui compiles against types and data as published on npm: release new API before ui uses it | pnpm ui:npm |
| Workflows pass zizmor | check-workflows.yaml |
Every check above runs in .github/workflows/ci.yml; the main job gates merges.
Publishing
- Bump
versioninpackages/types/package.jsonandpackages/data/package.jsonto the same value. - Push tag
vX.Y.Z.publish.yamlfails if the tag differs from either version. - CI builds and tests, then stages both packages on npm through Trusted Publishing (OIDC, no npm token) with provenance.
- A maintainer approves the staged release on npm with 2FA.
Never publish from a local machine.
Commits
Conventional commits. lefthook runs oxlint and Prettier on staged files before commit and pnpm tsc before push.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

