test-discipline

Synchronize test assertions with API changes and filesystem resources.

209|27|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/dotnet/maui-labs --skill test-discipline-dotnet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-discipline
Source: https://github.com/dotnet/maui-labs/tree/main/src/Comet/.copilot/skills/test-discipline
Command: npx skills add https://github.com/dotnet/maui-labs --skill test-discipline-dotnet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents CI failures and stale reviews by ensuring tests are updated immediately when APIs or counted expectations change, so the test suite always reflects the current reality of the codebase and filesystem.

Core Features & Use Cases

  • API change synchronization: Update affected tests in the same commit when function signatures, public interfaces, or exported APIs change.
  • Assertion-to-filesystem accuracy: Keep counted expected arrays (for example, expected file names) in sync with what actually exists on disk.
  • Failure-first verification: When CI breaks, verify counted assertion arrays against filesystem state before deep debugging.

Quick Start

Use this skill to update any failing tests by verifying that API-impacting changes and counted expectations (like expected feature/scenario files) are synchronized with the current repository files.

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 synchronized with API changes to prevent CI failures?

To keep tests synchronized with API changes, update affected test assertions in the same commit as the refactor to function signatures or public interfaces, ensuring the suite reflects current codebase reality and avoids CI breakages.

Why do my expected file arrays fail CI after adding or deleting repository files?

Expected file arrays fail CI after filesystem changes because assertion arrays must match on-disk resources exactly, requiring you to add new expected entries after file additions and remove stale expected entries after deletions in the same commit.

What is the best way to verify mismatched assertion arrays when CI breaks?

The best way to verify mismatched assertion arrays when CI breaks is to check counted expectations against current filesystem state before deep debugging, treating array mismatches as the first verification step to quickly identify stale test entries.

When do I need to update test assertions for exported members and public interfaces?

You need to update test assertions for exported members and public interfaces whenever you perform refactors, adds, or deletes that alter the API surface, ensuring tests are modified immediately in the same commit to maintain test maintenance accuracy.

Does this approach apply to developer workflows without external test dependencies?

Yes, this approach applies to developer workflows without external dependencies, requiring no specific test frameworks because it functions as a discipline for manually updating assertions and counted expectations directly within your existing CI pipeline.