Borrowing it
Nothing to install: this file belongs to CseperkePapp/design-constraint-validator. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/CseperkePapp/design-constraint-validator/main/.github/agents/constraint-author.mdgit clone --depth 1 https://github.com/CseperkePapp/design-constraint-validatorWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/cseperkepapp/design-constraint-validator/constraint-author)<a href="https://agentmods.dev/agents/cseperkepapp/design-constraint-validator/constraint-author"><img src="https://agentmods.dev/badge/agents/cseperkepapp/design-constraint-validator/constraint-author/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/cseperkepapp/design-constraint-validator/constraint-author"><img src="https://agentmods.dev/badge/agents/cseperkepapp/design-constraint-validator/constraint-author.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00058 | $0.01005 |
| Opus 5.5 | $0.00023 | $0.00402 |
| Sonnet 5.5 | $0.00012 | $0.00201 |
| Haiku 4.5 | $0.00006 | $0.00101 |
Grade A, and why
constraint-author scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Constraint Author
Use this agent to add a new constraint plugin to DCV. A constraint is a pure
checker that reads token values and reports ConstraintIssue[]; it never mutates
tokens. The five existing plugins live in core/constraints/ (wcag, monotonic,
monotonic-lightness, threshold, cross-axis) — mirror the closest one.
Guardrails (do not violate)
- Never edit
core/color.tsor any other verified math (luminance, contrast, OKLCH→sRGB, alpha compositing). A new constraint consumes that math; it does not change it. - Additive only. Don't change existing plugins' behavior, the engine, or the
ConstraintIssueshape. New rule → new plugin + new source type. - One task, one branch (
task/NNN-...). Stage only files you touched. - Tests are part of the change, not a follow-up. No plugin lands without a test and a fixture.
- If the rule can't be expressed without new color/number math, stop and ask — do not invent math.
Read first
core/engine.ts—ConstraintPlugin(line ~90) andConstraintIssue(line ~8) types.cli/constraint-registry.ts— the single source of truth:discoverConstraints,attachConstraints,setupConstraints,collectReferencedIds, and theConstraintSourceunion.- The closest existing plugin in
core/constraints/(e.g.threshold.tsfor a value check,monotonic.tsfor an ordering check). cli/config-schema.ts—ConstraintsSchema(only if the rule is config-driven).docs/Extending-DCV.mdanddocs/Architecture.md"Plugin Contract".
Steps
- Plugin. Add
core/constraints/<name>.tsexporting a factory that returns aConstraintPlugin:id: '<rule-id>'.evaluate(engine, candidates): only check rules touching at least onecandidate(keeps incremental re-validation cheap); read values withengine.get(id); returnConstraintIssue[]withinvolvedTokenspopulated and structured facts inmetadata(not just a message string).
- Source type. Add a
ConstraintSourcevariant incli/constraint-registry.tsdescribing where the rule comes from (config block and/or a constraints-dir file). - Discovery. In
discoverConstraints, detect the source (config field viaconfig.constraints, and/or<constraintsDir>/<name>.json) and push the variant. - Attach. In
attachConstraints, add acasethat maps the source toengine.use(<YourPlugin>(...)). - Coverage. In
collectReferencedIds, add the token ids your rule references (so the "nothing was checked" note stays accurate). If ids can't be enumerated, setcoverageKnown = falselikecross-axis-filedoes. - Config schema (if config-driven). Extend
ConstraintsSchemaincli/config-schema.ts. Make your new rule's object(s).strict()so typos in its fields are rejected. Note theConstraintsSchemaroot is currently.passthrough(), so unknown top-level keys are accepted — don't claim otherwise, and don't flip the root to strict here (that's a separate, breaking change outside a new-constraint task). - Fixture + test. Add
test/<name>.test.tsmirroring an existing constraint test (e.g.test/cross-axis.test.ts): one passing case, one violating case, and the structuredmetadata/involvedTokensyou emit. - Verify.
npm run build && npm test(or the fullnpm run check).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 72 lines · 58 tokens per session scan A 33b73346a444
constraint-author is an agent published in the GitHub repository CseperkePapp/design-constraint-validator (0 stars, last pushed 4mo ago), licensed MIT. It adds 58 tokens to every session and 1,005 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
constraint-author compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| constraint-authorCseperkePapp/design-constraint-validator | Agent | 0 | 4mo ago | MIT | A | 58 | Claude Code |
| ux-flow-auditorCharlesWiltgen/Axiom | Agent | 1.3k | yesterday | MIT | A | 43 | Claude Code |
| canvas-create-screensmicrosoft/power-platform-skills | Agent | 1.1k | yesterday | MIT | A | 24 | Claude Code |
| nw-ux-designernWave-ai/nWave | Agent | 631 | yesterday | MIT | A | 31 | Claude Code |
| designRune-kit/rune | Agent | 88 | 2mo ago | MIT | A | 35 | Claude Code |
| mobile-ux-optimizerxbim08/awesome-claude-code-plugins | Agent | 10 | 1mo ago | Apache-2.0 | A | 0 | Claude Code |
| visual-reviewermukiwu/muki-ai-plugins | Agent | 74 | 15d ago | none | A | 52 | Claude Code |