test-discipline

Enforce test updates in the same commit as API changes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeps tests aligned with API changes to avoid CI failures and flaky test suites.

Core Features & Use Cases

  • Test-Assertion Synchronization: Ensures test assertions reflect current disk reality (EXPECTED_FEATURES, EXPECTED_SCENARIOS) when APIs evolve.
  • In-Flight Commit Discipline: Requires updating tests in the same commit as API changes.
  • CI Reliability: Reduces false positives by preventing stale tests from passing.

Quick Start

Update the corresponding tests to reflect the new API signatures and run the full test suite to validate synchronization.

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

You keep tests aligned with API changes by enforcing test-assertion synchronization within the same commit as the API update. This prevents stale tests from passing and reduces flaky CI failures caused by mismatched outputs.

Why does my test suite have false positives after a public API update?

False positives after a public API update happen when tests are not synchronized with the API changes, allowing stale assertions to pass. Enforcing test updates in the same commit validates changes against disk reality and prevents mismatched outputs.

When do I need to update test assertions for contract changes across modules?

You need to update test assertions for contract changes across modules whenever APIs evolve, refactors occur, or public outputs change. Validating these updates in the same commit ensures tests reflect the current disk reality of EXPECTED_FEATURES and EXPECTED_SCENARIOS.

What is the best way to synchronize test outputs with API signatures during a refactor?

The best way to synchronize test outputs during a refactor is to update the corresponding tests to reflect new API signatures and run the full test suite. This validates synchronization and prevents stale or mismatched assertions from causing CI failures.

Does test synchronization require updating tests in the same commit as API changes?

Yes, test synchronization requires updating tests in the same commit as API changes. This in-flight commit discipline ensures test assertions reflect current disk reality and prevents flaky test suites caused by stale or mismatched outputs.

What are the limitations of not enforcing test-assertion synchronization during API refactors?

Without test-assertion synchronization during API refactors, stale tests pass with mismatched assertions, leading to CI false positives and flaky test suites. Failing to validate against disk reality allows outdated public API outputs to go undetected.