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:
@@ -32,6 +32,62 @@ Initialize a new project with deep context gathering.
|
||||
|
||||
---
|
||||
|
||||
### `/gsd:new-workspace`
|
||||
|
||||
Create an isolated workspace with repo copies and independent `.planning/` directory.
|
||||
|
||||
| Flag | Description |
|
||||
|------|-------------|
|
||||
| `--name <name>` | Workspace name (required) |
|
||||
| `--repos repo1,repo2` | Comma-separated repo paths or names |
|
||||
| `--path /target` | Target directory (default: `~/gsd-workspaces/<name>`) |
|
||||
| `--strategy worktree\|clone` | Copy strategy (default: `worktree`) |
|
||||
| `--branch <name>` | Branch to checkout (default: `workspace/<name>`) |
|
||||
| `--auto` | Skip interactive questions |
|
||||
|
||||
**Use cases:**
|
||||
- Multi-repo: work on a subset of repos with isolated GSD state
|
||||
- Feature isolation: `--repos .` creates a worktree of the current repo
|
||||
|
||||
**Produces:** `WORKSPACE.md`, `.planning/`, repo copies (worktrees or clones)
|
||||
|
||||
```bash
|
||||
/gsd:new-workspace --name feature-b --repos hr-ui,ZeymoAPI
|
||||
/gsd:new-workspace --name feature-b --repos . --strategy worktree # Same-repo isolation
|
||||
/gsd:new-workspace --name spike --repos api,web --strategy clone # Full clones
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `/gsd:list-workspaces`
|
||||
|
||||
List active GSD workspaces and their status.
|
||||
|
||||
**Scans:** `~/gsd-workspaces/` for `WORKSPACE.md` manifests
|
||||
**Shows:** Name, repo count, strategy, GSD project status
|
||||
|
||||
```bash
|
||||
/gsd:list-workspaces
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `/gsd:remove-workspace`
|
||||
|
||||
Remove a workspace and clean up git worktrees.
|
||||
|
||||
| Argument | Required | Description |
|
||||
|----------|----------|-------------|
|
||||
| `<name>` | Yes | Workspace name to remove |
|
||||
|
||||
**Safety:** Refuses removal if any repo has uncommitted changes. Requires name confirmation.
|
||||
|
||||
```bash
|
||||
/gsd:remove-workspace feature-b
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### `/gsd:discuss-phase`
|
||||
|
||||
Capture implementation decisions before planning.
|
||||
|
||||
@@ -625,6 +625,31 @@ claude --dangerously-skip-permissions
|
||||
/gsd:remove-phase 7 # Descope phase 7 and renumber
|
||||
```
|
||||
|
||||
### Multi-Project Workspaces
|
||||
|
||||
Work on multiple repos or features in parallel with isolated GSD state.
|
||||
|
||||
```bash
|
||||
# Create a workspace with repos from your monorepo
|
||||
/gsd:new-workspace --name feature-b --repos hr-ui,ZeymoAPI
|
||||
|
||||
# Feature branch isolation — worktree of current repo with its own .planning/
|
||||
/gsd:new-workspace --name feature-b --repos .
|
||||
|
||||
# Then cd into the workspace and initialize GSD
|
||||
cd ~/gsd-workspaces/feature-b
|
||||
/gsd:new-project
|
||||
|
||||
# List and manage workspaces
|
||||
/gsd:list-workspaces
|
||||
/gsd:remove-workspace feature-b
|
||||
```
|
||||
|
||||
Each workspace gets:
|
||||
- Its own `.planning/` directory (fully independent from source repos)
|
||||
- Git worktrees (default) or clones of specified repos
|
||||
- A `WORKSPACE.md` manifest tracking member repos
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Reference in New Issue
Block a user