Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
50 lines
1.7 KiB
Markdown
50 lines
1.7 KiB
Markdown
# Refactor Code for Quality
|
|
|
|
Refactor the following code for better quality: $ARGUMENTS
|
|
|
|
## Refactoring Framework:
|
|
1. **Code Analysis**: Identify code smells, duplication, and complexity
|
|
2. **Design Review**: Evaluate architecture and design patterns
|
|
3. **Implementation**: Apply refactoring techniques
|
|
4. **Testing**: Ensure refactored code maintains functionality
|
|
5. **Documentation**: Update documentation to reflect changes
|
|
|
|
## Refactoring Standards:
|
|
- **SOLID Principles**: Apply Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion
|
|
- **DRY Principle**: Eliminate duplication
|
|
- **KISS Principle**: Keep it simple and straightforward
|
|
- **YAGNI Principle**: Don't implement unnecessary features
|
|
- **Code Readability**: Improve code clarity and maintainability
|
|
|
|
## Language-Specific Guidelines:
|
|
|
|
### Go Refactoring
|
|
- Simplify complex functions and reduce cyclomatic complexity
|
|
- Improve error handling patterns
|
|
- Optimize struct and interface design
|
|
- Enhance concurrency patterns
|
|
|
|
### Solidity Refactoring
|
|
- Optimize gas consumption
|
|
- Improve contract upgradeability
|
|
- Enhance security patterns
|
|
- Simplify complex contract interactions
|
|
|
|
### JavaScript/TypeScript Refactoring
|
|
- Apply Vue 3 Composition API patterns
|
|
- Improve component organization
|
|
- Optimize state management with Pinia
|
|
- Enhance web3 integration patterns
|
|
|
|
## Testing Requirements:
|
|
- Maintain existing test coverage
|
|
- Add tests for newly introduced patterns
|
|
- Verify no functionality regression
|
|
- Update benchmarks if performance is affected
|
|
|
|
## Deliverables:
|
|
- Refactored code with improved quality
|
|
- Updated tests
|
|
- Performance comparison (if applicable)
|
|
- Documentation updates
|
|
- Refactoring rationale and benefits |