How cjh-blip/optiflow works
OptiFlow turns a lighting goal into a predicted layout and a DIALux-importable STF file. The documented main journey starts at the browser shell or an agent-facing protocol, passes through a shared service and orchestrator, and dispatches distinct algorithm and file-adapter steps. The plan artifact is the handoff between those steps; results include checks and stated model limits. The README also describes DXF import and IR validation. Their exact runtime wiring, and the unsampled HTTP/MCP handlers, are not inferred beyond documented boundaries.
Main entry points: service.py Platform service · orchestrator.py Pipeline orchestrator · engine.py Planning engine · adapter.py DIALux adapter
Components 24
User interfaces
- Browser shell
src/optiflow/shell.py - HTTP API
src/optiflow/api.py - MCP server
src/optiflow/mcp.py
Service and orchestration
- Platform service
src/optiflow/service.py - Pipeline orchestrator
src/optiflow/orchestrator.py - Adapter registry
src/optiflow/registry.py - Lighting pipeline
src/optiflow/pipelines.py - Step dispatcher
src/optiflow/dispatcher.py
Lighting planning
- Lumen adapter
src/optiflow/adapters/lumen.py - Planning engine
src/optiflow/algo/engine.py - Fixture layout
src/optiflow/algo/layout.py - Uniformity analysis
src/optiflow/algo/uniformity.py - Shared geometry
src/optiflow/geometry.py
DIALux file adapter
- DIALux adapter
src/optiflow/adapters/dialux/adapter.py - DXF import
src/optiflow/adapters/dialux/dxf.py - STF export
src/optiflow/adapters/dialux/stf.py - XLSX parsing
src/optiflow/adapters/dialux/xlsx.py
Shared models
- Plan artifact
- Task and shared IR
src/optiflow/ir.py - Job and results
src/optiflow/job.py - Project versions
src/optiflow/project.py - IR validator
src/optiflow/validator/__init__.py
Other components
- User or agent
- DIALux
Connections 29
- User or agent → Browser shell: enters goal
- User or agent → HTTP API: calls
- User or agent → MCP server: calls
- Browser shell → HTTP API: fetches
- HTTP API → Platform service: translates requests
- MCP server → Platform service: translates requests
- Platform service → Pipeline orchestrator: runs jobs
- Platform service → Adapter registry: lists capabilities
- Platform service → Lighting pipeline: selects pipeline
- Pipeline orchestrator → Lighting pipeline: runs steps
- Pipeline orchestrator → Adapter registry: resolves adapters
- Pipeline orchestrator → Step dispatcher: dispatches steps
- Step dispatcher → Lumen adapter: submits step
- Step dispatcher → DIALux adapter: submits step
- Lumen adapter → Planning engine: plans layout
- Planning engine → Fixture layout: arranges fixtures
- Planning engine → Uniformity analysis: evaluates uniformity
- Planning engine → Shared geometry: uses geometry
- Lumen adapter → Plan artifact: writes plan
- Lighting pipeline → Plan artifact: reads plan
- Lighting pipeline → Task and shared IR: rebuilds task
- DIALux adapter → STF export: exports through
- DIALux adapter → DXF import: imports through
- DIALux adapter → XLSX parsing: parses optionally
- DXF import → Task and shared IR: produces geometry
- STF export → DIALux: creates import file
- Platform service → Job and results: tracks jobs
- Pipeline orchestrator → Project versions: archives steps
- IR validator → Task and shared IR: validates