claude@clouddev1 7ae1a0fde1 ADR-0024 ranker hook scaffolding
Adds the `Ranker` plug-in point ADR-0024 §ranker-layer
specified. The grammar tree declares *what's valid*; the
ranker decides *what's likely useful first*. Default
`identity_ranker` preserves declaration order from the
grammar.

API:
- `pub type Ranker = fn(Vec<Candidate>) -> Vec<Candidate>;`
- `pub const fn identity_ranker(c) -> Vec<Candidate>` returns
  its input unchanged.
- `candidates_at_cursor_with(input, cursor, cache, ranker)`
  applies a custom ranker; the default `candidates_at_cursor`
  delegates with `identity_ranker`.

Three new tests cover identity preservation, custom reordering,
and the empty-list-collapses-to-None edge.

This is a future-work hook — no production caller passes a
non-identity ranker yet. Hooks for frequency-based ranking,
content-aware priors, or recency plug in here without touching
the grammar declarations.

Tests: 809 passing, 0 failing, 1 ignored. Clippy clean.
2026-05-15 17:28:11 +00:00
2026-05-15 17:28:11 +00:00
2026-05-07 11:17:58 +00:00
S
Description
No description provided
15 MiB
v0.1.0 Latest
2026-06-15 17:57:18 +01:00
Languages
Rust 97.4%
MDX 1.3%
JavaScript 0.8%
Astro 0.2%
CSS 0.1%
Other 0.1%