refactor: hard-fork GSD -> MSD (Make Software Done)
Mechanical rename produced by scripts/msd-rename.cjs: gsd/Gsd/GSD -> msd/Msd/MSD across contents and paths, upstream package/repo coordinates -> @golem15/msd-core and golem15com/msd-core. Deep links into upstream history, sibling upstream packages, the GSD-2 import feature, CHANGELOG.md and .changeset/ are kept as-is. Hand edits on top: MSD block-letter banner and logos, LICENSE copyright line, package/plugin identity, regenerated lockfile, install-tree fixtures, derived registries and benchmark baseline; migration checksum baseline re-locked (MSD keeps its own install state, so no install had applied the old sums); sort-order and regex-escaped expectations in tests adjusted.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# マルチプロジェクトワークスペース (`/gsd-workspace --new`)
|
||||
# マルチプロジェクトワークスペース (`/msd-workspace --new`)
|
||||
|
||||
**Issue:** #1241
|
||||
**Date:** 2026-03-20
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
## 課題
|
||||
|
||||
GSD は作業ディレクトリごとに1つの `.planning/` ディレクトリに紐づいています。複数の独立したプロジェクトを持つユーザー(20以上の子リポジトリを含むモノレポ構成など)や、同一リポジトリ内でフィーチャーブランチの分離が必要なユーザーは、手動でのクローンや状態管理なしに並行して GSD セッションを実行することができません。
|
||||
MSD は作業ディレクトリごとに1つの `.planning/` ディレクトリに紐づいています。複数の独立したプロジェクトを持つユーザー(20以上の子リポジトリを含むモノレポ構成など)や、同一リポジトリ内でフィーチャーブランチの分離が必要なユーザーは、手動でのクローンや状態管理なしに並行して MSD セッションを実行することができません。
|
||||
|
||||
## 解決策
|
||||
|
||||
@@ -18,13 +18,13 @@ GSD は作業ディレクトリごとに1つの `.planning/` ディレクトリ
|
||||
|
||||
## コマンド
|
||||
|
||||
### `/gsd-workspace --new`
|
||||
### `/msd-workspace --new`
|
||||
|
||||
リポジトリのコピーと独自の `.planning/` を持つワークスペースディレクトリを作成します。
|
||||
|
||||
```bash
|
||||
/gsd-workspace --new --name feature-b --repos hr-ui,ZeymoAPI --path ~/workspaces/feature-b
|
||||
/gsd-workspace --new --name feature-b --repos . --strategy worktree # same-repo isolation
|
||||
/msd-workspace --new --name feature-b --repos hr-ui,ZeymoAPI --path ~/workspaces/feature-b
|
||||
/msd-workspace --new --name feature-b --repos . --strategy worktree # same-repo isolation
|
||||
```
|
||||
|
||||
**引数:**
|
||||
@@ -33,26 +33,26 @@ GSD は作業ディレクトリごとに1つの `.planning/` ディレクトリ
|
||||
|------|----------|---------|-------------|
|
||||
| `--name` | はい | — | ワークスペース名 |
|
||||
| `--repos` | いいえ | 対話的な選択 | カンマ区切りのリポジトリパスまたは名前 |
|
||||
| `--path` | いいえ | `~/gsd-workspaces/<name>` | 出力先ディレクトリ |
|
||||
| `--path` | いいえ | `~/msd-workspaces/<name>` | 出力先ディレクトリ |
|
||||
| `--strategy` | いいえ | `worktree` | `worktree`(軽量、.git を共有)または `clone`(完全に独立) |
|
||||
| `--branch` | いいえ | `workspace/<name>` | チェックアウトするブランチ |
|
||||
| `--auto` | いいえ | false | 対話的な質問をスキップし、デフォルト値を使用 |
|
||||
|
||||
### `/gsd-workspace --list`
|
||||
### `/msd-workspace --list`
|
||||
|
||||
`~/gsd-workspaces/*/WORKSPACE.md` をスキャンしてワークスペースマニフェストを検索します。名前、パス、リポジトリ数、GSD ステータス(PROJECT.md の有無、現在のフェーズ)をテーブル形式で表示します。
|
||||
`~/msd-workspaces/*/WORKSPACE.md` をスキャンしてワークスペースマニフェストを検索します。名前、パス、リポジトリ数、MSD ステータス(PROJECT.md の有無、現在のフェーズ)をテーブル形式で表示します。
|
||||
|
||||
### `/gsd-workspace --remove`
|
||||
### `/msd-workspace --remove`
|
||||
|
||||
確認後にワークスペースディレクトリを削除します。worktree 戦略の場合、まず各メンバーリポジトリに対して `git worktree remove` を実行します。コミットされていない変更があるリポジトリがある場合は削除を拒否します。
|
||||
|
||||
## ディレクトリ構造
|
||||
|
||||
```
|
||||
~/gsd-workspaces/feature-b/ # workspace root
|
||||
~/msd-workspaces/feature-b/ # workspace root
|
||||
├── WORKSPACE.md # manifest
|
||||
├── .planning/ # independent GSD planning directory
|
||||
│ ├── PROJECT.md # (if user ran /gsd-new-project)
|
||||
├── .planning/ # independent MSD planning directory
|
||||
│ ├── PROJECT.md # (if user ran /msd-new-project)
|
||||
│ ├── STATE.md
|
||||
│ └── config.json
|
||||
├── hr-ui/ # git worktree of source repo
|
||||
@@ -64,7 +64,7 @@ GSD は作業ディレクトリごとに1つの `.planning/` ディレクトリ
|
||||
主要な特性:
|
||||
- `.planning/` はワークスペースのルートに配置され、個々のリポジトリ内には配置されない
|
||||
- 各リポジトリはワークスペースルート直下の対等なディレクトリ
|
||||
- `WORKSPACE.md` はルートにある唯一の GSD 固有ファイル(`.planning/` を除く)
|
||||
- `WORKSPACE.md` はルートにある唯一の MSD 固有ファイル(`.planning/` を除く)
|
||||
- `--strategy clone` の場合も同じ構造だが、リポジトリは完全なクローンとなる
|
||||
|
||||
## WORKSPACE.md のフォーマット
|
||||
@@ -89,7 +89,7 @@ Strategy: worktree
|
||||
|
||||
## ワークフロー
|
||||
|
||||
### `/gsd-workspace --new` のワークフロー手順
|
||||
### `/msd-workspace --new` のワークフロー手順
|
||||
|
||||
1. **セットアップ** — `init new-workspace` を呼び出し、JSON コンテキストを解析する
|
||||
2. **入力の収集** — `--name`/`--repos`/`--path` が指定されていない場合、対話的に質問する。リポジトリの選択時は、カレントディレクトリ内の子 `.git` ディレクトリを選択肢として表示する
|
||||
@@ -100,7 +100,7 @@ Strategy: worktree
|
||||
- Clone: `git clone <source> <workspace>/<repo-name>`
|
||||
6. **WORKSPACE.md の書き込み** — ソースパス、戦略、ブランチを含むマニフェスト
|
||||
7. **.planning/ の初期化** — `mkdir -p <workspace>/.planning`
|
||||
8. **/gsd-new-project の提案** — 新しいワークスペースでプロジェクト初期化を実行するか確認する
|
||||
8. **/msd-new-project の提案** — 新しいワークスペースでプロジェクト初期化を実行するか確認する
|
||||
9. **コミット** — commit_docs が有効な場合、WORKSPACE.md のアトミックコミット
|
||||
10. **完了** — ワークスペースのパスと次のステップを表示する
|
||||
|
||||
@@ -111,7 +111,7 @@ Strategy: worktree
|
||||
- 出力先パスが既に存在するかどうか
|
||||
- ソースリポジトリにコミットされていない変更があるかどうか
|
||||
- `git worktree` が利用可能かどうか
|
||||
- デフォルトのワークスペースベースディレクトリ (`~/gsd-workspaces/`)
|
||||
- デフォルトのワークスペースベースディレクトリ (`~/msd-workspaces/`)
|
||||
|
||||
ワークフローの分岐制御用フラグを含む JSON を返します。
|
||||
|
||||
@@ -137,7 +137,7 @@ Strategy: worktree
|
||||
|
||||
### List-Workspaces のエッジケース
|
||||
|
||||
- **`~/gsd-workspaces/` が存在しない場合** — 「ワークスペースが見つかりません」
|
||||
- **`~/msd-workspaces/` が存在しない場合** — 「ワークスペースが見つかりません」
|
||||
- **WORKSPACE.md は存在するが、内部のリポジトリがなくなっている場合** — ワークスペースを表示し、リポジトリを欠落としてマークする
|
||||
|
||||
## テスト
|
||||
@@ -163,23 +163,23 @@ Strategy: worktree
|
||||
|
||||
| コンポーネント | パス |
|
||||
|-----------|------|
|
||||
| コマンド: new-workspace | `commands/gsd/new-workspace.md` |
|
||||
| コマンド: list-workspaces | `commands/gsd/list-workspaces.md` |
|
||||
| コマンド: remove-workspace | `commands/gsd/remove-workspace.md` |
|
||||
| ワークフロー: new-workspace | `gsd-core/workflows/new-workspace.md` |
|
||||
| ワークフロー: list-workspaces | `gsd-core/workflows/list-workspaces.md` |
|
||||
| ワークフロー: remove-workspace | `gsd-core/workflows/remove-workspace.md` |
|
||||
| Init 関数 | `gsd-core/bin/lib/init.cjs`(`cmdInitNewWorkspace`、`cmdInitListWorkspaces`、`cmdInitRemoveWorkspace` を追加) |
|
||||
| ルーティング | `gsd-core/bin/gsd-tools.cjs`(init switch にケースを追加) |
|
||||
| コマンド: new-workspace | `commands/msd/new-workspace.md` |
|
||||
| コマンド: list-workspaces | `commands/msd/list-workspaces.md` |
|
||||
| コマンド: remove-workspace | `commands/msd/remove-workspace.md` |
|
||||
| ワークフロー: new-workspace | `msd-core/workflows/new-workspace.md` |
|
||||
| ワークフロー: list-workspaces | `msd-core/workflows/list-workspaces.md` |
|
||||
| ワークフロー: remove-workspace | `msd-core/workflows/remove-workspace.md` |
|
||||
| Init 関数 | `msd-core/bin/lib/init.cjs`(`cmdInitNewWorkspace`、`cmdInitListWorkspaces`、`cmdInitRemoveWorkspace` を追加) |
|
||||
| ルーティング | `msd-core/bin/msd-tools.cjs`(init switch にケースを追加) |
|
||||
| テスト | `tests/workspace.test.cjs` |
|
||||
|
||||
## 設計上の決定
|
||||
|
||||
| 決定事項 | 根拠 |
|
||||
|----------|-----------|
|
||||
| 論理的なレジストリではなく物理ディレクトリを採用 | ファイルシステムを信頼の源とする — GSD の既存の cwd ベースの検出パターンと一致する |
|
||||
| 論理的なレジストリではなく物理ディレクトリを採用 | ファイルシステムを信頼の源とする — MSD の既存の cwd ベースの検出パターンと一致する |
|
||||
| Worktree をデフォルト戦略とする | 軽量(.git オブジェクトを共有)、作成が高速、クリーンアップが容易 |
|
||||
| `.planning/` をワークスペースルートに配置 | 個々のリポジトリの planning から完全に分離できる。各ワークスペースは独立した GSD プロジェクトとなる |
|
||||
| `.planning/` をワークスペースルートに配置 | 個々のリポジトリの planning から完全に分離できる。各ワークスペースは独立した MSD プロジェクトとなる |
|
||||
| 中央レジストリを使用しない | 状態の乖離を回避する。`list-workspaces` はファイルシステムを直接スキャンする |
|
||||
| ケース B を A の特殊ケースとする | `--repos .` で同じ仕組みを再利用し、フィーチャーブランチ専用のコードが不要 |
|
||||
| デフォルトパスを `~/gsd-workspaces/<name>` とする | `list-workspaces` がスキャンしやすい予測可能な場所に配置し、ワークスペースをソースリポジトリの外に保つ |
|
||||
| デフォルトパスを `~/msd-workspaces/<name>` とする | `list-workspaces` がスキャンしやすい予測可能な場所に配置し、ワークスペースをソースリポジトリの外に保つ |
|
||||
|
||||
Reference in New Issue
Block a user