본문으로 건너뛰기
cccskills
무료GitHub에 공개한국어 소개

tdd-repair

실패한 테스트를 기준으로 테스트 내용을 유지하면서 구현 코드를 자동 수정합니다. 예산과 시도 횟수를 정하고 재실행 결과와 사용 비용을 확인할 수 있습니다.

원문원문 설명 보기

Test-Driven Repair — given a failing test, spawn a bounded headless `claude -p` (Read/Edit/Bash only) that makes the test pass without modifying it. Modeled on agent-harness-generator's ADR-175 Test-Driven Repair mode. Bounded cost via --max-budget-usd, bounded capability via --allowedTools. Closes the loop the TDD plugins didn't — we generate tests, this fixes the code to satisfy them.

AI 평가90점/ 100설치 방법 보기

이럴 때 유용합니다

  • 커밋 후 발생한 CI 테스트 실패 수정
  • 먼저 작성한 테스트를 통과하는 구현 준비
  • 정해진 예산 안에서 회귀 문제 조사

한국어 소개

할 수 있는 일

tdd-repair는 실패한 테스트를 바탕으로 구현 코드를 자동 수정합니다. claude -p로 수정을 시도한 뒤 같은 테스트를 다시 실행해 성공 여부를 판단합니다. 테스트를 변경한 시도는 원래 내용을 복원하고 실패로 처리하며, 새 의존성 추가도 금지합니다. 결과에는 수정 전후 상태, 시도별 검증 결과, 사용 비용이 포함됩니다.

이럴 때 유용합니다

커밋 후 CI 테스트가 실패했거나 먼저 작성한 테스트를 통과할 구현이 필요할 때 유용합니다. 이전에 통과하던 테스트가 실패하는 문제를 예산과 최대 시도 횟수를 정해 조사할 때도 사용할 수 있습니다.

사용 예시

  • “이 저장소의 실패한 테스트를 테스트 내용 변경 없이 해결해 주세요.”
  • “예산 15달러, 최대 세 번의 시도로 이 회귀 테스트를 통과시켜 주세요.”

주의 사항

Node.js 스크립트와 Claude CLI를 사용합니다. 실제 수정에는 --confirm이 필요하며, 없으면 실행 계획을 반환합니다. 실패한 테스트가 있어야 하고 대규모 설계 변경에는 적합하지 않습니다. Bash 사용 제한은 격리 환경이 아니므로 신뢰할 수 있는 코드와 미커밋 변경이 없는 Git 작업 트리에서 실행합니다. 실패해도 코드 변경은 남습니다.

이 소개문은 공개된 SKILL.md를 바탕으로 AI(OpenAI Codex)가 작성했습니다. 정확한 사양은 아래 원문을 확인하세요.

객관 평가

AI가 SKILL.md의 내용만을 근거로 4가지 관점에서 판정했습니다. 스타 수나 인기도는 판정에 넣지 않았습니다.

지시의 명확성언제 쓰고 무엇을 하는지 알 수 있는가
A양호실패한 테스트에 맞춰 구현을 수정하는 용도와 적용하지 않을 상황이 명시되어 있습니다.
절차의 구체성절차·입출력·예시가 구체적으로 적혀 있는가
A양호사전 검증부터 재시험까지의 절차, 인수, JSON 결과와 종료 코드가 제시되어 있습니다.
안전성전송·삭제·명령 실행 등을 명시하고 있는가
A양호확인 옵션, 비용 한도, 테스트 복원, Bash의 비격리성과 작업 공간 변경 유지가 명시되어 있습니다.
도입의 용이성필요한 도구나 API 키가 적고 적혀 있는가
B일부 부족Node.js와 Claude CLI 실행 예시는 있지만 설치와 인증 절차는 기재되어 있지 않습니다.

총점은 각 항목을 A=25점, B=15점, C=5점으로 더한 값입니다. 2026년 10월 21일 기준으로 AI(OpenAI Codex)가 판정했습니다. 참고용이므로 설치 전에 원문도 확인해 주세요.

평가가 다르다고 생각되면 재검토를 요청하기

어느 항목이 왜 다르다고 생각하는지 적어 주세요. 로그인은 필요 없습니다. SKILL.md와 대조해 평가를 다시 만들고 이곳에 반영합니다.

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

포함된 파일(1)

  • SKILL.md6.5 KB

SKILL.md(원문)

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

Surfaces the Test-Driven Repair loop as a ruflo skill. Use when you have a failing test and want the source-under-test fixed automatically, with the test's pass/fail as the verification gate (no LLM-as-judge).

When to use

  • Failing CI test from a recent commit — point this at the test file, get a verified fix (or a clear "couldn't repair within budget" receipt).
  • Local TDD workflow — write the failing test first (tdd-workflow skill), then run tdd-repair to drive the green.
  • Regression triage — a previously-green test went red; before opening an issue, spend ~$1 to see if the fix is trivial.

When NOT to use

  • No failing test exists. Conformant mode (--no-test-oracle) is scoped for a follow-up ADR — needs MCTS over repro generation. For now, write a failing test first.
  • Architectural changes. This skill is for tactical "make red green" fixes. Cross-module refactors that incidentally break tests should be done by a human or a swarm.
  • Untrusted code. The headless claude -p runs with --allowedTools Read,Edit,Bash — no MCP, no network, no arbitrary file writes — but Bash can still read and write the filesystem and reach the network, so allowing it is not a sandbox. Don't point this at code you wouldn't git checkout . after, and run it on a clean git tree.

Algorithm

Implementation: scripts/tdd-repair/tdd-repair.mjs.

  1. Pre-flight verify — run the test command. If it already passes, exit 2 (test-already-passes). Repairing a green test is either a no-op or a --test-command typo.
  2. Spawn claude -p with a focused prompt:
    • Failing test file path (read-only intent)
    • Test command (run only)
    • Hard constraint: do NOT modify the test
    • Hard constraint: do NOT add new dependencies
  3. --allowedTools Read,Edit,Bash restricts capability. --max-budget-usd caps cost per attempt. --permission-mode acceptEdits auto-accepts file edits within the allowed set.
  4. Re-run the test to verify. The test's exit code IS the fitness function — no separate sandbox / LLM-as-judge.
  5. If green: emit success: true + per-attempt usage. If red after --max-attempts: emit success: false + receipts. Either way, the workspace is left as claude -p modified it (caller can git diff to review).

Output shape

{
  "success": true,
  "data": {
    "repaired": true,
    "attemptsTaken": 1,
    "mode": "test-driven",
    "before": { "passed": false, "exitCode": 1 },
    "after":  { "passed": true,  "exitCode": 0, "durationMs": 4321 },
    "attempts": [
      { "attempt": 1, "claude": { "ok": true, "durationMs": 38421, "usage": { "cost_usd": 0.0234 } }, "verify": { "passed": true } }
    ],
    "totalCostUsd": 0.0234,
    "budgetUsd": 5.0,
    "budgetExhausted": false,
    "shape": { "repo": "...", "test": "...", "testCommand": "...", "maxAttempts": 1, "model": "haiku" }
  }
}

Exit codes

CodeMeaning
0Test green after repair (success)
1Test still red after --max-attempts
2Config error (test file missing, test already passes, --no-test-oracle unsupported, etc.)
3Claude CLI exited non-zero (infrastructure failure)
99Reserved for safety tripwire (per ADR-153)

Safety posture

LayerMechanism
Cost cap--max-budget-usd default $5, divided across --max-attempts. Hard ceiling — claude exits when reached.
Capability cap--allowedTools Read,Edit,Bash — no MCP tools. Bash can still write files and use the network, so this narrows the tool set, it is not a sandbox.
Scope capThe prompt forbids adding dependencies. The test file is enforced, not just requested: if an attempt changes it, the original bytes are restored and the attempt is scored failed (reason: test-file-modified).
Confirmation gate--confirm REQUIRED — without it, returns dry-run plan (mirrors harness-evolve / harness-mint convention).
Hard timeout15 min total wall-clock; per-attempt budget of timeoutMs / maxAttempts.
Pre-flightRefuses to run if the test already passes (catches --test-command typos).

Inspiration

Modeled on the Test-Driven Repair mode from agent-harness-generator/packages/darwin-mode ADR-175. Key design difference: instead of wrapping metaharness-darwin evolve (population-based search), we drive a single claude -p invocation. Rationale:

  • The test command IS the fitness function — no need for variant scoring
  • claude -p is already in our stack — no new optional dep
  • Bounded cost / capability are first-class flags
  • Resumable via --session-id if iteration is needed

Conformant mode (no test, write own repro via MCTS) is deferred to a future ADR.

Example

# Smoke / dry-run (no --confirm yet)
node plugins/ruflo-testgen/scripts/tdd-repair/tdd-repair.mjs \
  --repo /path/to/myrepo \
  --test tests/auth.test.ts \
  --test-command "npx vitest run tests/auth.test.ts"

# Actually repair (Haiku tier, $5 budget, 1 attempt)
node plugins/ruflo-testgen/scripts/tdd-repair/tdd-repair.mjs \
  --repo /path/to/myrepo \
  --test tests/auth.test.ts \
  --test-command "npx vitest run tests/auth.test.ts" \
  --confirm

# Bigger model + more attempts for harder bugs
node plugins/ruflo-testgen/scripts/tdd-repair/tdd-repair.mjs \
  --repo . --test tests/regression-2456.test.ts \
  --test-command "npm test -- tests/regression-2456.test.ts" \
  --model sonnet --max-attempts 3 --budget 15.00 \
  --confirm

Cost ladder

TierModelPer-attempt typicalUse when
1Haiku$0.02 – $0.20First try — most "make red green" bugs are tactical
2Sonnet$0.30 – $2.00Haiku failed, or the bug has multi-file scope
3Opus$1.50 – $8.00Sonnet failed — architectural reasoning required (rarely worth it for a single failing test)

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

add-model-descriptions

무료요약 있음AI 평가 80점

HuggingFace router의 모델 목록과 chat-ui 설정을 비교해 미등록 모델을 조사합니다. 짧은 영어 설명을 작성하고 운영용·개발용 설정에 함께 추가합니다.

  • 라우터의 새 모델을 추가할 때
  • 모델 특징을 짧은 설명으로 정리할 때
  • 운영용·개발용 모델 정보를 함께 갱신할 때
ruvnet/ruflo7.8만2026년 10월 20일 업데이트

adr-create

무료요약 있음AI 평가 80점

기술 선택과 설계 판단을 기록하는 ADR을 기존 파일에 이어지는 번호로 만듭니다. 템플릿 생성, AgentDB 등록과 관련된 과거 결정의 연결을 처리합니다.

  • 기술 도입 이유 기록
  • API나 데이터 모델 변경 기록
  • 인프라 구성 결정 문서화
ruvnet/ruflo7.8만2026년 10월 20일 업데이트

adr-index

무료

Build a searchable index and relationship graph from ADRs, records of architectural decisions. Import two supported document formats, refresh existing metadata without duplicate relationships, and review summaries of statuses, missing references, and inconsistencies.

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

  • Index ADRs imported from another project
  • Refresh a graph that differs from files on disk
  • Set up ADR tracking in an existing codebase
ruvnet/ruflo7.8만2026년 10월 20일 업데이트

adr-reindex

무료요약 있음AI 평가 70점

삭제한 ADR 설계 결정 기록이나 관계 정보가 색인에 남았을 때 전체 삭제 후 재구축합니다. 현재 파일 수와 등록 수를 대조하며, 변경 없이 작업 내용을 미리 확인할 수 있습니다.

  • ADR 파일을 삭제한 뒤 색인을 재구축할 때
  • ADR 관계 삭제 후 남은 정보를 정리할 때
  • ADR 색인을 정기적으로 맞출 때
ruvnet/ruflo7.8만2026년 10월 20일 업데이트

adr-review

무료요약 있음AI 평가 80점

코드 변경 사항을 채택된 설계 결정을 기록한 ADR과 대조합니다. 결정 위반, 오래된 기록 참조, 관련 기록이 없는 변경을 정리하고 코드 수정이나 결정 재검토를 제안합니다.

  • PR 병합 전 설계 결정 확인
  • 대규모 변경과 설계 결정 대조
  • 대체된 ADR을 참조하는 코드 검색
ruvnet/ruflo7.8만2026년 10월 20일 업데이트

adr-verify

무료요약 있음AI 평가 90점

저장된 아키텍처 결정 기록인 ADR의 관계를 검증해 끊어진 참조, 대체 관계의 순환, 상태 불일치를 보고합니다. 가져오기 후나 출시 전 점검에 활용합니다.

  • ADR 가져오기 후 일관성 확인
  • 지속적 통합에서 불일치 탐지
  • 출시 전 저장된 ADR 데이터 점검
ruvnet/ruflo7.8만2026년 10월 20일 업데이트

ruvnet의 스킬 모두 보기

이 스킬의 문제 신고