finishing-grove-workspace

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
I'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
.grove/workspace.json
is not found: this is not a Grove workspace. Use
superpowers:finishing-a-development-branch
instead.
bash
test -f "$(git rev-parse --show-toplevel)/.grove/workspace.json"
如果未找到
.grove/workspace.json
:这不是Grove工作区,请改用
superpowers:finishing-a-development-branch

Step 2: Verify tests pass

步骤2:验证测试通过

Auto-detect the test command from marker files:
Marker fileTest command
go.mod
go test ./...
package.json
npm test
Cargo.toml
cargo test
build.gradle
/
build.gradle.kts
./gradlew test
pyproject.toml
/
requirements.txt
pytest
Makefile
make test
If tests fail, stop. Do not present completion options.
从标记文件自动检测测试命令:
标记文件测试命令
go.mod
go test ./...
package.json
npm test
Cargo.toml
cargo test
build.gradle
/
build.gradle.kts
./gradlew test
pyproject.toml
/
requirements.txt
pytest
Makefile
make test
如果测试失败,停止操作,不要提供完成选项。

Step 3: Read workspace metadata

步骤3:读取工作区元数据

bash
cat .grove/workspace.json
Extract
id
,
golden_copy
, and
branch
from the JSON output.
bash
cat .grove/workspace.json
从JSON输出中提取
id
golden_copy
branch
字段。

Step 4: Present options

步骤4:提供选项

Present exactly these four options:
  1. Push branch and create a Pull Request
  2. Push branch and destroy workspace
  3. Keep workspace as-is
  4. Discard work and destroy workspace
仅展示以下四个选项:
  1. 推送分支并创建Pull Request
  2. 推送分支并销毁工作区
  3. 保持工作区不变
  4. 丢弃工作并销毁工作区

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

速查表

OptionPush branchCreate PRKeep workspaceCleanup
1. Push + PRyesyesnoyes
2. Push + destroyyesnonoyes
3. Keep as-isnonoyesno
4. Discardnononoyes
选项推送分支创建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
    grove destroy
    . Respect the choice to keep the workspace.
  • 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

警示信号

  • .grove/workspace.json
    missing but
    .grove/config.json
    present — the agent is on the golden copy, not in a workspace. Route to
    superpowers:finishing-a-development-branch
    .
  • grove destroy
    fails — the workspace ID may be stale. Run
    grove list
    to confirm the workspace exists before retrying.
  • 未找到
    .grove/workspace.json
    但存在
    .grove/config.json
    —— Agent处于黄金副本(golden copy)中,而非工作区内。请转至
    superpowers:finishing-a-development-branch
  • grove destroy
    执行失败 —— 工作区ID可能已失效。重试前先运行
    grove list
    确认工作区是否存在。

Integration

集成说明

  • Replaces:
    superpowers:finishing-a-development-branch
    when in a Grove workspace
  • Called by:
    superpowers:subagent-driven-development
    (Step 7),
    superpowers:executing-plans
    (Step 5)
  • Pairs with:
    grove:using-grove
  • 替代: 在Grove工作区内时,替代
    superpowers:finishing-a-development-branch
  • 被调用方:
    superpowers:subagent-driven-development
    (步骤7)、
    superpowers:executing-plans
    (步骤5)
  • 搭配使用:
    grove:using-grove
    ",