diff --git a/docs/plans/2026-04-14-parallel-implementation.md b/docs/plans/2026-04-14-parallel-implementation.md new file mode 100644 index 0000000..de49ee3 --- /dev/null +++ b/docs/plans/2026-04-14-parallel-implementation.md @@ -0,0 +1,128 @@ +# Parallel Agent Implementation — Schritt 7, 8, 9 + +> **For agentic workers:** Use superpowers:subagent-driven-development to execute this plan task-by-task. + +**Goal:** Implement Schritt 7 (Lighting), 8 (Dice Roller) and 9 (Player Interaction) using parallel agents where possible to minimize wall-clock time. + +**Architecture:** Two agents run in parallel on isolated git worktrees for Schritt 7 and 8 (no file overlap). After both branches are merged, a third agent implements Schritt 9 on main (depends on tavern.gd changes from Schritt 8). + +--- + +## Parallelism Analysis + +| Plan | Files touched | +|------|--------------| +| 7 — Tavern Lighting | `scenes/taproom.tscn`, `scenes/tavern.tscn` | +| 8 — Dice Roller | `scripts/network_manager.gd`, `scripts/tavern.gd`, `scenes/dm_view.tscn`, `scripts/dm_view.gd` | +| 9 — Player Interaction | `project.godot`, `scripts/player_controller.gd` (new), `scripts/interactable.gd` (new), `scripts/test_interactable.gd` (new), `scripts/tavern.gd`, `scenes/tavern.tscn` | + +**Conflicts:** +- 7 and 8: **no overlap** → fully parallel +- 9 with 7: `tavern.tscn` (lighting adds lights, interaction adds test object) → sequential after merge +- 9 with 8: `tavern.gd` (dice adds `_setup_dice_ui()` call in `_ready()`, interaction replaces `_spawn_player()`) → sequential after merge, plan 9 already has the cross-plan warning + +--- + +## Phase 1: Dispatch two agents in parallel + +Both agents work on isolated worktrees from `main`. Dispatch them **simultaneously** (single message, two Agent tool calls). + +### Agent A — Tavern Lighting + +``` +Branch: feat/tavern-lighting +Worktree: (auto-created by worktree isolation) +Plan: docs/plans/2026-04-14-tavern-lighting.md +Skill: superpowers:executing-plans +``` + +**Agent A prompt:** +> Implement the plan at `docs/plans/2026-04-14-tavern-lighting.md` in the Godot 4 project at `ruf-der-pilze/`. Work on branch `feat/tavern-lighting` (create from main). Use the superpowers:executing-plans skill. After all tasks are done and committed, do NOT update STATUS.md (that happens after merge). Push the branch when done. + +### Agent B — Dice Roller + +``` +Branch: feat/dice-roller +Worktree: (auto-created by worktree isolation) +Plan: docs/plans/2026-04-14-dice-roller.md +Skill: superpowers:executing-plans +``` + +**Agent B prompt:** +> Implement the plan at `docs/plans/2026-04-14-dice-roller.md` in the Godot 4 project at `ruf-der-pilze/`. Work on branch `feat/dice-roller` (create from main). Use the superpowers:executing-plans skill. After all tasks are done and committed, do NOT update STATUS.md (that happens after merge). Push the branch when done. + +--- + +## Phase 2: Review and merge both branches + +Wait for both agents to complete. Then: + +- [ ] **Step 1: Review Agent A output** — check commits on `feat/tavern-lighting`, open Godot and screenshot the lit tavern +- [ ] **Step 2: Review Agent B output** — check commits on `feat/dice-roller`, verify no parse errors, test roll broadcast with two clients +- [ ] **Step 3: Merge lighting branch** + ```bash + git checkout main + git merge feat/tavern-lighting --no-ff -m "feat: merge tavern lighting (Schritt 7)" + ``` +- [ ] **Step 4: Merge dice roller branch** + ```bash + git merge feat/dice-roller --no-ff -m "feat: merge dice roller (Schritt 8)" + ``` + Resolve any merge conflicts (unlikely — no file overlap — but check tavern.tscn if both touched it). +- [ ] **Step 5: Update STATUS.md for Schritt 7 + 8** + Mark both ✅, set Schritt 9 as next. + ```bash + git add docs/STATUS.md ruf-der-pilze/CLAUDE.md + git commit -m "docs: mark Schritt 7 + 8 complete after parallel merge" + ``` + +--- + +## Phase 3: Dispatch Agent C — Player Interaction + +Only after Phase 2 is fully merged to `main`. Agent C works directly on `main` (or a branch if preferred). + +### Agent C — Player Interaction + +``` +Branch: feat/player-interaction (from main after merge) +Plan: docs/plans/2026-04-14-player-interaction.md +Skill: superpowers:executing-plans +``` + +**Agent C prompt:** +> Implement the plan at `docs/plans/2026-04-14-player-interaction.md` in the Godot 4 project at `ruf-der-pilze/`. Work on branch `feat/player-interaction` (create from main). Use the superpowers:executing-plans skill. +> +> **Critical context from already-merged plans:** +> - `tavern.gd._ready()` now calls `_setup_dice_ui()` as its last statement (added by Schritt 8). When replacing `_spawn_player()` in Task 4, do NOT modify `_ready()` — the plan already warns about this. +> - `tavern.tscn` may have new light nodes from Schritt 7. When adding the test interactable in Task 5, add it as a new node without touching existing lighting nodes. +> +> After all tasks are committed, push the branch. + +- [ ] **Step 1: Review Agent C output** — verify WASD movement, mouse look, E key interaction works +- [ ] **Step 2: Merge** + ```bash + git checkout main + git merge feat/player-interaction --no-ff -m "feat: merge player interaction (Schritt 9)" + ``` +- [ ] **Step 3: Update STATUS.md for Schritt 9** + ```bash + git add docs/STATUS.md ruf-der-pilze/CLAUDE.md + git commit -m "docs: mark Schritt 9 complete" + ``` + +--- + +## Summary + +``` +main +├── [parallel] feat/tavern-lighting → Agent A +├── [parallel] feat/dice-roller → Agent B +│ +│ [merge both] +│ +└── [sequential] feat/player-interaction → Agent C +``` + +Total phases: 2 parallel + 1 sequential. Estimated reduction vs sequential: ~40% wall-clock time saved.