본문으로 건너뛰기
cccskills
무료GitHub에 공개

tdd

Apply risk-based test-driven development to bugs, domain logic, state transitions, parsers, contracts, migrations, and behavior where a failing test sharpens the design.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(4)

  • SKILL.md3.7 KB
  • agents/openai.yaml365 B
  • assets/icon-400.png1.3 KB
  • assets/icon.svg1.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

TDD

Use tests as design and evidence. Preserve strict red-green discipline where it pays off, and use lighter verification where the ceremony would add little signal.

Choose the testing mode

Strict red-green

Prefer for:

  • Bug fixes with a reproducible failure
  • Domain rules and calculations
  • State machines and mutations
  • Parsers, serializers, validators, and data transforms
  • API contracts and compatibility behavior
  • Migrations
  • Concurrency or race-condition fixes
  • Security-sensitive behavior

Cycle:

  1. Write the smallest behavior-focused test.
  2. Execute it once and verify that the failure matches the intended behavioral gap.
  3. Implement the minimum coherent change.
  4. Run the focused test and confirm it passes.
  5. Refactor while keeping it green.
  6. Run nearby tests.

Characterization-first

Use for legacy code whose behavior is poorly documented.

  1. Add tests that capture relevant current behavior.
  2. Add a failing test for the behavior that must change.
  3. Implement the change.
  4. Keep unrelated characterized behavior stable.

Test-alongside

Reasonable for:

  • Pure styling and visual polish
  • Copy changes
  • Simple configuration or wiring
  • Generated files
  • Small adapters already covered by higher-level tests
  • Prototypes or short-lived spikes

Use the most meaningful existing checks. Add automated tests when there is a real regression surface, not to satisfy a quota.

Existing implementation

Do not delete valid work merely because implementation preceded the test.

When code already exists:

  • Reproduce the bug against the current code.
  • Add a test that fails on the current behavior when possible.
  • If the fix has already been applied, temporarily revert or mutate the narrow change only when safe and efficient to prove the test catches it.
  • Otherwise document why red-state proof was impractical and use strong behavior verification.

Test quality

Prefer tests that:

  • Assert externally meaningful behavior
  • Fail for one understandable reason
  • Are deterministic
  • Use real code through stable boundaries
  • Survive internal refactoring
  • Cover important edge and error paths
  • For optional host capabilities, distinguish absence (no doomed action plus useful degradation), rejection, cancellation, policy denial, and success when those are separate observable results

Avoid:

  • One test for every trivial function
  • Snapshot tests that hide semantic changes
  • Mocking the unit under test
  • Asserting private implementation details
  • Huge fixtures when a focused case works
  • Adding sleeps for asynchronous behavior when a condition can be awaited

Mocks and fakes

Use real collaborators when cheap and deterministic. Mock or fake:

  • Network boundaries
  • Time
  • Randomness
  • External services
  • Slow or destructive infrastructure

Keep mocks at stable interfaces. If every internal call must be mocked, reconsider coupling.

Regression proof

For a bug fix, the ideal evidence is:

  • Test fails before fix for the expected reason
  • Test passes after fix
  • Nearby suite remains green

Do not perform risky repository surgery merely to reenact red-green after the fact. Evidence should increase confidence, not damage the workspace.

Completion checklist

Before claiming test-backed behavior:

  • The test targets the requested behavior.
  • Failure and success reasons are understood.
  • Important boundary cases are represented.
  • Focused tests pass after the final relevant change.
  • Broader checks were run when risk justifies them.
  • Any untested area is stated honestly.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

debug

무료

Investigate and fix bugs, failing tests, regressions, build failures, or unexpected behavior using boundary localization, evidence, and bounded hypotheses.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

IndelibleVivi/servotab262026년 10월 15일 업데이트

delegate

무료

Choose responsibility for substantial work before deep execution: keep one responsibility's coupled parts in a single lane, and hand a bounded or independent lane to a worker when clean context, an unknown cause, independent review, or coordinator attention materially improves the outcome.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

IndelibleVivi/servotab262026년 10월 15일 업데이트

design

무료

Turn a rough feature, product interaction, or architecture idea into a concrete design. Use when meaningful decisions remain open; avoid for already-clear local edits.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

IndelibleVivi/servotab262026년 10월 15일 업데이트

execute

무료

Implement a settled request or current execution strategy through connected slices, feed observations into the same task record, and revise affected work when evidence changes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

IndelibleVivi/servotab262026년 10월 15일 업데이트

finish

무료

Finish a development change safely by inspecting the final tree, verifying at the right scope, and performing only the requested Git or PR actions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

IndelibleVivi/servotab262026년 10월 15일 업데이트

Assess, adapt, and apply specified discussions, feedback, findings, or references to existing project work. Preserve coverage, corrections, and selected intent; judge fit and carry adopted effects through the authorized result. Includes technical review feedback; incidental sources or understanding material without a target-work adoption question need no separate incorporation workflow.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

IndelibleVivi/servotab262026년 10월 15일 업데이트

IndelibleVivi의 스킬 모두 보기

이 스킬의 문제 신고