constraints
Write the repository's quality bar as CONSTRAINTS.md. Use when the user asks for constraints, standards, or quality gates, when no CONSTRAINTS.md exists and a quality bar is wanted, or when a change silences a check or skips a test to reach green.
- License 许可
- MIT
- 最近更新
- 2026-10-30
- Stars
- ★ 1
- Forks
- 1
01 前言 Front Matter
- name
- constraints
- description
- Write the repository's quality bar as CONSTRAINTS.md. Use when the user asks for constraints, standards, or quality gates, when no CONSTRAINTS.md exists and a quality bar is wanted, or when a change silences a check or skips a test to reach green.
02 资源文件 1
- 参考文档references/constraints-template.md2.5 KB
03 SKILL.md 正文
Constraints
A quality bar is a short file of rules that a command can check. The Floor never weakens, numeric rules each name their command, and everything else is measured and held.
Rules
- Detect before asking: read manifests, CI config, and existing linters first. Ask at most four questions, one per turn, each with a
GUESS:and aDEFAULT:. - A non-interactive run applies only the Floor and says so.
- Every numeric rule names the command that checks it and when it runs. No command, no rule. Never invent a number the user or a measurement did not give; each threshold states its reason.
- Install nothing without consent. List each dimension's cost (time, tool, URL needed) so the user can choose.
- Loosening a threshold, dropping a severity, or silencing a checker is the user's decision, and it is reported, never done quietly.
- At least one constraint is external to the code under test (a scanner, a browser, a vulnerability database), so the project cannot grade itself.
Floor (always on)
- No new suppressions of type, lint, or security checks.
- No skipped or deleted tests without a stated reason.
- No stubs, throw-not-implemented bodies, or empty catch blocks.
- No credentials in the repository.
- No weakening of
CONSTRAINTS.md.
Construct backs the Floor with hooks. The Risk-line gate blocks a reply when added lines carry skipped, focused, or stub test markers. command-guard denies verifier bypasses such as git commit --no-verify. Neither reads CONSTRAINTS.md, so the file still holds the rules those hooks do not see.
Flow
- Detect the stack, existing checks, and CI.
- Ask the remaining questions, one per turn, defaults offered. With no numbers given, measure today's value and hold it (a ratchet), and drop any dimension that needs a URL the project lacks.
- Defaults when the user has no preference: coverage and security. Block on the Floor, warn on the rest for two weeks, then measure and hold.
- Write. After the user answers, one
construct:workerwritesCONSTRAINTS.mdfromreferences/constraints-template.mdand adds a one-line pointer to it in the repository's agent instructions file. - Save each quality-bar decision with
mem_save, usingtopic_keyquality/<rule>.
When a change silences a check or skips a test, stop: fix the cause, or ask the user whether to change the rule. Do not edit the rule yourself.
Reference
references/constraints-template.md: the file template, default thresholds with reasons, tools, and exceptions.
04 同仓库更多 Skills
workflow
The ADD protocol for every implementation request, feature plan, resume, task sizing, and the closing Risk line.
sources
Ground version-dependent code in official documentation. Use when you name a specific uncertainty about a library or framework API, a version-dependent pattern, or a deprecation. Skip when the repository already shows the pattern.
review
Mandatory outside review of high-risk work units, by lens agents the hooks feed and record, plus the dual blind review on request. Trigger: a unit whose Risk names an item is ready to publish, the publication gate denied a push, PR, or release, or the user asks for a review, a dual review, or an adversarial review.
migration
Plan and verify risky migrations and removals. Use when changing a schema or stored data, removing or renaming a public API, flag, config format, or export, replacing a system, or when the task's Risk names item 1 or 3.
delivery
Plan commits, branches, and pull requests as reviewable units. Use when deciding commit contents, opening or preparing a PR, splitting large work into sub-branches of a feature branch, or preparing a release.
delegation
When and how the ADD orchestrator delegates to construct agents: role mapping, allowed edit surfaces, parallel writers, verifier timing, handoff prompts, and relaying a subagent's blocking question or choice menu. Trigger: deciding to delegate, launching an agent, writing a handoff, or a subagent or tool returns a question, menu, or consent request.