feat: fleet orchestration POC with worktree isolation#35
Closed
malpou wants to merge 6 commits into
Closed
Conversation
Add _fleet.py with FleetConfig, RalphEntry, and FleetSettings dataclasses plus parse_fleet_config() for reading fleet.yml files. Supports ralph entries with branch/worktree/priority/depends_on, fleet-level settings (max_concurrent, stagger_start, merge_strategy), and validation of all fields including dependency references. Co-authored-by: Ralphify <noreply@ralphify.co>
Add functions for creating, removing, and pruning git worktrees for fleet ralphs. Includes setup_fleet_worktrees to create all worktrees from a fleet config and teardown_fleet_worktrees for cleanup. Co-authored-by: Ralphify <noreply@ralphify.co>
Add FleetOrchestrator that manages the full fleet lifecycle: sets up worktrees, builds RunConfigs from ralph RALPH.md files, launches ralphs via RunManager with staggered starts and max_concurrent limits, resolves dependency ordering via topological sort, and provides stop/status methods. Also adds FleetStatus enum, RalphStatus dataclass, and FleetConfigError for ralph config validation. Co-authored-by: Ralphify <noreply@ralphify.co>
Add a typer sub-app for fleet management with three commands: - fleet start: parses fleet.yml, sets up worktrees, launches ralphs with staggered starts and dependency ordering, blocks until Ctrl+C - fleet status: displays a table of ralphs with branches, worktree settings, priorities, and dependency info - fleet stop: guidance to use Ctrl+C on the running fleet process Co-authored-by: Ralphify <noreply@ralphify.co>
… tests Co-authored-by: Ralphify <noreply@ralphify.co>
Demonstrates a multi-role fleet where a PM ralph creates tasks, a dev ralph implements them, and a QA ralph reviews PRs — all running in parallel with dependency ordering and worktree isolation. Co-authored-by: Ralphify <noreply@ralphify.co>
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
ralph fleetCLI command group that launches multiple ralphs in parallel, each in its own git worktree, with basic process supervision and a fleet definition file (fleet.yml).fleet.yml): Define fleet name, ralphs with file/branch/worktree/priority/depends_on, and settings (max_concurrent, stagger_start)ralph fleet start,ralph fleet status,ralph fleet stopexamples/fleet-todo-app/with pm, dev, and qa ralphs demonstrating a multi-role workflowChanges
src/ralphify/_fleet.py— Fleet config parsing, worktree lifecycle, orchestration classsrc/ralphify/cli.py—ralph fleetcommand group (start/status/stop)tests/test_fleet.py— 41 tests covering config parsing, worktree lifecycle, and orchestrationexamples/fleet-todo-app/— Example fleet setup with fleet.yml and ralph filesTest plan
uv run pytest)ralph fleet startwith the example fleet configralph fleet stop