How it works

Three steps: put small rules on disk where the agent already reads, let them steer generation, and gate only what we can prove agents emit.

01 / install

The pack lands on disk as small per-rule skills

deslop install --target . writes one skill directory per rule into your harness's skill location (.cursor/skills/…, or the equivalent for your setup). Each skill carries a glob scope — repository filters apply to *Repository.java, service invariants to *Service.java. Nothing is injected into prompts globally; nothing runs until a file matching its glob is open.

02 / generate

The agent reads the rule before it writes code

When the agent edits a file that matches a rule's glob, the rule is in its context before generation starts. Teach rules are opinionated defaults at this stage — cheap-but-unreliable prevention, and described exactly that way.

In one controlled experiment, an agent that read the rule wrote the correct JPQL pattern; without it, it wrote the classic anti-pattern. That is one rule, one model, one run each — evidence the mechanism works when loaded, not a general guarantee. The full transcript is published: docs/composer-experiment.md.

03 / gate

Checker rules fail the build; teach rules never do

A rule only earns checker status after an agent-written violation sample — produced independently of whoever authored the rule — fails its detector. Today exactly one rule holds that status: no-jpql-null-or-lower. In CI, deslop check gates checker rules and ignores the rest:

$ deslop check
scanning 3 files matching **/*Repository.java

FAIL src/main/java/com/acme/repo/InvoiceRepository.java:18
     java.reliability.no-jpql-null-or-lower-on-optional-filter
     jpql optional filter uses ":param IS NULL OR" with LOWER()
     found:  WHERE :status IS NULL OR LOWER(i.status) = LOWER(:status)
     fix:    WHERE :status = '' OR LOWER(i.status) = LOWER(:status)
     ref: https://github.com/Amaresh/deslop#no-jpql-null-or-lower

1 violation (1 checker rule gated, 4 teach-only skipped)
exit code 1

faq

How is this different from an AI code reviewer?

Most tools review code after it's written — comments on a pull request, fixes you'll apply next sprint. deslop works earlier: your rules sit in the agent's context before it generates, so the bad pattern never lands. And for patterns we can prove agents emit, deslop check gates them in CI.

> Reviewers grade papers. deslop changes what the author writes.