architecture
Skill197 starsChanged 3 months agoMITView on GitHub
Enforce architectural rules when generating or modifying code, and validate proposed designs before approval (design mode). 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.
82 other projects use a version of this.
Adopted by
Most recently taken up by
- MagicJosh/rastheir own version, first seen Oct 6, 2026
- wellwelwel/lagunetheir own version, first seen Oct 4, 2026
- patrickjaja/claude-desktop-extratheir own version, first seen Oct 4, 2026
- fabiandistler/agentstheir own version, first seen Sep 30, 2026
- afonsoft/skillstheir own version, first seen Sep 30, 2026
- rafaelh/skillstheir own version, first seen Sep 30, 2026
Used with
Projects with it also use deployment-procedures, behavioral-modes and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
xfstudioSkilldeployment-procedures
Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.
Also in 5 projects that use this
xfstudioSkillbehavioral-modes
AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.
Also in 4 projects that use this
tiendatworkSkill2d-games
2D game development principles. Sprites, tilemaps, physics, camera.
Also in 3 projects that use this
tiendatworkSkill3d-games
3D game development principles. Rendering, shaders, physics, cameras.
Also in 3 projects that use this
CES-LtdSkilloss-pr
Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
Also in 3 projects that use this
CES-LtdSkillpr-automation
PR Automation Orchestrator: poll open PRs, check CI, run review, fix, and merge eligible PRs. Use when: (1) Invoked by daemon via scripts/pr-automation.sh, (2) User says "/pr-automation".
Also in 3 projects that use this
- +1 more from xfstudio
- +5 more from tiendatwork
Other versions82 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 82
- iOfficeAI/AionUi★ 33ksame name
- anthropics/knowledge-work-plugins★ 26ksame name
- ktnyt/cclsp★ 675same name
- patrickjaja/claude-desktop-extra★ 657same name
- FerroxLabs/wayland★ 608same name
- owainlewis/blueprint★ 410same name
- microsoft/powerplatform-build-tools★ 308same name
- sd0xdev/sd0x-harness★ 191same name
- wellwelwel/lagune★ 172same name
- Houseofmvps/ultraship★ 123same name
72 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architecture-compassSkill
- architecture-refinerSkill
- bug-fixSkill
- clean-code-refinerSkill
- clean-codeSkill
- code-forgeSkill
- collaborative-judgmentSkill
- context-anchoringSkill
- ddd-refinerSkill
- design-blueprintSkill
- design-firstSkill
- domain-driven-designSkill
- knowledge-priming-refinerSkill
- knowledge-primingSkill
- language-idioms-refinerSkill
- lattice-initSkill
- learning-harvestSkill
- refactor-safelySkill
- refiners-updateSkill
- requirement-forge-refinerSkill
- requirement-forgeSkill
- requirement-qualitySkill
- review-refinerSkill
- reviewSkill
- secure-codingSkill
- test-qualitySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 6 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 74 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Read .lattice/config.yaml in repo root
- Very specific: line 14
If architecture_mode: custom → custom mode
- Distinctive: line 15
If absent, or other value → clean architecture mode (default)
- Very specific: line 25
Check paths.architecture in .lattice/config.yaml for a custom document path.
- Very specific: line 26
If a document exists at that path → read it and check its YAML frontmatter for mode:
- Very specific: line 29
If the path is configured but no document exists at it → tell the user which configured path is missing, then read …
- Very specific: line 30
If there is no configured path → read ./references/clean-architecture-defaults.md.
- Very specific: line 33
Check paths.architecture in .lattice/config.yaml for team architecture doc
- Distinctive: line 34
If found → read it. Sole reference — no default.
- Very specific: line 35
If not found → surface: "No architecture document found.
- Very specific: line 39
If paths.language_idioms is set in the config and the document exists, read its "Dependency Management" section and adapt dependency …
- Distinctive: line 43
STOP after generating each component: Read the Self-Validation Checklist and Anti-Pattern Scan from the loaded enforce rule …
- Distinctive: line 45
Project-specific checks: If architecture content doc (loaded in Step 3) contains a Validation Checklist section (§6), apply those checks as …
- Distinctive: line 49
When invoked during design — no code is being written.
- Distinctive: line 54
STOP: do not skip checklist evaluation on the grounds that no code exists yet — the proposed structure is what gets validated.
“Common” is measured: kept by at least 6 in 10 of the 74 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Architecture
Config Resolution
Step 1 — Determine mode:
- Read
.lattice/config.yamlin repo root - Check
architecture_modekey- If
architecture_mode: custom→ custom mode - If absent, or other value → clean architecture mode (default)
- If
Step 2 — Load enforce rule:
- Clean architecture mode → Read
./references/clean-architecture.mdfor enforce instruction (Self-Validation Checklist, Anti-Pattern Scan, Ambiguity Signals, structural principles) - Custom mode → Read
./references/custom-architecture.mdfor enforce instruction
Step 3 — Load architecture content:
- Clean architecture mode:
- Check
paths.architecturein.lattice/config.yamlfor a custom document path. - If a document exists at that path → read it and check its YAML frontmatter for
mode:mode: overlay(or no mode field): read./references/clean-architecture-defaults.mdfirst, then apply the custom document's sections on top. Sections match by exact heading — a custom section replaces the matching default; new sections append after the defaults.mode: override: the custom document takes full precedence. It must be comprehensive.
- If the path is configured but no document exists at it → tell the user which configured path is missing, then read
./references/clean-architecture-defaults.md. - If there is no configured path → read
./references/clean-architecture-defaults.md.
- Check
- Custom mode:
- Check
paths.architecturein.lattice/config.yamlfor team architecture doc - If found → read it. Sole reference — no default.
- If not found → surface: "No architecture document found. Run
/architecture-refinerand select your architecture style to define your team's standards."
- Check
Step 4 — Language adaptation:
If paths.language_idioms is set in the config and the document exists, read its "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.
Enforcement
STOP after generating each component. Read the Self-Validation Checklist and Anti-Pattern Scan from the loaded enforce rule (clean-architecture.md or custom-architecture.md) and apply them.
Project-specific checks: If architecture content doc (loaded in Step 3) contains a Validation Checklist section (§6), apply those checks as additional project-specific validation after the enforce rule checklist.
Design Mode
When invoked during design — no code is being written; a planning molecule is validating a proposed design artifact — apply the same enforce rule as a forward-looking check:
- Take the proposed artifact (component list, layer assignment, data flow, or contract set) as the unit of validation.
- Evaluate it against the Self-Validation Checklist and Anti-Pattern Scan from the loaded enforce rule, plus the project-specific Validation Checklist if present — before the artifact is presented for user approval.
- Report violations as concrete findings on the artifact ("Component X reaches from layer A to layer C, skipping B"), not generic advice. Resolve them through the design.
- STOP: do not skip checklist evaluation on the grounds that no code exists yet — the proposed structure is what gets validated.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

