Replaces snooze-rate heuristic with p50 of actual task lateness (completedAt − dueAt).
Adds project_realness inference: projects with chronic lateness get realness < 1 and
the agent softens its snippet language from "overdue" to "past target date".
- TaskCompletion added to UserHistory with lateness_days computed property
- _infer_lateness_tolerance: p50 of task_completions, clipped at 0, float
- _infer_project_realness: per-project median lateness normalised by global median
- Both InferredParams use 7d TTL; cold_start = 0.0 / {}
- AgentInferRequest accepts task_completions; endpoint wires them through
- 12 new tests covering punctual/chronic/mixed users and language softening
- Agent bumped to v1.2.0
Closes #115
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 lines
397 B
Python
10 lines
397 B
Python
"""Shared context-inference framework (ADR-0014 §3, issue #111).
|
|
|
|
Each agent's manifest declares InferredParams; this package owns the
|
|
scheduling contract, history data model, and write path to user_preferences.
|
|
"""
|
|
from .framework import run_inference
|
|
from .history import FeedbackEvent, TaskCompletion, UserHistory
|
|
|
|
__all__ = ["run_inference", "FeedbackEvent", "TaskCompletion", "UserHistory"]
|