From 1872f50b6416dd964f36014435ea121c54a4cc35 Mon Sep 17 00:00:00 2001 From: CL Kao Date: Thu, 29 Jan 2026 14:34:38 -0800 Subject: [PATCH 1/8] fix(tests): handle case variations in skill recognition test The assertion now matches "subagent-driven-development", "Subagent-Driven Development", and "Subagent Driven" since Claude's responses may use different casing and formatting styles. Co-Authored-By: Claude Opus 4.5 --- tests/claude-code/test-subagent-driven-development.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/claude-code/test-subagent-driven-development.sh b/tests/claude-code/test-subagent-driven-development.sh index 8edea06..95941ed 100755 --- a/tests/claude-code/test-subagent-driven-development.sh +++ b/tests/claude-code/test-subagent-driven-development.sh @@ -14,7 +14,7 @@ echo "Test 1: Skill loading..." output=$(run_claude "What is the subagent-driven-development skill? Describe its key steps briefly." 30) -if assert_contains "$output" "subagent-driven-development" "Skill is recognized"; then +if assert_contains "$output" "subagent-driven-development\|Subagent-Driven Development\|Subagent Driven" "Skill is recognized"; then : # pass else exit 1 From 93cf2ee84f9ba8a8ac8229eb927170dd7cb76b3b Mon Sep 17 00:00:00 2001 From: CL Kao Date: Thu, 29 Jan 2026 14:39:50 -0800 Subject: [PATCH 2/8] test: add worktree requirement test for subagent-driven-development Add Test 8 to verify that using-git-worktrees is mentioned as a required skill for subagent-driven-development. This test will initially fail per TDD approach - the skill file needs to be updated to pass this test. Co-Authored-By: Claude Opus 4.5 --- .../claude-code/test-subagent-driven-development.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/claude-code/test-subagent-driven-development.sh b/tests/claude-code/test-subagent-driven-development.sh index 95941ed..e23a64b 100755 --- a/tests/claude-code/test-subagent-driven-development.sh +++ b/tests/claude-code/test-subagent-driven-development.sh @@ -136,4 +136,17 @@ fi echo "" +# Test 8: Verify worktree requirement +echo "Test 8: Worktree requirement..." + +output=$(run_claude "What workflow skills are required before using subagent-driven-development? List any prerequisites or required skills." 30) + +if assert_contains "$output" "using-git-worktrees\|worktree" "Mentions worktree requirement"; then + : # pass +else + exit 1 +fi + +echo "" + echo "=== All subagent-driven-development skill tests passed ===" From f8dbe7b196c7821583b206f9a92f955612ed02f5 Mon Sep 17 00:00:00 2001 From: CL Kao Date: Thu, 29 Jan 2026 14:41:39 -0800 Subject: [PATCH 3/8] test: add Test 9 - main branch red flag warning TDD: Test verifies that subagent-driven-development skill warns against starting implementation directly on main/master branch. Test expects skill to recommend worktree or feature branch instead. Co-Authored-By: Claude Opus 4.5 --- .../claude-code/test-subagent-driven-development.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/claude-code/test-subagent-driven-development.sh b/tests/claude-code/test-subagent-driven-development.sh index e23a64b..fe0c97c 100755 --- a/tests/claude-code/test-subagent-driven-development.sh +++ b/tests/claude-code/test-subagent-driven-development.sh @@ -149,4 +149,17 @@ fi echo "" +# Test 9: Verify main branch warning +echo "Test 9: Main branch red flag..." + +output=$(run_claude "In subagent-driven-development, is it okay to start implementation directly on the main branch?" 30) + +if assert_contains "$output" "worktree\|feature.*branch\|not.*main\|never.*main\|avoid.*main\|don't.*main" "Warns against main branch"; then + : # pass +else + exit 1 +fi + +echo "" + echo "=== All subagent-driven-development skill tests passed ===" From fa3f46d4e952dd52a450d3a8d588414dc4a49b59 Mon Sep 17 00:00:00 2001 From: CL Kao Date: Thu, 29 Jan 2026 14:43:33 -0800 Subject: [PATCH 4/8] docs(subagent-driven-development): add using-git-worktrees as required skill Adds using-git-worktrees as the first required workflow skill in the Integration section. This makes explicit that an isolated workspace should be set up before starting subagent-driven development. Co-Authored-By: Claude Opus 4.5 --- skills/subagent-driven-development/SKILL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/skills/subagent-driven-development/SKILL.md b/skills/subagent-driven-development/SKILL.md index a9a9454..fd62904 100644 --- a/skills/subagent-driven-development/SKILL.md +++ b/skills/subagent-driven-development/SKILL.md @@ -229,6 +229,7 @@ Done! ## Integration **Required workflow skills:** +- **superpowers:using-git-worktrees** - REQUIRED: Set up isolated workspace before starting - **superpowers:writing-plans** - Creates the plan this skill executes - **superpowers:requesting-code-review** - Code review template for reviewer subagents - **superpowers:finishing-a-development-branch** - Complete development after all tasks From b63d4859553dc09ee71ff50f80336eab9fe28e5a Mon Sep 17 00:00:00 2001 From: CL Kao Date: Thu, 29 Jan 2026 14:45:04 -0800 Subject: [PATCH 5/8] docs(subagent-driven-development): add main branch red flag to Never list Add explicit warning against starting implementation on main/master branch without first using a worktree for isolation. Co-Authored-By: Claude Opus 4.5 --- skills/subagent-driven-development/SKILL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/skills/subagent-driven-development/SKILL.md b/skills/subagent-driven-development/SKILL.md index fd62904..46c4989 100644 --- a/skills/subagent-driven-development/SKILL.md +++ b/skills/subagent-driven-development/SKILL.md @@ -199,6 +199,7 @@ Done! ## Red Flags **Never:** +- Start implementation on main/master branch (use worktree first) - Skip reviews (spec compliance OR code quality) - Proceed with unfixed issues - Dispatch multiple implementation subagents in parallel (conflicts) From bb2ff5d309e5da6e021eb517c5012eb53c50a969 Mon Sep 17 00:00:00 2001 From: CL Kao Date: Thu, 29 Jan 2026 14:46:45 -0800 Subject: [PATCH 6/8] docs(using-git-worktrees): add subagent/executing-plans as callers Update Integration section to show bidirectional relationship: subagent-driven-development and executing-plans now list using-git-worktrees as required, so this skill should list them as callers. Co-Authored-By: Claude Opus 4.5 --- skills/using-git-worktrees/SKILL.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/skills/using-git-worktrees/SKILL.md b/skills/using-git-worktrees/SKILL.md index 9d52d80..e153843 100644 --- a/skills/using-git-worktrees/SKILL.md +++ b/skills/using-git-worktrees/SKILL.md @@ -210,8 +210,9 @@ Ready to implement auth feature **Called by:** - **brainstorming** (Phase 4) - REQUIRED when design is approved and implementation follows +- **subagent-driven-development** - REQUIRED before executing any tasks +- **executing-plans** - REQUIRED before executing any tasks - Any skill needing isolated workspace **Pairs with:** - **finishing-a-development-branch** - REQUIRED for cleanup after work complete -- **executing-plans** or **subagent-driven-development** - Work happens in this worktree From b323e3580535c969eb97c923fb1acddf8a7a2b35 Mon Sep 17 00:00:00 2001 From: CL Kao Date: Thu, 29 Jan 2026 14:48:24 -0800 Subject: [PATCH 7/8] docs(executing-plans): add worktree requirement before executing plans Add Integration section referencing using-git-worktrees skill as required, consistent with subagent-driven-development skill. Also add reminder to never start on main/master branch. Co-Authored-By: Claude Opus 4.5 --- skills/executing-plans/SKILL.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/skills/executing-plans/SKILL.md b/skills/executing-plans/SKILL.md index ca77290..180289a 100644 --- a/skills/executing-plans/SKILL.md +++ b/skills/executing-plans/SKILL.md @@ -74,3 +74,11 @@ After all tasks complete and verified: - Reference skills when plan says to - Between batches: just report and wait - Stop when blocked, don't guess +- Never start on main/master branch (use worktree first) + +## Integration + +**Required workflow skills:** +- **superpowers:using-git-worktrees** - REQUIRED: Set up isolated workspace before starting +- **superpowers:writing-plans** - Creates the plan this skill executes +- **superpowers:finishing-a-development-branch** - Complete development after all tasks From c7816ee2a6ee81f8cdfb1b43fcf2f70612ea0f90 Mon Sep 17 00:00:00 2001 From: CL Kao Date: Thu, 29 Jan 2026 15:12:50 -0800 Subject: [PATCH 8/8] docs: change main branch red flag to require explicit user consent Instead of prohibiting main branch work entirely, allow it with explicit user consent. This is more flexible while still ensuring users are aware of the implications. Co-Authored-By: Claude Opus 4.5 --- skills/executing-plans/SKILL.md | 2 +- skills/subagent-driven-development/SKILL.md | 2 +- tests/claude-code/test-subagent-driven-development.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/skills/executing-plans/SKILL.md b/skills/executing-plans/SKILL.md index 180289a..c1b2533 100644 --- a/skills/executing-plans/SKILL.md +++ b/skills/executing-plans/SKILL.md @@ -74,7 +74,7 @@ After all tasks complete and verified: - Reference skills when plan says to - Between batches: just report and wait - Stop when blocked, don't guess -- Never start on main/master branch (use worktree first) +- Never start implementation on main/master branch without explicit user consent ## Integration diff --git a/skills/subagent-driven-development/SKILL.md b/skills/subagent-driven-development/SKILL.md index 46c4989..b578dfa 100644 --- a/skills/subagent-driven-development/SKILL.md +++ b/skills/subagent-driven-development/SKILL.md @@ -199,7 +199,7 @@ Done! ## Red Flags **Never:** -- Start implementation on main/master branch (use worktree first) +- Start implementation on main/master branch without explicit user consent - Skip reviews (spec compliance OR code quality) - Proceed with unfixed issues - Dispatch multiple implementation subagents in parallel (conflicts) diff --git a/tests/claude-code/test-subagent-driven-development.sh b/tests/claude-code/test-subagent-driven-development.sh index fe0c97c..20d8d4c 100755 --- a/tests/claude-code/test-subagent-driven-development.sh +++ b/tests/claude-code/test-subagent-driven-development.sh @@ -154,7 +154,7 @@ echo "Test 9: Main branch red flag..." output=$(run_claude "In subagent-driven-development, is it okay to start implementation directly on the main branch?" 30) -if assert_contains "$output" "worktree\|feature.*branch\|not.*main\|never.*main\|avoid.*main\|don't.*main" "Warns against main branch"; then +if assert_contains "$output" "worktree\|feature.*branch\|not.*main\|never.*main\|avoid.*main\|don't.*main\|consent\|permission" "Warns against main branch"; then : # pass else exit 1