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:
@@ -2,11 +2,11 @@
|
||||
|
||||
> **エージェント型ワーカー向け:** 必須サブスキル: superpowers:subagent-driven-development(推奨)または superpowers:executing-plans を使用して、このプランをタスクごとに実装してください。各ステップはチェックボックス(`- [ ]`)構文で進捗を追跡します。
|
||||
|
||||
**目標:** `/gsd-new-project` が `.planning/config.json` を作成する際、ユーザーが選択した6つのキーだけでなく、すべての有効なデフォルト値を含むファイルを生成する。これにより、開発者はソースコードを読まなくてもすべての設定を確認できるようになる。
|
||||
**目標:** `/msd-new-project` が `.planning/config.json` を作成する際、ユーザーが選択した6つのキーだけでなく、すべての有効なデフォルト値を含むファイルを生成する。これにより、開発者はソースコードを読まなくてもすべての設定を確認できるようになる。
|
||||
|
||||
**アーキテクチャ:** `config.cjs` に単一の JS 関数 `buildNewProjectConfig(cwd, userChoices)` を追加し、新規プロジェクトの完全な設定の唯一の信頼できる情報源とする。これを CLI コマンド `config-new-project` として公開する。`new-project.md` ワークフローを更新し、部分的な JSON をインラインで書き込む代わりにこのコマンドを呼び出すようにする。
|
||||
|
||||
**技術スタック:** Node.js/CommonJS、既存の gsd-tools CLI、テストには `node:test` を使用。
|
||||
**技術スタック:** Node.js/CommonJS、既存の msd-tools CLI、テストには `node:test` を使用。
|
||||
|
||||
---
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
- `search_gitignored: false`
|
||||
- `brave_search: false`(または環境検出による `true`)
|
||||
- `git.branching_strategy: "none"`
|
||||
- `git.phase_branch_template: "gsd/phase-{phase}-{slug}"`
|
||||
- `git.milestone_branch_template: "gsd/{milestone}-{slug}"`
|
||||
- `git.phase_branch_template: "msd/phase-{phase}-{slug}"`
|
||||
- `git.milestone_branch_template: "msd/{milestone}-{slug}"`
|
||||
|
||||
最初から存在すべき完全な設定:
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
"brave_search": false,
|
||||
"git": {
|
||||
"branching_strategy": "none",
|
||||
"phase_branch_template": "gsd/phase-{phase}-{slug}",
|
||||
"milestone_branch_template": "gsd/{milestone}-{slug}"
|
||||
"phase_branch_template": "msd/phase-{phase}-{slug}",
|
||||
"milestone_branch_template": "msd/{milestone}-{slug}"
|
||||
},
|
||||
"workflow": {
|
||||
"research": true,
|
||||
@@ -62,7 +62,7 @@
|
||||
| ファイル | 操作 | 目的 |
|
||||
|------|--------|---------|
|
||||
| `get-shit-done/bin/lib/config.cjs` | 変更 | `buildNewProjectConfig()` + `cmdConfigNewProject()` を追加 |
|
||||
| `get-shit-done/bin/gsd-tools.cjs` | 変更 | `config-new-project` の case を登録 + usage 文字列を更新 |
|
||||
| `get-shit-done/bin/msd-tools.cjs` | 変更 | `config-new-project` の case を登録 + usage 文字列を更新 |
|
||||
| `get-shit-done/workflows/new-project.md` | 変更 | ステップ 2a + 5: インライン JSON 書き込みを CLI 呼び出しに置換 |
|
||||
| `tests/config.test.cjs` | 変更 | `config-new-project` テストスイートを追加 |
|
||||
|
||||
@@ -101,7 +101,7 @@ describe('config-new-project command', () => {
|
||||
model_profile: 'balanced',
|
||||
workflow: { research: true, plan_check: true, verifier: true, nyquist_validation: true },
|
||||
});
|
||||
const result = runGsdTools(['config-new-project', choices], tmpDir);
|
||||
const result = runMsdTools(['config-new-project', choices], tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const config = readConfig(tmpDir);
|
||||
@@ -120,8 +120,8 @@ describe('config-new-project command', () => {
|
||||
// git セクションが3つのキーすべてを持つ
|
||||
assert.ok(config.git && typeof config.git === 'object', 'git section should exist');
|
||||
assert.strictEqual(config.git.branching_strategy, 'none');
|
||||
assert.strictEqual(config.git.phase_branch_template, 'gsd/phase-{phase}-{slug}');
|
||||
assert.strictEqual(config.git.milestone_branch_template, 'gsd/{milestone}-{slug}');
|
||||
assert.strictEqual(config.git.phase_branch_template, 'msd/phase-{phase}-{slug}');
|
||||
assert.strictEqual(config.git.milestone_branch_template, 'msd/{milestone}-{slug}');
|
||||
|
||||
// workflow セクションが4つのキーすべてを持つ
|
||||
assert.ok(config.workflow && typeof config.workflow === 'object', 'workflow section should exist');
|
||||
@@ -140,7 +140,7 @@ describe('config-new-project command', () => {
|
||||
model_profile: 'quality',
|
||||
workflow: { research: false, plan_check: false, verifier: true, nyquist_validation: false },
|
||||
});
|
||||
const result = runGsdTools(['config-new-project', choices], tmpDir);
|
||||
const result = runMsdTools(['config-new-project', choices], tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const config = readConfig(tmpDir);
|
||||
@@ -159,7 +159,7 @@ describe('config-new-project command', () => {
|
||||
});
|
||||
|
||||
test('works with empty choices — all defaults materialized', () => {
|
||||
const result = runGsdTools(['config-new-project', '{}'], tmpDir);
|
||||
const result = runMsdTools(['config-new-project', '{}'], tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const config = readConfig(tmpDir);
|
||||
@@ -176,13 +176,13 @@ describe('config-new-project command', () => {
|
||||
test('is idempotent — returns already_exists if config exists', () => {
|
||||
// 1回目の呼び出し: 作成
|
||||
const choices = JSON.stringify({ mode: 'yolo', granularity: 'fine' });
|
||||
const first = runGsdTools(['config-new-project', choices], tmpDir);
|
||||
const first = runMsdTools(['config-new-project', choices], tmpDir);
|
||||
assert.ok(first.success, `First call failed: ${first.error}`);
|
||||
const firstOut = JSON.parse(first.output);
|
||||
assert.strictEqual(firstOut.created, true);
|
||||
|
||||
// 2回目の呼び出し: 冪等性の確認
|
||||
const second = runGsdTools(['config-new-project', choices], tmpDir);
|
||||
const second = runMsdTools(['config-new-project', choices], tmpDir);
|
||||
assert.ok(second.success, `Second call failed: ${second.error}`);
|
||||
const secondOut = JSON.parse(second.output);
|
||||
assert.strictEqual(secondOut.created, false);
|
||||
@@ -200,7 +200,7 @@ describe('config-new-project command', () => {
|
||||
granularity: 'standard',
|
||||
workflow: { research: true, plan_check: true, verifier: true, nyquist_validation: true, auto_advance: true },
|
||||
});
|
||||
const result = runGsdTools(['config-new-project', choices], tmpDir);
|
||||
const result = runMsdTools(['config-new-project', choices], tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
|
||||
const config = readConfig(tmpDir);
|
||||
@@ -208,14 +208,14 @@ describe('config-new-project command', () => {
|
||||
});
|
||||
|
||||
test('rejects invalid JSON choices', () => {
|
||||
const result = runGsdTools(['config-new-project', '{not-json}'], tmpDir);
|
||||
const result = runMsdTools(['config-new-project', '{not-json}'], tmpDir);
|
||||
assert.strictEqual(result.success, false);
|
||||
assert.ok(result.error.includes('Invalid JSON'), `Expected "Invalid JSON" in: ${result.error}`);
|
||||
});
|
||||
|
||||
test('output JSON has created:true on success', () => {
|
||||
const choices = JSON.stringify({ mode: 'interactive', granularity: 'standard' });
|
||||
const result = runGsdTools(['config-new-project', choices], tmpDir);
|
||||
const result = runMsdTools(['config-new-project', choices], tmpDir);
|
||||
assert.ok(result.success, `Command failed: ${result.error}`);
|
||||
const out = JSON.parse(result.output);
|
||||
assert.strictEqual(out.created, true);
|
||||
@@ -243,7 +243,7 @@ node --test tests/config.test.cjs 2>&1 | grep -E "config-new-project|FAIL|Error"
|
||||
*
|
||||
* 以下の優先順位(昇順)でマージする:
|
||||
* 1. ハードコードされたデフォルト値
|
||||
* 2. ~/.gsd/defaults.json のユーザーレベルデフォルト(存在する場合)
|
||||
* 2. ~/.msd/defaults.json のユーザーレベルデフォルト(存在する場合)
|
||||
* 3. userChoices(new-project 時にユーザーが明示的に選択した設定)
|
||||
*
|
||||
* プレーンオブジェクトを返す — ファイルの書き込みは行わない。
|
||||
@@ -253,11 +253,11 @@ function buildNewProjectConfig(cwd, userChoices) {
|
||||
const homedir = require('os').homedir();
|
||||
|
||||
// Brave Search API キーの利用可能性を検出
|
||||
const braveKeyFile = path.join(homedir, '.gsd', 'brave_api_key');
|
||||
const braveKeyFile = path.join(homedir, '.msd', 'brave_api_key');
|
||||
const hasBraveSearch = !!(process.env.BRAVE_API_KEY || fs.existsSync(braveKeyFile));
|
||||
|
||||
// ~/.gsd/defaults.json からユーザーレベルのデフォルトを読み込む(存在する場合)
|
||||
const globalDefaultsPath = path.join(homedir, '.gsd', 'defaults.json');
|
||||
// ~/.msd/defaults.json からユーザーレベルのデフォルトを読み込む(存在する場合)
|
||||
const globalDefaultsPath = path.join(homedir, '.msd', 'defaults.json');
|
||||
let userDefaults = {};
|
||||
try {
|
||||
if (fs.existsSync(globalDefaultsPath)) {
|
||||
@@ -284,8 +284,8 @@ function buildNewProjectConfig(cwd, userChoices) {
|
||||
brave_search: hasBraveSearch,
|
||||
git: {
|
||||
branching_strategy: 'none',
|
||||
phase_branch_template: 'gsd/phase-{phase}-{slug}',
|
||||
milestone_branch_template: 'gsd/{milestone}-{slug}',
|
||||
phase_branch_template: 'msd/phase-{phase}-{slug}',
|
||||
milestone_branch_template: 'msd/{milestone}-{slug}',
|
||||
},
|
||||
workflow: {
|
||||
research: true,
|
||||
@@ -316,9 +316,9 @@ function buildNewProjectConfig(cwd, userChoices) {
|
||||
/**
|
||||
* コマンド: 新規プロジェクト用の完全展開された .planning/config.json を作成する。
|
||||
*
|
||||
* ユーザーが選択した設定を JSON 文字列として受け取る(/gsd-new-project 時に
|
||||
* ユーザーが選択した設定を JSON 文字列として受け取る(/msd-new-project 時に
|
||||
* ユーザーが明示的に設定したキー)。残りのキーはハードコードされたデフォルトと
|
||||
* オプションの ~/.gsd/defaults.json から補完される。
|
||||
* オプションの ~/.msd/defaults.json から補完される。
|
||||
*
|
||||
* 冪等: config.json が既に存在する場合は { created: false } を返す。
|
||||
*/
|
||||
@@ -383,13 +383,13 @@ git commit -m "feat: add config-new-project command for full config materializat
|
||||
|
||||
---
|
||||
|
||||
## タスク 2: gsd-tools.cjs に `config-new-project` を登録する
|
||||
## タスク 2: msd-tools.cjs に `config-new-project` を登録する
|
||||
|
||||
**ファイル:**
|
||||
|
||||
- 変更: `get-shit-done/bin/gsd-tools.cjs`
|
||||
- 変更: `get-shit-done/bin/msd-tools.cjs`
|
||||
|
||||
- [ ] **ステップ 2.1: gsd-tools.cjs の switch 文に case を追加する**
|
||||
- [ ] **ステップ 2.1: msd-tools.cjs の switch 文に case を追加する**
|
||||
|
||||
`config-get` の case の後(401行目付近)に以下を追加する:
|
||||
|
||||
@@ -409,12 +409,12 @@ git commit -m "feat: add config-new-project command for full config materializat
|
||||
|
||||
```bash
|
||||
cd /Users/diego/Dev/get-shit-done
|
||||
node get-shit-done/bin/gsd-tools.cjs config-new-project '{"mode":"interactive","granularity":"standard"}' --cwd /tmp/gsd-smoke-$(date +%s)
|
||||
node get-shit-done/bin/msd-tools.cjs config-new-project '{"mode":"interactive","granularity":"standard"}' --cwd /tmp/msd-smoke-$(date +%s)
|
||||
```
|
||||
|
||||
期待結果: `{"created":true,"path":".planning/config.json"}` (または類似の出力)が表示される。
|
||||
|
||||
クリーンアップ: `rm -rf /tmp/gsd-smoke-*`
|
||||
クリーンアップ: `rm -rf /tmp/msd-smoke-*`
|
||||
|
||||
- [ ] **ステップ 2.3: フルテストスイートを実行する**
|
||||
|
||||
@@ -429,8 +429,8 @@ node --test tests/config.test.cjs 2>&1 | tail -10
|
||||
|
||||
```bash
|
||||
cd /Users/diego/Dev/get-shit-done
|
||||
git add get-shit-done/bin/gsd-tools.cjs
|
||||
git commit -m "feat: register config-new-project in gsd-tools CLI router"
|
||||
git add get-shit-done/bin/msd-tools.cjs
|
||||
git commit -m "feat: register config-new-project in msd-tools CLI router"
|
||||
```
|
||||
|
||||
---
|
||||
@@ -470,7 +470,7 @@ Create `.planning/config.json` using the CLI (fills in all defaults automaticall
|
||||
|
||||
```bash
|
||||
mkdir -p .planning
|
||||
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-new-project "$(cat <<'CHOICES'
|
||||
node "$HOME/.claude/get-shit-done/bin/msd-tools.cjs" config-new-project "$(cat <<'CHOICES'
|
||||
{
|
||||
"mode": "yolo",
|
||||
"granularity": "[selected: coarse|standard|fine]",
|
||||
@@ -516,7 +516,7 @@ Create `.planning/config.json` using the CLI (fills in all defaults automaticall
|
||||
|
||||
```bash
|
||||
mkdir -p .planning
|
||||
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" config-new-project "$(cat <<'CHOICES'
|
||||
node "$HOME/.claude/get-shit-done/bin/msd-tools.cjs" config-new-project "$(cat <<'CHOICES'
|
||||
{
|
||||
"mode": "[selected: yolo|interactive]",
|
||||
"granularity": "[selected: coarse|standard|fine]",
|
||||
@@ -578,10 +578,10 @@ TMP=$(mktemp -d)
|
||||
cd "$TMP"
|
||||
|
||||
# ステップ 1 のシミュレーション: init new-project の実行結果
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/gsd-tools.cjs init new-project --cwd "$TMP"
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/msd-tools.cjs init new-project --cwd "$TMP"
|
||||
|
||||
# ステップ 5 のシミュレーション: 完全な設定を作成
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/gsd-tools.cjs config-new-project '{
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/msd-tools.cjs config-new-project '{
|
||||
"mode": "interactive",
|
||||
"granularity": "standard",
|
||||
"parallelization": true,
|
||||
@@ -611,11 +611,11 @@ rm -rf "$TMP"
|
||||
TMP=$(mktemp -d)
|
||||
CHOICES='{"mode":"yolo","granularity":"coarse"}'
|
||||
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/gsd-tools.cjs config-new-project "$CHOICES" --cwd "$TMP"
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/msd-tools.cjs config-new-project "$CHOICES" --cwd "$TMP"
|
||||
FIRST=$(cat "$TMP/.planning/config.json")
|
||||
|
||||
# 2回目の呼び出しは何も変更しないはず
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/gsd-tools.cjs config-new-project "$CHOICES" --cwd "$TMP"
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/msd-tools.cjs config-new-project "$CHOICES" --cwd "$TMP"
|
||||
SECOND=$(cat "$TMP/.planning/config.json")
|
||||
|
||||
[ "$FIRST" = "$SECOND" ] && echo "IDEMPOTENT: OK" || echo "IDEMPOTENT: FAIL"
|
||||
@@ -628,17 +628,17 @@ rm -rf "$TMP"
|
||||
|
||||
```bash
|
||||
TMP=$(mktemp -d)
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/gsd-tools.cjs config-new-project '{
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/msd-tools.cjs config-new-project '{
|
||||
"mode":"yolo","granularity":"standard","parallelization":true,"commit_docs":true,
|
||||
"model_profile":"balanced",
|
||||
"workflow":{"research":true,"plan_check":false,"verifier":true,"nyquist_validation":true}
|
||||
}' --cwd "$TMP"
|
||||
|
||||
# loadConfig が正しく plan_check(workflow.plan_check としてネスト)を読み取るか
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/gsd-tools.cjs config-get workflow.plan_check --cwd "$TMP"
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/msd-tools.cjs config-get workflow.plan_check --cwd "$TMP"
|
||||
# 期待値: false
|
||||
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/gsd-tools.cjs config-get git.branching_strategy --cwd "$TMP"
|
||||
node /Users/diego/Dev/get-shit-done/get-shit-done/bin/msd-tools.cjs config-get git.branching_strategy --cwd "$TMP"
|
||||
# 期待値: "none"
|
||||
|
||||
rm -rf "$TMP"
|
||||
@@ -661,7 +661,7 @@ node --test tests/ 2>&1 | grep -E "pass|fail|error" | tail -5
|
||||
feat: materialize all config defaults at new-project initialization
|
||||
|
||||
**問題:**
|
||||
`/gsd-new-project` はオンボーディング時にユーザーが明示的に選択した6つのキーのみで
|
||||
`/msd-new-project` はオンボーディング時にユーザーが明示的に選択した6つのキーのみで
|
||||
`.planning/config.json` を作成する。5つの追加キー
|
||||
(`search_gitignored`、`brave_search`、`git.branching_strategy`、
|
||||
`git.phase_branch_template`、`git.milestone_branch_template`)は実行時に
|
||||
@@ -670,11 +670,11 @@ feat: materialize all config defaults at new-project initialization
|
||||
これにより2つの問題が生じる:
|
||||
1. **発見可能性**: ユーザーがソースコードを読まない限り `git.branching_strategy` を
|
||||
確認・理解できない — 設定ファイルに表示されない。
|
||||
2. **暗黙的な拡張**: `/gsd-settings` や `config-set` が初めて設定に書き込む際にも、
|
||||
2. **暗黙的な拡張**: `/msd-settings` や `config-set` が初めて設定に書き込む際にも、
|
||||
これらのキーは追加されない。設定ファイルは実効設定のごく一部しか反映しない。
|
||||
|
||||
**解決策:**
|
||||
`gsd-tools.cjs` に `config-new-project` CLI コマンドを追加する。このコマンドは:
|
||||
`msd-tools.cjs` に `config-new-project` CLI コマンドを追加する。このコマンドは:
|
||||
- ユーザーが選択した値を JSON として受け取る
|
||||
- すべてのランタイムデフォルト(環境検出される `brave_search` を含む)とマージする
|
||||
- 完全に展開された設定を一度に書き込む
|
||||
@@ -694,6 +694,6 @@ JSON テンプレートの書き込みの代わりにこのコマンドを呼び
|
||||
|
||||
**発見可能性が向上する理由:**
|
||||
初めて `.planning/config.json` を開いた開発者が `git.branching_strategy: "none"` を
|
||||
見て、GSD のソースコードを読まなくてもブランチ戦略機能が利用可能で設定変更できることを
|
||||
見て、MSD のソースコードを読まなくてもブランチ戦略機能が利用可能で設定変更できることを
|
||||
即座に理解できるようになる。
|
||||
```
|
||||
|
||||
@@ -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