Skip to content

Internalize NeuromodNeuron as router-internal type (no neuromod dependency) #5

Description

@rmems

Context

synaptic-mesh contains src/neuromod.rs which defines a NeuromodNeuron type (NIF — Neuromodulatory Integrative Fixed-threshold) with gain control. It is used only by ChannelRouter in src/router.rs.

The top-level pub mod neuromod is misleading — it implies synaptic-mesh owns general neuron models, when its scope is topology / wiring / delay / CSR / router.

Decision

synaptic-mesh will NOT add neuromod as a dependency. The two crates are kept independent so each can evolve without coupling. NeuromodNeuron stays in synaptic-mesh but is repositioned as a router-internal integration primitive, not a general neuron model.

See LIM-48 for the full decision record.

Goal

Internalize NeuromodNeuron as a router-internal type and document the crate boundary:

  1. Move NeuromodNeuron from src/neuromod.rs → into src/router.rs (or src/router/ submodule).
  2. Remove pub mod neuromod and pub use neuromod::NeuromodNeuron from src/lib.rs.
  3. If external consumers need the type, re-export from router (pub use router::NeuromodNeuron); otherwise pub(crate).
  4. Document crate boundary in src/lib.rs module docs and README.md.

Boundary

Crate Owns
neuromod Canonical neuron models — LIF, Izhikevich, Hodgkin-Huxley, GIF, FitzHugh-Nagumo, Lapicque
synaptic-mesh Topology, wiring, delay, CSR sparse maps, ChannelRouter, router-internal NIF primitive

Non-goals

  • Do NOT add neuromod as a dependency to synaptic-mesh.
  • Do not change ChannelRouter routing logic or SynapticMesh propagation semantics.
  • Do not merge synaptic-mesh and neuromod.
  • No changes to SAAQ math, heartbeat, plasticity, fatigue, or STDP.

Acceptance criteria

  • src/neuromod.rs is removed; NeuromodNeuron lives inside the router module.
  • pub mod neuromod is removed from src/lib.rs.
  • synaptic-mesh does not depend on neuromod in Cargo.toml.
  • Crate boundary documented in src/lib.rs module-level docs and README.md.
  • cargo build and cargo test pass.
  • No router or propagation behavior changes (pure structural move).

Related

Suggested branch

refactor/synaptic-mesh-neuromod-boundary

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions