feat: coaching-context tools (0.3.0) #6
Reference in New Issue
Block a user
Delete Branch "feat/coaching-context"
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?
0.3.0 — coaching context
Gives the AI coach the athlete's real training context (thresholds, structure) and
closes read/write gaps, per the plans attached to each milestone issue. Implements
the full 0.3.0 milestone: 11 new tools across 5 issues.
Closes #1, closes #2, closes #3, closes #4, closes #5.
Tools added
get_athlete_profile,get_sport_settings,get_athlete_summarysearch_activities,get_activity_best_efforts,get_activity_interval_statsget_workouts,get_workoutupdate_wellness_bulk,update_sport_settings(dual-guardrail)get_training_readinessNotable design points
q,stream,start/end index,recalcHrZones) and field names, no guessing.update_sport_settingsguards a risky threshold write: warning docstring +native
ctx.elicit()on capable clients + a hardconfirm=Truerefusal fallback(returns the old→new diff) for clients without elicitation. First tool to use
Context._wellness_payloadhelper backs both single and bulk wellness writes (aparity test proves they can't drift); bulk rejects the whole batch on any bad date.
get_training_readinessis pure-compute (utils/readiness.py, stdlib only),uses the cited Plews & Laursen lnRMSSD/SWC method, and withholds the verdict
when data is too sparse rather than fabricating one.
Also included
ci:fix so release notes are extracted from commitizen's## vX.Y.Z (date)changelog headings (was falling back to a stub).
Quality
ruffclean,mypyclean,pytest92.13% coverage (gate 90%); ~90 new tests.server.pyandtools/__init__.py.Intended delivery model: Claude Opus 4.8.
The release-notes awk start pattern was an unterminated prefix match ("## v0.3.0" also re-armed on "## v0.3.01"); escape dots and anchor on the trailing space. test_tool_auth's hand-counted matrix had drifted (update_wellness from 0.2.0 and all 11 new tools were missing). Add all 12 and replace the count guard with a comparison against the live mcp tool registry so drift fails loudly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NGzHtDvJur9U7ysgRKRUTN