From dac81a66b4a1c4cbe2a45576c8f397e3b91581f9 Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Mon, 29 Jun 2026 16:14:33 +0300 Subject: [PATCH] chore(prd): expand US-015 scope with worktree parallelism auto --parallel N: creates one worktree per ready task, runs N agents concurrently, merges on success, preserves worktree on conflict. list-parallel: shows stories safe to run concurrently. Co-Authored-By: Claude Sonnet 4.6 --- .scratch/distributed-inference-network/prd.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.scratch/distributed-inference-network/prd.json b/.scratch/distributed-inference-network/prd.json index 9d132db..6714dcd 100644 --- a/.scratch/distributed-inference-network/prd.json +++ b/.scratch/distributed-inference-network/prd.json @@ -357,7 +357,7 @@ { "id": "US-015", "title": "15 \u2014 Ralph: agent-agnostic runner + status-field-aware dashboard", - "description": "Two improvements to the Ralph workflow tooling. (1) Status-field awareness: replace all passes:true/false reads in ralph_progress.py with the rich status field. Surface to-revise and needs-review stories as an attention list in the dashboard; auto command skips them by default. (2) Agent agnosticism: make the agent selectable per session \u2014 codex (existing), claude (Claude Code CLI), openrouter (unified API for GPT-4/Mistral/Llama/DeepSeek via OPENROUTER_API_KEY + --model), or custom (--agent-cmd path to any script). Persist agent choice to .ralph-tui/agent-config.json. When ralph-tui does not natively support a requested agent, ralph_progress.py falls back to a thin adapter that calls the agent API directly with the task prompt.", + "description": "Two improvements to the Ralph workflow tooling. (1) Status-field awareness: replace all passes:true/false reads in ralph_progress.py with the rich status field. Surface to-revise and needs-review stories as an attention list in the dashboard; auto command skips them by default. (2) Agent agnosticism: make the agent selectable per session \u2014 codex (existing), claude (Claude Code CLI), openrouter (unified API for GPT-4/Mistral/Llama/DeepSeek via OPENROUTER_API_KEY + --model), or custom (--agent-cmd path to any script). Persist agent choice to .ralph-tui/agent-config.json. When ralph-tui does not natively support a requested agent, ralph_progress.py falls back to a thin adapter that calls the agent API directly with the task prompt. (3) Worktree parallelism: ralph_progress.py auto --parallel [N] creates one git worktree per ready task (git worktree add ../AI-worktree- -b feat/), runs up to N agent sessions concurrently, and merges each branch back to master after the agent exits 0 and tests pass. Non-blocking stories that share no file overlap can safely run in parallel. ralph_progress.py list-parallel shows which open stories have no overlapping dependsOn chains and are safe to run concurrently.", "acceptanceCriteria": [ "All story.get('passes') reads in ralph_progress.py replaced with _is_done() helper that reads status field with passes fallback", "_story_sets() returns six buckets: done, attention (to-revise/needs-review), active (in-progress), in-design, ready, blocked", @@ -370,7 +370,12 @@ "run-next --agent custom --agent-cmd ./my-agent.sh runs a task via custom script (prompt file as $1)", "Saved agent config is loaded as default when --agent is not passed on the CLI", "python -m pytest passes from repo root", - "Commit only this story's changes" + "Commit only this story's changes", + "ralph_progress.py auto --parallel 2 starts two worktrees concurrently for the two highest-priority ready tasks", + "Each worktree is created at ../AI-worktree- on branch feat/", + "After agent exits 0 and pytest passes in the worktree, the branch is merged to master and the worktree removed", + "ralph_progress.py list-parallel prints the set of open stories with no shared dependency chain (safe to parallelize)", + "If a worktree merge fails (conflict), the worktree is preserved for manual resolution and reported clearly" ], "priority": 15, "status": "open", @@ -379,7 +384,7 @@ } ], "metadata": { - "updatedAt": "2026-06-29T13:20:00.000Z", + "updatedAt": "2026-06-29T13:30:00.000Z", "statusVocabulary": { "open": "Not started", "in-design": "Decisions pending before implementation can begin",