feat(daemon): usefulness tiebreaker in priming rank#23
Merged
Conversation
Fold the fired-helpful/fired ratio into priming's ranking as a small, prior-centered TIEBREAKER (_boost_with_reinforcement). It's a Beta-smoothed, centered estimate so a zero-data entry contributes exactly 0 (clean cold-start) and the swing is bounded (~+0.08 / -0.02 logits): it only reorders candidates the cross-encoder reranker already considers comparable, never overriding a real relevance gap. The weight is deliberately small and uncalibrated until fired-helpful accrues data; an in-code TODO lists the growth path (evidence-gating, ignored-penalty-into-decay, RIF, common-scale normalisation, telemetry). Also adds a decay.py TODO: bare surfacing currently resists decay as much as helpful surfacing, so chronically-ignored entries never fade — captures the "reset half-life on useful surface" direction and the "sum, don't max, counters on merge" caution. Bumps the project status from pre-alpha to beta. Tests: usefulness tiebreaker breaks ties and cannot override a clear rerank gap; _usefulness_score cold-start / garbage / sign coverage; conftest gains optional fired / fired_helpful fields. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Tier-1 ranking now consumes fired-helpful/fired as a gentle usefulness tiebreaker (was "nothing yet consumes the counter"); updated the Tier-1 table, the graph section, the roadmap signal list, and the prefrontal-inhibition mechanism row (retrieval-ranking half shipped, fired wired; decay-resistance + negative half still TODO). - Status counts: daemon 623->643, hooks 68->259 (stale), total ->1076. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The ultan-search skill / fetch_entry RPC appended `.md` to every path and stripped trailing slashes, so a folder path like `projects/research` (or `projects/research/`) resolved to the non-existent `projects/research.md` and 404'd instead of browsing the folder. An agent that passed a folder path to drill into a topic hit "entry not found: projects/research.md". Now a bare folder path (with or without a trailing slash) resolves to that folder's README.md: try `<raw>.md` first, then `<raw>/README.md`. An explicit `.md` suffix is still always an entry. The not-found error lists what was tried and suggests a free-text query. Tests: folder path (no slash) and trailing-slash form both resolve to the folder README with the folder's entries as siblings. (README status count bumped 643->645 for the two new tests.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Folds the
fired-helpful / firedratio into priming's ranking as a small, prior-centered tiebreaker — usefulness only reorders candidates the cross-encoder reranker already considers comparable; it can never override a real relevance gap.Why a tiebreaker, not a weight
The decay/LTD design warns that ranking by usefulness creates a self-reinforcing surfacing loop (surface → accrue helpful → rank higher → surface more). Keeping it gentle prevents runaway; the reranker stays in charge of applicability.
Behaviour
fired-helpfulis ~0 library-wide until the 2026-06 capture accrues data. An in-code TODO lists the growth path (evidence-gating, ignored-penalty→decay, RIF, common-scale normalisation, telemetry).Also
decay.pyTODO: bare surfacing currently resists decay as much as helpful surfacing — captures the "reset half-life on useful surface" direction (plus "sum, don't max, counters on merge").Tests
643 passed, ruff clean, pyright 0 errors, coverage 90.39%. New: tiebreaker breaks ties and cannot override a clear rerank gap;
_usefulness_scorecold-start / garbage / sign coverage.🤖 Generated with Claude Code