crit / rules
Cursor rule1.2k starsChanged 2 months agoMITView on GitHub
crit — frontend architecture
Trending
Less talk lately.about the whole repository
Who's talking about tomasz-tomczyk/crit
- A Hacker News story“Show HN: Crit – Review AI agent work like you review PRs”Hacker News · Mar 10, 2026 · 4 points
- @greatlittlebot.bsky.social“tomasz-tomczyk / crit: Your feedback loop with the agent ★498 https://github.com/tomasz-tomczyk/crit”Bluesky · Jun 17, 2026 · 2 likes
- shuymn/dotfiles“Update dependency github:tomasz-tomczyk/crit to v0.20.1”GitHub · Sep 9, 2026 · 1 reactions
- shuymn/dotfiles“Update dependency github:tomasz-tomczyk/crit to v0.20.0”GitHub · Sep 5, 2026 · 1 reactions
- shuymn/dotfiles“Update dependency github:tomasz-tomczyk/crit to v0.19.1”GitHub · Aug 29, 2026 · 1 reactions
The biggest 5 of 50 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 50
Talked about on GitHub, Bluesky and Hacker News (50 times).
On GitHub · 46
- Sep 9, 2026Update dependency github:tomasz-tomczyk/crit to v0.20.1 — shuymn/dotfiles1 reaction · 1 comment
- Sep 5, 2026Update dependency github:tomasz-tomczyk/crit to v0.20.0 — shuymn/dotfiles1 reaction
- Aug 29, 2026Update dependency github:tomasz-tomczyk/crit to v0.19.1 — shuymn/dotfiles1 reaction
- Aug 19, 2026Update dependency github:tomasz-tomczyk/crit to v0.19.0 — shuymn/dotfiles1 reaction
- Aug 6, 2026Update dependency github:tomasz-tomczyk/crit to v0.18.4 — shuymn/dotfiles1 reaction
41 more on GitHub
- Aug 5, 2026Update dependency github:tomasz-tomczyk/crit to v0.18.3 — shuymn/dotfiles1 reaction
- Jul 31, 2026Update dependency github:tomasz-tomczyk/crit to v0.18.2 — shuymn/dotfiles1 reaction
- Jul 25, 2026chore(deps): update dependency github:tomasz-tomczyk/crit to v0.18.1 — shuymn/dotfiles1 reaction
- Mar 28, 2026Add crit - human-in-the-loop review tool for AI agent workflows — jamesmurdza/awesome-ai-devtools1 reaction
- Oct 4, 2026Add Crit to Code Review & Collaboration — eltociear/awesome-AI-driven-development0 reactions
- Oct 4, 2026agent-skills.github.tomasz-tomczyk.crit: 0.20.2 → 0.21.1 — sudosubin/agents.nix0 reactions
- Oct 3, 2026Update dependency github:tomasz-tomczyk/crit to v0.21.1 — shuymn/dotfiles0 reactions · 1 comment
- Oct 3, 2026agent-skills.github.tomasz-tomczyk.crit: init at 0.20.2 — sudosubin/agents.nix0 reactions
- Oct 2, 2026crit 0.21.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Sep 29, 2026Update dependency github:tomasz-tomczyk/crit to v0.21.0 — shuymn/dotfiles0 reactions · 1 comment
- Sep 29, 2026chore(deps): bump the flake-inputs group across 1 directory with 8 updates — yktsnet/dotfiles-public0 reactions
- Sep 28, 2026fix: port release audit parity fixes from crit — tomasz-tomczyk/crit-web0 reactions · 1 comment
- Sep 28, 2026fix: handle highlight worker startup rejection — tomasz-tomczyk/crit-web0 reactions · 1 comment
- Sep 24, 2026crit 0.20.3 — Homebrew/homebrew-core0 reactions · 1 comment
- Sep 8, 2026crit 0.20.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Sep 7, 2026chore(deps): update crit to v0.21.1 — ryo246912/dotfiles0 reactions
- Sep 5, 2026ux: left-anchor content when the file tree collapses — bewa1t/crit0 reactions
- Sep 4, 2026crit 0.20.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Aug 28, 2026crit 0.19.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Aug 18, 2026crit 0.19.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Aug 17, 2026fix: render markdown tables with native layout — tomasz-tomczyk/crit-web0 reactions · 1 comment
- Aug 15, 2026fix: render Markdown YAML frontmatter as a highlighted block — tomasz-tomczyk/crit-web0 reactions · 1 comment
- Aug 9, 2026chore: rename module path to github.com/sho-hata/crit — sho-hata/crit0 reactions
- Aug 5, 2026crit 0.18.4 — Homebrew/homebrew-core0 reactions · 1 comment
- Aug 4, 2026crit 0.18.3 — Homebrew/homebrew-core0 reactions · 1 comment
- Jul 31, 2026fix: skip hidden resolved comments during navigation — tomasz-tomczyk/crit-web0 reactions · 1 comment
- Jul 29, 2026crit 0.18.2 — Homebrew/homebrew-core0 reactions · 1 comment
- Jul 23, 2026fix: use correct go install path with /cmd/crit — tomasz-tomczyk/crit-web0 reactions · 1 comment
- Jul 17, 2026crit 0.18.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Jul 10, 2026crit 0.18.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Jul 3, 2026crit 0.17.1 — Homebrew/homebrew-core0 reactions · 1 comment
- Jul 1, 2026crit 0.17.0 — Homebrew/homebrew-core0 reactions · 1 comment
- Jun 22, 2026crit 0.16.5 — Homebrew/homebrew-core0 reactions · 1 comment
- Jun 22, 2026crit 0.16.4 — Homebrew/homebrew-core0 reactions · 1 comment
- Jun 17, 2026crit 0.16.3 — Homebrew/homebrew-core0 reactions · 1 comment
- Jun 12, 2026suggestion: Add crit to the review tools — ai-for-developers/awesome-ai-coding-tools0 reactions
- Jun 9, 2026crit 0.16.2 — Homebrew/homebrew-core0 reactions · 1 comment
- Jun 9, 2026Submission: Crit — travisvn/awesome-claude-skills0 reactions
- Jun 4, 2026crit 0.16.1 — Homebrew/homebrew-core0 reactions · 1 comment
- May 7, 2026[Resource]: Crit — hesreallyhim/awesome-claude-code0 reactions · 1 comment
- Apr 8, 2026I vibe-planned a ui for chunk yesterday - maybe crit is further along? — chrismo/mta0 reactions · 1 comment
On Bluesky · 3
- Jun 17, 2026tomasz-tomczyk / crit: Your feedback loop with the agent ★498 https://github.com/tomasz-tomczyk/crit — @greatlittlebot.bsky.social2 likes and reposts
- Jul 28, 2026AIエージェントの成果物やコード変更に対してPR感覚でインラインコメントを残せるツールっぽい 開発のフィードバックループを回すのにすごく便利そう yug1224 starred tomasz-tomczyk/crit… — @yug1224.com1 likes and repost
- Jun 5, 2026It's at crit.md and repo + full docs at github.com/tomasz-tomcz... — @tomasztomczyk.bsky.social1 likes and repost
On Hacker News · 1
- Mar 10, 2026Show HN: Crit – Review AI agent work like you review PRs4 points · 1 comment
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 repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- scripts/CLAUDE.mdCLAUDE.md
- .cursor/rules/frontend-css.mdcCursor rule
- .cursor/rules/frontend-js.mdcCursor rule
- .cursor/rules/go.mdcCursor rule
- .cursor/rules/proxy-auth-transport.mdcCursor rule
The file
We split this frontend-architecture.mdc into the rules it gives an agent
12 rules. About 0 are common, 4 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
All custom JS uses the IIFE + dual-export pattern:
- Very specific: line 37
Never use ES modules (import/export) — no build step exists
- Very specific: line 84
No bundler. Scripts are loaded dynamically with async=false (preserves execution order while loading in parallel).
- Very specific: line 89
Only then loads live-mode.js (or app.js for code-review)
- Distinctive: line 91
When adding a new shared module:
- Very specific: line 92
Add to liveDeps array in index.html if live-mode needs it
- Distinctive: line 93
Add to the code-review script chain if code-review needs it
- Distinctive: line 115
Create the IIFE file with the dual-export pattern
- Very specific: line 116
Add it to liveDeps or code-review script chain in index.html
- Very specific: line 117
Create a matching web/__tests__/<name>.test.js using Node's --test
- Very specific: line 118
Add the test file to Makefile e2e-live-utils target (if live-mode)
- Very specific: line 119
Document dependencies in a header comment (which window.crit.* namespaces it reads)
≈ “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: crit — frontend architecture
alwaysApply: false
---
# Frontend Architecture
## Two-Paradigm Page Fork
`index.html` serves both modes from a single HTML shell. A script block at load time checks `window.location.pathname`:
- `/live` → live mode (iframe-based pin review)
- Everything else → code-review mode (file tree + diff/document views)
Each mode dynamically loads its own script set. They share: theme pill, settings overlay, and extracted modules.
## Module Pattern
All custom JS uses the IIFE + dual-export pattern:
```javascript
(function () {
'use strict';
// ... implementation ...
var api = { publicFn1, publicFn2 };
if (typeof window !== 'undefined') {
window.crit = window.crit || {};
window.crit.<namespace> = api;
}
if (typeof module === 'object' && module.exports) {
module.exports = api;
}
})();
```
- Runtime: accessed via `window.crit.<namespace>`
- Tests: required via `module.exports` (Node.js `--test`)
- Never use ES modules (`import`/`export`) — no build step exists
## Shared Modules (used by both modes)
| Module | Namespace | Purpose |
|--------|-----------|---------|
| `crit-shared.js` | `window.crit.shared` | Cookie helpers, theme, tip rotation, image upload |
| `crit-renderer.js` | `window.crit.renderer` | ContentRenderer registry (register/deregister/current) |
| `crit-sse.js` | `window.crit.sse` | SSE client factory (createSSE) |
| `crit-draft.js` | `window.crit.draft` | Autosave drafts to localStorage |
| `crit-comment-templates.js` | `window.crit.commentTemplates` | Template bar + saved-snippet CRUD |
| `crit-comment-form.js` | `window.crit.commentForm` | Shared comment form creation |
| `crit-comment-card.js` | `window.crit.commentCard` | Comment card rendering + reply threading |
| `crit-comment-card-helpers.js` | `window.crit.commentCardHelpers` | Author colors, timestamps, markdown rendering |
| `crit-settings-overlay.js` | `window.crit.settingsOverlay` | Settings dialog lifecycle |
| `crit-settings-panes.js` | `window.crit.settingsPanes` | Settings tab content |
## Code-Review Modules (used only by code-review mode)
| Module | Namespace | Purpose |
|--------|-----------|---------|
| `crit-icons.js` | `window.crit.icons` | SVG icon constants (ICON_CHEVRON, ICON_EDIT, etc.) |
| `crit-line-blocks.js` | `window.crit.lineBlocks` | buildLineBlocks (markdown → commentable line blocks) |
| `crit-code-highlight.js` | `window.crit.codeHighlight` | Shiki highlighting for fenced code (comments, documents) via Pierre's worker pool |
| `crit-diff-renderer.js` | `window.crit.diffRenderer` | Word-level diff for the rendered markdown diff (files mode rounds) |
| `crit-pierre-adapter.js` | `window.crit.pierreAdapter` | Pure mapping: Crit hunks/comments/forms → Pierre diffs, annotations, themes |
| `crit-pierre-view.js` | `window.crit.pierreView` | The review list on Pierre CodeView (items, lazy hydration, annotation cache, jumps) |
## ContentRenderer Interface
Modes register a renderer that the shared chrome (comment cards, settings) can call without knowing the active mode:
```javascript
window.crit.renderer.register({
scrollToAnchor(anchor), // scroll viewport to a comment's target
highlightAnchor(anchor), // visually highlight the target
clearHighlight(), // remove highlight
onAnnotationIntent(cb), // subscribe to "user wants to comment here"
getMode(), // "code-review" | "live"
getAnchorType(), // "line" | "dom"
});
```
Code-review registers its renderer in `app.js`. Live-mode registers in `live-mode.js`.
## Script Loading
No bundler. Scripts are loaded dynamically with `async=false` (preserves execution order while loading in parallel). A Promise-based boot gate waits for all dependencies before loading the mode's main entry point:
1. Early scripts (shared helpers) load first
2. `liveDeps` array lists all sub-modules
3. `Promise.all(bootGate)` waits for all load events
4. Only then loads `live-mode.js` (or `app.js` for code-review)
When adding a new shared module:
- Add to `liveDeps` array in `index.html` if live-mode needs it
- Add to the code-review script chain if code-review needs it
- Both modes must load shared modules BEFORE their main entry point
## Live-Mode Sub-Modules
Live-mode splits into focused files under `window.crit.live.<name>`:
| File | Namespace | Concern |
|------|-----------|---------|
| `live-mode.dispatch.js` | `.live.dispatch` | Message dispatch table |
| `live-mode.toggle.js` | `.live.toggle` | Pin/Browse mode toggle |
| `live-mode.composer.js` | `.live.composer` | Comment composition UI |
| `live-mode.panel.js` | `.live.panel` | Side panel lifecycle |
| `live-mode.panel-render.js` | `.live.panelRender` | Panel card rendering |
| `live-mode.sse.js` | `.live.sse` | Live-mode SSE handlers |
| `live-mode.size.js` | `.live.size` | Panel resize logic |
| `live-mode.queue.js` | `.live.queue` | Batched pin push queue |
| `live-mode.origin.js` | `.live.origin` | Origin/proxy URL resolution |
| `live-mode.row.js` | `.live.row` | Per-route section rendering |
## Adding a New Module
1. Create the IIFE file with the dual-export pattern
2. Add it to `liveDeps` or code-review script chain in `index.html`
3. Create a matching `web/__tests__/<name>.test.js` using Node's `--test`
4. Add the test file to `Makefile` `e2e-live-utils` target (if live-mode)
5. Document dependencies in a header comment (which `window.crit.*` namespaces it reads)
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.

