Repository navigation
feat: retire stale absence claims — anchoring, contradiction rule, revisit: dates - #9
Merged
Merged
Conversation
A learning that states an absence -- "no database backup exists; the owner
accepted the risk for now" -- goes stale the day someone adds the backup, and
lore had no path that reliably retired it. Simulated on 0.5.2:
entry written with files: [] (nothing to point at: the thing is absent)
session adds a nightly backup prompt recall shows the old entry
edit docker-compose.yml edit-time recall: nothing
/lore:lint, --report, /lore:sweep nothing -- no anchor to check
later: "do we have a backup?" the stale entry, served as current
new "nightly backup" entry added both surface, both `current`
Two places decide the outcome, and both now say so:
- Authoring: an absence claim points `files:` at where the change would land
(a directory or glob). The same simulation with
`files: [docker-compose.yml, scripts/]` surfaces the entry at edit time to
whoever adds the backup, and drift triage flags it after the commit.
- Capture: when the overlap check lists an entry that the new learning
contradicts, the old one is set to `status: superseded` with a banner to the
new authority instead of staying live beside it. This is in the skill and,
because that is the moment the agent is looking at the old entry, in the
overlap check's own output (which only spoke of near-duplicates).
Tests: the overlap check's output names the contradiction rule (fails before).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DMXx6BJswH6xiwdqrwQnEf
"No database backup exists; the owner accepted the risk for now" is true the day it is written and carries its own expiry -- but lore had no way to hold that "for now". The only time-based signal is the generic age flag, which starts after `staleAfterMonths` (default 6) whatever the decision said. `revisit: YYYY-MM-DD` records the date a temporary decision or accepted risk must be re-decided. From that date, for live entries: - recall (prompt and edit time) marks the entry `! revisit due since <date>`, so a stale "no backup" is no longer served as plain current guidance; - `/lore:lint --report` -- the worklist /lore:sweep reads -- lists it in a "Revisit due" section, whether or not its code moved (silent when nothing is due; most stores will never use the field); - `/lore:stats` counts it; the default lint mode reports an unreadable value, since a revisit date nobody can parse is a reminder that never fires. Re-verifying the claim on or after the date (bumping `verified:`) clears it, the same way `verified:` clears drift triage; if the decision is still temporary, the sweep sets a new `revisit:`. Retired entries are ignored. Documented in the skill (frontmatter, authoring, "when the code changes later"), the README format example and authoring notes, the entry template, and the lint/stats/sweep commands. Tests: due/not-due/re-verified/malformed dates, iter_entries, the recall flag (live only) and a hook-level case, the report section and the stats count, the value check, and the README example parsing its new field. All fail without the change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DMXx6BJswH6xiwdqrwQnEf
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.
Summary
A learning like "No database backup exists; the owner accepted the risk for now" goes stale the day someone adds the backup. On 0.5.2, nothing reliably retired it:
files: [])docker-compose.yml/lore:lint,--report,/lore:sweepcurrent❌1. Anchoring and contradictions (8d41dcc)
files:to point at where the change would land (a directory or glob). The same simulation withfiles: [docker-compose.yml, scripts/]surfaces the entry at edit time and gets flagged by drift triage after the commit.status: supersededwith a banner pointing to the new one. This rule is in the skill and also in the overlap check's own output, because that output is what the agent is reading at that moment.2.
revisit: YYYY-MM-DD(7c2d2cf) — the date a decision taken "for now" must be re-decided. From that date, for live entries:! revisit due since <date>./lore:lint --reportlists it, so/lore:sweeppicks it up./lore:statscounts it.revisit:value is reported by the default lint.Bumping
verified:on or after the date clears it, the same wayverified:clears drift. Retired entries are ignored.Test plan
main.python -m unittest discover -s tests: 211 passed, 1 skipped.claude plugin validate .: passed.--report, and the contradiction rule appears in the overlap check.🤖 Generated with Claude Code
https://claude.ai/code/session_01DMXx6BJswH6xiwdqrwQnEf
Generated by Claude Code