| name | generate-agent-code |
| description | Generates Python modules for the hybrid AI trading agent |
When to Use
- When Claude is asked to generate trading logic, risk management, or dashboard code
- When the user requests the full agent codebase or specific modules
- When scaffolding new components that fit into the agent architecture
Instructions
- Create Python module files under the appropriate directories:
modules/, risk/, dashboard/, validation/, simulation/, utils/
- Include comments and Google-style docstrings for all public functions and classes
- Implement hybrid logic: combine momentum, mean-reversion, and AI predictor signals
- Integrate
risk_manager checks before any trade execution
- Ensure
proof_logger hashes all trade inputs, outputs, and decisions
- Create
main.py to tie everything together as the entry point
- Use configuration from
config/config.yaml or utils/config.py — never hardcode parameters
- Include proper logging using Python's
logging module
- Use type hints for all function signatures
- Ensure each module can be imported and tested independently
Module Checklist
When generating the full agent, ensure these files exist:
Example
Input: "Generate the full trading agent with all modules"
Output: Complete Python module files for every component listed above, each with:
- Proper imports and type hints
- Docstrings explaining the module's purpose
- Core logic implementation
- Logging integration
- Risk management integration (where applicable)
- Proof logging integration (where applicable)
Input: "Generate the momentum strategy module"
Output: modules/momentum.py with:
- Moving average crossover logic
- Volume confirmation filters
- Signal generation with confidence score
- Configurable parameters from config