feat(ways): optimization sub-way, BM25 doc updates, sparsity principle#24
feat(ways): optimization sub-way, BM25 doc updates, sparsity principle#24
Conversation
New sub-way at meta/knowledge/optimization that fires when discussing way vocabulary tuning, threshold optimization, or matching quality. - way.md: BM25 semantic matching (threshold 2.0) with workflow guide covering suggest → interpret → apply → test loop - macro.sh: prepend macro that runs way-match suggest across all semantic ways and injects a live health dashboard into context Progressive disclosure: parent knowledge way gives overview on "ways", this sub-way adds optimization depth only when that topic is active.
- Replace NCD/model matching docs with BM25 semantic matching - Remove match: semantic field (description+vocabulary auto-enables it) - Document additive matching (pattern OR semantic) - Add scope: field to frontmatter reference - Add /test-way skill reference for testing and vocabulary analysis
…sure matching.md: - Replace NCD-only semantic matching with BM25 degradation chain - Remove model matching section (unused, infrastructure only) - Add vocabulary design guidance and /test-way reference - Update way list with current BM25 thresholds extending.md: - Update matching mode table (BM25 replaces NCD/model) - Add progressive disclosure section documenting sub-way pattern - Document macro-driven live state injection - Expand testing section with /test-way skill usage
Document that vocabulary optimization targets semantic distance between ways, not match rate per way. Narrow vocabularies create sparsity — clean separation in scoring space — which is more valuable than broad recall. Added to both the optimization sub-way and matching reference.
One line: stop when vocabulary changes stop changing test outcomes. The test harness is the natural termination signal, not more prose.
Code Review: Optimization Sub-Way, BM25 Doc Updates, Sparsity PrinciplePR Size: 229 additions, 68 deletions across 5 files -- standard review. What This ChangesAdds an optimization sub-way for vocabulary tuning (with a prepend macro that injects live health data), updates the authoring way and two doc files to reflect BM25 as the primary matching engine, documents the progressive disclosure pattern, and introduces the sparsity principle for vocabulary design. Assessment: Solid OverallThe progressive disclosure documentation in The macro produces useful output and degrades gracefully when the binary is missing. The way body is concise at 80 lines and follows its own authoring guidance. Findings1. NCD Threshold Inconsistency Between
|
- Align test harness NCD threshold to 0.58 (was 0.55, diverged from check-prompt.sh production value) - Remove generic terms from optimization vocabulary (ways, review, score) and add domain-specific terms (sparsity, discrimination, overlap) - Add optimization way to semantic way list in matching.md
Summary
meta/knowledge/optimization/) with BM25 semantic matching and a prepend macro that injects a live health dashboard of all ways' vocabulary state/test-wayskillProgressive disclosure in action
Each level adds context only when the conversation goes there. The macro injects current state so the agent has both the workflow and the data.
Test plan