api-design-principles
REST·GraphQL API를 새로 설계하거나, 엔드포인트·스키마·버전 관리·에러 형식·페이지네이션을 정하거나 API 스펙을 리뷰할 때. Triggers - API 설계, REST, GraphQL, 엔드포인트 설계, API…
Use when implementing any feature or bugfix, before writing implementation code
Claude Code
$ npx -y skills add jh941213/adlc-harness --skill test-driven-development --agent claude-code
Codex
$ npx skills add jh941213/adlc-harness --skill test-driven-development -a codex -y
Cursor
$ npx skills add jh941213/adlc-harness --skill test-driven-development -a cursor -y
Gemini CLI
$ npx skills add jh941213/adlc-harness --skill test-driven-development -a gemini-cli -y
GitHub Copilot
$ npx skills add jh941213/adlc-harness --skill test-driven-development -a github-copilot -y
OpenCode
$ npx skills add jh941213/adlc-harness --skill test-driven-development -a opencode -y
Windsurf
$ npx skills add jh941213/adlc-harness --skill test-driven-development -a windsurf -y
name: test-driven-development description: Use when implementing any feature or bugfix, before writing implementation code
Write the test first. Watch it fail. Write minimal code to pass.
**Core principle:** If you didn't watch the test fail, you don't know if it tests the right thing.
**Violating the letter of the rules is violating the spirit of the rules.**
**Always:**
**Exceptions (ask your human partner):**
Thinking "skip TDD just this once"? Stop. That's rationalization.
NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST
Write code before the test? Delete it. Start over.
**No exceptions:**
Implement fresh from tests. Period.
digraph tdd_cycle {
rankdir=LR;
red [label="RED\nWrite failing test", shape=box, style=filled, fillcolor="#ffcccc"];
verify_red [label="Verify fails\ncorrectly", shape=diamond];
green [label="GREEN\nMinimal code", shape=box, style=filled, fillcolor="#ccffcc"];
verify_green [label="Verify passes\nAll green", shape=diamond];
refactor [label="REFACTOR\nClean up", shape=box, style=filled, fillcolor="#ccccff"];
next [label="Next", shape=ellipse];
red -> verify_red;
verify_red -> green [label="yes"];
verify_red -> red [label="wrong\nfailure"];
green -> verify_green;
verify_green -> refactor [label="yes"];
verify_green -> green [label="no"];
refactor -> verify_green [label="stay\ngreen"];
verify_green -> next;
next -> red;
}Write one minimal test showing what should happen.
<Good>
test('retries failed operations 3 times', async () => {
let attempts = 0;
const operation = () => {
attempts++;
if (attempts < 3) throw new Error('fail');
return 'success';
};
const result = await retryOperation(operation);
expect(result).toBe('success');
expect(attempts).toBe(3);
});Clear name, tests real behavior, one thing </Good>
<Bad>
test('retry works', async () => {
const mock = jest.fn()
.mockRejectedValueOnce(new Error())
.mockRejectedValueOnce(new Error())
.mockResolvedValueOnce('success');
await retryOperation(mock);
expect(mock).toHaveBeenCalledTimes(3);
});Vague name, tests mock not code </Bad>
**Requirements:**
**MANDATORY. Never skip.**
npm test path/to/test.test.ts
Confirm:
**Test passes?** You're testing existing behavior. Fix test.
**Test errors?** Fix error, re-run until it fails correctly.
Write simplest code to pass the test.
<Good>
async function retryOperation<T>(fn: () => Promise<T>): Promise<T> {
for (let i = 0; i < 3; i++) {
try {
return await fn();
} catch (e) {
if (i === 2) throw e;
}
}
throw new Error('unreachable');
}Just enough to pass </Good>
<Bad>
async function retryOperation<T>(
fn: () => Promise<T>,
options?: {
maxRetries?: number;
backoff?: 'linear' | 'exponential';
onRetry?: (attempt: number) => void;
}
): Promise<T> {
// YAGNI
}Over-engineered </Bad>
Don't add features, refactor other code, or "improve" beyond the test.
**MANDATORY.**
npm test path/to/test.test.ts
Confirm:
**Test fails?** Fix code, not test.
**Other tests fail?** Fix now.
**"Other tests" means the project's suite, not just your file.** A green run of the test you wrote is not a green suite. Before you call the change done, run the project's test command (bare `pytest`, `npm test`, `cargo test` — whatever the repo uses) even when your task named only one test file. A scope statement in your task bounds the deliverable, not your verification. Any failure that run shows — including one you didn't cause — goes in your report by name; a red test you watched scroll past and didn't mention is a report falsified by omission.
After green only:
Keep tests green. Don't add behavior.
Next failing test for next feature.
| Quality | Good | Bad | |---------|------|-----| | **Minimal** | One thing. "and" in name? Split it. | `test('validates email and domain and whitespace')` | | **Clear** | Name describes behavior | `test('test1')` | | **Shows intent** | Demonstrates desired API | Obscures what code should do |
When writing or changing any test, read [writing-good-tests.md](writing-good-tests.md) for the rules that keep tests honest:
| Excuse | Reality | |--------|---------| | "Too simple to test" | Simple code breaks. Test takes 30 seconds. | | "I'll test after" | Tests written after pass immediately — which proves nothing. They may test the wrong thing, test the implementation instead of the behavior, or miss the edge case you forgot. You never watched it fail, so you never proved it can catch the bug. Test-first forces that failure. | | "Tests after achieve same goals (spirit not ritual)" | Tests-after answer "what does this do?"; tests-first answer "what should this do?" Tests written after are biased by the
AI SDLC 루프(의도 → 설계 → 계획 → 구현 → 검증 → 리뷰 → 출시 → 학습)를 Claude Code·Codex·GitHub Copilot CLI에서 같은 방식으로 돌리는 개발 하네스 플러그인이다. 상시 컨텍스트와 hook은 최소로 두고, 나머지는 필요할 때만 읽히는 스킬로 둔다. 루프: /loopeng 하나로 의도부터 PR·학습까지 간다. 사람은 의도·설계·계획·출시 게이트에서만 승인하고, 단계마다 문서와 승인 기록이 커밋으로 남는다.
REST·GraphQL API를 새로 설계하거나, 엔드포인트·스키마·버전 관리·에러 형식·페이지네이션을 정하거나 API 스펙을 리뷰할 때. Triggers - API 설계, REST, GraphQL, 엔드포인트 설계, API…
Python asyncio·async/await 코드를 작성하거나 디버깅할 때(동시 I/O, gather·TaskGroup, 타임아웃, 세마포어, 큐, 취소, 이벤트 루프 블로킹). Triggers - asyncio,…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
빌드·타입체크·컴파일이 실패해 에러를 고칠 때. Triggers - 빌드 에러, build error, 컴파일 에러, tsc 에러, 타입 에러, 빌드 실패, build fix. 런타임 에러·테스트 실패는…
고객 제출용 SI/AO 산출물(아키텍처설계서, 인터페이스설계서, DB설계서, 요구사항추적표, 테스트결과서, 매뉴얼, 운영보고서)을 요청받았을 때 사용. Triggers - 검수 산출물, 납품 문서, 테스트결과서 뽑아줘.
변경을 커밋·푸시하고 PR을 만들 때 사용. Triggers - 커밋해, 푸시해, PR 만들어, PR 올려, commit and push. 리뷰·git log·diff 조회만 할 때는 쓰지 않는다.
Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.
Drives the GUI of a visible local app window through `orca computer`: accessibility tree, clicks, typing, menus, dialogs, and…
Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…
Create a new Architecture Decision Record with sequential numbering and AgentDB registration