check-plan
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCheck Plan Implementation
计划实施检查
Instructions
操作说明
Perform comprehensive audit of implementation progress against a plan, verify quality of completed work, and generate actionable task list for remaining items.
对照计划对实施进度进行全面审核,验证已完成工作的质量,并为剩余事项生成可执行任务清单。
Phase 1: Setup & Discovery
第一阶段:准备与调研
Step 1: Identify the Plan
步骤1:确定目标计划
- Ask user which plan to check (or identify from context)
- Read the plan ticket using (search with
tk show <ticket-id>)tk list --tag plan - Understand all plan items and requirements
- 询问用户要检查哪个计划(或从上下文识别)
- 使用 查看计划工单(可通过
tk show <ticket-id>搜索)tk list --tag plan - 理解所有计划项及要求
Step 2: Get Git Context (if applicable)
步骤2:获取Git上下文(如适用)
bash
undefinedbash
undefinedSee what files changed
查看已变更文件
git status
git status
See detailed changes
查看详细变更内容
git diff
git diff
See commit history on this branch
查看当前分支的提交历史
git log --oneline -20
This helps understand scope of changes made.git log --oneline -20
这有助于了解已完成变更的范围。Step 3: Identify All Affected Files
步骤3:识别所有受影响文件
Create comprehensive list:
- Files mentioned in the plan
- Files shown in
git status - Files that might be affected (use Glob/Grep)
Create todo list with one item per file to check.
生成完整列表:
- 计划中提及的文件
- 显示的文件
git status - 可能受影响的文件(使用Glob/Grep查找)
创建待办清单,每个待检查文件对应一项。
Phase 2: Systematic File-by-File Audit
第二阶段:按文件系统审核
For EACH file in the todo list:
对待办清单中的每个文件执行以下操作:
Step 1: Read the File
步骤1:读取文件
- Use Read tool to examine current state
- Check memory/context for any previous notes about this file
- 使用Read工具查看文件当前状态
- 检查内存/上下文是否有关于此文件的先前记录
Step 2: Map to Plan Items
步骤2:关联计划项
Identify which plan step(s) relate to this file:
- Which implementation steps mention this file?
- What changes were supposed to be made?
- What requirements from the plan apply here?
确定哪些计划步骤与该文件相关:
- 哪些实施步骤提到了此文件?
- 原本计划进行哪些变更?
- 计划中的哪些要求适用于此文件?
Step 3: Verify Implementation
步骤3:验证实施情况
Check if planned changes are present:
- ✅ DONE: Implementation matches plan requirements
- ⚠️ PARTIAL: Some work done, but incomplete
- ❌ NOT DONE: No implementation yet
- 🔍 NEEDS REVIEW: Implementation exists but may not match plan
For each file, assess:
- Are planned features implemented?
- Is code quality good?
- Are types used correctly (no )?
any - Does it follow AGENTS.md guidelines?
- Is it complete or partial?
检查计划的变更是否已落实:
- ✅ 已完成:实施符合计划要求
- ⚠️ 部分完成:已开展部分工作,但未全部完成
- ❌ 未启动:尚未开始实施
- 🔍 需评审:已完成实施,但可能不符合计划要求
针对每个文件,评估:
- 计划的功能是否已实现?
- 代码质量是否达标?
- 类型是否正确使用(无 类型)?
any - 是否遵循AGENTS.md指南?
- 工作是否全部完成或仅部分完成?
Step 4: Quality Verification
步骤4:质量验证
Check implementation quality:
- Correctness: Does it work as planned?
- Types: Proper typing, no , using existing types?
any - Naming: Follows conventions from plan?
- Architecture: Matches planned design?
- Completeness: All details from plan step implemented?
检查实施质量:
- 正确性:是否按计划正常工作?
- 类型规范:是否使用正确类型,无 类型,是否复用现有类型?
any - 命名规范:是否遵循计划中约定的命名规则?
- 架构设计:是否与计划的设计匹配?
- 完整性:计划步骤中的所有细节是否均已实现?
Step 5: Record Assessment
步骤5:记录评估结果
Store in memory:
File: path/to/file.ts
Plan Item: Step X - [description]
Status: [DONE|PARTIAL|NOT DONE|NEEDS REVIEW]
Notes: [What's good, what's missing, what needs fixing]
Quality Issues: [Any problems found]存储至内存:
文件:path/to/file.ts
计划项:第X步 - [描述]
状态:[已完成/部分完成/未启动/需评审]
备注:[优点、缺失内容、需修复问题]
质量问题:[发现的所有问题]Step 6: Update Todo
步骤6:更新待办清单
Mark file as checked in the todo list.
在待办清单中标记该文件已检查。
Phase 3: REMOVAL SPEC Verification
第三阶段:移除规范验证
CRITICAL: Verify old code was actually removed.
关键要求:验证旧代码是否已实际移除。
Step 1: Read REMOVAL SPEC from Plan
步骤1:读取计划中的移除规范
Extract all items listed for removal:
- Code to be removed (with file/line numbers)
- Files to be deleted
- Deprecated functions to eliminate
提取所有需移除的内容:
- 需移除的代码(含文件/行号)
- 需删除的文件
- 需淘汰的废弃函数
Step 2: Verify Each Removal
步骤2:验证每项移除操作
For each item in REMOVAL SPEC:
-
For code to remove:bash
# Check if old code still exists grep -n "old_function_name" path/to/file.ts- ✅ If not found: Code successfully removed
- ❌ If found: Code still exists (NOT DONE)
-
For files to delete:bash
# Check if file still exists ls path/to/old-file.ts- ✅ If not found: File successfully deleted
- ❌ If found: File still exists (NOT DONE)
-
For deprecated imports/references:bash
# Search entire codebase grep -r "old_symbol" src/- ✅ If not found: All references removed
- ❌ If found: References still exist (NOT DONE)
针对移除规范中的每个项:
-
针对需移除的代码:bash
# 检查旧代码是否仍存在 grep -n "old_function_name" path/to/file.ts- ✅ 未找到:代码已成功移除
- ❌ 找到:代码仍存在(未完成)
-
针对需删除的文件:bash
# 检查文件是否仍存在 ls path/to/old-file.ts- ✅ 未找到:文件已成功删除
- ❌ 找到:文件仍存在(未完成)
-
针对废弃的导入/引用:bash
# 在整个代码库中搜索 grep -r "old_symbol" src/- ✅ 未找到:所有引用已移除
- ❌ 找到:引用仍存在(未完成)
Step 3: Record Removal Status
步骤3:记录移除状态
- List what was supposed to be removed
- List what actually was removed
- Flag any items not removed as HIGH PRIORITY tasks
- 列出计划中要求移除的内容
- 列出实际已移除的内容
- 将未移除的项标记为高优先级任务
Phase 3.5: Original Issue/Task Coverage Verification (MANDATORY)
第三阶段补充:原始需求/任务覆盖验证(必填)
CRITICAL: Verify that the implementation covers 100% of the ORIGINAL issue/task requirements, not just the plan steps.
关键要求:验证实施是否100%覆盖原始需求/任务的所有要求,而非仅覆盖计划步骤。
Step 1: Locate Original Issue/Task
步骤1:定位原始需求/任务
Find the source requirement:
- GitHub issue that triggered this plan:
gh issue view <number> - Original task description or ticket
- User request that initiated the work
查找源头需求:
- 触发该计划的GitHub议题:
gh issue view <number> - 原始任务描述或工单
- 发起此项工作的用户请求
Step 2: Extract ALL Original Requirements
步骤2:提取所有原始需求
From the original issue/task, extract:
- Every functional requirement
- Every acceptance criterion
- Every edge case mentioned
- Every error handling requirement
- Any implicit requirements
从原始需求/任务中提取:
- 每一项功能需求
- 每一条验收标准
- 提及的每一个边缘场景
- 每一项错误处理要求
- 任何隐含需求
Step 3: Map Requirements to Implementation
步骤3:将需求映射至实施情况
| # | Original Requirement | Plan Step | Implementation Status |
|---|---|---|---|
| 1 | [from issue] | Step X | ✅/❌/⚠️ |
| 2 | [from issue] | Step Y | ✅/❌/⚠️ |
| 3 | [from issue] | N/A (missing from plan!) | ❌ |
| 序号 | 原始需求 | 计划步骤 | 实施状态 |
|---|---|---|---|
| 1 | [来自议题的内容] | 第X步 | ✅/❌/⚠️ |
| 2 | [来自议题的内容] | 第Y步 | ✅/❌/⚠️ |
| 3 | [来自议题的内容] | 无(计划中未包含!) | ❌ |
Step 4: Identify Coverage Gaps
步骤4:识别覆盖缺口
Two types of gaps:
- Plan gaps: Requirements from issue that weren't captured in plan
- Implementation gaps: Plan steps that weren't fully implemented
Both count toward incomplete coverage.
两类缺口:
- 计划缺口:议题中的需求未被纳入计划
- 实施缺口:计划步骤未被完整实施
两类缺口均属于未完成覆盖。
Step 5: Coverage Assessment
步骤5:覆盖情况评估
Issue Coverage = (Implemented Original Requirements / Total Original Requirements) × 100%Anything less than 100% = PLAN NOT COMPLETE
议题覆盖率 = (已实现的原始需求数量 / 总原始需求数量) × 100%低于100% = 计划未完成
Phase 4: Gap Analysis
第四阶段:缺口分析
Step 1: Identify Scope Creep
步骤1:识别范围蔓延
Files changed that are NOT in the plan:
- Why were they changed?
- Were changes necessary?
- Should plan be updated to reflect them?
检查计划中未提及但已变更的文件:
- 为何变更这些文件?
- 变更是否必要?
- 是否应更新计划以反映这些变更?
Step 2: Identify Missing Work
步骤2:识别未完成工作
Plan items without corresponding implementation:
- Which steps haven't been started?
- Which steps are partially complete?
- What's blocking completion?
检查无对应实施的计划项:
- 哪些步骤尚未启动?
- 哪些步骤仅部分完成?
- 完成工作的阻碍是什么?
Step 3: Identify Issue Coverage Gaps (HIGH PRIORITY)
步骤3:识别需求覆盖缺口(高优先级)
Requirements from original issue not in implementation:
- Which issue requirements are missing?
- Were they missed in planning or implementation?
- These are HIGHER PRIORITY than plan step completion
检查未在实施中体现的原始议题需求:
- 哪些议题需求缺失?
- 是在规划阶段还是实施阶段遗漏的?
- 这些缺口的优先级高于计划步骤的完成情况
Phase 5: Build Progress Report
第五阶段:生成进度报告
Step 1: Calculate Completion Percentage
步骤1:计算完成率
Total Plan Steps: X
Completed Steps: Y
Partial Steps: Z
Not Started: W
Completion: (Y / X) * 100%
Weighted Completion: ((Y + 0.5*Z) / X) * 100%总计划步骤数:X
已完成步骤数:Y
部分完成步骤数:Z
未启动步骤数:W
完成率:(Y / X) * 100%
加权完成率:((Y + 0.5*Z) / X) * 100%Step 2: Generate Structured Report
步骤2:生成结构化报告
Add a progress note to the plan ticket using , or create a separate progress report:
tk add-note <ticket-id> "<progress>"markdown
undefined使用 向计划工单添加进度备注,或创建独立的进度报告:
tk add-note <ticket-id> "<progress>"markdown
undefinedPlan Progress Report: [Plan Name]
计划进度报告:[计划名称]
Date: [timestamp]
Plan File: [path]
Status: [In Progress | Ready for Review | Completed]
日期:[时间戳]
计划文件:[路径]
状态:[进行中 | 待评审 | 已完成]
Summary
摘要
- Overall Completion: X%
- Steps Complete: Y / Total
- Steps Partial: Z
- Steps Not Started: W
- Critical Issues: N
- 整体完成率:X%
- 已完成步骤:Y / 总步骤数
- 部分完成步骤:Z
- 未启动步骤:W
- 关键问题:N
Progress by Plan Step
各计划步骤进度
✅ Step 1: [Description]
✅ 步骤1:[描述]
Status: DONE
Files: [list]
Notes: [Any relevant notes]
状态:已完成
涉及文件:[列表]
备注:[相关说明]
⚠️ Step 2: [Description]
⚠️ 步骤2:[描述]
Status: PARTIAL (60% complete)
Files: [list]
Completed:
- [What's done] Remaining:
- [What's not done] Issues: [Any problems]
状态:部分完成(完成60%)
涉及文件:[列表]
已完成内容:
- [已完成项] 剩余内容:
- [未完成项] 问题:[存在的问题]
❌ Step 3: [Description]
❌ 步骤3:[描述]
Status: NOT DONE
Blocking: [What's blocking this]
状态:未启动
阻碍因素:[阻碍完成的原因]
REMOVAL SPEC Status
移除规范执行状态
✅ Completed Removals
✅ 已完成移除
- from
old_function- Successfully removedfile.ts - - Successfully deleted
old-file.ts
- 从
old_function中移除 - 成功完成file.ts - - 已成功删除
old-file.ts
❌ Pending Removals (HIGH PRIORITY)
❌ 待完成移除(高优先级)
- from
legacy_code- STILL EXISTSfile.ts:lines 50-100 - - FILE STILL EXISTS
deprecated-helper.ts
Critical: Old code must be removed before plan can be marked complete.
- 在
legacy_code- 仍存在file.ts:50-100行 - - 文件仍存在
deprecated-helper.ts
关键提示:旧代码必须全部移除后,计划才可标记为完成。
Quality Assessment
质量评估
Passed
合格项
- ✅ TypeScript types used correctly
- ✅ AGENTS.md naming conventions followed
- ✅ Architecture matches plan
- ✅ TypeScript类型使用正确
- ✅ 遵循AGENTS.md命名规范
- ✅ 架构与计划匹配
Issues Found
发现的问题
- ⚠️ type used in
any(should use existing type)file.ts:42 - ⚠️ Missing error handling in step 5 implementation
- ⚠️ 使用了
file.ts:42类型(应使用现有类型)any - ⚠️ 步骤5的实施中缺少错误处理
Files Changed
已变更文件
Planned Changes (from plan)
计划内变更
- ✅ - DONE
path/to/file1.ts - ⚠️ - PARTIAL
path/to/file2.ts - ❌ - NOT DONE
path/to/file3.ts
- ✅ - 已完成
path/to/file1.ts - ⚠️ - 部分完成
path/to/file2.ts - ❌ - 未启动
path/to/file3.ts
Unplanned Changes (scope creep)
计划外变更(范围蔓延)
- - Why: [reason]
path/to/unexpected.ts
- - 原因:[说明]
path/to/unexpected.ts
Remaining Work
剩余工作
High Priority
高优先级
-
Remove old code (REMOVAL SPEC items)
- Remove from
legacy_codefile.ts - Delete
deprecated-helper.ts
- Remove
-
Complete Step 3
- Implement [specific requirement]
- Add proper types
-
完成移除规范项(移除旧代码)
- 移除 中的
file.tslegacy_code - 删除
deprecated-helper.ts
- 移除
-
完成步骤3
- 实现[具体需求]
- 添加正确类型
Medium Priority
中优先级
- Fix quality issues
- Replace in
anyfile.ts:42 - Add error handling in step 5
- Replace
- 修复质量问题
- 替换 中的
file.ts:42类型any - 为步骤5添加错误处理
- 替换
Low Priority
低优先级
- Polish
- [Minor improvements]
- 优化完善
- [次要改进项]
Validation Status
验证状态
Pre-Validation
预验证检查
- All plan steps completed
- All REMOVAL SPEC items removed
- TypeScript compiles
- Linting passes
- No types added
any
Ready for Final Validation: NO (pending items remain)
- 所有计划步骤已完成
- 所有移除规范项已完成
- TypeScript编译通过
- 代码检查通过
- 未新增 类型
any
是否可进行最终验证:否(仍有待办项)
Next Steps
下一步计划
- Complete REMOVAL SPEC items (remove old code)
- Finish Step 3 implementation
- Fix quality issues
- Run validation checks
- Update plan status when 100% complete
undefined- 完成移除规范项(移除旧代码)
- 完成步骤3的实施
- 修复质量问题
- 执行验证检查
- 100%完成后更新计划状态
undefinedPhase 6: Validation Checks
第六阶段:验证检查
Step 1: Run TypeScript Check
步骤1:执行TypeScript检查
bash
undefinedbash
undefinedRun type checking
运行类型检查
npm run typecheck
npm run typecheck
or
或
tsc --noEmit
Record results:
- ✅ Passes: Good to go
- ❌ Errors: List errors, add to remaining worktsc --noEmit
记录结果:
- ✅ 通过:符合要求
- ❌ 错误:列出错误,添加至剩余工作Step 2: Run Linting
步骤2:执行代码检查
bash
undefinedbash
undefinedRun linter
运行代码检查工具
npm run lint
npm run lint
or
或
eslint .
Record results:
- ✅ Passes: Good to go
- ⚠️ Warnings: List warnings
- ❌ Errors: List errors, add to remaining workeslint .
记录结果:
- ✅ 通过:符合要求
- ⚠️ 警告:列出警告
- ❌ 错误:列出错误,添加至剩余工作Step 3: Run Build (if applicable)
步骤3:执行构建(如适用)
bash
npm run buildEnsure build succeeds.
bash
npm run build确保构建成功。
Phase 7: Generate Task List
第七阶段:生成任务清单
Create actionable todo list for remaining work:
markdown
undefined为剩余工作创建可执行待办清单:
markdown
undefinedRemaining Tasks for [Plan Name]
[计划名称]剩余任务
Critical (Must Do)
关键任务(必须完成)
- Remove from
legacy_code(REMOVAL SPEC)file.ts:50-100 - Delete (REMOVAL SPEC)
deprecated-helper.ts - Complete Step 3: [description]
- 移除 中的
file.ts:50-100(移除规范项)legacy_code - 删除 (移除规范项)
deprecated-helper.ts - 完成步骤3:[描述]
Important (Should Do)
重要任务(应该完成)
- Fix TypeScript error in
file.ts:42 - Add error handling in step 5
- 修复 中的TypeScript错误
file.ts:42 - 为步骤5添加错误处理
Polish (Nice to Have)
优化任务(建议完成)
- [Minor improvement]
- [次要改进项]
Validation
验证任务
- TypeScript passes ()
npm run typecheck - Linting passes ()
npm run lint - Build succeeds ()
npm run build - All REMOVAL SPEC items removed
When all tasks complete: Close the plan ticket with
tk close <ticket-id>undefined- TypeScript检查通过 ()
npm run typecheck - 代码检查通过 ()
npm run lint - 构建成功 ()
npm run build - 所有移除规范项已完成
所有任务完成后:使用 关闭计划工单
tk close <ticket-id>undefinedPhase 8: Report to User
第八阶段:向用户汇报
Provide concise summary:
markdown
undefined提供简洁摘要:
markdown
undefinedPlan Check Complete: [Plan Name]
计划检查完成:[计划名称]
Overall Status
整体状态
X% Complete (Y of Z steps done)
完成率X%(Z个步骤中已完成Y个)
Completed ✅
已完成 ✅
- Step 1: [description]
- Step 2: [description]
- 步骤1:[描述]
- 步骤2:[描述]
In Progress ⚠️
进行中 ⚠️
- Step 3: [description] (60% done)
- 步骤3:[描述](完成60%)
Not Started ❌
未启动 ❌
- Step 4: [description]
- 步骤4:[描述]
Critical Issues 🚨
关键问题 🚨
- REMOVAL SPEC not complete: Old code still exists
- in
legacy_codemust be removedfile.ts - must be deleted
deprecated-helper.ts
- 移除规范未完成:旧代码仍存在
- 必须移除 中的
file.tslegacy_code - 必须删除
deprecated-helper.ts
- 必须移除
Quality Issues
质量问题
- type used in
anyfile.ts:42 - Missing error handling in step 5
- 使用了
file.ts:42类型any - 步骤5的实施中缺少错误处理
Validation
验证结果
- ❌ TypeScript: 3 errors
- ✅ Linting: Passed
- Build: Not tested
- ❌ TypeScript:3个错误
- ✅ 代码检查:通过
- 构建:未测试
Next Steps
下一步计划
- Remove old code (REMOVAL SPEC)
- Complete Step 3
- Fix quality issues
- Run final validation
Detailed Report: Added as note to plan ticket
Task List: See remaining work section above
undefined- 完成移除规范项(移除旧代码)
- 完成步骤3的实施
- 修复质量问题
- 执行最终验证
详细报告:已添加至计划工单备注
任务清单:见上方剩余工作部分
undefinedCritical Principles
核心原则
- NEVER SKIP FILES - Check every file in the comprehensive list
- DO NOT EDIT FILES - This is read-only audit, not implementation
- VERIFY REMOVAL SPEC - Critical that old code is actually removed
- BE THOROUGH - Think critically about each file's implementation
- USE MEMORY - Store context as you review files
- RUN VALIDATION - Always run typecheck and lint
- BE HONEST - Mark things as incomplete if they are
- PROVIDE ACTIONS - Don't just identify issues, provide todo list
- CHECK QUALITY - Implementation exists doesn't mean it's good
- 100% STANDARD - Plan isn't done until 100% complete and validated
- 绝不跳过文件 - 检查清单中的每一个文件
- 不得编辑文件 - 此流程为只读审核,不涉及实施
- 必须验证移除规范 - 确保旧代码已实际移除是关键要求
- 务必全面彻底 - 对每个文件的实施进行批判性思考
- 善用内存存储 - 跨文件存储上下文信息
- 执行验证检查 - 始终运行类型检查和代码检查
- 保持诚实客观 - 未完成项需如实标记
- 提供可执行方案 - 不仅要识别问题,还要给出待办清单
- 重视质量验证 - 存在实施不代表质量达标
- 100%完成标准 - 计划需100%完成并通过验证才算结束
Completion Criteria
完成标准
A plan can be marked as ONLY when:
.done.md- ✅ 100% of ORIGINAL ISSUE/TASK requirements implemented (not just plan steps!)
- ✅ All plan steps implemented (100% completion)
- ✅ All REMOVAL SPEC items removed (old code gone)
- ✅ TypeScript passes (succeeds)
tsc --noEmit - ✅ Linting passes (no errors)
- ✅ Build succeeds (if applicable)
- ✅ No types added (strict typing maintained)
any - ✅ AGENTS.md compliance (all guidelines followed)
- ✅ Quality verified (implementations match plan specs)
CRITICAL: Criterion #1 is the MOST IMPORTANT. A plan that completes all its steps but doesn't fulfill the original issue requirements is STILL INCOMPLETE.
Anything less = plan ticket stays open
计划仅在满足以下所有条件时,才可标记为:
.done.md- ✅ 100%实现原始需求/任务的所有要求(而非仅完成计划步骤!)
- ✅ 所有计划步骤均已实现(完成率100%)
- ✅ 所有移除规范项已完成(旧代码已全部移除)
- ✅ TypeScript检查通过(执行成功)
tsc --noEmit - ✅ 代码检查通过(无错误)
- ✅ 构建成功(如适用)
- ✅ 未新增类型(保持严格类型规范)
any - ✅ 符合AGENTS.md规范(遵循所有指南)
- ✅ 质量已验证(实施符合计划规格)
关键提示:第1条是最重要的标准。即使完成了所有计划步骤,但未满足原始议题要求,计划仍属于未完成。
未满足所有条件 = 计划工单保持打开状态
Supporting Tools
支持工具
- Grep: Search for old code to verify removal
- Glob: Find all relevant files
- Bash: Run git, typecheck, lint, build
- Read: Examine file contents
- TodoWrite: Track file review progress
- Memory/Pinboard: Store context across files
After completing the plan check, follow handbook to create tickets for all surfaced issues.
15.04tk- Grep:搜索旧代码以验证移除情况
- Glob:查找所有相关文件
- Bash:执行git、类型检查、代码检查、构建命令
- Read:查看文件内容
- TodoWrite:跟踪文件审核进度
- Memory/Pinboard:跨文件存储上下文信息
完成计划检查后,按照手册的要求,为所有发现的问题创建工单。
15.04tk