Skip to content

Commit abe1030

Browse files
First shot at a rules file (#119)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
1 parent 84380bb commit abe1030

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.roo/rules/rules.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Roo Code Cloud - Development Guidelines
2+
3+
## Testing & Formatting
4+
5+
- **Test**: `pnpm test` (runs all tests via Turbo)
6+
- **Test single file**: `pnpm test path/to/file.test.ts`
7+
- **Lint**: `pnpm lint` (ESLint with TypeScript support)
8+
- **Type check**: `pnpm check-types`
9+
- **Format**: Files are auto-formatted on commit via lint-staged
10+
11+
## Database & Migrations
12+
13+
- **Push schema**: `pnpm db:push` (applies schema directly, no migration files)
14+
- **Generate migration**: `pnpm --filter @roo-code-cloud/db db:generate`
15+
- **Run migrations**: `pnpm --filter @roo-code-cloud/db db:migrate`
16+
- **Reset DB**: `pnpm db:reset` (drops all data and recreates)
17+
- **Schema location**: `packages/db/src/schema.ts`
18+
- **Migration files**: `packages/db/drizzle/*.sql`
19+
20+
## Code Style
21+
22+
- **TypeScript**: Strict mode enabled, use explicit types
23+
- **Imports**: Use absolute imports with `@/` for src directory
24+
- **Async/Await**: Prefer over promises, use try-catch for error handling
25+
- **Naming**: camelCase for variables/functions, PascalCase for types/components
26+
- **Comments**: Use JSDoc for public APIs, inline comments for complex logic
27+
- **Error Handling**: Return discriminated unions `{ success: true; data: T } | { success: false; error: string }` for actions
28+
- **Database**: Use Drizzle ORM with type-safe queries
29+
- **Testing**: Vitest with globals, mock external dependencies
30+
- **React**: Functional components with hooks, server components by default
31+
- **Formatting**: Prettier with default settings (via lint-staged)

0 commit comments

Comments
 (0)