|
1 | | -# Contributing to SDD Workflow |
| 1 | +# 為 SDD Workflow 做出貢獻 |
2 | 2 |
|
3 | | -Thank you for your interest in contributing to the SDD Workflow project! This document provides guidelines for contributing. |
| 3 | +感謝您有興趣為 SDD Workflow 專案做出貢獻!本文件提供了貢獻指南。 |
4 | 4 |
|
5 | | -## How to Contribute |
| 5 | +## 如何貢獻 |
6 | 6 |
|
7 | | -### Reporting Issues |
| 7 | +### 回報問題 |
8 | 8 |
|
9 | | -If you find a bug or have a suggestion: |
10 | | -1. Check if the issue already exists in the issue tracker |
11 | | -2. Create a new issue with: |
12 | | - - Clear title and description |
13 | | - - Steps to reproduce (for bugs) |
14 | | - - Expected vs actual behavior |
15 | | - - Example Gherkin/code if applicable |
| 9 | +如果您發現 bug 或有建議: |
| 10 | +1. 檢查問題追蹤器中是否已存在該問題 |
| 11 | +2. 建立新問題時請包含: |
| 12 | + - 清晰的標題和描述 |
| 13 | + - 重現步驟(針對 bug) |
| 14 | + - 預期行為與實際行為 |
| 15 | + - 範例 Gherkin/程式碼(如適用) |
16 | 16 |
|
17 | | -### Contributing Code |
| 17 | +### 貢獻程式碼 |
18 | 18 |
|
19 | | -1. Fork the repository |
20 | | -2. Create a feature branch (`git checkout -b feature/amazing-feature`) |
21 | | -3. Make your changes |
22 | | -4. Test your changes thoroughly |
23 | | -5. Commit using descriptive commit messages |
24 | | -6. Push to your fork |
25 | | -7. Create a Pull Request |
| 19 | +1. Fork 此儲存庫 |
| 20 | +2. 建立功能分支(`git checkout -b feature/amazing-feature`) |
| 21 | +3. 進行變更 |
| 22 | +4. 徹底測試您的變更 |
| 23 | +5. 使用描述性的 commit 訊息進行提交 |
| 24 | +6. 推送到您的 fork |
| 25 | +7. 建立 Pull Request |
26 | 26 |
|
27 | | -### Contributing Examples |
| 27 | +### 貢獻範例 |
28 | 28 |
|
29 | | -We love new examples! To add an example: |
| 29 | +我們歡迎新範例!要新增範例: |
30 | 30 |
|
31 | | -1. Create a new directory under `examples/<your-feature>/` |
32 | | -2. Include all 4 phase outputs: |
33 | | - - `spec.feature` - Gherkin specification |
34 | | - - `structure.py` (or `.ts`) - Data models and interfaces |
35 | | - - `implementation.py` (or `.ts`) - Concrete implementation |
36 | | - - `README.md` - Explanation of the example |
37 | | -3. Ensure the example is complete and working |
38 | | -4. Test it with the SDD workflow commands |
| 31 | +1. 在 `examples/<your-feature>/` 下建立新目錄 |
| 32 | +2. 包含所有 4 個階段的輸出: |
| 33 | + - `spec.feature` - Gherkin 規格 |
| 34 | + - `structure.py`(或 `.ts`)- 資料模型和介面 |
| 35 | + - `implementation.py`(或 `.ts`)- 具體實作 |
| 36 | + - `README.md` - 範例說明 |
| 37 | +3. 確保範例完整且可運作 |
| 38 | +4. 使用 SDD 工作流程指令測試它 |
39 | 39 |
|
40 | | -### Improving Documentation |
| 40 | +### 改善文件 |
41 | 41 |
|
42 | | -Documentation improvements are always welcome: |
43 | | -- Fix typos or unclear explanations |
44 | | -- Add more examples or use cases |
45 | | -- Improve prompt templates |
46 | | -- Translate documentation (future) |
| 42 | +歡迎改善文件: |
| 43 | +- 修正錯字或不清楚的說明 |
| 44 | +- 新增更多範例或使用案例 |
| 45 | +- 改善提示範本 |
| 46 | +- 翻譯文件(未來) |
47 | 47 |
|
48 | | -### Improving Slash Commands |
| 48 | +### 改善 Slash 指令 |
49 | 49 |
|
50 | | -If you want to improve the slash commands: |
51 | | -1. Test your changes thoroughly |
52 | | -2. Ensure backward compatibility |
53 | | -3. Update documentation |
54 | | -4. Provide examples of the improved behavior |
| 50 | +如果您想改善 slash 指令: |
| 51 | +1. 徹底測試您的變更 |
| 52 | +2. 確保向後相容性 |
| 53 | +3. 更新文件 |
| 54 | +4. 提供改善後行為的範例 |
55 | 55 |
|
56 | | -## Development Guidelines |
| 56 | +## 開發指南 |
57 | 57 |
|
58 | | -### Prompt Writing |
| 58 | +### 撰寫提示 |
59 | 59 |
|
60 | | -When writing or improving prompts: |
61 | | -- Be clear and specific about constraints |
62 | | -- Use examples to illustrate concepts |
63 | | -- Reference the expected_workflow.md for alignment |
64 | | -- Test prompts with various inputs |
| 60 | +撰寫或改善提示時: |
| 61 | +- 對約束條件要清晰明確 |
| 62 | +- 使用範例來說明概念 |
| 63 | +- 參考 expected_workflow.md 以保持一致 |
| 64 | +- 使用各種輸入測試提示 |
65 | 65 |
|
66 | | -### Code Examples |
| 66 | +### 程式碼範例 |
67 | 67 |
|
68 | | -When adding code examples: |
69 | | -- Use type hints (Python) or strict typing (TypeScript) |
70 | | -- Follow the SDD philosophy: Spec → Structure → Implementation |
71 | | -- Include comments mapping code to Gherkin |
72 | | -- Add verification/tests |
| 68 | +新增程式碼範例時: |
| 69 | +- 使用型別提示(Python)或嚴格型別(TypeScript) |
| 70 | +- 遵循 SDD 理念:規格 → 結構 → 實作 |
| 71 | +- 包含將程式碼對應到 Gherkin 的註解 |
| 72 | +- 新增驗證/測試 |
73 | 73 |
|
74 | | -### Gherkin Specifications |
| 74 | +### Gherkin 規格 |
75 | 75 |
|
76 | | -When writing Gherkin examples: |
77 | | -- Follow Given-When-Then format strictly |
78 | | -- Use concrete values, not variables |
79 | | -- Cover happy path, edge cases, and error cases |
80 | | -- Keep scenarios focused and atomic |
| 76 | +撰寫 Gherkin 範例時: |
| 77 | +- 嚴格遵循 Given-When-Then 格式 |
| 78 | +- 使用具體值,而非變數 |
| 79 | +- 涵蓋正常路徑、邊界案例和錯誤案例 |
| 80 | +- 保持情境聚焦且原子化 |
81 | 81 |
|
82 | | -## Code Style |
| 82 | +## 程式碼風格 |
83 | 83 |
|
84 | 84 | ### Python |
85 | | -- Follow PEP 8 |
86 | | -- Use type hints |
87 | | -- Use Pydantic for data models |
88 | | -- Use ABC for interfaces |
| 85 | +- 遵循 PEP 8 |
| 86 | +- 使用型別提示 |
| 87 | +- 使用 Pydantic 建立資料模型 |
| 88 | +- 使用 ABC 建立介面 |
89 | 89 |
|
90 | 90 | ### TypeScript |
91 | | -- Use strict TypeScript |
92 | | -- Follow standard conventions |
93 | | -- Use interfaces for contracts |
| 91 | +- 使用嚴格的 TypeScript |
| 92 | +- 遵循標準慣例 |
| 93 | +- 使用介面定義契約 |
94 | 94 |
|
95 | 95 | ### Gherkin |
96 | | -- Feature: Sentence case |
97 | | -- Scenario: Sentence case |
98 | | -- Steps: Lowercase except proper nouns |
99 | | -- Indent: 2 spaces |
| 96 | +- Feature:句首大寫 |
| 97 | +- Scenario:句首大寫 |
| 98 | +- Steps:小寫(專有名詞除外) |
| 99 | +- 縮排:2 個空格 |
100 | 100 |
|
101 | | -## Testing |
| 101 | +## 測試 |
102 | 102 |
|
103 | | -Before submitting: |
104 | | -1. Test slash commands work correctly |
105 | | -2. Verify examples run without errors |
106 | | -3. Check that all 4 phases work together |
107 | | -4. Validate Gherkin syntax |
| 103 | +提交前: |
| 104 | +1. 測試 slash 指令是否正常運作 |
| 105 | +2. 驗證範例能無錯誤執行 |
| 106 | +3. 檢查所有 4 個階段能協同運作 |
| 107 | +4. 驗證 Gherkin 語法 |
108 | 108 |
|
109 | | -## Pull Request Process |
| 109 | +## Pull Request 流程 |
110 | 110 |
|
111 | | -1. Update documentation for any changed functionality |
112 | | -2. Add or update examples if applicable |
113 | | -3. Ensure all examples still work |
114 | | -4. Update CHANGELOG.md (if exists) |
115 | | -5. Request review from maintainers |
| 111 | +1. 更新任何變更功能的文件 |
| 112 | +2. 如適用,新增或更新範例 |
| 113 | +3. 確保所有範例仍能運作 |
| 114 | +4. 更新 CHANGELOG.md(如果存在) |
| 115 | +5. 請維護者審查 |
116 | 116 |
|
117 | | -## Code Review |
| 117 | +## 程式碼審查 |
118 | 118 |
|
119 | | -Reviewers will check: |
120 | | -- Alignment with SDD philosophy |
121 | | -- Code quality and clarity |
122 | | -- Documentation completeness |
123 | | -- Example correctness |
124 | | -- Backward compatibility |
| 119 | +審查者會檢查: |
| 120 | +- 與 SDD 理念的一致性 |
| 121 | +- 程式碼品質和清晰度 |
| 122 | +- 文件完整性 |
| 123 | +- 範例正確性 |
| 124 | +- 向後相容性 |
125 | 125 |
|
126 | | -## Community |
| 126 | +## 社群 |
127 | 127 |
|
128 | | -- Be respectful and constructive |
129 | | -- Help others learn the SDD approach |
130 | | -- Share your success stories |
131 | | -- Report what works and what doesn't |
| 128 | +- 保持尊重和建設性 |
| 129 | +- 幫助他人學習 SDD 方法 |
| 130 | +- 分享您的成功故事 |
| 131 | +- 回報什麼有效、什麼無效 |
132 | 132 |
|
133 | | -## Questions? |
| 133 | +## 有問題? |
134 | 134 |
|
135 | | -If you have questions: |
136 | | -- Check the README.md |
137 | | -- Review existing examples |
138 | | -- Look at expected_workflow.md |
139 | | -- Open a discussion issue |
| 135 | +如果您有問題: |
| 136 | +- 查看 README.md |
| 137 | +- 審查現有範例 |
| 138 | +- 查看 expected_workflow.md |
| 139 | +- 開啟討論問題 |
140 | 140 |
|
141 | | -## License |
| 141 | +## 授權 |
142 | 142 |
|
143 | | -By contributing, you agree that your contributions will be licensed under the MIT License. |
| 143 | +透過貢獻,您同意您的貢獻將在 MIT 授權下授權。 |
144 | 144 |
|
145 | 145 | --- |
146 | 146 |
|
147 | | -Thank you for helping make SDD Workflow better! |
| 147 | +感謝您幫助 SDD Workflow 變得更好! |
0 commit comments