This page documents the end-to-end integration test cases that verify complete workflow execution in Superpowers. These tests scaffold actual projects, execute implementation plans using the subagent-driven-development skill, and verify that the resulting code is functional, tested, and follows the specified workflow.
For unit tests of individual skills without full execution, see Claude Code Test Suite and OpenCode Test Suite. For the token usage analysis tools used by these tests, see Token Usage Analysis. For shared testing utilities, see Testing Tools and Helpers.
Integration tests differ from unit tests by executing actual AI-driven workflows rather than just verifying skill content. Each integration test follows a three-phase pattern: scaffold a project with a plan, execute the plan via Claude CLI, and verify the results.
Sources: tests/subagent-driven-dev/run-test.sh1-107 tests/subagent-driven-dev/go-fractals/scaffold.sh1-46 tests/claude-code/test-subagent-driven-development-integration.sh1-315
The basic math functions test validates core subagent-driven-development workflow behaviors using a minimal Node.js project. This test is executed by test-subagent-driven-development-integration.sh in the Claude Code test suite.
| Component | Description |
|---|---|
| Location | tests/claude-code/test-subagent-driven-development-integration.sh |
| Duration | 10-30 minutes |
| Language | JavaScript (Node.js) |
| Test Framework | Node.js native test runner |
| Tasks | 2 tasks (add function, multiply function) |
The test scaffolds a minimal Node.js project with:
package.json with "type": "module" and test scriptsrc/, test/, and docs/plans/ directoriesdocs/plans/implementation-plan.mdSources: tests/claude-code/test-subagent-driven-development-integration.sh24-113
The plan defines two simple tasks:
Sources: tests/claude-code/test-subagent-driven-development-integration.sh48-105
The test executes Claude CLI with:
--allowed-tools=all to enable tool usage in headless mode--add-dir to grant access to test project--permission-mode bypassPermissions for automationSources: tests/claude-code/test-subagent-driven-development-integration.sh136-158
Sources: tests/claude-code/test-subagent-driven-development-integration.sh181-279
The test verifies:
"name":"Skill" with "skill":"superpowers:subagent-driven-development"Task tool invocations in transcriptTodoWrite tool invocationsrc/math.js contains export function add and export function multiplytest/math.test.js creatednpm test exits with code 0divide, power, or subtract addedSources: tests/claude-code/test-subagent-driven-development-integration.sh188-278
After verification, the test analyzes the session transcript to extract token usage:
This produces a breakdown showing:
Sources: tests/claude-code/test-subagent-driven-development-integration.sh280-286 tests/claude-code/analyze-token-usage.py1-169
The Go fractals test validates subagent-driven development on a more complex, multi-package Go project with CLI integration. This test case lives in tests/subagent-driven-dev/go-fractals/.
| Component | Description |
|---|---|
| Location | tests/subagent-driven-dev/go-fractals/ |
| Language | Go 1.21+ |
| CLI Framework | github.com/spf13/cobra |
| Commands | sierpinski, mandelbrot |
| Tasks | 10 tasks covering setup, algorithms, CLI, testing, documentation |
The test includes a detailed design document defining:
cmd/fractals/, internal/sierpinski/, internal/mandelbrot/, internal/cli/Sources: tests/subagent-driven-dev/go-fractals/design.md1-82
Sources: tests/subagent-driven-dev/go-fractals/plan.md1-173
The scaffold.sh script:
design.md and plan.md into project root.claude/settings.local.json with permissions for go:*, mkdir:*, git:*Sources: tests/subagent-driven-dev/go-fractals/scaffold.sh1-46
Each task in the plan includes explicit verification commands:
| Task | Verification Command |
|---|---|
| Task 1 | go build ./cmd/fractals succeeds, ./fractals prints output |
| Task 2 | ./fractals --help shows subcommands |
| Task 3 | go test ./internal/sierpinski/... passes |
| Task 4 | ./fractals sierpinski outputs triangle, flags work |
| Task 5 | go test ./internal/mandelbrot/... passes |
| Task 6 | ./fractals mandelbrot outputs recognizable set |
| Task 7 | Custom --char flags work correctly |
| Task 8 | Invalid inputs produce clear errors |
| Task 9 | go test ./... passes all tests including integration |
| Task 10 | README examples work |
Sources: tests/subagent-driven-dev/go-fractals/plan.md1-173
This creates a timestamped output directory at /tmp/superpowers-tests/<timestamp>/subagent-driven-development/go-fractals/ containing:
project/ - The generated Go projectclaude-output.json - Session transcript in stream-json formatSources: tests/subagent-driven-dev/run-test.sh1-107
The Svelte todo test validates subagent-driven development on a modern web application with component architecture, state management, and end-to-end testing. This test case lives in tests/subagent-driven-dev/svelte-todo/.
| Component | Description |
|---|---|
| Location | tests/subagent-driven-dev/svelte-todo/ |
| Framework | Svelte with Vite |
| Language | TypeScript |
| Testing | Vitest (unit) + Playwright (e2e) |
| Tasks | 12 tasks covering setup, state, components, styling, testing, documentation |
Sources: tests/subagent-driven-dev/svelte-todo/design.md34-46
The design specifies a typed data model:
Sources: tests/subagent-driven-dev/svelte-todo/design.md48-58
The 12-task plan builds the application incrementally:
| Tasks | Focus Area | Deliverables |
|---|---|---|
| 1 | Project Setup | Vite + Svelte + TypeScript initialized |
| 2 | Todo Store | store.ts with addTodo, toggleTodo, deleteTodo, clearCompleted |
| 3 | Persistence | storage.ts with loadTodos, saveTodos, error handling |
| 4-6 | Components | TodoInput, TodoItem, TodoList components with tests |
| 7 | Filter UI | FilterBar with count display and filter buttons |
| 8 | Integration | Wire all components in App.svelte |
| 9 | Filtering | End-to-end filter functionality |
| 10 | Styling | CSS for usability and visual polish |
| 11 | E2E Tests | Playwright tests for full user flows |
| 12 | Documentation | README with setup and usage instructions |
Sources: tests/subagent-driven-dev/svelte-todo/plan.md9-223
Each criterion maps to specific functionality:
Sources: tests/subagent-driven-dev/svelte-todo/design.md60-71
Similar to go-fractals, the scaffold script:
design.md and plan.md.claude/settings.local.json with permissions for npm:*, npx:*, mkdir:*, git:*Sources: tests/subagent-driven-dev/svelte-todo/scaffold.sh1-47
Post-execution verification:
Sources: tests/subagent-driven-dev/run-test.sh98-106
Integration tests use the run-test.sh orchestrator which coordinates the scaffold-execute-verify cycle:
Sources: tests/subagent-driven-dev/run-test.sh1-107
| Argument | Description | Example |
|---|---|---|
<test-name> | Test case to run (required) | go-fractals |
--plugin-dir <path> | Path to superpowers plugin directory | --plugin-dir ~/superpowers |
If --plugin-dir is omitted, defaults to parent of tests/ directory.
Sources: tests/subagent-driven-dev/run-test.sh11-33
The test runner uses specific Claude CLI options for automation:
--plugin-dir: Load superpowers from local development directory--dangerously-skip-permissions: Bypass permission prompts for automation--output-format stream-json: Generate structured session transcript--verbose: Include detailed loggingSources: tests/subagent-driven-dev/run-test.sh72-81
Integration tests employ multiple verification layers to ensure correctness.
Session transcripts (.jsonl files) record every tool invocation with structured JSON:
Tests grep for specific patterns:
"name":"Skill" with "skill":"superpowers:subagent-driven-development" confirms skill invocation"name":"Task" indicates subagent dispatch"name":"TodoWrite" indicates task trackingSources: tests/claude-code/test-subagent-driven-development-integration.sh188-217
Tests check that expected files and directories were created:
Sources: tests/claude-code/test-subagent-driven-development-integration.sh221-246
Tests verify that generated code actually works by running test suites:
Sources: tests/claude-code/test-subagent-driven-development-integration.sh249-256
Tests check that proper commits were created:
Sources: tests/claude-code/test-subagent-driven-development-integration.sh260-268
Tests check for violations of explicit requirements:
This verifies that the two-stage review process (spec compliance before code quality) caught spec violations.
Sources: tests/claude-code/test-subagent-driven-development-integration.sh271-278
The Claude Code integration test is part of the run-skill-tests.sh suite:
Sources: tests/claude-code/run-skill-tests.sh1-188 tests/claude-code/README.md22-39
The standalone test runner supports both test cases:
Sources: tests/subagent-driven-dev/run-test.sh1-107
All integration tests create timestamped output directories:
/tmp/superpowers-tests/<timestamp>/
subagent-driven-development/
<test-name>/
project/ # Generated project with implementation
claude-output.json # Session transcript in stream-json format
Sources: tests/subagent-driven-dev/run-test.sh44-48
After test completion, inspect results:
Sources: tests/subagent-driven-dev/run-test.sh98-106 tests/claude-code/README.md135-141
Integration tests require longer timeouts than unit tests:
| Test Type | Typical Duration | Recommended Timeout |
|---|---|---|
| Unit/conceptual tests | 30-120 seconds | 300 seconds (5 min) |
| Basic integration test | 10-30 minutes | 1800 seconds (30 min) |
| Complex integration tests | 20-60 minutes | 3600 seconds (60 min) |
Adjust timeouts based on plan complexity, network conditions, and model response times.
Sources: tests/claude-code/run-skill-tests.sh28-43 tests/claude-code/README.md36-39
Each integration test includes only enough complexity to verify target behaviors:
Sources: tests/claude-code/test-subagent-driven-development-integration.sh48-105
Each task in plans includes concrete verification commands:
npm test - Run test suitego build ./cmd/fractals - Verify compilation./fractals --help - Check CLI outputSources: tests/subagent-driven-dev/go-fractals/plan.md20-24
Plans include requirements designed to test spec compliance review:
Sources: tests/claude-code/test-subagent-driven-development-integration.sh90-91 tests/claude-code/test-subagent-driven-development-integration.sh271-278
Each test run creates a new timestamped directory to:
Refresh this wiki
This wiki was recently refreshed. Please wait 3 days to refresh again.