Milestone 639 steps 3–4: one assembler per hook under a budget; prior art and preferences behind a cue-swap gate #225

Merged
bvandeusen merged 4 commits from dev into main 2026-11-23 00:10:35 -05:00
3 changed files with 14 additions and 10 deletions
Showing only changes of commit 05831149b8 - Show all commits
+4 -6
View File
@@ -100,12 +100,10 @@ Two constraints on *how* that's achieved:
**lesson** is what is worth knowing — a better way to think about a
problem, a solution that transfers — and ignoring it costs time. All three
are worth reading and all three arrive beside your work; only the first is
a mistake to miss. An injected line names which in its opening words —
*"Rule 11 …; it binds:"* against *"Preference 173 …; how this has been done
before:"* — and on a first mention it carries the record's own statement,
so `get_rule(id)` is for the full text (why, how to apply), not for
finding out what it says. A lesson arrives in the records menu marked `lesson`, under a header that
says outright that it binds nothing, and every payload carries `kind`.
a mistake to miss. A line names which up front (*"Rule 11 …; it binds:"*,
*"Preference 173 …; how this has been done before:"*) and on first mention
quotes the statement; `get_rule(id)` gives the why and how. A lesson is
marked `lesson` under a header saying it binds nothing; payloads carry `kind`.
**One question sorts them, and it is worth asking out loud: what happens if
someone doesn't do this?** *Something breaks, or a boundary is crossed* — a
+7 -4
View File
@@ -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}"
)
@@ -35,7 +35,10 @@ async def _rows(uid: int) -> list[RuleDelivery]:
async def _record(uid, sid, source, lines):
# A bound request's rows wait for the door's payload; flushing all of
# them is what a door does when every line it rendered was kept.
rule_deliveries.record(uid, sid, source, lines)
rule_deliveries.flush()
await background.drain()