Skip to content

v1.108.68 - retrieval-regret loop (suggest_corrections / reflect)

Choose a tag to compare

@jgravelle jgravelle released this 21 Jun 22:20
· 34 commits to main since this release

Retrieval-regret loop: suggest_corrections / reflect

The ranking-events telemetry ledger fed only the weight tuner; it also carries a louder, unread signal: when retrieval failed and the agent had to re-ask. This release mines that regret and suggests config fixes.

  • retrieval/regret.py extracts six regret signals over the ledger - re-query churn, low confidence, thin/zero results, ambiguous top, stale-at-query, and vocabulary gap (identity miss rescued by semantic search) - as severity-ranked clusters. Pure read; no new tables.
  • suggest_corrections (MCP tool) fuses those clusters with the static config audit and a dry-run weight proposal into prioritized, explainable corrections: CLAUDE.md routing/glossary lines as unified-diff previews, index-freshness hints, the weight proposal.
  • reflect (CLI) prints the same as a human report: jcodemunch-mcp reflect [repo] [--all] [--apply-weights] [--json].
  • One-line digest integration: "N regret cluster(s) this window; top: ...".

Read-only by charter. Every correction is a suggestion with its evidence; applying a patch is your keystroke, never the server's. The only state the loop persists is the ranking-weights sidecar (tuning.jsonc), behind an explicit --apply-weights. It degrades honestly when telemetry is off, returning a hint rather than fabricated corrections.