Repository navigation
Add ruv-jellyfish crate + ADR-172: jellyfish-inspired swarm behaviors - #2
Merged
Merged
Conversation
Introduces a standalone workspace crate implementing two energy-efficient, jellyfish-derived behavior primitives for endurance-bound cooperative-UAV missions (relay chains, SAR re-scan loops, persistent monitoring), plus the ADR that motivates and scopes them. - energy: closed-form pulse-and-drift energetics under linear drag — pulse-drift pays actuation `e_per_dv·k/(1+r)` per metre, a factor (1+r) below constant thrust; station-keeping power falls with relative flow. - pulse: real-time pulse/recapture/drift gait state machine with telemetry; steady-state cost matches the analytic bound. - field: FlowField / ValueField traits + NoFlow, UniformFlow, ConvergentFlow, GaussianHotspot, HotspotField (analytic gradients). - bloom: decentralized local aggregation rule — gradient climb, separation, cohesion, and coverage dispersion self-organize a smack over a value field; energy-aware wind compensation prices riding vs. fighting the flow. - controller: JellyfishController unifies cruise + loiter on one energy budget with endurance/range estimates. Root becomes a Cargo workspace (ruview-swarm root + crates/ruv-jellyfish). Crate is std-only, serde-by-default, clippy-clean, 31 tests (unit + integration + doctest). Stays within the project's civilian cooperative-UAV scope: cooperative coverage/station-keeping only, no threat/target response. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsgPPuFVaehZUWykKWYtEp
ruvnet
marked this pull request as ready for review
July 12, 2026 19:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a standalone workspace crate,
crates/ruv-jellyfish, implementing two energy-efficient, jellyfish-derived behavior primitives for the endurance-bound missions the current geometry-first stack doesn't serve well (relay chains that hold station for hours, SAR re-scan loops that loiter over high-probability cells, persistent agricultural monitoring). Ships with ADR-172, which motivates and scopes the design.Where
formation/planning/allocationoptimize shapes and paths, this crate adds an energy-first layer for the loiter/presence phase.What's in it
energy— closed-form pulse-and-drift energetics under linear drag. Pulse-and-drift pays actuatione_per_dv·k/(1+r)per metre, a factor (1+r) below constant thrust (steady-state momentum balance with stopping-vortex recapturer).station_keeping_powerfalls as airspeed relative to the flow falls.pulse— real-time pulse → recapture → drift gait state machine with distance/energy telemetry. Steady-state realized cost matches the analytic bound.field—FlowField/ValueFieldtraits +NoFlow,UniformFlow,ConvergentFlow,GaussianHotspot,HotspotField(analytic gradients).bloom— a decentralized local rule (gradient climb, separation, cohesion, coverage dispersion) that self-organizes a smack over a value field and relaxes to broad coverage where it's flat. Energy-aware wind compensation (airspeed = desired − flow) prices riding vs. fighting the current.controller—JellyfishControllerunifiescruise(gait) andloiter(bloom) on one energy budget with endurance/range estimates for the failsafe path.Repo changes
ruview-swarm(root) +crates/ruv-jellyfishmember. No change to the parent build beyond the new[workspace]table (verifiedcargo build -p ruview-swarm).docs/adr/ADR-172-jellyfish-swarm.mdcompleted.Testing
cargo test -p ruv-jellyfish— 31 tests pass (29 unit + 1 integration mission-arc + 1 doctest).cargo clippy -p ruv-jellyfish --all-targets— warning-free.Scope & export
Stays inside the project's industrial / civilian cooperative-UAV scope (see
NOTICE): both behaviors are cooperative coverage and station-keeping primitives, aggregating over a cooperative interest map (victim probability, inspection interest) exactly like the existing coverage/allocation modules. No adaptive threat/target response, target acquisition/tracking-to-engage, or weapons integration. ADR-172 spells this out.Follow-up (not in this PR)
Parent integration — a
jellyfishfeature that pulls the path-dep and adds thePosition3D/Velocity3D↔Vec3adapter, wiring theValueFieldtoplanning::probability_gridanddepleted()to thefailsafemachine.🤖 Generated with Claude Code
Generated by Claude Code