This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
npm run build- Build the projectnpm run build:clean- Clean the dist directorynpm run build:watch- Watch for changes and rebuild TypeScript filesnpm run lint- Run ESLint (max 0 warnings)npm run lint:src- Run ESLint on src directorynpm run lint:tests- Run ESLint on test directorynpm run lint:site- Run ESLint on site directorynpm run format- Format with Prettiernpm run format:check- Check formatting without making changesnpm run f- Format only changed filesnpm run l- Lint only changed filesnpm test- Run all testsnpm run test:watch- Run tests in watch modenpm run test:integration- Run integration testsnpm run test:redteam:integration- Run red team integration testsnpx jest path/to/test-file- Run a specific testnpm run dev- Start development environment (both server and app)npm run dev:app- Start only the frontend app in dev modenpm run dev:server- Start only the server in dev modenpm run tsc- Run TypeScript compilernpm run db:generate- Generate database migrations with Drizzlenpm run db:migrate- Run database migrationsnpm run db:studio- Open Drizzle studio for database managementnpm run jsonSchema:generate- Generate JSON schema for configurationnpm run citation:generate- Generate citation file
promptfooorpf- Access the CLI tool
- Use TypeScript with strict type checking
- Follow established import order with @trivago/prettier-plugin-sort-imports
- Use consistent curly braces for all control statements
- Prefer const over let; avoid var
- Use object shorthand syntax whenever possible
- Use async/await for asynchronous code
- Follow Jest best practices with describe/it blocks
- Use consistent error handling with proper type checks
- Use CommonJS modules (type: "commonjs" in package.json)
- Node.js version requirement (>=18.0.0)
- Follow file structure: core logic in src/, tests in test/
- Examples belong in examples/ with clear README.md
- Document provider configurations following examples in existing code
- Test both success and error cases for all functionality
- Keep code DRY and use existing utilities where possible
- Use Drizzle ORM for database operations
- Workspaces include src/app and site directories