architecture-fitness

Enforce import boundaries and architecture rules in CI pipelines.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/s3nex-com/sdlc-skills-library --skill architecture-fitness-s3nex-com
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture-fitness
Source: https://github.com/s3nex-com/sdlc-skills-library/tree/main/skills/phase2/architecture-fitness
Command: npx skills add https://github.com/s3nex-com/sdlc-skills-library --skill architecture-fitness-s3nex-com

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires yaml, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Architecture fitness functions automate the enforcement of architectural rules in CI/CD pipelines, preventing drift and cross-layer violations.

Core Features & Use Cases

  • Automated CI governance: enforce import boundaries across the repository to keep layers decoupled.
  • Continuous enforcement: detect circular imports, dead modules, and dependency budget breaches on every PR.
  • Architecture drift prevention: keep architecture conformance through automated gates within the build pipeline.

Quick Start

Add a .fitness.yml at the repo root and wire the included scripts into your CI workflow to run on each PR.

Frequently Asked Questions about architecture-fitness

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

FAQPage Schema
How do I enforce import boundaries and prevent architecture drift in CI?

You enforce import boundaries by configuring rules in a .fitness.yml file and running lightweight Python scripts during your CI pipeline to stop cross-layer architecture violations early on every PR.

What are architecture fitness functions and how do they automate governance?

Architecture fitness functions automate governance by executing configurable rules like no_circular_imports and dependency_budget as automated gates within your build pipeline, preventing cross-layer violations and architecture drift.

How do I set up automated CI checks for layer boundaries in a layered codebase?

Add a .fitness.yml file at your repository root to define layer_boundaries and other rules, then wire the included Python scripts into your CI workflow to execute on each PR build.

Can I detect circular imports and dead modules automatically on every pull request?

Yes, you can detect circular imports and dead modules by enabling the no_circular_imports rule in your .fitness.yml configuration and running the scripts during continuous integration checks on every pull request.

Does this architecture governance tool work with codebases organized into specific layers?

This architecture governance tool applies to codebases organized into layers or domains like API, Services, and DB, enforcing dependency budgets and import boundaries across those specific structural layers.

What configuration format is required to define architecture rules for CI checks?

The required configuration format is YAML, defined in a .fitness.yml file at the repository root, which loads rules for no_circular_imports, layer_boundaries, dependency_budget, and docs into the CI scripts.