enforce-architecture

Enforce tiered dependency rules for multi-package projects via ESLint.

3|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/Avinava/agentic-guardrail-ts --skill enforce-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: enforce-architecture
Source: https://github.com/Avinava/agentic-guardrail-ts/tree/main/skills/enforce-architecture
Command: npx skills add https://github.com/Avinava/agentic-guardrail-ts --skill enforce-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Projects with multi-package architectures often create circular or illegal imports, leading to architecture erosion and hard-to-maintain code. This Skill defines and enforces a tiered dependency system to preserve architectural integrity and make dependencies explicit.

Core Features & Use Cases

  • Tiered imports: Every package is assigned to a tier and can only import from lower tiers.
  • Guidance for authors: Provides rules to decide correct tier placement and common pitfalls.
  • Architecture safety: Helps prevent circular dependencies and accidental coupling between layers.

Quick Start

Configure eslint-plugin-boundaries and assign packages to the correct tiers to start enforcing the rules.

Frequently Asked Questions about enforce-architecture

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

FAQPage Schema
How do I enforce tiered architecture and prevent illegal imports in a multi-package project?

Tiered architecture assigns packages to hierarchical tiers, allowing imports only from lower levels. This mechanism prevents circular dependencies and architecture erosion by making package boundaries explicit and strictly enforced.

How do I configure eslint to enforce import boundaries between packages?

Update your eslint.config.js with eslint-plugin-boundaries and define tier mappings for your packages. This setup enforces import boundaries by validating that packages only import from their allowed lower dependency tiers.

Can I use this tiered dependency enforcement for my existing multi-package codebase?

Yes, this applies to existing multi-package projects by defining a tiered dependency hierarchy. You must update your eslint.config.js and assign existing packages to their correct tiers to start enforcing the import rules.

What is the best way to prevent circular dependencies caused by accidental coupling between layers?

The best way to prevent circular dependencies is enforcing a tiered dependency system where packages may only import from lower tiers. This creates architectural safety and prevents accidental coupling between layers.

How do I decide correct tier placement for packages when enforcing import boundaries?

Decide correct tier placement by following provided guidance rules for authors. These rules help map packages to appropriate dependency tiers and avoid common pitfalls when structuring your architectural hierarchy.