Skip to main content

test-discipline

Update tests when changing APIs — no exceptions

소스 정보

저장소
github/gh-aw
최근 소스 활동
2026년 8월 17일 21:20
감지된 SKILL.md 언어
영어
스타
5,200
포크
564

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
test-discipline
description
Update tests when changing APIs — no exceptions
domain
quality
confidence
high
source
earned (Fenster/Hockney incident, test assertion sync violations)
## 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.md` to 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
GitHub에서 보기