Skip to content
Back to skills

Architecture

ASecurity

Enforce layer and dependency rules as architecture tests in CI (ArchUnit, dependency-cruiser, Deptrac). Use when a layering rule keeps being broken or a pipeline needs an architecture gate.

  • 24 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added October 14, 2026
ai-agentstypescriptgojavaphpkotlinci/cddocumentation

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned November 22, 2026

npx -y skills add andreibesleaga/GABBE --skill architecture --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Architecture?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Architecture
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/andreibesleaga-architecture-60c65778/badge)](https://www.skillsdirectory.com/skills/andreibesleaga-architecture-60c65778)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: architecture-governance
description: Enforce layer and dependency rules as architecture tests in CI (ArchUnit, dependency-cruiser, Deptrac). Use when a layering rule keeps being broken or a pipeline needs an architecture gate.
triggers: [architecture governance, archunit, dependency rules, layer violations, architecture tests in ci]
tags: [architecture]
role: prod-architect
context_cost: low
---
# architecture-governance Skill

## Goal
Architecture is not a document; it's a constraint system checked by CI/CD.

## Steps
## 1. Fitness Functions (Automated Tests)
Write tests that verify your architecture, not just your logic.

- **Layering**: "Classes in `Domain` should not depend on `Infrastructure`."
- **Cycles**: "No circular dependencies between slices."
- **Naming**: "All Interfaces should start with `I`" (if that's your rule).
- **Inheritance**: "All Domain Events must implement `IDomainEvent`."

## 2. Tools
- **Java/Kotlin**: ArchUnit.
- **.NET**: NetArchTest.
- **TypeScript**: `dependency-cruiser` or custom ESLint rules (see `agentic-linter`).
- **PHP**: PHPArkitect or Deptrac.
- For measurable thresholds and CI wiring beyond layering, see `fitness-functions.skill`.

## 3. Examples (Pseudocode)
```typescript
describe('Architecture', () => {
  it('Domain layer should not import Infrastructure', () => {
    const violations = analyzeImports()
      .from('src/domain')
      .to('src/infrastructure');
    expect(violations).toBeEmpty();
  });

  it('All Use Cases should end with UseCase', () => {
    const useCases = classes.in('src/application').thatImplement('IUseCase');
    expect(useCases).toHaveNameEndingWith('UseCase');
  });
});
```

## 4. Governance Policy
- **Breaking the Build**: Architecture violations are treated as compilation errors.
- **Waivers**: If you *must* break a rule, it requires an ADR and a specific `// eslint-disable` comment with the ticket number.

## Constraints
- Architecture violations break the build.
- A waiver needs an ADR and a ticket number.

## Output Format
Architecture test files and the rule configuration of the chosen tool, plus an ADR for each waiver.

## Limits and safety
- Rule files (`archunit` config, `.dependency-cruiser.*`) change only with the human's approval. If your platform provides CODEOWNERS or branch protection, use it to require review of them.
- The CI check fails closed: if the tool crashes or its rules do not load, the job fails.
- Do not loosen a rule to make a build pass; fix the code or propose a waiver with an ADR.
- Every waiver names an open ticket; scan for waivers whose ticket is closed.
- Check each generated rule against the tool's documentation and run it on a known violation to see it fail.

Files in this skill

  • adaptive-architecture.skill.md3.7 KB
  • api-design.skill.md4.7 KB
  • api-standards.skill.md1.7 KB
  • arch-debt.skill.md8.2 KB
  • arch-design.skill.md12.6 KB
  • arch-patterns.skill.md3.9 KB
  • arch-review.skill.md14.1 KB
  • architecture-governance.skill.md3.6 KB
  • attribute-driven-design.skill.md7.5 KB
  • blockchain-dlt.skill.md1.9 KB
  • compatibility-design.skill.md3.6 KB
  • critical-systems-arch.skill.md2 KB
  • design-patterns.skill.md4.3 KB
  • diagramming.skill.md13.9 KB
  • domain-model.skill.md12.1 KB
  • enterprise-migration-scenario.skill.md2 KB
  • enterprise-patterns.skill.md1.9 KB
  • error-handling-strategy.skill.md3.9 KB
  • event-driven-architecture.skill.md1.8 KB
  • event-governance.skill.md3.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.