constraint-driven-development

Define and enforce project quality gates through a written CONSTRAINTS.md contract.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/Qiuyi-Hong/addyosmani-skills --skill constraint-driven-development-qiuyi-hong
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: constraint-driven-development
Source: https://github.com/Qiuyi-Hong/addyosmani-skills/tree/main/skills/constraint-driven-development
Command: npx skills add https://github.com/Qiuyi-Hong/addyosmani-skills --skill constraint-driven-development-qiuyi-hong

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI coding agents produce more code than anyone reviews, and without a written quality bar they quietly lower standards — adding suppressions, skipping tests, or weakening thresholds to reach green. This Skill records the project's quality bar as a versioned CONSTRAINTS.md file with concrete numbers and tools, then guards it against silent erosion. ## Core Features & Use Cases - Guided constraint setup: A four-question interview with sane defaults establishes coverage, security, performance, and accessibility thresholds, then writes them into CONSTRAINTS.md with the exact command that checks each one. - Diff-scoped floor guard: A reference implementation detects the five cheap-road-to-green moves — lowered thresholds, skipped tests, new suppression comments, unimplemented stubs, and untracked exceptions — using only git diff. - Lifecycle wiring and ratchets: Maps fast checks to the edit loop and slow checks to CI, and supports ratchet-style "measure today, never get worse" constraints when no target number exists. - Use Case: Before running an autonomous build loop on a TypeScript project, use this Skill to record an 80% changed-line coverage gate, a gitleaks secrets check, and a Lighthouse LCP budget, so every agent-generated commit is verified against the same written bar. ## Quick Start Ask the agent to set up project constraints and quality gates for this repository, writing them into a CONSTRAINTS.md file with enforced thresholds.

Frequently Asked Questions about constraint-driven-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up quality gates for an AI coding agent?

Run a short interview to pick which dimensions matter — coverage, security, performance, accessibility — then record each one in a CONSTRAINTS.md file with the exact command that checks it. Wire fast checks into the edit loop and slow checks into CI.

How to stop AI agents from skipping tests or adding eslint-disable comments?

Use a diff-scoped floor guard that scans added lines for suppression comments like @ts-ignore, eslint-disable, and nosemgrep, plus skipped tests and removed assertions. It exits nonzero on violations so the change is blocked before merge.

What coverage threshold should I set for a legacy codebase?

Do not set an aspirational number the codebase fails today. Instead record the current measured value with a must-not-fall direction, and enforce a separate threshold like 80% only on lines changed by new commits.

Can constraint checks run in CI without slowing down local development?

Yes. Split checks into tiers: types, lint, and secrets run in seconds on every edit, coverage runs at task end, and expensive tools like Semgrep, Lighthouse, and mutation testing run only in CI or against preview deploys.

When should I not use constraint-driven development?

Skip it for one-off scripts, spikes, and throwaway prototypes, or when a CONSTRAINTS.md already exists and is not changing. It is also unnecessary for short-lived pre-product-market-fit code beyond the basic floor rules.