code-review-standards

A required checklist and response format for reviewing code in the Express-Milo project. It covers performance, page structure, accessibility, event handling, image loading, and error handling.

In plain words
What is it for?
Use it during code reviews to check items such as Core Web Vitals, DOM changes, lazy-loaded images, module loading, keyboard access, and safe test URLs.
Why use it?
It reduces the chance that important review areas are skipped, especially issues that can affect speed, page behavior, or accessibility.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/adobecom/express-milo/code-review-standards
Clone the repo
git clone --depth 1 https://github.com/adobecom/express-milo

Made for: Cursor.

Per session 1,758 This file is loaded in full into every session.
When invoked 1,758 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01758 $0.01758
Opus 5 $0.00879 $0.00879
Sonnet 5 $0.00352 $0.00352
Haiku 4.5 $0.00176 $0.00176

Measured 2d ago against content hash 1c7794fc3f72, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-review-standards scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to code-review-standards — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/code-review-standards.mdc · 221 lines

How it starts

The opening of the file, as written. The whole thing — 221 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Express-Milo Code Review Standards

CRITICAL: Complete Rule Application Required

When conducting code reviews, you MUST check ALL of the following rules and provide the specific format outlined below.

Rules to Check (in priority order):

Priority 1 - Blocking Issues:

  1. core-web-vitals-standards.mdc - Performance requirements (LCP, FCP, INP, CLS)
  2. aem-markup-sections-blocks.mdc - Block structure, auto-blocking, author experience
  3. dom-structure-preservation.mdc - Never break existing DOM structure
  4. dom-manipulation-best-practices.mdc - createElement patterns, batching
  5. event-handling-performance.mdc - Memory management, cleanup patterns
  6. Memory Rules - No real URLs in tests, use mocks instead

Priority 2 - Performance Issues:

  1. lighthouse-performance-troubleshooting.mdc - LCP optimization, score debugging
  2. lazy-loading-implementation.mdc - IntersectionObserver requirements
  3. image-optimization-requirements.mdc - Responsive images, preloading
  4. resource-loading-strategy.mdc - Module loading, async patterns

Priority 3 - Quality Issues:

  1. Accessibility Standards - ARIA patterns, keyboard navigation
  2. Error Handling - Try/catch, lana logging
  3. File Size Limits - JS files < 300 lines, CSS files < 200 lines per module

Required Review Format:

Section Structure:

## 🚨 **CRITICAL ISSUES** / 🔶 **MODERATE ISSUES** / ✅ **POSITIVE ASPECTS**

### [Priority Level]. **[Issue Category] - [Brief Description]**

**Issue Description:**
[1-2 paragraph explanation of WHY this is a problem, what express-milo rule it violates, and the impact on performance/user experience/maintainability]

**How it is now:**
```[language]
// [file path and line numbers]
[actual code from the diff showing the problem]

How it should be:

// [file path] - [description of the fix]
[corrected code following express-milo patterns]

### Required Checks by File Type:

#### JavaScript Files (.js, .ts):
- ✅ Uses createTag instead of innerHTML
- ✅ Has event listener cleanup with tracked listeners
- ✅ Uses IntersectionObserver for lazy loading (non-critical blocks)
- ✅ Implements proper error handling with lana logging
- ✅ Uses DocumentFragment for batched DOM operations
- ✅ Has timeout fallbacks for reliability
- ✅ File is under 300 lines (split into modules if larger)
- ✅ Uses passive event listeners where appropriate
- ✅ Implements proper ARIA patterns from existing express-milo examples

Read the full file on GitHub · 221 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 221 lines · 1,758 tokens per session scan A 1c7794fc3f72

Subscribe to this mod's changes

code-review-standards is a cursor rule published in the GitHub repository adobecom/express-milo (6 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 1,758 tokens to every session, about $0.0088 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to code-review-standards, differing in 0 lines, and is treated as a copy.