AGENTS.md
AGENTS.mdAGENTS.mdroot
Quality
83/100
Scores the file, not the repository.Length
698 words
12 headings · 0 code blocksRepository
4.0k
— · pushed 2 days agoLast changed
3 days ago
First indexed 3 days ago.1# Project Coded Agent Guide23Concise but detailed reference for contributors working in the `groupultra/telegram-search` monorepo. Improve code when you touch it; avoid one-off patterns.45## Tech Stack (by surface)67- **Server (`apps/server`)**: Node.js, TypeScript, Drizzle ORM, Postgres/pgvector, WebSocket + REST, dotenvx.8- **Web (`apps/web`)**: Vue 3 + Vite, Pinia.9- **Core/shared (`packages/*`)**: common types, client SDK, schema, core services, bot.10- **Tooling**: pnpm workspaces, Vitest, ESLint, TypeScript 5.9, tsdown, Drizzle Kit.1112## Structure & Responsibilities1314- **Apps**15 - `apps/server`: backend service (runtime entry in `apps/server/src/`).16 - `apps/web`: web UI (source in `apps/web/src/`).17- **Packages**18 - `packages/`: shared libraries and domain logic used by apps.19- **Root tooling**20 - Linting: `eslint.config.ts`.21 - DB tooling: `drizzle/`, `drizzle.config.ts`.22 - Workspace: `pnpm-workspace.yaml`.2324## Key Path Index (what lives where)2526- `apps/server/src`: API, WebSocket, and session services.27- `apps/web/src`: Vue UI and client-side logic.28- `packages/core`: core domain/services.29- `packages/schema`: shared types + DB schema.30- `packages/client`: client SDKs for integration.31- `docker/`: compose files + init scripts for local/dev.32- `.env.example`: baseline env config.3334## Commands (pnpm with filters)3536> Use pnpm workspace filters to scope tasks, e.g. `pnpm -F @tg-search/server dev`.3738- **Dev (web only)**: `pnpm run web:dev`39- **Dev (server only)**: `pnpm run server:dev`40- **Dev (web + server)**: `pnpm run start`41- **Build web**: `pnpm run build`42- **Build server**: `pnpm run server:build`43- **Run tests**: `pnpm run test:run`44- **Coverage**: `pnpm run test:coverage`45- **Lint**: `pnpm run lint` / `pnpm run lint:fix`46- **Typecheck**: `pnpm run typecheck`47- **DB generate**: `pnpm run db:generate`4849## Dependency Management Rule5051- Do not edit `package.json` directly to add/remove deps. Use `pnpm install` so lockfile and manifest stay in sync.52- For workspace deps: `pnpm install -F <target> <dependency>` (add `-D` for dev deps).53- Tooling like `typescript`, `vite`, `vitest`, `tsdown`, `@types/node` belongs at the workspace root (`-w`).5455## Styling & Conventions5657- Favor clear module boundaries; shared logic goes in `packages/`.58- Keep runtime entrypoints lean; move heavy logic into services/modules.59- Prefer functional patterns for testability; use DI where helpful. Avoid classes unless required by APIs.60- Use Valibot for schema validation; keep schemas close to their consumers.61- Use Eventa (`@moeru/eventa`) for structured IPC/RPC contracts where needed.62- File names: `kebab-case`.63- Do not add backward-compatibility guards. If extended support is required, write refactor docs and complete the change in a separate, well-scoped effort.64- If the refactor scope is small, do a progressive refactor step by step.65- When modifying code, look for small, safe refactors to reduce duplication or improve clarity.66- If you need a workaround, add a `// NOTICE:` comment explaining why, the root cause, and any relevant context.6768## Testing Practices6970- Use Vitest for unit/integration tests.71- Mock external services and Postgres where practical; keep tests deterministic.72- When fixing a bug, add a Vitest test that documents the previous failure mode and include a short `//` comment about the cause.73- For DB interactions, prefer migration-driven integration tests with env guards.7475## TypeScript / Tooling7677- Stay strict with types; avoid `any` unless absolutely necessary.78- Prefer small, composable modules; keep exports minimal and intentional.7980## Refactoring & Comments8182- Prefer progressive, incremental refactors that keep behavior stable.83- Keep existing comments with the code when moving/refactoring. If a comment becomes obsolete, replace it with a brief note about why it was removed.84- Use markers consistently: `// TODO:`, `// REVIEW:`, `// NOTICE:`.85- Add concise comments for complex logic, algorithms, OS-interaction, and shared utilities. Avoid obvious comments.8687## PR / Workflow Tips8889- Keep changes scoped; use workspace filters for commands.90- Summarize changes, how tested (commands), and follow-ups.91- Improve legacy when you touch it; avoid one-off patterns.92- Maintain structured `README.md` documentation for each `packages/` and `apps/` entry.93- Always run `pnpm run typecheck` and `pnpm run lint:fix` after finishing a task.94- Use Conventional Commits (e.g., `feat(server): add session refresh`).9596## Docker + SQL Conventions9798- Use `docker-compose.yml` as the compose filename.99- Do not write SQL migration files manually. Always use `drizzle-kit generate` to create migrations, which will be placed in `**/sql/` with descriptive, kebab-case names.100- Avoid Postgres enums to keep migrations and imports flexible.101
Also in groupultra/telegram-search
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| groupultra/telegram-search.cursor/rules/testing.mdc · 4.0k | Cursor rules | teststyletesting-strategydatabase | 55/100 | 3 days ago | |
| groupultra/telegram-search.cursor/rules/architecture.mdc · 4.0k | Cursor rules | buildtestlint-formatarch+4 | 89/100 | 3 days ago | |
| groupultra/telegram-search.cursor/rules/backend-server.mdc · 4.0k | Cursor rules | setupsecuritymonorepo | 52/100 | 3 days ago | |
| groupultra/telegram-search.cursor/rules/client.mdc · 4.0k | Cursor rules | stylearchtypesdependencies+1 | 60/100 | 3 days ago | |
| groupultra/telegram-search.cursor/rules/contributing.mdc · 4.0k | Cursor rules | styletypesgit | 56/100 | 3 days ago | |
| groupultra/telegram-search.cursor/rules/core.mdc · 4.0k | Cursor rules | stylearchdependenciesdatabase+1 | 60/100 | 3 days ago | |
| groupultra/telegram-search.cursor/rules/db.mdc · 4.0k | Cursor rules | styletypesdatabaseperformance | 59/100 | 3 days ago | |
| groupultra/telegram-search.cursor/rules/events.mdc · 4.0k | Cursor rules | style | 60/100 | 3 days ago | |
| groupultra/telegram-search.cursor/rules/frontend-web.mdc · 4.0k | Cursor rules | stylesecurityuimonorepo | 56/100 | 3 days ago | |
| groupultra/telegram-search.cursor/rules/pglite-inspector.mdc · 4.0k | Cursor rules | securityapi | 47/100 | 3 days ago | |
| groupultra/telegram-search.cursor/rules/tooling.mdc · 4.0k | Cursor rules | buildlint-formatstyledeployment+1 | 67/100 | 3 days ago | |
| groupultra/telegram-search.github/copilot-instructions.md · 4.0k | Copilot instructions | teststyleagent-behaviour | 76/100 | 3 days ago |
Diff against .cursor/rules/testing.mdc Diff against .cursor/rules/architecture.mdc Diff against .cursor/rules/backend-server.mdc Diff against .cursor/rules/client.mdc Diff against .cursor/rules/contributing.mdc Diff against .cursor/rules/core.mdc Diff against .cursor/rules/db.mdc Diff against .cursor/rules/events.mdc Diff against .cursor/rules/frontend-web.mdc Diff against .cursor/rules/pglite-inspector.mdc Diff against .cursor/rules/tooling.mdc Diff against .github/copilot-instructions.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 2 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsspecial-pages/AGENTS.md · 70 | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| trick77/agents-md-syncAGENTS.md · 2 | AGENTS.md | setupbuildteststyle+5 | 100/100 | 3 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 3 days ago |
