agentleFS
llm-ringllm-ring/lmring/AGENTS.md

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.

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
  1. Distinctive:

    Use rebase for git pull

    line 46
  2. Very specific:

    Use .github/pull_request_template.md for PR descriptions

    line 49
  3. Very specific:

    Use pnpm as the primary package manager

    line 54
  4. Distinctive:

    Prefer interfaces over types for object shapes

    line 62
  5. Distinctive:

    Use explicit return types for functions

    line 63
  6. Distinctive:

    Follow project's existing patterns

    line 64
  7. Distinctive:

    Ensure type safety across the codebase

    line 65
  8. Distinctive:

    Use functional components with hooks

    line 69
  9. Distinctive:

    Prefer React Server Components when possible

    line 70
  10. Distinctive:

    Use client components only when necessary (interactivity, hooks, browser APIs)

    line 71
  11. Very specific:

    Follow Next.js App Router patterns

    line 72
  12. Very specific:

    Never run pnpm test - takes significant time

    line 82
  13. Very specific:

    Place test files next to source: filename.test.ts

    line 83
  14. Distinctive:

    Write tests for business logic, not UI components

    line 86
  15. Very specific:

    Keys: Add to apps/web/src/locales/{locale}.json

    line 100

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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 application
  • packages/ - Shared packages
    • ai-hub/ - AI provider integration
    • auth/ - Authentication
    • config/ - Shared config (biome, tailwind, typescript, vitest)
    • database/ - DrizzleORM schemas
    • env/ - Environment variable management
    • i18n/ - Internationalization
    • model-depot/ - AI model definitions (50+ providers)
    • storage/ - File storage (S3, Supabase)
    • theme/ - Theme engine, tokens, presets, CSS variable generation
    • ui/ - UI components
    • video-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.md for PR descriptions
  • PR titles starting with ✨ feat/ or 🐛 fix trigger release workflow

Package Management

  • Use pnpm as 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.spyOn over vi.mock
  • Tests must pass type checking: pnpm check:types
  • Write tests for business logic, not UI components

Type Checking

  • pnpm check:types - Check all packages
  • pnpm --filter <workspace> check:types - Check specific package

Linting

  • pnpm lint - Check errors
  • pnpm 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

  1. Run pnpm check:types
  2. Run pnpm lint
  3. Run related tests
  4. 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.