bro2jo

ingest

Bring a new or updated real-world document into the Ledger — a PT note, a program, the working rules, a recovery-state checkpoint, an old log CSV, nutrition instructions, a sport plan — and update targets, schedule, phase and gates to match. Use whenever the user shares a plan, program, PT instructions or log file.

bro2jo 0 Updated 1w ago
GitHub

Install

npx skillscat add bro2jo/leyenda/ingest

Install via the SkillsCat registry.

SKILL.md

/ingest

  1. Read the whole document first. Decide what it is:
    • A PT or surgeon visit note (written or as he reports it): a new entry at the bottom of real/visits/pt_notes.md the same day, in the file's format (## YYYY-MM-DD (POD n) — Visit n — who; ### Progress note with the note word for word in a text block; ### Patient's account of the same visit; then a short reading: abbreviations, sign conventions, what an instruction changes). A relayed verbal instruction or a later clarification is its own entry, labelled patient-reported. Every measured number also goes to real/logs/measurements.csv (python3 engine/darrow.py measure add '[…]', one row per side, visit = YYYY-MM-DD_PTn); exercise rows to the exercise log with session=PT; daily_log gets pt=Y and a one-line notes pointer (pt_notes.md, DATE). Then NOW's top: which of State §5's questions it answered and any new ones, the gate, and "PT n outranks the State until the checkpoint folds it in".
    • An instruction from someone else (a trainer): real/visits/<date>_<who>_<kind>.md (what was said, what it changed); a session it moves goes to real/config.json → plan_changes with that file as the source.
    • Authority (master plan, Working Rules, Add-On, offseason_program_24_week.md, a new program): goes to real/plan/. A new version of a file already there replaces it: diff it against the file in place first and name in the reply anything the old one held that the new one no longer does (a rule, a dose, a fact) and where it went; anything that went nowhere is asked about, not dropped silently. The master plan and the off-season program are never edited, so a new copy should differ only in whitespace: say so if it doesn't. The settings deny edits to the four reference documents (the master plan, the off-season program, the ultimate guide, the nutrition guide), so a new version replaces its file with git mv <upload> real/plan/<name>.md, never an edit. A new authority is saved under the naming rules (real/README.md → Naming rules: lowercase snake_case, no ACL_ prefix; its title keeps the original name and version), gets markdown ## headings for its numbered sections (wording unchanged) so doc can read it a section at a time, a doc name in engine/darrow.py if it will be read often, and a row in real/README.md. A changed rule or section number is followed through CLAUDE.md, the skills, real/config.json (weekly_template, optional_from, daily_minimum, conditioning) and engine/rules.json. A copy that lands at the repo root or in real/ (or as … (2).md) is moved into place under the canonical name.
    • A recovery-state or program file from elsewhere (a PT's program, an outside plan): its program goes into the current State in the State's own ten sections (sections 2, 4 and 8 stay pointers: python3 engine/darrow.py doc state shows the shape), as a mid-week revision under the week's Sunday name; its measurements go to measurements.csv, a week in review to the matching real/checkpoints/<Sunday>.md. The State's §6 week and config.json (weekly_template_history for this week, plan_changes, optional_from) must agree, so today and week show the same plan.
    • Log (e.g., an older nutrition log, another export of the old dashboard's daily log): merge into the matching file in real/logs/ by date. Map columns to the current schema, never duplicate a date, and fill only blank fields; where it contradicts what the repo logged from his own message, the repo's record stands and the reply names the difference. A file in another schema is also kept verbatim in real/logs/archive/ with its column map in real/logs/archive/README.md (a new column gets a daily_log.csv column in engine/darrow.py → COLS); its long notes stay there, not in a cell. A copy of exercise_log.csv (same schema): its rows replace the repo's for the dates where they differ (check every earlier date is identical first, and that no date logged here is missing from it). A correction that changes a loaded day, floor or check is named in the commit and the reply, with its Reckoning change. Run python3 engine/darrow.py check, then sync.
    • A new nutrition guide: replaces real/plan/nutrition_guide.md whole (an authority, above); targets it changes go to real/config.json → nutrition_targets with their source.
    • Sport material: hand over to /sport.
  2. Update what it changes, citing the document in each source/evidence field:
    • real/config.json: nutrition targets, weekly_template, rehab.current_phase, next_gate, knot_gates, milestones.
    • CLAUDE.md → Golden rule 1's source-priority list, if it's a new authority.
    • the top section of real/NOW.md (plan in force, next PT visit and its questions, the gate, flags).
  3. Contradictions: if it conflicts with something already here (dates, doses, targets), the source priority in CLAUDE.md decides. Say plainly what changed and what you couldn't reconcile, and ask one question if needed.
  4. Never touch the story here. If it ties a Knot (a gate passed with PT/surgeon clearance or measured criteria), record it with python3 engine/darrow.py knot tie …, then python3 engine/saga.py now: its KNOT line says when the Book's transition falls due. Only when it says at this chapter's climax are the week's remaining planned slots re-planned toward the crossing (python3 engine/saga.py plan slot N key=value …: plan, kind, beat or quest+stage, micro as JSON; then python3 engine/saga.py check); when it says the transition waits some chapters, this week's plan stands and the next checkpoint plans the crossing chapter by the arc's compress rule.
  5. python3 engine/darrow.py ship -m "ingest: <file>" (it syncs, checks, builds, commits and pushes).
  6. Reply: what the document is, what it changed (targets, schedule, gates), and anything still open. Real only.