plan-audit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePlan 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)
审核工作流
-
Locate the plan
- Prefer (local, not in repo).
docs/codex-plans/<plan>.md - If unclear, ask for the plan path or the WI list.
- Prefer
-
Extract audit checklist
- For each WI, list:
- Goal
- Acceptance criteria
- Tests required
- Touched areas (files/symbols)
- For each WI, list:
-
Map implementation to WIs
- Use ,
git log,git show --stat, and file inspection.rg - Record which files/commits satisfy each WI.
- Use
-
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.
-
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
-
定位计划
- 优先使用本地的(不在代码仓库中)。
docs/codex-plans/<plan>.md - 若不明确,询问计划路径或工作项列表。
- 优先使用本地的
-
提取审核检查清单
- 针对每个工作项(WI),列出:
- 目标
- 验收标准
- 所需测试
- 涉及范围(文件/符号)
- 针对每个工作项(WI),列出:
-
将实现映射到工作项
- 使用、
git log、git show --stat和文件检查。rg - 记录哪些文件/提交满足每个工作项的要求。
- 使用
-
差距与正确性分析
- 对照实际行为检查每个验收项。
- 找出逻辑错误、边缘用例失败和不完整的流程。
- 根据“Tests (first)”部分验证测试覆盖率。
- 若计划引用了规范,验证实现是否符合这些规范。
- 若计划缺少验收标准/测试,记录为计划质量差距。
-
报告发现结果
- 按严重程度排序:关键→高→中→低。
- 每个发现必须包含:
- 工作项(WI)引用
- 文件路径+行号
- 违反计划的原因
- 计划要求的预期行为
Output Format (required)
输出格式(必填)
- Findings (ordered by severity)
- and WI reference
File:line - 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.
- 除非用户明确要求,否则不要在此处运行测试;这只是检查环节。
- 严格关注规范偏差:若行为与计划文本不符,标记出来。
- 若无法定位计划,停止操作并询问用户。