test-discipline
Skill227 starsChanged 9 months agoApache-2.0View on GitHub
Update tests when changing APIs — no exceptions
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
When APIs or public interfaces change, tests must be updated in the same commit.
- Distinctive: line 15
API changes → test updates (same commit): If you change a function signature, public interface, or exported API, update the corresponding …
- Very specific: line 16
Test assertions → disk reality: When test files contain expected counts (e.g., EXPECTED_FEATURES, EXPECTED_SCENARIOS), they must match the …
- Distinctive: line 17
Add files → update assertions: When adding docs pages, features, or any counted resource, update the test assertion array in the same commit
- Distinctive: line 18
CI failures → check assertions first: Before debugging complex failures, verify test assertion arrays match filesystem state
- Distinctive: line 30
Test says "expected 7 files" but disk has 25 (assertion staleness)
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Context
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.
Patterns
- API changes → test updates (same commit): If you change a function signature, public interface, or exported API, update the corresponding tests before committing
- Test assertions → disk reality: When test files contain expected counts (e.g.,
EXPECTED_FEATURES,EXPECTED_SCENARIOS), they must match the actual files on disk - Add files → update assertions: When adding docs pages, features, or any counted resource, update the test assertion array in the same commit
- CI failures → check assertions first: Before debugging complex failures, verify test assertion arrays match filesystem state
Examples
✓ Correct:
- Changed auth API signature → updated auth.test.ts in same commit
- Added
distributed-mesh.mdto features/ → added'distributed-mesh'to EXPECTED_FEATURES array - Deleted two scenario files → removed entries from EXPECTED_SCENARIOS
✗ Incorrect:
- Changed spawn parameters → committed without updating casting.test.ts (CI breaks for next person)
- Added
built-in-roles.md→ left EXPECTED_FEATURES at old count (PR blocked) - Test says "expected 7 files" but disk has 25 (assertion staleness)
Anti-Patterns
- Committing API changes without test updates ("I'll fix tests later")
- Treating test assertion arrays as static (they evolve with content)
- Assuming CI passing means coverage is correct (stale assertions can pass while being wrong)
- Leaving gaps for other agents to discover
Other versions13 projects use a version of this.
Word for word · 6
- github/gh-aw★ 5.5k100% same
- microsoft/Generative-AI-for-beginners-dotnet★ 3.2k100% same
- kubefleet-dev/kubefleet★ 162100% same
- Azure/apiops-cli★ 32100% same
- microsoft/github-vteam-industry-demos★ 2100% same
- microsoft/fsi-banking-payments-dispute-resolution-accelerator★ 0100% same
Edited · 0
None found.
Wrote their own version · 7
- microsoft/waza★ 1.5ksame name
- Dimon94/dverity★ 107same name
- Dimon94/skills★ 107same name
- microsoft/devsquad-copilot★ 50same name
- jasoncrawford/claude-skills★ 1same name
- niksavis/basicly★ 0same name
- swestfall21/claude-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use squad-commands, architectural-proposals and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillsquad-commands
Categorized catalog of common Squad operations. Coordinator reads this file and presents it as an interactive menu when the user asks for available commands or help.
Also in 4 projects that use this
MicrosoftSkillarchitectural-proposals
How to write comprehensive architectural proposals that drive alignment before code is written
Also in 3 projects that use this
- +10 more from microsoft
In this repository21 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- agent-collaborationSkill
- coordinator-init-modeSkill
- coordinator-response-modeSkill
- coordinator-source-of-truthSkill
- cross-squad-communicationSkill
- cross-squadSkill
- error-recoverySkill
- git-workflowSkill
- iterative-retrievalSkill
- reflectSkill
- reviewer-protocolSkill
- secret-handlingSkill
- session-recoverySkill
- squad-conventionsSkill
- squad-helpSkill
- squadSkill
- squad-version-checkSkill
- tiered-memorySkill
- humanizerSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

