feat: audit session transcripts for numeric claims with no tool evidence (#12)
Adds a deterministic check for the failure mode where a figure is derived once and then restated without being re-checked. - internal/claims extracts number+unit assertions from assistant prose and matches them against tool output, unit-aware (matching a bare number makes "200MB" count as backed by any output containing 200). - Classification: sourced (printed this turn), stale (printed in an earlier turn, restated now), unsupported (never printed by a tool). - `knox claims lint [--session ID] [--json]` reads opencode.db. The evidence window is the turn, not the message: opencode emits one message per step, so a tool call and the prose citing it land in consecutive messages. No model calls, so it costs nothing to run.
This commit is contained in:
@@ -79,6 +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(newServeCmd(kdb))
|
||||
|
||||
// MCP server subcommand: stdio by default (editor/agent spawns it), or
|
||||
|
||||
Reference in New Issue
Block a user