unslop-preflight
AGENTS.md4 starsChanged 4 months agoMITView on GitHub
This repository is a quality gate for AI-assisted frontend work. Keep every change narrow, reviewable, and tied to the project goal: producing clearer PRODUCT.md, DESIGN.md, and AGENTS.md artifacts before implementation. When a request mentions a bug, issue, broken UI, regression, overflow, clipping, z-index, viewport, modal, popup, drawer, dropdown, tooltip, toast, focus trap, or layout failure, do not patch the symptom first. Use this sequence before editing code: Do not use quick fixes, magic numbers, z-9999, forced dimensions, or broad rewrites…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 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 repository5 other files it gives its agents.
- .codex/AGENTS.mdAGENTS.md
- llms.txtllms.txt
- unslop-preflightSkill
- unslop-preflightSkill
- unslop-preflightSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
20 rules. About 0 are common, 17 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈17
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 7
Prefer one focused file change per commit unless tests or docs must move with the same behavior change.
- Distinctive: line 8
Do not rewrite broad areas of the codebase while fixing a narrow issue.
- Distinctive: line 10
Treat AGENTS.md as the preferred agent guidance file for new projects.
- Very specific: line 12
Keep generated PRODUCT.md and DESIGN.md guidance specific, practical, and implementation-ready.
- Distinctive: line 13
Treat accessibility, responsive behavior, privacy, RTL support, viewport governance, overlay rules, sensitive-data handling, root-cause …
- Distinctive: line 14
Add or update tests when behavior changes.
- Very specific: line 15
Run npm test before proposing or merging a code change when the local environment allows it.
- Distinctive: line 19
When a request mentions a bug, issue, broken UI, regression, overflow, clipping, z-index, viewport, modal, popup, drawer, dropdown, …
- Distinctive: line 21
Use this sequence before editing code:
- Distinctive: line 26
Check nearby regressions that the fix could create.
- Distinctive: line 27
Add verification proof: test, audit output, viewport case, state case, or acceptance criteria.
- Very specific: line 29
Do not use quick fixes, magic numbers, z-9999, forced dimensions, or broad rewrites unless the root cause analysis proves they are …
- Distinctive: line 33
Before handing a project to a coding agent, inspect the project and recommend only the skills or tools it actually needs now.
- Distinctive: line 48
When working on modals, dialogs, popups, drawers, sheets, overlays, lightboxes, popovers, command palettes, dropdowns, tooltips, toasts, …
- Distinctive: line 63
Do not solve layered UI problems by raising z-index alone.
- Distinctive: line 83
Do not treat a raw score as enough.
- Distinctive: line 98
Do not reward vague phrases such as modern, premium, clean, minimal, or AI-powered unless they are backed by product-specific constraints.
- Distinctive: line 102
Do not allow implementation handoff files to keep unresolved placeholders such as:
- Distinctive: line 124
Before editing, inspect the smallest relevant file first.
- Distinctive: line 128
When behavior changes, update docs in the same change:
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
AGENTS.md
This repository is a quality gate for AI-assisted frontend work. Keep every change narrow, reviewable, and tied to the project goal: producing clearer PRODUCT.md, DESIGN.md, and AGENTS.md artifacts before implementation.
Working rules for AI coding agents
- Prefer one focused file change per commit unless tests or docs must move with the same behavior change.
- Do not rewrite broad areas of the codebase while fixing a narrow issue.
- Preserve the existing CLI contract, especially
unslopandunslopcommands. - Treat
AGENTS.mdas the preferred agent guidance file for new projects. - Preserve compatibility with existing
AGENT.mdfiles. - Keep generated
PRODUCT.mdandDESIGN.mdguidance specific, practical, and implementation-ready. - Treat accessibility, responsive behavior, privacy, RTL support, viewport governance, overlay rules, sensitive-data handling, root-cause diagnosis, install-agent-harness guidance, and design-token discipline as hard requirements.
- Add or update tests when behavior changes.
- Run
npm testbefore proposing or merging a code change when the local environment allows it.
Root Cause Mode
When a request mentions a bug, issue, broken UI, regression, overflow, clipping, z-index, viewport, modal, popup, drawer, dropdown, tooltip, toast, focus trap, or layout failure, do not patch the symptom first.
Use this sequence before editing code:
- Reproduce the failure or restate the failing state.
- Separate visible symptoms from the underlying cause.
- Identify the smallest root fix that removes the cause.
- Check nearby regressions that the fix could create.
- Add verification proof: test, audit output, viewport case, state case, or acceptance criteria.
Do not use quick fixes, magic numbers, z-9999, forced dimensions, or broad rewrites unless the root cause analysis proves they are necessary.
Install Agent Harness
Before handing a project to a coding agent, inspect the project and recommend only the skills or tools it actually needs now.
Use this sequence:
- Detect the active agent host: Claude Code, Codex, Cursor, Gemini CLI, Copilot, Antigravity, OpenCode, Windsurf, or other compatible host.
- Inspect project shape: framework, test setup, UI risk, review risk, design-system maturity, runtime error risk, and whether the project is a small page, large app, migration, or refactor.
- Recommend a small harness inventory with priority: required now, recommended now, optional later, or skip.
- Explain the job of each recommended item and why it matters for this specific project.
- Include install command only when the source is trusted and relevant.
- Include verification: version check, dry run, source review, restart note, and rollback note where applicable.
Tip: This engine can work with many skills and tools. Install only the ones you actually need. Bulk-installing every skill adds unnecessary context overhead for the AI agent on every run and increases the review surface.
Overlay and stacking reasoning
When working on modals, dialogs, popups, drawers, sheets, overlays, lightboxes, popovers, command palettes, dropdowns, tooltips, toasts, sticky headers, or fixed headers, check the design contract before editing code.
Required concepts:
- viewport contract
- width guard
- height guard
- internal scroll
- mobile behavior
- viewport QA proof
- stacking context audit
- layer scale
- portal policy
- conflict matrix
Do not solve layered UI problems by raising z-index alone.
Files to inspect before changing behavior
src/core/auditor.jsfor scoring, readiness, categories, and artifact loading.src/core/reporter.jsfor report and fix-list output.src/core/templates.jsfor generatedPRODUCT.md,DESIGN.md, andAGENTS.mdcontent.src/commands/init.jsandsrc/commands/repair.jsfor artifact creation and safe repair.src/rules/for product, design, taste, placeholder, root-cause, agent-harness, modal-viewport, stacking, agent, and UX rules.README.md,CHANGELOG.md,SKILL.md,CONTRIBUTING.md, anddocs/when behavior changes.
Readiness rules
The audit should produce one of these readiness bands:
blockedneeds-spec-workagent-ready-with-fix-listagent-ready
Do not treat a raw score as enough. A single unresolved placeholder, security issue, accessibility blocker, missing root-cause diagnosis, or missing overlay contract can still block implementation.
Taste rules
Taste checks should enforce concrete design decisions, not personal preference.
Strong checks include:
- Design Read
- Taste Controls with numeric dials from 1 to 10
- Design System Decision
- product-specific anti-AI-slop guidance
- Agent Handoff
- Pre-flight Check
Do not reward vague phrases such as modern, premium, clean, minimal, or AI-powered unless they are backed by product-specific constraints.
Placeholder rules
Do not allow implementation handoff files to keep unresolved placeholders such as:
[audience][Feature 1][product name]TODOTBD...
Placeholders are acceptable in starter templates. They are blockers in final PRODUCT.md or DESIGN.md handoffs.
Repository map
bin/contains CLI entrypoints.src/contains the core CLI behavior, rules, templates, scanners, and scoring logic.scripts/contains standalone validators and scanners.tests/contains Node test runner coverage.references/,assets/,evals/, and root markdown files support publishing, examples, and documentation.docs/contains system-level documentation for readiness and agent behavior.
Safe-change policy
Before editing, inspect the smallest relevant file first. After editing, summarize the exact behavior change, the files touched, and any test command run. If tests cannot run, say why clearly.
Documentation sync
When behavior changes, update docs in the same change:
README.mdCHANGELOG.mdSKILL.mdAGENTS.mdCONTRIBUTING.mddocs/AI_AGENT_READINESS.mddocs/ROOT_CAUSE_MODE.mddocs/OVERLAY_LAYERING_GATES.mddocs/INSTALL_AGENT_HARNESS.md- package metadata when published files change
<!-- unslop:start missing-verification-checklist -->Verification Checklist
- Build passes.
- Tests pass.
- Main flows checked.
- Mobile behavior checked.
- Accessibility basics checked.
<!-- unslop:end missing-verification-checklist -->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.

