todo

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

TODO Scanner

待办事项扫描器

Scan a codebase for incomplete work and maintain a living
TODO.md
grouped by feature clusters ready for
/prd
input. Do NOT implement anything — only inventory and organise.

扫描代码库查找未完成工作,维护按功能集群分组的可动态更新的
TODO.md
文件,可直接作为
/prd
的输入。请勿实现任何功能——仅做清点和整理工作。

Detect Workflow

检测工作流

  • TODO.md does not exist → run Steps 1–4 (Initial Creation)
  • TODO.md exists → run Steps 0–4 (Subsequent Update)

  • TODO.md不存在 → 执行步骤1–4(首次创建)
  • TODO.md已存在 → 执行步骤0–4(后续更新)

Step 0 — Find Completed Work (update only)

步骤0 — 查找已完成工作(仅更新时执行)

Parse
Last updated: YYYY-MM-DD
from existing
TODO.md
. Run
git log --since="<timestamp>" --oneline
, map commits to unchecked items, mark completed with
[x]
and commit hash. Never remove unchecked items.
解析现有
TODO.md
中的
Last updated: YYYY-MM-DD
信息。执行
git log --since="<timestamp>" --oneline
命令,将提交记录与未勾选的待办项匹配,用
[x]
标记已完成项并标注提交哈希值。永远不要删除未勾选的待办项。

Step 1 — Scan Codebase for Gaps

步骤1 — 扫描代码库查找缺口

Search for each category and collect findings:
  • Code comments:
    TODO
    ,
    FIXME
    ,
    HACK
    ,
    XXX
    ,
    PLACEHOLDER
  • Mock data: Hardcoded arrays,
    faker
    ,
    seed
    ,
    mock
    in non-test files
  • Placeholder components: Empty
    <div>
    bodies,
    <!-- TODO -->
    , stub templates
  • Missing pages: Routes referencing nonexistent files
  • Untested code: Source files with no corresponding test file
  • Empty/stub files: Files under 5 lines, empty function bodies
  • Design references: Mockups, wireframes in
    docs/
    ,
    designs/
    ,
    assets/
按以下类别搜索并收集结果:
  • 代码注释:
    TODO
    FIXME
    HACK
    XXX
    PLACEHOLDER
  • 模拟数据: 非测试文件中的硬编码数组、
    faker
    seed
    mock
    相关内容
  • 占位符组件: 空
    <div>
    主体、
    <!-- TODO -->
    、存根模板
  • 缺失页面: 路由引用了不存在的文件
  • 未测试代码: 没有对应测试文件的源代码文件
  • 空/存根文件: 行数少于5行的文件、空函数体
  • 设计参考:
    docs/
    designs/
    assets/
    目录下的原型图、线框图

Step 2 — Check PRDs

步骤2 — 检查PRD

Read
tasks/prd-*.md
. Annotate groups with
> PRD exists
— don't duplicate already-spec'd features.
读取
tasks/prd-*.md
文件。给对应分组标注
> PRD exists
——不要重复录入已经有需求说明的功能。

Step 3 — Group into Feature Clusters

步骤3 — 按功能集群分组

Organise findings into logical feature groups. Each group name should be descriptive enough to feed directly into
/prd
.
将扫描结果整理为逻辑清晰的功能分组。每个分组的名称应足够具象,可直接输入
/prd
使用。

Step 4 — Write / Update TODO.md

步骤4 — 写入 / 更新TODO.md

Write to project root. On update, preserve all unchecked items and update the timestamp.
markdown
undefined
写入到项目根目录。更新操作时,保留所有未勾选的待办项并更新时间戳。
markdown
undefined

TODO

TODO

Last updated: YYYY-MM-DD via /todo
Last updated: YYYY-MM-DD via /todo

[Feature Group Name]

[Feature Group Name]

  • Self-contained feature description ready for /prd input (app/components/Foo.vue:12)
  • Completed item (via commit abc1234)
  • Self-contained feature description ready for /prd input (app/components/Foo.vue:12)
  • Completed item (via commit abc1234)

[Another Feature Group]

[Another Feature Group]

PRD exists:
tasks/prd-feature-name.md
  • Sub-task not covered by existing PRD (src/pages/bar.vue:5)

---
PRD exists:
tasks/prd-feature-name.md
  • Sub-task not covered by existing PRD (src/pages/bar.vue:5)

---

Rules

规则

  1. Idempotent — running twice produces the same result
  2. Additive only — never remove unchecked items on update
  3. No implementation — only inventory and organise, never write code
  4. PRD-aware — check
    tasks/prd-*.md
    and annotate groups accordingly
  5. Always timestamp — update
    Last updated
    on every run
  6. Source locations — include file:line for traceability
  7. Self-contained items — each
    - [ ]
    must work as standalone
    /prd
    input

  1. 幂等性 — 运行两次得到的结果完全一致
  2. 仅追加内容 — 更新时永远不要删除未勾选的待办项
  3. 不做功能实现 — 仅做清点和整理,永远不要编写代码
  4. 识别PRD — 检查
    tasks/prd-*.md
    文件并给对应分组做相应标注
  5. 始终添加时间戳 — 每次运行都更新
    Last updated
    字段
  6. 标注来源位置 — 包含
    文件:行号
    便于溯源
  7. 待办项独立完整 — 每个
    - [ ]
    项都可作为独立的
    /prd
    输入使用

Checklist

检查清单

  • All gap categories scanned;
    tasks/prd-*.md
    checked
  • Items grouped by feature with source locations
  • Each item is self-contained
    /prd
    input
  • Last updated
    timestamp set; no unchecked items removed
  • 已扫描所有缺口类别;已检查
    tasks/prd-*.md
    文件
  • 待办项已按功能分组并标注来源位置
  • 每个待办项都是可独立输入
    /prd
    的完整内容
  • 已设置
    Last updated
    时间戳;未删除任何未勾选的待办项