본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)81k · #1616

ddd-validate

하는 일

이 스킬은 도메인 주도 설계 코드베이스를 점검해 경계 누수를 찾습니다. 한 업무 영역이 다른 영역의 내부 파일을 가져다 쓰는 경우가 그 예입니다. 코드 구조를 깔끔하게 유지하려는 팀을 위한 스킬입니다.

사용하는 경우

  • ✓코드베이스에서 업무 영역 사이의 누수를 점검하고 싶을 때.
  • ✓여러 영역에 걸친 변경을 병합하려고 할 때.
  • ✓경계 문제를 일찍 잡아내는 자동 점검을 원할 때.

스킬 링크

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-ddd/skills/ddd-validate/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-ddd/skills/ddd-validate/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“내 코드베이스에서 다른 영역의 내부 파일에 접근하는 코드가 있는지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 각 업무 영역을 찾고, 파일을 검사해 다른 영역의 내부 폴더를 가져오는 import를 찾아냅니다. 또한 엔티티, 이벤트 이름, 저장소 위치에 관한 규칙도 확인한 뒤 발견한 문제를 보고합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Validate domain boundary integrity across all bounded contexts.

Steps

  1. Discover contexts: Scan src/*/domain/ to find all bounded contexts.

  2. Check cross-boundary violations:

    • For each context, scan all .ts files for import statements
    • Flag any import that reaches into another context's domain/ directory directly
    • Allowed: importing from another context's public index.ts (application layer)
    • Violation: importing from src/<other-context>/domain/entities/... directly
    # Find cross-boundary imports
    for ctx in $(find src -maxdepth 2 -name "domain" -type d | sed 's|src/||;s|/domain||'); do
      grep -rn "from ['\"].*src/" "src/$ctx/" --include="*.ts" | grep -v "src/$ctx/" || true
    done
    
  3. Check aggregate invariant enforcement:

    • Scan aggregate root entities for public setters that bypass validation
    • Flag mutable public properties without invariant checks
    • Verify that child entities are not directly accessible (must go through aggregate root)
  4. Check event naming conventions:

    • Domain events should be past-tense named (e.g., OrderCreated, not CreateOrder)
    • Events should be immutable (no public setters)
    • Events should carry the aggregate ID
  5. Check repository patterns:

    • Repository interfaces should exist in domain/repositories/, not infrastructure/
    • Repository implementations should exist in infrastructure/, not domain/
    • Each aggregate root should have exactly one repository
  6. Report findings:

    • Output a table of violations with file path, line number, violation type, and suggestion
    • Categorize as: BOUNDARY, INVARIANT, EVENT, REPOSITORY
    • Exit with summary: total violations, by category, severity
  7. Store results:

    npx @claude-flow/cli@latest memory store --key "ddd-validation-TIMESTAMP" --value "RESULTS_SUMMARY" --namespace tasks
    npx @claude-flow/cli@latest hooks post-task --task-id "ddd-validate" --success true --store-results true
    
자주 묻는 질문

무엇을 위반으로 보나요?

다른 영역의 도메인 폴더를 직접 가져오는 import는 표시됩니다. 다른 영역의 공개 인덱스에서 가져오는 것은 허용됩니다.

문제를 스스로 고치나요?

이 스킬의 단계는 문제를 찾아 보고하는 데 초점이 있으므로, 보고서를 검토하고 무엇을 바꿀지 직접 정하세요.

이벤트에는 어떤 이름 규칙이 적용되나요?

도메인 이벤트는 과거형으로 이름을 짓습니다. 예를 들어 CreateOrder가 아니라 OrderCreated입니다.

상세 정보

작성자의 원본 설명

Validate domain boundaries -- detect cross-context import violations and aggregate invariant issues. Use when auditing a DDD codebase for leaks between bounded contexts, before merging cross-cutting changes, or as a CI gate to catch boundary erosion early.

repo: ruvnet/ruflo

인기도

GitHub 스타
81k
순위
#1616
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬