lmring
AGENTS.md221 starsChanged 9 months agoApache-2.0View on GitHub
This document serves as a comprehensive guide for all team members when developing LMRing. You are developing an open-source AI Arena for multi-model comparison: LMRing. LMRing is a Next.js-based web application that enables users to interact with multiple AI models simultaneously, compare their responses in real-time, and track model performance through a leaderboard system. Built with modern technologies: Commands: - Web: pnpm --filter @lmring/web test '[file-path-pattern]' - Packages: pnpm --filter @lmring/<package> test '[file-path-pattern]' Important: - Wrap file paths in single…
- Installs packages
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 repositoryOne other file it gives its agents.
- CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
15 rules. About 0 are common, 9 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
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
- Distinctive: line 46
Use rebase for git pull
- Very specific: line 49
Use .github/pull_request_template.md for PR descriptions
- Very specific: line 54
Use pnpm as the primary package manager
- Distinctive: line 62
Prefer interfaces over types for object shapes
- Distinctive: line 63
Use explicit return types for functions
- Distinctive: line 64
Follow project's existing patterns
- Distinctive: line 65
Ensure type safety across the codebase
- Distinctive: line 69
Use functional components with hooks
- Distinctive: line 70
Prefer React Server Components when possible
- Distinctive: line 71
Use client components only when necessary (interactivity, hooks, browser APIs)
- Very specific: line 72
Follow Next.js App Router patterns
- Very specific: line 82
Never run pnpm test - takes significant time
- Very specific: line 83
Place test files next to source: filename.test.ts
- Distinctive: line 86
Write tests for business logic, not UI components
- Very specific: line 100
Keys: Add to apps/web/src/locales/{locale}.json
≈ “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
LMRing Development Guidelines
This document serves as a comprehensive guide for all team members when developing LMRing.
Project Description
You are developing an open-source AI Arena for multi-model comparison: LMRing.
LMRing is a Next.js-based web application that enables users to interact with multiple AI models simultaneously, compare their responses in real-time, and track model performance through a leaderboard system.
Tech Stack
Built with modern technologies:
- Frontend: Next.js 16, React 19, TypeScript 6.0+
- UI: shadcn/ui, Tailwind CSS 4
- State: Zustand
- Database: PostgreSQL, DrizzleORM
- Auth: Better-Auth (OAuth + email/password)
- Testing: Vitest, Playwright
- Build: Turborepo, pnpm
- Linting: Biome
- i18n: i18next, react-i18next (en, fr, zh)
- AI: Vercel AI SDK
Directory Structure
apps/web/- Main Next.js applicationpackages/- Shared packagesai-hub/- AI provider integrationauth/- Authenticationconfig/- Shared config (biome, tailwind, typescript, vitest)database/- DrizzleORM schemasenv/- Environment variable managementi18n/- Internationalizationmodel-depot/- AI model definitions (50+ providers)storage/- File storage (S3, Supabase)theme/- Theme engine, tokens, presets, CSS variable generationui/- UI componentsvideo-runtime/- Video generation runtime
Development Workflow
Git Workflow
- Use rebase for git pull
- Git commit messages should prefix with gitmoji
- Git branch name format:
<type>/<feature-name> - Use
.github/pull_request_template.mdfor PR descriptions - PR titles starting with
✨ feat/or🐛 fixtrigger release workflow
Package Management
- Use
pnpmas the primary package manager - Workspace packages reference each other as
workspace:* - Add dependencies:
pnpm add <package> --filter <workspace>
Code Style Guidelines
TypeScript
- Prefer interfaces over types for object shapes
- Use explicit return types for functions
- Follow project's existing patterns
- Ensure type safety across the codebase
React
- Use functional components with hooks
- Prefer React Server Components when possible
- Use client components only when necessary (interactivity, hooks, browser APIs)
- Follow Next.js App Router patterns
Testing Strategy
Commands:
- Web:
pnpm --filter @lmring/web test '[file-path-pattern]' - Packages:
pnpm --filter @lmring/<package> test '[file-path-pattern]'
Important:
- Wrap file paths in single quotes
- Never run
pnpm test- takes significant time - Place test files next to source:
filename.test.ts - Prefer
vi.spyOnovervi.mock - Tests must pass type checking:
pnpm check:types - Write tests for business logic, not UI components
Type Checking
pnpm check:types- Check all packagespnpm --filter <workspace> check:types- Check specific package
Linting
pnpm lint- Check errorspnpm lint:fix- Auto-fix errors
i18n
- Keys: Add to
apps/web/src/locales/{locale}.json - Dev: Translate all three locale files (en, fr, zh)
- Supported locales:
en,fr,zh
Quality Checks
Pre-commit Hooks (Husky + lint-staged)
Pre-commit: Runs lint-staged (executes lint:fix and check:types on staged files)
Commit-msg: Validates conventional commits via commitlint
Before Creating PR
- Run
pnpm check:types - Run
pnpm lint - Run related tests
- Test locally
Important Notes
- Node.js: v24.11.1+
- Package Manager: pnpm 10.34.0
- Auth: OAuth (GitHub, Google, Linux.do) and Email OTP (Resend); all providers are optional and configured via environment variables
Resources
For more detailed information, refer to:
- Project documentation in
/docs - CLAUDE.md for Claude Code guidelines
- Individual package README 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.

