# /constraint-driven-development: Write down your quality bar and stop agents quietly lowering it

Source: https://trendhub.net/skills/addyosmani-agent-skills/constraint-driven-development
Skill folder: https://github.com/addyosmani/agent-skills/tree/main/skills/constraint-driven-development
Pack: Addy Osmani's Agent Skills (https://trendhub.net/skills/addyosmani-agent-skills)
Works with: Claude Code, Any agent via the skills CLI, Codex, Gemini CLI, Antigravity CLI, Command Code

This skill turns a project's standards into a CONSTRAINTS.md file with real numbers and the command that checks each one. It asks at most four questions, each with a default, installs the tools behind every chosen dimension, places checks by how long they take, and watches diffs for the shortcuts agents use to turn a red check green.

## When to use it

- A project has no written standard and agents now produce more code than anyone reads.
- CI runs checks but nobody knows which ones actually block a merge.
- You are about to let an agent run autonomously and want more than its own tests standing guard.

## How it works

1. **Detect first**: The agent reads the stack, test runner, linters, current coverage, CI and agent config before asking you anything.
2. **Ask four questions**: It asks which dimensions to enforce, whether failures block or warn, whether to measure today's numbers, and the slowest check you will tolerate, offering a default for each.
3. **Write CONSTRAINTS.md**: It records a floor, numbered rules with the command behind each, measured-only metrics with a direction, and an exceptions table with owners and expiry dates.
4. **Install and place checks**: It installs established tools such as gitleaks, osv-scanner, Lighthouse or axe and assigns cheap checks to every edit and slow ones to CI.
5. **Guard the bar**: At review it compares the diff for lowered thresholds, skipped or weakened tests, new suppression comments, stubs and unexplained exceptions.

## What it steers the agent away from

- Coverage or performance targets that the codebase already fails, which teach the team to ignore red builds
- Agents adding @ts-ignore, eslint-disable or .skip to get a passing run
- Slow scanners in the edit loop that end with people passing --no-verify

## What it can touch

Reads project config and CI files, writes CONSTRAINTS.md and a pointer line in AGENTS.md or CLAUDE.md, installs dev tools and package scripts, and runs scanners and test suites; gitleaks is always run with redaction so secrets do not reach the transcript.

## Pairs well with

- `/ci-cd-and-automation`
- `/code-review-and-quality`
- `/test-driven-development`

## Questions

### What if I have no target numbers?

The skill records where the project stands today and treats that as a ratchet: the number may improve but any drop is reported as a finding.

### Can it run in CI or an unattended loop?

The interview needs a person, so in non-interactive runs it applies only the floor rules, says so, and leaves the rest for a human.
