Skip to content

Add --summary flag for compact agent-friendly nutrition snapshot #26

@ali5ter

Description

@ali5ter

Problem

The --report output is comprehensive but ~70+ lines for a 7-day window. Several use cases benefit from a denser format:

  1. Quick CLI glance — "how was this week?" in ~15 lines.
  2. AI assistant ingestion — feeding nutrition data to a health advisor, coach, or LLM. The long-form report consumes context tokens; a structured summary is cheaper and more parseable.
  3. Daily standup / journaling — a one-paragraph copy-paste.

Proposal

Add a --summary flag that emits a fixed-shape, ~15-line block. Example output (assumes [targets] configured per the targets-config issue):

wwlog summary  ·  2026-04-26 → 2026-05-02  ·  7 days

Calories      1713 kcal/day    target 1700–1900    ✓ in band (6/7 days)
Protein        160 g/day       target 130–150      ✓ above floor (7/7)
Carbs          148 g/day       target 158–228      ⚠ below floor (4/7)
Fat             58 g/day       target  31–54       ⚠ above ceiling (5/7)
Fiber           28 g/day       target ≥26          ✓ on target (5/7)
Sodium       1840 mg/day       target ≤2300        ✓ under ceiling (7/7)
Added sugar     18 g/day       target ≤35          ✓ under ceiling (7/7)
Points          20 / 23 avg    0 days over budget  ✓
Skipped meals    3   (lunch ×1, dinner ×2)
Eating window  09:24 → 19:48 avg  (target last meal ≤20:00)  ✓
Alcohol         24 fl oz beer (1 day, 11pt)

Format goals:

  • Fixed-width columns
  • One line per metric
  • Hit/miss marker per line
  • "Days on target" count where relevant
  • Plain ASCII for terminal-or-agent ingestion (no ANSI escapes by default; honour --color if added later)

Acceptance criteria

  • New --summary flag, mutually exclusive with --json and --report
  • Uses configured targets when present; falls back gracefully if not
  • Available as --export summary to file (extension .txt)
  • Documented in README under "Usage" and "Options"
  • Includes skipped-meal count and eating-window range when computable

Notes

  • Depends on the targets-config issue to deliver the hit/miss column.
  • Future variant: --for advisor could emit the same data with a short header explaining context, optimised for LLM ingestion.
  • "Skipped meals" should respect a configurable threshold (e.g., a meal with zero entries logged).

🤖 Generated with over-50s-health-advisor (Claude Code agent) on behalf of Alister

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions