Generalize tdd skill beyond Go — add Python, Rust, TypeScript, Java #18

Open
opened 2026-07-25 20:57:13 +00:00 by mathias · 1 comment
Owner

tdd is currently Go-specific (table-driven tests, testify, go test -race). Default stack is Go but ~/dev/ spans Python (AI/), TypeScript (React fallback UI), and other languages per-project — the skill should teach the same Iron Law / Red-Green-Refactor discipline with idiomatic per-language patterns, not force Go idioms onto non-Go projects.

Add sections/examples for:

  • Python — pytest, parametrize for table-driven equivalent, unittest.mock sparingly
  • Rust#[test], #[cfg(test)] modules, table-driven via arrays/iterators
  • TypeScript — vitest/jest, table-driven via it.each
  • Java — JUnit5, @ParameterizedTest for table-driven equivalent

Keep the core discipline (Iron Law, rationalization table, delegate-to-debug-on-failure) language-agnostic; make only the code examples and tooling references per-language sections.

Order dependency: do this after/alongside #13 (delete superpowers-test-driven-development as a duplicate of tdd) — once tdd covers 5 languages it's an even stronger sole survivor, no reason to reconsider keeping the superpowers variant.

`tdd` is currently Go-specific (table-driven tests, testify, `go test -race`). Default stack is Go but `~/dev/` spans Python (AI/), TypeScript (React fallback UI), and other languages per-project — the skill should teach the same Iron Law / Red-Green-Refactor discipline with idiomatic per-language patterns, not force Go idioms onto non-Go projects. Add sections/examples for: - **Python** — pytest, parametrize for table-driven equivalent, `unittest.mock` sparingly - **Rust** — `#[test]`, `#[cfg(test)]` modules, table-driven via arrays/iterators - **TypeScript** — vitest/jest, table-driven via `it.each` - **Java** — JUnit5, `@ParameterizedTest` for table-driven equivalent Keep the core discipline (Iron Law, rationalization table, delegate-to-debug-on-failure) language-agnostic; make only the code examples and tooling references per-language sections. **Order dependency:** do this after/alongside #13 (delete `superpowers-test-driven-development` as a duplicate of `tdd`) — once `tdd` covers 5 languages it's an even stronger sole survivor, no reason to reconsider keeping the superpowers variant.
Author
Owner

Flag: superpowers-writing-skills's own anti-patterns list explicitly warns against this — "Multi-Language Dilution: example-js.js, example-py.py, example-go.go — mediocre quality, maintenance burden" and "Don't implement in 5+ languages... you're good at porting, one great example is enough."

Reconciling both asks (polyglot support Mathias wants + the dilution anti-pattern the repo's own meta-skill warns about): keep the main SKILL.md language-agnostic in prose (Iron Law, rationalization table, delegate-to-debug) with ONE canonical inline example (Go, matches default stack) — then move the other 4 languages to separate reference files (python.md, rust.md, typescript.md, java.md) linked as "heavy reference," per writing-skills' own "Skill with Heavy Reference" structure. That's polyglot support without diluting the primary doc every reader loads.

Execute per #19's methodology (pressure-test with subagents before shipping, don't skip RED-GREEN-REFACTOR for skill edits).

Flag: `superpowers-writing-skills`'s own anti-patterns list explicitly warns against this — "Multi-Language Dilution: example-js.js, example-py.py, example-go.go — mediocre quality, maintenance burden" and "Don't implement in 5+ languages... you're good at porting, one great example is enough." Reconciling both asks (polyglot support Mathias wants + the dilution anti-pattern the repo's own meta-skill warns about): keep the main `SKILL.md` language-agnostic in prose (Iron Law, rationalization table, delegate-to-debug) with ONE canonical inline example (Go, matches default stack) — then move the other 4 languages to separate reference files (`python.md`, `rust.md`, `typescript.md`, `java.md`) linked as "heavy reference," per writing-skills' own "Skill with Heavy Reference" structure. That's polyglot support without diluting the primary doc every reader loads. Execute per #19's methodology (pressure-test with subagents before shipping, don't skip RED-GREEN-REFACTOR for skill edits).
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mathias/skills#18