feat: lightweight cross-session action tag context for curator#385
Merged
Conversation
Add buildActionTagContext() to curator — scans distillation observations for action tags across the project and passes a compact summary to the curator prompt. This gives the curator direct visibility into cross-session behavioral patterns without the noise of full recall results. Example context appended to curator prompt: Cross-session behavioral patterns detected: - [requested-tests] appeared in 4 prior sessions - [corrected-style] appeared in 3 prior sessions PR-2 eval: 4.63 (matches best previous score, no regression)
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.
Summary
Adds compact cross-session behavioral pattern context to the curator prompt via action tag counting. No LLM calls, no recall queries — just a DB scan of distillation observations.
How it works
buildActionTagContext()scans all distillation observations for action tags ([requested-tests],[corrected-style], etc.), counts distinct sessions per tag, and appends a compact summary when tags appear in 2+ sessions:This gives the curator direct evidence of repeated user behaviors without the noise of full recall results (which caused regression in a previous attempt).
Eval Results
PR-2 (implicit preferences): 4.63 — matches best previous score, no regression.
Why this works where full recall didn't
The previous recall-augmented curation attempt (broad queries → full recall results → curator prompt) dropped PR-2 from 4.63 to 3.82. The recall results were too long and noisy, overwhelming the curator. This approach provides the same cross-session signal in 2-3 lines instead of pages of context.
Files Changed
packages/core/src/curator.ts—buildActionTagContext()+ wiring