Skip to content

Add ruv-jellyfish crate + ADR-172: jellyfish-inspired swarm behaviors - #2

Merged
ruvnet merged 1 commit into
mainfrom
claude/jellyfish-swarm-adr-4zamtk
Jul 12, 2026
Merged

ruvnet merged 1 commit into
mainfrom
claude/jellyfish-swarm-adr-4zamtk

Conversation

@ruvnet

@ruvnet ruvnet commented Jul 12, 2026

Copy link
Copy Markdown
Owner

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 / allocation optimize 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 actuation e_per_dv·k/(1+r) per metre, a factor (1+r) below constant thrust (steady-state momentum balance with stopping-vortex recapture r). station_keeping_power falls 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 / ValueField traits + 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 — JellyfishController unifies cruise (gait) and loiter (bloom) on one energy budget with endurance/range estimates for the failsafe path.

Repo changes

  • Root becomes a Cargo workspace: ruview-swarm (root) + crates/ruv-jellyfish member. No change to the parent build beyond the new [workspace] table (verified cargo build -p ruview-swarm).
  • README: ADR-172 row + a "Workspace crates" section. docs/adr/ADR-172-jellyfish-swarm.md completed.

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.
  • The integration test drives a 4-drone fleet through cruise → bloom, asserting the gait beats the constant-thrust reference, the smack contracts toward the hotspot, no drone depletes its budget, and none collapse together.

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 jellyfish feature that pulls the path-dep and adds the Position3D/Velocity3D ↔ Vec3 adapter, wiring the ValueField to planning::probability_grid and depleted() to the failsafe machine.

🤖 Generated with Claude Code


Generated by Claude Code

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
ruvnet marked this pull request as ready for review July 12, 2026 19:21
@ruvnet
ruvnet merged commit 691ce38 into main Jul 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants