feat(skills): add nw-tpp-methodology skill (TPP + ZOMBIES)#67
Open
dale-stewart wants to merge 2 commits into
Open
feat(skills): add nw-tpp-methodology skill (TPP + ZOMBIES)#67dale-stewart wants to merge 2 commits into
dale-stewart wants to merge 2 commits into
Conversation
Add a DELIVER-wave skill capturing the Transformation Priority Premise (Robert C. Martin) and the ZOMBIES test-ordering heuristic (James Grenning) as companions to nw-tdd-methodology: - ZOMBIES ranks WHICH test to write next (Zero, One, Many, Boundaries, Interface, Exceptions, Simple). - TPP ranks the simplest code transformation that makes the chosen test pass during GREEN. Wired into both nw-software-crafter and nw-functional-software-crafter: frontmatter skills list plus an On-Demand load-trigger row so the skill loads during the RED/GREEN cycle. Regenerated reference docs via docgen. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-Authored-By: nWave <nwave@nwave.ai>
Resolve conflicts in nw-software-crafter and nw-functional-software-crafter agents by re-applying the nw-tpp-methodology skill registration (frontmatter + skill-loading table) onto upstream's restructured skill tables. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-Authored-By: nWave <nwave@nwave.ai>
Contributor
|
This change does not apply cleanly onto the matching private base. No action is required from you right now. We'll comment again once |
mxriverlynn
pushed a commit
to testdouble/han
that referenced
this pull request
Jul 10, 2026
The red-green-refactor loop says to write a failing test and make it pass; it does not say which test to write next. This adds the two complementary selection heuristics as a new progressive-disclosure reference for the /tdd skill: - Transformation Priority Premise (Robert C. Martin): the ranked list of code transformations, simplest first. Pick the test whose passing requires the highest-priority transformation still available. - ZOMBIES (James Grenning): Zero -> One -> Many plus Boundaries, Interface, Exceptions, Simple, as the concrete ordering for the same simplest-first selection. Wiring follows the skill's existing seams: Step 2 orders a behavior's candidate tests Zero -> One -> Many, Step 3 uses the ranking to find Beck's "one step test", and the frontmatter description gains TPP and ZOMBIES trigger vocabulary. The reference reconciles the heuristics with the skill's outside-in user-value ordering (user value picks the behavior, TPP picks the test), the implementation gears (Fake It is nil -> constant, Triangulate forces constant -> scalar), and the observed-failure gate (a confirming first-run pass is the behavior-already-exists arm). Long-form doc gains the key concept and the two sources. Ported from the nWave nw-tpp-methodology skill (nWave-ai/nWave#67) and "The Next Test" (meresoftware.substack.com/p/the-next-test). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mxriverlynn
added a commit
to testdouble/han
that referenced
this pull request
Jul 10, 2026
) ## Summary The `/tdd` skill's loop says to write a failing test and make it pass; it does not say **which test to write next**. This PR adds the two complementary test-selection heuristics as a new progressive-disclosure reference for the skill: - **Transformation Priority Premise (TPP)**, Robert C. Martin's ranked list of code transformations, simplest first. Pick the test whose passing requires the highest-priority transformation still available. - **ZOMBIES**, James Grenning's Zero, One, Many, Boundaries, Interface, Exceptions, Simple mnemonic, as the concrete ordering for the same simplest-first selection. ## What's included - `han-coding/skills/tdd/references/test-selection.md` (new): the canonical 14-transformation table, the "as the tests get more specific, the code gets more generic" principle, the decision-point rule with the bubble-sort/quicksort demonstration, the ZOMBIES table and Z-O-M ordering rule, diagnostic signals, a worked `sum()` example, and sources (Martin, Grenning, Langr). - `han-coding/skills/tdd/SKILL.md`: three hooks at the skill's existing seams. Step 2 orders a behavior's candidate tests Zero -> One -> Many; Step 3 uses the ranking to pick among qualifying items (and to detect a missing smaller test); the frontmatter description gains TPP and ZOMBIES trigger vocabulary. - `docs/skills/han-coding/tdd.md`: a Key concepts bullet and two Sources entries, per the long-form-doc coverage rule. ## Alignment with the skill's existing discipline The reference reconciles the heuristics with the skill rather than importing them wholesale: - **User value picks the behavior; TPP picks the test.** Step 2's outside-in user-value ordering and TPP's simplest-first ordering answer different questions and do not compete. - **TPP is how you find Beck's "one step test"** that Step 3 already asks for. - **The gears stay small because the tests were chosen small.** Fake It is `nil -> constant`; Triangulate adds the example that forces `constant -> scalar`. - **A confirming first-run pass maps onto the observed-failure gate's** existing "behavior already exists" diagnosis instead of fighting it. ## Field test Exercised by driving the modified skill through the Prime Factors kata (Ruby/minitest), with per-cycle logging and one commit per cycle for an auditable order. Results: - Test order emerged as the canonical TPP sequence: `of(1)` (Z, `nil -> constant`), `of(2)` (O, `unconditional -> if`), `of(3)` (O, `constant -> scalar` via triangulation), `of(4)` (M, `if -> while`), `of(9)` (M, divisor generalization), `of(12)` (confirming test). - The confirming test on 12 passed on first run; the observed-failure gate tripped and the "behavior already exists" diagnosis applied, exactly as the reference predicts. - The classic nested-while algorithm emerged without being planned. Final suite: `6 runs, 6 assertions, 0 failures, 0 errors, 0 skips`. - Two ambiguities the field test surfaced in the new material are fixed in this PR: a tie-break rule for candidates demanding the same transformation, and a note that one test may force a small cluster of transformations (compare by the deepest-ranked member). Two pre-existing observations from the same run, out of scope here but noted for maintainers: on a first-run pass the "cross it off and pick the next one" instruction skips that cycle's otherwise non-skippable refactor statement, and Step 5 gives no instruction for projects with no lint or build command configured. ## Credit and sources Ported from Dale Stewart's `nw-tpp-methodology` skill for nWave (nWave-ai/nWave#67) and his write-up "The Next Test" (https://meresoftware.substack.com/p/the-next-test), adapted to this skill's loop, reference conventions, and writing voice. Primary sources: Martin's "The Transformation Priority Premise", "Transformation Priority and Sorting", and "The Cycles of TDD"; Grenning's "TDD Guided by ZOMBIES"; Langr's *Modern C++ Programming with Test-Driven Development*. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new DELIVER-wave agent skill,
nw-tpp-methodology, capturing two complementary test-selection heuristics as a companion tonw-tdd-methodology:Both answer "which test do I write next?" — they are test-selection heuristics, not code-hacking shortcuts.
What's included
nWave/skills/nw-tpp-methodology/SKILL.md— the canonical 14-transformation list (tail/non-tail recursion split +case), the "as tests get more specific, code gets more generic" principle, the decision-point/sort insight, language-specificity and "premise not theorem" caveats, test-list discipline, acceptable rule-bending, and a disable-and-requeue impasse tactic.nw-software-crafterandnw-functional-software-crafter(frontmatterskills:list + an On-Demand load trigger for the RED phase).Alignment with nWave conventions
The skill defers to
nw-tdd-methodologyfor the canonical RED → GREEN → COMMIT cycle (it does not redefine the cycle or introduce a separate refactor phase) and reconciles TPP/ZOMBIES' classic one-test-at-a-time framing with nWave's property-based + state-delta default (ZOMBIES orders the behaviors introduced; authoring follows the PBT mandate).Validation
nw-agent-builder-reviewerand a cross-skill alignment pass; blocking issues resolved.nw-software-crafterthrough three katas (Word Wrap, Roman Numerals, Prime Factors) — each produced a correct implementation and followed transformation-priority ordering; results independently verified against known values.Sources
Original TPP article, "The Cycles of TDD", the sorting companion, R.C. Martin's NDC 2011 talk, Grenning's ZOMBIES post, and Jeff Langr's Modern C++ Programming with Test-Driven Development (credited in the skill).
🤖 Generated with Claude Code