Skip to content
Kitbay
Skill

rtk-tdd

Apache-2.0Updated on Nov 11, 202686,197GitHub stars

A Rust test-driven development skill kept in the RTK repository. It sets three rules: no production code without a failing test, only enough test to fail, and only enough code to pass.

What the skill teaches

A Rust test-driven development skill kept in the RTK repository. It sets three rules: no production code without a failing test, only enough test to fail, and only enough code to pass. The agent writes the test in the same file's test module, runs that single test with cargo to see it fail, implements the minimum, reruns it, refactors, and finishes with cargo fmt, clippy and the full test suite as a gate before committing. Tables map kinds of code such as pure functions, parsers, validators and error paths to test patterns, and it lists cases where strict TDD does not fit, such as spawning processes or direct I/O.

Capabilities

  • Run a red-green-refactor loop with cargo test
  • Match Rust test patterns to the kind of code
  • Gate commits on cargo fmt, clippy and tests