Commit Graph
3 Commits
Author SHA1 Message Date
bvandeusenandClaude Opus 5.5 b4bdd7798c feat(7733): adherence is measured per rule and per moment, and shown
CI & Build / Python lint (push) Successful in 2s
CI & Build / Plugin hooks (push) Successful in 16s
CI & Build / TypeScript typecheck (push) Successful in 36s
CI & Build / Python tests (push) Failing after 1m48s
CI & Build / integration (push) Successful in 2m26s
CI & Build / Build & push image (push) Skipped
A rule is in force at a moment of a session when it was delivered there.
Each (session, rule, place) now carries at most one verdict (rule_adherence,
migration 0134): followed, departed, broken or not applicable, with where it
came from:

- an enforce rule refusing the act: followed, recorded by the moment arm, and
  never replaced;
- the session's own rule_outcome (applied, departed) and rule_misfired calls,
  which the plugin's outcome hook now also posts with the session id
  (/api/plugin/rule-verdict) onto the delivery being answered;
- a transcript review: adherence_to_judge lists what has no verdict yet, by
  session, and judge_adherence records verdicts with their evidence.

rule_adherence (MCP) and /api/retrieval/adherence give the readout: sessions
in force, opened and each verdict per rule and per place. Settings > Moments
shows it in a "Were they followed" panel, beside each moment's delivered and
opened counts, and per rule inside each moment.

Verdicts are pruned with their deliveries and left out of backups like them.
Plugin 2026.11.23.2227.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 17:28:23 -05:00
bvandeusenandClaude Opus 5.5 738bd24d6e fix(7733): a rule with triggers holds or refuses only the acts they match
CI & Build / Plugin hooks (push) Failing after 19s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Python tests (push) Successful in 2m31s
CI & Build / integration (push) Successful in 2m18s
CI & Build / TypeScript typecheck (push) Successful in 35s
CI & Build / Build & push image (push) Canceled after 27s
Rules 2, 4, 10 and 153 are set to hold and mounted on work.deliver. A
push to dev therefore stopped four times in a row, once for each of them,
although none of them governs a push to dev: their triggers (git push
origin main, git tag, pytest, pull_request_write) name the acts they do
govern.

A rule that has triggers now stops an act only when one of them matched it.
Reached by its moment alone, it is a line beside the work. A rule with no
triggers still holds wherever it is mounted, because the mount is all that
says where it applies. A mounted rule whose unscoped trigger also matched
now counts as reached by the trigger, so it ranks as triggered and may
stop the act.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 15:53:36 -05:00
bvandeusenandClaude Opus 5.5 c9e64450ba feat(7728): typed triggers on a rule, and a rule says its piece once per session
CI & Build / TypeScript typecheck (push) Successful in 34s
CI & Build / Plugin hooks (push) Successful in 22s
CI & Build / Python lint (push) Successful in 3s
CI & Build / Python tests (push) Failing after 1m48s
CI & Build / integration (push) Successful in 2m8s
CI & Build / Build & push image (push) Skipped
Triggers (migration 0130, table rule_triggers): a rule can name the act it
applies to, as a tool, a path glob, a command head or a keyword, checked
exactly against the act rather than by resemblance. With no moment a
trigger delivers its rule on any matching act, even one that reaches no
moment; scoped to a moment, it makes the rule's mount there conditional
on the act matching. A triggered line ranks above a mounted one in the
delivery order and names the trigger that fired. Writable through every
MCP and REST rule door, carried by backup (version 29), and edited in the
rule editor under "Acts that trigger it". The plugin's catch-all hook is
told which tools a trigger can reach.

Lifecycle: a rule's life in a session is one full line, one reminder,
then silence. A repeat whose latest delivery in the session was already a
reminder is left out of both rule arms. A rule that holds stays armed
until it is opened, an opened rule keeps its line, and a full delivery
(after a compaction or once the ledger ages it out) re-arms it. Read from
the delivery records, so it needs no new plugin ledger.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:24:39 -05:00