Initial Ralph scaffold
This commit is contained in:
27
agent_docs/code_patterns.md
Normal file
27
agent_docs/code_patterns.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Code Patterns
|
||||
|
||||
## Project Conventions
|
||||
|
||||
|
||||
### TypeScript Guidelines
|
||||
|
||||
- Use strict mode
|
||||
- No `any` types
|
||||
- Use interfaces for object shapes
|
||||
- Use type guards for narrowing
|
||||
- Export types from `types/index.ts`
|
||||
|
||||
### API Patterns
|
||||
|
||||
- Use middleware for cross-cutting concerns
|
||||
- Validate all input
|
||||
- Return consistent error responses
|
||||
- Use proper HTTP status codes
|
||||
- Log all requests
|
||||
|
||||
## Error Handling
|
||||
|
||||
- Always catch and handle errors
|
||||
- Log errors with context
|
||||
- Return user-friendly messages
|
||||
- Never expose internal details
|
||||
Reference in New Issue
Block a user