architecture

Solid

Enforce architectural rules when generating or modifying code. Defaults to clean architecture; supports any architecture style via the architecture-refiner. Validates layer responsibilities, dependency direction, and structural constraints using the loaded architecture rules. Use when generating code, reviewing architecture, creating new files, or when the user mentions 'architecture', 'layers', 'structure', 'dependency rules', 'hexagonal architecture', 'ports and adapters', 'modular monolith', or 'onion architecture'. Also use when reviewing generated code for structural compliance.

AI & Automation 134 stars 8 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
71
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Architecture ## Config Resolution Skill support two mode: **clean architecture** (default) and **custom architecture** (team-define). Mode determine which rule load. **Step 1 — Determine mode:** 1. Read `.lattice/config.yaml` in repo root 2. Check `architecture_mode` key - If `architecture_mode: custom` → **custom mode** - If absent, or other value → **clean architecture mode** (default) **Step 2 — Load enforce rule:** - **Clean architecture mode** → Read `./references/clean-architecture.md` for enforce instruction (Self-Validation Checklist, Anti-Pattern Scan, Ambiguity Signals, structural principles) - **Custom mode** → Read `./references/custom-architecture.md` for enforce instruction **Step 3 — Load architecture content:** - **Clean architecture mode:** 1. Check `paths.architecture` in `.lattice/config.yaml` for custom doc 2. If found, read doc and check YAML frontmatter for `mode`: - **`mode: overlay`**: Read `./references/clean-architecture-defaults.md` first, then apply custom doc section on top. Section match by heading — custom section replace matching default, new section append. - **`mode: override`**: Custom doc take full precedence. Must be comprehensive. 3. If no custom doc → read `./references/clean-architecture-defaults.md` - **Custom mode:** 1. Check `paths.architecture` in `.lattice/config.yaml` for team architecture doc 2. If found → read it. Sole reference — no default. 3. If not found → surface: "No architecture docu...

Details

Author
techygarg
Repository
techygarg/lattice
Created
3 months ago
Last Updated
3 days ago
Language
Shell
License
MIT

Related Skills