Agent skill
architecture-governance
Automated fitness functions (ArchUnit) to prevent architectural drift.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/architecture-andreibesleaga-gabbe-6
SKILL.md
architecture-governance Skill
Architecture is not a document; it's a constraint system checked by CI/CD.
1. Fitness Functions (Automated Tests)
Write tests that verify your architecture, not just your logic.
- Layering: "Classes in
Domainshould not depend onInfrastructure." - 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-cruiseror custom ESLint rules (seeagentic-linter). - PHP: PHPArkitect or Deptrac.
3. Examples (Pseudocode)
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-disablecomment with the ticket number.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?