- Home
- Skills
- Drillan
- Mixseek Plus
- Tdd Workflow
tdd-workflow_skill
- Python
0
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill drillan/mixseek-plus --skill tdd-workflow- SKILL.md2.9 KB
Overview
This skill enforces a strict TDD workflow and guides the Red-Green-Refactor cycle for Python projects. It ensures tests are created first, confirms intended failures, drives minimal implementation to pass tests, and mandates refactoring with full test re-runs and quality checks. Use it to make feature work, bug fixes, and refactors safe, incremental, and reviewable.
How this skill works
When enabled, the skill requires a test to be created or identified in the tests/ directory before any implementation edits. It runs the test suite to confirm failure (Red), guides a minimal implementation to make that test pass (Green), then triggers refactoring while re-running all tests and static analysis tools. The skill blocks implementation work if the test file is missing or a failing-test prerequisite is unmet, and it requests explicit user approval at key transitions.
When to use it
- Starting a new feature implementation
- Beginning a bug fix that needs a reproducible test
- Starting a refactor that requires safety guarantees
- Enforcing test-driven culture on a team
- When you need traceable, incremental progress for reviewers
Best practices
- Create tests in tests/ with names like test_<feature>_<situation>_<expected_result>
- Keep implementations minimal in Green—only enough code to pass the failing test
- Always confirm the test fails before implementing to validate the test's value
- Run static analysis and formatting (ruff, mypy) after Green and before finalizing refactor
- Re-run the entire test suite after refactor to prevent regressions
Example use cases
- Add a login endpoint: write tests in tests/test_auth.py, confirm failure, implement minimal auth code, then refactor safely
- Fix a reported bug: write a failing test that reproduces the bug, verify it fails, implement fix, run full tests and linters
- Refactor a module: add tests that assert current behavior, confirm they fail if you change API, refactor incrementally with tests green at each step
- Introduce a new service under src/services/: create corresponding tests in tests/test_<service>.py before editing implementation
FAQ
If a test passes before implementation, the skill flags it and asks you to prove the test would have failed for the new behavior or to create a new failing test. A passing test without prior failure defeats the Red step.
Can I skip user approval between phases?
User approval is required by default at the Red-to-Green handoff. For automation or CI flows, you can configure explicit consent rules, but the skill will still enforce the Red-Green-Refactor sequence and quality gates.