gateway
AGENTS.md608 starsChanged 8 months agoMITView on GitHub
This repository ships the Adaline Gateway SDK: a local, typed TypeScript SDK for calling many LLM providers through one interface.
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,773 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 repository8 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/gateway.mdcCursor rule
- .cursor/rules/main.mdcCursor rule
- .cursor/rules/provider.mdcCursor rule
- .cursor/rules/providers.mdcCursor rule
- .cursor/rules/types.mdcCursor rule
- add-modelSkill
- review-providerSkill
The file
We split this AGENTS.md into the rules it gives an agent
12 rules. About 0 are common, 5 are distinctive, and 7 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.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Use pnpm, never npm or yarn.
- Distinctive: line 18
Prefer the smallest possible change in the relevant package instead of broad refactors.
- Distinctive: line 20
Keep imports and exports aligned with existing package barrel patterns.
- Very specific: line 21
Do not hand-edit release artifacts or .changeset files unless the task is explicitly about release/versioning.
- Very specific: line 22
When changing provider behavior, review the matching provider package and shared contracts in packages/types and packages/provider.
- Very specific: line 44
Before finishing a non-trivial change, run at least pnpm run lint and the relevant pnpm run test scope.
- Distinctive: line 45
If a change affects published behavior or package surfaces, mention whether a changeset is required.
- Distinctive: line 49
Use Zod schemas at runtime boundaries and export both schema and inferred type when the package already follows that pattern.
- Very specific: line 50
Prefer unknown plus validation over any.
- Distinctive: line 51
Add or update tests for public API behavior, edge cases, and provider-specific error handling.
- Very specific: line 56
Read core/providers/AGENTS.md before editing any provider package.
- Very specific: line 57
Read packages/types/AGENTS.md before changing shared schemas or message/content types.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
AGENTS.md
This repository ships the Adaline Gateway SDK: a local, typed TypeScript SDK for calling many LLM providers through one interface.
Stack
- Node.js 18+
- pnpm 9+ only
- Turborepo
- TypeScript + tsup
- Vitest
- ESLint + Prettier
- Changesets for releases
Working Agreement
- Use
pnpm, nevernpmoryarn. - Prefer the smallest possible change in the relevant package instead of broad refactors.
- Preserve dual-output package behavior: ESM, CJS, and type declarations.
- Keep imports and exports aligned with existing package barrel patterns.
- Do not hand-edit release artifacts or
.changesetfiles unless the task is explicitly about release/versioning. - When changing provider behavior, review the matching provider package and shared contracts in
packages/typesandpackages/provider.
Repository Map
core/gateway/: gateway orchestrator, plugins, handlers, errorscore/providers/: provider implementationspackages/types/: shared Zod schemas and inferred typespackages/provider/: base provider contractstools/: shared eslint and tsconfig packages
Commands
- Install:
pnpm install - Build all:
pnpm run build - Test all:
pnpm run test - Lint all:
pnpm run lint - Format all:
pnpm run format - Clean:
pnpm run clean
Validation
- For provider or shared type changes, run the narrowest package test/build that proves the change works.
- Before finishing a non-trivial change, run at least
pnpm run lintand the relevantpnpm run testscope. - If a change affects published behavior or package surfaces, mention whether a changeset is required.
Coding Rules
- Use Zod schemas at runtime boundaries and export both schema and inferred type when the package already follows that pattern.
- Prefer
unknownplus validation overany. - Add or update tests for public API behavior, edge cases, and provider-specific error handling.
- Mock external provider calls in tests. Do not hit live APIs from test code.
Nested Instructions
- Read
core/providers/AGENTS.mdbefore editing any provider package. - Read
packages/types/AGENTS.mdbefore changing shared schemas or message/content types.
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.

