constraint-driven-development

Establishes enforceable project quality constraints in a CONSTRAINTS.md file with thresholds and checks.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/yourlabpt/yourlabpt_website --skill constraint-driven-development-yourlabpt
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: constraint-driven-development
Source: https://github.com/yourlabpt/yourlabpt_website/tree/main/projects/skills/constraint-driven-development
Command: npx skills add https://github.com/yourlabpt/yourlabpt_website --skill constraint-driven-development-yourlabpt

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 @ts-ignore suppressions, skipping tests, or weakening thresholds to get checks passing. This Skill turns your project's quality bar into a written, mechanically checkable contract that outlives any single session. ## Core Features & Use Cases - Guided constraint interview: Asks four questions with sane defaults, detects your stack from package.json, pyproject.toml, and CI config, then writes a CONSTRAINTS.md with numbered thresholds for coverage, security, performance, and accessibility. - Tool-backed enforcement: Maps each dimension to a de facto tool (tsc, Semgrep, gitleaks, osv-scanner, Lighthouse, axe-core, Stryker) with install commands, run commands, and lifecycle placement from edit loop to CI. - Bar-weakening guards: Watches diffs for lowered thresholds, silenced checkers, skipped tests, stubs, and unauthorized exceptions, with a reference floor-guard implementation. - Use Case: Before running an autonomous build loop on a TypeScript web app, use this Skill to record an 80% changed-line coverage gate, zero high-severity dependency vulnerabilities, and LCP under 2500ms, so the agent cannot ship code that fails your standards. ## Quick Start Ask the agent to set up project constraints and quality gates for this repository, then let it interview you and write CONSTRAINTS.md.

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 checks it, and AGENTS.md or CLAUDE.md points agents at the file.

What coverage threshold should I set for a project?▼

The default is 80% coverage on changed lines, which forces a test without blocking config-only edits. If your codebase is below that today, record the current value as a ratchet that must not fall instead of setting a number the build fails immediately.

Which tools enforce security and performance constraints?▼

Security uses Semgrep for code findings, gitleaks with --redact for secrets, and osv-scanner for dependency vulnerabilities. Performance uses Lighthouse for LCP and CLS budgets and size-limit for bundle bytes, while accessibility uses axe-core against a running preview URL.

How do I stop an agent from weakening tests or lint rules?▼

Watch the diff at review time for five moves: lowered thresholds, skipped or deleted tests, new suppression comments like @ts-ignore or nosemgrep, unimplemented stubs, and unauthorized exceptions. A reference floor-guard implementation in references/floor-guard.md automates these diff-scoped checks.

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 skip the interview if a CONSTRAINTS.md already exists and is not changing — just read and follow it instead.