You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
buildSynthesisPrompt in scripts/skill-synthesizer.ts currently injects cluster-representative sessions and surrounding tool sequences as one large context blob.
That is coarse: the prompt drags in many "loosely related" turns and few precisely relevant ones. Token budget is wasted and synthesis quality suffers.
A retriever that picks the top-k most relevant turns for the candidate Skill yields a smaller, denser, more on-topic context — and is the single biggest lever on synthesis quality.
Add retriever hookup in buildSynthesisPrompt. Keep prompt structure (frontmatter ask, topic, examples) but swap the examples slot for retrieved snippets.
Why
buildSynthesisPromptinscripts/skill-synthesizer.tscurrently injects cluster-representative sessions and surrounding tool sequences as one large context blob.What
SkillCandidate, query the retriever (Add embedding pipeline and chunk-level vector index for RAG-based retrieval #32) using:SkillCandidate.skillMarkdownitself as a query--retrieval-contextopt-in initially, default-on after evaluation).--preview(Add a --preview mode that runs Skill synthesis without writing files #26) so users can compare context strategies side by side.How
buildSynthesisPrompt. Keep prompt structure (frontmatter ask, topic, examples) but swap theexamplesslot for retrieved snippets.Depends on
--previewis the natural surface to expose this for human inspection