constraint-driven-development

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

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

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 green. This Skill turns your project's quality bar into a written, mechanically enforced contract that outlives any single session. ## Core Features & Use Cases - Structured constraint interview: Four questions with sane defaults capture which dimensions matter (coverage, security, performance, accessibility, architecture) and produce a working config even when the user has no numbers in mind. - CONSTRAINTS.md generation: Writes a repo-root contract with an always-enforced floor, numbered dimensions mapped to de facto tools (Semgrep, gitleaks, osv-scanner, Lighthouse, axe-core), ratchets for unenforced metrics, and tracked exceptions with owners and expiry dates. - Floor guard reference implementation: Ships a diff-scoped Node script that detects the five bar-lowering moves — weakened thresholds, easier tests, silenced checkers, unfinished stubs, and surprise exceptions — with clean exit codes. - Use Case: Before running an autonomous build loop on a TypeScript project, use this Skill to interview the team, write CONSTRAINTS.md with an 80% changed-line coverage gate and security scanning, and wire fast/task/full check stages into the lifecycle so the agent cannot ship code that lowers the bar. ## Quick Start Ask the agent to set up quality constraints for this project and write a CONSTRAINTS.md with enforced coverage and security gates.

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 structured interview to pick which dimensions matter — coverage, security, performance, accessibility — then write them into a CONSTRAINTS.md file at the repo root with concrete thresholds and the exact command that checks each one. Wire fast checks into the edit loop and full checks into CI.

What coverage threshold should I set for a legacy codebase?

Use a ratchet instead of a fixed number: record today's measured coverage in a 'Measured, not yet enforced' table and require that it never falls. Setting 80% on a codebase at 62% produces a permanently red build that teams learn to ignore.

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

Enforce a diff-scoped floor guard that scans added lines for suppression comments like @ts-ignore, eslint-disable, and nosemgrep, plus skipped tests, removed assertions, and unimplemented stubs. The skill ships a reference Node implementation with exit codes 0, 1, and 2.

Which tools should enforce security and performance constraints?

Use de facto tools rather than hand-rolled checkers: 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 where only the basic floor is worthwhile. Also skip the interview in non-interactive contexts like CI or autonomous loops — apply the floor and flag the rest for a human.