constraint-driven-development

Records project quality standards as a written contract and enforces them mechanically across the development lifecycle.

113k|11.8k|Updated Feb 15, 2026
Ready to run
npx skills add https://github.com/addyosmani/agent-skills --skill constraint-driven-development-addyosmani
💬 Prompt for ChatGPT / Claude Chat▼
Please help me install this Agent Skill.
Skill: constraint-driven-development
Source: https://github.com/addyosmani/agent-skills/tree/main/skills/constraint-driven-development
Command: npx skills add https://github.com/addyosmani/agent-skills --skill constraint-driven-development-addyosmani

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Agents and teams often lower quality bars incrementally—adding suppressions, skipping tests, weakening thresholds—without anyone noticing until code review. This Skill captures your project's actual standards (coverage targets, performance budgets, security rules) in a single CONSTRAINTS.md file and watches every diff to catch when the bar is being lowered. ## Core Features & Use Cases - Quality Bar Definition: Interview-driven process to establish coverage thresholds, performance budgets, accessibility requirements, and security baselines with sensible defaults when you don't have a number. - Automated Enforcement: Detects five moves that weaken standards: threshold changes, silenced checkers (@ts-ignore, eslint-disable), deleted or skipped tests, unfinished stubs, and new exceptions. - Diff-Scoped Checks: Floor guard validates only changed lines, keeping checks fast enough to run on every edit without being disabled. - Use Case: You're running autonomous agents on your codebase. Set coverage floor at 80%, add a gitleaks check, and the floor guard automatically blocks commits with new @ts-ignore suppressions or deleted test files—tightening is silent, loosening is loud. ## Quick Start Run the constraint-driven-development skill to interview your team on quality dimensions that matter, generate CONSTRAINTS.md with thresholds and commands, and wire those commands into your build pipeline.

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 constraints if I don't have numbers in mind?▼

The Skill provides sane defaults: 80% coverage of changed lines, zero high/critical security findings, and today's metric values with ratchets to prevent regression. Measure where you are today and hold that line rather than inventing aspirational targets.

What moves does the floor guard detect in a diff?▼

The floor guard catches five regression patterns: threshold lowering in CONSTRAINTS.md, new suppression comments (`@ts-ignore`, `eslint-disable`), deleted test files, removed assertions, and unfinished stubs like `throw new Error("Not implemented")`. Tightening passes silently; loosening blocks the commit.

Can I enforce constraints without slowing down my edit loop?▼

Yes. Scope checks to changed lines only, place fast checks (types, lint, secrets) at edit time under 5 seconds, and move expensive checks (mutation testing, accessibility audits) to CI or preview deployment. CONSTRAINTS.md specifies where each dimension runs.

What if my team needs an exception to a quality rule?▼

Exceptions are tracked in CONSTRAINTS.md with an ID, the rule, affected path, reason, owner name, and expiry date. They show up in code review and auto-expire, preventing exceptions from becoming permanent workarounds.

How do I know which tools to install for each quality dimension?▼

The Skill provides a reference table mapping dimensions (coverage, security, performance, accessibility) to de facto tools (Vitest, gitleaks, Lighthouse, axe-core) with exact commands. A dimension with a number but no tool command is an aspiration, not an enforced constraint.

Why are ratchets better than inventing a single target coverage number?▼

Ratchets record today's value and refuse to get worse, removing the argument about aspirational targets. When a number improves, update it; when it drops, the build fails. This works for any metric—coverage, bundle size, performance—without requiring consensus on a perfect number.