Skip to content

fix: restore worktree creation step in brainstorming skill - #829

Closed
mzonghao wants to merge 2 commits into
obra:mainfrom
mzonghao:fix/restore-worktree-step-in-brainstorming
Closed

mzonghao wants to merge 2 commits into
obra:mainfrom
mzonghao:fix/restore-worktree-step-in-brainstorming

Conversation

@mzonghao

@mzonghao mzonghao commented Mar 19, 2026 •

Copy link
Copy Markdown

Summary

  • In v3.1.0, brainstorming had a "Phase 4: Worktree Setup" between design approval and planning handoff. When the spec doc writing step was added in a later version, this worktree creation step was dropped, causing cross-reference inconsistencies across three skills:
    • writing-plans referenced "dedicated worktree (created by brainstorming skill)" but brainstorming had no worktree step
    • using-git-worktrees referenced "brainstorming (Phase 4)" but that phase no longer existed
  • Tracing the git history reveals the evolution:
    • v3.1.0: brainstorming had an explicit Phase 4 (Worktree Setup) and Phase 5 (Planning Handoff)
    • v3.4.1 (8e38ab8 "Simplify brainstorming skill"): Phase structure removed, but worktree reference kept in prose
    • v4.3.0 (7f2ee61 "Enforce brainstorming workflow with hard gates"): worktree reference fully removed, replaced with "Do NOT invoke any other skill. writing-plans is the next step."
      However, the cross-references in other files were not updated to match.
  • Fix: Re-insert worktree creation as step 6 in brainstorming checklist (after design approval, before writing spec doc), so that spec, plan, and implementation all live in the same worktree branch. Updated cross-references in writing-plans and using-git-worktrees accordingly.

Changes

File Change
skills/brainstorming/SKILL.md Added step 6 "Create worktree" between design approval and spec writing; updated dot graph
skills/writing-plans/SKILL.md Updated context line to clarify worktree is created by brainstorming before writing spec
skills/using-git-worktrees/SKILL.md Removed stale "(Phase 4)" reference, updated to "after design approval, before writing spec doc"

Test plan

  • Verify brainstorming checklist steps are correctly numbered 1-10
  • Verify dot graph renders correctly with the new worktree node
  • Verify cross-references between the three skills are consistent

@mzonghao

Copy link
Copy Markdown
Author

The origin pr is: #803

But I made a mistake.

After re-examining the workflow, I found that using-git-worktrees should be invoked before writing the spec doc during brainstorming, not before writing the plan doc.

@obra obra added bug Something isn't working claude-code Claude Code (Anthropic CLI) issues brainstorming Retired: use skill:brainstorming worktrees Retired: use skill:using-git-worktrees duplicate This issue or pull request already exists no-obvious-human-review Submission shows no evidence of human review labels Mar 23, 2026
writing-plans/SKILL.md states that it should "run in a dedicated worktree (created by brainstorming skill)",but the current brainstorming/SKILL.md has no worktree creation step.Similarly, using-git-worktrees/SKILL.md claims it is "Called by brainstorming (Phase 4)", referencing a Phase 4 that no longer exists.Tracing the git history reveals the evolution:v3.1.0: brainstorming had an explicit Phase 4 (Worktree Setup) and Phase 5 (Planning Handoff)v3.4.1 (8e38ab8 "Simplify brainstorming skill"): Phase structure removed, but worktree reference kept in prosev4.3.0 (7f2ee61 "Enforce brainstorming workflow with hard gates"): worktree reference fully removed, replaced with "Do NOT invoke any other skill. writing-plans is the next step."However, the cross-references in other files were not updated to match.Fix: re-insert worktree creation as step 6 in brainstorming (after
design approval, before writing spec doc), so spec, plan, and
implementation all live in the same worktree branch. Update
cross-references in writing-plans and using-git-worktrees accordingly.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@mzonghao
mzonghao force-pushed the fix/restore-worktree-step-in-brainstorming branch from 481db71 to bb47821 Compare March 27, 2026 03:01
@obra

obra commented Mar 29, 2026

Copy link
Copy Markdown
Owner

Hi @mzonghao — PRs #632 and #675 already address this same issue (#574). You reference your own earlier #803 but don't mention the existing PRs. Could you explain why you opened a new PR rather than reviewing or building on those? Was there something about their approaches that didn't work for you?

— Claude Opus 4.6, Claude Code 2.1.87

@mzonghao

mzonghao commented Mar 30, 2026 •

Copy link
Copy Markdown
Author

Hi @mzonghao — PRs #632 and #675 already address this same issue (#574). You reference your own earlier #803 but don't mention the existing PRs. Could you explain why you opened a new PR rather than reviewing or building on those? Was there something about their approaches that didn't work for you?

— Claude Opus 4.6, Claude Code 2.1.87

I have to admit you were right. I went back and looked at the two earlier PRs—they overlap a lot with what I did.

I hadn’t realized someone else had already put up similar changes.

What’s the best next step on your end—should I close this PR and continue in the other thread(s)?

---- By the way, I noticed your replies were coming from Claude Code as well—that’s really cool. Out of curiosity, how did you set that up? Did you put together a Claude agent for it?

@mzonghao

Copy link
Copy Markdown
Author

The question has been resolved, thx

@mzonghao mzonghao closed this May 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

brainstorming Retired: use skill:brainstorming bug Something isn't working claude-code Claude Code (Anthropic CLI) issues duplicate This issue or pull request already exists no-obvious-human-review Submission shows no evidence of human review worktrees Retired: use skill:using-git-worktrees

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants