# tea-sdlc 以 [tea](https://gitea.com/gitea/tea) 與 Gitea REST API 驅動 **SDLC 全流程**的跨平台指令組。 把規劃、分析、實作、修正、整併、工時回報六個階段,固定成可重複、可被任何 coding agent 執行的流程。 - **流程正本只有一份**:平台中立 markdown 放在 `prompts/`,改規則不會出現各平台版本分歧。 - **副作用集中**:所有對 Gitea 與 git 的呼叫下沉到 `scripts/` 的零相依 Node 腳本,統一 JSON 輸入輸出。 - **產出有固定形狀**:議題、PR、報表一律套 `templates/` 的模板。 > **目前處於骨架階段。** 目錄與 manifest 已就位,六個指令與腳本尚未實作。 > 完整需求見[議題 #1](https://gitea.jsc.idv.tw/plugins/tea-sdlc/issues/1),實作進度見其底下的工作包。 --- ## 六個指令 | 指令 | 做什麼 | | --- | --- | | `/sdlc-plan` | 把一段口語需求變成結構化的需求議題 | | `/sdlc-analyze` | 逐題把可行性疑點問到共識,據以產出工作包 | | `/sdlc-feat` | 領取工作包、開分支、逐項實作並開 PR | | `/sdlc-fix` | 處理 PR 上的留言 | | `/sdlc-sync` | 把散落在留言裡的決策整併回議題描述 | | `/sdlc-report` | 產出週/月/年工時報表 | --- ## 目錄結構 ``` tea-sdlc/ ├── prompts/ # ★ 流程正本:六個指令的平台中立 markdown ├── scripts/ # 所有 Gitea / git 副作用的唯一出口(Node,零相依) ├── templates/ # 議題、PR、報表、總覽網頁的輸出模板 ├── references/ # 規則正本:實作規範、註解格式、可行性檢查清單 ├── skills/ # 各助理原生 plugin 機制讀取的 skills(目前為空) ├── .claude-plugin/ # Claude Code 的 plugin / marketplace manifest ├── .codex-plugin/ # Codex 的 plugin manifest ├── .agents/plugins/ # Codex 的 marketplace manifest ├── plugin.json # Antigravity 的 plugin manifest ├── package.json # 僅用於測試入口,無任何相依套件 ├── AGENTS.md # 給 AI 助理的模組邊界與慣例 └── README.md ``` --- ## 前置需求 | 需求 | 用途 | 備註 | | --- | --- | --- | | Node.js ≥ 20 | 執行 `scripts/` 與測試 | 不自動安裝,缺少時腳本印出指引並中止 | | git | 分支與 commit 操作 | 同上 | | [`tea`](https://gitea.com/gitea/tea) 並已登入 | Gitea 議題、標籤、Milestone、留言、工時 | `tea login add` | | 目標 repo 已開啟時間追蹤 | 工時碼錶 | Settings → Advanced Settings → Enable Time Tracker | | 帳號對目標 repo 的 issues unit 有寫入權 | 建立與更新議題 | Gitea 的 unit 權限獨立於 push 權限 | --- ## 安裝 / 更新 / 移除(各助理) > 以下為 plugin 機制的安裝方式。指令本身之後會改由 `install.js` 產生各平台轉接檔佈署, > 屆時本節會一併更新。 ### Claude Code ```bash claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/tea-sdlc.git claude plugin install tea-sdlc@tea-sdlc # 更新 claude plugin marketplace update tea-sdlc claude plugin update tea-sdlc@tea-sdlc # 移除 claude plugin uninstall tea-sdlc@tea-sdlc claude plugin marketplace remove tea-sdlc ``` 工作階段內 slash 版(等價):把 `claude plugin` 換成 `/plugin`。 本機開發(免 push):`claude plugin marketplace add /root/plugins/tea-sdlc`(本地路徑)後再 install。 ### Codex ```bash codex plugin marketplace add https://gitea.jsc.idv.tw/plugins/tea-sdlc.git codex plugin add tea-sdlc@tea-sdlc # 更新(重新抓取 marketplace 的 git 快照) codex plugin marketplace upgrade tea-sdlc # 移除 codex plugin remove tea-sdlc@tea-sdlc codex plugin marketplace remove tea-sdlc ``` 安裝 token `tea-sdlc@tea-sdlc` = plugin 名(`.codex-plugin/plugin.json` 的 `name`)@ marketplace 名(`.agents/plugins/marketplace.json` 的 `name`)。安裝後重啟 Codex。 ### Antigravity(`agy`) > `agy plugin install ` 目前只支援 github.com;Gitea 等自架 git 請先 clone 再用本地路徑安裝。 ```bash git clone https://gitea.jsc.idv.tw/plugins/tea-sdlc.git ~/plugins/tea-sdlc agy plugin install ~/plugins/tea-sdlc # 更新(agy 無 update 子指令 → git pull 後重裝) git -C ~/plugins/tea-sdlc pull agy plugin uninstall tea-sdlc agy plugin install ~/plugins/tea-sdlc ``` ### GitHub Copilot CLI ```bash copilot plugin marketplace add https://gitea.jsc.idv.tw/plugins/tea-sdlc.git copilot plugin install tea-sdlc@tea-sdlc # 更新 copilot plugin marketplace update tea-sdlc copilot plugin update tea-sdlc@tea-sdlc # 移除 copilot plugin uninstall tea-sdlc@tea-sdlc copilot plugin marketplace remove tea-sdlc ``` ### OpenCode OpenCode 的「plugin」是 TypeScript/npm 套件,不適用於本 repo;改用目錄安裝。 OpenCode 會讀 `~/.config/opencode/skills/`(也會讀 `~/.claude/skills/`、`~/.agents/skills/`)。 ```bash git clone https://gitea.jsc.idv.tw/plugins/tea-sdlc.git ~/plugins/tea-sdlc mkdir -p ~/.config/opencode/skills cp -r ~/plugins/tea-sdlc/skills/* ~/.config/opencode/skills/ ``` > **Windows PowerShell**:`cp -r A B` → `Copy-Item A B -Recurse -Force`、`rm -rf X` → `Remove-Item X -Recurse -Force`、`~` → `$HOME`。 --- ## 開發 ```bash npm test # 等同 node --test,使用 Node 內建測試執行器,無任何外部套件 ``` 測試產生的暫存一律寫到 `.tmp/`(已被 git 忽略,也不會被測試探索掃到)。 模組邊界與其餘慣例見 [`AGENTS.md`](./AGENTS.md)。