I3166 — A curated note whose cited file changed since its last review is reported for review, not served as current
Have knowledge validate and the context compiler compare each cited provenance.derived_from file with the blob recorded at the note's last review and mark the note needs-review when it differs.
READY wave 0 · p2 · implementation profile · parallel safe
Ready. Every dependency is done, so majordomus plan start I3166 will be accepted.
Objective
Have knowledge validate and the context compiler compare each cited provenance.derived_from file with the blob recorded at the note's last review and mark the note needs-review when it differs.
Why
2026-09-15: a knowledge entry whose evidence stops holding is marked stale rather than silently remaining true; 2026-10-16: knowledge size alone does not give efficiency, stale knowledge needs selective revalidation. Using dates against git log flags three of master's four notes on day one (docs/CLI.md has changed 74 times since start-here.md). The criterion 'devcontext lowers its confidence' is met by a separate needs-review field, because confidence is the trust of the discovery path. Sources: chatgpt-majordomus:c144#3, chatgpt-majordomus:c278#6.
Current state
Curated notes carry derived_from; I1987 keeps provenance after deletion (case 3023); nothing compares the cited files with the note.
Desired state
needs-review is derived and shown where the note is served.
Scope
- lib/knowledge.sh
- apps/majordomus-cli/src/devcontext
- apps/majordomus-cli/src/capability/builtin/knowledge_base.rs
- docs/KNOWLEDGE.md
- apps/majordomus-cli/src/ui/knowledge.rs
- lib/context.sh
- share/schemas/majordomus/knowledge/knowledge.v1.schema.json
- share/schemas/majordomus/knowledge/knowledge.v1.proto
- .ai/repo/project/intents
Out of scope
- Rewriting notes automatically
- Lowering devcontext selector confidence for a stale note
- Failing knowledge validate because a cited file moved
Dependencies
None. This issue is a root of the graph.
Acceptance criteria
- A note whose cited file changed since its last review is reported
- Each new case named here takes its number from `scripts/case-numbers next` and is announced on the board before the file is written (ADR 0053); a case number written in this record before that is provisional
- A curated note is anchored by the blob hash of each provenance.derived_from file recorded at its last review; needs-review is derived when the current blob differs, not from git log against the note's date, so a shallow clone gives the same verdict
- A note without recorded hashes reads unanchored, not needs-review; the first reading over the curated notes is recorded with how many are flagged
- A person clears needs-review with one ledger-recorded re-review act that re-stamps the hashes
- knowledge validate reports needs-review as a WARN and keeps its exit status; case 3075 stays green when a cited file moves
- devcontext reports needs-review in its own field with the reason; selector confidence keeps its meaning (devcontext/select.rs, model.rs)
- needs-review is shown on /ui/knowledge and in the briefing's knowledge pointers (mj_context_pointers)
- The criterion a-moved-source-is-flagged is rewritten to evidence: test with the allocated case path, and that case runs in this issue's validation
Validation
- bash test/run.sh 3075_knowledge_validate_judges_the_graph
Evidence required
- case_note_source_moved
Evidence
None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.
Timeline
- started
- —
- verified
- —
- completed
- —
Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.
Canonical record: .ai/repo/project/issues/I3166.yaml. Read it back with majordomus plan show I3166.