DD013 Draft GitHub Issues¶
Epic: DD013 — Simulation Stack Architecture
Generated from: DD013: Simulation Stack Architecture
Methodology: DD015 §2.2 — DD Issue Generator
Totals: 42 issues (ai-workable: 31 / human-expert: 11 | L1: 17, L2: 15, L3: 9)
Phase A: Foundation (Weeks 1–4)¶
Target: Contributors can docker compose run quick-test with their branch.
Issue 1: Create openworm.yml config schema¶
- Title:
[DD013] Create openworm.yml declarative configuration schema - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: python, yaml
- DD Section to Read: DD013 §1 — Simulation Configuration System
- Depends On: None
- Files to Modify:
openworm.yml(new file — root of repo)configs/validation_full.yml(new — full validation preset)
- Test Commands:
python3 -c "import yaml; yaml.safe_load(open('openworm.yml'))"yamllint openworm.yml
- Acceptance Criteria:
- [ ]
openworm.ymlexists at repo root with all sections from DD013 §1 (neural, body, muscle, pharynx, intestine, simulation, validation, output, visualization, viewer) - [ ] All default values match DD013 spec (e.g.,
neural.level: C1,simulation.duration: 15.0) - [ ] File is valid YAML (loads without error)
- [ ] Comments explain every parameter with DD cross-references
- [ ]
configs/validation_full.ymlenables all validation tiers
- [ ]
- Sponsor Summary Hint: This config file is the "control panel" for the entire worm simulation. Each section controls a different biological subsystem — neural circuit, body physics, muscles, pharynx, intestine. Contributors toggle subsystems on/off to test specific changes, just like a lab bench setup.
Issue 2: Write openworm.yml validation script¶
- Title:
[DD013] Write Python validation script for openworm.yml - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: python, yaml
- DD Section to Read: DD013 §1 — Simulation Configuration System
- Depends On: Issue 1
- Files to Modify:
scripts/validate_config.py(new)tests/test_config.py(new)
- Test Commands:
python3 scripts/validate_config.py openworm.ymlpytest tests/test_config.py
- Acceptance Criteria:
- [ ] Script validates YAML structure against expected schema
- [ ] Detects missing required sections, invalid types, out-of-range values
- [ ] Validates cross-section constraints (e.g.,
muscle.enabledrequiresneural.enabled) - [ ] Returns exit code 0 on valid config, non-zero on invalid
- [ ] Unit tests cover valid config, missing sections, invalid values, cross-constraints
- Sponsor Summary Hint: A guard-rail script that checks the simulation config file before running. Like a preflight checklist — catches typos and invalid settings before wasting 20 minutes on a failed build.
Issue 3: Create multi-stage Dockerfile (6 stages)¶
- Title:
[DD013] Create multi-stage Dockerfile with base, neural, body, validation, full, and viewer stages - Labels:
DD013,ai-workable,L2 - Target Repo:
openworm/OpenWorm - Required Capabilities: docker
- DD Section to Read: DD013 §2 — Multi-Stage Docker Build
- Depends On: Issue 1
- Files to Modify:
Dockerfile(replace existing monolithic Dockerfile)
- Test Commands:
docker build --target base -t openworm/base .docker build --target neural -t openworm/neural .docker build --target full -t openworm/full .
- Acceptance Criteria:
- [ ] 6 named stages:
base,neural,body,validation,full,viewer - [ ]
baseinstalls Ubuntu 24.04, Python 3, NEURON 8.2.6, build tools - [ ]
neuralclones c302 at$C302_REFbuild arg - [ ]
bodyclones Sibernetic at$SIBERNETIC_REFbuild arg, builds with cmake - [ ]
fullcopies from neural + body + validation stages - [ ]
viewerextends full with Trame/VTK/OME-Zarr deps - [ ] Each stage builds independently (
docker build --target <stage>) - [ ] Build args allow contributor override of subsystem branches
- [ ] 6 named stages:
- Sponsor Summary Hint: The Docker image is how every contributor runs the simulation identically. The multi-stage design means changing one subsystem (e.g., the neural circuit) only rebuilds that layer — 5 min instead of 20 min. Like modular LEGO vs. a single molded block.
Issue 4: Create docker-compose.yml (quick-test, simulation, shell)¶
- Title:
[DD013] Create docker-compose.yml with quick-test, simulation, validate, and shell services - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: docker
- DD Section to Read: DD013 §3 — Docker Compose for Composable Execution
- Depends On: Issue 3
- Files to Modify:
docker-compose.yml(new file)
- Test Commands:
docker compose config(validates YAML)docker compose build simulation
- Acceptance Criteria:
- [ ] Services defined:
quick-test,simulation,validate,shell - [ ]
quick-testruns 10ms sim with--no-video - [ ]
simulationruns default 15ms with 8G memory limit - [ ]
validateruns full validation config with 16G memory limit - [ ]
shellprovides interactive bash with volumes mounted - [ ] Shared
./outputvolume on all services - [ ]
docker compose configvalidates without errors
- [ ] Services defined:
- Sponsor Summary Hint: Docker Compose lets contributors run different modes with one command:
quick-testfor a 2-minute sanity check,simulationfor the full run,validatefor CI-level checks, andshellfor interactive debugging. Each mode maps to a step in the scientific workflow.
Issue 5: Add viewer service to docker-compose¶
- Title:
[DD013] Add viewer service to docker-compose.yml for DD014 visualization - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: docker
- DD Section to Read: DD013 §3 — Docker Compose (viewer service block) and DD014
- Depends On: Issue 4
- Files to Modify:
docker-compose.yml(addviewerservice)
- Test Commands:
docker compose config
- Acceptance Criteria:
- [ ]
viewerservice defined targetingviewerDocker stage - [ ] Exposes port 8501
- [ ]
depends_on: simulationwithservice_completed_successfullycondition - [ ] Mounts
./outputvolume for reading OME-Zarr data - [ ] Runs
viewer/app.pypointing atoutput/openworm.zarr
- [ ]
- Sponsor Summary Hint: The viewer service launches a 3D visualization of the simulation output (body shape, neural activity, muscle forces) in a web browser. It reads the OME-Zarr data bus — the universal data format that all subsystems write to. See DD014.
Issue 6: Add neural-dev service to docker-compose¶
- Title:
[DD013] Add neural-dev service to docker-compose.yml for neural-only development - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: docker
- DD Section to Read: DD013 §3 — Docker Compose (neural-dev service block)
- Depends On: Issue 4
- Files to Modify:
docker-compose.yml(addneural-devservice)
- Test Commands:
docker compose config
- Acceptance Criteria:
- [ ]
neural-devservice targets theneuralDocker stage - [ ] Runs c302 network generation (
generate('C1', 'FW')) - [ ] Mounts
./outputvolume - [ ] No body physics dependencies required
- [ ]
- Sponsor Summary Hint: This lets neural circuit developers test their changes without building the body physics engine (Sibernetic). It's like testing the worm's brain in isolation — faster iteration for anyone working on DD001 neural architecture.
Issue 7: Create versions.lock with pinned commits¶
- Title:
[DD013] Create versions.lock file with pinned dependency commits - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: git, yaml
- DD Section to Read: DD013 §4 — Dependency Pinning
- Depends On: None
- Files to Modify:
versions.lock(new file — root of repo)
- Test Commands:
python3 -c "import yaml; yaml.safe_load(open('versions.lock'))"
- Acceptance Criteria:
- [ ] Entries for: c302, sibernetic, connectome_toolbox, neuron, open_worm_analysis_toolbox, tracker_commons, owmeta
- [ ] Each entry has
repo,commit(actual current hash from each repo's main branch),tag(if applicable) - [ ]
systemsection pins ubuntu, python, java versions - [ ]
opencl_sdksection with URL and sha256 placeholder - [ ] Valid YAML
- [ ] Comments explain that only Integration Maintainer updates this file
- Sponsor Summary Hint: Dependency pinning ensures every contributor builds the exact same simulation. Without it, one person might get a newer c302 version that's incompatible with Sibernetic. Like freezing a recipe's ingredient list — reproducible science requires reproducible builds.
Issue 8: Write build.sh (reads versions.lock, passes Docker build args)¶
- Title:
[DD013] Write build.sh script that reads versions.lock and passes build args to Docker - Labels:
DD013,ai-workable,L2 - Target Repo:
openworm/OpenWorm - Required Capabilities: python, docker
- DD Section to Read: DD013 §4 — Dependency Pinning (build script section)
- Depends On: Issue 7
- Files to Modify:
build.sh(replace existing)
- Test Commands:
bash build.sh --dry-run(prints docker build command without executing)shellcheck build.sh
- Acceptance Criteria:
- [ ] Reads
versions.lockto extract commit hashes for each subsystem - [ ] Passes
--build-arg C302_REF=<hash>and--build-arg SIBERNETIC_REF=<hash>todocker build - [ ] Tags image with version from
VERSIONfile - [ ] Supports
--dry-runflag for testing - [ ] Supports override args (e.g.,
build.sh --c302-ref my-branch) - [ ] Passes shellcheck
- [ ] Reads
- Sponsor Summary Hint: This script is the bridge between
versions.lock(which says what versions to use) and the Docker build (which compiles them). It reads the pinned commits and feeds them to the Dockerfile as build arguments.
Issue 9: Refactor master_openworm.py Step 1 — config loading¶
- Title:
[DD013] Refactor master_openworm.py to load and use openworm.yml configuration - Labels:
DD013,ai-workable,L2 - Target Repo:
openworm/OpenWorm - Required Capabilities: python
- DD Section to Read: DD013 §5 — Enhanced master_openworm.py (Step 1) and DD013 §1 — Config System
- Depends On: Issue 1
- Files to Modify:
master_openworm.py
- Test Commands:
python3 master_openworm.py --config openworm.yml --dry-runpytest tests/test_master_openworm.py
- Acceptance Criteria:
- [ ]
master_openworm.pyaccepts--configargument pointing toopenworm.yml - [ ] Loads config via
yaml.safe_load(), validates structure - [ ] Replaces hardcoded defaults with config values
- [ ] Falls back to
default_config.ymlif no--configspecified - [ ] Adds
--dry-runflag that prints config and exits without running simulation - [ ] Existing Step 3 behavior unchanged when using default config
- [ ]
- Sponsor Summary Hint: The orchestrator script (
master_openworm.py) currently has simulation parameters hardcoded. This refactor makes it read fromopenworm.ymlinstead, so contributors can change what the simulation does by editing a config file rather than Python code.
Issue 10: Refactor master_openworm.py Step 2 — subsystem init¶
- Title:
[DD013] Implement master_openworm.py Step 2: conditional subsystem initialization - Labels:
DD013,human-expert,L3 - Target Repo:
openworm/OpenWorm - Required Capabilities: python, neuroml
- DD Section to Read: DD013 §5 — Enhanced master_openworm.py (Step 2) and DD001 (c302 network generation)
- Depends On: Issue 9
- Files to Modify:
master_openworm.py
- Test Commands:
python3 master_openworm.py --config configs/neural_only.yml --dry-rundocker compose run quick-test
- Acceptance Criteria:
- [ ] Step 2 initializes each subsystem conditionally based on config
enabledflags - [ ]
neural.enabled: true→ generates c302 network at specifiedlevelandreference - [ ]
body.enabled: true→ initializes Sibernetic with specifiedbackendandparticle_count - [ ]
pharynx.enabled: false→ skips pharynx initialization (placeholder for future) - [ ]
intestine.enabled: false→ skips intestine initialization (placeholder for future) - [ ] Error messages if a dependent subsystem is disabled (e.g., muscle without neural)
- [ ] Step 2 initializes each subsystem conditionally based on config
- Sponsor Summary Hint: Step 2 is where the simulation "wakes up" each organ system. If neural is enabled, c302 generates the worm's neural circuit (302 neurons, thousands of synapses). If body is enabled, Sibernetic initializes the fluid dynamics for the worm's physical body. The config file controls which organs are active — like choosing which systems to study in a virtual dissection.
Issue 11: Refactor master_openworm.py Step 3 — coupled sim loop¶
- Title:
[DD013] Implement master_openworm.py Step 3: configurable coupled simulation loop - Labels:
DD013,human-expert,L3 - Target Repo:
openworm/OpenWorm - Required Capabilities: python, neuroml
- DD Section to Read: DD013 §5 — Enhanced master_openworm.py (Step 3)
- Depends On: Issue 10
- Files to Modify:
master_openworm.py
- Test Commands:
docker compose run quick-testdocker compose run simulation
- Acceptance Criteria:
- [ ] Coupled simulation loop uses config values:
simulation.duration,simulation.dt_neuron,simulation.dt_coupling - [ ] Each enabled subsystem advances one timestep per loop iteration
- [ ] Data exchange at coupling boundaries (Ca2+ from neural → forces in muscle → body physics)
- [ ] Output frames written at
simulation.output_intervalfrequency - [ ] Simulation runs to configured
durationand exits cleanly - [ ] Quick test (10ms) completes in <5 minutes
- [ ] Coupled simulation loop uses config values:
- Sponsor Summary Hint: This is the actual simulation loop — the "heartbeat" of the virtual worm. Each tick, the neural circuit computes which neurons fire, calcium signals propagate to muscles, muscles generate forces, and the body physics engine moves the virtual worm's particles through fluid. The coupling interval (
dt_coupling) determines how often these systems exchange data.
Issue 12: Create scripts/quick-test.sh¶
- Title:
[DD013] Create scripts/quick-test.sh smoke test for contributors - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: docker, testing
- DD Section to Read: DD013 §3 — Docker Compose and DD013 Quality Criteria (criterion 2: <5 min)
- Depends On: Issue 4
- Files to Modify:
scripts/quick-test.sh(new)
- Test Commands:
bash scripts/quick-test.shshellcheck scripts/quick-test.sh
- Acceptance Criteria:
- [ ] Runs
docker compose run quick-test - [ ] Checks output directory for expected files (PNGs, WCON)
- [ ] Prints PASS/FAIL summary
- [ ] Returns exit code 0 on success, non-zero on failure
- [ ] Completes in <5 minutes total
- [ ] Passes shellcheck
- [ ] Runs
- Sponsor Summary Hint: The contributor smoke test — a 2-minute sanity check that runs a minimal 10ms simulation and verifies outputs exist. Every contributor should run this before submitting a PR. It's the minimum bar: "does it still run?"
Issue 13: CI Gate 1 — Docker build on PR/push¶
- Title:
[DD013] Create GitHub Actions CI Gate 1: Docker build verification - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: ci-cd
- DD Section to Read: DD013 §6 — CI/CD Pipeline (Gate 1)
- Depends On: Issue 3
- Files to Modify:
.github/workflows/integration.yml(new)
- Test Commands:
- Push to a test branch and verify Actions workflow runs
- Acceptance Criteria:
- [ ] Triggers on
pull_requesttomain/dev*andpushtomain - [ ]
buildjob runsdocker compose build simulation - [ ] 30-minute timeout
- [ ] Runs on
ubuntu-latest - [ ] Fails if Docker build fails
- [ ] Triggers on
- Sponsor Summary Hint: The first CI gate: does it compile? Every PR automatically builds the Docker image. If a code change breaks the build, the contributor knows immediately — no waiting for human review to discover a syntax error.
Issue 14: CI Gate 2 — smoke test¶
- Title:
[DD013] Create GitHub Actions CI Gate 2: smoke test after build - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: ci-cd
- DD Section to Read: DD013 §6 — CI/CD Pipeline (Gate 2)
- Depends On: Issue 12, Issue 13
- Files to Modify:
.github/workflows/integration.yml(addsmoke-testjob)
- Test Commands:
- Push to a test branch and verify smoke test job runs after build
- Acceptance Criteria:
- [ ]
smoke-testjob runs afterbuildjob succeeds - [ ] Runs
docker compose run quick-test - [ ] Checks that output PNGs and WCON file exist
- [ ] 10-minute timeout
- [ ] Fails if outputs are missing
- [ ]
- Sponsor Summary Hint: The second CI gate: does it run? After the build succeeds, CI runs a minimal simulation and checks that outputs (plots, movement data) were actually generated. Catches runtime errors that passed compilation.
Issue 15: Fix video pipeline memory leak¶
- Title:
[DD013] Fix video pipeline memory leak (OOM at >2s simulations) - Labels:
DD013,human-expert,L3 - Target Repo:
openworm/OpenWorm - Required Capabilities: python, docker
- DD Section to Read: DD013 §5 — Enhanced master_openworm.py (video pipeline fix options) and DD013 Context — Known Issues
- Depends On: None
- Files to Modify:
master_openworm.py(video recording section)- Possibly
sibernetic_c302.pyor related rendering code
- Test Commands:
docker compose run simulationwithsimulation.duration: 2000(2 seconds)- Monitor memory:
docker statsduring run
- Acceptance Criteria:
- [ ] 2-second simulation completes without OOM kill on 8GB RAM
- [ ] 5-second simulation completes without OOM kill on 16GB RAM
- [ ] Video output generated (or cleanly skipped with
--no-video) - [ ] Fix uses one of: headless rendering (OSMesa/EGL), post-hoc visualization, or streaming to disk
- [ ] Related issues #332, #341 resolved
- Sponsor Summary Hint: The current simulation records video by capturing screenshots of a virtual display — but it stores ALL frames in memory, causing out-of-memory crashes for simulations longer than 2 seconds. A 5s sim needs 64GB RAM just for video. The fix decouples recording from simulation, either by rendering headlessly or saving positions and creating video afterwards.
Issue 16: Fix Docker GPU passthrough and backend selection¶
- Title:
[DD013] Fix Docker GPU passthrough and backend selection - Labels:
DD013,human-expert,L3 - Target Repo:
openworm/OpenWorm - Required Capabilities: docker
- DD Section to Read: DD013 Context — Known Issues, DD013 Open Questions (question 2), and DD003 Backend Stabilization Roadmap
- Depends On: None
- Files to Modify:
Dockerfile(OpenCL/GPU layers + conditional Taichi/PyTorch installation)docker-compose.yml(GPU device passthrough)
- Test Commands:
docker compose run simulationwith GPU availableclinfoinside container to verify OpenCL device visibledocker compose run simulationwithbody.backend: pytorch(verify backend selection works)
- Acceptance Criteria:
- [ ] Sibernetic detects and uses GPU via OpenCL inside Docker container
- [ ] docker-compose.yml includes GPU device passthrough config (nvidia-docker2 or similar)
- [ ] Falls back to CPU OpenCL gracefully when no GPU available
- [ ]
body.backendconfig selects between opencl, pytorch, taichi-metal, taichi-cuda - [ ] Taichi/PyTorch deps installed conditionally based on selected backend
- [ ] Performance improvement documented (expect ~10x speedup for GPU backends)
- [ ] Issue #320 resolved
- Sponsor Summary Hint: Sibernetic simulates the worm's body as ~100,000 fluid particles — massively parallel computation that GPUs excel at. Currently the Docker image forces CPU-only OpenCL mode (10x slower) and doesn't support alternative backends. This broadens Docker to support GPU passthrough AND conditional installation of Taichi/PyTorch backends per the DD003 Backend Stabilization Roadmap.
Issue 17: Pin apt packages + add virtualenv¶
- Title:
[DD013] Pin apt package versions and add Python virtualenv to Dockerfile - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: docker
- DD Section to Read: DD013 Context — Known Issues (dependency pinning, virtualenv rows) and DD013 §4 — Dependency Pinning
- Depends On: Issue 3
- Files to Modify:
Dockerfile(base stage)
- Test Commands:
docker build --target base .docker run openworm/base pip --version(verify virtualenv active)
- Acceptance Criteria:
- Sponsor Summary Hint: Without pinned package versions, the exact same Dockerfile can produce different results on different days — a package update could silently break the simulation. Using virtualenv isolates Python dependencies, preventing conflicts with system packages. Both are standard practices for reproducible science.
Phase B: Validation Integration (Weeks 5–8)¶
Target: PRs to main are automatically validated. JupyterLab available for exploration.
Issue 18: master_openworm.py Step 4 — output generation¶
- Title:
[DD013] Implement master_openworm.py Step 4: output generation (plots, WCON, video) - Labels:
DD013,ai-workable,L2 - Target Repo:
openworm/OpenWorm - Required Capabilities: python
- DD Section to Read: DD013 §5 — Enhanced master_openworm.py (Step 4)
- Depends On: Issue 11
- Files to Modify:
master_openworm.py(Step 4 implementation)
- Test Commands:
docker compose run simulationls output/(verify PNGs, WCON, optional MP4)
- Acceptance Criteria:
- [ ] Generates membrane potential plots (PNG)
- [ ] Generates calcium concentration plots (PNG)
- [ ] Generates movement trajectory plots (PNG)
- [ ] Exports WCON trajectory file
- [ ] Generates video if
output.video: true(and memory leak is fixed) - [ ] Respects
output.directoryconfig setting - [ ] All outputs written to the shared output volume
- Sponsor Summary Hint: Step 4 turns raw simulation data into human-readable outputs. Membrane potential plots show which neurons fired when (like an EEG for the worm). WCON is a standardized movement data format so other tools can analyze the worm's locomotion. This is where computation becomes science.
Issue 19: master_openworm.py Step 4b — OME-Zarr export¶
- Title:
[DD013] Implement master_openworm.py Step 4b: OME-Zarr data export for DD014 viewer - Labels:
DD013,ai-workable,L2 - Target Repo:
openworm/OpenWorm - Required Capabilities: python
- DD Section to Read: DD013 §5 — Enhanced master_openworm.py (Step 4b) and DD014 (OME-Zarr schema)
- Depends On: Issue 18
- Files to Modify:
master_openworm.py(Step 4b implementation)
- Test Commands:
docker compose run simulationpython3 -c "import zarr; z = zarr.open('output/openworm.zarr'); print(list(z.keys()))"
- Acceptance Criteria:
- [ ] Exports
openworm.zarrwith groups:body/positions,body/types,neural/voltage,neural/calcium,muscle/activation - [ ] Writes at
visualization.export_intervalfrequency - [ ] Runs marching cubes surface reconstruction if
visualization.surface_reconstruction: true - [ ] Only runs if
visualization.enabled: true - [ ] Zarr file readable by DD014 viewer
- [ ] Exports
- Sponsor Summary Hint: OME-Zarr is the universal data bus for the whole simulation — every subsystem writes its state to a shared Zarr store. The DD014 viewer reads this to render 3D visualizations. It's like a shared whiteboard where each organ writes its current state, and the viewer reads all of them at once.
Issue 20: master_openworm.py Step 5 — DD010 validation¶
- Title:
[DD013] Implement master_openworm.py Step 5: DD010 validation framework integration - Labels:
DD013,human-expert,L2 - Target Repo:
openworm/OpenWorm - Required Capabilities: python, testing
- DD Section to Read: DD013 §5 — Enhanced master_openworm.py (Step 5) and DD010
- Depends On: Issue 18
- Files to Modify:
master_openworm.py(Step 5 implementation)scripts/check_ci_results.py(new — parses validation report)
- Test Commands:
docker compose run validatepython3 scripts/check_ci_results.py output/validation_report.json
- Acceptance Criteria:
- [ ] Runs Tier 1 (electrophysiology) if
validation.tier1_electrophysiology: true - [ ] Runs Tier 2 (functional connectivity) if
validation.tier2_functional_connectivity: true - [ ] Runs Tier 3 (behavioral kinematics) if
validation.tier3_behavioral: true - [ ] Generates
validation_report.jsonwith pass/fail per tier - [ ] Exits with non-zero code if any enabled tier fails
- [ ]
check_ci_results.pyparses report and prints human-readable summary
- [ ] Runs Tier 1 (electrophysiology) if
- Sponsor Summary Hint: Validation is how we know the simulation is scientifically accurate. Tier 1 checks individual neuron behavior against patch-clamp recordings. Tier 2 compares circuit-level activity patterns against Randi 2023 whole-brain imaging data. Tier 3 compares the virtual worm's movement to real worm videos. It's the scientific method applied to simulation.
Issue 21: CI Gate 3 — Tier 2 validation on PRs¶
- Title:
[DD013] Create GitHub Actions CI Gate 3: Tier 2 validation on pull requests - Labels:
DD013,ai-workable,L2 - Target Repo:
openworm/OpenWorm - Required Capabilities: ci-cd
- DD Section to Read: DD013 §6 — CI/CD Pipeline (Gate 3)
- Depends On: Issue 14, Issue 20
- Files to Modify:
.github/workflows/integration.yml(addtier2-validationjob)
- Test Commands:
- Open a PR and verify Tier 2 validation job runs
- Acceptance Criteria:
- [ ]
tier2-validationjob runs aftersmoke-testsucceeds - [ ] Only runs on
pull_requestevents - [ ] Runs
docker compose run validatewith Tier 2 config - [ ] Calls
check_ci_results.pyto verify pass/fail - [ ] 60-minute timeout
- [ ] Reports results as PR check
- [ ]
- Sponsor Summary Hint: This CI gate runs circuit-level validation (functional connectivity) on every PR. If a code change breaks the neural circuit's behavior relative to real worm brain data, the PR is automatically flagged. No more "merge and hope" — science checks happen before human review.
Issue 22: CI Gate 4 — Tier 3 validation on main¶
- Title:
[DD013] Create GitHub Actions CI Gate 4: Tier 3 behavioral validation on main branch - Labels:
DD013,ai-workable,L2 - Target Repo:
openworm/OpenWorm - Required Capabilities: ci-cd
- DD Section to Read: DD013 §6 — CI/CD Pipeline (Gate 4)
- Depends On: Issue 21
- Files to Modify:
.github/workflows/integration.yml(addtier3-validationjob)
- Test Commands:
- Merge to main and verify Tier 3 job triggers
- Acceptance Criteria:
- [ ]
tier3-validationjob runs aftersmoke-testsucceeds - [ ] Only runs on
pushtomain - [ ] Runs 5-second simulation with Tier 3 behavioral validation
- [ ] Uploads
validation_report.jsonas GitHub artifact - [ ] 120-minute timeout
- [ ] Reports results as commit status
- [ ]
- Sponsor Summary Hint: The strongest validation gate — only runs when code lands on main. It simulates 5 seconds of worm movement and compares locomotion kinematics (speed, wavelength, amplitude) against real worm videos from the Schafer lab. This is the ultimate test: does the virtual worm move like a real worm?
Issue 23: Add JupyterLab service to docker-compose¶
- Title:
[DD013] Add JupyterLab service to docker-compose.yml for interactive exploration - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: docker
- DD Section to Read: DD013 §9 — JupyterLab Interface
- Depends On: Issue 4
- Files to Modify:
docker-compose.yml(addjupyterservice)
- Test Commands:
docker compose up jupyter- Open
http://localhost:8888in browser
- Acceptance Criteria:
- [ ]
jupyterservice targetsfullDocker stage - [ ] Runs
jupyter labon port 8888 - [ ] Mounts
./outputand./notebooksdirectories - [ ] No authentication token (empty token for local use)
- [ ] JupyterLab accessible at
http://localhost:8888
- [ ]
- Sponsor Summary Hint: JupyterLab gives newcomers an interactive notebook environment inside the simulation container. They can explore the connectome, run simulations, and visualize results — all in a web browser. This directly supports DD011 L0→L1 onboarding.
Issue 24: Notebook: 02_run_c302_network.ipynb¶
- Title:
[DD013] Create starter notebook 02_run_c302_network.ipynb - Labels:
DD013,ai-workable,L2 - Target Repo:
openworm/OpenWorm - Required Capabilities: python, neuroml
- DD Section to Read: DD013 §9 — JupyterLab Interface and DD001 (c302 framework)
- Depends On: Issue 23
- Existing Code to Reuse:
c302/examples/test/Comparison.ipynb— Existing Jupyter notebook comparing c302 configurations (starting point)
- Files to Modify:
notebooks/02_run_c302_network.ipynb(new)
- Test Commands:
jupyter nbconvert --execute notebooks/02_run_c302_network.ipynb
- Acceptance Criteria:
- [ ] Generates a c302 Level C1 network for the forward locomotion reference (FW)
- [ ] Lists all 302 neurons with their classification (sensory, inter, motor)
- [ ] Runs a short NEURON simulation (5ms)
- [ ] Plots membrane potentials for selected neurons (AVBL, DB1, VB1, DD1, VD1)
- [ ] Plots muscle calcium traces showing alternating dorsoventral activation
- [ ] Visualizes the forward locomotion subcircuit (AVB → B-type → muscles, cross-inhibition)
- [ ] Explains c302 levels (A, B, C, C1, C2, D) in markdown cells
- [ ] Includes markdown explaining the circuit biology at undergraduate level
- [ ] Runs to completion without errors
- Sponsor Summary Hint: An interactive guided tour of the virtual worm's brain. You generate the 302-neuron circuit, zoom into the forward locomotion pathway, and watch how command neurons (AVB) activate motor neurons (DB, VB) that drive muscles — while inhibitory neurons (DD, VD) create the alternating dorsal/ventral pattern needed for undulatory crawling. Different c302 "levels" add more biological detail — from simple connectivity (Level A) to full channel dynamics (Level D).
Issue 25: Notebook: 03_analyze_output.ipynb¶
- Title:
[DD013] Create starter notebook 03_analyze_output.ipynb - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: python
- DD Section to Read: DD013 §9 — JupyterLab Interface
- Depends On: Issue 23
- Files to Modify:
notebooks/03_analyze_output.ipynb(new)
- Test Commands:
jupyter nbconvert --execute notebooks/03_analyze_output.ipynb
- Acceptance Criteria:
- [ ] Loads simulation output from
./output/directory - [ ] Plots neural activity traces (membrane potentials, calcium)
- [ ] Plots body movement trajectory from WCON file
- [ ] Shows energy consumption over time
- [ ] Includes markdown explaining what each plot means biologically
- [ ] Runs to completion (requires output from a prior simulation run)
- [ ] Loads simulation output from
- Sponsor Summary Hint: After running a simulation, this notebook helps you understand the results. Each plot tells a biological story: membrane potentials show when neurons fire, calcium traces show muscle activation, and the WCON trajectory shows how the virtual worm actually moved through space.
Issue 26: Notebook: 04_validate_against_data.ipynb¶
- Title:
[DD013] Create starter notebook 04_validate_against_data.ipynb - Labels:
DD013,ai-workable,L2 - Target Repo:
openworm/OpenWorm - Required Capabilities: python, testing
- DD Section to Read: DD013 §9 — JupyterLab Interface and DD010
- Depends On: Issue 23
- Files to Modify:
notebooks/04_validate_against_data.ipynb(new)
- Test Commands:
jupyter nbconvert --execute notebooks/04_validate_against_data.ipynb
- Acceptance Criteria:
- [ ] Loads simulation output and experimental reference data
- [ ] Runs Tier 1 validation comparison (simulated vs. recorded electrophysiology)
- [ ] Plots side-by-side comparison of simulated vs. real worm movement
- [ ] Computes and displays validation metrics (correlation, error)
- [ ] Explains what "good" and "bad" validation looks like
- [ ] Runs to completion (requires output from a prior simulation run)
- Sponsor Summary Hint: This notebook compares the virtual worm to the real worm. Does the simulated AVAL neuron fire at the right voltage? Does the virtual worm crawl at the right speed? Validation is how we know the simulation is doing science, not just computing. See DD010.
Phase C: Subsystem Expansion (Weeks 9–16)¶
Target: New subsystems plug into the stack via config toggles.
Issue 27: DD005 cell-type specialization hooks¶
- Title:
[DD013] Add DD005 cell-type specialization config hooks and subsystem init - Labels:
DD013,ai-workable,L2 - Target Repo:
openworm/OpenWorm - Required Capabilities: python
- DD Section to Read: DD005 (Integration Contract) and DD013 §1 (
neural.differentiatedconfig) - Depends On: Issue 9
- Files to Modify:
openworm.yml(verifyneural.differentiatedflag exists)master_openworm.py(add conditional init for cell-type specialization)
- Test Commands:
python3 master_openworm.py --config configs/differentiated.yml --dry-run
- Acceptance Criteria:
- [ ]
neural.differentiated: truetriggers CeNGEN-based cell-type specialization in c302 - [ ]
neural.differentiated: falseuses current behavior (302 identical neurons) - [ ] Placeholder integration code in
master_openworm.pywith clear TODO markers for DD005 implementation - [ ] Config documented with reference to DD005
- [ ]
- Sponsor Summary Hint: In reality, the worm's 302 neurons aren't identical — they come in 128 distinct types with different gene expression profiles (from the CeNGEN atlas). DD005 defines how to differentiate them. This issue adds the config toggle and initialization hook so the simulation can switch between "all neurons identical" and "128 types" mode.
Issue 28: DD004 mechanical cell identity¶
- Title:
[DD013] Add DD004 mechanical cell identity integration for Sibernetic particles - Labels:
DD013,ai-workable,L2 - Target Repo:
openworm/Sibernetic - Required Capabilities: python
- DD Section to Read: DD004 (Integration Contract) and DD013 §5 (Step 4b,
body/cell_idsin OME-Zarr) - Depends On: Issue 19
- Files to Modify:
- Sibernetic particle output code (add cell ID tags)
master_openworm.py(exportbody/cell_idsto OME-Zarr)
- Test Commands:
python3 -c "import zarr; z = zarr.open('output/openworm.zarr'); print('cell_ids' in z['body'])"
- Acceptance Criteria:
- [ ] Sibernetic particles tagged with cell identity (muscle, hypodermis, cuticle, etc.)
- [ ]
body.cell_identity: trueconfig flag activates tagging - [ ] Cell IDs exported to
body/cell_idsarray in OME-Zarr - [ ] Viewer can color-code particles by cell type
- Sponsor Summary Hint: The worm's body isn't homogeneous — it has muscles, skin (hypodermis), a tough outer layer (cuticle), and internal organs, each with different mechanical properties. DD004 tags each simulated particle with its cell type. This issue wires that into the OME-Zarr data bus so the viewer can display cells in different colors.
Issue 29: DD006 neuropeptide integration¶
- Title:
[DD013] Add DD006 neuropeptide modulation coupling to simulation loop - Labels:
DD013,human-expert,L3 - Target Repo:
openworm/c302+openworm/OpenWorm - Required Capabilities: python, neuroml
- DD Section to Read: DD006 (Integration Contract) and DD013 §5 (Step 3, coupling)
- Depends On: Issue 11
- Files to Modify:
master_openworm.py(neuropeptide coupling in simulation loop)- c302 neuropeptide module (GPCR modulation equations)
openworm.yml(neural.neuropeptidessection)
- Test Commands:
docker compose run simulationwithneural.neuropeptides: truepython3 -c "import zarr; z = zarr.open('output/openworm.zarr'); print('concentrations' in z['neuropeptides'])"
- Acceptance Criteria:
- [ ] Neuropeptide modulation runs in the coupled simulation loop when
neural.neuropeptides: true - [ ] Peptide concentration fields computed and exchanged with neural subsystem each coupling step
- [ ] GPCR modulation affects synaptic weights per DD006 equations
- [ ]
neuropeptides/concentrationsexported to OME-Zarr - [ ] Simulation still runs correctly when
neural.neuropeptides: false
- [ ] Neuropeptide modulation runs in the coupled simulation loop when
- Sponsor Summary Hint: Beyond fast electrical synapses, worm neurons also communicate via neuropeptides — small signaling molecules that diffuse between cells and modulate behavior over longer timescales. DD006 defines 31,479 peptide-receptor interactions. This issue integrates that slow signaling layer into the simulation loop alongside the fast neural circuit.
Issue 30: DD007 pharynx model integration¶
- Title:
[DD013] Add DD007 pharyngeal nervous system integration to simulation stack - Labels:
DD013,human-expert,L3 - Target Repo: New pharynx repo +
openworm/OpenWorm - Required Capabilities: python, neuroml
- DD Section to Read: DD007 (Integration Contract) and DD013 §7 (adding new subsystem workflow)
- Depends On: Issue 11
- Files to Modify:
- New repo: pharynx model code
Dockerfile(add pharynx Docker stage)docker-compose.yml(pharynx service if needed)master_openworm.py(pharynx init + coupling in loop)openworm.yml(pharynx section already present asenabled: false)versions.lock(add pharynx repo entry)
- Test Commands:
docker compose run simulationwithpharynx.enabled: true- Verify pumping frequency ~3.5 Hz in output
- Acceptance Criteria:
- [ ] Pharynx model repo created with basic 20-neuron circuit
- [ ] Docker stage added for pharynx dependencies
- [ ]
pharynx.enabled: trueactivates pharynx in simulation loop - [ ] Pharynx neural activity coupled to main nervous system via RIP interneurons
- [ ] Pumping events exported to
pharynx/pumping_statein OME-Zarr - [ ]
pharynx.pumping_frequency_targetused for validation
- Sponsor Summary Hint: The pharynx is the worm's feeding organ — a muscular pump with its own 20-neuron nervous system that operates semi-independently from the rest of the body. It pumps bacteria at ~3.5 Hz. DD007 specifies its architecture. This issue creates the repo, builds the Docker stage, and wires it into the simulation loop.
Issue 31: DD009 intestine model integration¶
- Title:
[DD013] Add DD009 intestinal oscillator model integration to simulation stack - Labels:
DD013,human-expert,L3 - Target Repo: New intestine repo +
openworm/OpenWorm - Required Capabilities: python, neuroml
- DD Section to Read: DD009 (Integration Contract) and DD013 §7 (adding new subsystem workflow)
- Depends On: Issue 11
- Files to Modify:
- New repo: intestine model code
Dockerfile(add intestine Docker stage)master_openworm.py(intestine init + coupling in loop)openworm.yml(intestine section already present asenabled: false)versions.lock(add intestine repo entry)
- Test Commands:
docker compose run simulationwithintestine.enabled: true- Verify oscillation period ~50s in output
- Acceptance Criteria:
- [ ] Intestine model repo created with 20-cell calcium oscillator
- [ ] Docker stage added for intestine dependencies
- [ ]
intestine.enabled: trueactivates intestine in simulation loop - [ ] Calcium wave propagation across 20 intestinal cells
- [ ]
intestine/calciumandintestine/defecation_eventsexported to OME-Zarr - [ ]
intestine.oscillator_period_targetused for validation
- Sponsor Summary Hint: The worm's intestine generates rhythmic calcium waves (~50-second period) that drive the defecation motor program — one of the most regular biological clocks in nature. DD009 specifies the 20-cell oscillator model. This issue creates the repo, Docker stage, and simulation coupling.
Phase D: Polish & Onboarding (Weeks 17–20)¶
Target: A newcomer can experience the full simulation in a browser via MyBinder, then progress to local Docker for development.
Issue 32: Write getting-started guide¶
- Title:
[DD013] Write getting-started guide for new contributors - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: docs
- DD Section to Read: DD013 §7 — Contributor Development Workflow and DD013 Quality Criteria (criterion 8: clone-to-simulation in <30 min)
- Depends On: Issue 4, Issue 12
- Files to Modify:
GETTING_STARTED.md(new)README.md(update to link to getting-started guide)
- Test Commands:
- Follow the guide on a clean machine with only Docker installed
- Acceptance Criteria:
- [ ] Step-by-step instructions from
git cloneto running simulation - [ ] Covers: clone repo,
docker compose run quick-test, inspect output, make a change, re-test - [ ] Time estimate <30 minutes (using pre-built Docker image pull)
- [ ] Troubleshooting section for common issues (Docker not running, port conflicts, etc.)
- [ ] Links to JupyterLab notebooks for deeper exploration
- [ ] Links to DD013 for architecture understanding
- [ ] Step-by-step instructions from
- Sponsor Summary Hint: The first document a new contributor reads. It must get them from zero to running simulation in under 30 minutes. This is the "front door" to OpenWorm — if it's confusing or broken, we lose contributors before they even start.
Issue 33: MyBinder.org integration¶
- Title:
[DD013] Configure MyBinder.org for zero-install browser-based simulation demo - Labels:
DD013,ai-workable,L2 - Target Repo:
openworm/OpenWorm - Required Capabilities: docker
- DD Section to Read: DD013 Phase D and DD013 Open Questions (question 3)
- Depends On: Issue 23
- Files to Modify:
binder/directory (new — Binder config files:Dockerfile,postBuild,start)README.md(add "Launch on Binder" badge)
- Test Commands:
- Visit
https://mybinder.org/v2/gh/openworm/OpenWorm/mainand verify JupyterLab launches
- Visit
- Acceptance Criteria:
- [ ] MyBinder configuration in
binder/directory - [ ] Launches JupyterLab with starter notebooks pre-loaded
- [ ] Can run
02_run_c302_network.ipynbwithin Binder resource limits - [ ] README.md has "Launch on Binder" badge
- [ ] Binder environment includes c302, cect, matplotlib, numpy
- [ ] MyBinder configuration in
- Sponsor Summary Hint: MyBinder lets anyone experience the simulation in their browser with zero installation — just click a badge in the README. It's how we lower the barrier to entry from "install Docker + clone repo" to "click a link." Perfect for curious scientists, students, and potential contributors who want to explore before committing.
Issue 34: Automate Docker Hub publishing¶
- Title:
[DD013] Create GitHub Actions workflow for automated Docker Hub image publishing - Labels:
DD013,ai-workable,L2 - Target Repo:
openworm/OpenWorm - Required Capabilities: ci-cd, docker
- DD Section to Read: DD013 §8 — Pre-Built Images and DD013 Phase D
- Depends On: None
- Files to Modify:
.github/workflows/publish.yml(new)
- Test Commands:
- Create a test release tag and verify image appears on Docker Hub
- Acceptance Criteria:
- [ ] Triggers on GitHub release (tag creation)
- [ ] Builds multi-stage Dockerfile
- [ ] Pushes
openworm/openworm:<tag>andopenworm/openworm:latestto Docker Hub - [ ] Uses GitHub Secrets for Docker Hub credentials
- [ ] Build cache for faster publishes
- [ ] Publishes both
fullandviewerimages
- Sponsor Summary Hint: Most users just want to run the simulation, not build it from source. Automated Docker Hub publishing means every release automatically produces a pre-built image.
docker pull openworm/openworm:0.10.0and you're running in seconds instead of building for 20 minutes.
Issue 35: Update N2-Whisperer orientation tasks¶
- Title:
[DD013] Update N2-Whisperer orientation tasks for new simulation stack - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: docs
- DD Section to Read: DD013 Phase D and DD011 (L0→L1 orientation tasks)
- Depends On: Issue 32
- Files to Modify:
n2_whisperer_orientation_tasks.md(update references to new Docker workflow)
- Test Commands:
- Review that orientation tasks reference
docker composecommands (not legacyrun.sh)
- Review that orientation tasks reference
- Acceptance Criteria:
- [ ] L0 Task B1 ("Install and run Docker simulation") updated to use
docker compose run quick-test - [ ] References to legacy
run.sh/build.shreplaced with docker-compose commands - [ ] JupyterLab notebooks referenced as exploration tasks
- [ ] Getting-started guide linked
- [ ] Tasks achievable within the new stack architecture
- [ ] L0 Task B1 ("Install and run Docker simulation") updated to use
- Sponsor Summary Hint: N2-Whisperer is the AI onboarding assistant that guides new contributors through their first tasks. This issue updates its task list to match the new Docker Compose workflow — so newcomers learn the current way of running simulations, not the legacy shell scripts.
Infrastructure (Cross-Phase)¶
Issue 36: Survey sibernetic_config_gen for reuse¶
- Title:
[DD013] Survey sibernetic_config_gen repo for reusable particle config generation code - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: python, git
- DD Section to Read: DD013 Existing Code Resources (sibernetic_config_gen section)
- Depends On: None
- Files to Modify:
- None (research issue — output is a summary comment on the issue)
- Test Commands:
- N/A (research task)
- Acceptance Criteria:
- [ ] Clone and inspect openworm/sibernetic_config_gen
- [ ] Document: What does it generate? (particle positions,
.iniconfig files) - [ ] Document: What resolution/body configurations are available?
- [ ] Document: Is it compatible with current Sibernetic version?
- [ ] Document: What code can be reused for
openworm.yml→ Sibernetic.initranslation? - [ ] Estimate time savings if reused vs. rewriting
- [ ] Post findings as issue comment
- Sponsor Summary Hint: This dormant 2016 repo generates the initial particle positions for Sibernetic — like placing ~100,000 water droplets in the shape of a worm before the simulation starts. If the code still works, it saves 10-20 hours of reimplementation. Surveying before building is good engineering practice.
Issue 37: Survey skeletonExtraction for reuse¶
- Title:
[DD013] Survey skeletonExtraction repo for reusable skeleton export code - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: python, git
- DD Section to Read: DD013 Existing Code Resources (skeletonExtraction section) and DD021 (WCON export)
- Depends On: None
- Files to Modify:
- None (research issue — output is a summary comment on the issue)
- Test Commands:
- N/A (research task)
- Acceptance Criteria:
- [ ] Clone and inspect openworm/skeletonExtraction
- [ ] Document: What does it extract? (49-point skeleton/centerline from SPH particles)
- [ ] Document: Output format (COLLADA, coordinates)
- [ ] Document: Is it compatible with current Sibernetic output format?
- [ ] Document: Can the skeleton extraction algorithm be used for SPH → WCON export pipeline?
- [ ] Estimate time savings if reused vs. rewriting
- [ ] Post findings as issue comment
- Sponsor Summary Hint: This 2016 repo extracts the worm's centerline (a 49-point skeleton) from the cloud of ~100,000 Sibernetic particles — like finding the backbone inside a blob. This skeleton is essential for converting simulation output to WCON format (the standard for worm movement data) which DD021 needs for validation. Saves 15-25 hours if reusable.
Issue 38: Survey sibernetic_NEURON for reuse¶
- Title:
[DD013] Survey sibernetic_NEURON repo for Sibernetic-NEURON interface patterns - Labels:
DD013,ai-workable,L1 - Target Repo:
openworm/OpenWorm - Required Capabilities: python, git
- DD Section to Read: DD013 Existing Code Resources (sibernetic_NEURON section) and DD019 (bidirectional coupling)
- Depends On: None
- Files to Modify:
- None (research issue — output is a summary comment on the issue)
- Test Commands:
- N/A (research task)
- Acceptance Criteria:
- [ ] Clone and inspect openworm/sibernetic_NEURON
- [ ] Document: What interface pattern does it use between Sibernetic and NEURON?
- [ ] Document: How does it differ from current
sibernetic_c302.py? - [ ] Document: Are there bidirectional coupling patterns applicable to DD019 (closed-loop touch response)?
- [ ] Document: Is any code directly reusable?
- [ ] Post findings as issue comment
- Sponsor Summary Hint: Before
sibernetic_c302.py(the current coupling code), there wassibernetic_NEURON— an earlier attempt at connecting the body physics engine to the neural simulator. Reviewing it may reveal useful patterns for implementing bidirectional sensory feedback (touch → neural response → movement change) as specified in DD019.
Backend Stabilization (Cross-Phase, DD003)¶
Target: Achieve result parity with OpenCL on PyTorch/Taichi backends before OpenCL becomes unusable.
Issue 39: Create cross-backend parity test suite¶
- Title:
[DD003] Create cross-backend parity test suite against OpenCL baseline - Labels:
DD003,ai-workable,L2 - Target Repo:
openworm/Sibernetic - Required Capabilities: python, physics
- DD Section to Read: DD003 Backend Stabilization Roadmap — Cross-Backend Parity Requirements
- Depends On: DD003 Issues 1–2 (stability validation scripts)
- Files to Modify:
scripts/backend_parity_test.py(new)tests/baseline/(new — OpenCL baseline metric files)
- Test Commands:
python3 scripts/backend_parity_test.py --backend opencl --save-baselinepython3 scripts/backend_parity_test.py --backend pytorch --compare-baseline tests/baseline/
- Acceptance Criteria:
- [ ] Runs 4 test scenarios: drop test, elastic deformation, muscle contraction, full worm crawl
- [ ] Each test produces numeric metrics (position means, velocity stats, curvature)
- [ ]
--save-baselinemode saves OpenCL metrics to reference files - [ ]
--compare-baselinemode compares another backend's metrics against saved baseline - [ ] Reports per-metric deviation; ±5% = PASS, >5% = FAIL
- [ ] Summary report shows which tests passed/failed for each backend
- Sponsor Summary Hint: This is the automated comparison tool that tells us whether PyTorch or Taichi produce the same physics as OpenCL. It runs four standard simulation scenarios on each backend and compares the numeric outputs. A backend must pass all four within ±5% of OpenCL to graduate from Experimental to Stable.
Issue 40: Fix Taichi elastic coordinate-space bug¶
- Title:
[DD003] Fix Taichi elastic coordinate-space bug - Labels:
DD003,human-expert,L2 - Target Repo:
openworm/Sibernetic - Required Capabilities: python, physics
- DD Section to Read: DD003 Backend Stabilization Roadmap — The Taichi Coordinate-Space Bug
- Depends On: Issue 39
- Files to Modify:
taichi_backend/sph_metal.py(elastic force calculation)taichi_backend/sph_cuda.py(elastic force calculation, if separate)
- Test Commands:
python3 scripts/backend_parity_test.py --backend taichi-metal --compare-baseline tests/baseline/- Verify elastic body mean Y > 1.0 after 3s floor collision (vs current 0.24)
- Acceptance Criteria:
- [ ] Remove incorrect
/sim_scaledivision in elastic force calculation - [ ] Add
simulationScaleInvto the integration step - [ ] Use
h_scaledfor kernel coefficients instead of unscaledh - [ ] Taichi elastic body mean Y > 1.0 after 3s floor collision (currently 0.24)
- [ ] Taichi elastic deformation test passes parity suite (within ±5% of OpenCL)
- [ ] No regressions in liquid particle behavior
- [ ] Remove incorrect
- Sponsor Summary Hint: The Taichi backend has a known bug where elastic forces are computed in the wrong coordinate space — making them ~287x too weak. Elastic bodies (like the worm's skin) flatten to the floor instead of maintaining shape. The fix is documented (3 specific code changes) but hasn't been applied yet. This is the single biggest blocker for Taichi becoming usable.
Issue 41: Audit and fix PyTorch/Taichi result quality gap vs OpenCL¶
- Title:
[DD003] Audit and fix PyTorch/Taichi result quality gap vs OpenCL - Labels:
DD003,human-expert,L3 - Target Repo:
openworm/Sibernetic - Required Capabilities: python, physics, sph
- DD Section to Read: DD003 Backend Stabilization Roadmap — The Result Quality Gap
- Depends On: Issue 39, Issue 40
- Files to Modify:
taichi_backend/sph_metal.py(kernel implementations)pytorch_solver.py(kernel implementations)- Possibly other solver files
- Test Commands:
python3 scripts/backend_parity_test.py --backend pytorch --compare-baseline tests/baseline/python3 scripts/backend_parity_test.py --backend taichi-metal --compare-baseline tests/baseline/
- Acceptance Criteria:
- [ ] Line-by-line audit of PyTorch/Taichi kernel implementations against OpenCL
sphFluid.cl - [ ] Documented list of algorithmic differences found
- [ ] Fixes applied to bring implementations into alignment
- [ ] Parity test suite passes within ±5% of OpenCL on all 4 test scenarios for at least one Python backend
- [ ] Audit findings documented in a report (posted on the issue)
- [ ] Line-by-line audit of PyTorch/Taichi kernel implementations against OpenCL
- Sponsor Summary Hint: Even after fixing the Taichi coordinate bug, neither Python backend produces physics matching the C++/OpenCL reference. This is the detective work — going through ~64KB of OpenCL kernel code line by line to find where PyTorch and Taichi diverge. Could be numerical precision, algorithm differences, or missing terms. This is the hardest issue in the stabilization sequence but also the most impactful.
Issue 42: Graduate backends to Stable/Production and add to Dockerfile¶
- Title:
[DD003] Graduate backends to Stable/Production and add to Dockerfile - Labels:
DD003,ai-workable,L2 - Target Repo:
openworm/Sibernetic+openworm/OpenWorm - Required Capabilities: docker, ci-cd
- DD Section to Read: DD003 Backend Stabilization Roadmap — Backend Graduation Criteria
- Depends On: Issue 41
- Files to Modify:
Dockerfile(body stage — addpip install taichi torchconditional).github/workflows/integration.yml(add backend-specific CI gates)- DD003 Backend Status table (update status based on graduation results)
- Test Commands:
docker compose run simulationwithbody.backend: pytorchdocker compose run simulationwithbody.backend: taichi-metal(on Apple Silicon)- CI passes with multi-backend smoke tests
- Acceptance Criteria:
- [ ] Backends that pass parity tests upgraded to Stable in DD003 status table
- [ ]
pip install taichi torchadded to Dockerfile body stage (conditional on backend) - [ ] CI runs smoke test on at least OpenCL + one Python backend
- [ ] Performance benchmark results documented for each graduated backend
- [ ] DD003 Compute Backends table updated with final status
- [ ] Recommendation updated based on actual benchmark results
- Sponsor Summary Hint: The final step in the stabilization sequence — once backends pass the parity tests, they graduate from Experimental to Stable/Production. This means adding them to the Docker image so any contributor can use them, and adding CI gates so regressions are caught automatically. The goal is that Apple Silicon users can run Taichi Metal, NVIDIA users can run CUDA, and everyone has a working backend.
Summary Statistics¶
| Category | Count |
|---|---|
| Total Issues | 42 |
| ai-workable | 31 |
| human-expert | 11 |
| L1 | 17 |
| L2 | 15 |
| L3 | 9 |
| DD003 label | 4 |
| Phase | Issues | Target |
|---|---|---|
| A: Foundation | 1–17 | docker compose run quick-test works |
| B: Validation | 18–26 | PRs auto-validated, JupyterLab available |
| C: Subsystem Expansion | 27–31 | New organs plug in via config toggles |
| D: Polish & Onboarding | 32–35 | Clone-to-simulation in <30 min |
| Infrastructure | 36–38 | Dormant repo surveys for reuse |
| Backend Stabilization | 39–42 | PyTorch/Taichi match OpenCL result quality |
Dependency Graph (Critical Path)¶
Issue 1 (config schema)
├→ Issue 2 (validation script)
├→ Issue 3 (Dockerfile) → Issue 4 (docker-compose)
│ ├→ Issue 5 (viewer service)
│ ├→ Issue 6 (neural-dev service)
│ ├→ Issue 12 (quick-test.sh) → Issue 14 (CI Gate 2)
│ ├→ Issue 23 (JupyterLab) → Issues 24-26 (notebooks)
│ │ → Issue 33 (MyBinder)
│ └→ Issue 32 (getting-started) → Issue 35 (N2-Whisperer update)
├→ Issue 13 (CI Gate 1) → Issue 14 (CI Gate 2)
├→ Issue 17 (apt pin + venv)
└→ Issue 9 (config loading)
→ Issue 10 (subsystem init) → Issue 11 (coupled loop)
├→ Issue 18 (output gen) → Issue 19 (OME-Zarr)
│ └→ Issue 20 (validation) → Issue 21 (CI Gate 3) → Issue 22 (CI Gate 4)
│ → Issue 28 (DD004 cell identity)
├→ Issue 27 (DD005 cell-type specialization)
├→ Issue 29 (DD006 neuropeptides)
├→ Issue 30 (DD007 pharynx)
└→ Issue 31 (DD009 intestine)
Issue 7 (versions.lock) → Issue 8 (build.sh)
Issues 15, 16 (bug fixes) — independent
Issues 34 (Docker Hub) — independent
Issues 36, 37, 38 (surveys) — independent
DD003 Issues 1-2 (stability scripts) → Issue 39 (parity test suite)
→ Issue 40 (Taichi coordinate bug) → Issue 41 (quality gap audit)
→ Issue 42 (graduate backends + Dockerfile)