constraint-driven-development

Establishes and enforces a written quality bar in CONSTRAINTS.md with diff-scoped checks.

Updated Sep 5, 2026
One-click install
npx skills add https://github.com/pohlai88/afenda-xforge-v5 --skill constraint-driven-development-pohlai88
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: constraint-driven-development
Source: https://github.com/pohlai88/afenda-xforge-v5/tree/main/.agents/skills/constraint-driven-development
Command: npx skills add https://github.com/pohlai88/afenda-xforge-v5 --skill constraint-driven-development-pohlai88

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? AI 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 turns a project's quality expectations into a versioned, machine-checkable contract that outlives any single session. ## Core Features & Use Cases - Constraint Interview & Defaults: Runs a four-question intake with sane defaults, then writes a CONSTRAINTS.md covering the floor rules, enforced dimensions with numbers, measured ratchets, and tracked exceptions. - Tool Wiring & Lifecycle Placement: Maps each dimension (types, lint, coverage, security, performance, accessibility) to a de facto tool like Semgrep, gitleaks, osv-scanner, Lighthouse, or axe, and assigns checks to fast, task, and CI stages. - Floor Guard: Ships a reference implementation that scans the git diff for the five bar-lowering moves — lowered thresholds, weakened tests, new suppressions, unfinished stubs, and surprise exceptions. - Use Case: Before running an autonomous build loop on a TypeScript repo, use this Skill to record an 80% changed-line coverage gate, block new eslint-disable comments, and catch any agent attempt to relax the bar in review. ## Quick Start Ask the agent to set up project constraints and define our quality standards in CONSTRAINTS.md for this repository.

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 AI coding agents?

Run a short interview to pick enforced dimensions, then write them into a CONSTRAINTS.md at the repo root with numbers, the command that checks each, and where it runs. Point AGENTS.md or CLAUDE.md at the file so every agent reads it before writing code.

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

Enforce a diff-scoped floor guard that flags new suppression comments like @ts-ignore, eslint-disable, and nosemgrep, plus added .skip calls, deleted test files, and removed assertions. The reference implementation exits 1 on any violation so the change is blocked.

What coverage threshold should I set for an existing codebase?

Use a ratchet instead of a fixed number: record today's coverage in a measured table and refuse to let it fall, while requiring 80% coverage only on changed lines. Setting a number the codebase fails today just trains the team to ignore red builds.

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 dependencies, 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 floor rules are worth keeping. Also skip the interview in non-interactive contexts like CI, where you apply the floor and defer the rest to a human.