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.svg" alt="Measured on agentmods" 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 | $0.00029 | $0.00502 |
| Sonnet 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 6d 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.
- 6d 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 2mo ago), licensed MIT. It adds 58 tokens to every session and 1,005 once invoked, about $0.0003 per session on Opus 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.
Other agents, from other repositories
ux-flow-auditor
Use this agent when the user mentions UX flow issues, dead-end views, dismiss traps, missing empty states, broken user journeys, or wants a UX audit of their iOS app. Automatically scans SwiftUI and UIKit code for user journey defects - detects dead ends, dismiss traps, buried CTAs, missing loading/error/empty states…
Design System Auditor
Design system accessibility auditor. Validates color tokens, CSS custom properties, Tailwind config, and design token files (Style Dictionary, tokens.json) for WCAG AA/AAA contrast compliance. Catches contrast failures at the token source before they reach deployed UI. Also validates focus ring tokens (WCAG 2.4.13…
ijfw-accessibility-reviewer
Design-phase WCAG 2.1 AA review of UI artefacts: contrast, semantics, focus, ARIA. Trigger per design review pass.
slide-auditor
Visual layout auditor for RevealJS and Beamer slides. Checks for overflow, font consistency, box fatigue, and spacing issues. Use proactively after creating or modifying slides.
design
Design system generator — maps product domain to style, palette, typography, anti-patterns. Creates .rune/design-system.md. Use BEFORE any frontend code generation.
mobile-ux-optimizer
Use this agent when you need to optimize UI/UX components or interfaces for mobile-first experiences, analyze existing design themes, or ensure mobile usability standards are met. Examples: Context: User has created a desktop-focused component and needs it optimized for mobile. user: 'I've built this navigation…