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

common-tdd

Guides quality-first TDD for new behavior, bug fixes, and test changes. Selects the smallest test layer, proves a distinct regression risk, and runs bounded RED-GREEN-REFACTOR verification.

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

실행 점수 미검증

설치 방법 보기

포함된 파일(10)

  • SKILL.md3.8 KB
  • evals/evals.json7.8 KB
  • references/aaa_example.md387 B
  • references/aaa_methodology.md1.2 KB
  • references/anti-patterns.md1.6 KB
  • references/best-practices.md2.1 KB
  • references/quality-contract.md3.2 KB
  • references/tdd_patterns.md1.9 KB
  • references/test_runners.md1.2 KB
  • references/testing_anti_patterns.md2.3 KB

SKILL.md(원문)

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

Quality-First TDD

Priority: P0 (CRITICAL)

A passing test is insufficient; the test must prove an owned behavior and a distinct plausible fault.

Choose the mode

  • New behavior: strict RED -> GREEN -> REFACTOR. Do not write production code before the expected RED.
  • Legacy or bug fix: characterize only when needed, then reproduce the intended change as a failing regression (RED). Preserve unrelated existing code; do not delete it merely because it predates the test.

Before writing a test

Compare against the existing suite before adding or removing cases. Ensure the scenario is not already covered upstream or in nearby layers.

Create one Test Intent Record per behavior/risk:

  • contract: observable contract — an application-owned result or outward side effect
  • fault: distinct plausible fault this test catches
  • layer: smallest honest unit, component, contract, integration, or E2E layer
  • cases: minimal distinct equivalence classes; use a parameterized test for equivalent inputs
  • command: exact focused single-run command

Reject tests that duplicate existing suite coverage, assert internal mock choreography over outward side effects, depend on time/network/order, or invent numeric four-pillar scores without measured evidence.

Bounded loop

  1. Run configured lint/type checks, inspect nearby tests, and derive the smallest command.
  2. RED: add one intent group and run it in the foreground, sequentially, single-run mode.
  3. Classify RED as expected_red, invalid_red, unexpected_green, or verification_infra_failed. If it is unexpected_green, inspect existing coverage and remove a redundant or weak case before implementing production code.
  4. GREEN: implement only enough to satisfy expected_red; rerun the same command.
  5. REFACTOR: improve structure without changing behavior; rerun the same command.
  6. Escalate only when evidence requires it: related unit target, integration/contract target, then explicit release/full-suite gate.

Execution safety

  • Honor project timeouts; otherwise use a 120-second fallback to bound a focused command.
  • On timeout, terminate only the agent-owned process group and verify child cleanup.
  • Never watch, blanket-kill, or retry an unchanged failure. Record the new hypothesis or corrective change first.
  • Coverage percentages are diagnostic tools, never an admission criterion. Without a configured threshold, report risk gaps and never add padding tests for an arbitrary percentage.

Red flags and rationalizations

  • Stop on: add tests after, too small, passed first run, run the full suite again, or mock every collaborator.
  • Urgency, manual testing, test count, or a coverage target never bypasses the intent record, expected RED, bounded command, or fault proof.

Test shape

  • Verify one logical contract per test; multiple assertions are allowed when verifying related aspects or side effects of that single contract.
  • Assert observable outcomes and outward side effects, not mock choreography or call sequences.
  • Mock external boundaries only when isolation requires it; prefer real pure/domain behavior and simple fakes.
  • Keep test names behavior-focused, without ticket IDs or TODO/FIXME markers.

See references/quality-contract.md for the intent record, failure taxonomy, layer routing, and runner examples.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Upgrade an Android project to Android Gradle Plugin (AGP) 9. Use when migrating to AGP 9, updating Gradle build files, migrating to built-in Kotlin, or adopting the new AGP DSL.

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

HoangNguyen0403/agent-skills-standard5812026년 10월 24일 업데이트

Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow implementation to their specific skills.

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

HoangNguyen0403/agent-skills-standard5812026년 10월 24일 업데이트

Implement WorkManager and background processing correctly on Android. Use when creating Worker classes, scheduling tasks, choosing between WorkManager and Foreground Services, or setting up Hilt in workers; defer FCM and notification delivery to android-notifications.

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

HoangNguyen0403/agent-skills-standard5812026년 10월 24일 업데이트

Build high-performance declarative UI with Jetpack Compose. Use when writing Composable functions, optimizing recomposition, hoisting state, or working with LazyColumn and side effects; defer deep-link and navigation routing to android-navigation.

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

HoangNguyen0403/agent-skills-standard5812026년 10월 24일 업데이트

Migrate an Android XML View to Jetpack Compose following a structured 10-step workflow. Use when converting XML layouts to Compose, setting up Compose in an existing View-based project, or incrementally adopting Compose.

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

HoangNguyen0403/agent-skills-standard5812026년 10월 24일 업데이트

Write correct coroutine scopes, lifecycle collection, and dispatcher injection in Android production code. Use for suspend functions, coroutine scopes, and dispatcher mechanics; defer ViewModel StateFlow/LiveData architecture, Fragment lifecycle recipes, persistence/notifications, and unit-test recipes to their specific skills.

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

HoangNguyen0403/agent-skills-standard5812026년 10월 24일 업데이트

HoangNguyen0403의 스킬 모두 보기

이 스킬의 문제 신고