@complexthings/superpowers-agent 9.2.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/.agents/skills/claude-handoff/SKILL.md +18 -0
  2. package/.agents/skills/code-review/SKILL.md +89 -0
  3. package/.agents/skills/{improve-codebase-architecture → codebase-design}/DEEPENING.md +1 -1
  4. package/.agents/skills/{improve-codebase-architecture/INTERFACE-DESIGN.md → codebase-design/DESIGN-IT-TWICE.md} +3 -3
  5. package/.agents/skills/codebase-design/SKILL.md +114 -0
  6. package/.agents/skills/design-an-interface/SKILL.md +94 -0
  7. package/.agents/skills/{diagnose → diagnosing-bugs}/SKILL.md +29 -12
  8. package/.agents/skills/{grill-with-docs → domain-modeling}/CONTEXT-FORMAT.md +1 -4
  9. package/.agents/skills/domain-modeling/SKILL.md +74 -0
  10. package/.agents/skills/fable-mode/SKILL.md +95 -0
  11. package/.agents/skills/git-guardrails-claude-code/SKILL.md +95 -0
  12. package/.agents/skills/git-guardrails-claude-code/scripts/block-dangerous-git.sh +25 -0
  13. package/.agents/skills/grill-me/SKILL.md +7 -0
  14. package/.agents/skills/grill-with-docs/SKILL.md +3 -86
  15. package/.agents/skills/grilling/SKILL.md +14 -0
  16. package/.agents/skills/handoff/SKILL.md +2 -1
  17. package/.agents/skills/i-have-adhd/SKILL.md +120 -0
  18. package/.agents/skills/implement/SKILL.md +11 -0
  19. package/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +3 -3
  20. package/.agents/skills/improve-codebase-architecture/SKILL.md +13 -28
  21. package/.agents/skills/loop-me/SKILL.md +32 -0
  22. package/.agents/skills/prototype/SKILL.md +1 -1
  23. package/.agents/skills/qa/SKILL.md +130 -0
  24. package/.agents/skills/request-refactor-plan/SKILL.md +68 -0
  25. package/.agents/skills/research/SKILL.md +12 -0
  26. package/.agents/skills/resolving-merge-conflicts/SKILL.md +14 -0
  27. package/.agents/skills/scaffold-exercises/SKILL.md +106 -0
  28. package/.agents/skills/setup-matt-pocock-skills/SKILL.md +11 -9
  29. package/.agents/skills/setup-matt-pocock-skills/domain.md +2 -2
  30. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +23 -0
  31. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +23 -0
  32. package/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +11 -0
  33. package/.agents/skills/skill-creator/LICENSE.txt +202 -0
  34. package/.agents/skills/skill-creator/SKILL.md +485 -0
  35. package/.agents/skills/skill-creator/agents/analyzer.md +274 -0
  36. package/.agents/skills/skill-creator/agents/comparator.md +202 -0
  37. package/.agents/skills/skill-creator/agents/grader.md +223 -0
  38. package/.agents/skills/skill-creator/assets/eval_review.html +146 -0
  39. package/.agents/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  40. package/.agents/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  41. package/.agents/skills/skill-creator/references/schemas.md +430 -0
  42. package/.agents/skills/skill-creator/scripts/__init__.py +0 -0
  43. package/.agents/skills/skill-creator/scripts/__pycache__/__init__.cpython-314.pyc +0 -0
  44. package/.agents/skills/skill-creator/scripts/__pycache__/run_eval.cpython-314.pyc +0 -0
  45. package/.agents/skills/skill-creator/scripts/__pycache__/utils.cpython-314.pyc +0 -0
  46. package/.agents/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  47. package/.agents/skills/skill-creator/scripts/generate_report.py +326 -0
  48. package/.agents/skills/skill-creator/scripts/improve_description.py +247 -0
  49. package/.agents/skills/skill-creator/scripts/package_skill.py +136 -0
  50. package/.agents/skills/skill-creator/scripts/quick_validate.py +103 -0
  51. package/.agents/skills/skill-creator/scripts/run_eval.py +310 -0
  52. package/.agents/skills/skill-creator/scripts/run_loop.py +328 -0
  53. package/.agents/skills/skill-creator/scripts/utils.py +47 -0
  54. package/.agents/skills/tdd/SKILL.md +17 -90
  55. package/.agents/skills/tdd/tests.md +16 -0
  56. package/.agents/skills/teach/GLOSSARY-FORMAT.md +35 -0
  57. package/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +46 -0
  58. package/.agents/skills/teach/MISSION-FORMAT.md +31 -0
  59. package/.agents/skills/teach/RESOURCES-FORMAT.md +32 -0
  60. package/.agents/skills/teach/SKILL.md +140 -0
  61. package/.agents/skills/{to-prd → to-spec}/SKILL.md +11 -12
  62. package/.agents/skills/to-tickets/SKILL.md +114 -0
  63. package/.agents/skills/triage/AGENT-BRIEF.md +40 -1
  64. package/.agents/skills/triage/OUT-OF-SCOPE.md +5 -1
  65. package/.agents/skills/triage/SKILL.md +20 -11
  66. package/.agents/skills/wayfinder/SKILL.md +127 -0
  67. package/.agents/skills/writing-great-skills/GLOSSARY.md +201 -0
  68. package/.agents/skills/writing-great-skills/SKILL.md +83 -0
  69. package/.agents/superpowers-agent +99 -218
  70. package/.agents/superpowers-bootstrap.md +3 -3
  71. package/.agents/templates/AGENTS.md.template +11 -34
  72. package/.agents/templates/SUPERPOWERS.md.template +4 -4
  73. package/.github/copilot-instructions.md +33 -1
  74. package/.github/hooks/rtk-rewrite.json +22 -0
  75. package/AGENTS.md +32 -36
  76. package/README.md +63 -198
  77. package/package.json +1 -1
  78. package/skills/collaboration/brainstorming/SKILL.md +39 -139
  79. package/skills/collaboration/brainstorming/skill.json +2 -2
  80. package/skills/collaboration/leveraging-cli-tools/SKILL.md +70 -71
  81. package/skills/collaboration/leveraging-cli-tools/references/copilot-instructions.md +30 -0
  82. package/skills/collaboration/leveraging-cli-tools/scripts/setup-ponytail.sh +185 -0
  83. package/skills/collaboration/leveraging-cli-tools/scripts/setup-rtk.sh +217 -0
  84. package/skills/collaboration/leveraging-cli-tools/skill.json +1 -1
  85. package/skills/meta/create-skill-json/SKILL.md +4 -4
  86. package/skills/meta/create-skill-json/skill.json +1 -1
  87. package/skills/meta/create-skill-json/test-scenarios.md +1 -1
  88. package/skills/setup-skills/SKILL.md +18 -11
  89. package/skills/setup-skills/skill.json +8 -0
  90. package/.agents/skills/caveman/SKILL.md +0 -49
  91. package/.agents/skills/improve-codebase-architecture/LANGUAGE.md +0 -53
  92. package/.agents/skills/karpathy-guidelines/SKILL.md +0 -75
  93. package/.agents/skills/review/SKILL.md +0 -78
  94. package/.agents/skills/tdd/deep-modules.md +0 -33
  95. package/.agents/skills/tdd/interface-design.md +0 -31
  96. package/.agents/skills/tdd/refactoring.md +0 -10
  97. package/.agents/skills/to-issues/SKILL.md +0 -83
  98. package/.agents/skills/zoom-out/SKILL.md +0 -7
  99. package/skills/architecture/ABOUT.md +0 -20
  100. package/skills/architecture/preserving-productive-tensions/SKILL.md +0 -146
  101. package/skills/architecture/preserving-productive-tensions/skill.json +0 -9
  102. package/skills/collaboration/brainstorming/spec-document-reviewer-prompt.md +0 -50
  103. package/skills/collaboration/brainstorming/visual-companion.md +0 -277
  104. package/skills/collaboration/dispatching-parallel-agents/SKILL.md +0 -174
  105. package/skills/collaboration/dispatching-parallel-agents/skill.json +0 -9
  106. package/skills/collaboration/executing-plans/SKILL.md +0 -130
  107. package/skills/collaboration/executing-plans/skill.json +0 -9
  108. package/skills/collaboration/finishing-a-development-branch/SKILL.md +0 -261
  109. package/skills/collaboration/finishing-a-development-branch/skill.json +0 -9
  110. package/skills/collaboration/leveraging-cli-tools/scripts/slim.py +0 -167
  111. package/skills/collaboration/receiving-code-review/SKILL.md +0 -233
  112. package/skills/collaboration/receiving-code-review/skill.json +0 -9
  113. package/skills/collaboration/requesting-code-review/SKILL.md +0 -110
  114. package/skills/collaboration/requesting-code-review/code-reviewer.md +0 -146
  115. package/skills/collaboration/requesting-code-review/skill.json +0 -12
  116. package/skills/collaboration/subagent-driven-development/SKILL.md +0 -255
  117. package/skills/collaboration/subagent-driven-development/code-quality-reviewer-prompt.md +0 -26
  118. package/skills/collaboration/subagent-driven-development/implementer-prompt.md +0 -113
  119. package/skills/collaboration/subagent-driven-development/skill.json +0 -15
  120. package/skills/collaboration/subagent-driven-development/spec-reviewer-prompt.md +0 -61
  121. package/skills/collaboration/using-git-worktrees/SKILL.md +0 -366
  122. package/skills/collaboration/using-git-worktrees/skill.json +0 -9
  123. package/skills/collaboration/writing-plans/SKILL.md +0 -121
  124. package/skills/collaboration/writing-plans/plan-document-reviewer-prompt.md +0 -52
  125. package/skills/collaboration/writing-plans/skill.json +0 -9
  126. package/skills/debugging/defense-in-depth/SKILL.md +0 -380
  127. package/skills/debugging/defense-in-depth/skill.json +0 -9
  128. package/skills/debugging/root-cause-tracing/SKILL.md +0 -361
  129. package/skills/debugging/root-cause-tracing/find-polluter.sh +0 -63
  130. package/skills/debugging/root-cause-tracing/skill.json +0 -12
  131. package/skills/debugging/systematic-debugging/SKILL.md +0 -299
  132. package/skills/debugging/systematic-debugging/condition-based-waiting-example.ts +0 -158
  133. package/skills/debugging/systematic-debugging/condition-based-waiting.md +0 -115
  134. package/skills/debugging/systematic-debugging/defense-in-depth.md +0 -122
  135. package/skills/debugging/systematic-debugging/find-polluter.sh +0 -63
  136. package/skills/debugging/systematic-debugging/root-cause-tracing.md +0 -169
  137. package/skills/debugging/systematic-debugging/skill.json +0 -9
  138. package/skills/debugging/systematic-debugging/test-academic.md +0 -14
  139. package/skills/debugging/systematic-debugging/test-pressure-1.md +0 -58
  140. package/skills/debugging/systematic-debugging/test-pressure-2.md +0 -68
  141. package/skills/debugging/systematic-debugging/test-pressure-3.md +0 -69
  142. package/skills/debugging/verification-before-completion/SKILL.md +0 -143
  143. package/skills/debugging/verification-before-completion/skill.json +0 -9
  144. package/skills/finding-skills/SKILL.md +0 -101
  145. package/skills/finding-skills/skill.json +0 -8
  146. package/skills/meta/create-agents-md/SKILL.md +0 -182
  147. package/skills/meta/create-agents-md/skill.json +0 -9
  148. package/skills/meta/creating-prompts/SKILL.md +0 -349
  149. package/skills/meta/creating-prompts/examples/do-example.md +0 -65
  150. package/skills/meta/creating-prompts/examples/plan-example.md +0 -75
  151. package/skills/meta/creating-prompts/examples/refine-example.md +0 -65
  152. package/skills/meta/creating-prompts/examples/research-example.md +0 -63
  153. package/skills/meta/creating-prompts/scripts/get-next-number.sh +0 -27
  154. package/skills/meta/creating-prompts/skill.json +0 -20
  155. package/skills/meta/creating-prompts/templates/do-template.md +0 -59
  156. package/skills/meta/creating-prompts/templates/plan-template.md +0 -58
  157. package/skills/meta/creating-prompts/templates/refine-template.md +0 -54
  158. package/skills/meta/creating-prompts/templates/research-template.md +0 -56
  159. package/skills/meta/using-superpowers/SKILL.md +0 -108
  160. package/skills/meta/using-superpowers/skill.json +0 -5
  161. package/skills/meta/writing-prompts/SKILL.md +0 -122
  162. package/skills/meta/writing-prompts/references/platforms.md +0 -114
  163. package/skills/meta/writing-prompts/skill.json +0 -9
  164. package/skills/problem-solving/ABOUT.md +0 -40
  165. package/skills/problem-solving/collision-zone-thinking/SKILL.md +0 -188
  166. package/skills/problem-solving/collision-zone-thinking/references/historical-examples.md +0 -393
  167. package/skills/problem-solving/collision-zone-thinking/skill.json +0 -9
  168. package/skills/problem-solving/inversion-exercise/SKILL.md +0 -174
  169. package/skills/problem-solving/inversion-exercise/skill.json +0 -9
  170. package/skills/problem-solving/meta-pattern-recognition/SKILL.md +0 -116
  171. package/skills/problem-solving/meta-pattern-recognition/skill.json +0 -9
  172. package/skills/problem-solving/scale-game/SKILL.md +0 -222
  173. package/skills/problem-solving/scale-game/skill.json +0 -9
  174. package/skills/problem-solving/simplification-cascades/SKILL.md +0 -113
  175. package/skills/problem-solving/simplification-cascades/skill.json +0 -9
  176. package/skills/problem-solving/when-stuck/SKILL.md +0 -69
  177. package/skills/problem-solving/when-stuck/skill.json +0 -9
  178. package/skills/research/ABOUT.md +0 -20
  179. package/skills/research/tracing-knowledge-lineages/SKILL.md +0 -241
  180. package/skills/research/tracing-knowledge-lineages/skill.json +0 -9
  181. package/skills/testing/condition-based-waiting/SKILL.md +0 -359
  182. package/skills/testing/condition-based-waiting/example.ts +0 -158
  183. package/skills/testing/condition-based-waiting/skill.json +0 -12
  184. package/skills/testing/test-driven-development/SKILL.md +0 -434
  185. package/skills/testing/test-driven-development/skill.json +0 -9
  186. package/skills/testing/testing-anti-patterns/SKILL.md +0 -298
  187. package/skills/testing/testing-anti-patterns/skill.json +0 -9
  188. package/skills/testing/verification-before-completion/SKILL.md +0 -246
  189. package/skills/testing/verification-before-completion/skill.json +0 -10
  190. package/skills/using-a-skill/SKILL.md +0 -101
  191. package/skills/using-a-skill/skill.json +0 -8
  192. /package/.agents/skills/{diagnose → diagnosing-bugs}/scripts/hitl-loop.template.sh +0 -0
  193. /package/.agents/skills/{grill-with-docs → domain-modeling}/ADR-FORMAT.md +0 -0
@@ -1,130 +0,0 @@
1
- ---
2
- name: executing-plans
3
- description: Use when you have a written implementation plan to execute in a separate session with review checkpoints. Use this skill whenever a user opens a session with a plan file, says "execute this plan", "implement this plan", or hands you a plan document to work through. This is the parallel-session counterpart to subagent-driven-development — use it when the human wants to work in a separate context window with batch checkpoints rather than staying in the planning session.
4
- metadata:
5
- when_to_use: when partner provides a complete implementation plan to execute in controlled batches with review checkpoints, in a separate session from where the plan was written
6
- version: 2.3.0
7
- ---
8
-
9
- # Executing Plans
10
-
11
- ## Overview
12
-
13
- Load plan, review critically, execute tasks in batches, report for review between batches.
14
-
15
- **Core principle:** Batch execution with checkpoints for architect review — you implement, then pause for human eyes before continuing.
16
-
17
- **Announce at start:** "I'm using the executing-plans skill to implement this plan."
18
-
19
- **Note:** This skill is designed for parallel sessions (no subagents). If you're in a session *with* subagents available, `subagent-driven-development` will give better results — fresh context per task and automated review gates. But if you're here, you're in the right place.
20
-
21
- ```mermaid
22
- flowchart TD
23
- LOAD[Load and review plan] --> CONCERN{Concerns?}
24
- CONCERN -->|yes| ASK[Raise with partner]
25
- ASK --> CONCERN
26
- CONCERN -->|no| TODO[Create TodoWrite list]
27
- TODO --> BATCH[Execute next batch of tasks]
28
- BATCH --> VERIFY[Run verifications]
29
- VERIFY --> REPORT[Report to partner]
30
- REPORT --> FEEDBACK{Feedback?}
31
- FEEDBACK -->|changes needed| APPLY[Apply changes]
32
- APPLY --> BATCH
33
- FEEDBACK -->|continue| MORE{More tasks?}
34
- MORE -->|yes| BATCH
35
- MORE -->|no| FINISH[Use finishing-a-development-branch]
36
- ```
37
-
38
- ## The Process
39
-
40
- ### Step 1: Load and Review Plan
41
-
42
- 1. Read plan file
43
- 2. Review critically — identify any questions or concerns about the plan
44
- 3. If concerns: Raise them with your human partner before starting
45
- 4. If no concerns: Create TodoWrite with all tasks and proceed
46
-
47
- ### Step 2: Execute Batch
48
-
49
- **Default: First 3 tasks** (adjust based on complexity — 1 for risky/complex tasks, up to 5 for simple/mechanical ones)
50
-
51
- If the plan already has chunk markers (`## Chunk N: ...`), use those as your batches.
52
-
53
- For each task in the batch:
54
- 1. Mark as `in_progress`
55
- 2. Follow each step exactly — the plan has bite-sized steps for a reason
56
- 3. Run verifications as specified in the plan
57
- 4. Mark as `completed`
58
-
59
- ### Step 3: Report and Wait
60
-
61
- When the batch is complete, report clearly:
62
-
63
- ```
64
- Batch complete:
65
- - Task N: [what was done, verification output]
66
- - Task N+1: [what was done, verification output]
67
-
68
- Ready for feedback.
69
- ```
70
-
71
- Wait. Don't start the next batch until the partner responds.
72
-
73
- Apply any changes from feedback, then execute the next batch.
74
-
75
- ### Step 4: Complete Development
76
-
77
- After all tasks complete and verified:
78
- - Announce: "I'm using the finishing-a-development-branch skill to complete this work."
79
- - **REQUIRED SUB-SKILL:** Use `superpowers:finishing-a-development-branch`
80
- - Follow that skill to verify tests, present options, execute choice
81
-
82
- ## When to Stop and Ask for Help
83
-
84
- **STOP executing immediately when:**
85
- - Hit a blocker mid-batch (missing dependency, test fails, instruction unclear)
86
- - Plan has critical gaps preventing starting
87
- - You don't understand an instruction
88
- - Verification fails repeatedly (don't retry the same failing approach)
89
-
90
- **Ask for clarification rather than guessing.** The human wrote the plan — they know the intent.
91
-
92
- ## When to Revisit Earlier Steps
93
-
94
- **Return to Review (Step 1) when:**
95
- - Partner updates the plan based on your feedback
96
- - Fundamental approach needs rethinking
97
-
98
- **Don't force through blockers** — stop and ask.
99
-
100
- ## Batch Size Guidance
101
-
102
- The default of 3 tasks is a reasonable starting point, but adapt:
103
-
104
- | Situation | Batch size |
105
- |-----------|-----------|
106
- | Risky changes (migrations, deletes, auth) | 1 |
107
- | Complex multi-file tasks | 1–2 |
108
- | Standard implementation tasks | 3 (default) |
109
- | Simple mechanical tasks (config, docs) | 4–5 |
110
- | Plan has explicit chunk markers | Use chunks |
111
-
112
- ## Remember
113
-
114
- - Review the plan critically before starting — questions are cheaper before code is written
115
- - Follow plan steps exactly — the plan was designed to be followed, not interpreted
116
- - Don't skip verifications — they exist to catch problems early
117
- - Reference skills when the plan says to
118
- - Between batches: report clearly, then wait for partner
119
- - Stop when blocked, don't guess or power through
120
- - Never start implementation on main/master branch without explicit user consent
121
-
122
- ## Integration
123
-
124
- **Required workflow skills:**
125
- - **superpowers:using-git-worktrees** — REQUIRED: Set up isolated workspace before starting
126
- - **superpowers:writing-plans** — Creates the plan this skill executes
127
- - **superpowers:finishing-a-development-branch** — Complete development after all tasks
128
-
129
- **Alternative (same-session with subagents):**
130
- - **superpowers:subagent-driven-development** — Preferred when subagents are available; fresh context per task + automated two-stage review
@@ -1,9 +0,0 @@
1
- {
2
- "version": "2.3.0",
3
- "name": "superpowers:collaboration/executing-plans",
4
- "title": "Executing Plans",
5
- "aliases": [
6
- "executing-plans",
7
- "collaboration/executing-plans"
8
- ]
9
- }
@@ -1,261 +0,0 @@
1
- ---
2
- name: finishing-a-development-branch
3
- description: Use when implementation is complete and you need to decide how to integrate the work — guides completion of development work by running pre-merge checks, presenting structured options for merge, PR, or cleanup, and handling the chosen workflow including branch and worktree cleanup. Invoke this skill whenever a user says "I'm done", "implementation complete", "wrap up", "finish this branch", "create a PR", "merge to main", or "what do I do now that I'm done coding".
4
- ---
5
-
6
- # Finishing a Development Branch
7
-
8
- ## Overview
9
-
10
- Guide completion of development work by running pre-merge checks, presenting clear options, and handling the chosen workflow.
11
-
12
- **Core principle:** Verify → Present options → Execute choice → Clean up.
13
-
14
- **Announce at start:** "I'm using the finishing-a-development-branch skill to complete this work."
15
-
16
- ## The Process
17
-
18
- ### Step 1: Pre-Flight Checks
19
-
20
- Before presenting options, run these checks in order. Stop and report on any failure.
21
-
22
- #### 1a. Clean working tree
23
-
24
- ```bash
25
- git status --short
26
- ```
27
-
28
- If there are uncommitted changes, ask: "There are uncommitted changes. Should I commit them, stash them, or discard them before proceeding?"
29
-
30
- Wait for answer before continuing.
31
-
32
- #### 1b. Run tests
33
-
34
- Discover the test command by checking `package.json`, `Makefile`, `pyproject.toml`, `.github/workflows/`, or the project's README. Common commands:
35
-
36
- ```bash
37
- npm test # Node.js
38
- cargo test # Rust
39
- pytest # Python
40
- go test ./... # Go
41
- ./gradlew test # Gradle
42
- bundle exec rspec # Ruby
43
- ```
44
-
45
- **If tests fail:**
46
- ```
47
- Tests failing (<N> failures). Must fix before completing:
48
-
49
- [Show failures]
50
-
51
- Cannot proceed with merge/PR until tests pass.
52
- ```
53
-
54
- Stop. Don't proceed to Step 2.
55
-
56
- **If tests pass:** Continue to Step 2.
57
-
58
- #### 1c. Check if branch is up-to-date
59
-
60
- ```bash
61
- git fetch origin
62
- git rev-list --count HEAD..origin/<base-branch> 2>/dev/null
63
- ```
64
-
65
- If the count is greater than 0, inform the user:
66
- ```
67
- The base branch has <N> new commit(s) that aren't in this branch.
68
- Rebasing before merging will avoid hidden conflicts and keep history clean.
69
- ```
70
-
71
- This is advisory, not blocking — proceed to Step 2 regardless.
72
-
73
- ### Step 2: Determine Base Branch
74
-
75
- ```bash
76
- # Check what branch this was created from
77
- git log --oneline HEAD ^main ^master 2>/dev/null | tail -1
78
- # Or check the most recent common ancestor
79
- git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
80
- ```
81
-
82
- If ambiguous, ask: "What branch should I merge/PR into? (main, master, develop, etc.)"
83
-
84
- ### Step 3: Present Options
85
-
86
- Present exactly these 4 options:
87
-
88
- ```
89
- Implementation complete. What would you like to do?
90
-
91
- 1. Merge back to <base-branch> locally
92
- 2. Push and create a Pull Request
93
- 3. Keep the branch as-is (I'll handle it later)
94
- 4. Discard this work
95
-
96
- Which option?
97
- ```
98
-
99
- Keep options concise — don't add explanation unless asked.
100
-
101
- ### Step 4: Execute Choice
102
-
103
- #### Option 1: Merge Locally
104
-
105
- ```bash
106
- # Switch to base branch and update
107
- git switch <base-branch>
108
- git pull --ff-only
109
-
110
- # Merge feature branch (use --no-ff to preserve branch history, or --squash for clean log)
111
- git merge <feature-branch>
112
-
113
- # Verify tests still pass on merged result
114
- <test command>
115
-
116
- # If tests pass: delete feature branch and prune stale refs
117
- git branch -d <feature-branch>
118
- git fetch --prune
119
- ```
120
-
121
- Then: Cleanup worktree (Step 5)
122
-
123
- #### Option 2: Push and Create PR
124
-
125
- ```bash
126
- # Push branch to remote
127
- git push -u origin <feature-branch>
128
- ```
129
-
130
- Create PR with a meaningful description — fill in every section based on what was actually implemented:
131
-
132
- ```bash
133
- gh pr create --title "<concise title describing the change>" --body "$(cat <<'EOF'
134
- ## Summary
135
- - <what changed, bullet 1>
136
- - <why it exists, bullet 2>
137
-
138
- ## Motivation
139
- <Why does this exist? Link related issues if applicable.>
140
- Closes #NNN
141
-
142
- ## Testing
143
- <How was this verified? What edge cases were exercised?>
144
-
145
- ## Reviewer Notes
146
- <What feedback do you want? Any design decisions to discuss?>
147
- EOF
148
- )"
149
- ```
150
-
151
- Good PR titles are imperative and specific: `"Add retry logic to payment processor"` not `"fix stuff"`.
152
- After creating the PR, share the URL with the user.
153
-
154
- Then: Cleanup worktree (Step 5)
155
-
156
- #### Option 3: Keep As-Is
157
-
158
- Report: "Keeping branch `<name>`. Worktree preserved at `<path>`."
159
-
160
- **Don't cleanup worktree.**
161
-
162
- #### Option 4: Discard
163
-
164
- **Confirm first:**
165
- ```
166
- This will permanently delete:
167
- - Branch <name>
168
- - All commits: <commit-list>
169
- - Worktree at <path> (if applicable)
170
-
171
- Type 'discard' to confirm.
172
- ```
173
-
174
- Wait for exact typed confirmation.
175
-
176
- If confirmed:
177
-
178
- ```bash
179
- git switch <base-branch>
180
- git branch -D <feature-branch>
181
- ```
182
-
183
- Then: Cleanup worktree (Step 5)
184
-
185
- ### Step 5: Cleanup Worktree
186
-
187
- First check whether this work is in a worktree or the main working directory:
188
-
189
- ```bash
190
- git worktree list | grep "$(git branch --show-current)"
191
- ```
192
-
193
- **If in a worktree (Options 1, 2, 4):**
194
-
195
- ```bash
196
- git worktree remove <worktree-path>
197
- ```
198
-
199
- **If not in a worktree:** No worktree cleanup needed — the work is in the main repo directory.
200
-
201
- **For Option 3:** Keep worktree regardless.
202
-
203
- ## Quick Reference
204
-
205
- | Option | Merge | Push | Keep Worktree | Cleanup Branch |
206
- |--------|-------|------|---------------|----------------|
207
- | 1. Merge locally | ✓ | - | - | ✓ (+ prune) |
208
- | 2. Create PR | - | ✓ | - | - |
209
- | 3. Keep as-is | - | - | ✓ | - |
210
- | 4. Discard | - | - | - | ✓ (force) |
211
-
212
- ## Common Mistakes
213
-
214
- **Skipping test verification**
215
- - Problem: Merge broken code, create a failing PR
216
- - Fix: Always verify tests before offering options
217
-
218
- **Skipping the clean working tree check**
219
- - Problem: Uncommitted work gets lost or included unexpectedly
220
- - Fix: `git status --short` first; resolve before proceeding
221
-
222
- **Not updating before merge**
223
- - Problem: Stale conflicts hide bugs introduced at merge time
224
- - Fix: Advisory check in Step 1c; encourage rebasing when base has moved
225
-
226
- **Open-ended questions**
227
- - Problem: "What should I do next?" leads to ambiguous answers
228
- - Fix: Present exactly 4 structured options
229
-
230
- **Not pruning remote-tracking refs**
231
- - Problem: Stale refs in `git branch -r` cause confusion about what exists
232
- - Fix: `git fetch --prune` after Option 1 merge
233
-
234
- **No confirmation for discard**
235
- - Problem: Accidentally deletes work
236
- - Fix: Require typed "discard" confirmation
237
-
238
- ## Red Flags
239
-
240
- **Never:**
241
- - Proceed with uncommitted changes without user direction
242
- - Proceed with failing tests
243
- - Merge without verifying tests on the merged result
244
- - Delete work without confirmation
245
- - Force-push without explicit user request
246
-
247
- **Always:**
248
- - Check for uncommitted changes before anything else
249
- - Verify tests before offering options
250
- - Present exactly 4 options
251
- - Get typed confirmation for Option 4
252
- - Check for worktree vs. main working directory before cleanup
253
-
254
- ## Integration
255
-
256
- **Called by:**
257
- - **subagent-driven-development** (Step 7) — After all tasks complete
258
- - **executing-plans** (Step 5) — After all batches complete
259
-
260
- **Pairs with:**
261
- - **using-git-worktrees** — Cleans up worktrees created by that skill
@@ -1,9 +0,0 @@
1
- {
2
- "version": "1.1.0",
3
- "name": "superpowers:collaboration/finishing-a-development-branch",
4
- "title": "Finishing a Development Branch",
5
- "aliases": [
6
- "finishing-a-development-branch",
7
- "collaboration/finishing-a-development-branch"
8
- ]
9
- }
@@ -1,167 +0,0 @@
1
- #!/usr/bin/env python3
2
- """slim - reduce noisy command output to signal before it reaches your context.
3
-
4
- A stdin->stdout filter for output you CAN'T shape with a tool's own flags:
5
- logs, scan results, status dumps, stack traces, repeated lines. For tools that
6
- already project output (jq/yq/dasel/miller/htmlq), use their selectors instead;
7
- piping them through slim is redundant.
8
-
9
- Pipe a verbose command through it and ask only for the reductions you need:
10
-
11
- cargo test 2>&1 | slim --errors --dedup
12
- rg -n TODO --no-ignore | slim --group-dir
13
- gh run view --log | slim --uniq --max-line 200 --middle 40
14
- kubectl get events | slim --dedup --stats
15
-
16
- Reductions (compose freely):
17
- --comments drop comment-only lines (# // ; -- *) and blank lines
18
- --errors keep only lines matching error|warn|fail|fatal|panic|exception (-i)
19
- --grep RE keep only lines matching regex RE (use --invert to drop them)
20
- --invert invert --grep / --errors (drop matches instead of keeping)
21
- --dedup collapse ALL repeated lines, first-seen order, annotate " (xN)"
22
- --uniq collapse only CONSECUTIVE repeats, annotate " (xN)" (log-friendly)
23
- --group-dir turn a list of file paths into per-directory counts
24
- --max-line N truncate each line to N chars, append a horizontal ellipsis
25
- --head N keep first N lines
26
- --tail N keep last N lines
27
- --middle N keep first N and last N lines, replace the gap with a marker
28
- --stats print "lines A->B, bytes A->B (-P%)" to stderr (output unaffected)
29
-
30
- Always-on, lossless: trailing whitespace is stripped and runs of blank lines
31
- collapse to one. Everything lossy is opt-in. Order: filter -> transform ->
32
- dedup -> group -> blank-collapse -> truncate. Reductions are LOSSY by design;
33
- ask for what the task needs and know what you're discarding.
34
- """
35
- import argparse
36
- import re
37
- import sys
38
-
39
- COMMENT_RE = re.compile(r"^\s*(#|//|;|--|\*|/\*|\*/)")
40
- ERROR_RE = re.compile(r"error|warn|fail|fatal|panic|exception|traceback", re.IGNORECASE)
41
- ELLIPSIS = "…"
42
-
43
-
44
- def annotate(line: str, n: int) -> str:
45
- return line if n == 1 else f"{line} (x{n})"
46
-
47
-
48
- def dedup_all(lines):
49
- counts, order = {}, []
50
- for ln in lines:
51
- if ln not in counts:
52
- counts[ln] = 0
53
- order.append(ln)
54
- counts[ln] += 1
55
- return [annotate(ln, counts[ln]) for ln in order]
56
-
57
-
58
- def dedup_adjacent(lines):
59
- out, prev, n = [], None, 0
60
- for ln in lines:
61
- if ln == prev:
62
- n += 1
63
- else:
64
- if prev is not None:
65
- out.append(annotate(prev, n))
66
- prev, n = ln, 1
67
- if prev is not None:
68
- out.append(annotate(prev, n))
69
- return out
70
-
71
-
72
- def group_dir(lines):
73
- counts, order = {}, []
74
- for ln in lines:
75
- token = ln.split(":", 1)[0].strip() # tolerate rg's path:line: prefix
76
- d = token.rsplit("/", 1)[0] + "/" if "/" in token else "./"
77
- if d not in counts:
78
- counts[d] = 0
79
- order.append(d)
80
- counts[d] += 1
81
- width = max((len(d) for d in order), default=0)
82
- return [f"{d.ljust(width)} ({counts[d]} file{'s' if counts[d] != 1 else ''})" for d in order]
83
-
84
-
85
- def collapse_blanks(lines):
86
- out, blank = [], False
87
- for ln in lines:
88
- if ln.strip() == "":
89
- if not blank:
90
- out.append("")
91
- blank = True
92
- else:
93
- out.append(ln)
94
- blank = False
95
- while out and out[-1] == "":
96
- out.pop()
97
- return out
98
-
99
-
100
- def main() -> int:
101
- p = argparse.ArgumentParser(add_help=True, description="Reduce noisy stdout to signal.")
102
- p.add_argument("--comments", action="store_true")
103
- p.add_argument("--errors", action="store_true")
104
- p.add_argument("--grep", metavar="RE")
105
- p.add_argument("--invert", action="store_true")
106
- p.add_argument("--dedup", action="store_true")
107
- p.add_argument("--uniq", action="store_true")
108
- p.add_argument("--group-dir", action="store_true")
109
- p.add_argument("--max-line", type=int, metavar="N")
110
- p.add_argument("--head", type=int, metavar="N")
111
- p.add_argument("--tail", type=int, metavar="N")
112
- p.add_argument("--middle", type=int, metavar="N")
113
- p.add_argument("--stats", action="store_true")
114
- args = p.parse_args()
115
-
116
- raw = sys.stdin.read()
117
- in_lines = raw.splitlines()
118
- in_bytes = len(raw.encode("utf-8", "replace"))
119
-
120
- lines = [ln.rstrip() for ln in in_lines]
121
-
122
- if args.comments:
123
- lines = [ln for ln in lines if ln.strip() and not COMMENT_RE.match(ln)]
124
-
125
- if args.errors or args.grep:
126
- pat = re.compile(args.grep) if args.grep else ERROR_RE
127
- keep = (lambda ln: not pat.search(ln)) if args.invert else (lambda ln: bool(pat.search(ln)))
128
- lines = [ln for ln in lines if keep(ln)]
129
-
130
- if args.max_line and args.max_line > 0:
131
- lines = [ln if len(ln) <= args.max_line else ln[: args.max_line] + ELLIPSIS for ln in lines]
132
-
133
- if args.dedup:
134
- lines = dedup_all(lines)
135
- elif args.uniq:
136
- lines = dedup_adjacent(lines)
137
-
138
- if args.group_dir:
139
- lines = group_dir(lines)
140
-
141
- lines = collapse_blanks(lines)
142
-
143
- if args.middle and args.middle > 0 and len(lines) > 2 * args.middle:
144
- omitted = len(lines) - 2 * args.middle
145
- lines = lines[: args.middle] + [f"{ELLIPSIS} {omitted} lines omitted {ELLIPSIS}"] + lines[-args.middle :]
146
- if args.head and args.head > 0:
147
- lines = lines[: args.head]
148
- if args.tail and args.tail > 0:
149
- lines = lines[-args.tail :]
150
-
151
- out = "\n".join(lines)
152
- if out:
153
- out += "\n"
154
- sys.stdout.write(out)
155
-
156
- if args.stats:
157
- out_bytes = len(out.encode("utf-8", "replace"))
158
- pct = 0 if in_bytes == 0 else round(100 * (1 - out_bytes / in_bytes))
159
- change = f"-{pct}%" if pct >= 0 else f"+{-pct}% larger"
160
- sys.stderr.write(
161
- f"slim: lines {len(in_lines)}->{len(lines)}, bytes {in_bytes}->{out_bytes} ({change})\n"
162
- )
163
- return 0
164
-
165
-
166
- if __name__ == "__main__":
167
- sys.exit(main())