fix(7729): a rule with no statement keeps its full line, and the delivery test flushes like a door
CI & Build / TypeScript typecheck (push) Successful in 38s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Python tests (push) Successful in 1m56s
CI & Build / integration (push) Successful in 2m8s
CI & Build / Build & push image (push) Successful in 33s
CI & Build / TypeScript typecheck (push) Successful in 38s
CI & Build / Plugin hooks (push) Successful in 15s
CI & Build / Python lint (push) Successful in 2s
CI & Build / Python tests (push) Successful in 1m56s
CI & Build / integration (push) Successful in 2m8s
CI & Build / Build & push image (push) Successful in 33s
A first mention whose rule had an empty statement fell through to the reference form and lost its "may apply <where>" — for a trigger-fired rule, the very clause that says which trigger fired. The full form now renders with or without a statement. The integration helper flushes the request buffer, as a door does once its payload is fitted. using-grimoire trimmed back to its 350-line budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -237,12 +237,15 @@ def _rule_hint_line(
|
||||
else:
|
||||
state = "First mention this session"
|
||||
tail = f"{state}; full text: get_rule({rule.id})."
|
||||
statement = "" if (compact or seen or held) else _statement_excerpt(rule)
|
||||
if not statement:
|
||||
if compact or seen or held:
|
||||
return f"Also relevant: {noun} {rule.id} \u201c{rule.title}\u201d ({force}). {tail}"
|
||||
statement = _statement_excerpt(rule)
|
||||
if statement and statement[-1] not in ".!?…":
|
||||
statement += "."
|
||||
return (
|
||||
f"{noun} {rule.id} \u201c{rule.title}\u201d may apply {where}; {force}: "
|
||||
f"{statement} {tail}"
|
||||
f"{noun} {rule.id} \u201c{rule.title}\u201d may apply {where}; "
|
||||
+ (f"{force}: {statement}" if statement else f"{force}.")
|
||||
+ f" {tail}"
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user