AgentSkillsCN

logics-doc-fixer

对Logics的需求、待办事项或任务文档进行校验与修复(包括结构、必填指标以及交叉引用)。当Codex需要审计logics/request、logics/backlog或logics/tasks,排查缺失的章节或指标,自动更新复选框中的进度,并补全缺失的需求—>待办事项—>任务之间的关联时,这一流程不可或缺。

SKILL.md
--- frontmatter
name: logics-doc-fixer
description: Validate and repair Logics request/backlog/task docs (structure, required indicators, and cross‑references). Use when Codex should audit `logics/request`, `logics/backlog`, or `logics/tasks` for missing sections/indicators, auto-update Progress from checkboxes, and backfill missing request↔backlog↔task references.

Logics Doc Fixer

Quick start

Run a dry scan first, then apply fixes:

bash
python3 logics/skills/logics-doc-fixer/scripts/fix_logics_docs.py
python3 logics/skills/logics-doc-fixer/scripts/fix_logics_docs.py --write

To target specific docs:

bash
python3 logics/skills/logics-doc-fixer/scripts/fix_logics_docs.py logics/request/req_001_example.md --write

What it fixes

  • Ensures required indicators exist:
    • Requests: From version, Understanding, Confidence
    • Backlog/tasks: plus Progress
  • Auto‑updates Progress from checkbox completion in # Plan (or # Acceptance criteria for backlog if checkboxes exist).
  • Ensures required sections exist and adds placeholders when missing.
  • Repairs references when possible:
    • Backlog item notes include Derived from the matching request (slug match).
    • Request # Backlog section lists derived backlog items (slug match).
    • Task # Context includes Derived from the matching backlog item (slug match).

Options

  • --write: apply changes (default is dry-run)
  • --no-progress: do not auto-update Progress
  • --repo-root: override repo root detection

Notes

  • Matching is slug-based (e.g., req_005_my_featureitem_012_my_feature).
  • If multiple matches exist, references are not auto-added to avoid bad links.