architectural-principles

Analyze codebases to detect architectural principle violations and map modules to layers.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/joleques/northstar-ai --skill architectural-principles
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architectural-principles
Source: https://github.com/joleques/northstar-ai/tree/main/.codex/skills/architectural-principles
Command: npx skills add https://github.com/joleques/northstar-ai --skill architectural-principles

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams detect and remediate violations of core architectural principles so that systems remain modular, testable, and resilient to change. It focuses on identifying where business rules are entangled with infrastructure, where layers are incorrectly coupled, and where bounded contexts are blurred, enabling cost-effective refactoring decisions.

Core Features & Use Cases

  • Architecture Diagnostics: Map code and modules to architectural layers and flag separation-of-concerns and dependency-rule violations.
  • Ports & Adapters Guidance: Identify missing interfaces and suggest adapter patterns to decouple domain from infrastructure.
  • Bounded Context Analysis: Detect shared entities and propose anti-corruption layers or explicit contracts to preserve context boundaries.
  • Use Case: During a codebase review, produce a prioritized list of violations with evidence, architectural impact, and concrete refactoring recommendations.

Quick Start

Ask the agent to review the repository and produce an architectural analysis listing violations, evidence, impacts, and recommended refactorings.

Frequently Asked Questions about architectural-principles

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

FAQPage Schema
How do I detect architectural violations in my codebase?

To detect architectural violations, you can analyze your codebase to map modules to architectural layers and flag separation-of-concerns issues. This process identifies layer leaks, context mixing, and improper infrastructure coupling during architecture reviews.

What is the best way to find separation of concerns violations during a code review?

The best way to find separation of concerns violations is to produce an architectural analysis that maps code to layers and lists violations with evidence. This highlights where business rules are entangled with infrastructure.

Can I use this to refactor infrastructure coupling in domain-driven design?

Yes, you can use this to refactor infrastructure coupling in domain-driven design by suggesting adapter patterns and interfaces. It identifies missing boundaries to decouple domain logic from infrastructure, preserving testability.

How do I identify and fix bounded context mixing in backend services?

You can identify and fix bounded context mixing by detecting shared entities and proposing anti-corruption layers or explicit contracts. This preserves context boundaries and ensures modules remain modular and resilient.

Does this approach work for hexagonal architecture code inspections?

Yes, this approach works for hexagonal architecture code inspections by applying ports and adapters guidance. It identifies missing interfaces and recommends boundary refactorings to keep the domain independent from external infrastructure.