architecture-guardian

Validate TypeScript layer dependencies and report import violations.

Updated Dec 30, 2025
One-click install
npx skills add https://github.com/haginot/ddd-boilerplate --skill architecture-guardian-haginot
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-guardian
Source: https://github.com/haginot/ddd-boilerplate/tree/main/.claude/skills/architecture-guardian
Command: npx skills add https://github.com/haginot/ddd-boilerplate --skill architecture-guardian-haginot

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams enforce layering boundaries and detect architecture violations in a TypeScript/Node.js project, reducing accidental cross-layer coupling.

Core Features & Use Cases

  • Layer validation: Checks Domain, Application, and Infrastructure boundaries and reports improper imports.
  • Violation reporting: Highlights offending files and symbols with concrete rationale.
  • Guided fixes: Proposes refactor suggestions and optional automated patches, and saves results under a reusable architecture namespace.

Quick Start

Use the architecture-guardian skill to validate the project's architecture by running the workflow. For example, run: npx claude-flow@alpha validate-architecture --strict

Frequently Asked Questions about architecture-guardian

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

FAQPage Schema
How do I enforce clean architecture boundaries in a TypeScript project?

To enforce clean architecture boundaries in a TypeScript project, validate layer dependencies to ensure Domain does not import Application or Infrastructure. This skill detects import violations, flags offending files and symbols, and proposes guided refactoring fixes.

Why does my domain layer have improper imports from infrastructure?

Improper imports in your domain layer occur when architectural boundaries are breached by importing Application or Infrastructure. Layer validation detects these cross-layer coupling violations, reports the offending files with rationale, and suggests refactor fixes to restore separation.

What is the best way to detect dependency management violations in layered architecture?

The best way to detect dependency management violations in layered architecture is to run validation that checks whether repositories depend on Domain and implementations on Infrastructure, flagging tests and DTOs that breach boundaries with file and symbol context.

Can I use architecture validation with Node.js and domain-driven design?

Yes, architecture validation works with TypeScript and Node.js projects using domain-driven design. It validates layer boundaries between Domain, Application, and Infrastructure, ensuring DTOs stay constrained to application interfaces and detecting boundary breaches.

How do I fix code quality issues from cross-layer coupling in TypeScript?

To fix code quality issues from cross-layer coupling in TypeScript, use guided fixes that propose refactor suggestions and optional automated patches for import violations. Results are stored under a reusable architecture namespace for ongoing dependency management.

What are the limitations of automated architecture boundary checks?

Automated architecture boundary checks are limited to validating import dependencies between Domain, Application, and Infrastructure layers in TypeScript projects. They detect and report violations with file and symbol context but require manual review of proposed refactor fixes before applying patches.