1.6 KiB
1.6 KiB
name, description
| name | description |
|---|---|
| datastore-nutrition-logging | Log nutrition intake via datastore CLI; verify kind and repair mis-parsed events. |
Datastore Nutrition Logging
Log consumed food to the datastore CLI and repair events that landed under the wrong kind.
Steps
- Log an item: run
uv run /home/node/mop-skills/mop-skills/skills/datastore/scripts/datastore.py add nutrition.intake --subject <person> --actor agent:koch --payload '{"item": "...", "qty": 250, "unit": "g", "protein_g": 7.5, "carbs_g": 87.5, "fat_g": 27.5, "kcal": 625.0}' --estimatedPassnutrition.intakeas the positional argument and--estimatedas a bare flag with no value. Done when the response containsfeedback.day_total_formatted. - Verify the kind: run
... datastore.py query "SELECT id, kind, start, payload FROM events WHERE subject='<person>' AND start >= '<YYYY-MM-DD>'". Done when the new event showskind = "nutrition.intake". If it shows another kind (e.g."true"), a flag value was parsed as the positional kind. - Repair a mis-kinded event: delete its line from
/home/node/.openclaw/wiki/main/data/events/<wrong-kind>/YYYY-MM.jsonl, remove the now-empty<wrong-kind>/directory, then re-run step 1. Done when step 2 passes. - Refresh the read-only views: run
PYTHONPATH=/home/node/mop-skills/mop-skills/skills/datastore/scripts uv run /home/node/mop-skills/mop-skills/skills/datastore/scripts/render_views.py. Done when it prints the rendered nutrition-log paths. - Report the day total from
feedback.day_total_formatted; never compute macros by hand.