Repository navigation
feat(retain): stop words the owner never wants retained - #258
Merged
Merged
Conversation
`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>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
maintenance.retain.stop_words: names and terms the owner never wants retained.{ "maintenance": { "retain": { "stop_words": ["Vulpine Mutual"] } } }stop_word(RetainHoldReason), athold_stage: "validation", and writes nothing.provided) candidates,remember, and folder timeline curation.Matching is whole-word and case-insensitive. Whitespace in a term also matches
-and_, soVulpine Mutualmatchescompanies/vulpine-mutualbut notVulpineMutual. 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 thatrunRetaintells 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.rememberhonours the list too.Locally, build, typecheck, lint, knip and
check:repositorypass. The full suite has 5067 passing; the 4 failures are ingest/OCR timeouts that fail the same way onmainin this sandbox.Changeset: minor for protocol and core, because a new hold reason widens the protocol enum.
🤖 Generated with Claude Code