본문으로 건너뛰기
Skillpedia
일반 코딩107k · #766

constraint-driven-development

하는 일

프로그래밍 프로젝트를 위한 품질 "계약"을 만듭니다. 테스트 커버리지나 오류 없음처럼 허용되는 기준을 명확히 정의하고, 이 규칙이 자동으로 지켜지도록 해서 코드 품질이 몰래 떨어지는 것을 막습니다.

사용하는 경우

  • ✓새 프로젝트나 중요한 기능을 시작할 때.
  • ✓AI가 정의된 품질 기준을 유지하도록 하고 싶을 때.
  • ✓AI가 생성한 코드의 양이 많아 수동 검토가 어려운 경우.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/addyosmani/agent-skills/blob/main/skills/constraint-driven-development/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“테스트 커버리지와 보안 규칙을 포함해 이 프로젝트의 품질 기준을 설정해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 먼저 프로젝트에 이미 있는 것(테스트 및 린팅 도구 등)을 확인합니다. 그다음 몇 가지 간단한 질문으로 품질 규칙을 정합니다. 어떤 점검이 중요한지, 실패가 작업을 막아야 하는지 아니면 경고만 해야 하는지 묻습니다. 마지막으로 이 규칙을 CONSTRAINTS.md라는 파일에 저장하고, 규칙이 깨지지 않도록 코드를 지켜봅니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.

…

자주 묻는 질문

'floor'란 무엇인가요?

'floor'는 다른 규칙을 정하지 않아도 항상 적용되는 최소 품질 규칙입니다. 오류를 무시하는 주석을 허용하지 않거나 미완성 코드를 남기지 않는 것 등이 예입니다.

왜 일반적인 규칙 대신 숫자를 사용하나요?

'80% 테스트 커버리지' 같은 숫자는 규칙을 객관적으로 만들고 자동으로 확인하기 쉽게 합니다. 논쟁을 피하고 모두가 무엇을 기대하는지 정확히 알게 해 줍니다.

규칙이 깨지면 어떻게 되나요?

규칙이 어떻게 설정되었느냐에 따라, 도구는 위반을 경고하거나 문제가 해결될 때까지 작업을 막을 수 있습니다. 이렇게 정한 품질이 유지되도록 합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
107k
순위
#766
라이선스
MIT
업데이트
2026. 10. 13.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬