Best for
- 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'.
techygarg/lattice/skills/molecules/review/SKILL.md
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'.
Decision brief
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.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/techygarg/lattice --skill "skills/molecules/review"Inspect the Agent Skill "review" from https://github.com/techygarg/lattice/blob/75b7e0728587f2e822e8cdbe11583a6f9a38a4b3/skills/molecules/review/SKILL.md at commit 75b7e0728587f2e822e8cdbe11583a6f9a38a4b3. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Use framework:learning-harvest Load behavior. Focus hint: "review session — focus: all categories".
Use framework:learning-harvest Load behavior. Focus hint: "review session — focus: all categories".
Always load: framework:clean-code -- applies to all code regardless of layer/purpose.
For each loaded atom, apply two passes against delta:
Default to summary mode. Use full mode if user asked for detailed/comprehensive review.
Permission review
The documentation asks the agent to read local files, directories, or repositories.
**Directory inclusions (always-full-scan)**: When delta touches file in always-full-scan dir, expand delta to include all files in that dir.The documentation asks the agent to create, modify, or delete local files.
Append structured summary to `.lattice/reviews/review-log.md`. Create file with `# Review Log` heading if doesn't exist.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 89/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 170 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Load/apply skills based on scope (see Step 2 for conditional loading):
framework:knowledge-priming -- Load project context (tech stack, architecture, conventions) to evaluate against real standards (always loaded)framework:learning-harvest -- Load prior operational learnings inform review; harvest new patterns at session end (always)framework:collaborative-judgment -- Surface borderline findings with both interpretations instead of silently classifying (always loaded)framework:clean-code -- Code craft: SRP, naming, complexity, error handling (always loaded)framework:architecture -- Structural: layer rules, dependency direction, architectural flows (conditional)framework:domain-driven-design -- Domain modeling: aggregates, entities, value objects (conditional)framework:secure-coding -- Security: trust boundaries, injection, secrets, input handling (conditional)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:
.lattice/config.yaml in repo root.paths.review_standards.mode:
mode: overlay: Read embedded defaults first, then apply doc's sections on top. Sections matched by heading — custom replaces matching defaults, new appended.mode: override (or no mode): Custom doc full precedence. Must be comprehensive.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.
Use framework:learning-harvest Load behavior. Focus hint: "review session — focus: all categories".
Determine what code reviewing & establish scope.
git diff for changed files/lines. Delta is changes, not entire codebase.Classify delta:
architecture loads.domain_folder or containing aggregates, entities, value objects) -- determines if domain-driven-design loads.secure-coding loads.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:
secure-coding every review). clean-code and knowledge-priming must remain always-loaded regardless of config.For each loaded atom, apply two passes against delta:
Pass 1 -- Self-Validation Checklist: Walk thru atom's Self-Validation Checklist (numbered items in atom's SKILL.md). For each check, examine if any code in delta violates. Record violations with:
Pass 2 -- Anti-Pattern Scan: Walk thru atom's Active Anti-Pattern Scan (checkbox items in atom's SKILL.md). For each anti-pattern, check if delta exhibits symptom. Record matches with:
Scope rule: Focus on delta. Don't review unchanged code unless change in delta creates new violation in surrounding code (e.g., new dependency breaks dependency rule for existing file). When reviewing surrounding code, note finding originates from delta's impact, not pre-existing issues.
Config override (§7 Custom Review Dimensions): If review-standards doc defines custom review dimensions, run after atom validation passes:
Default to summary mode. Use full mode if user asked for detailed/comprehensive review.
Summary mode (default):
Present top issues ordered by severity, one line each. Cap at most important findings -- don't enumerate every minor issue.
For each finding:
[SEVERITY] file:line -- description (atom-name: check-name)
Severity levels:
When finding borderline between severity levels, use framework:collaborative-judgment — note uncertainty inline with both interpretations rather than silently classifying.
End with "What's done well" sentence highlighting something positive about delta -- good naming, proper error handling, clean test structure, correct layer placement.
Full mode (when user asks for detailed/comprehensive review):
Organize findings by atom. For each atom loaded:
## Clean Code
- [warning] src/services/OrderService.ts:45 -- Function `processOrder` does validation,
business logic, and persistence (SRP violation). Extract validation into guard clause,
persistence into repository call.
- [suggestion] src/services/OrderService.ts:72 -- Parameter list has 5 arguments.
Group into `ProcessOrderOptions` object.
## Architecture
- [critical] src/domain/Order.ts:12 -- Inner layer imports from outer layer
(`import { DatabaseClient }`). Violates dependency direction rules.
Define an interface in the inner layer, implement in the outer layer.
After all atom sections, add:
Config override (§2 Severity Classification): If review-standards doc defines custom severity levels or per-atom overrides:
Config override (§3 Report Preferences): If review-standards doc defines report preferences:
After presenting report, harvest learnings & log review.
Harvest Learnings — use framework:learning-harvest Harvest behavior:
Session context: "review session — code quality assessment against atom standards". Synthesize and propose cross-cutting patterns from this review — recurring quality anti-patterns, structural issues that keep appearing, reliability gaps. User confirms what enters the document. STOP: complete this before Log Review below.
Log Review — append to .lattice/reviews/review-log.md:
.lattice/reviews/ dir if doesn't exist..lattice/reviews/review-log.md. Create file with # Review Log heading if doesn't exist.## YYYY-MM-DD — [feature/scope name]
- **Scope**: [file count], [layers touched]
- **Atoms**: [atoms loaded for this review]
- **Result**: [critical count] critical, [warning count] warning, [suggestion count] suggestion
- **Key findings**: [top 2-3 specific findings, one line]
- **Strengths**: [one positive highlight]
## History summary section at top of file.Config override (§5 Insight Capture Preferences): If review-standards doc defines insight capture preferences:
framework:learning-harvest when proposing candidates.Config override (§6 Health Log Preferences): If review-standards doc defines health log preferences:
Alternatives
garrytan/gstack
Pre-landing PR review. (gstack)
ruvnet/RuView
Comprehensive GitHub code review with AI-powered swarm coordination
dotnet/skills
Grades a specified set of test methods individually and produces a concise table mapping each test (fully-qualified name) to a letter grade (A–F), a score band, and a one-line note — designed to be posted as a PR comment. Use when the caller wants per-test feedback on a curated list of methods (for example, the new or modified tests in a pull request), not a suite-wide audit. Polyglot: .NET, Python, TS/JS, Java, Go, Ruby, Rust, Swift, Kotlin, PowerShell, C++. Input is a list of test methods (or
ruvnet/ruflo
Comprehensive GitHub code review with AI-powered swarm coordination