feat(7734): the instruction surfaces teach how strongly a rule arrives, what a held or refused call means, and what a quiet moment means
CI & Build / TypeScript typecheck (push) Successful in 40s
CI & Build / Plugin hooks (push) Successful in 20s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Python tests (push) Failing after 2m0s
CI & Build / integration (push) Successful in 2m28s
CI & Build / Build & push image (push) Skipped

- writing-records.md: a new section on declaring enforcement (inform, hold,
  enforce), the trigger a hold or refusal needs to name its act, and
  salience. A rule with an exit is a hold; a rule with triggers stops only
  the acts they match.
- moments.md: a held call is read and made again (unchanged if the rule does
  not bear on it, with rule_misfired); a refused call is the operator's
  boundary and moves only when they change the rule; a moment sends a few
  lines in one order and drops the rest, so a quiet moment is not an empty
  rulebook.
- The static context says a rule can hold or refuse a tool call.
- create_rule, create_project_rule and update_rule describe enforce as a
  refusal every time that needs an act, and trigger-only holds.
- The cross-project guard words a rule edit on another project as the
  operator's curation, naming the rule, and no longer suggests filing an
  issue in its place.

_INSTRUCTIONS is at its 1,600-character cap and is left alone: holds and
refusals explain themselves when they fire. The guidance ownership test
registers the three new topics. Plugin 2026.11.23.2259.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-23 17:59:55 -05:00
co-authored by Claude Opus 5.5
parent cbe4b25dad
commit 6f0368e770
9 changed files with 126 additions and 11 deletions
+14
View File
@@ -207,6 +207,20 @@ TOPICS: tuple[Topic, ...] = (
Topic("a mount that arrives where it does not apply is reported, and reports become the offer", U,
("rule_misfired",),
"a rule you read and set aside leaves no trace anyone else can see"),
# How strongly a rule arrives (milestone 639). Declared while the rule is
# written (writing-records.md), and met as a held or refused call or a
# quiet moment (moments.md); the static context carries a short form for
# Claude Code, where a hook is what holds the call.
Topic("a rule declares how strongly it arrives: enforcement, salience, the act it governs", U,
("enforcement", "salience", "triggers"),
"a rule with an exit is a hold",
shared_with=("docstrings",)),
Topic("a held call is read and made again; a refused call is the operator's boundary", U,
("held", "refuses the call every time"),
"it moves only when they change the rule"),
Topic("a quiet moment is a budget, not an absence", U,
("what_might_apply", "short reminder"),
"a quiet moment means nothing more needed saying there"),
Topic("a missed when is mounted or mapped, not reworded", U,
("update_rule(moments=",),
"first ask whether it missed a when or a what"),
+13
View File
@@ -152,6 +152,19 @@ async def test_a_write_in_another_project_asks_and_says_how_to_file_an_issue_ins
assert 'create_task(project_id=9, kind="issue")' in out["reason"]
async def test_a_rule_edit_in_another_project_names_the_rule_and_suggests_no_issue():
a, b, c = _patched({9})
with a, b, c:
out = await check_act(1, 2, tool="update_rule", args={"rule_id": 130, "salience": "low"})
assert out["allowed"] is False
assert "rule 130 of Elsewhere (project 9)" in out["reason"]
assert "create_task" not in out["reason"]
with a, b, c:
related = await check_act(1, 2, tool="relate_rules",
args={"from_rule_id": 4, "to_rule_id": 130, "kind": "overrides"})
assert "rule 4, rule 130 of" in related["reason"]
async def test_filing_an_issue_in_another_project_goes_ahead():
a, b, c = _patched({9})
with a, b, c: