feat: add multi-project workspace commands (#1241)
Three new commands for managing isolated GSD workspaces: - /gsd:new-workspace — create workspace with repo worktrees/clones - /gsd:list-workspaces — scan ~/gsd-workspaces/ for active workspaces - /gsd:remove-workspace — clean up workspace and git worktrees Supports both multi-repo orchestration (subset of repos from a parent directory) and feature branch isolation (worktree of current repo with independent .planning/). Includes init functions, command routing, workflows, 24 tests, and user documentation. Closes #1241 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
19
commands/gsd/list-workspaces.md
Normal file
19
commands/gsd/list-workspaces.md
Normal file
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: gsd:list-workspaces
|
||||
description: List active GSD workspaces and their status
|
||||
allowed-tools:
|
||||
- Bash
|
||||
- Read
|
||||
---
|
||||
<objective>
|
||||
Scan `~/gsd-workspaces/` for workspace directories containing `WORKSPACE.md` manifests. Display a summary table with name, path, repo count, strategy, and GSD project status.
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@~/.claude/get-shit-done/workflows/list-workspaces.md
|
||||
@~/.claude/get-shit-done/references/ui-brand.md
|
||||
</execution_context>
|
||||
|
||||
<process>
|
||||
Execute the list-workspaces workflow from @~/.claude/get-shit-done/workflows/list-workspaces.md end-to-end.
|
||||
</process>
|
||||
44
commands/gsd/new-workspace.md
Normal file
44
commands/gsd/new-workspace.md
Normal file
@@ -0,0 +1,44 @@
|
||||
---
|
||||
name: gsd:new-workspace
|
||||
description: Create an isolated workspace with repo copies and independent .planning/
|
||||
argument-hint: "--name <name> [--repos repo1,repo2] [--path /target] [--strategy worktree|clone] [--branch name] [--auto]"
|
||||
allowed-tools:
|
||||
- Read
|
||||
- Bash
|
||||
- Write
|
||||
- AskUserQuestion
|
||||
---
|
||||
<context>
|
||||
**Flags:**
|
||||
- `--name` (required) — Workspace name
|
||||
- `--repos` — Comma-separated repo paths or names. If omitted, interactive selection from child git repos in cwd
|
||||
- `--path` — Target directory. Defaults to `~/gsd-workspaces/<name>`
|
||||
- `--strategy` — `worktree` (default, lightweight) or `clone` (fully independent)
|
||||
- `--branch` — Branch to checkout. Defaults to `workspace/<name>`
|
||||
- `--auto` — Skip interactive questions, use defaults
|
||||
</context>
|
||||
|
||||
<objective>
|
||||
Create a physical workspace directory containing copies of specified git repos (as worktrees or clones) with an independent `.planning/` directory for isolated GSD sessions.
|
||||
|
||||
**Use cases:**
|
||||
- Multi-repo orchestration: work on a subset of repos in parallel with isolated GSD state
|
||||
- Feature branch isolation: create a worktree of the current repo with its own `.planning/`
|
||||
|
||||
**Creates:**
|
||||
- `<path>/WORKSPACE.md` — workspace manifest
|
||||
- `<path>/.planning/` — independent planning directory
|
||||
- `<path>/<repo>/` — git worktree or clone for each specified repo
|
||||
|
||||
**After this command:** `cd` into the workspace and run `/gsd:new-project` to initialize GSD.
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@~/.claude/get-shit-done/workflows/new-workspace.md
|
||||
@~/.claude/get-shit-done/references/ui-brand.md
|
||||
</execution_context>
|
||||
|
||||
<process>
|
||||
Execute the new-workspace workflow from @~/.claude/get-shit-done/workflows/new-workspace.md end-to-end.
|
||||
Preserve all workflow gates (validation, approvals, commits, routing).
|
||||
</process>
|
||||
26
commands/gsd/remove-workspace.md
Normal file
26
commands/gsd/remove-workspace.md
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
name: gsd:remove-workspace
|
||||
description: Remove a GSD workspace and clean up worktrees
|
||||
argument-hint: "<workspace-name>"
|
||||
allowed-tools:
|
||||
- Bash
|
||||
- Read
|
||||
- AskUserQuestion
|
||||
---
|
||||
<context>
|
||||
**Arguments:**
|
||||
- `<workspace-name>` (required) — Name of the workspace to remove
|
||||
</context>
|
||||
|
||||
<objective>
|
||||
Remove a workspace directory after confirmation. For worktree strategy, runs `git worktree remove` for each member repo first. Refuses if any repo has uncommitted changes.
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@~/.claude/get-shit-done/workflows/remove-workspace.md
|
||||
@~/.claude/get-shit-done/references/ui-brand.md
|
||||
</execution_context>
|
||||
|
||||
<process>
|
||||
Execute the remove-workspace workflow from @~/.claude/get-shit-done/workflows/remove-workspace.md end-to-end.
|
||||
</process>
|
||||
Reference in New Issue
Block a user