memo-code / site
AGENTS.md29 starsChanged 9 months agoMITView on GitHub
This file defines local contribution rules for web. The site supports multiple languages via next-intl:
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,774 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.
The file
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
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
- Distinctive: line 8
Keep app behavior consistent on desktop and mobile breakpoints.
- Distinctive: line 12
If public docs content, navigation, or examples change, keep related docs in sync.
- Very specific: line 13
Keep web docs aligned with current package boundaries (packages/tui contains CLI entry and interactive UI runtime).
- Very specific: line 36
Add locale to lib/i18n/config.ts
- Very specific: line 37
Create message file lib/i18n/messages/{locale}.json
- Very specific: line 38
Create content directories content/docs/{locale}/ and content/blog/{locale}/
- Distinctive: line 43
When updating page text, update all language message files
- Distinctive: line 44
When updating MDX content, update all language versions
≈ “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
Web Package Guide
This file defines local contribution rules for web.
Scope
- Owns Next.js pages, components, and web-facing docs/presentation layer.
- Keep app behavior consistent on desktop and mobile breakpoints.
Change Rules
- If public docs content, navigation, or examples change, keep related docs in sync.
- Keep web docs aligned with current package boundaries (
packages/tuicontains CLI entry and interactive UI runtime). - Preserve established UI patterns unless a deliberate design change is required.
- 需要维护agents.md的更新。
Internationalization (i18n)
The site supports multiple languages via next-intl:
- Supported locales:
en(default),zh - URL pattern:
/{lang}/path(e.g.,/en/docs,/zh/docs) - Content structure:
- Page text translations:
lib/i18n/messages/{locale}.json - MDX docs:
content/docs/{locale}/ - MDX blog:
content/blog/{locale}/
- Page text translations:
i18n Configuration Notes
- No middleware: Static export (
output: 'export') doesn't support middleware, so locale detection is handled via URL path - Locale from URL: The
[lang]dynamic route segment provides the locale - Suppress hydration warning: Both
layout.tsxfiles havesuppressHydrationWarningon<html>to handle lang attribute differences
Adding a new language
- Add locale to
lib/i18n/config.ts - Create message file
lib/i18n/messages/{locale}.json - Create content directories
content/docs/{locale}/andcontent/blog/{locale}/ - Translate all MDX files
Modifying content
- When updating page text, update all language message files
- When updating MDX content, update all language versions
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.

