Docstrings, section headers and assertion messages drop the record number,
milestone or step that introduced the behaviour, and incident accounts are
restated as the present-tense failure shape. A dead pointer to a design doc
that is not in the repo is removed.
Renamed to the property they check:
test_the_old_shape_would_be_caught -> test_a_rank_then_scope_query_is_caught
test_a_ledger_repeat_no_longer_produces_that_case_at_all -> test_a_ledger_repeat_is_counted_not_withheld
test_the_header_no_longer_promises_once_per_session -> test_the_header_explains_the_seen_marker
test_the_portal_case_no_longer_stamps_one_canon_onto_a_whole_file -> test_one_canon_is_not_stamped_onto_a_whole_file
test_the_repos_own_prose_no_longer_defines_with -> test_the_repos_own_prose_does_not_define_with
test_the_original_regression_create_note_with_content -> test_the_real_server_refuses_content_on_create_note
Fixture and example ids stay: "note 5" in a supersession chain, "rule 156"
in an illustrative question, `#2275` as the hex-versus-citation case,
`#3244` as the example of a bare number, fixed dates in date-filter tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When one hook response puts a lesson and a rule in front of the reader, the
pair is recorded as evidence on a SUGGESTED lesson_rule_links row; once the
pair has arrived together in PROPOSE_SITUATIONS (3) distinct situations, the
next co-arrival carries one line asking the reader to judge it with
judge_lesson_link. Nothing about surfacing changes: a suggested link carries
no rule anywhere (that is #4633, confirmed links only).
- lesson_rules: co_surfaced (fail-open; only pairs the reader could confirm —
a lesson they may write, a rule they own; judged pairs gather nothing; one
proposal per response; PROPOSE_COOLDOWN 6h between asks), plus the pure
counting rules: situation_key, add_evidence, proposal_due, evidence_summary.
A situation is the prompt on /retrieve (word tokens, sorted and
de-duplicated, so trivial rewordings count once) and the FILE on
/prior-art (every edit to one file is one situation).
- rules_for_lessons shows a suggested link's evidence counts.
- plugin_context: build_autoinject_hint returns lesson_ids,
build_prompt_rule_hint returns shown_rule_ids, build_write_path_hint records
its own pair; routes/plugin /retrieve records the prompt pair. Shown lines,
repeats included: relevance makes a co-arrival, not the session ledger.
- Evidence lives in the existing evidence column — no migration, and backup
already carries it.
- Tests: counting rules (unit), the recorder against Postgres (bar, repeat,
judged pairs, ownership, cooldown, evidence kept on confirm); conftest stubs
co_surfaced for unit tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>