Code Style
- TypeScript strict mode, no
any - Functional components only, no class components
- Prefer
async/awaitover.then()chains
Libraries
- UI: shadcn/ui + Tailwind (no Material UI, no Bootstrap)
- HTTP: native
fetch(no axios) - Forms: React Hook Form + Zod
- State: Zustand (no Redux)
File Structure
- Components in
src/components/<feature>/ - Hooks in
src/hooks/ - API routes in
src/app/api/
Testing
- Vitest, not Jest
- Co-locate
*.test.tsnext to source - Mock at the network layer, not the function layer
Don't
- Don't add comments unless asked
- Don't refactor unrelated code in the same PR
- Don't add new dependencies without confirming
### Per-folder rules
You can also drop `.clinerules` in subdirectories. Cline reads the closest one to the file being edited:
src/ ├── .clinerules # frontend rules ├── components/ └── api/ └── .clinerules # backend-specific overrides
### Plan / Act mode
Cline supports a Plan / Act split — Plan reviews the rules file, asks clarifying questions, and proposes the change before any file is touched. Act executes. The rules file is read in both phases.
---
### FAQ
**Q: Is .clinerules free?**
A: Yes. The Cline VS Code extension itself is free and open-source (Apache-2.0). You bring your own LLM API key (Claude / OpenAI / OpenRouter / etc) and pay for inference.
**Q: Will Roo Code read .clinerules?**
A: Yes — Roo Code is a Cline fork and stays compatible with the .clinerules format. Same file, same behavior.
**Q: How long can the rules file be?**
A: Practically, keep it under ~500 lines. The file goes into every system prompt, so very long rules waste tokens on every task. Split per-folder or move long context into a referenced doc.
---