From 99c0d29b7c944732fab0228d162b248905536790 Mon Sep 17 00:00:00 2001 From: dal Date: Thu, 7 Aug 2025 17:37:20 -0600 Subject: [PATCH] agent md *sigh --- AGENT.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 AGENT.md diff --git a/AGENT.md b/AGENT.md new file mode 100644 index 000000000..ab1a51175 --- /dev/null +++ b/AGENT.md @@ -0,0 +1,24 @@ +# AGENT.md + +## Commands +- **Build**: `turbo build` or `turbo run build:dry-run` (type check only) +- **Tests**: `turbo run test:unit` (run before completing tasks), `turbo run test:integration --filter=` +- **Single test**: `turbo run test:unit --filter=` or run test files directly in specific packages +- **Lint**: `turbo lint`, `pnpm run check:fix ` (auto-fixes with Biome) +- **Pre-completion check**: `turbo run build:dry-run lint test:unit` + +## Architecture +**Monorepo**: pnpm + Turborepo with `@buster/*` packages and `@buster-app/*` apps +- **Apps**: web (Next.js), server (Hono API), trigger (background jobs), electric-server, api (Rust legacy), cli (Rust) +- **Key packages**: ai (Mastra framework), database (Drizzle ORM), server-shared (API types), data-source, access-controls +- **Database**: PostgreSQL with Supabase, soft deletes only (`deleted_at`), queries in `@buster/database/src/queries/` +- **APIs**: Hono with functional handlers, type-safe with Zod schemas in `@buster/server-shared` + +## Code Style +- **TypeScript**: Strict mode, no `any`, handle null/undefined explicitly +- **Imports**: Use type-only imports (`import type`), Node.js protocol (`node:fs`) +- **Formatting**: Biome - 2 spaces, single quotes, trailing commas, 100 char width +- **Functions**: Functional/composable over classes, dependency injection, small focused functions +- **Logging**: Never `console.log`, use `console.info/warn/error` +- **Naming**: `@buster/{package}` for packages, `@buster-app/{app}` for apps +- **Error handling**: Comprehensive with strategic logging, soft deletes, upserts preferred