Skip to content

Commit 7fefd21

Browse files
author
薛華慶, james.hsueh
committed
fix: update python script
1 parent f5917e9 commit 7fefd21

File tree

12 files changed

+94
-80
lines changed

12 files changed

+94
-80
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
description: Phase 2 - 分析 Gherkin 規格,設計高階架構(資料模型與服務介面),輸出到 docs/features/{feature_name}/
3+
argument-hint: <feature_file_path>
34
---
45

56
# SDD Phase 2: 架構設計
67

78
**角色:** 系統架構師
8-
**輸入:** Gherkin 規格檔案 {{prompt}}
9+
**輸入:** Gherkin 規格檔案 $1
910
**輸出:** `docs/features/{feature_name}/architecture.md`
1011

1112
## 核心原則
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
22
description: 自動執行完整 SDD 工作流程 (4 Phases)
3+
argument-hint: <requirement_description>
34
---
45

56
# SDD 自動模式
67

7-
**需求:** {{prompt}}
8+
**需求:** $1
89

910
**目標:** 自動執行 Phase 1-4,從需求到驗證完成,無需手動介入
1011

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
description: Phase 3 - 根據架構設計實作程式碼,滿足 Gherkin 規格
3+
argument-hint: <feature_file_path>
34
---
45

56
# SDD Phase 3: 實作
67

78
**角色:** 資深工程師
8-
**輸入:** Gherkin 規格檔案 {{prompt}}
9+
**輸入:** Gherkin 規格檔案 $1
910
**前置條件:** 已完成 Phase 2,存在 `docs/features/{feature_name}/architecture.md`
1011
**輸出:** 實作程式碼於專案既有目錄結構
1112

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
description: 階段 1 - 從使用者需求生成 Gherkin 行為規格(PM 角色)
3+
argument-hint: <requirement_description>
34
---
45

56
# SDD 階段 1:需求規格(靈魂)
@@ -10,7 +11,7 @@ description: 階段 1 - 從使用者需求生成 Gherkin 行為規格(PM 角
1011

1112
## 使用者需求
1213

13-
{{prompt}}
14+
$1
1415

1516
## 您的職責約束
1617

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
---
22
description: Phase 4 - 驗證實作(QA 角色)
3+
argument-hint: <feature_file_path>
34
---
45

56
# SDD Phase 4: 驗證
67

7-
**輸入:** {{prompt}} (Gherkin 檔案路徑)
8+
**輸入:** $1 (Gherkin 檔案路徑)
89

910
**角色:** QA - 驗證實作符合 Gherkin 規格與架構設計,只報告不修改
1011

CODEX_SUPPORT_CHANGELOG.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ GSI-Protocol 現在支援 **Codex (OpenAI)**!除了原有的 Claude Code 支
2020
└── sdd-verify.md # Phase 4: 驗證測試
2121
```
2222

23+
**注意:** Codex 的指令檔案實際上應放在 `.codex/prompts/` 目錄(已在最新版本中修正)。
24+
2325
### 2. 新增文檔
2426
- **`docs/PLATFORM_SUPPORT.md`** - 平台支援指南
2527
- Claude Code vs Codex 比較
@@ -149,9 +151,11 @@ your-project/
149151
## 🔍 技術細節
150152

151153
### 指令內容
152-
- `.claude/commands/``.codex/commands/` 中的指令檔案內容**完全相同**
153-
- 只是放在不同目錄讓不同的 AI 工具讀取
154-
- 這確保了兩個平台有相同的工作流程和輸出格式
154+
- `.claude/commands/``.codex/commands/` 中的指令有些許格式差異:
155+
- **Claude Code**: 使用 `{{prompt}}` 變數
156+
- **Codex**: 使用 `argument-hint` 欄位和 `$1` 參數
157+
- 這些差異是為了符合各平台的技術規範
158+
- **工作流程和輸出格式完全相同**,確保兩個平台有相同的開發體驗
155159

156160
### 安裝腳本邏輯
157161
1. 先詢問用戶要安裝哪個平台

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,13 @@ curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.c
7979

8080
**Codex (OpenAI):**
8181
```bash
82-
mkdir -p ~/.codex/commands
83-
cd ~/.codex/commands
84-
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-auto.md -o sdd-auto.md
85-
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-spec.md -o sdd-spec.md
86-
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-arch.md -o sdd-arch.md
87-
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-impl.md -o sdd-impl.md
88-
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-verify.md -o sdd-verify.md
82+
mkdir -p ~/.codex/prompts
83+
cd ~/.codex/prompts
84+
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-auto.md -o sdd-auto.md
85+
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-spec.md -o sdd-spec.md
86+
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-arch.md -o sdd-arch.md
87+
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-impl.md -o sdd-impl.md
88+
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-verify.md -o sdd-verify.md
8989
```
9090

9191
完成後,可在任何專案中使用 `/sdd-auto``/sdd-spec` 等全域指令。
@@ -349,7 +349,7 @@ GSI-Protocol/
349349
│ ├── sdd-impl.md # Phase 3
350350
│ └── sdd-verify.md # Phase 4
351351
├── .codex/
352-
│ └── commands/ # Codex (OpenAI) 指令
352+
│ └── prompts/ # Codex (OpenAI) prompts
353353
│ ├── sdd-auto.md # 自動工作流程
354354
│ ├── sdd-spec.md # Phase 1
355355
│ ├── sdd-arch.md # Phase 2

docs/INSTALL.md

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Enter choice [1-2] (default: 1): 2
7979
ℹ Downloading GSI-Protocol from GitHub...
8080
✓ Downloaded successfully
8181
✓ Installed 5 Claude Code commands to ~/.claude/commands
82-
✓ Installed 5 Codex commands to ~/.codex/commands
82+
✓ Installed 5 Codex commands to ~/.codex/prompts
8383
8484
============================================================
8585
✓ Installation complete! Total files installed: 10
@@ -117,15 +117,15 @@ wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.claude
117117

118118
**Codex (OpenAI):**
119119
```bash
120-
mkdir -p ~/.codex/commands
121-
cd ~/.codex/commands
120+
mkdir -p ~/.codex/prompts
121+
cd ~/.codex/prompts
122122

123123
# 下載所有指令檔案
124-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-auto.md
125-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-spec.md
126-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-arch.md
127-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-impl.md
128-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-verify.md
124+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-auto.md
125+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-spec.md
126+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-arch.md
127+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-impl.md
128+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-verify.md
129129
```
130130

131131
### 手動專案內安裝
@@ -142,16 +142,16 @@ wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.claude
142142
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.claude/commands/sdd-verify.md
143143

144144
# Codex
145-
mkdir -p .codex/commands
146-
cd .codex/commands
147-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-auto.md
148-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-spec.md
149-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-arch.md
150-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-impl.md
151-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-verify.md
145+
mkdir -p .codex/prompts
146+
cd .codex/prompts
147+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-auto.md
148+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-spec.md
149+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-arch.md
150+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-impl.md
151+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-verify.md
152152

153153
# 提交到 Git(可選)
154-
git add .claude/commands/ .codex/commands/
154+
git add .claude/commands/ .codex/prompts/
155155
git commit -m "Add GSI-Protocol workflow commands"
156156
```
157157

@@ -168,14 +168,14 @@ ls ~/.claude/commands/ | grep sdd
168168

169169
**Codex (全域安裝):**
170170
```bash
171-
ls ~/.codex/commands/ | grep sdd
171+
ls ~/.codex/prompts/ | grep sdd
172172
```
173173

174174
**專案內安裝:**
175175
```bash
176176
ls .claude/commands/ | grep sdd
177177
#
178-
ls .codex/commands/ | grep sdd
178+
ls .codex/prompts/ | grep sdd
179179
```
180180

181181
應該看到:
@@ -241,7 +241,7 @@ sdd-verify.md
241241

242242
**Codex (OpenAI):**
243243
```
244-
~/.codex/commands/
244+
~/.codex/prompts/
245245
├── sdd-auto.md
246246
├── sdd-spec.md
247247
├── sdd-arch.md
@@ -300,7 +300,7 @@ your-project/
300300

301301
### 推薦配置
302302

303-
-**全域安裝**`~/.claude/commands/``~/.codex/commands/` (所有專案共用)
303+
-**全域安裝**`~/.claude/commands/``~/.codex/prompts/` (所有專案共用)
304304
-**專案目錄**:只有 `features/``docs/features/``src/`(生成的程式碼)
305305
-**不要**:把整個 GSI-Protocol repo clone 到專案裡
306306

@@ -316,9 +316,9 @@ your-project/
316316
**方式 2:專案內只包含 commands(Git 管理)**
317317
```bash
318318
# 在專案內安裝並 commit
319-
mkdir -p .claude/commands .codex/commands
319+
mkdir -p .claude/commands .codex/prompts
320320
# 複製命令檔案...
321-
git add .claude/commands/ .codex/commands/
321+
git add .claude/commands/ .codex/prompts/
322322
git commit -m "Add SDD workflow commands"
323323
```
324324

@@ -347,7 +347,7 @@ rm -f ~/.claude/commands/sdd-*.md
347347

348348
**Codex (OpenAI):**
349349
```bash
350-
rm -f ~/.codex/commands/sdd-*.md
350+
rm -f ~/.codex/prompts/sdd-*.md
351351
```
352352

353353
### 專案內安裝
@@ -361,7 +361,7 @@ rm -rf .claude/
361361

362362
**Codex (OpenAI):**
363363
```bash
364-
rm -rf .codex/commands/sdd-*.md
364+
rm -rf .codex/prompts/sdd-*.md
365365
# 或整個目錄
366366
rm -rf .codex/
367367
```
@@ -384,7 +384,7 @@ rm -rf .codex/
384384

385385
**A:** 取決於您的 AI 工具:
386386
- 如果使用 Claude Code → 安裝 `.claude/commands/`
387-
- 如果使用 Codex (OpenAI) → 安裝 `.codex/commands/`
387+
- 如果使用 Codex (OpenAI) → 安裝 `.codex/prompts/`
388388
- 可以同時安裝兩者,隨時切換使用
389389

390390
### Q:Claude Code 和 Codex 的指令內容有差異嗎?
@@ -413,8 +413,8 @@ powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
413413
### Q:全域安裝和專案內安裝有什麼區別?
414414

415415
**A:**
416-
- **全域**`~/.claude/commands/``~/.codex/commands/`,所有專案共用,專案保持乾淨
417-
- **專案內**`.claude/commands/``.codex/commands/`,指令隨專案走,團隊成員 clone 後就有
416+
- **全域**`~/.claude/commands/``~/.codex/prompts/`,所有專案共用,專案保持乾淨
417+
- **專案內**`.claude/commands/``.codex/prompts/`,指令隨專案走,團隊成員 clone 後就有
418418

419419
### Q:團隊成員需要每個人都安裝嗎?
420420

@@ -454,12 +454,12 @@ wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.claude
454454

455455
**手動全域安裝 - Codex (OpenAI):**
456456
```bash
457-
mkdir -p ~/.codex/commands && cd ~/.codex/commands
458-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-auto.md
459-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-spec.md
460-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-arch.md
461-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-impl.md
462-
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-verify.md
457+
mkdir -p ~/.codex/prompts && cd ~/.codex/prompts
458+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-auto.md
459+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-spec.md
460+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-arch.md
461+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-impl.md
462+
wget https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-verify.md
463463
```
464464

465465
開始使用 GSI-Protocol,讓 AI 幫您寫結構化的程式碼!🚀

docs/PLATFORM_SUPPORT.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ GSI-Protocol 現在支援多個 AI 平台,讓您可以使用您偏好的 AI
1515
### Codex (OpenAI)
1616
- **開發商:** OpenAI
1717
- **特色:** 基於 GPT 技術的程式碼生成
18-
- **指令目錄:** `~/.codex/commands/` (全域) 或 `.codex/commands/` (專案)
18+
- **指令目錄:** `~/.codex/prompts/` (全域) 或 `.codex/prompts/` (專案)
1919
- **狀態:** ✅ 完整支援
2020

2121
---
@@ -83,13 +83,13 @@ curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/in
8383

8484
```bash
8585
# 全域安裝
86-
mkdir -p ~/.codex/commands
87-
cd ~/.codex/commands
88-
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-auto.md -o sdd-auto.md
89-
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-spec.md -o sdd-spec.md
90-
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-arch.md -o sdd-arch.md
91-
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-impl.md -o sdd-impl.md
92-
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/commands/sdd-verify.md -o sdd-verify.md
86+
mkdir -p ~/.codex/prompts
87+
cd ~/.codex/prompts
88+
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-auto.md -o sdd-auto.md
89+
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-spec.md -o sdd-spec.md
90+
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-arch.md -o sdd-arch.md
91+
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-impl.md -o sdd-impl.md
92+
curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.codex/prompts/sdd-verify.md -o sdd-verify.md
9393
```
9494

9595
### 已安裝 Codex,想加入 Claude Code
@@ -119,7 +119,7 @@ curl -sSL https://raw.githubusercontent.com/CodeMachine0121/GSI-Protocol/main/.c
119119
├── sdd-impl.md
120120
└── sdd-verify.md
121121
122-
~/.codex/commands/ # Codex 全域指令
122+
~/.codex/prompts/ # Codex 全域 prompts
123123
├── sdd-auto.md
124124
├── sdd-spec.md
125125
├── sdd-arch.md
@@ -138,7 +138,7 @@ your-project/
138138
```
139139
your-project/
140140
├── .claude/commands/ # Claude Code 專案指令(可選)
141-
├── .codex/commands/ # Codex 專案指令(可選)
141+
├── .codex/prompts/ # Codex 專案 prompts(可選)
142142
├── features/
143143
├── docs/features/
144144
└── src/
@@ -150,7 +150,12 @@ your-project/
150150

151151
### Q: 指令內容有差異嗎?
152152

153-
**A:** 沒有,`.claude/commands/``.codex/commands/` 中的指令檔案內容完全相同。只是放在不同目錄讓不同的 AI 工具讀取。
153+
**A:** 有些許差異。兩個平台的**工作流程和輸出格式完全相同**,但指令格式略有不同:
154+
155+
- **Claude Code**: 使用 `{{prompt}}` 變數來接收參數
156+
- **Codex**: 使用 `argument-hint` 欄位和 `$1` 參數
157+
158+
這些差異是為了符合各平台的技術規範,但不影響實際使用體驗。
154159

155160
### Q: 可以同時安裝兩個平台嗎?
156161

docs/PYTHON_INSTALLER.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Enter choice [1-2] (default: 1): 2
8787
ℹ Downloading GSI-Protocol from GitHub...
8888
✓ Downloaded successfully
8989
✓ Installed 5 Claude Code commands to ~/.claude/commands
90-
✓ Installed 5 Codex commands to ~/.codex/commands
90+
✓ Installed 5 Codex commands to ~/.codex/prompts
9191
9292
============================================================
9393
✓ Installation complete! Total files installed: 10
@@ -238,11 +238,11 @@ curl -LsSf https://astral.sh/uv/install.sh | sh
238238
```bash
239239
# 全域安裝
240240
rm -rf ~/.claude/commands/sdd-*
241-
rm -rf ~/.codex/commands/sdd-*
241+
rm -rf ~/.codex/prompts/sdd-*
242242

243243
# 專案安裝
244244
rm -rf .claude/commands/sdd-*
245-
rm -rf .codex/commands/sdd-*
245+
rm -rf .codex/prompts/sdd-*
246246
```
247247

248248
## 📖 相關文件

0 commit comments

Comments
 (0)