Skip to content

feat(retain): stop words the owner never wants retained - #258

Merged
tenphi merged 1 commit into
mainfrom
feat/retain-stop-words
Nov 4, 2026
Merged

tenphi merged 1 commit into
mainfrom
feat/retain-stop-words

Conversation

@tenphi

@tenphi tenphi commented Nov 4, 2026

Copy link
Copy Markdown
Owner

What

maintenance.retain.stop_words: names and terms the owner never wants retained.

{ "maintenance": { "retain": { "stop_words": ["Vulpine Mutual"] } } }
  • Extraction is told to propose nothing about them, as data only.
  • A deterministic check then holds every candidate that still names one, together with everything that depends on it through a relation. It looks at the text, subject, page, destination, exact support and speaker, and runs before verification, so a held candidate costs no verifier call.
  • The hold has a new typed reason, stop_word (RetainHoldReason), at hold_stage: "validation", and writes nothing.
  • The rule applies to extracted and supplied (provided) candidates, remember, and folder timeline curation.

Matching is whole-word and case-insensitive. Whitespace in a term also matches - and _, so Vulpine Mutual matches companies/vulpine-mutual but not VulpineMutual. The discourse frame is not checked, so a name in a quoted thread does not stop an unrelated fact. The speaker is checked because "nothing from them" is the usual reason for a stop word, and a fact an email states rarely names its sender.

Tests

  • packages/core/src/write/retain-stop-words.test.ts: the matcher, the fields that count, the transitive relation cascade, frame exclusion, and that runRetain tells the extractor and never sends a stopped candidate to the verifier.
  • packages/core/test/retain.test.ts: provided mode holds without writing or calling a model and replays. Extract mode keeps the clean candidate; the verifier stub would refuse everything if the stopped one reached it. remember honours the list too.

Locally, build, typecheck, lint, knip and check:repository pass. The full suite has 5067 passing; the 4 failures are ingest/OCR timeouts that fail the same way on main in this sandbox.

Changeset: minor for protocol and core, because a new hold reason widens the protocol enum.

🤖 Generated with Claude Code

`maintenance.retain.stop_words` lists names and terms that must never be
retained. Extraction is told to propose nothing about them, and a
deterministic whole-word, case-insensitive check then holds every candidate
that still names one in its text, subject, page, destination, exact support
or speaker, together with everything whose relation depends on it. The check
runs before verification, so a held candidate costs no verifier call. The
hold is typed as the new `stop_word` reason and writes nothing.

The same rule applies to supplied candidates, `remember`, and folder
timeline curation: a stop word that only some paths obey is not a rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tenphi
tenphi merged commit fe9a92c into main Nov 4, 2026
5 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant