finishing-grove-workspace
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseI'm using the finishing-grove-workspace skill to wrap up this Grove workspace.
我正在使用finishing-grove-workspace skill来收尾这个Grove工作区。
Workflow
工作流程
Step 1: Detect workspace
步骤1:检测工作区
bash
test -f "$(git rev-parse --show-toplevel)/.grove/workspace.json"If is not found: this is not a Grove workspace. Use instead.
.grove/workspace.jsonsuperpowers:finishing-a-development-branchbash
test -f "$(git rev-parse --show-toplevel)/.grove/workspace.json"如果未找到:这不是Grove工作区,请改用。
.grove/workspace.jsonsuperpowers:finishing-a-development-branchStep 2: Verify tests pass
步骤2:验证测试通过
Auto-detect the test command from marker files:
| Marker file | Test command |
|---|---|
| |
| |
| |
| |
| |
| |
If tests fail, stop. Do not present completion options.
从标记文件自动检测测试命令:
| 标记文件 | 测试命令 |
|---|---|
| |
| |
| |
| |
| |
| |
如果测试失败,停止操作,不要提供完成选项。
Step 3: Read workspace metadata
步骤3:读取工作区元数据
bash
cat .grove/workspace.jsonExtract , , and from the JSON output.
idgolden_copybranchbash
cat .grove/workspace.json从JSON输出中提取、和字段。
idgolden_copybranchStep 4: Present options
步骤4:提供选项
Present exactly these four options:
- Push branch and create a Pull Request
- Push branch and destroy workspace
- Keep workspace as-is
- Discard work and destroy workspace
仅展示以下四个选项:
- 推送分支并创建Pull Request
- 推送分支并销毁工作区
- 保持工作区不变
- 丢弃工作并销毁工作区
Step 5: Execute choice
步骤5:执行所选操作
Option 1: Push + PR
Derive the PR title from the branch name and the body from a summary of commits since the golden copy.
bash
git push -u origin <branch>
gh pr create --title "<title>" --body "<body>"
grove destroy <workspace-id>
cd <golden-copy-path>Option 2: Push + destroy
bash
git push -u origin <branch>
grove destroy <workspace-id>
cd <golden-copy-path>Option 3: Keep as-is
Report: "Keeping workspace at <path>."
Option 4: Discard
Require the user to type "discard" before proceeding.
bash
grove destroy <workspace-id>
cd <golden-copy-path>选项1:推送+创建PR
从分支名称生成PR标题,从与黄金副本(golden copy)以来的提交记录生成PR正文。
bash
git push -u origin <branch>
gh pr create --title "<title>" --body "<body>"
grove destroy <workspace-id>
cd <golden-copy-path>选项2:推送+销毁
bash
git push -u origin <branch>
grove destroy <workspace-id>
cd <golden-copy-path>选项3:保持不变
提示:"已保留工作区至路径 <path>。"
选项4:丢弃工作
要求用户输入"discard"后再继续执行。
bash
grove destroy <workspace-id>
cd <golden-copy-path>Quick Reference
速查表
| Option | Push branch | Create PR | Keep workspace | Cleanup |
|---|---|---|---|---|
| 1. Push + PR | yes | yes | no | yes |
| 2. Push + destroy | yes | no | no | yes |
| 3. Keep as-is | no | no | yes | no |
| 4. Discard | no | no | no | yes |
| 选项 | 推送分支 | 创建PR | 保留工作区 | 清理 |
|---|---|---|---|---|
| 1. 推送+创建PR | 是 | 是 | 否 | 是 |
| 2. 推送+销毁 | 是 | 否 | 否 | 是 |
| 3. 保持不变 | 否 | 否 | 是 | 否 |
| 4. 丢弃工作 | 否 | 否 | 否 | 是 |
Common Mistakes
常见错误
- Skipping test verification — never present completion options before confirming tests pass.
- Open-ended questions — always present the structured four-option list; do not ask "what would you like to do?" in free form.
- Automatic workspace cleanup — if the user selects option 3, do not run . Respect the choice to keep the workspace.
grove destroy - No confirmation for discard — option 4 destroys uncommitted work; always require the user to type "discard" before executing.
- 跳过测试验证 —— 在确认测试通过前,绝不要提供完成选项。
- 开放式提问 —— 始终展示结构化的四个选项列表,不要以自由形式询问"你想要做什么?"
- 自动清理工作区 —— 如果用户选择选项3,不要运行,尊重用户保留工作区的选择。
grove destroy - 丢弃操作未确认 —— 选项4会销毁未提交的工作,执行前必须要求用户输入"discard"。
Red Flags
警示信号
- missing but
.grove/workspace.jsonpresent — the agent is on the golden copy, not in a workspace. Route to.grove/config.json.superpowers:finishing-a-development-branch - fails — the workspace ID may be stale. Run
grove destroyto confirm the workspace exists before retrying.grove list
- 未找到但存在
.grove/workspace.json—— Agent处于黄金副本(golden copy)中,而非工作区内。请转至.grove/config.json。superpowers:finishing-a-development-branch - 执行失败 —— 工作区ID可能已失效。重试前先运行
grove destroy确认工作区是否存在。grove list
Integration
集成说明
- Replaces: when in a Grove workspace
superpowers:finishing-a-development-branch - Called by: (Step 7),
superpowers:subagent-driven-development(Step 5)superpowers:executing-plans - Pairs with:
grove:using-grove
- 替代: 在Grove工作区内时,替代
superpowers:finishing-a-development-branch - 被调用方: (步骤7)、
superpowers:subagent-driven-development(步骤5)superpowers:executing-plans - 搭配使用: ",
grove:using-grove