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

defense-in-depth

Multi-layer validation to catch bugs before they escape

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

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.3 KB

SKILL.md(원문)

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

Defense in Depth

Philosophy

MULTIPLE INDEPENDENT VALIDATION LAYERS
Each layer catches what others miss

One check can fail silently. Four layers rarely do.

The Four Layers

Layer 1: Type/Syntax

What: Static analysis, types, linting
Catches: Typos, syntax errors, type mismatches
Run: First, before anything else

Layer 2: Unit Tests

What: Individual function/module tests
Catches: Logic errors, edge cases, regressions
Run: After each code change

Layer 3: Integration Tests

What: Component interaction tests
Catches: Interface mismatches, data flow errors
Run: After unit tests pass

Layer 4: End-to-End

What: Full system tests, user scenarios
Catches: Missing requirements, workflow bugs
Run: Before claiming complete

The Pipeline

Code Change
    ↓
[Layer 1: Lint/Type Check]
    ↓ PASS?
[Layer 2: Unit Tests]
    ↓ PASS?
[Layer 3: Integration Tests]
    ↓ PASS?
[Layer 4: E2E / Manual Check]
    ↓ PASS?
Done

Fail at any layer → FIX before proceeding

Why Every Layer Matters

Without This LayerWhat Escapes
No type checksUndefined calls crash at runtime
No unit testsLogic bugs slip through
No integrationComponents don't work together
No E2EUser workflows broken

Implementation Patterns

For Code Changes

1. Make change
2. Run linter immediately
3. Run affected unit tests
4. Run integration suite
5. Test the actual feature

For Bug Fixes

1. Write failing test first
2. Fix the bug
3. Run all tests (regression check)
4. Verify original symptom gone

For New Features

1. Write unit tests for new logic
2. Implement feature
3. Add integration tests
4. Verify against requirements

Layer-Specific Commands

Configure per project:

layer_1:
  command: "npm run lint && npm run typecheck"
  when: "On save, before commit"
  
layer_2:
  command: "npm run test:unit"
  when: "After code changes"
  
layer_3:
  command: "npm run test:integration"
  when: "After unit tests pass"
  
layer_4:
  command: "npm run test:e2e"
  when: "Before claiming done"

Recovery Procedures

Layer 1 Fails

→ Syntax/type error in your code
→ Fix immediately, don't proceed
→ Never commit with lint errors

Layer 2 Fails

→ Logic error or regression
→ Check: Did you break something?
→ Check: Is your new test wrong?
→ Fix root cause, not symptoms

Layer 3 Fails

→ Interface/contract broken
→ Check: API changes?
→ Check: State management issues?
→ May need to update multiple files

Layer 4 Fails

→ User-visible problem
→ Trace back through layers
→ Ask: Which layer SHOULD have caught this?
→ Add test to that layer

Integration with Checker Agents

  • pre-action-verifier → Runs before each layer
  • assumption-checker → Validates test assumptions
  • scope-boundary-checker → Ensures tests cover scope
  • rollback-planner → Ready if pipeline fails

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Complete methodology for preventing AI hallucinations. Use when accuracy is critical and you need Claude to verify before claiming, cite before asserting, and admit uncertainty instead of guessing.

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

a-ariff/ariff-claude-plugins142026년 3월 29일 업데이트

Transform rough ideas into solid designs through structured questioning

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

a-ariff/ariff-claude-plugins142026년 3월 29일 업데이트

Canvas API Connection Skill

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

a-ariff/ariff-claude-plugins142026년 3월 29일 업데이트

Forces every code-related claim to include file:line citations. No citation means the claim must be verified or removed. Use when building documentation, writing code reviews, or any output that others will rely on.

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

a-ariff/ariff-claude-plugins142026년 3월 29일 업데이트

Assign confidence scores (0-100) to every claim in a response. Helps users understand which parts are verified facts and which are educated guesses. Use when the user needs to know how much to trust each part of the answer.

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

a-ariff/ariff-claude-plugins142026년 3월 29일 업데이트

Forces Claude to extract exact quotes from files before making claims about them. Prevents hallucinations by grounding every statement in actual text from the codebase. Use when working with large files or unfamiliar code.

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

a-ariff/ariff-claude-plugins142026년 3월 29일 업데이트

a-ariff의 스킬 모두 보기

이 스킬의 문제 신고