ddd-validate
यह क्या करती है
यह स्किल एक domain-driven कोडबेस की जाँच करती है कि कहीं सीमाएँ तो नहीं टूट रहीं, यानी एक बिज़नेस क्षेत्र दूसरे क्षेत्र की आंतरिक फ़ाइलें तो इम्पोर्ट नहीं कर रहा। जो टीमें अपने कोड की संरचना साफ़ रखना चाहती हैं, उनके लिए यह है।
कब इस्तेमाल करें
- ✓जब आप बिज़नेस क्षेत्रों के बीच रिसाव के लिए कोडबेस की जाँच करना चाहें।
- ✓जब आप कई क्षेत्रों को छूने वाला बदलाव मर्ज करने वाले हों।
- ✓जब आप सीमा की समस्याएँ जल्दी पकड़ने वाली स्वचालित जाँच चाहें।
Skill का लिंक
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-ddd/skills/ddd-validate/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मेरे कोडबेस में ऐसा कोड ढूँढिए जो किसी दूसरे क्षेत्र की आंतरिक फ़ाइलों तक पहुँचता हो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल हर बिज़नेस क्षेत्र ढूँढती है, उसकी फ़ाइलों में ऐसे इम्पोर्ट खोजती है जो दूसरे क्षेत्र के आंतरिक फ़ोल्डर में जाते हैं, और entities, इवेंट नामों और repositories की जगह के नियम जाँचती है। फिर हर मिली समस्या की रिपोर्ट देती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Validate domain boundary integrity across all bounded contexts.
Steps
Discover contexts: Scan
src/*/domain/to find all bounded contexts.Check cross-boundary violations:
- For each context, scan all
.tsfiles 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- For each context, scan all
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)
Check event naming conventions:
- Domain events should be past-tense named (e.g.,
OrderCreated, notCreateOrder) - Events should be immutable (no public setters)
- Events should carry the aggregate ID
- Domain events should be past-tense named (e.g.,
Check repository patterns:
- Repository interfaces should exist in
domain/repositories/, notinfrastructure/ - Repository implementations should exist in
infrastructure/, notdomain/ - Each aggregate root should have exactly one repository
- Repository interfaces should exist in
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
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
अक्सर पूछे जाने वाले सवाल
उल्लंघन किसे माना जाता है?
सीधे दूसरे क्षेत्र के domain फ़ोल्डर में जाने वाला इम्पोर्ट चिह्नित होता है। दूसरे क्षेत्र के सार्वजनिक index से इम्पोर्ट करना मान्य है।
क्या यह समस्याएँ खुद ठीक करती है?
इसके चरण समस्याएँ ढूँढने और रिपोर्ट करने पर केंद्रित हैं, इसलिए रिपोर्ट देखकर आप तय करें कि क्या बदलना है।
इवेंट के लिए कौन सा नामकरण नियम है?
domain इवेंट भूतकाल में नाम पाने चाहिए, जैसे 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
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
agent-adaptive-coordinator
81kआपके एजेंट को काम बदलने पर AI एजेंटों के समूह को बाँटने और फिर से संतुलित करने में मदद करती है, और काम के हिसाब से लेआउट चुनती है।
agent-agent
81kआपके एजेंट को बड़े लक्ष्य को क्रमबद्ध कार्यों की योजना में बदलना सिखाती है, और स्थिति बदलने पर योजना फिर से बनाना भी।
agent-agentic-payments
81kAI खरीदारी के लिए खर्च के आदेश मैनेज करने में मदद करती है, जिसमें खर्च की सीमा, समय अवधि, व्यापारी नियम और signed मंज़ूरियाँ शामिल हैं।
agent-analyze-code-quality
81kआपके एजेंट को कोड की गुणवत्ता जाँचने में मदद करती है, बिना फ़ाइलें बदले code smells, technical debt और refactoring के सुझाव खोजकर।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।