constraint-driven-development
Enforces constraint-driven software development by identifying and locking operational, architectural, and runtime boundaries before writing implementation code. Use when designing robust systems under tight performance, resource, or security constraints.
1How It Works & Mechanism
Explicit constraint inventory creation covering latency, memory, concurrency, and security bounds.
This skill produces something different: a written record of **this project's** bar, with numbers, that outlives the conversation and can be checked mechanically.
Failure mode and effects analysis (FMEA) for identified constraints.
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` |
Automated boundary assertions embedded directly into interface definitions.
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.
Strict trade-off evaluation matrix comparing architectural options against hard constraints.
## Floor (always enforced, no setup required) - No new suppression comments: `@ts-ignore`, `eslint-disable`, `# noqa`, `# type: ignore` - No unimplemented stubs: `throw new Error("Not implemented")`, empty `catch {}` - No skipped or deleted tests without a reason in the commit message - No secrets in source - This file does not get weakened to make a change pass
Invariant verification checklists for runtime validation.
Every row names the command that produces the verdict. A dimension with a number and no command in this column is an aspiration, not a constraint.
提供配套的质量门禁脚本 quality-gate.mjs,严格拦截 Semgrep/Axe 的高危与严重漏洞
if (tool === 'semgrep') { if (!Array.isArray(report?.results) || !Array.isArray(report.errors) || report.errors.length || !Array.isArray(report.paths?.scanned) || !report.paths.scanned.length) { throw new Error('Incomplete scan'); } levels = report.results.map(finding => finding?.extra?.severity); allowed = ['INFO', 'WARNING', 'ERROR', 'LOW', 'MEDIUM', 'HIGH', 'CRITICAL']; blocking = ['ERROR', 'HIGH', 'CRITICAL'];
提供差异级底线防护守卫脚本 floor-guard,基于 git diff 监控是否偷偷削弱质量标准
// floor-guard.mjs — diff-scoped enforcement of the CONSTRAINTS.md floor. // Usage: node floor-guard.mjs [--base <ref>] (default base: origin/main) import { execFileSync } from 'node:child_process';
2Core Capabilities
4Recommended Governance & Evidence
5Second-Pass Verification
- [ok] quality-gate.mjs 本地脚本执行安全核验 — 阅读 46 行 quality-gate.mjs 脚本,仅包含本地 JSON 报告解析与 exit code 返回逻辑,无外部网络请求
- [ok] floor-guard.md 参考脚本行为核验 — 脚本通过 execFileSync 执行本地 git diff,分析差异文本中的压制关键字,属于纯本地只读分析
- [ok] CONSTRAINTS.md 契约格式核实 — SKILL.md 第 125-166 行完整展示了标准契约模板,含 Floor、Enforced with numbers、Measured 及 Exceptions
- [ok] 4 步访谈法机制核实 — SKILL.md 第 85-120 行明确限定为 4 个带有开箱即用默认猜测的问题,控制访谈复杂度
- [ok] 档位判定 blue 确认 — Skill 自身目录携带 scripts/quality-gate.mjs 可执行脚本并建议配置到本地工程执行,准确落入 blue 档位
6Verdict & Scenarios
Preview this skill in an interactive chat playground. Generic LLM evaluation trial.
💬 Open Chat Trial (Preview)