docs(oddkit): document result_grouping parameter (oddkit#150)#154
Merged
docs(oddkit): document result_grouping parameter (oddkit#150)#154
Conversation
…ight (oddkit#150) oddkit#150 added a result_grouping parameter to oddkit_search and oddkit_preflight that controls how overlay (knowledge_base_url) and baseline hits are ordered. This documents the parameter, the conditional default (KB set → overlay_first; KB unset → merged), the three values, and the response shape changes. Both tool docs now also link klappy://canon/principles/scoped-truth as the canon ref that motivates the partition. Companion to klappy/oddkit#152 (the implementation PR).
Canon Quality —
|
klappy
added a commit
to klappy/oddkit
that referenced
this pull request
Apr 28, 2026
…king when knowledge_base_url set (#152) Closes #150. When a project sets `knowledge_base_url`, oddkit_search and oddkit_preflight now default to overlay_first ranking — overlay (canon) docs surface above baseline docs in BM25 results, with score order preserved within each tier. Callers can override via the new `result_grouping: "merged" | "overlay_first" | "grouped"` parameter. - Conditional default: knowledge_base_url unset → "merged" (no behavior change); set → "overlay_first". - "grouped" mode adds explicit overlay_hits/baseline_hits arrays (search) and start_here_overlay/start_here_baseline (preflight) for callers that want to render tiers separately. - Candidate-pool widening (50 BM25 candidates when grouping active, partition, slice to 5) ensures overlay docs at BM25 position 6+ are visible. - Worker (workers/src/orchestrate.ts) and Node CLI (src/core/actions.js, src/tasks/preflight.js) at parity. Telemetry blob9 records caller-specified value. - Validated by independent Sonnet 4.6 read-only dispatch per release-validation-gate Rule 2; Cursor Bugbot success per Rule 1. Companion docs in klappy/klappy.dev#154.
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
Documents the
result_groupingparameter that ships in klappy/oddkit#152 (closes oddkit#150).What changed
Two tool docs updated:
docs/oddkit/tools/oddkit_search.mdknowledge_base_urlandresult_groupingparameters in the input schema, expanded response shape (now includessource: "canon" | "baseline"and conditionaloverlay_hits/baseline_hits), new "Result Grouping (Knowledge Base Overlay)" section explaining the three values and the conditional default, new canon reference toklappy://canon/principles/scoped-truth.docs/oddkit/tools/oddkit_preflight.mdstart_here_overlay/start_here_baseline, parallel "Result Grouping" section, new canon reference.Conditional default (documented)
knowledge_base_urlunset → default"merged"(no behavior change from the prior implementation).knowledge_base_urlset → default"overlay_first"(overlay docs ranked above baseline; the fix forscoped-truthcontamination).Callers can explicitly pass
"merged","overlay_first", or"grouped"to override either default.Notes on what was deferred
Per the original issue #150 §5.6 recommendation: a single concise paragraph in each tool doc was sufficient for Option D. No addendum to
canon/constraints/core-governance-baseline.mdwas added — that doc's "Canon-Only (Never Bundled)" section is about file-presence/absence, not runtime ranking, so a cross-reference there would be forced. Both tool docs now linkklappy://canon/principles/scoped-truth, which is the canon ref that does motivate the partition.Companion artifacts
60fe9b8)Note
Low Risk
Documentation-only change that updates tool schemas/response shapes; low risk aside from potential client confusion if the docs diverge from implementation.
Overview
Adds documentation for a new
result_groupingparameter (andknowledge_base_urloverlay behavior) tooddkit_searchandoddkit_preflight, including conditional defaults and how overlay (source: "canon") is prioritized over baseline.Updates the documented response shapes to include
source: "canon" | "baseline"and optional grouped fields (overlay_hits/baseline_hitsfor search;start_here_overlay/start_here_baselinefor preflight), and adds a dedicated Result Grouping (Knowledge Base Overlay) section plus aklappy://canon/principles/scoped-truthreference in both docs.Reviewed by Cursor Bugbot for commit e2d970c. Bugbot is set up for automated code reviews on this repo. Configure here.