How baitc-hacks/hack-17c230f8-ctrlx works
WindCast produces 48-hour wind-farm generation forecasts, uncertainty bands, dispatcher summaries and day-ahead bid data. The main workflow runs from CLI or API through the forecast service and deterministic agent: select an issue, obtain and validate historical weather, prepare turbine data, model and check output, optionally recompute with fresher weather, then publish artifacts for the API and web interface. The README documents evaluation, agent evidence, user question-answering and IT integration capabilities as additional branches. Some subsystem wiring is based on README documentation because sampled source excerpts are incomplete.
Main entry points: orchestrator.py Agent orchestrator · api.ts Web API client · routes.py FastAPI routes · ask.py Ask the agent
Components 24
Entry points
- CLI
app/cli.py - Forecast service
app/service.py
Forecast agent
- Agent orchestrator
app/agent/orchestrator.py - Run planning
app/agent/planner.py - Weather tools
app/agent/tools.py - Forecast artifacts
- Agent run journal
app/agent/log.py
Data and evaluation
- Weather archive
app/weather.py - Weather cache
- Turbine history
app/data.py - Forecast features
app/features.py - Generation models
app/models.py - Metrics and replay
app/evaluate.py
Serving and UI
- Web platform
web/app/page.tsx - FastAPI routes
app/api/routes.py - Ask the agent
app/ask.py - Web API client
web/lib/api.ts - Bid worksheet
web/app/bid/page.tsx - Agent journal view
web/app/agent/page.tsx - Quality dashboard
web/app/quality/page.tsx - IT integration view
web/app/integration/page.tsx
External services
- LLM summary
app/llm.py - Open-Meteo
Other components
- Wind-farm dispatcher
Connections 28
- Wind-farm dispatcher → Web platform: views forecasts
- Wind-farm dispatcher → CLI: runs backtests
- CLI → Forecast service: requests forecasts
- Web platform → Web API client: requests data
- Web API client → FastAPI routes: calls API
- FastAPI routes → Forecast service: runs forecast
- Forecast service → Agent orchestrator: runs issue
- Agent orchestrator → Run planning: plans run
- Agent orchestrator → Weather tools: fetches weather
- Weather tools → Weather archive: reads archive
- Weather archive → Weather cache: reads and writes
- Weather archive → Open-Meteo: fetches runs
- Agent orchestrator → Turbine history: loads history
- Agent orchestrator → Forecast features: prepares inputs
- Agent orchestrator → Generation models: runs model
- Agent orchestrator → Forecast artifacts: publishes issues
- Agent orchestrator → Agent run journal: records steps
- CLI → Metrics and replay: runs evaluation
- FastAPI routes → Forecast artifacts: reads issues and metrics
- FastAPI routes → Agent run journal: reads run log
- FastAPI routes → Ask the agent: answers questions
- Ask the agent → Agent run journal: reads journal
- Ask the agent → Forecast artifacts: reads issue facts
- Ask the agent → LLM summary: requests summary
- Agent journal view → Web API client: loads run logs
- Bid worksheet → Web API client: loads issue data
- Quality dashboard → Web API client: loads metrics
- IT integration view → Web API client: checks service