Architecture Guardian

Validates Python FastAPI project structure, import rules, and database migration adherence.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/lwilly3/api.audace --skill architecture-guardian-lwilly3
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Architecture Guardian
Source: https://github.com/lwilly3/api.audace/tree/main/.github/skills/architecture-guardian
Command: npx skills add https://github.com/lwilly3/api.audace --skill architecture-guardian-lwilly3

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents architectural decay by enforcing strict coding standards, import rules, and database migration practices, ensuring the project's long-term maintainability and stability.

Core Features & Use Cases

  • Enforces Layered Architecture: Ensures strict separation between routes, CRUD operations, models, and schemas.
  • Mandates Database Migrations: Requires Alembic migrations for all database schema changes.
  • Enforces Soft Delete: Ensures all data deletion is logical, not physical.
  • Use Case: A developer attempts to directly query the database within a route handler. This Skill will flag the violation, preventing the merge and guiding the developer to use the appropriate CRUD function.

Quick Start

Run the validation script to check for common architectural violations.

Frequently Asked Questions about Architecture Guardian

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

FAQPage Schema
How do I prevent direct database queries in FastAPI route handlers?

To prevent direct database access in FastAPI routes, enforce strict layered architecture by validating code structure to ensure route handlers delegate to CRUD functions rather than executing queries directly.

What's the best way to enforce soft delete patterns in a Python FastAPI project?

The best way to enforce soft delete in FastAPI is to validate code structure to flag hard delete operations, ensuring all data deletion remains logical rather than physical for long-term stability.

How do I stop circular imports when structuring a Python FastAPI application?

To stop circular imports in FastAPI, validate import rules across your project structure to detect and prevent circular dependencies, ensuring maintainability and architectural integrity.

Do I need Alembic migrations for all database schema changes in FastAPI?

Yes, you need Alembic migrations for all database schema changes in FastAPI to prevent architectural decay, enforcing strict database migration practices for long-term project maintainability.

Why does my FastAPI code structure fail architectural validation checks?

FastAPI code structure fails architectural validation when it violates separation between routes, CRUD operations, models, and schemas, or bypasses mandated Alembic migrations and soft-delete patterns.