feat(recall): visualization layer — diff past approaches instead of listing them#93
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
P2 — recall visualization.
recall_approachanswers "how did we solve auth before?" with a visual comparison instead of a flat list: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.+fileflags for files an alternative touched that the best match didn'tFull suite 1500 green, tsc clean.