Skip to content

fix(brainstorming): restore post-design approval gate and plan filename guard#628

Open
stablegenius49 wants to merge 1 commit intoobra:mainfrom
stablegenius49:pr-factory/issue-565-brainstorming-implementation-gate
Open

fix(brainstorming): restore post-design approval gate and plan filename guard#628
stablegenius49 wants to merge 1 commit intoobra:mainfrom
stablegenius49:pr-factory/issue-565-brainstorming-implementation-gate

Conversation

@stablegenius49
Copy link

@stablegenius49 stablegenius49 commented Mar 6, 2026

Summary

  • restore an explicit user confirmation gate after writing the design doc ("Ready to set up for implementation?")
  • reintroduce using-git-worktrees before writing-plans in the brainstorming checklist/flow
  • require plan docs to use a -plan.md suffix to avoid overwriting *-design.md files

Validation

  • git diff --check
  • verified updated skill instructions/paths with grep

Fixes #565

@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

📝 Walkthrough

Walkthrough

The brainstorming skill's transition to implementation is restructured from a single step into a gated, multi-step flow that includes a readiness gate, isolated worktree creation, and implementation planning. The writing-plans skill's save path is updated to use a "-plan.md" suffix to prevent overwriting design documents.

Changes

Cohort / File(s) Summary
Implementation Gate Flow
skills/brainstorming/SKILL.md
Replaces single-step transition with a three-step gated sequence: ask readiness confirmation, create isolated git worktree, then generate implementation plan. Updates process flow graph and narrative to reflect decision gate before workspace setup.
Plan Save Path
skills/writing-plans/SKILL.md
Updates save location from docs/plans/YYYY-MM-DD-<feature-name>.md to docs/plans/YYYY-MM-DD-<feature-name>-plan.md with clarification to never overwrite design documents.

Sequence Diagram(s)

sequenceDiagram
    actor Designer
    participant Brainstorming as Brainstorming Skill
    participant Gate as Implementation Gate
    participant Git as Git-Worktrees Skill
    participant WritePlans as Writing-Plans Skill
    participant FileSystem as File System

    Designer->>Brainstorming: Initiate implementation transition
    Brainstorming->>Gate: Ask: "Ready to set up for implementation?"
    Gate-->>Brainstorming: Confirmed ready
    Brainstorming->>Git: Invoke using-git-worktrees
    Git->>FileSystem: Create isolated worktree
    FileSystem-->>Git: Worktree created
    Git-->>Brainstorming: Worktree ready
    Brainstorming->>WritePlans: Invoke writing-plans skill
    WritePlans->>FileSystem: Generate and save to docs/plans/YYYY-MM-DD-<topic>-plan.md
    FileSystem-->>WritePlans: Plan saved
    WritePlans-->>Designer: Implementation plan complete
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 A gate appears before the path,
A worktree blooms in isolation's bath,
Design stays safe, the plans stand tall,
In separate files, they stand apart—not all!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: restoring a post-design approval gate and adding a plan filename guard to prevent overwrites.
Description check ✅ Passed The description is directly related to the changeset, outlining the three main changes and validation steps performed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
skills/brainstorming/SKILL.md (1)

31-33: Make the worktree handoff explicit about branch naming.

This now says to invoke using-git-worktrees, but it still doesn't establish the branch name first. That skill's creation flow uses BRANCH_NAME to build the path and create the branch, so leaving it implicit makes the handoff underspecified.

Suggested doc tweak
-6. **Ask implementation gate** — ask: "Ready to set up for implementation?"
-7. **Create isolated worktree** — invoke `using-git-worktrees`
+6. **Ask implementation gate** — ask: "Ready to set up for implementation?"
+7. **Choose branch name** — derive or confirm the implementation branch name with the user
+8. **Create isolated worktree** — invoke `using-git-worktrees`
-8. **Create implementation plan** — invoke `writing-plans` and save to `docs/plans/YYYY-MM-DD-<topic>-plan.md`
+9. **Create implementation plan** — invoke `writing-plans` and save to `docs/plans/YYYY-MM-DD-<topic>-plan.md`
-**Implementation:**
-- Ask: **"Ready to set up for implementation?"** and wait for confirmation
-- Invoke `using-git-worktrees` to create an isolated workspace
+**Implementation:**
+- Ask: **"Ready to set up for implementation?"** and wait for confirmation
+- Derive or confirm the implementation branch name
+- Invoke `using-git-worktrees` to create an isolated workspace
 - Invoke `writing-plans` to create a detailed implementation plan

Also applies to: 93-95

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/brainstorming/SKILL.md` around lines 31 - 33, The step that invokes
using-git-worktrees is underspecified because it relies on BRANCH_NAME but never
establishes it; update the flow (steps invoking using-git-worktrees, e.g., the
block around "Create isolated worktree" and the similarly referenced lines
93-95) to explicitly define BRANCH_NAME beforehand (state the variable name
BRANCH_NAME, the naming convention/format to use, and where it will be
stored/consumed), then call using-git-worktrees; ensure the wording makes the
handoff explicit so the worktree creation can build the path and create the
branch reliably.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/brainstorming/SKILL.md`:
- Around line 55-57: The `"not yet"` transition from "Ready to set up
implementation?" incorrectly routes back to "Present design sections"; instead
make the "not yet" outcome terminate the flow (e.g., point it to a stop/exit
node or remove the edge entirely) so the approved design does not re-enter
review; update the edge that currently reads `"Ready to set up implementation?"
-> "Present design sections" [label="not yet"];` to point to a terminal node (or
remove it) and ensure the "yes" path remains `"Ready to set up implementation?"
-> "Invoke using-git-worktrees" [label="yes"];`.

---

Nitpick comments:
In `@skills/brainstorming/SKILL.md`:
- Around line 31-33: The step that invokes using-git-worktrees is underspecified
because it relies on BRANCH_NAME but never establishes it; update the flow
(steps invoking using-git-worktrees, e.g., the block around "Create isolated
worktree" and the similarly referenced lines 93-95) to explicitly define
BRANCH_NAME beforehand (state the variable name BRANCH_NAME, the naming
convention/format to use, and where it will be stored/consumed), then call
using-git-worktrees; ensure the wording makes the handoff explicit so the
worktree creation can build the path and create the branch reliably.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 075c2df3-3999-4c59-bc5c-9f73519387f9

📥 Commits

Reviewing files that changed from the base of the PR and between e4a2375 and bfacfeb.

📒 Files selected for processing (2)
  • skills/brainstorming/SKILL.md
  • skills/writing-plans/SKILL.md

Comment on lines +55 to +57
"Write design doc" -> "Ready to set up implementation?";
"Ready to set up implementation?" -> "Invoke using-git-worktrees" [label="yes"];
"Ready to set up implementation?" -> "Present design sections" [label="not yet"];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Don't send "not yet" back into the design loop.

By this point the design is already approved and written. Routing "not yet" back to Present design sections implies the agent should reopen design review instead of simply stopping after the gate.

Suggested graph fix
     "Write design doc" -> "Ready to set up implementation?";
     "Ready to set up implementation?" -> "Invoke using-git-worktrees" [label="yes"];
-    "Ready to set up implementation?" -> "Present design sections" [label="not yet"];
+    "Ready to set up implementation?" -> "Done for now" [label="not yet"];
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"Write design doc" -> "Ready to set up implementation?";
"Ready to set up implementation?" -> "Invoke using-git-worktrees" [label="yes"];
"Ready to set up implementation?" -> "Present design sections" [label="not yet"];
"Write design doc" -> "Ready to set up implementation?";
"Ready to set up implementation?" -> "Invoke using-git-worktrees" [label="yes"];
"Ready to set up implementation?" -> "Done for now" [label="not yet"];
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/brainstorming/SKILL.md` around lines 55 - 57, The `"not yet"`
transition from "Ready to set up implementation?" incorrectly routes back to
"Present design sections"; instead make the "not yet" outcome terminate the flow
(e.g., point it to a stop/exit node or remove the edge entirely) so the approved
design does not re-enter review; update the edge that currently reads `"Ready to
set up implementation?" -> "Present design sections" [label="not yet"];` to
point to a terminal node (or remove it) and ensure the "yes" path remains
`"Ready to set up implementation?" -> "Invoke using-git-worktrees"
[label="yes"];`.

IgorTavcar added a commit to IgorTavcar/superpowers that referenced this pull request Mar 9, 2026
…me guard (obra#628)

Add implementation gate question after design approval, insert worktree
setup step, and use -plan.md suffix to avoid overwriting design docs.

Upstream PR: obra#628

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

Brainstorming skill skips design doc review and overwrites it with the plan

1 participant