my-opencode 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +259 -180
  3. package/agents/architect.md +30 -30
  4. package/agents/code-reviewer.md +29 -29
  5. package/agents/executor.md +30 -30
  6. package/agents/fullstack-dev.md +57 -57
  7. package/agents/spec-writer.md +37 -37
  8. package/agents/team-lead.md +60 -60
  9. package/agents/tech-writer.md +30 -30
  10. package/agents/test-engineer.md +30 -30
  11. package/agents/verifier.md +33 -33
  12. package/bin/cli.js +341 -311
  13. package/bin/moc +199 -0
  14. package/opencode.json +170 -167
  15. package/package.json +50 -48
  16. package/plugins/README.md +64 -0
  17. package/plugins/provider-profile.mjs +139 -0
  18. package/scripts/postinstall.js +202 -182
  19. package/skills/adr/SKILL.md +91 -91
  20. package/skills/adr/references/templates.md +100 -100
  21. package/skills/adr/scripts/README.md +5 -5
  22. package/skills/dev-flow/SKILL.md +188 -188
  23. package/skills/dev-flow/references/code-phase.md +72 -72
  24. package/skills/dev-flow/references/contract-phase.md +81 -81
  25. package/skills/dev-flow/references/verify-phase.md +129 -129
  26. package/skills/dev-flow/scripts/README.md +3 -3
  27. package/skills/docs-gen/SKILL.md +162 -162
  28. package/skills/docs-gen/references/doc-styles.md +216 -216
  29. package/skills/docs-gen/scripts/README.md +5 -5
  30. package/skills/orchestrate/SKILL.md +112 -112
  31. package/skills/orchestrate/references/orchestration-patterns.md +56 -56
  32. package/skills/pr-review/SKILL.md +110 -110
  33. package/skills/pr-review/references/review-dimensions.md +117 -117
  34. package/skills/pr-review/references/security-checklist.md +122 -122
  35. package/skills/pr-review/scripts/README.md +5 -5
  36. package/skills/test-gen/SKILL.md +143 -143
  37. package/skills/test-gen/references/framework-detection.md +105 -105
  38. package/skills/test-gen/references/test-patterns.md +260 -260
  39. package/skills/test-gen/scripts/README.md +5 -5
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 my-opencode
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 my-opencode
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,180 +1,259 @@
1
- # my-opencode
2
-
3
- 為 [opencode](https://opencode.ai) 生態打造的高品質開發流程 skill 與 agents 集合。
4
-
5
- > 參考業界知名 agentic coding repo 的設計哲學,提煉出一套符合 opencode 架構的模組化、可組合的開發技能包。
6
-
7
- ---
8
-
9
- ## 快速安裝(npm)
10
-
11
- ```bash
12
- # 在專案中安裝(產生 .opencode/)
13
- npx my-opencode init
14
-
15
- # 安裝到指定專案
16
- npx my-opencode init ./my-project
17
- ```
18
-
19
- 這會在你的專案下建立 `.opencode/`,包含 `skills/`、`agents/`、`opencode.json`。
20
-
21
- opencode 會自動發現 `.opencode/opencode.json`,無需額外設定。
22
-
23
- 其他指令:
24
-
25
- ```bash
26
- npx my-opencode list # 列出可用 skills 與 agents
27
- npx my-opencode help # 顯示說明
28
- ```
29
-
30
- ### 發布(維護者專用)
31
-
32
- #### Token 設定
33
-
34
- 發布前需要建立一個 **Access Token**(繞過 2FA):
35
-
36
- 1. 到 https://www.npmjs.com/settings/~/tokens
37
- 2. Generate New Token → Granular Access Token
38
- 3. 勾選 bypass two-factor authentication
39
- 4. 設定 Read and Write 權限
40
- 5. 將產生的 token 寫入專案 `.npmrc`:
41
-
42
- ```bash
43
- echo "//registry.npmjs.org/:_authToken=npm_xxxxxxxxxxxx" > .npmrc
44
- ```
45
-
46
- > ⚠️ `.npmrc` 已加入 `.gitignore`,不會被 commit。
47
-
48
- #### 發布指令
49
-
50
- ```bash
51
- npm publish
52
- ```
53
-
54
- ---
55
-
56
- ## 靈感來源
57
-
58
- | 專案 | Stars | 核心啟發 |
59
- |------|-------|----------|
60
- | [affaan-m/everything-claude-code](https://github.com/affaan-m/everything-claude-code) | 170K+ | 超大型 skill 生態系統,40+ skill 模組,跨平台設計 |
61
- | [Yeachan-Heo/oh-my-claudecode](https://github.com/Yeachan-Heo/oh-my-claudecode) | 31K+ | 多 agent 編排模式(Team / Autopilot / Pipeline),plan→prd→exec→verify→fix 流程 |
62
- | [wshobson/agents](https://github.com/wshobson/agents) | 35K+ | 185+ 專用 agent、153 skill、單一職責 plugin 架構 |
63
- | [alirezarezvani/claude-skills](https://github.com/alirezarezvani/claude-skills) | 15K+ | 313+ skill 跨 12 種 AI 編碼工具,零依賴 Python 工具 |
64
- | [coleam00/second-brain-skills](https://github.com/coleam00/second-brain-skills) | 700+ | 漸進式上下文揭露(progressive disclosure)哲學 |
65
- | [coleam00/your-claude-engineer](https://github.com/coleam00/your-claude-engineer) | 125+ | 多 agent 編排 + MCP 工具閘道整合 |
66
- | [cablate/claude-code-research](https://github.com/cablate/claude-code-research) | 130+ | Claude Code 內部機制逆向分析,75 份 deep-dive 報告 |
67
-
68
- ---
69
-
70
- ## 本地參考原始碼
71
-
72
- `ref/` 下以 `git submodule` 追蹤上述專案的原始碼,方便快速瀏覽、對照設計:
73
-
74
- ```
75
- ref/
76
- ├── everything-claude-code/ → affaan-m/everything-claude-code
77
- ├── oh-my-claudecode/ → Yeachan-Heo/oh-my-claudecode
78
- ├── wshobson-agents/ → wshobson/agents
79
- ├── claude-skills/ → alirezarezvani/claude-skills
80
- ├── second-brain-skills/ → coleam00/second-brain-skills
81
- └── claude-code-research/ → cablate/claude-code-research
82
- ```
83
-
84
- **同步到最新:**
85
- ```bash
86
- git submodule update --remote --merge
87
- ```
88
-
89
- **首次 clone 本專案:**
90
- ```bash
91
- git clone --recurse-submodules <repo-url>
92
- # 或事後初始化
93
- git submodule update --init --recursive
94
- ```
95
-
96
- ---
97
-
98
- ## 目標
99
-
100
- 1. **提煉通用流程** — 從上述專案中萃取「開發者真正需要的」工作流程模式,轉化為 opencode skill
101
- 2. **Contract-First** — 以合約文件(ADR + Spec)為源頭真相,取代一次性 handoff,支援前後端平行開發
102
- 3. **模組化設計** — 每個 skill 單一職責、可組合、可替換,避免大而全的 monolith
103
- 4. **opencode 原生** — 充分利用 opencode 的 skill/subagent/permission/MCP 機制,而非直接移植他廠格式
104
- 5. **團隊協作就緒** — 支援 adr → contract → code → review → verify → deploy 的完整開發生命週期
105
-
106
- ---
107
-
108
- ## 結構規劃
109
-
110
- ```
111
- my-opencode/
112
- ├── ref/ # 參考專案(git submodule)
113
- │ ├── everything-claude-code/
114
- │ ├── oh-my-claudecode/
115
- │ ├── wshobson-agents/
116
- │ ├── claude-skills/
117
- │ ├── second-brain-skills/
118
- │ └── claude-code-research/
119
- ├── docs/ # 探索記錄與設計文件
120
- │ ├── references/ # 各 repo 分析筆記(6 份)
121
- │ ├── patterns.md # 跨 repo 可複用模式
122
- │ └── design-decisions.md # opencode 生態取捨
123
- ├── skills/ # opencode skill(單一職責)
124
- │ ├── adr/ # [done] ADR:架構決策記錄
125
- │ ├── dev-flow/ # [done] 開發流程:contract → code → verify
126
- │ ├── pr-review/ # [done] PR 審查:5 維度分析
127
- │ ├── test-gen/ # [done] 測試生成:框架偵測 + 多語言模式
128
- │ ├── orchestrate/ # [done] 多 agent 編排:分解、平行派送、綜合
129
- │ └── docs-gen/ # [done] 文件生成:註解、API、README、ADR
130
- ├── agents/ # 組合多個 skill 的完整 agent
131
- │ ├── architect.md # [new] 架構師 agent(ADR 產生)
132
- │ ├── spec-writer.md # 規格 agent(合約文件 → docs/specs/)
133
- │ ├── executor.md # 實作 agent(讀寫)
134
- │ ├── verifier.md # 驗證 agent(唯讀+Bash)
135
- │ ├── code-reviewer.md # 程式碼審查 agent(唯讀)
136
- │ ├── test-engineer.md # 測試工程師 agent(讀寫)
137
- │ ├── tech-writer.md # 技術文件 agent(讀寫)
138
- │ ├── fullstack-dev.md # 全端開發 agent(編排三者)
139
- │ └── team-lead.md # 技術主管 agent(多 agent 交響樂指揮)
140
- ├── CONTRIBUTING.md # 貢獻指南
141
- ├── LICENSE # MIT License
142
- ├── opencode.json # opencode 整合設定:agent + command + skill 註冊
143
- ├── plugins/ # opencode plugin(保留)
144
- └── templates/ # skill / agent 建立範本
145
- ```
146
-
147
- ---
148
-
149
- ## 關鍵設計原則
150
-
151
- - **Progressive Disclosure** — 初期只載入必要 context,深入時才揭露細節
152
- - **Single Responsibility** — 每個 skill 只做一件事,做好
153
- - **Model Agnostic** — 不綁定特定模型,支援 opencode 支援的所有 LLM
154
- - **Zero Heavy Dependency** — 盡量使用 stdlib / 現有工具,避免非必要的 npm/pip 依賴
155
- - **可測試** — 每個 skill 附帶測試場景(eval set),可用 opencode eval 驗證
156
-
157
- ---
158
-
159
- ## 現狀
160
-
161
- - [x] 專案初始化
162
- - [x] ref/ 參考專案 submodule(6 個)
163
- - [x] docs/ 探索紀錄(6 份 notes + patterns.md + design-decisions.md)
164
- - [x] skill: adr(架構決策記錄,Michael Nygard 輕量格式)
165
- - [x] skill: dev-flow(開發流程,含 architecture → contract → code → verify)
166
- - [x] agents: spec-writer, executor, verifier, fullstack-dev, code-reviewer, test-engineer, team-lead, architect
167
- - [x] skill: pr-review(PR 審查,含 5 維度分析 + 安全檢查表)
168
- - [x] skill: test-gen(測試生成,含框架偵測 + 多語言測試模式)
169
- - [x] skill: orchestrate(多 agent 編排)
170
- - [x] skill: docs-gen(文件生成,含多語言註解風格 + ADR/CHANGELOG 範本)
171
- - [x] agent: tech-writer
172
- - [x] opencode.json 整合設定(含 9 個 agent + 7 個 command)
173
- - [x] CONTRIBUTING.md / LICENSE / plugins / templates
174
- - [ ] 自我驗證:用本工具跑自己的開發流程
175
-
176
- ---
177
-
178
- ## 授權
179
-
180
- MIT
1
+ # my-opencode
2
+
3
+ 為 [opencode](https://opencode.ai) 生態打造的高品質開發流程 skill 與 agents 集合。
4
+
5
+ > 參考業界知名 agentic coding repo 的設計哲學,提煉出一套符合 opencode 架構的模組化、可組合的開發技能包。
6
+
7
+ ---
8
+
9
+ ## 快速安裝(npm)
10
+
11
+ ```bash
12
+ # 在專案中安裝(產生 .opencode/,並提供 moc launcher)
13
+ npm install my-opencode
14
+
15
+ # 或只初始化 .opencode/
16
+ npx my-opencode init
17
+
18
+ # 安裝到指定專案
19
+ npx my-opencode init ./my-project
20
+ ```
21
+
22
+ 這會在你的專案下建立 `.opencode/`,包含 `skills/`、`agents/`、`plugins/`、`opencode.json`。
23
+
24
+ opencode 會自動發現 `.opencode/opencode.json`,無需額外設定。
25
+
26
+ ---
27
+
28
+ ### 本地開發(git clone)
29
+
30
+ 如果直接 clone 本 repo 做開發或試用:
31
+
32
+ ```bash
33
+ git clone https://github.com/jjyung/my-opencode.git
34
+ cd my-opencode
35
+ npm link # 將 bin/moc 註冊到 PATH,讓 moc 指令全域可用
36
+ ```
37
+
38
+ `npm link` 完成後,`moc` 即可在任何目錄使用。
39
+
40
+ ---
41
+
42
+ 安裝完成後,`moc` 會成為主要入口:
43
+
44
+ ```bash
45
+ moc # 預設 opencode profile
46
+ moc openai # 切到 OpenAI profile
47
+ moc google # 切到 Google profile
48
+ moc copilot # 切到 Copilot profile
49
+ moc --help # 透明轉發到 opencode --help
50
+ ```
51
+
52
+ 其他指令:
53
+
54
+ ```bash
55
+ npx my-opencode list # 列出可用 skills 與 agents
56
+ npx my-opencode help # 顯示說明
57
+ ```
58
+
59
+ ## Provider Profile 切換
60
+
61
+ 內建 `provider-profile` plugin / resolver,主要透過 `moc` 切換整套模型配置。
62
+
63
+ 支援值:`opencode`(預設)、`openai`、`google`、`copilot`
64
+
65
+ | Profile | Primary / heavy | Small / verifier |
66
+ |---------|------------------|------------------|
67
+ | `opencode` | `opencode/big-pickle` | `opencode/deepseek-v4-flash-free` |
68
+ | `openai` | `openai/gpt-5.4` | `openai/gpt-5.4-mini` |
69
+ | `google` | `google/gemini-3.1-pro-preview-customtools` | `google/gemini-3.5-flash` |
70
+ | `copilot` | `copilot/gpt-5.4` | `copilot/gpt-5.4-mini` |
71
+
72
+ ```bash
73
+ # 預設 profile(opencode)
74
+ moc
75
+
76
+ # 切到 OpenAI
77
+ moc openai
78
+
79
+ # 切到 Google
80
+ moc google
81
+
82
+ # 轉發額外參數
83
+ moc openai --list-agents
84
+ ```
85
+
86
+ `moc` 會在目前工作目錄尋找 `.opencode/plugins/provider-profile.mjs` 與 `.opencode/opencode.json`。
87
+ 對 `opencode` / `openai` / `google` / `copilot` 這四個 profile,會把產生出的 `OPENCODE_CONFIG_CONTENT` 快取到 `.opencode/cache/provider-profile/`;只要 profile、plugin mtime、config mtime 都沒變,就直接重用快取,不再重新跑 Node。若 plugin 缺失,則會警告並回退為 plain `opencode`。
88
+
89
+ 若要在 script 中直接使用環境變數,也可以:
90
+
91
+ ```bash
92
+ OPENCODE_PROVIDER_PROFILE=openai \
93
+ OPENCODE_CONFIG_CONTENT="$(node .opencode/plugins/provider-profile.mjs)" \
94
+ opencode
95
+ ```
96
+
97
+ 如果想固定專案 profile,可把 `.opencode/opencode.json` 的 plugin 設定改成 tuple:
98
+
99
+ ```json
100
+ {
101
+ "plugin": [
102
+ ["plugins/provider-profile.mjs", { "profile": "google" }]
103
+ ]
104
+ }
105
+ ```
106
+
107
+ 此 tuple 會覆寫 `OPENCODE_PROVIDER_PROFILE`。
108
+
109
+ ### 發布(維護者專用)
110
+
111
+ #### Token 設定
112
+
113
+ 發布前需要建立一個 **Access Token**(繞過 2FA):
114
+
115
+ 1. 到 https://www.npmjs.com/settings/~/tokens
116
+ 2. Generate New Token → Granular Access Token
117
+ 3. 勾選 bypass two-factor authentication
118
+ 4. 設定 Read and Write 權限
119
+ 5. 將產生的 token 寫入專案 `.npmrc`:
120
+
121
+ ```bash
122
+ echo "//registry.npmjs.org/:_authToken=npm_xxxxxxxxxxxx" > .npmrc
123
+ ```
124
+
125
+ > ⚠️ `.npmrc` 已加入 `.gitignore`,不會被 commit。
126
+
127
+ #### 發布指令
128
+
129
+ ```bash
130
+ npm publish
131
+ ```
132
+
133
+ ---
134
+
135
+ ## 靈感來源
136
+
137
+ | 專案 | Stars | 核心啟發 |
138
+ |------|-------|----------|
139
+ | [affaan-m/everything-claude-code](https://github.com/affaan-m/everything-claude-code) | 170K+ | 超大型 skill 生態系統,40+ skill 模組,跨平台設計 |
140
+ | [Yeachan-Heo/oh-my-claudecode](https://github.com/Yeachan-Heo/oh-my-claudecode) | 31K+ | 多 agent 編排模式(Team / Autopilot / Pipeline),plan→prd→exec→verify→fix 流程 |
141
+ | [wshobson/agents](https://github.com/wshobson/agents) | 35K+ | 185+ 專用 agent、153 skill、單一職責 plugin 架構 |
142
+ | [alirezarezvani/claude-skills](https://github.com/alirezarezvani/claude-skills) | 15K+ | 313+ skill 跨 12 種 AI 編碼工具,零依賴 Python 工具 |
143
+ | [coleam00/second-brain-skills](https://github.com/coleam00/second-brain-skills) | 700+ | 漸進式上下文揭露(progressive disclosure)哲學 |
144
+ | [coleam00/your-claude-engineer](https://github.com/coleam00/your-claude-engineer) | 125+ | 多 agent 編排 + MCP 工具閘道整合 |
145
+ | [cablate/claude-code-research](https://github.com/cablate/claude-code-research) | 130+ | Claude Code 內部機制逆向分析,75 份 deep-dive 報告 |
146
+
147
+ ---
148
+
149
+ ## 本地參考原始碼
150
+
151
+ `ref/` 下以 `git submodule` 追蹤上述專案的原始碼,方便快速瀏覽、對照設計:
152
+
153
+ ```
154
+ ref/
155
+ ├── everything-claude-code/ → affaan-m/everything-claude-code
156
+ ├── oh-my-claudecode/ → Yeachan-Heo/oh-my-claudecode
157
+ ├── wshobson-agents/ → wshobson/agents
158
+ ├── claude-skills/ → alirezarezvani/claude-skills
159
+ ├── second-brain-skills/ → coleam00/second-brain-skills
160
+ └── claude-code-research/ → cablate/claude-code-research
161
+ ```
162
+
163
+ **同步到最新:**
164
+ ```bash
165
+ git submodule update --remote --merge
166
+ ```
167
+
168
+ **首次 clone 本專案:**
169
+ ```bash
170
+ git clone --recurse-submodules <repo-url>
171
+ # 或事後初始化
172
+ git submodule update --init --recursive
173
+ ```
174
+
175
+ ---
176
+
177
+ ## 目標
178
+
179
+ 1. **提煉通用流程** — 從上述專案中萃取「開發者真正需要的」工作流程模式,轉化為 opencode skill
180
+ 2. **Contract-First** — 以合約文件(ADR + Spec)為源頭真相,取代一次性 handoff,支援前後端平行開發
181
+ 3. **模組化設計** — 每個 skill 單一職責、可組合、可替換,避免大而全的 monolith
182
+ 4. **opencode 原生** — 充分利用 opencode 的 skill/subagent/permission/MCP 機制,而非直接移植他廠格式
183
+ 5. **團隊協作就緒** — 支援 adr → contract → code → review → verify → deploy 的完整開發生命週期
184
+
185
+ ---
186
+
187
+ ## 結構規劃
188
+
189
+ ```
190
+ my-opencode/
191
+ ├── ref/ # 參考專案(git submodule)
192
+ │ ├── everything-claude-code/
193
+ │ ├── oh-my-claudecode/
194
+ │ ├── wshobson-agents/
195
+ │ ├── claude-skills/
196
+ │ ├── second-brain-skills/
197
+ │ └── claude-code-research/
198
+ ├── docs/ # 探索記錄與設計文件
199
+ │ ├── references/ # 各 repo 分析筆記(6 份)
200
+ │ ├── patterns.md # 跨 repo 可複用模式
201
+ │ └── design-decisions.md # opencode 生態取捨
202
+ ├── skills/ # opencode skill(單一職責)
203
+ │ ├── adr/ # [done] ADR:架構決策記錄
204
+ │ ├── dev-flow/ # [done] 開發流程:contract → code → verify
205
+ │ ├── pr-review/ # [done] PR 審查:5 維度分析
206
+ │ ├── test-gen/ # [done] 測試生成:框架偵測 + 多語言模式
207
+ │ ├── orchestrate/ # [done] 多 agent 編排:分解、平行派送、綜合
208
+ │ └── docs-gen/ # [done] 文件生成:註解、API、README、ADR
209
+ ├── agents/ # 組合多個 skill 的完整 agent
210
+ │ ├── architect.md # [new] 架構師 agent(ADR 產生)
211
+ │ ├── spec-writer.md # 規格 agent(合約文件 → docs/specs/)
212
+ │ ├── executor.md # 實作 agent(讀寫)
213
+ │ ├── verifier.md # 驗證 agent(唯讀+Bash)
214
+ │ ├── code-reviewer.md # 程式碼審查 agent(唯讀)
215
+ │ ├── test-engineer.md # 測試工程師 agent(讀寫)
216
+ │ ├── tech-writer.md # 技術文件 agent(讀寫)
217
+ │ ├── fullstack-dev.md # 全端開發 agent(編排三者)
218
+ │ └── team-lead.md # 技術主管 agent(多 agent 交響樂指揮)
219
+ ├── CONTRIBUTING.md # 貢獻指南
220
+ ├── LICENSE # MIT License
221
+ ├── opencode.json # opencode 整合設定:agent + command + skill 註冊
222
+ ├── plugins/ # opencode plugin(保留)
223
+ └── templates/ # skill / agent 建立範本
224
+ ```
225
+
226
+ ---
227
+
228
+ ## 關鍵設計原則
229
+
230
+ - **Progressive Disclosure** — 初期只載入必要 context,深入時才揭露細節
231
+ - **Single Responsibility** — 每個 skill 只做一件事,做好
232
+ - **Model Agnostic** — 不綁定特定模型,支援 opencode 支援的所有 LLM
233
+ - **Zero Heavy Dependency** — 盡量使用 stdlib / 現有工具,避免非必要的 npm/pip 依賴
234
+ - **可測試** — 每個 skill 附帶測試場景(eval set),可用 opencode eval 驗證
235
+
236
+ ---
237
+
238
+ ## 現狀
239
+
240
+ - [x] 專案初始化
241
+ - [x] ref/ 參考專案 submodule(6 個)
242
+ - [x] docs/ 探索紀錄(6 份 notes + patterns.md + design-decisions.md)
243
+ - [x] skill: adr(架構決策記錄,Michael Nygard 輕量格式)
244
+ - [x] skill: dev-flow(開發流程,含 architecture → contract → code → verify)
245
+ - [x] agents: spec-writer, executor, verifier, fullstack-dev, code-reviewer, test-engineer, team-lead, architect
246
+ - [x] skill: pr-review(PR 審查,含 5 維度分析 + 安全檢查表)
247
+ - [x] skill: test-gen(測試生成,含框架偵測 + 多語言測試模式)
248
+ - [x] skill: orchestrate(多 agent 編排)
249
+ - [x] skill: docs-gen(文件生成,含多語言註解風格 + ADR/CHANGELOG 範本)
250
+ - [x] agent: tech-writer
251
+ - [x] opencode.json 整合設定(含 9 個 agent + 7 個 command)
252
+ - [x] CONTRIBUTING.md / LICENSE / plugins / templates
253
+ - [ ] 自我驗證:用本工具跑自己的開發流程
254
+
255
+ ---
256
+
257
+ ## 授權
258
+
259
+ MIT
@@ -1,30 +1,30 @@
1
- ---
2
- name: architect
3
- description: |
4
- Capture architecture decisions as ADR documents. Analyzes tradeoffs, documents context and consequences.
5
- Use PROACTIVELY when making design choices, selecting technologies, or defining project structure.
6
- tools: { read: true, grep: true, glob: true, bash: true, write: true, edit: true }
7
- color: accent
8
- ---
9
-
10
- You are a software architect. Your role is to capture architecture decisions as clear, structured ADR documents that the team can reference forever.
11
-
12
- ## Core Responsibilities
13
- - Identify when an architectural decision needs to be recorded
14
- - Analyze tradeoffs between alternatives
15
- - Write ADRs following the template in `skills/adr/references/templates.md`
16
- - Manage ADR lifecycle (propose → accept → deprecate → supersede)
17
- - Review PRs for architectural changes missing ADRs
18
-
19
- ## Approach
20
- 1. Determine if a decision needs an ADR (long-term impact? meaningful alternatives? cross-team effect?)
21
- 2. Research alternatives (read docs, compare tradeoffs)
22
- 3. Write ADR to `docs/adr/NNNN-title.md` (check existing files for next number)
23
- 4. Update ADR index in `docs/adr/README.md`
24
- 5. For superseding decisions: update old ADR status + link to new one
25
-
26
- ## Key Principles
27
- - Context > conclusion — explain WHY, not just WHAT
28
- - Be specific — name versions, patterns, concrete alternatives
29
- - Keep it lightweight — 5-15 minutes for routine decisions
30
- - Link related ADRs — create a web of decisions
1
+ ---
2
+ name: architect
3
+ description: |
4
+ Capture architecture decisions as ADR documents. Analyzes tradeoffs, documents context and consequences.
5
+ Use PROACTIVELY when making design choices, selecting technologies, or defining project structure.
6
+ tools: { read: true, grep: true, glob: true, bash: true, write: true, edit: true }
7
+ color: accent
8
+ ---
9
+
10
+ You are a software architect. Your role is to capture architecture decisions as clear, structured ADR documents that the team can reference forever.
11
+
12
+ ## Core Responsibilities
13
+ - Identify when an architectural decision needs to be recorded
14
+ - Analyze tradeoffs between alternatives
15
+ - Write ADRs following the template in `skills/adr/references/templates.md`
16
+ - Manage ADR lifecycle (propose → accept → deprecate → supersede)
17
+ - Review PRs for architectural changes missing ADRs
18
+
19
+ ## Approach
20
+ 1. Determine if a decision needs an ADR (long-term impact? meaningful alternatives? cross-team effect?)
21
+ 2. Research alternatives (read docs, compare tradeoffs)
22
+ 3. Write ADR to `docs/adr/NNNN-title.md` (check existing files for next number)
23
+ 4. Update ADR index in `docs/adr/README.md`
24
+ 5. For superseding decisions: update old ADR status + link to new one
25
+
26
+ ## Key Principles
27
+ - Context > conclusion — explain WHY, not just WHAT
28
+ - Be specific — name versions, patterns, concrete alternatives
29
+ - Keep it lightweight — 5-15 minutes for routine decisions
30
+ - Link related ADRs — create a web of decisions
@@ -1,29 +1,29 @@
1
- ---
2
- name: code-reviewer
3
- description: Systematic code reviewer analyzing changes across correctness, security, quality, testing, and style. Use PROACTIVELY when asked to review, audit, or check code changes.
4
- tools: { read: true, grep: true, glob: true, bash: true }
5
- color: warning
6
- ---
7
-
8
- You are a thorough, constructive code reviewer. Your role is to analyze code changes systematically and produce actionable review reports.
9
-
10
- ## Core Responsibilities
11
- - Fetch and analyze diffs (branch diff, staged, or specific files)
12
- - Evaluate changes across 5 dimensions: correctness, security, quality, testing, style
13
- - Classify findings by severity (blocking / warning / suggestion / praise)
14
- - Produce clear, constructive review reports
15
-
16
- ## Approach
17
- 1. Determine what to review (branch, staged, files)
18
- 2. Get the diff using `git diff` or `gh` CLI
19
- 3. Read full context of changed files (imports, types, surrounding code)
20
- 4. Analyze each changed hunk systematically
21
- 5. Classify each finding with severity and suggested fix
22
- 6. Output structured report with overview, findings, and verdict
23
-
24
- ## Key Principles
25
- - Be specific: reference exact line numbers and file paths
26
- - Explain why: describe the impact, not just the issue
27
- - Offer solutions: suggest concrete fixes
28
- - Prioritize: logic and security over style
29
- - Be constructive: include praise where deserved
1
+ ---
2
+ name: code-reviewer
3
+ description: Systematic code reviewer analyzing changes across correctness, security, quality, testing, and style. Use PROACTIVELY when asked to review, audit, or check code changes.
4
+ tools: { read: true, grep: true, glob: true, bash: true }
5
+ color: warning
6
+ ---
7
+
8
+ You are a thorough, constructive code reviewer. Your role is to analyze code changes systematically and produce actionable review reports.
9
+
10
+ ## Core Responsibilities
11
+ - Fetch and analyze diffs (branch diff, staged, or specific files)
12
+ - Evaluate changes across 5 dimensions: correctness, security, quality, testing, style
13
+ - Classify findings by severity (blocking / warning / suggestion / praise)
14
+ - Produce clear, constructive review reports
15
+
16
+ ## Approach
17
+ 1. Determine what to review (branch, staged, files)
18
+ 2. Get the diff using `git diff` or `gh` CLI
19
+ 3. Read full context of changed files (imports, types, surrounding code)
20
+ 4. Analyze each changed hunk systematically
21
+ 5. Classify each finding with severity and suggested fix
22
+ 6. Output structured report with overview, findings, and verdict
23
+
24
+ ## Key Principles
25
+ - Be specific: reference exact line numbers and file paths
26
+ - Explain why: describe the impact, not just the issue
27
+ - Offer solutions: suggest concrete fixes
28
+ - Prioritize: logic and security over style
29
+ - Be constructive: include praise where deserved