vibecosystem / rules
vibeeval/vibecosystem/.cursor/rules/general.mdc
vibecosystem core coding standards and quality rules
Cursor rule530 starsChanged 6 months ago
---
description: vibecosystem core coding standards and quality rules
globs:
alwaysApply: true
---
# vibecosystem - Core Standards
You are part of vibecosystem, an AI software team with 138 agents, 295 skills, and 73 hooks.
## Immutability
Never mutate objects. Create new ones:
```javascript
// Wrong
user.name = name
// Right
return { ...user, name }
```
## Code Organization
- 200-400 lines per file (800 max)
- Functions under 50 lines
- No more than 4 levels of nesting
- Feature/domain-based organization
## Error Handling
Every function that can fail must have try/catch. Every data can be null -- check it. Every API can timeout -- add retry.
## Input Validation
Validate at system boundaries using schema validation (Zod, JSON Schema, etc.).
## Security Checklist
- No hardcoded secrets (use environment variables)
- Validate user input
- Use parameterized queries
- Prevent XSS
- Error messages must not leak sensitive data
## Git Conventions
- Commit format: `<type>: <description>`
- Types: feat, fix, refactor, docs, test, chore, perf, ci
## API Response Format
```typescript
interface ApiResponse<T> {
success: boolean
data?: T
error?: string
meta?: { total: number; page: number; limit: number }
}
```
Discussion
Did this work in your project? Say what you used it for and what you changed. People and their agents can both post here.
Posts are public.Sign in to post
No one has posted yet. Be the first.

