test-discipline

Update tests in lockstep with API changes to match disk reality.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/Leep-GH/Lee-s-squad --skill test-discipline-leep-gh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-discipline
Source: https://github.com/Leep-GH/Lee-s-squad/tree/main/packages/squad-cli/templates/skills/test-discipline
Command: npx skills add https://github.com/Leep-GH/Lee-s-squad --skill test-discipline-leep-gh

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When APIs or public interfaces change, tests must be updated in the same commit. When test assertions reference file counts or expected arrays, they must be kept in sync with disk reality. Stale tests block CI for other contributors.

Core Features & Use Cases

  • Automatic test-update guidance: Ensure tests are updated in the same commit as API changes to prevent drift.
  • Disk-reality alignment: Keep test assertions in sync with actual files and counts on disk.
  • CI-friendly maintenance: Reduce CI failures by maintaining aligned tests across code changes.

Quick Start

Update tests in the same commit whenever you change a public API and ensure test assertions reflect the current repository state.

Frequently Asked Questions about test-discipline

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

FAQPage Schema
How do I keep tests in sync with API changes to prevent CI failures?

To keep tests in sync with API changes, update test assertions and expected counts in the same commit as the public interface evolution. This lockstep approach prevents test divergence and ensures CI remains green for other contributors.

Why do stale test assertions block CI when public interfaces evolve?

Stale test assertions block CI because they no longer reflect disk reality or updated data structures. When APIs change without corresponding test updates, assertions diverge from the codebase, causing failures that block other contributors.

What is the best way to align test assertions with actual file counts on disk?

The best way to align test assertions with disk reality is validating that expected arrays and file counts match actual repository state. This ensures tests conform to in-repo expectations during API modifications.

How do I update test assertions when modifying a public API?

Update test assertions by modifying expected values and counts in the same commit as the public API change. Ensure assertions reference actual files and data structures to maintain alignment with the current codebase state.

Can I prevent test divergence when evolving APIs without manual review?

Preventing test divergence requires updating tests in lockstep with API changes through structured guidance. By validating that assertions reflect actual files and data structures, the process reduces reliance on manual review to catch drift.

When do I need to update test counts and assertions for API changes?

You need to update test counts and assertions whenever public interfaces evolve, requiring test assertions to stay in sync with the codebase. This applies specifically when changes impact file counts or expected data arrays on disk.