Abhay Pratap Mishra
@abhay • 3 weeks ago
Write a short, specific CLAUDE.md or AGENTS.md from your repo facts, turning the mistakes agents keep making into concrete rules with reasons.
file_namerepo_factsmistakes{{file_name}}{{repo_facts}}{{mistakes}}file_name: CLAUDE.md repo_facts: - pnpm workspaces. apps/web = Next.js 15 App Router. apps/api = Hono on Node 22. packages/db = Drizzle ORM + Postgres. packages/ui = shadcn/ui components. - Unit tests: Vitest (`pnpm test`, or `pnpm vitest run path/to/file`). E2E: Playwright in apps/web/e2e, slow, needs `pnpm dev` running. - Lint/format: Biome (`pnpm lint`, `pnpm format`). Typecheck: `pnpm typecheck` (tsc -b). - Migrations: edit packages/db/src/schema.ts, then `pnpm --filter db generate` and `pnpm --filter db migrate`. - Env vars in .env.local (never committed), template in .env.example. mistakes: - runs npm install, which creates package-lock.json - hand-edits generated SQL files in packages/db/migrations - runs the whole Playwright suite to check a one-line change - copies shadcn component code by hand instead of using the CLI in packages/ui - imports packages/db inside client components
markdown`bash`pnpm dev running)pnpm dlx shadcn@latest add run inside packages/ui.pnpm --filter web exec playwright test e2e/.spec.ts pnpm lint && pnpm typecheck pass.pnpm lint.shadcn@latest matches the version your packages/ui was set up with.