plan-audit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Plan Audit

计划审核

Overview

概述

Audits completed work against a plan (WIs + acceptance + tests) and reports gaps, logic errors, and missing coverage with file/line references.
对照计划(工作项+验收标准+测试)审核已完成的工作,并附带文件/行号引用报告差距、逻辑错误和覆盖缺失情况。

Workflow (Audit)

审核工作流

  1. Locate the plan
    • Prefer
      docs/codex-plans/<plan>.md
      (local, not in repo).
    • If unclear, ask for the plan path or the WI list.
  2. Extract audit checklist
    • For each WI, list:
      • Goal
      • Acceptance criteria
      • Tests required
      • Touched areas (files/symbols)
  3. Map implementation to WIs
    • Use
      git log
      ,
      git show --stat
      ,
      rg
      , and file inspection.
    • Record which files/commits satisfy each WI.
  4. Gap & correctness analysis
    • Check each acceptance item vs actual behavior.
    • Find logic errors, edge-case failures, and incomplete flows.
    • Validate test coverage against the “Tests (first)” section.
    • If the plan references specs, verify implementation matches those specs.
    • If the plan is missing acceptance/tests, record it as a plan-quality gap.
  5. Report findings
    • Order by severity: Critical → High → Medium → Low.
    • Each finding must include:
      • WI reference
      • File path + line
      • Why it violates the plan
      • Expected behavior per plan
  1. 定位计划
    • 优先使用本地的
      docs/codex-plans/<plan>.md
      (不在代码仓库中)。
    • 若不明确,询问计划路径或工作项列表。
  2. 提取审核检查清单
    • 针对每个工作项(WI),列出:
      • 目标
      • 验收标准
      • 所需测试
      • 涉及范围(文件/符号)
  3. 将实现映射到工作项
    • 使用
      git log
      git show --stat
      rg
      和文件检查。
    • 记录哪些文件/提交满足每个工作项的要求。
  4. 差距与正确性分析
    • 对照实际行为检查每个验收项。
    • 找出逻辑错误、边缘用例失败和不完整的流程。
    • 根据“Tests (first)”部分验证测试覆盖率。
    • 若计划引用了规范,验证实现是否符合这些规范。
    • 若计划缺少验收标准/测试,记录为计划质量差距。
  5. 报告发现结果
    • 按严重程度排序:关键→高→中→低。
    • 每个发现必须包含:
      • 工作项(WI)引用
      • 文件路径+行号
      • 违反计划的原因
      • 计划要求的预期行为

Output Format (required)

输出格式(必填)

  • Findings (ordered by severity)
    • File:line
      and WI reference
    • Impact and suggested fix
  • Plan Gaps Summary
    • WI‑### → missing/partial acceptance items
  • Test Coverage Gaps
    • Missing tests, broken tests, or “test not written”
  • Notes / Risks
    • Any assumptions or unverified areas
  • Evidence
    • Cite concrete evidence for each finding (files/lines/commit IDs).
  • 发现结果(按严重程度排序)
    • 文件:行号
      和工作项(WI)引用
    • 影响和建议修复方案
  • 计划差距摘要
    • WI‑### → 缺失/部分验收项
  • 测试覆盖差距
    • 缺失测试、测试失败或“未编写测试”
  • 备注/风险
    • 任何假设或未验证的区域
  • 证据
    • 为每个发现引用具体证据(文件/行号/提交ID)。

Audit Rules

审核规则

  • Do not run tests here unless the user explicitly asks; this is an inspection pass.
  • Be strict about spec drift: if behavior diverges from plan text, flag it.
  • If you cannot locate the plan, stop and ask for it.
  • 除非用户明确要求,否则不要在此处运行测试;这只是检查环节。
  • 严格关注规范偏差:若行为与计划文本不符,标记出来。
  • 若无法定位计划,停止操作并询问用户。