feat: audit session transcripts for numeric claims with no tool evidence (#12)
build / test (push) Has been cancelled
build / image (push) Has been cancelled

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:
2026-11-04 18:42:12 -08:00
parent a5430b7d25
commit ab9066486a
5 changed files with 537 additions and 0 deletions
+1
View File
@@ -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