coddy-agent / rules
Cursor rule162 starsChanged 56 days agoMITView on GitHub
UI layout checks before claiming work is done
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository29 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/acp-protocol.mdcCursor rule
- .cursor/rules/agent-model-choice.mdcCursor rule
- .cursor/rules/api-layer.mdcCursor rule
- .cursor/rules/architecture.mdcCursor rule
- .cursor/rules/code-style.mdcCursor rule
- .cursor/rules/config-roundtrip.mdcCursor rule
- .cursor/rules/console-tui.mdcCursor rule
- .cursor/rules/core-modules.mdcCursor rule
- .cursor/rules/gateway.mdcCursor rule
- .cursor/rules/implementation-order.mdcCursor rule
- .cursor/rules/llm-streaming.mdcCursor rule
- .cursor/rules/logger-components.mdcCursor rule
- .cursor/rules/process-lifecycle.mdcCursor rule
- .cursor/rules/provider-auth.mdcCursor rule
- .cursor/rules/provider-devin.mdcCursor rule
- .cursor/rules/provider-proxy.mdcCursor rule
- .cursor/rules/russian-wording.mdcCursor rule
- .cursor/rules/session-storage.mdcCursor rule
- .cursor/rules/skills-delivery.mdcCursor rule
- .cursor/rules/testing.mdcCursor rule
- .cursor/rules/text-encoding.mdcCursor rule
- .cursor/rules/tool-images.mdcCursor rule
- .cursor/rules/turn-admission.mdcCursor rule
- .cursor/rules/ui-assets.mdcCursor rule
- .cursor/rules/ui-spa.mdcCursor rule
- .cursor/rules/workflow.mdcCursor rule
- .cursor/rules/workspace-identity.mdcCursor rule
The file
We split this ui-verification.mdc into the rules it gives an agent
8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Before you tell the user that a UI change is complete or merge-ready:
- Very specific: line 12
Use Playwright MCP (or the repo browser tools) to open http://localhost:$PORT/layout-scroll-check.html and http://localhost:$PORT/ with at …
- Very specific: line 13
Run browser_evaluate to compare getBoundingClientRect() edges for .chat-header, .messages-inner first child, and .composer-card (left and …
- Distinctive: line 14
If anything is off, fix CSS and re-check before reporting done.
- Very specific: line 51
Only a bounded slice of a transcript is in the DOM, and a long session holds only the end of its history until the reader scrolls up …
- Very specific: line 54
When the change touches the transcript window, the rows, the messages or tool-calls routes, or what a row renders, run …
- Very specific: line 59
Run it once more with CODDY_ENGINE=webkit when the change touches scroll anchoring: WebKit does not anchor scrolling, so there the window's …
- Distinctive: line 67
Before pushing, inspect every PNG for skill names, hosts, tokens, usernames, and personal paths.
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: UI layout checks before claiming work is done globs: external/ui/**/* alwaysApply: false --- # UI verification (Playwright MCP) Before you tell the user that a UI change is complete or merge-ready: 1. Choose one free port (for example **`PORT=5201`**) and start **`npx vite --host localhost --port "$PORT"`** in **`external/ui`**. 2. Use **Playwright MCP** (or the repo browser tools) to open **`http://localhost:$PORT/layout-scroll-check.html`** and **`http://localhost:$PORT/`** with at least two viewports: **narrow** (for example **390px**) and **wide** (for example **1280px**). 3. Run **`browser_evaluate`** to compare **`getBoundingClientRect()`** edges for **`.chat-header`**, **`.messages-inner`** first child, and **`.composer-card`** (left and right should match within about **1px** after shared column padding). 4. If anything is off, fix CSS and re-check before reporting done. This is required for changes to **`external/ui/src/styles.css`**, **`ChatScreen`**, **`Composer`**, or nav layout. ## Safari and other WebKit reports A Safari-only report is reproducible without a Mac: Playwright's WebKit is the engine Safari is cut from and its version tracks Safari's. When the change touches a capped, scrollable or **`position: fixed`** surface, run **`external/ui/scripts/webkit-scroll-check.mjs`** against a live **`coddy serve`** (setup and env vars in **`docs/surfaces/web-ui.md`**, *Reproducing a Safari report without a Mac*), and run it again with **`CODDY_ENGINE=chromium`** to tell a WebKit-only regression from a layout bug every engine shares. ## The transcript at every width of the grid Nothing in the transcript may be wider than the transcript: on the stacked shell its column is the page, and one row that cannot wrap makes a phone scroll sideways (**`DESIGN.md`**, *Layout grid*, *Tool card UI*, *Markdown*). When the change touches the transcript's rows, the Markdown styles or a width query, run **`external/ui/scripts/phone-overflow-check.mjs`** against a **`vite`** dev server (setup in **`docs/surfaces/web-ui.md`**, *Checking the transcript at every width of the grid*): it mounts the rows that used to overflow and fails when the page scrolls sideways or anything sticks out of **`.messages-inner`** at 360 to 1280px. A new width query goes into the grid first; the vitest **`layoutGridCss.test.ts`** fails on one the grid does not name. ## The fold chevron The chevron is an SVG whose ink is centred in its viewBox, never a text glyph: a glyph's ink moves with the platform's font, which is why the reports of a chevron riding above its label kept coming back (**`DESIGN.md`**, *Chevron*). jsdom has no layout, so vitest cannot see where it lands. When the change touches the chevron, the rows it sits on or the type around them, run **`external/ui/scripts/chevron-align-check.mjs`** against a **`vite`** dev server (setup in **`docs/surfaces/web-ui.md`**, *Checking the fold chevron against its label*): it measures the chevron's ink centre against the label's on a transcript row and on the Tasks panel toggle, and fails past **1px**. ## A long transcript Only a bounded slice of a transcript is in the DOM, and a long session holds only the end of its history until the reader scrolls up (**`DESIGN.md`**, *Transcript window*; **`docs/surfaces/web-ui.md`**, *Long sessions*). jsdom has no layout, so vitest renders every row and cannot see the window at work. When the change touches the transcript window, the rows, the messages or tool-calls routes, or what a row renders, run **`external/ui/scripts/transcript-window-check.mjs`** against a binary built with **`TAGS="http ui swarm"`** (setup in **`docs/surfaces/web-ui.md`**, *Checking a long transcript*): it opens a 3306-message session under CPU throttling, scrolls it without a jump, edits a prompt of an older page, runs a turn in a second browser, reads through a swarm relay, and fails past a budget. Run it once more with **`CODDY_ENGINE=webkit`** when the change touches scroll anchoring: WebKit does not anchor scrolling, so there the window's own correction is all that keeps the reader's row still. ## Capture isolation and redaction - Captures use a temporary browser-context page, never the operator's main tab, and close it afterward. - Navigate the capture page through localhost to avoid host-specific zoom. Set the viewport explicitly and blur focus unless focus is what the screenshot documents. - Screenshot stands use isolated `HOME` and `CODDY_HOME` with neutral fixtures. - Before pushing, inspect every PNG for skill names, hosts, tokens, usernames, and personal paths.
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.

