superpowers-mcp 6.0.1 → 6.0.2
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.
- package/README.md +30 -2
- package/README.zh-TW.md +29 -2
- package/out/server.js +25 -22
- package/package.json +1 -1
- package/skills/brainstorming/scripts/helper.js +4 -0
- package/skills/brainstorming/scripts/server.cjs +27 -5
- package/skills/brainstorming/scripts/start-server.ps1 +232 -0
- package/skills/brainstorming/scripts/stop-server.ps1 +84 -0
- package/skills/brainstorming/visual-companion.md +8 -0
- package/skills/subagent-driven-development/SKILL.md +7 -7
- package/skills/subagent-driven-development/scripts/review-package +1 -1
- package/skills/subagent-driven-development/scripts/review-package.ps1 +52 -0
- package/skills/subagent-driven-development/scripts/sdd-workspace.ps1 +11 -0
- package/skills/subagent-driven-development/scripts/task-brief.ps1 +51 -0
- package/skills/subagent-driven-development/task-reviewer-prompt.md +3 -2
- package/skills/systematic-debugging/find-polluter.ps1 +60 -0
- package/skills/systematic-debugging/root-cause-tracing.md +3 -0
- package/skills/test-driven-development/SKILL.md +1 -1
- package/skills/writing-skills/SKILL.md +1 -1
- package/skills/writing-skills/anthropic-best-practices.md +2 -2
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env pwsh
|
|
2
|
+
# Bisection script to find which test creates unwanted files/state.
|
|
3
|
+
# Usage: ./find-polluter.ps1 <file_or_dir_to_check> <test_pattern>
|
|
4
|
+
|
|
5
|
+
$ErrorActionPreference = "Stop"
|
|
6
|
+
|
|
7
|
+
if ($args.Count -ne 2) {
|
|
8
|
+
Write-Output "Usage: ./find-polluter.ps1 <file_to_check> <test_pattern>"
|
|
9
|
+
Write-Output "Example: ./find-polluter.ps1 '.git' 'src/**/*.test.ts'"
|
|
10
|
+
exit 1
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
$pollutionCheck = $args[0]
|
|
14
|
+
$testPattern = $args[1]
|
|
15
|
+
|
|
16
|
+
Write-Output "Searching for test that creates: $pollutionCheck"
|
|
17
|
+
Write-Output "Test pattern: $testPattern"
|
|
18
|
+
Write-Output ""
|
|
19
|
+
|
|
20
|
+
$testFiles = @(Get-ChildItem -Path $testPattern -File -Recurse -ErrorAction SilentlyContinue | Sort-Object FullName)
|
|
21
|
+
if ($testFiles.Count -eq 0) {
|
|
22
|
+
$testFiles = @(Get-ChildItem -Path . -File -Recurse | Where-Object { $_.FullName -like (Join-Path (Get-Location) $testPattern) } | Sort-Object FullName)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
$total = $testFiles.Count
|
|
26
|
+
Write-Output "Found $total test files"
|
|
27
|
+
Write-Output ""
|
|
28
|
+
|
|
29
|
+
$count = 0
|
|
30
|
+
foreach ($testFile in $testFiles) {
|
|
31
|
+
$count++
|
|
32
|
+
|
|
33
|
+
if (Test-Path -LiteralPath $pollutionCheck) {
|
|
34
|
+
Write-Output "Pollution already exists before test $count/$total"
|
|
35
|
+
Write-Output " Skipping: $($testFile.FullName)"
|
|
36
|
+
continue
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
Write-Output "[$count/$total] Testing: $($testFile.FullName)"
|
|
40
|
+
& npm test $testFile.FullName *> $null
|
|
41
|
+
|
|
42
|
+
if (Test-Path -LiteralPath $pollutionCheck) {
|
|
43
|
+
Write-Output ""
|
|
44
|
+
Write-Output "FOUND POLLUTER"
|
|
45
|
+
Write-Output " Test: $($testFile.FullName)"
|
|
46
|
+
Write-Output " Created: $pollutionCheck"
|
|
47
|
+
Write-Output ""
|
|
48
|
+
Write-Output "Pollution details:"
|
|
49
|
+
Get-ChildItem -Force -LiteralPath $pollutionCheck | Format-List
|
|
50
|
+
Write-Output ""
|
|
51
|
+
Write-Output "To investigate:"
|
|
52
|
+
Write-Output " npm test $($testFile.FullName)"
|
|
53
|
+
Write-Output " Get-Content $($testFile.FullName)"
|
|
54
|
+
exit 1
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
Write-Output ""
|
|
59
|
+
Write-Output "No polluter found - all tests clean."
|
|
60
|
+
exit 0
|
|
@@ -102,6 +102,9 @@ Use the bisection script `find-polluter.sh` in this directory:
|
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
104
|
./find-polluter.sh '.git' 'src/**/*.test.ts'
|
|
105
|
+
|
|
106
|
+
# Windows PowerShell:
|
|
107
|
+
./find-polluter.ps1 '.git' 'src/**/*.test.ts'
|
|
105
108
|
```
|
|
106
109
|
|
|
107
110
|
Runs tests one-by-one, stops at first polluter. See script for usage.
|
|
@@ -198,7 +198,7 @@ Next failing test for next feature.
|
|
|
198
198
|
## Good Tests
|
|
199
199
|
|
|
200
200
|
| Quality | Good | Bad |
|
|
201
|
-
|
|
201
|
+
|---------|------|-----|
|
|
202
202
|
| **Minimal** | One thing. "and" in name? Split it. | `test('validates email and domain and whitespace')` |
|
|
203
203
|
| **Clear** | Name describes behavior | `test('test1')` |
|
|
204
204
|
| **Shows intent** | Demonstrates desired API | Obscures what code should do |
|
|
@@ -467,7 +467,7 @@ Before writing guidance, classify the baseline failure. The form that bulletproo
|
|
|
467
467
|
| Omits a required element from something they already produce | Structural: REQUIRED field or slot in the template they fill in | Prose reminders near the template |
|
|
468
468
|
| Behavior should depend on a condition | Conditional keyed to an observable predicate ("if the brief exists, reference it") | Unconditional rule + exemption clauses |
|
|
469
469
|
|
|
470
|
-
**Why prohibitions backfire on shaping problems:**
|
|
470
|
+
**Why prohibitions backfire on shaping problems:** under a competing incentive ("make the prompt self-contained"), agents negotiate with "don't X". In head-to-head wording tests on dispatch-prompt guidance, the prohibition arm produced clearly more of the unwanted content than the recipe arm (fully separated distributions), and trended worse than even the no-guidance control — micro-test your own case rather than assuming, but never reach for the prohibition by default. A recipe leaves nothing to negotiate: the output matches the stated shape or it doesn't.
|
|
471
471
|
|
|
472
472
|
**Rules for whichever form you pick:**
|
|
473
473
|
- **No nuance clauses.** "Don't X unless it matters" reopens the negotiation — appending a single nuance clause to a winning recipe degraded it from consistent to noisy in the same wording tests. Express a real exception as its own conditional on an observable predicate.
|
|
@@ -250,7 +250,7 @@ A basic Skill starts with just a SKILL.md file containing metadata and instructi
|
|
|
250
250
|
|
|
251
251
|
As your Skill grows, you can bundle additional content that agents load only when needed:
|
|
252
252
|
|
|
253
|
-
<img src="https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=a5e0aa41e3d53985a7e3e43668a33ea3" alt="Bundling additional reference files like reference.md and forms.md." data-og-width="2048" width="2048" data-og-height="1327" height="1327" data-path="images/agent-skills-bundling-content.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?w=280&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=f8a0e73783e99b4a643d79eac86b70a2 280w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?w=560&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=dc510a2a9d3f14359416b706f067904a 560w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?w=840&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=82cd6286c966303f7dd914c28170e385 840w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?w=1100&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=56f3be36c77e4fe4b523df209a6824c6 1100w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?w=1650&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=d22b5161b2075656417d56f41a74f3dd 1650w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?w=2500&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=
|
|
253
|
+
<img src="https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=a5e0aa41e3d53985a7e3e43668a33ea3" alt="Bundling additional reference files like reference.md and forms.md." data-og-width="2048" width="2048" data-og-height="1327" height="1327" data-path="images/agent-skills-bundling-content.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?w=280&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=f8a0e73783e99b4a643d79eac86b70a2 280w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?w=560&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=dc510a2a9d3f14359416b706f067904a 560w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?w=840&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=82cd6286c966303f7dd914c28170e385 840w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?w=1100&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=56f3be36c77e4fe4b523df209a6824c6 1100w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?w=1650&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=d22b5161b2075656417d56f41a74f3dd 1650w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-bundling-content.png?w=2500&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=3dd4bdd6850ffcc96c6c45fcb0acd6eb 2500w" />
|
|
254
254
|
|
|
255
255
|
The complete Skill directory structure might look like this:
|
|
256
256
|
|
|
@@ -916,7 +916,7 @@ Even if your agent could write a script, pre-made scripts offer advantages:
|
|
|
916
916
|
* Save time (no code generation required)
|
|
917
917
|
* Ensure consistency across uses
|
|
918
918
|
|
|
919
|
-
<img src="https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-executable-scripts.png?fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=4bbc45f2c2e0bee9f2f0d5da669bad00" alt="Bundling executable scripts alongside instruction files" data-og-width="2048" width="2048" data-og-height="1154" height="1154" data-path="images/agent-skills-executable-scripts.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-executable-scripts.png?w=280&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=9a04e6535a8467bfeea492e517de389f 280w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-executable-scripts.png?w=560&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=e49333ad90141af17c0d7651cca7216b 560w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-executable-scripts.png?w=840&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=954265a5df52223d6572b6214168c428 840w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-executable-scripts.png?w=1100&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=2ff7a2d8f2a83ee8af132b29f10150fd 1100w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-executable-scripts.png?w=1650&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=
|
|
919
|
+
<img src="https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-executable-scripts.png?fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=4bbc45f2c2e0bee9f2f0d5da669bad00" alt="Bundling executable scripts alongside instruction files" data-og-width="2048" width="2048" data-og-height="1154" height="1154" data-path="images/agent-skills-executable-scripts.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-executable-scripts.png?w=280&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=9a04e6535a8467bfeea492e517de389f 280w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-executable-scripts.png?w=560&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=e49333ad90141af17c0d7651cca7216b 560w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-executable-scripts.png?w=840&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=954265a5df52223d6572b6214168c428 840w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-executable-scripts.png?w=1100&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=2ff7a2d8f2a83ee8af132b29f10150fd 1100w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-executable-scripts.png?w=1650&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=48ab96245e04077f4d15e9170e081cfb 1650w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-executable-scripts.png?w=2500&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=0301a6c8b3ee879497cc5b5483177c90 2500w" />
|
|
920
920
|
|
|
921
921
|
The diagram above shows how executable scripts work alongside instruction files. The instruction file (forms.md) references the script, and the agent can execute it without loading its contents into context.
|
|
922
922
|
|