agentleFS
midFangmidFang/ai-agent-skills-workflow/feature-done/SKILL.md

feature-done

Skill2 starsChanged 5 months agoMITView on GitHub

在用户确认某个 feature 的待验证 APK 或功能效果已人工验证通过后,更新 feature_list/TASK,合并该 feature 分支到用户明确指定的目标分支;合并成功后自动构建目标分支 APK 并安装到手机等待用户做合并后验证;用户确认合并后验证通过时删除对应 worktree。若用户触发 `$feature-done` 并明确给出 feature 与目标分支,视为该 feature 的待验证 APK 已人工验证通过。若用户未说明目标分支,必须先询问。

  • Deletes or force-pushes

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Feature Done

目的

处理 feature 开发后半段:

用户人工验证通过(或用户触发 `$feature-done` 并明确给出 feature 与目标分支)
-> 标记 human_verified
-> 合并到用户指定目标分支
-> 标记 merged
-> 构建并安装目标分支 APK
-> 等用户做合并后验证
-> 标记 integration_verified
-> 删除 worktree
-> 标记 worktree_removed

阶段 A:验证通过并合并

若用户触发 $feature-done 并明确给出 feature 与目标分支,即视为该 feature 的待验证 APK 已人工验证通过,不再额外要求用户回复“验证通过”。

触发示例:

$feature-done FEAT-001 验证通过,合并到 main

如果用户没说目标分支,必须先问:

要把 FEAT-001 合并到哪个目标分支?

步骤:

  1. 读取 features/<版本>/feature_list.json 中的 feature。
  2. 更新:
    • status=human_verified
  3. 更新 TASK 的用户验证记录。
  4. 合并前检查:
    • feature worktree 没有未提交改动
    • 目标分支由用户明确给出
    • 执行合并的仓库不能有业务代码/配置类未提交改动
    • issues/**/*.md、issues/**/*.csv、features/**/*.md、features/**/*.csv、features/**/*.json 这类流程文件允许有改动
  5. 切到目标分支。
  6. 默认执行:
    • merge commit message 使用:Merge <feature_id> feat: <中文需求描述或实现内容>
    • 中文描述优先取 spec 的“目标”,其次取 feature list 的 title / name / description。
    • 示例:git merge --no-ff -m "Merge FEAT-001 feat: 增加沉浸式写作模式" <feature-branch>
  7. 合并成功后:
    • status=merged
    • 记录 merge commit
  8. 构建目标分支 APK,复制到:
    • features/<版本>/apks/<feature_id>-merged.apk
  9. 自动安装到手机:
    • 多设备时询问 serial
    • adb install -r <merged-apk>
  10. TASK 记录合并、构建、安装结果。
  11. 不删除 worktree,等待用户做合并后验证。

阶段 B:合并后验证通过并清理

触发示例:

$feature-done FEAT-001 合并后验证通过,可以清理 worktree

步骤:

  1. 确认当前状态是 merged,或用户明确说明合并后验证通过。
  2. 更新:
    • status=integration_verified
  3. 检查 feature worktree 没有未提交改动。
  4. 删除 worktree:
    • git worktree remove <worktree_path>
  5. 默认尝试安全删除本地 feature 分支:
    • git branch -d <feature-branch>
  6. 更新:
    • status=worktree_removed
  7. TASK 记录清理结果。

安全规则

  • 没有目标分支,不合并,先问用户。
  • 未经用户人工验证通过,不合并;但用户触发 $feature-done 并明确给出 feature 与目标分支时,视为已完成待验证 APK 的人工验证。
  • 合并成功后自动构建并安装目标分支 APK,等待用户做合并后验证。
  • 合并后未经用户确认,不删除 worktree。
  • 执行合并的仓库允许存在 issues/**/*.md、issues/**/*.csv、features/**/*.md、features/**/*.csv、features/**/*.json 流程文件改动;其它未提交改动会阻止合并。
  • 不使用 git branch -D、git reset --hard 等破坏性命令,除非用户明确要求。

完成回复

报告:

  • feature_id
  • 当前状态
  • 目标分支和 merge commit,如有
  • 合并后 APK/安装设备,如有
  • worktree 是否已删除
  • TASK 和 feature_list 路径

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.