# Code Generation Task Specification

## Primary Objective

[Describe the main coding task or functionality to implement]

## Technical Requirements

### Function/Class Specification
- **Name**: [Function/class name and signature]
- **Parameters**: [Input parameter types and descriptions]
- **Return Type**: [Expected output type and format]
- **Behavior**: [Detailed description of what the code should do]

### Language and Environment
- **Language**: [Python/JavaScript/TypeScript/etc.]
- **Version**: [Language version requirements]
- **Dependencies**: [Required libraries or frameworks]
- **Runtime Environment**: [Browser/Node.js/Python interpreter/etc.]

### Constraints and Limitations
- **Performance Requirements**: [Time/space complexity, execution limits]
- **Security Requirements**: [Input validation, secure coding practices]
- **Compatibility**: [Platform/browser/version compatibility]
- **Resource Limits**: [Memory, CPU, network constraints]

## Quality Standards

### Code Quality
- **Readability**: Clear variable names, logical structure, comments
- **Maintainability**: Easy to modify and extend
- **Testability**: Unit testable design patterns
- **Documentation**: Comprehensive docstrings and comments

### Error Handling
- **Input Validation**: Validate all inputs and handle invalid data
- **Exception Handling**: Graceful error recovery and informative messages
- **Edge Cases**: Handle boundary conditions and unusual inputs
- **Logging**: Appropriate logging for debugging and monitoring

## Success Criteria

### Functional Requirements
- [ ] Code compiles/executes without syntax errors
- [ ] Implements all specified functionality correctly
- [ ] Handles all documented edge cases
- [ ] Provides expected input/output behavior

### Quality Requirements
- [ ] Follows language-specific style guidelines
- [ ] Includes comprehensive documentation
- [ ] Implements proper error handling
- [ ] Passes basic security checks

### Testing Requirements
- [ ] Includes usage examples in documentation
- [ ] Can be unit tested with reasonable effort
- [ ] Handles error conditions gracefully
- [ ] Maintains performance requirements

## Additional Context

### Related Code
[Include any existing related functions, classes, or patterns to maintain consistency]

### Integration Points
[Describe how this code integrates with other parts of the system]

### Future Considerations
[Note any planned extensions or modifications that might affect design decisions]

## Acceptance Criteria

The implementation will be considered complete when:
1. All functional requirements are met
2. Code passes quality and security checks
3. Documentation is complete and accurate
4. Integration with existing codebase works correctly
5. Performance requirements are satisfied