This content has not been translated yet.

Coaching adherence monitor — automatic daily fiches from signals

Automated system that generates day-by-day fiches tracking all coaching-relevant metrics, populated from the signals system.

Problem

Coaching plans exist as garden notes (health coaching, breathing, nutrition, etc.) but there is no systematic way to verify day-by-day adherence. Currently, checking whether guidelines are being followed requires manually cross-referencing signals against coaching plans — tedious and easy to skip.

Core idea: the plan IS the tracking spec

Coaching plans are living documents created and updated by LLMs. The key insight is that when an LLM writes or revises a coaching plan, it should simultaneously declare what signals to watch — making the plan itself a machine-readable tracking specification. No separate configuration is needed.

This works because signal categories are already defined at the API level (sports, breathing, meditation, supplements, alcohol, cannabis, eating, etc.). The LLM just needs to associate each measurable goal with the right category and define what “adherence” means for that goal.

Plan

1. coaching_metrics frontmatter convention

Coaching notes gain an optional coaching_metrics field in their YAML frontmatter. Each entry links a human-readable pillar to a signal category with concrete targets:

coaching_metrics:
  - pillar: "Cardio"
    signal_category: "sports"
    match_activity: ["bellicon", "marche", "vélo", "natation"]
    frequency: "3/week"
    duration_min: 30
  - pillar: "Résistance"
    signal_category: "sports"
    match_activity: ["élastiques", "musculation"]
    frequency: "2/week"
    duration_min: 20
  - pillar: "Respiration"
    signal_category: "breathing"
    frequency: "2/day"
    duration_min: 5
  - pillar: "Suppléments"
    signal_category: "supplements"
    frequency: "1/day"
  - pillar: "Alcool"
    signal_category: "alcohol"
    max_per_day: 1
  - pillar: "Méditation"
    signal_category: "meditation"
    frequency: "1/day"

This is not validated by the Astro content schema — it’s free-form YAML read only by the Python adherence script. The LLM populates it when creating or updating a coaching plan, and evolves it as the plan changes. If a coaching plan adds a new pillar, the LLM adds a matching coaching_metrics entry. If a target is adjusted, the entry is updated.

2. Adherence script — tools/signals/adherence.py

A Python module that:

  1. Discovers plans — scans garden notes for files tagged coaching that have coaching_metrics in frontmatter (using the existing frontmatter parser)
  2. Queries signals — calls SignalStore.list_signals(since=day_start, until=day_end) for the target day
  3. Matches signals to metrics — maps each signal to the relevant metric entry by signal_category, optionally filtering by match_activity (substring match on the signal’s activity detail field)
  4. Evaluates adherence — for each metric, determines status:
    • ✓ target met (frequency/duration satisfied)
    • ⚠️ partial (some activity but below target)
    • ✗ missed (no matching signals)
    • For max_per_day metrics like alcohol: ✓ if at or below limit, ✗ if exceeded, ✓ if no signals (absence = compliance)
  5. Generates a daily fiche — writes a private draft garden note coaching-adherence-YYYY-MM-DD.md

3. Daily fiche format

---
title: "Adhérence coaching — 2026-03-29"
date: 2026-03-29
draft: true
private: true
locale: fr
tags: [coaching, adherence]
---

## Respiration
- Cible : 2×/jour, 5min
- Relevé : 1× matin (5min coherent-breathing) ✓ / soir ✗
- Adhérence : 50%

## Cardio
- Cible : 3×/semaine, 30min
- Relevé : 20min bellicon ✓
- Semaine en cours : 1/3

## Suppléments
- Cible : quotidien
- Relevé : aucun signal ✗

## Alcool
- Cible : ≤1 verre
- Relevé : aucun signal ✓

4. Pipeline integration

Add as a step in scripts/run_akita_pipeline.sh after the git signal scan:

# Generate coaching adherence fiche for yesterday
log_step adherence START
if ! "$PYTHON_BIN" -m tools.signals.adherence; then
  log_step adherence FAIL
fi
log_step adherence DONE

5. LLM workflow

When creating or updating a coaching plan via MCP (garden__update_note or garden__create_note):

  • The LLM writes the prose plan as usual (pillars, rationale, weekly tables)
  • It also populates coaching_metrics in frontmatter, linking each measurable pillar to a signal category
  • As the plan evolves (new goals, adjusted targets, dropped pillars), the LLM updates coaching_metrics accordingly
  • The adherence script is stateless — it always reads the current plan, so changes take effect immediately

6. Bootstrap

  • Add coaching_metrics to sante-coaching-cholesterol.md frontmatter (first coaching plan to track)
  • Create tools/signals/adherence.py
  • Add pipeline step
  • No Astro schema changes needed (coaching_metrics is opaque to the content layer)