Code Generation
Automated code creation and snippets
Code Refactoring Framework
Refactor a code block — applying the specific refactoring technique that addresses the identified code smell, verifying behavior is preserved via tests, and making the smallest change that improves the code without introducing new complexity.
State Machine Implementation Framework
Implement a state machine — with explicit valid transitions that reject invalid state changes, guard conditions that enforce business rules, and side effects that fire reliably on transitions without coupling the state machine to external services.
Design Patterns Implementation Framework
Implement the right design pattern for a specific problem — with pattern selection criteria that distinguish when a pattern solves a real problem vs. when it adds complexity without benefit, and implementations that use the pattern correctly rather than superficially.
Data Transformation Patterns Framework
Implement data transformation pipelines — with schema validation at boundaries, type-safe mapping functions, and error accumulation that reports all transformation failures rather than stopping at the first one.
API Client Code Generation Framework
Generate a typed API client — with centralized HTTP configuration, error handling that propagates specific error types, request/response interceptors, and automatic retry that distinguishes retryable from non-retryable errors.
Unit Test Generation Framework
Generate unit tests — with test cases that cover the happy path, all documented error conditions, boundary values, and edge cases, producing a test suite that catches regressions rather than just confirming current behavior.
Async Code Patterns Framework
Implement async code — with error propagation that doesn't swallow exceptions, parallel execution that doesn't create unintended race conditions, and timeout handling that prevents indefinite waits when dependencies fail.
Database Query Generation Framework
Generate optimized database queries — with parameterized inputs that prevent injection, index-aware WHERE clauses, pagination that scales to large datasets, and EXPLAIN plan analysis that confirms the query uses the expected indexes.
Class & Object Design Framework
Design and implement a class — with encapsulation that protects invariants, a minimal public interface that hides implementation details, and adherence to SOLID principles that make the class testable, extensible, and maintainable.
Function Implementation Framework
Generate a production-ready function implementation — with input validation, error handling, edge case coverage, and documentation that makes the function's behavior unambiguous to any developer who reads it.