Repository navigation
feat(proof): mark a Decision suspect when the code it rests on moved - #301
Draft
tonyketcham wants to merge 1 commit into
Conversation
The feature-building benchmark showed agents following an accepted Decision past a stale-anchor note. A live Decision or Constraint is now suspect when a code Citation tied to it is stale at HEAD (path or symbol gone or renamed), when a file it names is gone or largely rewritten since it was recorded (at least max(10, min(100, a quarter of its lines)) changed), or when it rests on dead evidence. The warning comes before the body in get, find cards, brief, state and records, with the reasons and "read the code first; where they disagree, the code is the current behaviour". records gains --suspect. The proof-build dump arm now asks the CLI for the same warnings instead of reading record files directly. On the benchmark bed it flags 3 of 8 drifted records with no false code flags (the misses name no code and link to no Citation); git work is batched and capped as the other history reads are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DVVnhYL1Bz7mCfEKDoyLMW
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.
Stacked on #300.
Why
In #300's feature-building run, agents followed an accepted Decision ("shortcuts are registered in
keys/keymap.ts") that a refactor had made wrong. They did it even after seeing the anchor note "registerBinding renamed to legacyAction". An anchor note is too small to override a Decision.What
A live Decision or Constraint is suspect when any of these holds:
The warning appears before the body in
get,findcards,brief,stateandrecords, and lists the reasons:Other changes:
recordsgains--suspect.inject.mjs) now asks the CLI for these warnings instead of reading record files directly.Measured on the benchmark bed (v2)
The 5 misses are Decisions whose text names no code and that link to no Citation. Counting trailer-commit files instead catches all 8, but with 27 false positives, so it isn't shipped.
Checks
proof-suspect.test.tswith 6 temp-repo tests. These cover each trigger, a small edit that doesn't flag, and the surfaces where the warning appears.pnpm build, typecheck, prettier andskills:sync.The paid comparison against #300's old reads comes next.
Generated by Claude Code