superpowers-mcp 6.3.7 → 6.3.9

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.
@@ -1,17 +1,19 @@
1
1
  #!/usr/bin/env pwsh
2
2
  # Bisection script to find which test creates unwanted files/state.
3
- # Usage: ./find-polluter.ps1 <file_or_dir_to_check> <test_pattern>
3
+ # Usage: ./find-polluter.ps1 <file_or_dir_to_check> <test_pattern> <test command and arguments>
4
4
 
5
5
  $ErrorActionPreference = "Stop"
6
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'"
7
+ if ($args.Count -lt 3) {
8
+ Write-Output "Usage: ./find-polluter.ps1 <file_to_check> <test_pattern> <test command and arguments>"
9
+ Write-Output "Example: ./find-polluter.ps1 '.git' 'src/**/*.test.ts' npx vitest run"
10
10
  exit 1
11
11
  }
12
12
 
13
13
  $pollutionCheck = $args[0]
14
14
  $testPattern = $args[1]
15
+ $testCommand = $args[2]
16
+ $testCommandArgs = if ($args.Count -gt 3) { @($args[3..($args.Count - 1)]) } else { @() }
15
17
 
16
18
  Write-Output "Searching for test that creates: $pollutionCheck"
17
19
  Write-Output "Test pattern: $testPattern"
@@ -53,7 +55,7 @@ foreach ($testFile in $testFiles) {
53
55
  }
54
56
 
55
57
  Write-Output "[$count/$total] Testing: $($testFile.FullName)"
56
- & npm test $testFile.FullName *> $null
58
+ & $testCommand @testCommandArgs $testFile.FullName *> $null
57
59
 
58
60
  if (Test-Path -LiteralPath $pollutionCheck) {
59
61
  Write-Output ""
@@ -1,18 +1,19 @@
1
1
  #!/usr/bin/env bash
2
2
  # Bisection script to find which test creates unwanted files/state
3
- # Usage: ./find-polluter.sh <file_or_dir_to_check> <test_pattern>
4
- # Example: ./find-polluter.sh '.git' 'src/**/*.test.ts'
3
+ # Usage: ./find-polluter.sh <file_or_dir_to_check> <test_pattern> <test command ...>
4
+ # Example: ./find-polluter.sh '.git' 'src/**/*.test.ts' npx vitest run
5
5
 
6
6
  set -e
7
7
 
8
- if [ $# -ne 2 ]; then
9
- echo "Usage: $0 <file_to_check> <test_pattern>"
10
- echo "Example: $0 '.git' 'src/**/*.test.ts'"
8
+ if [ $# -lt 3 ]; then
9
+ echo "Usage: $0 <file_to_check> <test_pattern> <test command ...>"
10
+ echo "Example: $0 '.git' 'src/**/*.test.ts' npx vitest run"
11
11
  exit 1
12
12
  fi
13
13
 
14
14
  POLLUTION_CHECK="$1"
15
15
  TEST_PATTERN="$2"
16
+ TEST_COMMAND=("${@:3}")
16
17
 
17
18
  echo "🔍 Searching for test that creates: $POLLUTION_CHECK"
18
19
  echo "Test pattern: $TEST_PATTERN"
@@ -24,7 +25,7 @@ TEST_PATTERN="${TEST_PATTERN#./}"
24
25
  # find -path can't match '**/' against zero directory levels, so a pattern
25
26
  # like src/**/*.test.ts would skip src/top.test.ts; also try the pattern
26
27
  # with '**/' collapsed to cover files directly under the base directory.
27
- TEST_FILES=$(find . \( -path "./$TEST_PATTERN" -o -path "./${TEST_PATTERN//\*\*\//}" \) | sort -u)
28
+ TEST_FILES=$(find . \( -path "./$TEST_PATTERN" -o -path "./${TEST_PATTERN//\*\*\//}" \) -print | sort -u)
28
29
  if [ -z "$TEST_FILES" ]; then
29
30
  TOTAL=0
30
31
  else
@@ -35,7 +36,8 @@ echo "Found $TOTAL test files"
35
36
  echo ""
36
37
 
37
38
  COUNT=0
38
- for TEST_FILE in $TEST_FILES; do
39
+ while IFS= read -r TEST_FILE; do
40
+ [ -n "$TEST_FILE" ] || continue
39
41
  COUNT=$((COUNT + 1))
40
42
 
41
43
  # Skip if pollution already exists
@@ -48,7 +50,7 @@ for TEST_FILE in $TEST_FILES; do
48
50
  echo "[$COUNT/$TOTAL] Testing: $TEST_FILE"
49
51
 
50
52
  # Run the test
51
- npm test "$TEST_FILE" > /dev/null 2>&1 || true
53
+ "${TEST_COMMAND[@]}" "$TEST_FILE" > /dev/null 2>&1 || true
52
54
 
53
55
  # Check if pollution appeared
54
56
  if [ -e "$POLLUTION_CHECK" ]; then
@@ -65,7 +67,7 @@ for TEST_FILE in $TEST_FILES; do
65
67
  echo " cat $TEST_FILE # Review test code"
66
68
  exit 1
67
69
  fi
68
- done
70
+ done <<< "$TEST_FILES"
69
71
 
70
72
  echo ""
71
73
  echo "✅ No polluter found - all tests clean!"
@@ -101,10 +101,10 @@ If something appears during tests but you don't know which test:
101
101
  Use the bisection script `find-polluter.sh` in this directory:
102
102
 
103
103
  ```bash
104
- ./find-polluter.sh '.git' 'src/**/*.test.ts'
104
+ ./find-polluter.sh '.git' 'src/**/*.test.ts' npx vitest run
105
105
 
106
106
  # Windows PowerShell:
107
- ./find-polluter.ps1 '.git' 'src/**/*.test.ts'
107
+ ./find-polluter.ps1 '.git' 'src/**/*.test.ts' npx vitest run
108
108
  ```
109
109
 
110
110
  Runs tests one-by-one, stops at first polluter. See script for usage.
@@ -32,7 +32,7 @@ When multiple skills apply, process skills come first — they set the approach,
32
32
 
33
33
  ## Skill Compositions & Pipelines
34
34
 
35
- Complex engineering workflows chain multiple skills end-to-end (see `docs/skill-compositions.md`):
35
+ Complex engineering workflows chain multiple skills end-to-end. The complete published guide is available from the MCP resource `guide://superpowers/skill-compositions`:
36
36
 
37
37
  - **Feature Pipeline:** `brainstorming` → `writing-plans` → `using-git-worktrees` → `subagent-driven-development` (with `test-driven-development`) → `verification-before-completion` → `requesting-code-review` → `finishing-a-development-branch`
38
38
  - **Troubleshooting Pipeline:** `systematic-debugging` → `using-git-worktrees` → `dispatching-parallel-agents` → `test-driven-development` → `verification-before-completion` → `requesting-code-review`