Skip to content

feat(recall): visualization layer — diff past approaches instead of listing them#93

Merged
QodeXcli merged 1 commit into
mainfrom
feat/recall-visualization
Jul 2, 2026
Merged

feat(recall): visualization layer — diff past approaches instead of listing them#93
QodeXcli merged 1 commit into
mainfrom
feat/recall-visualization

Conversation

@QodeXcli

@QodeXcli QodeXcli commented Jul 2, 2026

Copy link
Copy Markdown
Owner

P2 — recall visualization. recall_approach answers "how did we solve auth before?" with a visual comparison instead of a flat list:

★ Best match  [🎯 task · 2d ago · 38% match]
   add jwt auth login middleware to the api endpoints
   files: src/auth/jwt.ts, src/auth/middleware.ts

How the other attempts DIFFERED from it:

2. [🎯 task · 3w ago]  add auth login with refresh token rotation flow
   + this one adds: refresh, token, rotation
   − it lacks: jwt, middleware, api
   files (+ = not in best match): +src/auth/refresh.ts, src/auth/jwt.ts

Stable core across all 3: auth, login — this is how you consistently approach it here.

Architecture (as planned)

rankApproaches (recency + MMR + stemming — already shipped) → pure visualization layer → markdown with diff blocks + file links + score.

  • approach-diff.ts (PURE): termDiff — vocabulary diff compared by stem (paginate↔pagination = shared) but displayed as surface words; lineDiff — LCS unified ± block, auto-selected when both texts are genuinely multi-line (worklog entries); commonCore — the stable terms across every attempt; renderApproachDiffs — the markdown renderer, incl. +file flags for files an alternative touched that the best match didn't
  • Tool visualizes top-4, lists the rest compactly — nothing hidden
  • 12 new PURE tests (stem-shared vocab, LCS edges, file provenance flags, single/empty/identical fallbacks)

Full suite 1500 green, tsc clean.

…isting them

recall_approach now returns a VISUAL comparison, not a flat list: the best-matching approach in
full (score + files), each alternative DIFFED against it, and the stable core common to all
attempts — "this is how you consistently approach it here".

- approach-diff.ts (PURE, no I/O/clock): termDiff (vocabulary diff compared by STEM so
  paginate↔pagination read as shared, displayed as surface words → `+ adds` / `− lacks`),
  lineDiff (LCS unified ±, auto-selected when both texts are genuinely multi-line, e.g. worklog),
  commonCore (terms whose stem appears in every attempt), renderApproachDiffs (markdown with
  per-approach score, file links, and `+file` flags for files the alternative touched that the
  best match didn't).
- recall-approach tool: renders the top-4 visually, lists the rest compactly (nothing hidden);
  description updated so the model knows the output is comparative.
- Builds directly on the existing ranking (recency tilt + MMR diversity + stemming) — the
  visualization layer is a pure formatter on top of rankApproaches.
@QodeXcli QodeXcli merged commit cb60874 into main Jul 2, 2026
2 checks passed
@QodeXcli QodeXcli deleted the feat/recall-visualization branch July 2, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant