validate-architecture

Validate DDD/Clean Architecture conformance in code diffs and pull requests.

3|2|Updated Jun 25, 2024
One-click install
npx skills add https://github.com/Hopin-inc/civicship-api --skill validate-architecture-hopin-inc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: validate-architecture
Source: https://github.com/Hopin-inc/civicship-api/tree/main/.claude/skills/validate-architecture
Command: npx skills add https://github.com/Hopin-inc/civicship-api --skill validate-architecture-hopin-inc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Validate DDD/Clean Architecture conformance in code changes. This validator ensures that changes adhere to the architectural boundaries, naming conventions, and data access patterns required by the project's domain-driven design.

Core Features & Use Cases

  • Layer conformance checks: Resolver, UseCase, Service, and Repository layers are used correctly with no business logic leaking into controllers.
  • Transaction and RLS validation: Mutations require proper transaction usage and repositories wrap data access with Row-Level Security constraints; queries support optional transactions.
  • Security and quality enforcement: Enforces proper wrapper usage around data access, prevents cross-domain cycles, and flags GraphQL type naming mismatches.

Quick Start

Run the architecture validator against the current branch or a specific path to verify DDD/Clean Architecture conformance.

Frequently Asked Questions about validate-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Clean Architecture and DDD boundaries in code review?

To enforce Clean Architecture and DDD boundaries in code review, validate code diffs against domain layers to detect violations in resolver, use-case, service, and repository patterns, preventing business logic from leaking into controllers.

What is the best way to validate transaction management in DDD mutations?

Validating transaction management in DDD mutations requires checking that mutations use proper transactions, enforce correct tx propagation in services and repositories, and allow queries to support optional transactions.

How do I check for correct Row-Level Security issuer wrappers in pull requests?

Checking for correct Row-Level Security issuer wrappers in pull requests involves validating that repositories wrap data access with RLS constraints and enforce proper issuer wrapper usage for security checks across code changes.

Can I detect cross-domain cycles and GraphQL type naming mismatches automatically?

You can detect cross-domain cycles and GraphQL type naming mismatches automatically by running an architecture validator that flags naming mismatches and prevents cyclic dependencies across bounded contexts in code diffs.

Does this architecture validator work with existing code diffs and specific paths?

Yes, this architecture validator works with existing code diffs and specific paths by running against the current branch or designated directory to verify DDD and Clean Architecture conformance across domain layers.