tdd

Guide red-green-refactor cycles for Rust and TypeScript features.

8|5|Updated Jan 20, 2025
One-click install
npx skills add https://github.com/Perseus/pko-tools --skill tdd-perseus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd
Source: https://github.com/Perseus/pko-tools/tree/main/.claude/skills/tdd
Command: npx skills add https://github.com/Perseus/pko-tools --skill tdd-perseus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Test-Driven Development (TDD) provides a disciplined workflow to ensure new features are implemented with tests before coding, reducing regressions and increasing maintainability in the pko-tools project.

Core Features & Use Cases

  • Enforces the Red-Green-Refactor cycle for both Rust backend (src-tauri) and TypeScript frontend (src/), ensuring tests drive implementation.
  • Provides practical testing patterns and guidance for integration tests in Rust and unit tests inline in code, including examples for parsing, transformations, and UI logic.
  • Supports improving test coverage and documenting test scaffolding for new features, bug fixes, or refactors.

Quick Start

Write a failing test for the new feature, then implement the minimal code to make it pass, and refactor.

Frequently Asked Questions about tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce test-driven development for Rust and TypeScript in a Tauri project?

Test-driven development for Rust and TypeScript in a Tauri project is enforced by applying a rigorous red-green-refactor cycle, writing failing tests before implementation across the src-tauri backend and src frontend.

What testing patterns should I use for Rust integration tests and TypeScript unit tests?

Rust integration tests and TypeScript unit tests follow practical testing patterns with inline unit tests and integration suites, providing documented examples for parsing, transformations, and UI logic to drive implementation.

Does test-driven development work for both bug fixes and new feature refactoring?

Test-driven development works for bug fixes, new features, and refactoring by requiring a failing test first, implementing minimal code to pass it, then refactoring while maintaining explicit test coverage guidelines.

When should I write tests before implementation in a frontend and backend workflow?

Tests should be written before implementation when adding new features, fixing bugs, or refactoring in frontend and backend workflows, ensuring code is built on a solid test foundation to reduce regressions.

What is the red-green-refactor cycle for TDD in software engineering?

The red-green-refactor cycle in TDD is writing a failing test, implementing minimal code to make it pass, then refactoring the code while ensuring tests stay green, increasing maintainability and coverage.