aif-architecture

Generates project architecture guidelines and ARCHITECTURE.md from tech stack analysis.

31|2|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/letuhao/lore-weave --skill aif-architecture-letuhao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aif-architecture
Source: https://github.com/letuhao/lore-weave/tree/main/.cursor/skills/aif-architecture
Command: npx skills add https://github.com/letuhao/lore-weave --skill aif-architecture-letuhao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Choosing and documenting a software architecture is often inconsistent or skipped entirely, leaving teams without clear dependency rules, folder structures, or module boundaries. This Skill analyzes your project's tech stack and generates a tailored ARCHITECTURE.md with concrete rules and code examples. ## Core Features & Use Cases - Architecture Recommendation: Evaluates team size, domain complexity, and scale requirements against a decision matrix covering Layered, Structured Modules, Explicit Architecture, and Microservices patterns. - Tailored Artifact Generation: Creates .ai-factory/ARCHITECTURE.md with folder structures, dependency rules, and code examples adapted to your actual language and framework. - Codebase Alignment Check: Compares the ideal architecture against your existing project structure and asks whether to document reality or enforce strict guidelines. - Use Case: After setting up a new project with /aif, run this Skill to get architecture guidelines that all subsequent AI-assisted development follows, including legacy vs new code policies. ## Quick Start Ask the AI to recommend and generate an architecture for this project based on DESCRIPTION.md, optionally specifying a pattern like explicit-vertical or structured-layers.

Frequently Asked Questions about aif-architecture

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

FAQPage Schema
How do I choose an architecture pattern for my project?

The Skill evaluates your project against a decision matrix covering team size, domain complexity, and scale requirements. It recommends a pattern such as Layered, Structured Modules, Explicit Architecture, or Microservices and asks you to confirm before generating documentation.

How to generate an ARCHITECTURE.md file for an existing codebase?

Run the Skill after project setup and it compares the ideal architecture against your actual folder structure. If there are significant discrepancies, it asks whether to document the existing reality or generate strict guidelines requiring later refactoring.

What is the difference between Structured Modules and Explicit Architecture?

Structured Modules is a lightweight modular pattern with rich models and soft boundaries, suited for medium complexity. Explicit Architecture enforces strict layered boundaries with ports and adapters, domain purity, and bounded contexts for high-complexity domains.

Can I specify the architecture pattern directly instead of getting a recommendation?

Yes, pass an argument such as explicit-vertical, structured-layers, microservices, or layers to skip the recommendation step. Legacy aliases like clean, ddd, monolith, and vertical are mapped to current patterns automatically.

When should I not use microservices architecture?

Avoid microservices for teams under ten people, unclear domain boundaries, or early-stage products exploring product-market fit. The operational complexity of distributed systems outweighs benefits until independent scaling and deployment become real requirements.