[ ]- Incomplete (not started or needs rework)[?]- Waiting to be verified (work done, needs verification by different agent)[x]- Complete (verified by a second agent)
- Project initialized
(Tasks here have been implemented but need another agent to verify)
- Create
Parallel/FileLock.cs— file-lock helper usingFileStream(FileShare.None)with timeout - Rename/rewrite
Parallel/TaskQueue.cs→Parallel/TaskStore.cswith dependency-aware claiming - Update
Models/Task.cs— simplify to 3+1 states (Pending, InProgress, Completed, Failed), addIsClaimable()method - Change dependency references from title-based to stable task IDs (
task-1,task-2, etc.) - Implement
TryClaim()with file-lock and dependency enforcement - Add
GetClaimable(),GetBlockedBy(),GetInProgress()queries - Add
TaskCompleted,TaskUnblocked,TaskFailedevents on TaskStore - Persist tasks to
~/.ralph/teams/{team}/tasks/tasks.jsoninstead of.ralph-queue.json - Add stale claim timeout release for crashed agents
- Update decomposition parser to produce ID-based deps and resolve title references
- Define
AgentStateenum: Spawning, Ready, Claiming, Working, PlanningWork, Idle, ShuttingDown, Stopped, Error - Create
Models/AgentSpawnConfig.cswith Name, Model, SpawnPrompt, RequirePlanApproval fields - Rewrite
TeamAgent.csrun loop — state machine with proper transitions andStateChangedevent - Implement idle polling with exponential backoff (1s→30s), wake on
TaskUnblockedevent - Implement graceful shutdown protocol (request → finish current task → stop)
- Implement force-stop with 60s timeout fallback
- Add spawn prompt support — prepend task-specific context to agent AI prompt
- Implement plan-before-implement mode (read-only tools, submit plan to lead, wait for approval)
- Emit lifecycle events:
AgentSpawned,AgentIdle,AgentWorking,AgentStopped,AgentError
- Create
Messaging/Message.csmodel with MessageId, From, To, Type, Content, Metadata, Timestamp - Create
MessageTypeenum: Text, StatusUpdate, ShutdownRequest, ShutdownResponse, PlanSubmission, PlanApproval, TaskAssignment, Broadcast - Create
Messaging/MessageBus.cs— file-based JSONL per-agent inbox with read cursor tracking - Implement
Send()with file-lock for concurrent write safety - Implement
Broadcast()— append to all agent inboxes except sender - Implement
Poll()— non-blocking read of new messages since cursor - Implement
WaitForMessages()/WaitForMessage(type)— blocking with timeout - Integrate message processing into TeamAgent run loop (between tasks and during idle)
- Store mailboxes at
~/.ralph/teams/{team}/mailbox/{agent-id}.jsonl
- Rename/rewrite
TeamController.cs→TeamOrchestrator.cs - Replace 3-phase sequential model with continuous coordination loop
- Implement
CoordinateAsync()— poll messages, monitor agents, handle events, detect completion - Implement plan approval flow — lead evaluates PlanSubmission via AI and responds
- Implement stuck agent detection — alert if Working > 2x avg task time with no messages
- Implement task reassignment — move tasks from stuck/crashed agents to idle agents
- Implement delegate mode — restrict lead to coordination-only (no file edits)
- Implement result synthesis — collect task results and produce summary report
- Add dynamic task management:
AddTask(),ReassignTask(),CancelTask()during execution - Wire orchestrator into
Program.csreplacing TeamController usage
- Create
Merge/MergeManager.cswith merge queue and file ownership tracking - Create
Merge/MergeStatus.csenum (Pending, Queued, Merging, Merged, ConflictDetected, Resolved, Failed) - Implement file ownership tracking (
Dictionary<string, string>file→agentId) with overlap warnings - Implement incremental merging — merge completed tasks immediately, don't wait for all agents
- Implement dependency-ordered merging (topological sort of DAG)
- Improve conflict negotiation prompt to include task descriptions and intent
- Add MergeStatus field to task model
- Extract merge logic from GitWorktreeManager into MergeManager
- Create
TUI/TUIView.csenum: AgentList, AgentDetail, TaskList - Create
TUI/InputHandler.csfor keyboard input (Shift+Up/Down, Enter, Escape, Ctrl+T) - Implement agent selection state with Shift+Up/Down cycling
- Implement per-agent output buffers (separate from mixed log)
- Implement Agent List View — agent list left, selected agent detail right
- Implement Agent Detail View — full-screen output of selected agent (Enter to enter, Esc to exit)
- Implement Task List View — table with ID, Title, Status, Agent, Deps (Ctrl+T toggle)
- Add status bar — team name, agent count, task progress, elapsed time
- Add user message input — type text to send message to selected agent
- Wire TUI to events:
StateChanged,TaskCompleted,TaskUnblocked,OutputReceived - Ensure all dynamic text uses
Markup.Escape()
- Create
~/.ralph/teams/{team}/config.jsonteam config with members array - Add
DelegateModeflag to TeamConfig - Add
RequirePlanApprovalper-agent setting to TeamConfig - Team cleanup: remove worktrees, task files, mailbox, team config
- Display modes: in-process (default) and split-pane (tmux/iTerm2)
- Hooks:
TeammateIdleandTaskCompletedquality gate hooks - Agent crash recovery: partial task re-queued on restart
- Max 3 plan revision cycles before lead override/reassign
- None yet
- Implementation order per overview.md: task-system → agent-lifecycle → messaging → orchestration → merge → tui
- Task system is the foundation — nothing works without dependency enforcement
- Agent lifecycle and messaging can be partially developed in parallel
- Orchestration ties everything together — implement after the three foundations
- Existing code: TeamController.cs (~850L), TeamAgent.cs (568L), TaskStore.cs (new), FileLock.cs (new), ConsoleUI.cs (~1324L)
- Models/Task.cs is used instead of AgentTask.cs referenced in specs
- TaskQueue.cs has been replaced by TaskStore.cs — do not recreate
- No Messaging/, Merge/, or TUI/ directories exist yet — all need creation
- Critical pattern: always use
Markup.Escape()for dynamic Spectre.Console text - Critical pattern: read stdout/stderr concurrently BEFORE
WaitForExitAsyncto avoid deadlock