test-first-change

Reduce regressions by discovering tests, running them, then editing code

⭐3stars🔀1forks📁View on GitHub🕐Updated Nov 24, 2025⬇️1downloads

When & Why to Use This Skill

The Test-First Change skill is a specialized developer tool designed to minimize software regressions and enhance code reliability. By automating a disciplined workflow of test discovery, baseline execution, and post-modification verification, it ensures that every code change is validated against existing test suites, fostering a robust Test-Driven Development (TDD) environment for AI agents.

Use Cases

  • Refactoring Legacy Code: Safely update older codebases by automatically identifying and running relevant tests to ensure no breaking changes are introduced.
  • Feature Implementation: Maintain high software quality during the development of new features by verifying that existing functionalities remain intact through automated regression testing.
  • Bug Fixing and Validation: Confirm that a bug fix is effective and doesn't create side effects by running targeted test suites before and after the code edit.
  • CI/CD Workflow Integration: Enhance the local development process by simulating a continuous integration environment where tests are the primary gatekeeper for code modifications.
nametest-first-change
descriptionReduce regressions by discovering tests, running them, then editing code
version1.0.0
tags[testing, tdd, quality, regression]

Test-First Change Skill

Purpose

Ensure code changes don't introduce regressions by forcing test discovery and execution before modifications.

Process

  1. Discover existing tests for target code
  2. Run tests to establish baseline
  3. Make code changes
  4. Re-run tests to verify
  5. Log changes to memory

Scripts

  • run_tests.sh: Execute test suite with coverage
  • diff_summary.py: Generate change summary for memory

Safety

  • Never edit code before running tests
  • Quarantine flaky tests
  • Require 80%+ coverage on changes

Test-First Change v1.0.0