SKILL.md 2.43 KB

name: module-report description: 本地测试闸门通过后,生成标准化 12 节模块完成报告并 commit 到 module 分支供 MR 嵌入。 user-invocable: false

allowed-tools: Read Write Glob Grep Skill Bash(git diff *) Bash(git log *) Bash(git add *) Bash(git commit *)

所有输出必须使用中文。

module-report

test-gate 绿色后渲染 12 节模块完成报告,commit 到 module 分支供 MR 嵌入。只读摘要,不读 diff 正文进上下文

执行步骤

  1. 验证上游 test-gate 已绿;红色则停。
  2. 收集输入(核心约束:取 git 摘要而非 diff 正文):
    • § ③ 文件变更:用 git diff --stat / --name-status / git log --oneline 摘要(区间:module 分支起点 → HEAD)
    • § ② / § ⑨:直接 Read docs/superpowers/{specs,plans,reviews}/<日期>-<本模块的 REQ>.md(小文件可全读)
    • § ⑤:Read docs/superpowers/module-reports/<module_id>-test-gate.md
    • § ⑥ Migration:git diff --name-only --diff-filter=A -- 'sql/migrations/V*.sql' 列新增 migration,每个 Read 第一行作说明
    • § ⑦ 跨模块改动:Read docs/superpowers/module-reports/<module_id>-cross-module.md(如存在)
    • § ④ 读写的表:用 grep 定位涉 SQL 的文件后按需读片段,不全量读 docs/03
  3. ${CLAUDE_SKILL_DIR}/templates/module-report-template.md 渲染 12 节。
  4. 硬验证
    • § ⑦:跨模块日志中任何 TBD(CC 补) 或敷衍填充 → 调用 Skill(cross-module-log) 一次性批量补齐,补完回本步骤重验(整模块周期内唯一补 TBD 的时机
    • § ⑧:必须列举所有偏离规格之处;若无,写"无偏离"
  5. 写入 docs/superpowers/module-reports/<YYYY-MM-DD>-<module_id>.md,连同跨模块日志(如存在)一起 commit 到 module 分支: bash git add docs/superpowers/module-reports/<YYYY-MM-DD>-<module_id>.md [ -f docs/superpowers/module-reports/<module_id>-cross-module.md ] && \ git add docs/superpowers/module-reports/<module_id>-cross-module.md git commit -m "docs(<module_id>): add module completion report + cross-module log" commit 是必需的——mr-create 的 worktree-clean 前置条件依赖此步。
  6. 调用 Skill(mr-create) 推送并创建 MR。

参考

  • ${CLAUDE_SKILL_DIR}/templates/module-report-template.md(12 节)
  • 上游:test-gate(绿色时派发)
  • 下游:mr-create