- Home
- Skills
- Gilbertopsantosjr
- Fullstacknextjs
- Gs Evaluate Domain Module
gs-evaluate-domain-module_skill
1
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill gilbertopsantosjr/fullstacknextjs --skill gs-evaluate-domain-module- SKILL.md3.7 KB
Overview
This skill evaluates feature modules for compliance with Clean Architecture rules, focusing on dependency flow, layer separation, entity design, use case structure, repository patterns, and DI usage. It runs a set of deterministic checks and returns a pass/fail status, violation list, and remediation priorities. The goal is to make architectural defects visible and actionable for each feature module. Results map directly to scoring and auto-fail conditions so teams can prioritize fixes.
How this skill works
The evaluator scans the repository using grep, file listings, and simple heuristics to detect violations such as domain imports from outer layers, backend imports of Next.js/React, direct instantiation of use cases/repositories, and oversized server actions. It also verifies domain entity patterns (private constructor, validate()), repository interfaces and implementations, DI token registration, and thin presentation actions. Outputs include P0 violations, P1 issues, a numeric score, and a prioritized fix list based on defined auto-fail and weighted criteria.
When to use it
- Before merging feature branches to ensure architectural integrity.
- During code reviews for new or refactored feature modules.
- When onboarding teams to enforce consistent Clean Architecture practices.
- As part of CI to catch regressions in layer separation and DI registration.
- When preparing a technical debt cleanup or refactor planning.
Best practices
- Keep domain layer free of imports from application or infrastructure.
- Implement entities with private constructors, static constructors, and validate().
- Inject use cases and repositories via constructors; avoid 'new' inside actions.
- Register all feature tokens in the DI container before runtime tests.
- Keep server action files minimal (3–15 lines) and delegate logic to use cases.
Example use cases
- Run the evaluator on a feature branch to block merges that violate the Dependency Rule.
- Scan all features to build an architectural health dashboard and prioritize fixes.
- Use as a pre-commit or CI gate to enforce thin presentation and DI registration.
- Validate entity and repository patterns when implementing a new domain module.
- Audit legacy features to quantify technical debt tied to layer violations.
FAQ
Auto-fails include domain importing outer layers, backend importing Next.js, direct instantiation in actions, or missing private constructors on entities; each maps to a maximum allowed score in the evaluator.
Can I customize thresholds (like action size)?
Thresholds are configurable in the evaluation script; adapt the line limits and scoring weights to match your team's conventions.