constraint-driven-development

Defines project quality gates in CONSTRAINTS.md and detects diff changes that weaken them.

1|Updated Sep 4, 2026
One-click install
npx skills add https://github.com/SanHsien/agent-skills --skill constraint-driven-development-sanhsien
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: constraint-driven-development
Source: https://github.com/SanHsien/agent-skills/tree/main/skills/constraint-driven-development
Command: npx skills add https://github.com/SanHsien/agent-skills --skill constraint-driven-development-sanhsien

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI coding agents produce more code than anyone reviews, and when a check fails they take the cheapest road to green: adding suppressions, skipping tests, or lowering thresholds. This Skill turns a project's quality bar into a written, mechanically checkable contract so standards survive the session and cannot be silently lowered. ## Core Features & Use Cases - Constraint Interview and Authoring: Runs a four-question intake with sane defaults, then writes a CONSTRAINTS.md file recording enforced dimensions, thresholds with reasons, measured-only ratchets, and exceptions with owners and expiry dates. - Tool Wiring and Lifecycle Placement: Maps each dimension (types, lint, coverage, security, accessibility, performance, architecture) to a de facto tool such as Semgrep, gitleaks, osv-scanner, Lighthouse, or axe-core, and assigns checks to build, verify, review, and ship stages based on cost. - Floor Guard Against Weakening: Ships a diff-scoped reference implementation that detects new suppression comments, skipped or deleted tests, removed assertions, unimplemented stubs, lowered thresholds, and untracked exceptions, exiting 0, 1, or 2. - Use Case: Before running an autonomous build loop on a TypeScript project, use this Skill to record an 80 percent changed-line coverage gate, a zero-high-vulnerability dependency rule, and a floor that blocks any new eslint-disable, so the agent cannot silence its own checks. ## Quick Start Ask the agent to set up project constraints and quality gates for this repository, then have it write CONSTRAINTS.md and wire the checks into the build and review workflow.

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 covering which dimensions to enforce, whether failures block or warn, and target numbers, then record everything in a CONSTRAINTS.md file at the repo root. Each constraint names the exact command that produces its verdict so any agent can check it.

How do I stop an AI agent from skipping tests or adding eslint-disable?

Use the floor guard, a diff-scoped check that flags new suppression comments, skipped or deleted tests, removed assertions, and unimplemented stubs. It exits 1 on violations so the change is blocked, and tightening the bar stays silent while loosening it is loud.

What coverage threshold should I set for an existing codebase?

Do not set an aspirational number the code fails today. Measure the current value, record it in a measured-not-enforced table with a direction, and refuse to let it fall, which is the ratchet approach this Skill recommends.

Which tools enforce security and performance constraints?

The Skill maps each dimension to a de facto tool: Semgrep for code findings, gitleaks with --redact for secrets, osv-scanner for dependency vulnerabilities, Lighthouse for LCP and CLS budgets, and axe-core for WCAG accessibility violations.

When should I not use constraint-driven development?

Skip it for one-off scripts, spikes, throwaway prototypes, and short-lived pre-product-market-fit code beyond the basic floor. Also do not run the interactive interview in non-interactive contexts like CI or autonomous loops; apply the floor and flag the rest for a human.