# Fly CNS implementation plan

**Goal:** Deliver a runnable real-data visual-to-motor propagation experiment.

**Architecture:** Public data preparation in Python produces a versioned graph JSON. A pure JavaScript simulation module powers a dependency-free browser workspace. A matching Python simulator supports reproducible local experiments.

**Spec:** ../specs/2026-09-06-fly-cns-design.md

**Constraints:** Real directed connectivity only; type/side aggregation; explicit sign assumptions; schematic layout; model rather than biological time; true motor labels from annotations; no fabricated calibration.

- [x] Prepare graph in `python/prepare_graph.py`; emit `dist/graph.json` with provenance, nodes, edges and stimulus groups. Validate every endpoint, count and annotation.
- [x] Write behavioral tests in `tests/simulation.test.mjs`. Implement `dist/sim.mjs` with `simulate(graph, options)` and `inputAt(time, options)`; verify causal propagation and lesion effects.
- [x] Implement the same model in `python/simulate.py`. Compare serialized trajectories across languages and generate baseline, no-input and silenced experiments.
- [x] Build `dist/index.html`, `dist/style.css` and `dist/app.mjs` with controls, graph animation, results, time slider and methodology. Verify syntax, references, exports and simulation behavior.
- [x] Document sources, model assumptions and local instructions; include the reproducible package as a download.
- [x] Commit and save the complete app, deploy privately and inspect terminal deployment status.

Full typed-CNS sparse model added and run successfully. The comparison identifies cropping effects, which are documented in the app and research notes. Hosting status is verified separately by the native deployment response.
