constraint-driven-developmentcommit ba3d99eSKILL.md · Code Standards
Constraint-Driven Development
Writes a project's quality bar down as a CONSTRAINTS.md contract and watches diffs for a quietly weakened bar.
The interview needs a live user; in CI or unattended runs only the floor applies, and gitleaks must run with --redact.
npx skills add addyosmani/agent-skills --skill constraint-driven-developmentCommand selected. Copy it manually.
- Permissions
- read-repo
- write-files
- shell
- network
- Compatible with
- Claude Code, Codex, Cursor, Copilot, Gemini CLI
- GitHub
- 112.3k
- Source
- Community · Addy Osmani
- Status
- Scan passed
- License
- MIT
- Category
- Code Standards
Core rule
Never weaken CONSTRAINTS.md to make a change pass.
Execution Phases
Phase 01Detect before asking
Read the existing tests, lint and CI config first; never ask what can be read.
Phase 02Four questions with defaults
Ask one at a time which dimensions to enforce, block or warn, and target numbers, each with a default.
Phase 03Write and install
Write CONSTRAINTS.md, add one line to AGENTS.md and CLAUDE.md, and wire in the checker each dimension needs.
Phase 04Guard the bar
Check the diff for lowered thresholds, skipped or deleted tests, new @ts-ignore or eslint-disable, and unfinished stubs.
Permissions (summarised from SKILL.md)
| Capability | Needed | Details |
|---|---|---|
| File writes | Required | Writes CONSTRAINTS.md, check scripts and tool config, and adds one line each to AGENTS.md and CLAUDE.md. |
| Command execution | Limited | Installs and runs the checkers for chosen dimensions (such as gitleaks, osv-scanner, Semgrep, Lighthouse, axe), scoping expensive ones to the diff. |
| Network outbound | Limited | Used to install checkers and read external sources such as vulnerability databases. |
SKILL.md frontmatter (YAML)
---
name: constraint-driven-development
description: Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read.
---