Repair workflow

Use this workflow when a daily log is malformed, duplicated, missing canonical sections, or still carrying migration-era structure.

Repair goals

  • restore canonical section order
  • move content into the correct owned section
  • remove contradictory duplicates
  • preserve verbatim athlete-facing message bodies
  • keep workflow metadata in ## System

Repair sequence

  1. Read the full current daily log.
  2. Identify missing, duplicated, or misplaced sections.
  3. Identify whether content is role-owned, coordinator-owned, athlete-facing, or system metadata.
  4. Rebuild the smallest affected region that restores the contract.
  5. Preserve unaffected content.
  6. Add a concise ## System event noting the repair pass when the change is material.

Common repairs

Missing ## System

Add the section in canonical order near the bottom of the file, before ## Notes and ## Open items. Do not bury workflow events inside ## Messages or role sections.

Misplaced athlete-facing message

Move the exact outbound text into ## Messages under the correct ### heading inside a ~~~ fenced block. Move delivery metadata out of the code block and into ## System or below the block.

Mixed-role content under ## Coach Luca

Move endurance, recovery, strength, or nutrition analysis into the correct role section unless the content is clearly coordinator synthesis.

Duplicate versions of the same plan or summary

Keep the current canonical version and remove stale contradictory duplicates. If both versions matter historically, preserve the verbatim outbound message in ## Messages and summarize the workflow history in ## System.

Old migration-era wrapper headings

Remove wrappers such as ### YYYY-MM-DD or - Date: YYYY-MM-DD from role sections.

Caution

Do not rewrite specialist reasoning casually during repair. Normalize structure first, then make content edits only where the task requires them.