mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-09 12:17:24 -04:00
docs: add development mode documentation
Add comprehensive development mode documentation to README.md, API_REFERENCE.md, and CLAUDE.md: README.md: - New "Development Mode" section after Configuration - Quick start guide with environment variables - Explanation of DEV vs PROD mode behavior - Mock AI behavior and stock rotation details - Environment variables reference - Use cases and limitations API_REFERENCE.md: - New "Deployment Mode" section after health check - Response format with deployment_mode fields - DEV mode behavior explanation - Health check example with deployment fields - Use cases for testing and CI/CD CLAUDE.md: - New "Development Mode" subsection in Important Implementation Details - Deployment modes overview - DEV mode characteristics - Implementation details with file references - Testing commands and mock behavior notes All sections explain: - DEPLOYMENT_MODE environment variable (PROD/DEV) - PRESERVE_DEV_DATA flag for dev data persistence - Mock AI provider with deterministic stock rotation - Separate dev database and data paths - Use cases for development and testing
This commit is contained in:
@@ -414,6 +414,62 @@ curl http://localhost:8080/health
|
||||
|
||||
---
|
||||
|
||||
## Deployment Mode
|
||||
|
||||
All API responses include a `deployment_mode` field indicating whether the service is running in production or development mode.
|
||||
|
||||
### Response Format
|
||||
|
||||
```json
|
||||
{
|
||||
"job_id": "abc123",
|
||||
"status": "completed",
|
||||
"deployment_mode": "DEV",
|
||||
"is_dev_mode": true,
|
||||
"preserve_dev_data": false
|
||||
}
|
||||
```
|
||||
|
||||
**Fields:**
|
||||
- `deployment_mode`: "PROD" or "DEV"
|
||||
- `is_dev_mode`: Boolean flag
|
||||
- `preserve_dev_data`: Null in PROD, boolean in DEV
|
||||
|
||||
### DEV Mode Behavior
|
||||
|
||||
When `DEPLOYMENT_MODE=DEV` is set:
|
||||
- No AI API calls (mock responses)
|
||||
- Separate dev database (`jobs_dev.db`)
|
||||
- Separate data directory (`dev_agent_data/`)
|
||||
- Database reset on startup (unless PRESERVE_DEV_DATA=true)
|
||||
|
||||
**Health Check Example:**
|
||||
|
||||
```bash
|
||||
curl http://localhost:8080/health
|
||||
```
|
||||
|
||||
Response in DEV mode:
|
||||
```json
|
||||
{
|
||||
"status": "healthy",
|
||||
"database": "connected",
|
||||
"timestamp": "2025-01-16T10:00:00Z",
|
||||
"deployment_mode": "DEV",
|
||||
"is_dev_mode": true,
|
||||
"preserve_dev_data": false
|
||||
}
|
||||
```
|
||||
|
||||
### Use Cases
|
||||
|
||||
- **Testing:** Validate orchestration without AI API costs
|
||||
- **CI/CD:** Automated testing in pipelines
|
||||
- **Development:** Rapid iteration on system logic
|
||||
- **Configuration validation:** Test settings before production
|
||||
|
||||
---
|
||||
|
||||
## Common Workflows
|
||||
|
||||
### Trigger and Monitor a Simulation
|
||||
|
||||
Reference in New Issue
Block a user