# Workspace Detection

## Scan for Sibling Projects

```bash
WORKSPACE_DIR=$(dirname "$(pwd)")
SIBLING_PROJECTS=()

for dir in "$WORKSPACE_DIR"/*/; do
  [ -d "$dir/.bare" ] || [ -d "$dir/01-Main" ] || [ -d "$dir/02-Develop" ] && {
    PROJECT_NAME_SIBLING=$(basename "$dir")
    SIBLING_PROJECTS+=("$PROJECT_NAME_SIBLING")
  }
done
```

## Display Workspace Context

```
┌─────────────────────────────────────────────────────────────┐
│  WORKSPACE: {WORKSPACE_DIR}                                  │
├─────────────────────────────────────────────────────────────┤
│  Each project has its OWN independent GitFlow configuration. │
│  This init configures only: {DETECTED_NAME}                  │
├─────────────────────────────────────────────────────────────┤
{if SIBLING_PROJECTS not empty}
│  Existing GitFlow projects:                                  │
│  {for each SIBLING} ✅ {SIBLING_NAME}/                       │
│     ├── .bare/  01-Main/  02-Develop/                        │
│     └── features/  releases/  hotfixes/                      │
│  {end for}                                                   │
│                                                              │
│  New project to initialize:                                  │
│  ⬜ {DETECTED_NAME}/                                         │
│     └── (same structure will be created)                     │
{else}
│  No existing GitFlow projects detected.                      │
│  This will be the first project in this workspace.           │
{endif}
└─────────────────────────────────────────────────────────────┘
```

**Key principle:** GitFlow is **per-repository**. Each project has its own `config.json`, its own worktree structure, and its own version history. Projects do not share configuration.
