# Agent Guidelines
## Commands
- **Build**: `bun run build`
- **Type check**: `bun run typecheck` or `bun run lint` (same command)
- **Dev mode**: `bun run dev` (auto-reload)
- **Start**: `bun run start`
- **Test**: `bun test` (no specific test files yet)
## Code Style
- **Runtime**: Bun, uses `import` with `.ts` extensions
- **Types**: Strict TypeScript, all types exported from `types/` directory
- **Imports**: Use explicit `.ts` extensions, import types with `type` keyword (e.g., `import type { Foo } from "./types.ts"`)
- **Constants**: Define in `constants.ts`, use SCREAMING_SNAKE_CASE
- **Error handling**: Use custom error classes (`ValidationError`, `OpenAIError`, `ConfigurationError`) from `utils/errors.ts`
- **Validation**: Use Zod schemas, validate at boundaries
- **Classes**: Use private fields, constructor injection for dependencies
- **Functions**: Export named functions, prefer `async/await` over promises
- **Formatting**: 2-space indentation, double quotes for strings
- **Naming**: camelCase for variables/functions, PascalCase for types/classes
## Architecture
- MCP server entry point: `src/index.ts` with shebang `#!/usr/bin/env node`
- Tools in `src/tools/`, utilities in `src/utils/`, types in `src/types/`
- Environment config loaded via `loadConfig()` and validated with `validateConfig()`