constraint-driven-development

Establishes and enforces project quality constraints via a written CONSTRAINTS.md contract.

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

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 the diff against attempts to weaken it. ## Core Features & Use Cases - Constraint Interview & Defaults: Runs a four-question intake with sane defaults (coverage, security, performance, accessibility) and writes the answers into CONSTRAINTS.md with a stated reason for every number. - Tool-Backed Enforcement: Maps each dimension to a de facto checker (tsc, eslint, gitleaks, Semgrep, osv-scanner, Lighthouse, axe-core, Stryker) and wires them into fast/task/CI stages scoped to the diff. - Floor Guard: Ships a reference implementation that scans the diff for new suppressions, skipped tests, removed assertions, stubs, lowered thresholds, and untracked exceptions. - Use Case: Before running an autonomous build loop on a TypeScript repo, use this Skill to define an 80% changed-line coverage gate, block new eslint-disable comments, and ratchet project coverage so it can never fall. ## Quick Start Ask the agent to set up quality constraints for this project and write them into CONSTRAINTS.md with enforced coverage and security checks.

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 rule with a number, a checking command, and a run stage in a CONSTRAINTS.md file at the repo root. Point AGENTS.md or CLAUDE.md at the file so every agent reads it before writing code.

What coverage threshold should I set for a project?

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

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

Use a diff-scoped floor guard that flags new suppression comments (@ts-ignore, eslint-disable, noqa), added .skip calls, deleted test files, removed assertions, and unimplemented stubs. The skill ships a reference Node implementation with exit codes 0/1/2 that you adapt per stack.

Which tools enforce security and performance constraints in CI?

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/CLS budgets, and axe-core for accessibility violations. Each runs at a defined stage so slow checks stay out of the edit loop.

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 where only the minimal floor is worthwhile. Also don't rerun the interview if a CONSTRAINTS.md already exists and isn't changing — just read and follow it.