Tapd Iteration Report logo

Tapd Iteration Report

Organization
TencentBlueKing
tapd-iteration-report

迭代执行流水线的收尾阶段。当迭代内所有需求 phase 均为 committed 后触发, 扫描 commit.md 生成 changelog,汇总研发效能数据写入 summary.md, 清理临时文件,递增 patch 版本号,最终提交并推送至远程仓库。

Overview

PublisherTencentBlueKing
Repositorybk-bcs
Skill nametapd-iteration-report
Stars
840
Forks
263
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by TencentBlueKing on GitHub. Read the source before you install it.

Installation

Install the Tapd Iteration Report AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/TencentBlueKing/bk-bcs/tree/master/.agents/skills/tapd-iteration-runner/tapd-iteration-report
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TencentBlueKing/bk-bcs.git /tmp/bk-bcs
mkdir -p .claude/skills
cp -r /tmp/bk-bcs/.agents/skills/tapd-iteration-runner/tapd-iteration-report .claude/skills/tapd-iteration-report
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Tapd Iteration Report in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Tapd Iteration Report on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Tapd Iteration Report is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

迭代信息汇总

定位

本子 skill 是迭代执行流水线的最后一环——在所有需求完成开发并提交后, 对整个迭代进行总结性收尾:构建版本 changelog、汇总研发效能数据、清理临时文件、 递增 patch 版本号,并将汇总结果提交推送至远程仓库。

前置条件

编排层在调用本子 skill 前需确认以下条件全部满足:

  1. 所有需求 phase 为 committed:iteration-state.json 中 sequence 列出的所有需求, 其 phase 字段必须全部为 committed
  2. 所有需求目录存在 commit.md:specs/${VERSION}/${ID}/commit.md 文件必须全部存在
  3. 迭代 status 为 completed:iteration-state.json.status 为 completed

如果任一条件不满足,输出明确的错误信息并终止执行,由编排层决定后续处理。

状态文件

从 specs/${VERSION}/iteration-state.json 读取以下关键信息:

字段用途
patch当前 patch 版本号,用于构建版本标题(如 v0.9.3)
iter_branch迭代分支名(如 v0.9.x),用于推送
started_at迭代开始时间
end_at迭代结束时间
stories所有需求及其统计字段
sequence需求执行顺序列表

版本号构成规则:

  • 迭代目录名即为版本前缀(如 v0.9.x → v0.9.)
  • 完整版本号 = 版本前缀去掉末尾的 x + patch 值(如 v0.9. + 3 → v0.9.3)

执行流程

1. 读取迭代状态

bash
VERSION="<迭代目录名>"  # 如 v0.9.x
STATE_FILE="specs/${VERSION}/iteration-state.json"

# 读取关键字段
PATCH=$(jq -r '.patch' "$STATE_FILE")
iter_branch=$(jq -r '.iter_branch' "$STATE_FILE")
STARTED_AT=$(jq -r '.started_at' "$STATE_FILE")
END_AT=$(jq -r '.end_at' "$STATE_FILE")

# 构建版本号:将目录名末尾的 x 替换为 patch 值
# 例如 v0.9.x → v0.9.3
VERSION_TAG=$(echo "$VERSION" | sed "s/x$/${PATCH}/")

2. 生成 Changelog

扫描本迭代目录下所有需求的 commit.md 文件,提取 commit 信息,汇总为版本 changelog。

逻辑:

  1. 如果 changelog.md 不存在,创建并写入标题 # Changelog
  2. 追加本次版本章节标题 ## ${VERSION_TAG} 和发布时间
  3. 按 sequence 顺序遍历每个需求:
    • 从 iteration-state.json.stories 中提取需求名称
    • 从 ${ID}/commit.md 中提取 ## Commit Message 章节内容
    • 追加到 changelog

详细脚本实现见 ../../references/report-scripts.md §1。

3. 汇总研发效能数据

从 iteration-state.json 的 stories 中提取所有需求的统计字段进行汇总。

代码变更指标:

指标来源字段汇总方式
总变更行数stats.total求和
新增代码行数stats.add_code求和
删除代码行数stats.delete_code求和
逻辑代码行数stats.logic_code求和
测试代码行数stats.test_code求和
文档变更行数stats.docs求和
变更文件数stats.files求和
需求实现数量—计数 sequence 长度
每个需求实现时间stats.duration_secrunner 记录的壁钟耗时,直接读取
平均实现时间—求平均
最大实现时间—取最大值
最小实现时间—取最小值

成本指标(从各需求的 stats.cost 聚合,分三层统计展示):

数据来源与计算规则
数据项来源说明
需求总耗时stats.duration_secrunner 记录的壁钟耗时(committed 时刻 − started_at,含等待用户决策的间隔)
需求总 creditper_stage.*.credit 求和执行层各阶段求和
需求总 tokensper_stage.*.total_*_tokens 求和执行层各阶段求和
迭代总耗时各需求 stats.duration_sec 求和
迭代总 credit各需求的总 credit 求和
迭代总 tokens各需求的总 tokens 求和

关键语义:

  • stats.duration_sec 为 runner 在 loop 中记录的壁钟耗时(需求首次开始到 committed),包含等待用户决策的间隔
  • credit 和 tokens 仅来自执行层 per_stage

输出文件:specs/${VERSION}/summary.md,追加模式(不覆盖历史记录)。

summary.md 的成本汇总章节格式:

markdown
### 成本汇总

#### 第一层:迭代总体

| 指标 | 值 |
|------|-----|
| 迭代总耗时 | <sum_duration> |
| 迭代总 credit | <sum_credit> |
| 迭代总 tokens(输入) | <sum_input_tokens> |
| 迭代总 tokens(输出) | <sum_output_tokens> |
| 迭代总 tokens(缓存) | <sum_cache_tokens> |
| 迭代 speckit 调用次数 | <sum_speckit_calls> |
| 需求数量 | <story_count> |
| 单需求平均耗时 | <avg_duration> |
| 单需求平均 credit | <avg_credit> |
| 单需求最高 credit | <max_credit>(需求 #<ID>)|

#### 第二层:各需求独立统计

| 需求 ID | 需求名称 | 耗时 | Credit | 输入 tokens | 输出 tokens | 缓存 tokens | 总 tokens | 调用次数 |
|---------|---------|------|--------|------------|------------|------------|----------|---------|
| #<ID_1> | <name> | <dur> | <credit> | <input> | <output> | <cache> | <total> | <calls> |
| #<ID_2> | <name> | <dur> | <credit> | <input> | <output> | <cache> | <total> | <calls> |
| ... | ... | ... | ... | ... | ... | ... | ... | ... |
| **合计** | — | <sum> | <sum> | <sum> | <sum> | <sum> | <sum> | <sum> |

> 每行 tokens = `per_stage` 各阶段 `*_tokens` 求和
> 每行 Credit = `per_stage` 各阶段 `.credit` 求和
> 每行 耗时 = `stats.duration_sec`

#### 第三层:各阶段成本统计(执行层)

| 阶段 | 总 credit | 占比 | 输入 tokens | 输出 tokens | 缓存 tokens | 调用次数 |
|------|-----------|------|------------|------------|------------|---------|
| clarify | <x> | x% | <x> | <x> | <x> | <x> |
| specify | <x> | x% | <x> | <x> | <x> | <x> |
| plan | <x> | x% | <x> | <x> | <x> | <x> |
| tasks | <x> | x% | <x> | <x> | <x> | <x> |
| implement | <x> | x% | <x> | <x> | <x> | <x> |
| validate | <x> | x% | <x> | <x> | <x> | <x> |
| commit | <x> | x% | <x> | <x> | <x> | <x> |
| **执行层合计** | <sum> | 100% | <sum> | <sum> | <sum> | <sum> |

详细脚本实现见 ../../references/report-scripts.md §2。

注意:children 字段需兼容 null / {} / 不存在三种空值形式。 stats.cost 字段需兼容不存在的情况——缺失时该需求的 cost 视为 0。 stats.cost.per_stage 字段需兼容不存在 / {} 的情况——缺失时各阶段 cost 视为 0。 stats.duration_sec 字段需兼容不存在的情况——缺失时该需求耗时视为 0。

4. 清理临时目录

删除本迭代目录下的 .tmp/ 临时目录:

Linux / macOS:

bash
rm -rf "specs/${VERSION}/.tmp/"

Windows (PowerShell):

powershell
if (Test-Path "specs\$VERSION\.tmp") {
    Remove-Item "specs\$VERSION\.tmp" -Recurse -Force
}

5. 递增 patch 版本号

将 iteration-state.json 中的 patch 字段自增 1,为下一轮迭代做准备:

Linux / macOS:

bash
jq '.patch += 1' "$STATE_FILE" > "${STATE_FILE}.tmp" && mv "${STATE_FILE}.tmp" "$STATE_FILE"

Windows (PowerShell):

powershell
$state = Get-Content $STATE_FILE | ConvertFrom-Json
$state.patch = $state.patch + 1
$state | ConvertTo-Json -Depth 10 | Set-Content $STATE_FILE -Encoding UTF8

6. 提交并推送

将迭代汇总结果提交到迭代分支,并推送至远程仓库:

Linux / macOS:

bash
git add -A
git commit -m "docs(迭代): ${VERSION_TAG} 变更日志与效能报告

- 从各需求提交记录生成版本变更日志
- 汇总迭代研发效能数据
- 清理临时文件
- 递增 patch 版本号至 $(jq -r '.patch' "$STATE_FILE")

迭代版本: ${VERSION_TAG}"

git push origin "${iter_branch}"

Windows (PowerShell):

powershell
git add -A
git commit -m "docs(迭代): $VERSION_TAG 变更日志与效能报告`n`n- 从各需求提交记录生成版本变更日志`n- 汇总迭代研发效能数据`n- 清理临时文件`n- 递增 patch 版本号至 $($state.patch)`n`n迭代版本: $VERSION_TAG"

git push origin $iter_branch

产出

产出物路径说明
Changelogspecs/${VERSION}/changelog.md版本变更记录,追加模式
效能报告specs/${VERSION}/summary.md研发效能数据汇总,追加模式
状态更新specs/${VERSION}/iteration-state.jsonpatch 已自增
Git 提交迭代分支已提交并推送至远程
清理specs/${VERSION}/.tmp/ 已删除临时文件已清理

异常处理

异常场景处理方式
存在未 committed 的需求输出未完成需求列表,终止执行
commit.md 文件缺失输出缺失文件列表,终止执行
git push 失败提示用户检查远程仓库权限和网络,保留本地提交
jq 命令不可用使用编程方式直接解析 JSON(编排层处理)
changelog.md/summary.md 已存在追加新版本章节,不覆盖历史记录

Frequently asked questions

What does the Tapd Iteration Report AI skill do?

迭代执行流水线的收尾阶段。当迭代内所有需求 phase 均为 committed 后触发, 扫描 commit.md 生成 changelog,汇总研发效能数据写入 summary.md, 清理临时文件,递增 patch 版本号,最终提交并推送至远程仓库。

Why use Tapd Iteration Report on TypingMind?

Because you install it once and use it with any model. Tapd Iteration Report is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Tapd Iteration Report in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/TencentBlueKing/bk-bcs/tree/master/.agents/skills/tapd-iteration-runner/tapd-iteration-report. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Tapd Iteration Report?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Tapd Iteration Report?

As many as you like. As long as a model supports skills, you can use Tapd Iteration Report with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Tapd Iteration Report AI skill free?

It is published on GitHub by TencentBlueKing. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇