|
| 1 | +--- |
| 2 | +description: General development workflow and best practices |
| 3 | +--- |
| 4 | + |
| 5 | +# Development Workflow |
| 6 | + |
| 7 | +General development practices and workflow guidelines based on [docs/GLOBAL_CLAUDE.md](mdc:docs/GLOBAL_CLAUDE.md). |
| 8 | + |
| 9 | +## Development Process |
| 10 | +1. **Task breakdown**: Split complex tasks into smaller modules |
| 11 | +2. **Incremental development**: Write small code portions with immediate testing |
| 12 | +3. **TDD approach**: Test-driven development with red-green-refactor cycle |
| 13 | +4. **Code review**: Ensure code quality and adherence to standards |
| 14 | + |
| 15 | +## Code Quality Standards |
| 16 | +- **Early return**: Maximize use to reduce nesting levels |
| 17 | +- **Meaningful names**: Avoid abbreviations, use descriptive names |
| 18 | +- **Single responsibility**: Functions and classes should have one purpose |
| 19 | +- **Immutability**: Prefer immutable data structures and `val` declarations |
| 20 | + |
| 21 | +## Forbidden Practices |
| 22 | +- **No example code**: Never write user-facing example code |
| 23 | +- **No problem simplification**: Don't solve problems by reducing complexity |
| 24 | +- **No dependency downgrades**: Don't solve issues by downgrading versions |
| 25 | +- **No test assertion reduction**: Don't reduce test coverage to fix issues |
| 26 | +- **No exception hiding**: Never ignore or suppress exceptions |
| 27 | +- **No sensitive data exposure**: Never commit API keys, passwords, tokens |
| 28 | + |
| 29 | +## Logging Standards |
| 30 | +- **Comprehensive logging**: Add detailed logging for debugging and monitoring |
| 31 | +- **Structured logging**: Use consistent log formats |
| 32 | +- **No println**: Use proper logging framework, never `println` or `System.out.println` |
| 33 | +- **Debug logs**: Allowed during development, remove after completion |
| 34 | + |
| 35 | +## Documentation Requirements |
| 36 | +- **English comments**: Use English for all code documentation |
| 37 | +- **Explain why**: Comments should explain reasoning, not what code does |
| 38 | +- **KDoc**: Document all public APIs |
| 39 | +- **No auto-generated docs**: Don't create summary documents automatically |
| 40 | + |
| 41 | +## Error Handling |
| 42 | +- **Proper exception handling**: Never ignore exceptions |
| 43 | +- **Meaningful error messages**: Provide context for debugging |
| 44 | +- **Graceful degradation**: Handle failures appropriately |
| 45 | +- **Logging errors**: Log errors with sufficient context |
| 46 | + |
| 47 | +## Performance Considerations |
| 48 | +- **Lazy loading**: Use where appropriate |
| 49 | +- **Resource management**: Proper cleanup of resources |
| 50 | +- **Caching strategies**: Implement appropriate caching |
| 51 | +- **Database optimization**: Efficient queries and indexing |
| 52 | + |
| 53 | +## Security Mindset |
| 54 | +- **Input validation**: Validate all external inputs |
| 55 | +- **Output encoding**: Prevent injection attacks |
| 56 | +- **Secure defaults**: Use secure configurations by default |
| 57 | +- **Regular updates**: Keep dependencies updated for security patches |
0 commit comments