architecture-compass
Architectural thinking partner for an existing repository — scans the codebase, conducts a structured interview, agrees on…
Perform a structured code review by composing validation checklists from relevant atoms based on what code changed. Loads atoms conditionally -- clean-code always, architecture/DDD/security/tests only when the delta touches their domain. Produces a severity-ordered report with
Claude Code
$ npx -y skills add techygarg/lattice --skill review --agent claude-code
Codex
$ npx skills add techygarg/lattice --skill review -a codex -y
Cursor
$ npx skills add techygarg/lattice --skill review -a cursor -y
Gemini CLI
$ npx skills add techygarg/lattice --skill review -a gemini-cli -y
GitHub Copilot
$ npx skills add techygarg/lattice --skill review -a github-copilot -y
OpenCode
$ npx skills add techygarg/lattice --skill review -a opencode -y
Windsurf
$ npx skills add techygarg/lattice --skill review -a windsurf -y
name: review description: "Perform a structured code review by composing validation checklists from relevant atoms based on what code changed. Loads atoms conditionally -- clean-code always, architecture/DDD/security/tests only when the delta touches their domain. Produces a severity-ordered report with specific locations and fixes. Use when the user asks to 'review this', 'code review', 'quality check', 'validate the code', 'check my code', 'review the delta', or 'review this PR'."
Load/apply skills based on scope (see Step 2 for conditional loading):
1. `framework:knowledge-priming` -- Load project context (tech stack, architecture, conventions) to evaluate against real standards (always loaded) 2. `framework:learning-harvest` -- Load prior operational learnings inform review; harvest new patterns at session end (always) 3. `framework:collaborative-judgment` -- Surface borderline findings with both interpretations instead of silently classifying (always loaded) 4. `framework:clean-code` -- Code craft: SRP, naming, complexity, error handling (always loaded) 5. `framework:architecture` -- Structural: layer rules, dependency direction, architectural flows (conditional) 6. `framework:domain-driven-design` -- Domain modeling: aggregates, entities, value objects (conditional) 7. `framework:secure-coding` -- Security: trust boundaries, injection, secrets, input handling (conditional) 8. `framework:test-quality` -- Test: AAA structure, isolation, assertions, naming (conditional)
Review molecule supports optional config thru review-standards doc from review-refiner (or hand-written). Configures review *process* — not what atoms check (that's atom-level config via atom refiners).
**Resolution steps:**
1. Look for `.lattice/config.yaml` in repo root. 2. Check for config key `paths.review_standards`. 3. If doc exists at path, read & check YAML frontmatter for `mode`:
4. If no config or no review-standards doc found, use embedded defaults thruout workflow (full backward compat — identical to review with no config).
Review-standards doc has 7 sections map to workflow steps:
| Section | Affects step | |---------|-------------| | §1 Atom Loading Policy | Step 2 (Load Relevant Atoms) | | §2 Severity Classification | Step 4 (Produce Report) | | §3 Report Preferences | Step 4 (Produce Report) | | §4 Scope Rules | Step 1 (Identify the Delta) | | §5 Insight Capture Preferences | Step 5 (Harvest Learnings and Log Review) | | §6 Health Log Preferences | Step 5 (Harvest Learnings and Log Review) | | §7 Custom Review Dimensions | Step 3 (Run Targeted Validation) |
Each step notes where config applies with "**Config override**" callouts.
**STOP: Before Step 1, read `additional_instructions.review` (one line or a list) from `.lattice/config.yaml`.** No file or no key → skip silently.
When lines are found:
1. Show them verbatim under "Additional instructions (from config):". 2. **Highest priority — apply them for the whole session, including on resume.** On any conflict with anything else in this skill — steps, gates, STOP rules — or with its Required Skills, standards documents, or operational learnings, the config line wins.
Use `framework:learning-harvest` Load behavior. Focus hint: "review session — focus: all categories".
Determine what code reviewing & establish scope.
Classify delta:
1. **Which architectural layers touched?** (per loaded architecture rules) -- determines if `architecture` loads. 2. **Is domain code included?** (files in configured `domain_folder` or containing aggregates, entities, value objects) -- determines if `domain-driven-design` loads. 3. **Security-sensitive areas touched?** (auth, authz, input handling, DB queries, external API calls, file I/O, config, secrets) -- determines if `secure-coding` loads. 4. **Test files included?** -- determines if `test-quality` loads.
**Config override (§4 Scope Rules):** If review-standards doc defines scope rules, apply after identifying delta:
**Always load**: `framework:clean-code` -- applies to all code regardless of layer/purpose.
**Conditionally load** based on delta classification:
| Condition | Load | |-----------|------| | Delta touches multiple layers, adds new files, or changes file locations | `framework:architecture` | | Delta includes files in domain folder or modifies domain objects | `framework:domain-driven-design` | | Delta touches trust boundaries (HTTP handlers, auth, DB queries, external APIs, secrets, config) | `framework:secure-coding` | | Delta includes test files | `framework:test-quality` |
When multiple atoms load, run independently -- each atom's checklist applied to parts of delta relevant to it. Findings from different atoms merged Step 4.
**Config override (§1 Atom Loading Policy):** If review-standards doc defines atom loading rules, apply instead of (override) or on top of (overlay) table above
Composable AI skills that teach assistants structured thinking — design-first, context-aware, and architecture-guided.
Architectural thinking partner for an existing repository — scans the codebase, conducts a structured interview, agrees on…
Facilitate a structured conversation to define architecture principles for a repository. Supports multiple architecture styles:…
Enforce architectural rules when generating or modifying code, and validate proposed designs before approval (design mode).…
Investigate, reproduce, and safely fix a bug with regression protection. Composes context, diagnosis, architecture, code quality,…
Facilitate a structured conversation to define clean code principles for a repository. Produces a formal clean-code.md document…
Apply clean code principles when generating or modifying implementation code. Enforces function focus, naming clarity, complexity…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.