fix(superpowers-bridge): add bridge-new skill, move worktree creation before any artifact - #9
Open
LuSrackhall wants to merge 1 commit into
Conversation
… before any artifact Root cause: /opsx:new writes change scaffolding on main working tree as untracked files. Subsequent artifacts are also untracked. When /opsx:apply creates a worktree, untracked files are not synced — causing a gap where apply lacks necessary planning artifacts. Solution: Ship a bundled bridge-new skill that creates the worktree FIRST, then runs openspec new change inside it. All artifacts land directly in the isolated branch with zero main-tree pollution. Every artifact instruction now checks for the worktree and STOPS if missing. Changes: - NEW: templates/skills/bridge-new.md — entry skill for the schema - schema.yaml: add worktree check to all 6 artifact instructions + apply - README.md: update lifecycle diagram, timing notes, touchpoints, walkthrough - README.zh-TW.md: sync all changes to Traditional Chinese - README.md & .zh-TW.md: add design decision documenting why a skill was necessary Closes JiangWay#6
Author
|
此 pr 由 ai 生成, 我并没有做任何形式测试, 仅供作者参考 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
/opsx:new --schema superpowers-bridge creates the change directory on the main working tree as untracked files. All subsequent artifacts (brainstorm.md, proposal.md, design.md, specs/, tasks.md, plan.md) are also written as untracked files. When /opsx:apply later creates a git worktree for implementation, untracked files are not carried over — causing a gap where apply lacks necessary planning artifacts.
Root Cause
README line 373 noted that v0's auto-commit was removed per PR #970, calling it "the worktree skill's responsibility" — but using-git-worktrees SKILL.md never handled untracked files. OpenSpec schemas have no before_create hook, so the earliest execution point is artifact.instruction (at /opsx:continue), by which time /opsx:new has already written files on main.
Solution (Plan C+)
Ship a bundled bridge-new skill that reverses the order:
Add worktree detection to every artifact instruction — each /opsx:continue checks git worktree list and STOPS if the worktree is missing.
Changes
Verification
Closes #6