Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Add or refactor domain rules into a testable module boundary with explicit invariants.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✓→✗ | ▼ Worse | -18% | 0% |
| case-21 | ✓→✗ | ▼ Worse | -40% | 0% |
| case-05 | ✓→✓ | = Same ✓ | 38% | 0% |
| case-06 | ✓→✓ | = Same ✓ | -22% | 0% |
| case-19 | ✓→✓ | = Same ✓ | -13% | 0% |
Create or refactor domain logic so that business rules live in:
This skill prevents domain rules from leaking into controllers, jobs, or adapters.
<repo>/REPO_PROFILE.jsonbackend/endpoint-scaffold)backend/persistence-layer-change)backend/integration-adapter)1) Locate the correct domain boundary (existing module/folder pattern wins). 2) Define the public API of the module:
3) Encode invariants explicitly:
4) Define error behavior:
shared/error-taxonomy if present)5) Write unit tests focused on rules, not wiring. 6) Ensure callers orchestrate and do not re-implement rules. 7) Run required validations from profile.
$decision-capture before encoding.Log:
backend/domain-logic-module<short label>success | partial | blockedOther measured skills in the registry, with their headline benchmark lift.