{"owner":"lichess-org","repo":"lila","hasSkills":true,"totalSkillsCount":4,"totalTokensCount":2759,"categories":["root-instruction","mcp-config","marketplace","plugin-manifest"],"hasMcp":true,"mcpConfig":{"mcpServers":{"lila":{"command":"npx","args":["-y","@modelcontextprotocol/server-lila"]}}},"found":["AGENTS.md",".cursor/mcp.json",".claude-plugin/marketplace.json",".claude-plugin/plugin.json"],"skills":{"AGENTS.md":"# Lila Development Guide for Coding Agents\n\nBefore making any changes, read `AI_POLICY.md` and `CONTRIBUTING.md`.\n\n## Repository Overview\n\nLila (li[chess in sca]la) is the free, open-source chess server powering lichess.org - one of the world's largest chess platforms with 12+ billion games. This is a production-scale application serving millions of users with real-time gameplay, computer analysis, tournaments, and comprehensive chess features.\n\n**Technology Stack:**\n\n- **Backend**: Scala 3.8.2 with Liplay 3.2 (Lichess Play Framework fork), SBT build system\n- **Frontend**: TypeScript with Snabbdom, PNPM workspace monorepo\n- **Database**: MongoDB with Elasticsearch indexing\n- **Real-time**: WebSocket connections via separate lila-ws server, Redis for communication\n- **Chess Engine**: Stockfish via distributed fishnet cluster\n- **Styling**: Sass with custom build pipeline\n\n## Environment Requirements\n\n**CRITICAL**: These exact versions are required - the build will fail without them:\n\n- **Java 21** (JDK, not JRE - needs jdk.compiler module)\n- **Node.js 24.20+** (specified in `.node-version`)\n- **PNPM 12+** (specified in `package.json`)\n\n**Installation:**\n\n```bash\n# Install PNPM globally\nnpm install -g pnpm@12.9.0\n\n# Install dependencies (always run this first)\npnpm install\n```\n\n**Nix development:** `devenv` is supported; its inputs and tools are configured in `devenv.yaml` and `devenv.nix`. Before bumping a tool version, confirm the required package/version is available in the selected Nixpkgs package set, or update the Nixpkgs input/configuration/lock as needed.\n\n## Build & Development Commands\n\n**Frontend (UI) Development:**\n\n```bash\n# Build all UI packages (requires Node 24+)\n./ui/build\n\n# Build specific packages\n./ui/build site analyse lobby\n\n# Watch mode for development\n./ui/build -w\n\n# Production build\n./ui/build -p\n\n# No dependency installation (faster rebuilds)\n./ui/build --no-install\n```\n\n**Backend (Scala) Development:**\n\n```bash\n# Start development console (lila.sh is the SBT wrapper)\n# Automatically copies .sbtopts.default and conf/application.conf.default if missing\n./lila.sh\n\n# In SBT console (via ./lila.sh), compile and run:\nsbt> compile\nsbt> run\n\n# Run with specific JVM options\n./lila.sh -Depoll=true\n\n# Full build with tests and staging\n./lila.sh \"test;stage\"\n```\n\n**Testing & Quality:**\n\n```bash\n# Run all frontend tests (Vitest)\npnpm test\n\n# Watch mode for tests\npnpm test:watch\n\n# Check code formatting (Oxfmt)\npnpm check-format\n\n# Auto-format code\npnpm format\n\n# Lint TypeScript code\npnpm lint\n\n# Auto-fix lint issues\npnpm lint:fix\n\n# Backend formatting check (Scalafmt) - via lila.sh wrapper\n./lila.sh scalafmtCheckAll\n\n# Auto-format Scala code\n./lila.sh scalafmtAll\n```\n\n## Project Architecture\n\n**Module Structure (80+ Scala modules):**\n\n- Modules are in `/modules/[name]/src/main/` with strict dependency hierarchy\n- Core modules: `core`, `common`, `db`, `memo`, `ui`\n- Domain modules: `game`, `user`, `tournament`, `study`, `puzzle`, etc.\n- Build order matters - see `build.sbt` for dependency graph\n\n**Frontend Structure (36 UI packages):**\n\n- `/ui/[package]/` - Individual TypeScript packages\n- `/ui/lib/` - Shared utilities and types\n- `/ui/@types/` - TypeScript definitions\n- `/ui/.build/` - Custom build system with esbuild\n- Each package has `package.json` with custom \"build\" property\n\n**Key Directories:**\n\n- `/app/` - Play Framework controllers, views, main application\n- `/conf/` - Configuration files, routes, application settings\n- `/public/` - Static assets, will contain compiled CSS/JS after build\n- `/bin/` - Utility scripts (deploy, CLI tools, git hooks)\n- `/project/` - SBT build configuration (BuildSettings.scala, Dependencies.scala)\n\n## Common Issues & Solutions\n\n**Node Version Error:** `Nodejs v24.20.0 or later is required`\n\n- Install Node 24.20+ using `nvm`, `volta` or a package manager\n- Check with: `node -v`\n\n**Java Version Issues:**\n\n- Ensure Java 21 JDK is installed (not JRE)\n- Check: `java --list-modules | grep jdk.compiler`\n- Set JAVA_HOME properly\n\n**Build Failures:**\n\n- Always run `pnpm install` after pulling changes\n- For UI issues: `./ui/build --clean` then rebuild\n- For Scala issues: `sbt clean compile`\n\n**PNPM Workspace Issues:**\n\n- Dependencies use `workspace:*` for internal packages\n- Run `pnpm install` from repository root, not subdirectories\n\n## Development Workflow\n\n**Making Changes:**\n\n1. **Frontend**: Edit files in `/ui/[package]/src/`, run `./ui/build -w` for live reload\n2. **Backend**: Edit `/modules/[name]/src/main/`, use `sbt ~compile` for auto-recompile\n3. **Styles**: Edit `.scss` files, included in UI build process\n4. **Configuration**: Edit `/conf/` files, may require server restart\n\n**Adding or updating i18n:**\n\n- Edit source strings in `translation/source/*.xml`; then run `pnpm i18n-file-gen` and `./ui/build --i18n` to regenerate Scala keys and UI typings/translation files.\n- Locale translations live in `translation/dest/` and are synchronized through Crowdin. Validate them with `./bin/trans-lint translation/dest/*/*.xml`.\n\n**Before Committing:**\n\n1. Run `pnpm check-format` and `pnpm lint`\n2. Run `./lila.sh scalafmtCheckAll`\n3. Run `pnpm test` for frontend tests\n4. Consider `./lila.sh test` for affected backend modules (can be slow)\n\n**Utility Scripts:**\n\n- `/bin/deploy` - Production deployment automation\n- `/bin/trans-lint` - Translation validation\n- `/bin/git-hooks/` - Git hooks for formatting/linting\n\n## GitHub Actions & CI\n\n**Workflows validate:**\n\n- **server.yml**: Scala compilation, tests, formatting with Java 21\n- **assets.yml**: UI build, tests, formatting with Node 24+\n- **lint.yml**: Code quality checks\n\n**Deployment:**\n\n- Uses `/bin/deploy` script with workflow artifacts\n- Server builds create `lila-3.0.tar.zst` artifact\n- Asset builds create `assets.tar.zst` artifact\n\n## Key Configuration Files\n\n- **build.sbt**: Main SBT configuration, module definitions\n- **package.json**: Root package with scripts and dependencies\n- **pnpm-workspace.yaml**: Defines workspace packages\n- **ui/.build/**: Custom frontend build system\n- **.scalafmt.conf**: Scala formatting rules\n- **.oxlintrc.jsonc**: TypeScript formatting rules (Oxlint)\n- **.oxfmtrc.json**: TypeScript/CSS/JSON/MD formatting rules (Oxfmt)\n- **conf/routes**: HTTP route definitions\n- **conf/application.conf.default**: Main application configuration template\n\n## Development Tips\n\n- **Large codebase**: Use specific module builds rather than full recompilation\n- **Asset compilation**: The `./ui/build` system is sophisticated - study `/ui/README.md` for details\n- **Hot reloading**: Backend changes require manual restart, frontend has watch mode\n- **Module dependencies**: Check `build.sbt` before adding cross-module dependencies\n- **Database**: Uses MongoDB - no migrations, but schema assumptions in code\n- **Performance**: This is a high-traffic production system - consider performance impact\n- **UI**:\n  - Snabbdom views can use tag helpers from `lib/view/snabbdomElements` (for example, `div()` or `a('/path')`) instead of `h` or `hl`.\n  - Snabbdom JSX syntax is also supported - import `jsx` from `lib/view`.\n\n**Trust these instructions** - they are validated and comprehensive. Only search for additional information if these instructions are incomplete or incorrect for your specific task.\n",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/lichess-org/lila/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/lichess-org/lila/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/lichess-org/lila/HEAD/.claude-plugin/plugin.json)"},"files":{"AGENTS.md":"# Lila Development Guide for Coding Agents\n\nBefore making any changes, read `AI_POLICY.md` and `CONTRIBUTING.md`.\n\n## Repository Overview\n\nLila (li[chess in sca]la) is the free, open-source chess server powering lichess.org - one of the world's largest chess platforms with 12+ billion games. This is a production-scale application serving millions of users with real-time gameplay, computer analysis, tournaments, and comprehensive chess features.\n\n**Technology Stack:**\n\n- **Backend**: Scala 3.8.2 with Liplay 3.2 (Lichess Play Framework fork), SBT build system\n- **Frontend**: TypeScript with Snabbdom, PNPM workspace monorepo\n- **Database**: MongoDB with Elasticsearch indexing\n- **Real-time**: WebSocket connections via separate lila-ws server, Redis for communication\n- **Chess Engine**: Stockfish via distributed fishnet cluster\n- **Styling**: Sass with custom build pipeline\n\n## Environment Requirements\n\n**CRITICAL**: These exact versions are required - the build will fail without them:\n\n- **Java 21** (JDK, not JRE - needs jdk.compiler module)\n- **Node.js 24.20+** (specified in `.node-version`)\n- **PNPM 12+** (specified in `package.json`)\n\n**Installation:**\n\n```bash\n# Install PNPM globally\nnpm install -g pnpm@12.9.0\n\n# Install dependencies (always run this first)\npnpm install\n```\n\n**Nix development:** `devenv` is supported; its inputs and tools are configured in `devenv.yaml` and `devenv.nix`. Before bumping a tool version, confirm the required package/version is available in the selected Nixpkgs package set, or update the Nixpkgs input/configuration/lock as needed.\n\n## Build & Development Commands\n\n**Frontend (UI) Development:**\n\n```bash\n# Build all UI packages (requires Node 24+)\n./ui/build\n\n# Build specific packages\n./ui/build site analyse lobby\n\n# Watch mode for development\n./ui/build -w\n\n# Production build\n./ui/build -p\n\n# No dependency installation (faster rebuilds)\n./ui/build --no-install\n```\n\n**Backend (Scala) Development:**\n\n```bash\n# Start development console (lila.sh is the SBT wrapper)\n# Automatically copies .sbtopts.default and conf/application.conf.default if missing\n./lila.sh\n\n# In SBT console (via ./lila.sh), compile and run:\nsbt> compile\nsbt> run\n\n# Run with specific JVM options\n./lila.sh -Depoll=true\n\n# Full build with tests and staging\n./lila.sh \"test;stage\"\n```\n\n**Testing & Quality:**\n\n```bash\n# Run all frontend tests (Vitest)\npnpm test\n\n# Watch mode for tests\npnpm test:watch\n\n# Check code formatting (Oxfmt)\npnpm check-format\n\n# Auto-format code\npnpm format\n\n# Lint TypeScript code\npnpm lint\n\n# Auto-fix lint issues\npnpm lint:fix\n\n# Backend formatting check (Scalafmt) - via lila.sh wrapper\n./lila.sh scalafmtCheckAll\n\n# Auto-format Scala code\n./lila.sh scalafmtAll\n```\n\n## Project Architecture\n\n**Module Structure (80+ Scala modules):**\n\n- Modules are in `/modules/[name]/src/main/` with strict dependency hierarchy\n- Core modules: `core`, `common`, `db`, `memo`, `ui`\n- Domain modules: `game`, `user`, `tournament`, `study`, `puzzle`, etc.\n- Build order matters - see `build.sbt` for dependency graph\n\n**Frontend Structure (36 UI packages):**\n\n- `/ui/[package]/` - Individual TypeScript packages\n- `/ui/lib/` - Shared utilities and types\n- `/ui/@types/` - TypeScript definitions\n- `/ui/.build/` - Custom build system with esbuild\n- Each package has `package.json` with custom \"build\" property\n\n**Key Directories:**\n\n- `/app/` - Play Framework controllers, views, main application\n- `/conf/` - Configuration files, routes, application settings\n- `/public/` - Static assets, will contain compiled CSS/JS after build\n- `/bin/` - Utility scripts (deploy, CLI tools, git hooks)\n- `/project/` - SBT build configuration (BuildSettings.scala, Dependencies.scala)\n\n## Common Issues & Solutions\n\n**Node Version Error:** `Nodejs v24.20.0 or later is required`\n\n- Install Node 24.20+ using `nvm`, `volta` or a package manager\n- Check with: `node -v`\n\n**Java Version Issues:**\n\n- Ensure Java 21 JDK is installed (not JRE)\n- Check: `java --list-modules | grep jdk.compiler`\n- Set JAVA_HOME properly\n\n**Build Failures:**\n\n- Always run `pnpm install` after pulling changes\n- For UI issues: `./ui/build --clean` then rebuild\n- For Scala issues: `sbt clean compile`\n\n**PNPM Workspace Issues:**\n\n- Dependencies use `workspace:*` for internal packages\n- Run `pnpm install` from repository root, not subdirectories\n\n## Development Workflow\n\n**Making Changes:**\n\n1. **Frontend**: Edit files in `/ui/[package]/src/`, run `./ui/build -w` for live reload\n2. **Backend**: Edit `/modules/[name]/src/main/`, use `sbt ~compile` for auto-recompile\n3. **Styles**: Edit `.scss` files, included in UI build process\n4. **Configuration**: Edit `/conf/` files, may require server restart\n\n**Adding or updating i18n:**\n\n- Edit source strings in `translation/source/*.xml`; then run `pnpm i18n-file-gen` and `./ui/build --i18n` to regenerate Scala keys and UI typings/translation files.\n- Locale translations live in `translation/dest/` and are synchronized through Crowdin. Validate them with `./bin/trans-lint translation/dest/*/*.xml`.\n\n**Before Committing:**\n\n1. Run `pnpm check-format` and `pnpm lint`\n2. Run `./lila.sh scalafmtCheckAll`\n3. Run `pnpm test` for frontend tests\n4. Consider `./lila.sh test` for affected backend modules (can be slow)\n\n**Utility Scripts:**\n\n- `/bin/deploy` - Production deployment automation\n- `/bin/trans-lint` - Translation validation\n- `/bin/git-hooks/` - Git hooks for formatting/linting\n\n## GitHub Actions & CI\n\n**Workflows validate:**\n\n- **server.yml**: Scala compilation, tests, formatting with Java 21\n- **assets.yml**: UI build, tests, formatting with Node 24+\n- **lint.yml**: Code quality checks\n\n**Deployment:**\n\n- Uses `/bin/deploy` script with workflow artifacts\n- Server builds create `lila-3.0.tar.zst` artifact\n- Asset builds create `assets.tar.zst` artifact\n\n## Key Configuration Files\n\n- **build.sbt**: Main SBT configuration, module definitions\n- **package.json**: Root package with scripts and dependencies\n- **pnpm-workspace.yaml**: Defines workspace packages\n- **ui/.build/**: Custom frontend build system\n- **.scalafmt.conf**: Scala formatting rules\n- **.oxlintrc.jsonc**: TypeScript formatting rules (Oxlint)\n- **.oxfmtrc.json**: TypeScript/CSS/JSON/MD formatting rules (Oxfmt)\n- **conf/routes**: HTTP route definitions\n- **conf/application.conf.default**: Main application configuration template\n\n## Development Tips\n\n- **Large codebase**: Use specific module builds rather than full recompilation\n- **Asset compilation**: The `./ui/build` system is sophisticated - study `/ui/README.md` for details\n- **Hot reloading**: Backend changes require manual restart, frontend has watch mode\n- **Module dependencies**: Check `build.sbt` before adding cross-module dependencies\n- **Database**: Uses MongoDB - no migrations, but schema assumptions in code\n- **Performance**: This is a high-traffic production system - consider performance impact\n- **UI**:\n  - Snabbdom views can use tag helpers from `lib/view/snabbdomElements` (for example, `div()` or `a('/path')`) instead of `h` or `hl`.\n  - Snabbdom JSX syntax is also supported - import `jsx` from `lib/view`.\n\n**Trust these instructions** - they are validated and comprehensive. Only search for additional information if these instructions are incomplete or incorrect for your specific task.\n",".cursor/mcp.json":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/lichess-org/lila/HEAD/.cursor/mcp.json)",".claude-plugin/marketplace.json":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/lichess-org/lila/HEAD/.claude-plugin/marketplace.json)",".claude-plugin/plugin.json":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/lichess-org/lila/HEAD/.claude-plugin/plugin.json)"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","rawUrl":"https://raw.githubusercontent.com/lichess-org/lila/HEAD/AGENTS.md","title":"AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# Lila Development Guide for Coding Agents\n\nBefore making any changes, read `AI_POLICY.md` and `CONTRIBUTING.md`.\n\n## Repository Overview\n\nLila (li[chess in sca]la) is the free, open-source chess server powering lichess.org - one of the world's largest chess platforms with 12+ billion games. This is a production-scale application serving millions of users with real-time gameplay, computer analysis, tournaments, and comprehensive chess features.\n\n**Technology Stack:**\n\n- **Backend**: Scala 3.8.2 with Liplay 3.2 (Lichess Play Framework fork), SBT build system\n- **Frontend**: TypeScript with Snabbdom, PNPM workspace monorepo\n- **Database**: MongoDB with Elasticsearch indexing\n- **Real-time**: WebSocket connections via separate lila-ws server, Redis for communication\n- **Chess Engine**: Stockfish via distributed fishnet cluster\n- **Styling**: Sass with custom build pipeline\n\n## Environment Requirements\n\n**CRITICAL**: These exact versions are required - the build will fail without them:\n\n- **Java 21** (JDK, not JRE - needs jdk.compiler module)\n- **Node.js 24.20+** (specified in `.node-version`)\n- **PNPM 12+** (specified in `package.json`)\n\n**Installation:**\n\n```bash\n# Install PNPM globally\nnpm install -g pnpm@12.9.0\n\n# Install dependencies (always run this first)\npnpm install\n```\n\n**Nix development:** `devenv` is supported; its inputs and tools are configured in `devenv.yaml` and `devenv.nix`. Before bumping a tool version, confirm the required package/version is available in the selected Nixpkgs package set, or update the Nixpkgs input/configuration/lock as needed.\n\n## Build & Development Commands\n\n**Frontend (UI) Development:**\n\n```bash\n# Build all UI packages (requires Node 24+)\n./ui/build\n\n# Build specific packages\n./ui/build site analyse lobby\n\n# Watch mode for development\n./ui/build -w\n\n# Production build\n./ui/build -p\n\n# No dependency installation (faster rebuilds)\n./ui/build --no-install\n```\n\n**Backend (Scala) Development:**\n\n```bash\n# Start development console (lila.sh is the SBT wrapper)\n# Automatically copies .sbtopts.default and conf/application.conf.default if missing\n./lila.sh\n\n# In SBT console (via ./lila.sh), compile and run:\nsbt> compile\nsbt> run\n\n# Run with specific JVM options\n./lila.sh -Depoll=true\n\n# Full build with tests and staging\n./lila.sh \"test;stage\"\n```\n\n**Testing & Quality:**\n\n```bash\n# Run all frontend tests (Vitest)\npnpm test\n\n# Watch mode for tests\npnpm test:watch\n\n# Check code formatting (Oxfmt)\npnpm check-format\n\n# Auto-format code\npnpm format\n\n# Lint TypeScript code\npnpm lint\n\n# Auto-fix lint issues\npnpm lint:fix\n\n# Backend formatting check (Scalafmt) - via lila.sh wrapper\n./lila.sh scalafmtCheckAll\n\n# Auto-format Scala code\n./lila.sh scalafmtAll\n```\n\n## Project Architecture\n\n**Module Structure (80+ Scala modules):**\n\n- Modules are in `/modules/[name]/src/main/` with strict dependency hierarchy\n- Core modules: `core`, `common`, `db`, `memo`, `ui`\n- Domain modules: `game`, `user`, `tournament`, `study`, `puzzle`, etc.\n- Build order matters - see `build.sbt` for dependency graph\n\n**Frontend Structure (36 UI packages):**\n\n- `/ui/[package]/` - Individual TypeScript packages\n- `/ui/lib/` - Shared utilities and types\n- `/ui/@types/` - TypeScript definitions\n- `/ui/.build/` - Custom build system with esbuild\n- Each package has `package.json` with custom \"build\" property\n\n**Key Directories:**\n\n- `/app/` - Play Framework controllers, views, main application\n- `/conf/` - Configuration files, routes, application settings\n- `/public/` - Static assets, will contain compiled CSS/JS after build\n- `/bin/` - Utility scripts (deploy, CLI tools, git hooks)\n- `/project/` - SBT build configuration (BuildSettings.scala, Dependencies.scala)\n\n## Common Issues & Solutions\n\n**Node Version Error:** `Nodejs v24.20.0 or later is required`\n\n- Install Node 24.20+ using `nvm`, `volta` or a package manager\n- Check with: `node -v`\n\n**Java Version Issues:**\n\n- Ensure Java 21 JDK is installed (not JRE)\n- Check: `java --list-modules | grep jdk.compiler`\n- Set JAVA_HOME properly\n\n**Build Failures:**\n\n- Always run `pnpm install` after pulling changes\n- For UI issues: `./ui/build --clean` then rebuild\n- For Scala issues: `sbt clean compile`\n\n**PNPM Workspace Issues:**\n\n- Dependencies use `workspace:*` for internal packages\n- Run `pnpm install` from repository root, not subdirectories\n\n## Development Workflow\n\n**Making Changes:**\n\n1. **Frontend**: Edit files in `/ui/[package]/src/`, run `./ui/build -w` for live reload\n2. **Backend**: Edit `/modules/[name]/src/main/`, use `sbt ~compile` for auto-recompile\n3. **Styles**: Edit `.scss` files, included in UI build process\n4. **Configuration**: Edit `/conf/` files, may require server restart\n\n**Adding or updating i18n:**\n\n- Edit source strings in `translation/source/*.xml`; then run `pnpm i18n-file-gen` and `./ui/build --i18n` to regenerate Scala keys and UI typings/translation files.\n- Locale translations live in `translation/dest/` and are synchronized through Crowdin. Validate them with `./bin/trans-lint translation/dest/*/*.xml`.\n\n**Before Committing:**\n\n1. Run `pnpm check-format` and `pnpm lint`\n2. Run `./lila.sh scalafmtCheckAll`\n3. Run `pnpm test` for frontend tests\n4. Consider `./lila.sh test` for affected backend modules (can be slow)\n\n**Utility Scripts:**\n\n- `/bin/deploy` - Production deployment automation\n- `/bin/trans-lint` - Translation validation\n- `/bin/git-hooks/` - Git hooks for formatting/linting\n\n## GitHub Actions & CI\n\n**Workflows validate:**\n\n- **server.yml**: Scala compilation, tests, formatting with Java 21\n- **assets.yml**: UI build, tests, formatting with Node 24+\n- **lint.yml**: Code quality checks\n\n**Deployment:**\n\n- Uses `/bin/deploy` script with workflow artifacts\n- Server builds create `lila-3.0.tar.zst` artifact\n- Asset builds create `assets.tar.zst` artifact\n\n## Key Configuration Files\n\n- **build.sbt**: Main SBT configuration, module definitions\n- **package.json**: Root package with scripts and dependencies\n- **pnpm-workspace.yaml**: Defines workspace packages\n- **ui/.build/**: Custom frontend build system\n- **.scalafmt.conf**: Scala formatting rules\n- **.oxlintrc.jsonc**: TypeScript formatting rules (Oxlint)\n- **.oxfmtrc.json**: TypeScript/CSS/JSON/MD formatting rules (Oxfmt)\n- **conf/routes**: HTTP route definitions\n- **conf/application.conf.default**: Main application configuration template\n\n## Development Tips\n\n- **Large codebase**: Use specific module builds rather than full recompilation\n- **Asset compilation**: The `./ui/build` system is sophisticated - study `/ui/README.md` for details\n- **Hot reloading**: Backend changes require manual restart, frontend has watch mode\n- **Module dependencies**: Check `build.sbt` before adding cross-module dependencies\n- **Database**: Uses MongoDB - no migrations, but schema assumptions in code\n- **Performance**: This is a high-traffic production system - consider performance impact\n- **UI**:\n  - Snabbdom views can use tag helpers from `lib/view/snabbdomElements` (for example, `div()` or `a('/path')`) instead of `h` or `hl`.\n  - Snabbdom JSX syntax is also supported - import `jsx` from `lib/view`.\n\n**Trust these instructions** - they are validated and comprehensive. Only search for additional information if these instructions are incomplete or incorrect for your specific task.\n","isInternal":false,"tokens":1859,"sizeBytes":7322},{"name":"marketplace.json","path":".claude-plugin/marketplace.json","rawUrl":"https://raw.githubusercontent.com/lichess-org/lila/HEAD/.claude-plugin/marketplace.json","title":"Claude Plugin Marketplace Catalog","category":"marketplace","format":"json","content":"# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/lichess-org/lila/HEAD/.claude-plugin/marketplace.json)","tokens":300,"sizeBytes":195},{"name":"plugin.json","path":".claude-plugin/plugin.json","rawUrl":"https://raw.githubusercontent.com/lichess-org/lila/HEAD/.claude-plugin/plugin.json","title":"claude-plugin Plugin Manifest","category":"plugin-manifest","format":"json","content":"# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/lichess-org/lila/HEAD/.claude-plugin/plugin.json)","tokens":300,"sizeBytes":181},{"name":"mcp.json","path":".cursor/mcp.json","rawUrl":"https://raw.githubusercontent.com/lichess-org/lila/HEAD/.cursor/mcp.json","title":"Model Context Protocol (MCP) Configuration","category":"mcp-config","format":"json","content":"# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/lichess-org/lila/HEAD/.cursor/mcp.json)","tokens":300,"sizeBytes":174}],"systemPromptSnippet":"<yakaai_skills repo=\"lichess-org/lila\">\n<!-- File: AGENTS.md (Tokens: ~1859 | Category: root-instruction) -->\n# Lila Development Guide for Coding Agents\n\nBefore making any changes, read `AI_POLICY.md` and `CONTRIBUTING.md`.\n\n## Repository Overview\n\nLila (li[chess in sca]la) is the free, open-source chess server powering lichess.org - one of the world's largest chess platforms with 12+ billion games. This is a production-scale application serving millions of users with real-time gameplay, computer analysis, tournaments, and comprehensive chess features.\n\n**Technology Stack:**\n\n- **Backend**: Scala 3.8.2 with Liplay 3.2 (Lichess Play Framework fork), SBT build system\n- **Frontend**: TypeScript with Snabbdom, PNPM workspace monorepo\n- **Database**: MongoDB with Elasticsearch indexing\n- **Real-time**: WebSocket connections via separate lila-ws server, Redis for communication\n- **Chess Engine**: Stockfish via distributed fishnet cluster\n- **Styling**: Sass with custom build pipeline\n\n## Environment Requirements\n\n**CRITICAL**: These exact versions are required - the build will fail without them:\n\n- **Java 21** (JDK, not JRE - needs jdk.compiler module)\n- **Node.js 24.20+** (specified in `.node-version`)\n- **PNPM 12+** (specified in `package.json`)\n\n**Installation:**\n\n```bash\n# Install PNPM globally\nnpm install -g pnpm@12.9.0\n\n# Install dependencies (always run this first)\npnpm install\n```\n\n**Nix development:** `devenv` is supported; its inputs and tools are configured in `devenv.yaml` and `devenv.nix`. Before bumping a tool version, confirm the required package/version is available in the selected Nixpkgs package set, or update the Nixpkgs input/configuration/lock as needed.\n\n## Build & Development Commands\n\n**Frontend (UI) Development:**\n\n```bash\n# Build all UI packages (requires Node 24+)\n./ui/build\n\n# Build specific packages\n./ui/build site analyse lobby\n\n# Watch mode for development\n./ui/build -w\n\n# Production build\n./ui/build -p\n\n# No dependency installation (faster rebuilds)\n./ui/build --no-install\n```\n\n**Backend (Scala) Development:**\n\n```bash\n# Start development console (lila.sh is the SBT wrapper)\n# Automatically copies .sbtopts.default and conf/application.conf.default if missing\n./lila.sh\n\n# In SBT console (via ./lila.sh), compile and run:\nsbt> compile\nsbt> run\n\n# Run with specific JVM options\n./lila.sh -Depoll=true\n\n# Full build with tests and staging\n./lila.sh \"test;stage\"\n```\n\n**Testing & Quality:**\n\n```bash\n# Run all frontend tests (Vitest)\npnpm test\n\n# Watch mode for tests\npnpm test:watch\n\n# Check code formatting (Oxfmt)\npnpm check-format\n\n# Auto-format code\npnpm format\n\n# Lint TypeScript code\npnpm lint\n\n# Auto-fix lint issues\npnpm lint:fix\n\n# Backend formatting check (Scalafmt) - via lila.sh wrapper\n./lila.sh scalafmtCheckAll\n\n# Auto-format Scala code\n./lila.sh scalafmtAll\n```\n\n## Project Architecture\n\n**Module Structure (80+ Scala modules):**\n\n- Modules are in `/modules/[name]/src/main/` with strict dependency hierarchy\n- Core modules: `core`, `common`, `db`, `memo`, `ui`\n- Domain modules: `game`, `user`, `tournament`, `study`, `puzzle`, etc.\n- Build order matters - see `build.sbt` for dependency graph\n\n**Frontend Structure (36 UI packages):**\n\n- `/ui/[package]/` - Individual TypeScript packages\n- `/ui/lib/` - Shared utilities and types\n- `/ui/@types/` - TypeScript definitions\n- `/ui/.build/` - Custom build system with esbuild\n- Each package has `package.json` with custom \"build\" property\n\n**Key Directories:**\n\n- `/app/` - Play Framework controllers, views, main application\n- `/conf/` - Configuration files, routes, application settings\n- `/public/` - Static assets, will contain compiled CSS/JS after build\n- `/bin/` - Utility scripts (deploy, CLI tools, git hooks)\n- `/project/` - SBT build configuration (BuildSettings.scala, Dependencies.scala)\n\n## Common Issues & Solutions\n\n**Node Version Error:** `Nodejs v24.20.0 or later is required`\n\n- Install Node 24.20+ using `nvm`, `volta` or a package manager\n- Check with: `node -v`\n\n**Java Version Issues:**\n\n- Ensure Java 21 JDK is installed (not JRE)\n- Check: `java --list-modules | grep jdk.compiler`\n- Set JAVA_HOME properly\n\n**Build Failures:**\n\n- Always run `pnpm install` after pulling changes\n- For UI issues: `./ui/build --clean` then rebuild\n- For Scala issues: `sbt clean compile`\n\n**PNPM Workspace Issues:**\n\n- Dependencies use `workspace:*` for internal packages\n- Run `pnpm install` from repository root, not subdirectories\n\n## Development Workflow\n\n**Making Changes:**\n\n1. **Frontend**: Edit files in `/ui/[package]/src/`, run `./ui/build -w` for live reload\n2. **Backend**: Edit `/modules/[name]/src/main/`, use `sbt ~compile` for auto-recompile\n3. **Styles**: Edit `.scss` files, included in UI build process\n4. **Configuration**: Edit `/conf/` files, may require server restart\n\n**Adding or updating i18n:**\n\n- Edit source strings in `translation/source/*.xml`; then run `pnpm i18n-file-gen` and `./ui/build --i18n` to regenerate Scala keys and UI typings/translation files.\n- Locale translations live in `translation/dest/` and are synchronized through Crowdin. Validate them with `./bin/trans-lint translation/dest/*/*.xml`.\n\n**Before Committing:**\n\n1. Run `pnpm check-format` and `pnpm lint`\n2. Run `./lila.sh scalafmtCheckAll`\n3. Run `pnpm test` for frontend tests\n4. Consider `./lila.sh test` for affected backend modules (can be slow)\n\n**Utility Scripts:**\n\n- `/bin/deploy` - Production deployment automation\n- `/bin/trans-lint` - Translation validation\n- `/bin/git-hooks/` - Git hooks for formatting/linting\n\n## GitHub Actions & CI\n\n**Workflows validate:**\n\n- **server.yml**: Scala compilation, tests, formatting with Java 21\n- **assets.yml**: UI build, tests, formatting with Node 24+\n- **lint.yml**: Code quality checks\n\n**Deployment:**\n\n- Uses `/bin/deploy` script with workflow artifacts\n- Server builds create `lila-3.0.tar.zst` artifact\n- Asset builds create `assets.tar.zst` artifact\n\n## Key Configuration Files\n\n- **build.sbt**: Main SBT configuration, module definitions\n- **package.json**: Root package with scripts and dependencies\n- **pnpm-workspace.yaml**: Defines workspace packages\n- **ui/.build/**: Custom frontend build system\n- **.scalafmt.conf**: Scala formatting rules\n- **.oxlintrc.jsonc**: TypeScript formatting rules (Oxlint)\n- **.oxfmtrc.json**: TypeScript/CSS/JSON/MD formatting rules (Oxfmt)\n- **conf/routes**: HTTP route definitions\n- **conf/application.conf.default**: Main application configuration template\n\n## Development Tips\n\n- **Large codebase**: Use specific module builds rather than full recompilation\n- **Asset compilation**: The `./ui/build` system is sophisticated - study `/ui/README.md` for details\n- **Hot reloading**: Backend changes require manual restart, frontend has watch mode\n- **Module dependencies**: Check `build.sbt` before adding cross-module dependencies\n- **Database**: Uses MongoDB - no migrations, but schema assumptions in code\n- **Performance**: This is a high-traffic production system - consider performance impact\n- **UI**:\n  - Snabbdom views can use tag helpers from `lib/view/snabbdomElements` (for example, `div()` or `a('/path')`) instead of `h` or `hl`.\n  - Snabbdom JSX syntax is also supported - import `jsx` from `lib/view`.\n\n**Trust these instructions** - they are validated and comprehensive. Only search for additional information if these instructions are incomplete or incorrect for your specific task.\n\n<!-- File: .claude-plugin/marketplace.json (Tokens: ~300 | Category: marketplace) -->\n# Claude Plugin Marketplace Catalog\n\nPath: `.claude-plugin/marketplace.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/lichess-org/lila/HEAD/.claude-plugin/marketplace.json)\n\n<!-- File: .claude-plugin/plugin.json (Tokens: ~300 | Category: plugin-manifest) -->\n# claude-plugin Plugin Manifest\n\nPath: `.claude-plugin/plugin.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/lichess-org/lila/HEAD/.claude-plugin/plugin.json)\n\n<!-- File: .cursor/mcp.json (Tokens: ~300 | Category: mcp-config) -->\n# Model Context Protocol (MCP) Configuration\n\nPath: `.cursor/mcp.json`\n\n[View Raw Content on GitHub](https://raw.githubusercontent.com/lichess-org/lila/HEAD/.cursor/mcp.json)\n</yakaai_skills>"}