Zum Inhalt springen
Skillpedia
Allgemeines Programmieren107k · #766

constraint-driven-development

Was er macht

Dieses Tool erstellt einen Qualitäts-„Vertrag“ für dein Programmierprojekt. Es legt klare Regeln fest, was akzeptabel ist, zum Beispiel Testabdeckung oder fehlerfreier Code, und sorgt dafür, dass diese Regeln automatisch eingehalten werden. So wird die Codequalität nicht unbemerkt schlechter.

Wann du ihn nutzt

  • ✓Wenn du ein neues Projekt oder ein größeres Feature startest.
  • ✓Wenn du sicherstellen willst, dass die KI einen festgelegten Qualitätsstandard einhält.
  • ✓Wenn die Menge des von der KI erzeugten Codes zu groß für eine manuelle Prüfung ist.

Link zum Skill

https://github.com/addyosmani/agent-skills/blob/main/skills/constraint-driven-development/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/addyosmani/agent-skills/blob/main/skills/constraint-driven-development/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Lege die Qualitätsstandards für dieses Projekt fest, inklusive Testabdeckung und Sicherheitsregeln.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Das Tool prüft zuerst, was in deinem Projekt schon vorhanden ist (zum Beispiel Test- und Linting-Werkzeuge). Dann stellt es dir ein paar einfache Fragen, um die Qualitätsregeln festzulegen, etwa welche Prüfungen wichtig sind und ob fehlgeschlagene Prüfungen die Arbeit blockieren oder nur eine Warnung auslösen sollen. Schließlich speichert es diese Regeln in einer Datei namens CONSTRAINTS.md und überwacht den Code, damit die Regeln nicht verletzt werden.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

Constraint-Driven Development

Overview

Other skills in this pack describe what good looks like. code-review-and-quality gives you five axes. test-driven-development gives you a cycle. security-and-hardening gives you a threat list. All of that lives in prose the agent reads and may or may not follow, and none of it survives the end of the session.

This skill produces something different: a written record of this project's bar, with numbers, that outlives the conversation and can be checked mechanically.

The reason matters. When you wrote the code, reading it told you whether it was any good. An agent writes more in an afternoon than you will read that week, so the judgement moves out of your head and into checks that run around the loop. Those checks need to exist, they need numbers you actually chose, and they need to fire close enough to the work that the agent fixes its own output.

Spec-driven development says what to build. Test-driven development proves it works. Constraint-driven development defines what "good enough to ship" means, before anyone argues about it in a pull request.

When to Use

Apply this skill when:

  • Starting a project or a significant feature and no quality bar is written down
  • The user asks to "set up constraints", "add quality gates", "define our standards", or "stop the agent shipping junk"
  • An agent is producing volume nobody is reading line by line
  • CI has checks but nobody can say which ones block a merge and which ones are decoration
  • Coverage, performance, or accessibility numbers get argued about per-PR instead of decided once
  • You're about to run /build auto or any autonomous loop, and the only thing standing between it and main is a test suite the agent also wrote

When NOT to use:

  • The project already has a CONSTRAINTS.md and the user isn't changing it — read it and follow it instead
  • One-off scripts, spikes, throwaway prototypes
  • The user wants a code review right now (code-review-and-quality) or a CI pipeline built (ci-cd-and-automation)
  • Pre-product-market-fit code with a two-week expected lifetime — the floor below is still worth it, the rest isn't

Loading Constraints

The interview needs a live user. Don't run it in non-interactive contexts (CI, /loop, autonomous runs). If constraints are missing and you're in one of those, apply the Floor below, note that you did, and flag the rest for a human.

The Process

Step 1: Detect before you ask

Never ask what you can read. Before the first question, gather:

What Where to look
Language and stack package.json, pyproject.toml, go.mod, Cargo.toml
Test runner dev dependencies, test script, existing test files
Existing linters eslint.config.*, biome.json, .ruff.toml
Coverage today coverage/ output, or run the suite once
CI .github/workflows/, .gitlab-ci.yml
Agent harness .claude/, .codex/, AGENTS.md

Report what you found in two lines, then ask only what's left.

Step 2: Four questions, each with a default

Follow the one-question-at-a-time discipline from interview-me, with one change: every question here has a default, so "I don't know" is a complete answer that still produces a working config.

Q1: Beyond the floor, which of these do you want enforced?
    (a) Test coverage on new code
    (b) Security scanning
    (c) Performance budgets
    (d) Accessibility
    (e) Architecture boundaries
GUESS: (a) and (b) — you have a test runner already and you're handling user input.
DEFAULT if unsure: (a) and (b).
Say what each pick costs: (c) and (d) need a running URL, (e) needs a rules file written.
Q2: When a check fails while the agent is mid-task, should it block or warn?
GUESS: Block. You're running agents unattended and a warning nobody reads is a warning.
DEFAULT if unsure: Block on the floor, warn on everything else for the first two weeks.
Q3: Do you have target numbers in mind, or should I measure where you are today and hold that line?
GUESS: Measure. Most teams don't have a number, and an invented one gets ignored.
DEFAULT if unsure: Measure and hold. See "Ratchets" below.
Q4: What's the slowest check you'll tolerate before the agent hands work back?
GUESS: About 90 seconds. Longer and you'll stop running it.
DEFAULT if unsure: 90 seconds at task end, unlimited in CI.

…

Häufige Fragen

Was ist der „Floor“?

Der „Floor“ (Untergrenze) besteht aus den minimalen Qualitätsregeln, die immer gelten, auch wenn du keine weiteren festlegst. Beispiele sind das Verbot, Fehler zu ignorieren, oder unfertigen Code zu hinterlassen.

Warum Zahlen statt allgemeiner Regeln?

Zahlen (etwa „80 % Testabdeckung“) machen die Regeln objektiv und lassen sich automatisch prüfen. So gibt es keine Diskussionen, und alle wissen genau, was erwartet wird.

Was passiert, wenn eine Regel verletzt wird?

Je nachdem, wie die Regeln konfiguriert wurden, kann das Tool vor dem Verstoß warnen oder die Arbeit blockieren, bis das Problem behoben ist. So bleibt die festgelegte Qualität erhalten.

Details

Originalbeschreibung des Autors

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, unimplement

repo: addyosmani/agent-skills

Beliebtheit

GitHub-Sterne
107k
Platz im Ranking
#766
Lizenz
MIT
Aktualisiert
13.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills