test-discipline

Enforce same-commit test updates when APIs or public interfaces change.

2|Updated Apr 21, 2026
One-click install
npx skills add https://github.com/elbruno/md-to-slides --skill test-discipline-elbruno
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-discipline
Source: https://github.com/elbruno/md-to-slides/tree/main/.copilot/skills/test-discipline
Command: npx skills add https://github.com/elbruno/md-to-slides --skill test-discipline-elbruno

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents broken builds by ensuring test suites stay perfectly aligned with API and filesystem changes, eliminating the “fix tests later” failure cycle.

Core Features & Use Cases

  • API change discipline: Forces test updates to happen in the same commit as public interface or exported API changes.
  • Assertion accuracy checks: Ensures counted expectations (like expected file counts or arrays) match what actually exists on disk.
  • CI-first verification workflow: Directs you to validate assertion arrays against filesystem state before deeper debugging.

Quick Start

Use test-discipline to update failing or stale tests by synchronizing API/interface expectations and counted assertion arrays with the current on-disk reality in the same commit.

Frequently Asked Questions about test-discipline

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

FAQPage Schema
How do I keep CI tests green when APIs or public interfaces change?

To keep CI tests green during API changes, enforce same-commit test updates so expectations match the new interface. This prevents the broken build cycle by requiring synchronized modifications whenever exported APIs or public interfaces are altered.

Why do my test assertions fail after filesystem changes?

Test assertions fail after filesystem changes when expected arrays or counted file expectations no longer match on-disk reality. Verify assertion arrays against the current filesystem state before deeper debugging to resolve the mismatches.

What is the best way to maintain test correctness for counted expectations?

The best way to maintain test correctness for counted expectations is to apply assertion-to-disk consistency checks. This ensures expected file counts and arrays perfectly match the actual filesystem-derived artifacts in the same commit.

How do I diagnose failing CI builds caused by stale test arrays?

Diagnose failing CI builds caused by stale test arrays by using an evidence-first approach: check expected assertion arrays against the actual filesystem state before attempting any deeper debugging to quickly identify mismatches.

Can I fix failing tests in a separate commit from my API changes?

No, fixing failing tests in a separate commit from API changes is not supported. This test discipline enforces same-commit synchronization to eliminate the delayed fix cycle and maintain build integrity.