Multi-Criteria Lexicographic Next-Task Ranking #23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implement the multi-criteria lexicographic ranking engine for next-task candidates, sorting policy-filtered tasks by explicit hard-deadline urgency, unmet weekday career floor status, Jev semantic scores (
alignment.v1,consequence.v1,readiness.v1), and stable item IDs. Return at most three candidates with rigorously separated factual reasons, semantic reasons, unknowns, and model provenance.Background & Technical Rationale
After candidate tasks are validated and filtered by the deterministic policy filter (#022), the eligible candidates must be ordered to produce a concise, actionable recommendation.
Rather than collapsing disparate dimensions into an opaque weighted numerical formula or prompting an LLM to "pick the best task", Life enforces an explicit lexicographical hierarchy:
deadline < current_time). Sorted by earliest deadline first.current_time <= deadline <= current_time + window). Sorted by earliest deadline first.deadline > current_time + window). Sorted by earliest deadline first.career_floor_met == false), tasks categorized witharea-careerare prioritized among otherwise tied urgency candidates.alignment.v1score (weighted mean against legend levels, high to low).consequence.v1score (weighted mean against legend levels, high to low).readiness.v1score (weighted mean against legend levels, high to low).item.id.cmp(&other.id)), ensuring absolute reproducibility across evaluations.factual_reasons: Objective calendar and policy facts (e.g."Overdue by 1h 30m","Estimated duration (45m) fits 90m window","Matches unmet weekday career floor").semantic_reasons: Jev score evaluations citing specific question versions and numeric ratings (e.g."alignment.v1 score 8.4/10: Strongly aligns with active Q2 deliverables","consequence.v1 score 7.2/10").unknowns: Explicit list of missing attributes (e.g.["estimated_minutes"]).judgment_provenance: Model ID (jev-1.13.0), evaluation timestamps.judgment_unavailable. The resulting list must NEVER be presented as a semantic ranking (Scenario I07, W07).Exact Technical References & Specifications
Normative Next-Task Policy Specification
From
docs/technical/jev.md(lines 38–42):Workflow Contract
From
docs/technical/workflows.md(lines 27, 44):Verification Scenario W07
From
docs/technical/verification.md(line 21):What to Build
1.
src/domain/policy/next_task_ranker.rscompare_jev_scores:alignment(descending: higher score first).consequence(descending).readiness(descending).None(degraded mode), returnsOrdering::Equal.2.
src/jev/scorer.rs— Batch Candidate Scorerdocs/technical/cli-api.md:73). If candidate limits are exceeded, disclose narrowing warnings.alignment.v1,consequence.v1, andreadiness.v1for each candidate task.JevService.semantic_reasons.JevServicereturnsjudgment_unavailable, attachesNoneforjev_scoresand records warning.3. Unit & Comparator Tests (
tests/ranker_tests.rs)Acceptance Criteria
area-careertask breaks ties ahead of non-career tasks with identical deadline urgency.factual_reasonsandsemantic_reasonsarrays.judgment_unavailable.Notes
MAX_SCORED_CANDIDATES = 20applied to the factual order, disclosed ascandidate_narrowed; all candidates are still returned, unjudged ones marked as such.RankingBasis::Deterministic) rather than blending a partial ranking.Cargo.tomlauthors chore lands with #35.Blocked by
Issue #023: Multi-Criteria Lexicographic Next-Task Rankingto Multi-Criteria Lexicographic Next-Task Ranking