quality-floor
Skill0 starsChanged 22 days agoMITView on GitHub
Use when a project needs a written quality floor (CONSTRAINTS.md: lines a change may never cross) or to check that a diff did not weaken it: new suppression comments, skipped or deleted tests, stubs, secrets; also to measure whether a commit or PR is too big (small steps: ≤50 logic lines per commit, ≤400 per PR). Not for correctness review (code-review-discipline) or writing tests (test-driven-development).
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- brainstorming-designSkill
- branch-lifecycleSkill
- bug-feedback-loopSkill
- codebase-designSkill
- code-review-disciplineSkill
- domain-modelingSkill
- failure-classesSkill
- git-safetySkill
- grillingSkill
- handoffSkill
- ops-safetySkill
- prototypeSkill
- researchSkill
- subagent-driven-devSkill
- systematic-debuggingSkill
- terse-modeSkill
- test-driven-developmentSkill
- ui-designSkill
- using-skillsSkill
- verification-before-completionSkill
- vetting-third-partySkill
- writing-plansSkill
- writing-skillsSkill
- zoom-outSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
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
- Very specific: line 12
Read what already gates the repo: pre-commit hook, CI jobs, lint/typecheck/test commands.
- Very specific: line 13
Write CONSTRAINTS.md with two parts:
- Distinctive: line 16
Commit it beside the code.
- Very specific: line 20
Run from the project root (<skill-dir> = where this skill is installed):
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
Quality floor
A floor is the short list of things a change may never do, plus the numbers the project refuses to get worse at. It lives in CONSTRAINTS.md at the repo root and every row names the command that produces the verdict. A dimension with a number and no command is an aspiration, not a constraint.
Write the floor (once per project, 15 minutes)
- Read what already gates the repo: pre-commit hook, CI jobs, lint/typecheck/test commands. A repo with no guardrail at all is itself the first finding.
- Write
CONSTRAINTS.mdwith two parts:- Floor (no numbers, absolute): no new suppression comments (
@ts-ignore,eslint-disable,# noqa,# type: ignore,#pragma warning disable); no unimplemented stubs (TODO: implement,NotImplementedError, empty handlers); no skipped or deleted tests without a reason in the commit message; no secrets in source; this file is never weakened to make a change pass. - Ratchet (numbers with commands): coverage, type errors, lint warnings, bundle size, p95 latency. Record where the project is today; the rule is "refuse to get worse".
- Floor (no numbers, absolute): no new suppression comments (
- Commit it beside the code. Tightening a number is silent; loosening one is a commit that says why, in the message.
Check a diff against the floor (every review, every handoff)
Run from the project root (<skill-dir> = where this skill is installed):
python3 <skill-dir>/scripts/floor_check.py --base origin/main # exit 1 on any floor violation in the diff
python3 <skill-dir>/scripts/floor_check.py --base HEAD~1 --json # machine-readable
python3 <skill-dir>/scripts/floor_check.py --base origin/main --working # include uncommitted changesThe script reads git diff <base>...HEAD and reports, with file:line: added suppression comments, added skip markers (.skip(, xit(, @pytest.mark.skip, [Ignore]), deleted test files, added stub markers, and secret-shaped strings. It does not judge style; that is code-review-discipline's job.
Step budget (every commit, every PR)
Small steps make review real: Google eng-practices call ~100 lines a reasonable change and ~1000 too large; SmartBear's Cisco study found defect finding drops past 200–400 lines reviewed at once. Budget: a commit adds ≤50 logic lines, a PR changes ≤400 lines.
python3 <skill-dir>/scripts/diff_budget.py # uncommitted step (incl. new untracked files) vs HEAD
python3 <skill-dir>/scripts/diff_budget.py --base HEAD~1 # the commit just made
python3 <skill-dir>/scripts/diff_budget.py --pr origin/main # whole branch, PR budgetExit 1 = over. Not counted for a step: tests, docs, config, generated code, lockfiles, deletions, renames. It warns, it does not block: a migration, a mass rename or a new tool may exceed it — split, or give the reason in the commit message. Self-test: bash <skill-dir>/scripts/test_diff_budget.sh.
The five loosening moves (say them by name in review)
- Threshold moved — a number in
CONSTRAINTS.mdor a config went down. - Test got easier — an assertion weakened, a fixture shrunk, a case removed.
- Checker silenced — suppression comment, rule disabled, file excluded.
- Work unfinished — stub,
TODO, feature flag defaulting the new path off "for now". - Exception appeared — an allowlist entry, a special case in the gate itself.
Any of these in a diff is reported as a finding even when tests are green. The author may keep it, with the reason written in the commit message; the reviewer never removes the finding to make the review pass.
Red flags
- "I'll re-enable that check after the release."
- Coverage config edited in the same commit as a feature.
- A skipped test with no linked issue.
- The floor file edited in a feature branch.
Recovery
| State | Way out |
floor_check.py reports a violation you disagree with | Keep the finding; add the reason to the commit message. Change the rule only in its own commit. |
| Floor never written for an old repo | Run step 1; write only the Floor part first, Ratchet numbers can come later. |
Script flags a legitimate # noqa in vendored code | Add the path to --exclude on the command line, not to the script. |
Distilled from addyosmani/agent-skills constraint-driven-development (MIT © Addy Osmani) @ bcab6a1 (2026-09-22). The upstream floor-guard sketch (a reference doc there) became a runnable script here, scripts/floor_check.py. See SOURCES.md.
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.

