Short Mandatory Rule Checklist
Stores short, versioned “never / always / required check” rules matched by scope so agents actually follow them.
An agent runs tests, passes, then makes "one tiny last-second tweak" and commits broken code without re-testing.
Constraints sees a file changed after the last test run and refuses completion until fresh tests run.
What It Does (In Plain English)
Long 3-page system prompts cause LLMs to overlook critical constraints. Constraints keeps short, crisp single-line rules (max 240 characters each: never, always, required_check, split_rule), injects only the rules relevant to the current task scope, and enforces afterLastMutatingTool checks so stale test results cannot pass after a late edit.
Real-World Example
- 1You register a rule:
required_check: repo.run_tests (afterLastMutatingTool: true). - 2Agent passes tests, then edits
money.jsone more time and tries to finish. - 3Constraints blocks completion (
TASK_CRITERIA_UNMET) until tests re-run on the final edit.
When Should You Turn It On?
Add at Level 1 (review) or above whenever you have crisp non-negotiable rules or freshness checks.
Safety level note: Level 1 · Review — Read-only. Can inspect and answer, never changes outside systems.
How to Add It (workspace.yaml)
kits:
- "@neusym/kit-constraints@0.1.0"
domain:
seeds:
versionedConstraintSets:
- name: core
activate: true
entries:
- id: fresh-tests
kind: required_check
text: "Re-run tests after any file edit"Kits It Works With
Technical Details & Configuration Options (1 settings)
| Package | @neusym/kit-constraints |
|---|---|
| Provides Ports | constraints@1 |
| Requires Ports | None |
| Optional Ports | tasks@1 |
| Publishes Events | constraints.changed |
| Owned DB Collections | constraint_sets |
Configuration Options (kitConfigs.constraints)
| Setting | Type | Default | Description |
|---|---|---|---|
staticSets | array | [] | Optional static constraint sets merged below tenant-activated versions of the same name. |