Skip to content

fix(ranking): replace 60% prefix stem with 4-char + half-length stems#58

Merged
kentwynn merged 1 commit into
mainfrom
feat/ranking-prefix-stems-adapter-parity
May 29, 2026
Merged

fix(ranking): replace 60% prefix stem with 4-char + half-length stems#58
kentwynn merged 1 commit into
mainfrom
feat/ranking-prefix-stems-adapter-parity

Conversation

@kentwynn

Copy link
Copy Markdown
Owner

expandTokens was generating 'authenti' (60% of 'authentication') instead of 'auth', causing pack to return 0 items for long English query words.

Replace the single 60% stem with two fixed-length stems:

  • 4-char stem: catches root prefixes (auth, conf, init, user)
  • half-length stem: floor(len * 0.5) catches mid-length matches e.g. 'config' (6) from 'configuration' (13)

Add 8 new unit tests covering prefix stemming, camelCase expansion, no-over-match guard, and cross-file ranking without knowledge atoms.

Also includes adapter parity fixes from this session:

  • windsurf, gemini: add agentSkillFiles (skill file parity with copilot/cursor/cline)
  • gemini: switch from bulletWorkflow to numberedWorkflow
  • claude-code: Stop hook runs kgraph stale then session end --conclude
  • pack: warn when needs-review/stale atoms served in context (P1)
  • pack: warn when maps are behind HEAD (P4)
  • tests: integration-registry and integrate tests updated for new adapter behaviour

233/233 tests passing.

expandTokens was generating 'authenti' (60% of 'authentication') instead
of 'auth', causing pack to return 0 items for long English query words.

Replace the single 60% stem with two fixed-length stems:
- 4-char stem: catches root prefixes (auth, conf, init, user)
- half-length stem: floor(len * 0.5) catches mid-length matches
  e.g. 'config' (6) from 'configuration' (13)

Add 8 new unit tests covering prefix stemming, camelCase expansion,
no-over-match guard, and cross-file ranking without knowledge atoms.

Also includes adapter parity fixes from this session:
- windsurf, gemini: add agentSkillFiles (skill file parity with copilot/cursor/cline)
- gemini: switch from bulletWorkflow to numberedWorkflow
- claude-code: Stop hook runs kgraph stale then session end --conclude
- pack: warn when needs-review/stale atoms served in context (P1)
- pack: warn when maps are behind HEAD (P4)
- tests: integration-registry and integrate tests updated for new adapter behaviour

233/233 tests passing.
@kentwynn kentwynn merged commit 7cad1b0 into main May 29, 2026
2 checks passed
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.

1 participant