मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग107k · #766

constraint-driven-development

यह क्या करती है

यह टूल आपके प्रोग्रामिंग प्रोजेक्ट के लिए गुणवत्ता का एक "कॉन्ट्रैक्ट" बनाता है। यह साफ़ नियम तय करता है कि क्या स्वीकार्य है, जैसे टेस्ट कवरेज या बिना एरर के रहना, और यह सुनिश्चित करता है कि ये नियम अपने-आप माने जाएँ, ताकि कोड की गुणवत्ता चुपचाप गिर न जाए।

कब इस्तेमाल करें

  • ✓नया प्रोजेक्ट या कोई बड़ा फीचर शुरू करते समय।
  • ✓जब आप चाहते हैं कि AI एक तय गुणवत्ता मानक का पालन करे।
  • ✓जब AI द्वारा बनाया कोड इतना ज़्यादा हो कि हाथ से जाँचना मुश्किल हो।

Skill का लिंक

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

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/addyosmani/agent-skills/blob/main/skills/constraint-driven-development/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस प्रोजेक्ट के लिए गुणवत्ता मानक सेट करो, जिसमें टेस्ट कवरेज और सुरक्षा नियम शामिल हों।”

हर हफ़्ते 5 नई skills, 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.

…

अक्सर पूछे जाने वाले सवाल

"फ़्लोर" क्या है?

"फ़्लोर" न्यूनतम नियमों का सेट है जो हमेशा लागू रहता है, भले ही आप और नियम तय न करें। उदाहरण के लिए, एरर को अनदेखा करने वाली टिप्पणियाँ या अधूरा छोड़ा गया कोड अनुमति नहीं है।

सामान्य नियमों की जगह संख्याएँ क्यों इस्तेमाल करें?

"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
अपडेट की गई
13/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

api-and-interface-design

107k

अच्छी तरह परिभाषित APIs और interfaces डिज़ाइन करने में मदद करता है। सॉफ्टवेयर के अलग-अलग हिस्से आपस में कैसे बात करेंगे, यह तय करते समय उपयोगी है।

कोडिंगAPI और सर्वर (backend)

browser-testing-with-devtools

107k

आपके एजेंट को असली browsers में सीधे code टेस्ट करने में मदद करता है। जिस माहौल में चीज़ इस्तेमाल होगी, वहाँ वह कैसे चलती है यह जाँचने और errors व performance की समस्याएँ ढूंढने के लिए उपयोगी है।

कोडिंगटेस्टिंग

ci-cd-and-automation

107k

आपके AI एजेंट को दोहराए जाने वाले काम अपने-आप करना, प्रोजेक्ट्स शिप करना और इंफ्रास्ट्रक्चर मैनेज करना सिखाता है।

प्रोडक्टिविटीऑटोमेशन

code-review-and-quality

107k

कई पहलुओं पर detailed code reviews करता है। नए changes merge करने से पहले quality सुनिश्चित करने और आगे की समस्याएँ रोकने के लिए उपयोगी है।

कोडिंगटेस्टिंग

मिलती-जुलती skills