feat: persist the claim ledger with an inverted SM-2 interval (#26)
The plugin could already warn about a restated figure within one transcript. This makes it remember across turns and sessions. A claim is keyed by unit+value, so '6,884 lines' and '6884 lines' are the same claim. Interval arithmetic is SM-2 with the sign flipped: verification expands the interval and restores ease, while restating a claim without new evidence contracts ease and falls due immediately — repetition is the failure signal, not the achievement. Adds 'knox claims record' (fold check verdicts into the ledger) and 'knox claims due' (what needs re-checking). The plugin records once per distinct prose (the context hook fires for every model call, so naive recording would inflate the reuse count) and injects a capped digest at turn start. Two bugs caught by the tests: a new claim defaulted to EF=0 and contracted straight to the 1.3 floor, and my first test encoded the wrong policy — a single restatement is already due, which is the behaviour worth having.
This commit is contained in:
@@ -79,7 +79,7 @@ and maintains a searchable index. Use 'knox watch' for daemon mode.`,
|
||||
root.AddCommand(knoxcmd.NewReconcileCmd(kdb))
|
||||
root.AddCommand(knoxcmd.NewGossipCmd(kdb))
|
||||
root.AddCommand(knoxcmd.NewTLSCmd())
|
||||
root.AddCommand(knoxcmd.NewClaimsCmd())
|
||||
root.AddCommand(knoxcmd.NewClaimsCmd(kdb))
|
||||
root.AddCommand(newServeCmd(kdb))
|
||||
|
||||
// MCP server subcommand: stdio by default (editor/agent spawns it), or
|
||||
|
||||
Reference in New Issue
Block a user