Skip to content

docs(oddkit): document result_grouping parameter (oddkit#150)#154

Merged
klappy merged 1 commit intomainfrom
docs/oddkit-150-result-grouping
Apr 28, 2026
Merged

docs(oddkit): document result_grouping parameter (oddkit#150)#154
klappy merged 1 commit intomainfrom
docs/oddkit-150-result-grouping

Conversation

@klappy
Copy link
Copy Markdown
Owner

@klappy klappy commented Apr 28, 2026

Summary

Documents the result_grouping parameter that ships in klappy/oddkit#152 (closes oddkit#150).

What changed

Two tool docs updated:

File Changes
docs/oddkit/tools/oddkit_search.md New knowledge_base_url and result_grouping parameters in the input schema, expanded response shape (now includes source: "canon" | "baseline" and conditional overlay_hits / baseline_hits), new "Result Grouping (Knowledge Base Overlay)" section explaining the three values and the conditional default, new canon reference to klappy://canon/principles/scoped-truth.
docs/oddkit/tools/oddkit_preflight.md Same treatment scoped to preflight: new schema fields, expanded response shape including start_here_overlay / start_here_baseline, parallel "Result Grouping" section, new canon reference.

Conditional default (documented)

  • knowledge_base_url unset → default "merged" (no behavior change from the prior implementation).
  • knowledge_base_url set → default "overlay_first" (overlay docs ranked above baseline; the fix for scoped-truth contamination).

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.md was 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 link klappy://canon/principles/scoped-truth, which is the canon ref that does motivate the partition.

Companion artifacts


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_grouping parameter (and knowledge_base_url overlay behavior) to oddkit_search and oddkit_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_hits for search; start_here_overlay/start_here_baseline for preflight), and adds a dedicated Result Grouping (Knowledge Base Overlay) section plus a klappy://canon/principles/scoped-truth reference in both docs.

Reviewed by Cursor Bugbot for commit e2d970c. Bugbot is set up for automated code reviews on this repo. Configure here.

…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).
@github-actions
Copy link
Copy Markdown

Canon Quality — oddkit_audit

No dead klappy:// references or legacy link patterns found in writings/. 39 files scanned.

Spec: klappy://docs/oddkit/specs/oddkit-audit · Workflow: .github/workflows/canon-quality.yml · Run: #9

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.
@klappy klappy merged commit c9aa3ff into main Apr 28, 2026
2 checks passed
@klappy klappy deleted the docs/oddkit-150-result-grouping branch April 28, 2026 20:37
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.

Feature Request: Isolate or re-rank knowledge base content vs baseline in search corpus

1 participant