Logics Doc Fixer
Quick start
Run a dry scan first, then apply fixes:
python logics/skills/logics-doc-fixer/scripts/fix_logics_docs.py
python logics/skills/logics-doc-fixer/scripts/fix_logics_docs.py --write
To target specific docs:
python logics/skills/logics-doc-fixer/scripts/fix_logics_docs.py logics/request/req_001_example.md --write
What it fixes
- Ensures minimum indicators exist:
- Requests:
From version,Understanding,Confidence - Backlog/tasks: plus
Progress - Product briefs:
Date,Status, related refs,Reminder - Architecture docs:
Date,Status,Drivers, related refs,Reminder
- Requests:
- Preserves all existing indicator lines (for example
Status,Complexity,Theme,Reminder) and never removes them. - Auto‑updates Progress from checkbox completion in
# Plan(or# Acceptance criteriafor backlog if checkboxes exist). - Ensures required sections exist and adds placeholders when missing.
- Repairs references when possible:
- Backlog item notes include
Derived fromthe matching request (slug match). - Request
# Backlogsection lists derived backlog items (slug match). - Task
# ContextincludesDerived fromthe matching backlog item (slug match). - Product briefs and architecture docs backfill matching
Related ...refs when there is a unique slug match.
- Backlog item notes include
Options
--write: apply changes (default is dry-run)--no-progress: do not auto-updateProgress--repo-root: override repo root detection
Notes
- Matching is slug-based (e.g.,
req_005_my_feature↔item_012_my_feature). - If multiple matches exist, references are not auto-added to avoid bad links.
- Safety rule: do not perform destructive rewrites of indicator blocks. If indicators appear missing after a previous run, restore from git history (
HEAD) before any new edits.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.