Skip to main content

tdd

Runs a disciplined red-green-refactor loop for one observable behavior at a public seam. Use while `/implement` is building a ticket, or whenever a feature or bug fix needs test-first evidence.

설치로 이동

소스 정보

저장소
ContractorKeith/skills
최근 소스 활동
2026년 7월 22일 14:04
감지된 SKILL.md 언어
영어
스타
0
포크
0

설치 방법

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

소스 파일 검토

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

파일 탐색기
4 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
tdd
description
Runs a disciplined red-green-refactor loop for one observable behavior at a public seam. Use while `/implement` is building a ticket, or whenever a feature or bug fix needs test-first evidence.
# Test-Driven Development Use this loop for one vertical slice at a time: one public seam, one behavior, one small production change. A test should explain what a caller can do, not how the code happens to work inside. Before starting, read the ticket’s acceptance criteria, root `CONTEXT.md` when present, and ADRs that govern the area. Use their domain terms in test names. Test only seams already agreed in the ticket or confirmed with the user. If the seam is unclear, pause and ask; an invented boundary produces fragile tests. Read [TESTS.md](./TESTS.md) before choosing the test shape. Read [MOCKING.md](./MOCKING.md) whenever a test may replace a dependency. ## Red Write one test for the smallest unproven behavior through its public interface. - Name the behavior a user or caller recognizes. - Use an expected value from the spec, a worked example, or another independent source of truth — never a copy of the production calculation. - Run the narrowest test command and confirm it fails for the behavior you are about to add. A failure from broken setup, a typo, or an already-implemented behavior is not useful red. ## Green Write only enough production code to satisfy that one failing test. - Do not prebuild later ticket requirements or general-purpose abstractions. - Run the focused test again and make it pass. - Run a nearby fast check when the repository provides one; catch type and integration breakage while the slice is still small. ## Refactor Once green, make small behavior-preserving improvements only when they clarify the finished slice. Keep the test green after each change. Do not turn the refactor step into a cleanup campaign or speculative design exercise; leave broader design concerns for `/code-review` or a separate ticket. Repeat from Red for the next accepted behavior. Run the full relevant suite only after the ticket’s slices are complete. ## Non-negotiables - Test observable behavior at public seams, not private methods or internal call order. - Prefer real in-process collaborators and a test database when setup is cheap. Mock only a true system boundary. - Keep every cycle vertical. Do not write all tests first and then attempt all implementation. - Do not let a passing test hide an unverified requirement. Each acceptance behavior needs its own evidence.
GitHub에서 보기