TDD

Define expected behavior and use tests to guide implementation and changes.

Available in app
Failing and passing test tiles accompany a component and wrench.

Overview

Full test-first discipline, anchored to how this codebase actually runs its tests — that command belongs to the project's own docs and build configuration. Then red-green-refactor: watch the new test fail because the capability genuinely doesn't exist yet, write the minimum that turns it green, reshape only while everything stays green. Skipping the 'watch it fail' step licenses a test that never proved anything to pretend it guards behavior.

Good tests meet executable standards: the name says what breaks, tests exercise the real thing rather than polite stand-ins, tests ship in the same batch as the implementation. Add the mutation check — deliberately break one line of the code; if the whole suite still passes, those tests were guarding air. Common fake-test signals (mirror-image structure, coverage padding, assertions on internals) come with a comparison list.

Commands run with the project's real entrypoints in the task's authorized environment, and 'should pass' is never a result. Built for landing new features, nailing defect fixes, and every 'prove it before merge' setting.

Where it helps

  • Start a new feature from its first failing test
  • Pin a reproduced defect with a regression test before fixing
  • Mutation-check a green suite to see if it actually has teeth
  • Replace placeholder commands with the repo's real test entrypoints
#tdd#testing#workflow#project

Examples

Examples describe the request and the shape of the expected deliverable; they are not completed run results.

Example prompt

Add 'export filename carries the date': write one failing test against the repo's real test command, show me its failing output, then the minimal implementation.

Expected output

Honest red-then-green run records and a minimal change set, suite staying green.

Example prompt

Give this 200-case green suite a mutation check: deliberately break five things in the implementation, see which assertions never react, then a hardening list.

Expected output

A per-mutation table: assertions that caught the break, ones that slept, and the tests needing hardening.

Requirements and limits

Install platforms
iOS: iOS · Android: Android
Script runtime
No script runtime (guidance and workflow)
Minimum app version
iOS: 1.7.59
Reviewed permission scope

iOS · Android

Capabilities
Read workspace files
Review decision
Approved
Review stage
Static content review
Reviewed on
2026-10-28
Implementation and runtime details
Adaptation stage
frozen

iOS

Capabilities
Read workspace files

Android

Capabilities
Read workspace files

License and source

Source and trace details

License

MIT

MIT (root LICENSE)

The pinned skill subtree and shipped references were audited; full applicable license and per-file adaptation/asset notes are preserved under references/licenses/ and references/PROVENANCE.md.

Image and material attribution

Image attribution
Floe original, AI-assisted illustration.
Source
https://github.com/obra/superpowers
Upstream path
skills/test-driven-development
Upstream pin
2ce8aa15d0
Source checked
2026-10-26
Publisher
JiangNanGenius
Publication commit (retrieval)
25e07dbeeb6cc93c2fe83ddc72a34302cc40832a
Audited source commit
84c524b6fb483e4cad94db076e7d9c9962966c19
Signed catalog digest
iOS 46196ba57ed7ea7f22085e74b113207f31193e820ab8983cf7a60eee953f2340 · Android 16de89d019e2057804a40f215485ccb09d5495a25864b34d681168eeaf8f9697
Publication snapshot (UTC)
2026-10-31

Publication commit 25e07dbeeb, audited source 84c524b6fb; catalog digest iOS 46196ba57ed7… · Android 16de89d019e2….

Versions and status

Version records ship with the signed catalog; the target and released versions are shown below.

Adaptation
Ready
Publication state
Curated skills are available
Released version
1.0.1