Epic: #64 (AffinityEngine)
No dependencies — can be done independently
What
Add a per-entity assignment method to IClusteringModel in crates/arcane-core/src/clustering_model.rs:
fn compute_entity_assignments(
&self,
view: &WorldStateView,
) -> std::collections::HashMap<Uuid, Uuid> {
std::collections::HashMap::new()
}
Key design decisions
- Default implementation returns empty map — RulesEngine compiles without changes
&self not &mut self — matches existing trait constraint
- Entities not in the map retain current assignment (diff semantic)
- Exists for testing, benchmarking, and future ClusterManager evolution
Changes
crates/arcane-core/src/clustering_model.rs — add method to trait (line ~78)
- No changes to
arcane-rules (default impl covers it)
- No changes to
arcane-infra (ClusterManager continues calling evaluate())
Acceptance criteria
- Method added with default implementation
cargo build --workspace passes
cargo test --workspace passes (existing tests unaffected)
Spec
See arcane-engine repo: in_08_05_trait_extension.md
Epic: #64 (AffinityEngine)
No dependencies — can be done independently
What
Add a per-entity assignment method to
IClusteringModelincrates/arcane-core/src/clustering_model.rs:Key design decisions
&selfnot&mut self— matches existing trait constraintChanges
crates/arcane-core/src/clustering_model.rs— add method to trait (line ~78)arcane-rules(default impl covers it)arcane-infra(ClusterManager continues callingevaluate())Acceptance criteria
cargo build --workspacepassescargo test --workspacepasses (existing tests unaffected)Spec
See
arcane-enginerepo:in_08_05_trait_extension.md