fix(plugin): the instruction surfaces still said every rule binds (#3849)
CI & Build / Python lint (push) Successful in 4s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / TypeScript typecheck (push) Successful in 54s
CI & Build / integration (push) Successful in 1m3s
CI & Build / Python tests (push) Successful in 1m27s
CI & Build / Build & push image (push) Successful in 41s
CI & Build / Python lint (push) Successful in 4s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / TypeScript typecheck (push) Successful in 54s
CI & Build / integration (push) Successful in 1m3s
CI & Build / Python tests (push) Successful in 1m27s
CI & Build / Build & push image (push) Successful in 41s
Step 3 shipped a line a session can receive — "Preference that may apply here …" — into surfaces that told it, in the most authoritative voice it has, that anything arriving in that shape is binding. That is the confusion milestone 399 exists to prevent, arriving through the one channel a session has least reason to doubt. Silent in both directions, which is why it could not wait for step 6. A session treating a preference as a rule refuses to proceed over something the operator merely preferred; and it loses the whole reason preferences exist, which is that they are brought up to date rather than obeyed. Three surfaces, each to its own budget: - SKILL.md gets the full account: kind decides force, the injected line names which in its opening words, and a preference is the one record a session keeps current itself (update_preference, with what taught the change). - scribe_static_context.md gets six lines — enough to tell the kinds apart and to say a preference is yours to update. - _INSTRUCTIONS gets four words. It is a MAP at 1978 of its 2000-char budget (#2562), and the detail belongs in the surfaces above and in the tool docstrings, which is what that budget exists to force. Guarded so it cannot drift back: a surface that claims rules bind must name the kind that does not. Pinned on the CLAIM rather than the word "bind", because a bare substring also matches bind_repo, list_repo_bindings and server.py's DNS-rebinding comment — a guard that would one day fail a skill about repo binding is rule 167's named failure, raising a false alarm about the very thing it protects. Falsified against all three surfaces losing the mention. Plugin version minted: the cache refreshes only on a version bump (#2209), so a skill edit without one reaches no installed plugin. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011cPyzNnegXHr5iRMzzy5KJ
This commit is contained in:
@@ -252,3 +252,50 @@ def test_no_surface_names_the_push_without_stating_the_pull():
|
||||
f"the bridge — it can be absent without saying so. Name it if it helps, "
|
||||
f"but say to call {PULL}() regardless."
|
||||
)
|
||||
|
||||
|
||||
# ── force: a surface that says rules bind must say what does not ────────
|
||||
#
|
||||
# Added with the preference kind (milestone 399). Before it, "rules bind" was
|
||||
# the whole truth and every surface said so flatly. It is now half of one, and
|
||||
# the half that is missing is the dangerous half to omit: a session reading
|
||||
# only "rules bind" and then receiving a preference has been told, by the most
|
||||
# authoritative surface it has, to treat it as binding.
|
||||
#
|
||||
# That failure is silent in both directions. Treating a preference as a rule
|
||||
# produces a session that refuses to proceed over something the operator only
|
||||
# preferred; and it removes the reason preferences exist, which is that they
|
||||
# can be brought up to date rather than obeyed.
|
||||
#
|
||||
# Same bargain as every test in this file: STRUCTURE, not wording. A surface
|
||||
# passes by mentioning the other kind at all, so the prose stays free.
|
||||
#
|
||||
# PINNED ON THE CLAIM, NOT THE WORD "bind". A bare substring also matches
|
||||
# `bind_repo`, `list_repo_bindings` and the DNS-rebinding comment in
|
||||
# server.py — so it would one day fail a skill that mentions repo binding and
|
||||
# has nothing to do with force, which is rule 167's named failure: a guard
|
||||
# raising a false alarm about the very thing it protects. These phrases are
|
||||
# the ones that actually assert bindingness to a reader.
|
||||
BINDING_CLAIMS = (
|
||||
"rules bind",
|
||||
"binding rules",
|
||||
"rules are binding",
|
||||
"treat every one as binding",
|
||||
)
|
||||
OTHER_KIND = "preference"
|
||||
|
||||
|
||||
def test_a_surface_claiming_rules_bind_also_names_what_does_not():
|
||||
offenders = [
|
||||
label for label, text in _all_surfaces()
|
||||
if any(c in text.lower() for c in BINDING_CLAIMS)
|
||||
and OTHER_KIND not in text.lower()
|
||||
]
|
||||
assert not offenders, (
|
||||
f"these surfaces tell a session that rules bind and never mention "
|
||||
f"preferences: {offenders}. A preference arrives through the same arms "
|
||||
f"and renders in the same line shape, so a surface that describes only "
|
||||
f"the binding kind is read as covering both — and the session treats "
|
||||
f"'how the operator likes this done' as something it may not proceed "
|
||||
f"past. Name the other kind, however briefly."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user