Skip to content

Latest commit

 

History

History
22 lines (20 loc) · 1004 Bytes

File metadata and controls

22 lines (20 loc) · 1004 Bytes

OpenCode.md - Agent Guidelines

Commands

  • Install: bun install
  • Dev: bun run dev
  • Build: bun run build
  • Start/Preview: bun run start | bun run preview
  • Lint: bun run lint (fix with --fix)
  • Typecheck: bun run typecheck
  • Format: bun run format:check | bun run format:write
  • Database: bun run db:push | bun run db:migrate | bun run db:studio

Run a single test: bun test <path/to/file.test.ts>

Code Style

  • TypeScript strict mode, Zod for validation, avoid any
  • Prettier (with tailwindcss plugin) + ESLint (extends next/core-web-vitals)
  • Import order: external, @/* aliases, then relative; alphabetize each group
  • File names: kebab-case; React components: PascalCase; vars/functions: camelCase
  • Use explicit type aliases/interfaces; prefer type-imports for types
  • Error handling: server throws/errors, caught in Next.js error boundaries (error.tsx)
  • Forms: always use React Hook Form + zodResolver with Zod schemas
  • Commits: lowercase, short prefix (feat:, fix:, chore:, refactor:)