From lattice
Enforces clean or custom architecture rules during code generation, modification, and review. Validates layer placement, dependency direction, boundary data, and structural constraints from repo config files.
npx claudepluginhub techygarg/lattice --plugin latticeThis skill uses the workspace's default tool permissions.
Skill support two mode: **clean architecture** (default) and **custom architecture** (team-define). Mode determine which rule load.
Guides structured conversations to define repository architecture principles in clean (default), hexagonal/ports & adapters, modular monolith, or custom styles. Produces formal architecture.md document for project standards.
Reviews code for clean architecture compliance, evaluating cohesion (REP, CRP, CCP), coupling (ADP, SDP, SAP), and quality attributes (maintainability, extensibility, testability). Use when assessing new or modified code architecture.
Audits codebase architecture: maps module dependencies with Mermaid graphs, checks layering integrity, flags structural decay from 12 engineering books. For structure reviews, clean architecture checks, circular imports, and onboarding tours.
Share bugs, ideas, or general feedback.
Skill support two mode: clean architecture (default) and custom architecture (team-define). Mode determine which rule load.
Step 1 — Determine mode:
.lattice/config.yaml in repo rootarchitecture_mode key
architecture_mode: custom → custom modeStep 2 — Load enforce rule:
./references/clean-architecture.md for enforce instruction (Self-Validation Checklist, Anti-Pattern Scan, Ambiguity Signals, structural principles)./references/custom-architecture.md for enforce instructionStep 3 — Load architecture content:
Clean architecture mode:
paths.architecture in .lattice/config.yaml for custom docmode:
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../references/clean-architecture-defaults.mdCustom mode:
paths.architecture in .lattice/config.yaml for team architecture doc/architecture-refiner and select your architecture style to define your team's standards."Step 4 — Language adaptation:
If paths.language_idioms exist in config, read "Dependency Management" section and adapt dependency direction enforcement to language idioms (e.g., Go interface-at-consumer, Java DI containers, Rust trait bounds). Language idioms take precedence over pseudocode defaults.
STOP after generate each component. Regardless mode, verify universal principle before proceed:
Then read style-specific Self-Validation Checklist and Anti-Pattern Scan from loaded enforce rule (clean-architecture.md or custom-architecture.md) and apply.