From bd81aa81521ae5db588b59951aaf96f29d7c6485 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 13:08:18 +0800 Subject: [PATCH 01/10] =?UTF-8?q?chore(sdlc):=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E7=AF=84=E6=9C=AC=20manifest=20=E8=88=87=E7=A7=BB=E9=99=A4=20h?= =?UTF-8?q?ello=20=E7=AF=84=E4=BE=8B=E7=AC=A6=E5=90=88=20sdlc=20=E9=A0=98?= =?UTF-8?q?=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- .agents/plugins/marketplace.json | 6 ++--- .claude-plugin/marketplace.json | 8 +++---- .claude-plugin/plugin.json | 17 +++++++++----- .codex-plugin/plugin.json | 6 ++--- plugin.json | 8 +++---- skills/hello/SKILL.md | 38 -------------------------------- 6 files changed, 25 insertions(+), 58 deletions(-) delete mode 100644 skills/hello/SKILL.md diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json index 2c2dafc..79a08b0 100644 --- a/.agents/plugins/marketplace.json +++ b/.agents/plugins/marketplace.json @@ -1,11 +1,11 @@ { - "name": "template", + "name": "sdlc", "plugins": [ { - "name": "jsc-template", + "name": "jsc-sdlc", "source": { "source": "url", - "url": "https://gitea.jsc.idv.tw/plugins/template.git" + "url": "https://gitea.jsc.idv.tw/plugins/sdlc.git" } } ] diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index e3d2436..9b581af 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -1,14 +1,14 @@ { - "name": "template", - "description": "JSC 跨 AI 助理共用 skills 的 Claude Code marketplace。", + "name": "sdlc", + "description": "jsc 技能組 sdlc domain 的 marketplace。", "owner": { "name": "JSC" }, "plugins": [ { - "name": "jsc-template", + "name": "jsc-sdlc", "source": "./", - "description": "JSC 共用 skills(跨 AI 助理)" + "description": "開發生命週期:規劃/分析/實作/維護(wiki 追蹤)" } ] } diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index a5c2dd3..d03db13 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,12 +1,17 @@ { - "name": "jsc-template", - "version": "0.0.3", - "description": "JSC 跨 AI 助理共用 plugin 模板(Claude Code / Codex / Antigravity / OpenCode)。所有 skills 以 SKILL.md 為共通標準,於 Claude Code 以 /jsc-template: 前綴呼叫。", + "name": "jsc-sdlc", + "version": "0.2.0", + "description": "開發生命週期:規劃/分析/實作/維護(wiki 追蹤)", "skills": "./skills", "author": { "name": "JSC" }, - "homepage": "https://gitea.jsc.idv.tw/plugins/template", - "repository": "https://gitea.jsc.idv.tw/plugins/template.git", - "keywords": ["template", "skills", "cross-tool", "jsc"] + "homepage": "https://gitea.jsc.idv.tw/plugins/sdlc", + "repository": "https://gitea.jsc.idv.tw/plugins/sdlc.git", + "keywords": [ + "jsc", + "sdlc", + "skills", + "cross-tool" + ] } diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 71a3c32..07ab8bf 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { - "name": "jsc-template", - "version": "0.0.3", - "description": "JSC 跨 AI 助理共用 plugin 模板。所有 skills 以 SKILL.md 為共通標準。", + "name": "jsc-sdlc", + "version": "0.2.0", + "description": "開發生命週期:規劃/分析/實作/維護(wiki 追蹤)", "skills": "./skills" } diff --git a/plugin.json b/plugin.json index 4873395..9e10bd8 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { - "name": "jsc-template", - "version": "0.0.3", - "description": "JSC 跨 AI 助理共用 plugin 模板。所有 skills 以 SKILL.md 為共通標準;於 Antigravity 以 /jsc-template: 前綴呼叫。", + "name": "jsc-sdlc", + "version": "0.2.0", + "description": "開發生命週期:規劃/分析/實作/維護(wiki 追蹤)", "skills": "./skills/" -} \ No newline at end of file +} diff --git a/skills/hello/SKILL.md b/skills/hello/SKILL.md deleted file mode 100644 index c5be22f..0000000 --- a/skills/hello/SKILL.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: hello -description: 範例 skill,用來驗證 jsc plugin 是否安裝成功,也是新增 skill 的範本。當使用者輸入 hello、想測試 plugin、或想看 skill 模板長什麼樣子時觸發;回覆一句問候並簡述此 plugin 的用途。 ---- - -# hello(範例 skill) - -這是 `jsc-template` plugin 的範例 skill。它有兩個用途: - -1. **驗證安裝** — 跨各家 AI 助理確認 skill 已被正確載入。 -2. **作為範本** — 複製這個資料夾即可新增一個新的 skill。 - -## 呼叫方式 - -| 助理 | 呼叫方式 | -| --- | --- | -| Claude Code | `/jsc-template:hello` | -| Antigravity | `/jsc-template:hello`,或描述需求自動觸發 | -| Codex | 在提示詞輸入 `$hello`,或用 `/skills` 選單 | -| OpenCode | 直接描述需求,模型會透過 skill 工具自動呼叫 | -| GitHub Copilot CLI | 直接描述需求,Copilot 會讀取已安裝 plugin 的 skills | - -## 行為 - -當這個 skill 被觸發時: - -1. 回覆「Hello from **jsc** 👋」。 -2. 用一句話說明 `jsc-template` 是一個跨 AI 助理的共用 skill 集合。 -3. 提示使用者可以在 README 的「Skills 目錄」查看所有可用的 skills。 - -## 如何以此為範本新增 skill - -1. 複製 `skills/hello/` 為 `skills//`。 -2. 修改 `SKILL.md` 的 frontmatter: - - `name`:小寫、數字、連字號(`-`),最長 64 字元。**這個名稱會成為 Claude Code / Antigravity 的 `/jsc-template:` 指令**。 - - `description`:第三人稱,寫清楚「什麼時候該用、什麼時候不該用」與觸發關鍵字 — 各家助理靠這段文字決定是否自動載入。 -3. 在內文寫下 skill 的具體步驟。 -4. 手動把新 skill 補進 README 的「Skills 目錄」區塊。 -- 2.53.0 From 167f62a35c3bd7f375b383216bf311d6b6ce85b0 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 13:08:43 +0800 Subject: [PATCH 02/10] =?UTF-8?q?feat(sdlc):=20=E5=8C=AF=E5=85=A5=20jsc-sd?= =?UTF-8?q?lc=20=E6=8A=80=E8=83=BD=E7=B5=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- references/tdd.md | 17 +++++++++++++++++ skills/analyze/SKILL.md | 34 ++++++++++++++++++++++++++++++++++ skills/implement/SKILL.md | 26 ++++++++++++++++++++++++++ skills/maintain/SKILL.md | 26 ++++++++++++++++++++++++++ skills/plan/SKILL.md | 31 +++++++++++++++++++++++++++++++ templates/analyze-contents.md | 5 +++++ templates/analyze-page.md | 33 +++++++++++++++++++++++++++++++++ templates/maintain-contents.md | 7 +++++++ templates/plan-contents.md | 5 +++++ templates/plan-page.md | 31 +++++++++++++++++++++++++++++++ templates/repo-contents.md | 5 +++++ templates/repo-page.md | 11 +++++++++++ 12 files changed, 231 insertions(+) create mode 100644 references/tdd.md create mode 100644 skills/analyze/SKILL.md create mode 100644 skills/implement/SKILL.md create mode 100644 skills/maintain/SKILL.md create mode 100644 skills/plan/SKILL.md create mode 100644 templates/analyze-contents.md create mode 100644 templates/analyze-page.md create mode 100644 templates/maintain-contents.md create mode 100644 templates/plan-contents.md create mode 100644 templates/plan-page.md create mode 100644 templates/repo-contents.md create mode 100644 templates/repo-page.md diff --git a/references/tdd.md b/references/tdd.md new file mode 100644 index 0000000..9a1acc8 --- /dev/null +++ b/references/tdd.md @@ -0,0 +1,17 @@ +# TDD 參考(拆解待辦與逐項實作時引用) + +## 接縫(Seam) + +測試只寫在**接縫**:可觀察行為的公開介面,不綁內部實作。拆解待辦前先列出受測接縫,依 `jsc-ask:ask` 與使用者確認;未確認的接縫不寫測試,測試力道集中在關鍵路徑與複雜邏輯。 + +## 循環規則 + +1. **先紅後綠**:先寫會失敗的測試,再寫剛好通過的實作;不預寫未來的測試、不加投機功能。 +2. **一次一片(vertical slice)**:一個接縫、一個測試、一個最小實作為一個循環;下一片依上一片學到的調整。 +3. **重構不在循環內**:重構屬於審查階段(`jsc-review:code-review`),不混入紅綠循環。 + +## 反模式(發現即重寫該測試) + +- **綁實作**:mock 內部協作者、測私有方法、繞過介面從旁通道驗證。徵兆:重構沒改行為,測試卻壞了。 +- **套套邏輯**:斷言用與實作相同的方式重算期望值,永遠通過。期望值必須來自獨立的真實來源(已知正確的字面值、規格、實算範例)。 +- **水平切片**:先寫完全部測試再寫全部實作。這是在測想像中的形狀;改用垂直切片逐一循環。 diff --git a/skills/analyze/SKILL.md b/skills/analyze/SKILL.md new file mode 100644 index 0000000..be4ab9b --- /dev/null +++ b/skills/analyze/SKILL.md @@ -0,0 +1,34 @@ +--- +name: analyze +description: SDLC analysis stage. Gate on model capability tags, pick a plan from PLAN_CONTENTS, analyze user stories against the current state (working directory plus REPO_{HASH} inventory for reuse). Run WBS to produce numbered work packages, estimate them with CPM, split each into TDD todos, and write wiki page ANALYZE_{yyyyMMdd}_{HHmmss}_{HASH}. Logic only - never write code or modify files. Use after planning and before implementation. +--- + +# analyze — 分析 + +目標:產出或補充 WIKI 分析頁 `ANALYZE_{yyyyMMdd}_{HHmmss}_{HASH}`。 +本技能是**純邏輯**階段:不可以出現任何程式碼,也**禁止修改任何檔案**。 + +`{HASH}` = `{owner}/{repo}` 的 SHA-1 前 8 碼、大寫。 +所有 wiki 讀寫一律經由 `jsc-gitea:wiki`。 + +## 流程 + +1. **模型能力檢查**:依 `jsc-cli:models` 的能力標籤確認目前模型具備「分析」能力。不適合就阻擋流程,並告知使用者建議改用的模型。 +2. 經由 `jsc-gitea:wiki` 讀取 `PLAN_CONTENTS` 的**未分析**計畫(名稱 + HASH),並讀取 `ANALYZE_CONTENTS` 的既有分析。 +3. 依 `jsc-ask:ask` 規則讓使用者選擇:**補充既有分析**或**分析新計畫**。每個選項標明影響範圍。 +4. 搭配**現況**,依 `jsc-ask:ask` 決策樹逐條分析計畫頁的使用者故事,直到補全所有疑慮;只要還沒達成共識就繼續詢問。現況定義: + 1. 工作目錄的所有檔案。 + 2. **盡量複用既有方法或端點**: + - 優先查 `REPO_{HASH}` 盤點頁。若功能與端點不存在,或紀錄的 commit sha 與目前不同,就重新盤點。 + - 重新盤點**必須以 sub agent 執行**:分析該存取庫的功能與端點,加上目前 commit sha,套用 `templates/repo-page.md` 寫回 `REPO_{HASH}`,並依 `templates/repo-contents.md` 更新 `REPO_CONTENTS`。 + - 對候選的複用目標,先確認檔案路徑與方法名稱,再分析其邏輯是否符合需求。 +5. 執行**工作分解結構(WBS)**:把使用者故事拆成工作包,每個工作包給編號(`WP-01`、`WP-02`…)並標明相依關係。 +6. 以**關鍵路徑法(CPM)**估算每個工作包的工時與天數,標出關鍵路徑。 +7. 以**測試驅動開發(TDD)**把每個工作包拆解成多個待辦事項,格式 `[ ]`(未完成)/ `[x]`(完成),每項為一個垂直切片(一個接縫、一個測試、一個最小實作);接縫與反模式見 `references/tdd.md`。 +8. 套用 `templates/analyze-page.md` 產生或更新分析頁,經由 `jsc-gitea:wiki` 寫回。 +9. 若是新的分析頁:依 `templates/analyze-contents.md` 加入 `ANALYZE_CONTENTS`,並把 `PLAN_CONTENTS` 對應計畫的狀態改為「已分析」。 + +## 禁止事項 + +- 不可輸出任何程式碼片段(檔案路徑與方法名稱可以)。 +- 不可修改工作目錄的任何檔案。 diff --git a/skills/implement/SKILL.md b/skills/implement/SKILL.md new file mode 100644 index 0000000..665c313 --- /dev/null +++ b/skills/implement/SKILL.md @@ -0,0 +1,26 @@ +--- +name: implement +description: SDLC implementation stage. Gate on model capability tags, claim a ready work package from ANALYZE_CONTENTS with a work ticket, then complete its TDD todos one by one, updating the wiki after every item. Ends with jsc-review code-review and an optional MAINTAIN_CONTENTS entry. Use when analysis is done and code must be written; not for planning or analysis. +--- + +# implement — 實作 + +目標:逐項完成分析頁的待辦事項;**每完成一項就必須立即更新 WIKI 狀態**。 +所有 wiki 讀寫一律經由 `jsc-gitea:wiki`。 + +## 流程 + +1. **模型能力檢查**:依 `jsc-cli:models` 的能力標籤確認目前模型具備「實作」能力。不適合就阻擋流程,並告知使用者建議改用的模型。 +2. **產生工作證**:格式 `TICKET_{session id 前 8 碼}_{yyyyMMddHHmmss}`,並嘗試將目前 session 重新命名為工作證名稱(CLI 不支援時略過)。 +3. 經由 `jsc-gitea:wiki` 讀取 `ANALYZE_CONTENTS`,列出未完成的:計畫名稱 + HASH + 工作包編號 + 未完成項目數量。可選的工作包必須同時滿足:**未完成、無相依(或相依都已完成)、無工作證**。 +4. 依 `jsc-ask:ask` 規則讓使用者選擇要實作的工作包(選項標明未完成項目數與預估工時)。把工作證寫入分析頁該工作包的「工作證」欄位並寫回 wiki,**成功標上工作證才可以進入下一步**。 +5. 列出該工作包所有未完成項目,**逐項實作**: + - 依 TDD 循環:先紅後綠、一次一片;規則與反模式見 `references/tdd.md`(重構留給審查階段)。 + - 每完成一項,立即把分析頁該項 `[ ]` 改為 `[x]` 並寫回 wiki,才可以進行下一項。 +6. 全部完成後呼叫 `jsc-review:code-review` 等待程式碼審查;審查未過就修正並重新審查。 +7. 依 `jsc-ask:ask` 規則詢問是否將本專案加入維護:套用 `templates/maintain-contents.md` 加入 `MAINTAIN_CONTENTS`。必填:存取庫名稱 `{owner}/{repo}`、維護方式、維護起始日。選填:維護截止日(NULL = 永久維護)、前次維護時間。 + +## 規則 + +- 工作證是互斥鎖:看到已有工作證的工作包一律跳過,不可搶占。 +- 不可一次完成多項才批次更新 wiki;一項一更新。 diff --git a/skills/maintain/SKILL.md b/skills/maintain/SKILL.md new file mode 100644 index 0000000..c78b78c --- /dev/null +++ b/skills/maintain/SKILL.md @@ -0,0 +1,26 @@ +--- +name: maintain +description: SDLC maintenance stage. Gate on model capability tags, read projects still inside their maintenance window from MAINTAIN_CONTENTS, then run one sub agent per project: switch to develop or master, propose at least five maintenance actions, commit to a new branch, push, and PR. Update the last-maintained timestamp afterward. Use for periodic upkeep of delivered projects. +--- + +# maintain — 維護 + +目標:逐項完成維護目錄內專案的例行維護。 +所有 wiki 讀寫一律經由 `jsc-gitea:wiki`。 + +## 流程 + +1. **模型能力檢查**:依 `jsc-cli:models` 的「SDLC 階段需求」表確認目前模型適合維護階段(維護接受任意標籤,但模型必須列於對照表)。不適合就阻擋流程,並告知使用者建議改用的模型。 +2. 經由 `jsc-gitea:wiki` 讀取 `MAINTAIN_CONTENTS`,篩出**仍在維護期間內**的專案:維護起始日 ≤ 今天,且(維護截止日為 NULL 或 ≥ 今天)。 +3. 每一個專案**必須啟動一個 sub agent** 依以下流程執行: + 1. 將專案切換到 `develop` 分支,沒有就切 `master`,並更新到最新。 + 2. 提供**至少五種**建議的維護方法,依專案狀況取捨執行,例如: + - 相依套件更新(複用 `jsc-pkg:pkg-update`) + - 安全性弱點掃描與修補 + - 死碼與過期註解清理 + - 測試覆蓋率補強 + - 文件與 README 同步 + - 建置警告消除 + 3. 依 `jsc-git:commit` 把變更 commit 到新分支,push 後依 `jsc-git:pr` 建立 PR 回 develop 或 master。 + 4. 更新 `MAINTAIN_CONTENTS` 中該專案的「前次維護時間」為今天。 +4. 主 agent 彙整回報:每個專案執行了哪些維護方法、PR 連結、失敗原因。 diff --git a/skills/plan/SKILL.md b/skills/plan/SKILL.md new file mode 100644 index 0000000..af399b8 --- /dev/null +++ b/skills/plan/SKILL.md @@ -0,0 +1,31 @@ +--- +name: plan +description: SDLC planning stage. Gate on model capability tags, pick or create a plan from PLAN_CONTENTS, then run a decision tree until goal, scope, and feasibility reach consensus. Produce user stories into wiki page PLAN_{yyyyMMdd}_{HHmmss}_{HASH}. Logic only - never write code or modify files. Use when the user wants to start or refine a plan; not for analysis or implementation. +--- + +# plan — 規劃 + +目標:產出或補充 WIKI 計畫頁 `PLAN_{yyyyMMdd}_{HHmmss}_{HASH}`。 +本技能是**純邏輯**階段:不可以出現任何程式碼,也**禁止修改任何檔案**。 + +`{HASH}` = `{owner}/{repo}` 的 SHA-1 前 8 碼、大寫。 +所有 wiki 讀寫一律經由 `jsc-gitea:wiki`。 + +## 流程 + +1. **模型能力檢查**:依 `jsc-cli:models` 的能力標籤確認目前模型具備「規劃」能力。不適合就阻擋流程,並告知使用者建議改用的模型。 +2. 經由 `jsc-gitea:wiki` 讀取 `PLAN_CONTENTS`,列出**未分析**的計畫名稱 + HASH。 +3. 依 `jsc-ask:ask` 規則讓使用者選擇:**補充既有計畫**(列出未分析計畫為選項)或**新建計畫**。每個選項標明影響範圍。 +4. 依 `jsc-ask:ask` 決策樹詢問,補全以下三項直到沒有疑慮;只要還沒達成共識就繼續詢問: + - 計畫目標:要解決什麼問題、成功的判斷標準。 + - 計畫範圍:包含什麼、排除什麼、涉及哪些存取庫。 + - 可行性:系統架構與資料來源是否支撐目標。 +5. 由共識產生**使用者故事**(身為…我想要…以便…),逐條列出。 +6. 套用 `templates/plan-page.md` 產生或更新計畫頁,經由 `jsc-gitea:wiki` 寫回。 +7. 若是新的計畫頁,套用 `templates/plan-contents.md` 的條目格式,將其加入 `PLAN_CONTENTS`(狀態=未分析)。 + +## 禁止事項 + +- 不可輸出任何程式碼片段。 +- 不可修改工作目錄的任何檔案。 +- 不可跳過決策樹直接假設需求。 diff --git a/templates/analyze-contents.md b/templates/analyze-contents.md new file mode 100644 index 0000000..4fcecb9 --- /dev/null +++ b/templates/analyze-contents.md @@ -0,0 +1,5 @@ +# 分析目錄 + +| 計畫名稱 | 分析頁 | HASH | 工作包 | 未完成項目 | 狀態 | +| --- | --- | --- | --- | --- | --- | +| {計畫名稱} | [[ANALYZE_{yyyyMMdd}_{HHmmss}_{HASH}]] | {HASH} | WP-01, WP-02 | {n} | 未完成 | diff --git a/templates/analyze-page.md b/templates/analyze-page.md new file mode 100644 index 0000000..42ca3d4 --- /dev/null +++ b/templates/analyze-page.md @@ -0,0 +1,33 @@ +# 分析:{計畫名稱} + +- 頁名:`ANALYZE_{yyyyMMdd}_{HHmmss}_{HASH}` +- 對應計畫:[[PLAN_{yyyyMMdd}_{HHmmss}_{HASH}]] +- 存取庫:`{owner}/{repo}` +- 狀態:未完成 + +## 現況摘要 + +- 工作目錄:{關鍵檔案與結構摘要} +- 複用來源:[[REPO_{HASH}]](commit sha:`{sha}`) +- 複用決策:{複用哪些方法/端點、為什麼;不複用的原因} + +## 工作分解結構(WBS) + +| 編號 | 工作包名稱 | 相依 | 工時(h) | 天數 | 工作證 | 狀態 | +| --- | --- | --- | --- | --- | --- | --- | +| WP-01 | {名稱} | - | {h} | {d} | | 未完成 | +| WP-02 | {名稱} | WP-01 | {h} | {d} | | 未完成 | + +- 關鍵路徑:{WP-01 → WP-02 → …},總天數 {d} + +## 待辦事項(TDD) + +### WP-01 {工作包名稱} + +- [ ] 撰寫 {對象} 的測試:{預期行為} +- [ ] 實作 {對象} 使測試通過 +- [ ] 重構 {對象} 並保持測試綠燈 + +### WP-02 {工作包名稱} + +- [ ] … diff --git a/templates/maintain-contents.md b/templates/maintain-contents.md new file mode 100644 index 0000000..57a1330 --- /dev/null +++ b/templates/maintain-contents.md @@ -0,0 +1,7 @@ +# 維護目錄 + + + +| 存取庫 | 維護方式 | 維護起始日 | 維護截止日 | 前次維護時間 | +| --- | --- | --- | --- | --- | +| {owner}/{repo} | {例:套件更新+安全掃描} | {yyyy-MM-dd} | NULL | {yyyy-MM-dd} | diff --git a/templates/plan-contents.md b/templates/plan-contents.md new file mode 100644 index 0000000..cbbcb5d --- /dev/null +++ b/templates/plan-contents.md @@ -0,0 +1,5 @@ +# 計畫目錄 + +| 計畫名稱 | 計畫頁 | 存取庫 | HASH | 狀態 | 建立時間 | +| --- | --- | --- | --- | --- | --- | +| {計畫名稱} | [[PLAN_{yyyyMMdd}_{HHmmss}_{HASH}]] | {owner}/{repo} | {HASH} | 未分析 | {yyyy-MM-dd} | diff --git a/templates/plan-page.md b/templates/plan-page.md new file mode 100644 index 0000000..3cfb0ab --- /dev/null +++ b/templates/plan-page.md @@ -0,0 +1,31 @@ +# 計畫:{計畫名稱} + +- 頁名:`PLAN_{yyyyMMdd}_{HHmmss}_{HASH}` +- 存取庫:`{owner}/{repo}` +- 狀態:未分析 +- 建立時間:{yyyy-MM-dd HH:mm:ss} + +## 目標 + +{要解決的問題與成功判斷標準} + +## 範圍 + +- 包含:{項目} +- 排除:{項目} +- 涉及存取庫:{owner}/{repo} 清單 + +## 可行性 + +- 系統架構:{現有架構如何支撐目標} +- 資料來源:{資料從哪裡來、是否可取得} +- 風險:{已知風險與對策} + +## 使用者故事 + +1. 身為 {角色},我想要 {功能},以便 {價值}。 +2. … + +## 問詢共識 + +{決策樹問答達成的關鍵共識摘要,逐條列出} diff --git a/templates/repo-contents.md b/templates/repo-contents.md new file mode 100644 index 0000000..711a102 --- /dev/null +++ b/templates/repo-contents.md @@ -0,0 +1,5 @@ +# 盤點目錄 + +| 存取庫 | 盤點頁 | HASH | commit sha | 盤點時間 | +| --- | --- | --- | --- | --- | +| {owner}/{repo} | [[REPO_{HASH}]] | {HASH} | `{sha}` | {yyyy-MM-dd} | diff --git a/templates/repo-page.md b/templates/repo-page.md new file mode 100644 index 0000000..57c8967 --- /dev/null +++ b/templates/repo-page.md @@ -0,0 +1,11 @@ +# 盤點:{owner}/{repo} + +- 頁名:`REPO_{HASH}` +- commit sha:`{sha}` +- 盤點時間:{yyyy-MM-dd HH:mm:ss} + +## 功能與端點 + +| 檔案路徑 | 方法/端點名稱 | 類型 | 邏輯摘要 | +| --- | --- | --- | --- | +| {path} | {method 或 HTTP 動詞 + 路由} | 方法 \| 端點 | {做什麼、輸入輸出概要} | -- 2.53.0 From daf49bdd28f4ebca8d93ba002c8d1b4783fea002 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 13:08:43 +0800 Subject: [PATCH 03/10] =?UTF-8?q?docs(sdlc):=20=E4=BB=A5=E7=B5=B1=E4=B8=80?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E6=94=B9=E5=AF=AB=E7=B9=81=E9=AB=94=E4=B8=AD?= =?UTF-8?q?=E6=96=87=20README=20=E8=88=87=20AGENTS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- AGENTS.md | 20 ++--- README.md | 248 +++++++++--------------------------------------------- 2 files changed, 49 insertions(+), 219 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a86a1f1..fbf6cef 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,15 +1,15 @@ -# jsc-template — 共用 Skills(跨 AI 助理) +# jsc-sdlc — 給 AI 助理的指引 -本 repo 是一組以 **Agent Skills(`SKILL.md`)** 標準撰寫的共用 skills,可同時被 Claude Code、Codex、Antigravity、OpenCode 使用。 +本 repo 是 jsc 技能組的 `sdlc` domain(開發生命週期:規劃/分析/實作/維護(wiki 追蹤)),可同時被 Claude Code / Codex / Copilot / Antigravity / Kiro 使用。 -## 給 AI 助理的指引 +## 規則 -- 所有可用的 skills 位於本 repo 的 `skills//SKILL.md`。 -- 在處理任務前,先比對使用者需求與各 skill `SKILL.md` frontmatter 的 `description`,若相符請載入並依其步驟執行。 -- **呼叫慣例**:在 Claude Code 與 Antigravity 中,這些 skill 以 `/jsc-template:` 呼叫;Codex 以 `$`、OpenCode 由模型依描述自動觸發 — 兩者沒有 `/jsc-template:` 前綴,不需強制加。 -- 完整清單與每個 skill 的用途,請見 `README.md` 的「Skills 目錄」。 +1. 所有交談與輸出內容基於 STE100 使用繁體中文:短句、一句一指令、主動語態、術語一致、UTF-8 無亂碼。 +2. 技能位於 `skills/{name}/SKILL.md`;處理任務前先比對需求與各技能的 `description`,相符就載入並依其步驟執行。 +3. 技能準則的唯一來源:`plugins/meta` 存取庫的 `references/guidelines.md`。 +4. 所有 hook 只放在 `jsc-hooks`;gitea 操作一律經由 `jsc-gitea` 的 `tools/gitea.sh`;問使用者一律依 `jsc-ask:ask` 的決策樹規則。 +5. 主 agent 不需要處理細節的流程,一律建立 sub agent 處理。 -## 慣例 +## 呼叫慣例 -- 新增 skill 一律放在 `skills//`,且 `` 使用小寫與連字號。 -- `description` 要寫清楚觸發條件(何時用、何時不用),這是跨助理自動載入的唯一依據。 +Claude Code / Antigravity:`/jsc-sdlc:{name}`;Codex:`$name`;Copilot / Kiro / OpenCode:描述需求自動觸發。 diff --git a/README.md b/README.md index 6c6669e..bbf6d7c 100644 --- a/README.md +++ b/README.md @@ -1,228 +1,58 @@ -# jsc-template — 跨 AI 助理 Plugin 模板 +# jsc-sdlc — 開發生命週期 -一個可同時被 **Claude Code、Codex、Antigravity、OpenCode、GitHub Copilot** 安裝的 plugin 模板。 -核心是以 [Agent Skills(`SKILL.md`)](https://agentskills.io) 標準撰寫的共用 skills(唯一真實來源放在 `skills/`), -搭配各助理各自的 plugin manifest,讓**同一個 repo** 可用各家**原生 plugin CLI** 安裝。 -在 Claude Code 與 Antigravity 中,skill 以 **`/jsc-template:` 前綴**呼叫(例如 `/jsc-template:hello`)。 +jsc 技能組的 sdlc domain:規劃 → 分析 → 實作 → 維護四個階段,全程以 wiki 頁追蹤(`PLAN_*`、`ANALYZE_*`、`REPO_*`、`MAINTAIN_CONTENTS`)。每階段先做模型能力檢查,不適合就阻擋流程。 ---- - -## 前綴與呼叫方式 - -| 助理 | 安裝方式 | 呼叫 | `/jsc-template:` 前綴 | -| --- | --- | --- | --- | -| Claude Code | `claude plugin`(marketplace) | `/jsc-template:` 或自動觸發 | ✅ | -| Codex | `codex plugin`(marketplace) | `$` 或 `/skills` 選單 | ❌(用 `$name`) | -| Antigravity | `agy plugin install` | `/jsc-template:` 或自動觸發 | ✅ | -| OpenCode | skills 目錄(複製/clone) | 描述需求自動觸發 | ❌(依名稱) | -| GitHub Copilot CLI | `copilot plugin`(marketplace) | 自然語言或 plugin skills | ❌(無 `/jsc-template:` 前綴) | - -> Codex 不支援自訂前綴(skill 以 `$name` 呼叫);OpenCode 由模型依描述自動呼叫;Copilot CLI 透過原生 plugin 安裝後以自然語言或 plugin skills 使用。三者皆**不強制**前綴。 - ---- - -## 目錄結構 - -同一個 repo 同時帶四種 manifest,彼此以路徑隔離、互不干擾;各助理都讀同一份 `skills/`。 - -``` -template/ -├── .claude-plugin/ -│ ├── plugin.json # Claude 外掛定義(name: "jsc-template") -│ └── marketplace.json # Claude marketplace(name: "template",source 指向本 repo) -├── .codex-plugin/ -│ └── plugin.json # Codex 外掛定義(name: "jsc-template",skills: "./skills") -├── .agents/plugins/ -│ └── marketplace.json # Codex marketplace(name: "template",url source 指向本 repo) -├── plugin.json # Antigravity 外掛定義(name: "jsc-template",skills: "./skills/") -├── skills/ # ★ 唯一真實來源:所有 skills -│ └── hello/SKILL.md -├── AGENTS.md # 跨助理共用指引 -└── README.md -``` - ---- - -## 安裝 / 更新 / 移除(各助理) - -> 指令中的 repo 網址換成你的:`https://gitea.jsc.idv.tw/plugins/template.git` -> -> **Claude / Codex 從 git URL 安裝(會 clone 遠端),請先把本 repo `push` 到 gitea。** -> **Antigravity 的 `agy plugin install ` 目前只支援 github.com**;gitea 請改用「clone + 本地路徑」(見 Antigravity 節)。 -> 本機/離線:Claude 可用本地路徑加 marketplace;Antigravity 用本地路徑安裝。 - -> **⚠ 從 0.0.1 升上來的人請先移除再安裝。** 0.0.2 起 marketplace 名由 `jsc-plugins` 改為 `template` -> (舊名與 `jsc-persona` 的 marketplace 撞名)。各助理以 `@` 當安裝識別鍵, -> 改名後是兩筆獨立條目,**不能用 update 遷移**: -> -> ```bash -> claude plugin uninstall jsc-template@jsc-plugins -> claude plugin marketplace remove jsc-plugins # 若你沒有裝 jsc-persona 才移除,它也用這個名字 -> claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/template.git -> claude plugin install jsc-template@template -> ``` -> -> 移除後記得清掉 `~/.claude/settings.json` 裡 `enabledPlugins` 的舊鍵 `jsc-template@jsc-plugins`, -> 並重開工作階段。Codex/Copilot 同理(`remove`/`uninstall` 後重新 `add`+`install`)。 - -### Claude Code +## 安裝 ```bash -# 安裝 -claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/template.git -claude plugin install jsc-template@template - -# 更新 -claude plugin marketplace update template -claude plugin update jsc-template@template - -# 移除 -claude plugin uninstall jsc-template@template -claude plugin marketplace remove template +claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/sdlc.git +claude plugin install jsc-sdlc@sdlc ``` -- 工作階段內 slash 版(等價):把 `claude plugin` 換成 `/plugin`。 -- 本機開發(免 push):`claude plugin marketplace add C:\Users\h3285\source\repos.plugins\template`(本地路徑)後再 install。 -- **呼叫**:`/jsc-template:`(例 `/jsc-template:hello`)。 - -### Codex - -```bash -# 安裝 -codex plugin marketplace add https://gitea.jsc.idv.tw/plugins/template.git -codex plugin add jsc-template@template - -# 更新(重新抓取 marketplace 的 git 快照) -codex plugin marketplace upgrade template - -# 移除 -codex plugin remove jsc-template@template -codex plugin marketplace remove template -``` - -- 安裝 token `jsc-template@template` = plugin 名(`.codex-plugin/plugin.json` 的 `name`)@ marketplace 名(`.agents/plugins/marketplace.json` 的 `name`)。 -- 本 repo 的 Codex marketplace 以 `url` 來源指向自己,故 Codex **一律從 gitea 安裝**(需先 push);安裝後重啟 Codex。 -- **呼叫**:`$`(例 `$hello`),或用 `/skills` 選單。 - -### Antigravity(`agy`) - -> `agy plugin install ` 目前**只支援 github.com**;gitea 等自架 git 不支援 URL 安裝,請先 `git clone` 再用**本地路徑**安裝。 - -```bash -# 安裝:clone 後用本地路徑 -git clone https://gitea.jsc.idv.tw/plugins/template.git ~/plugins/template -agy plugin install ~/plugins/template - -# 更新(agy 無 update 子指令 → git pull 後重裝) -git -C ~/plugins/template pull -agy plugin uninstall jsc-template -agy plugin install ~/plugins/template - -# 移除 -agy plugin uninstall jsc-template -``` - -- 若把 skills 放到 GitHub,則可直接 `agy plugin install https://github.com//`。 -- 其他:`agy plugin list`、`agy plugin enable jsc-template` / `disable jsc-template`、`agy plugin validate `。安裝後重啟工作階段。 -- **呼叫**:`/jsc-template:`(例 `/jsc-template:hello`)或依描述自動觸發。 - -### OpenCode - -OpenCode 的「plugin」是 TypeScript/npm 套件,不適用於 skill 包;skills 改用**目錄安裝**。 -OpenCode 會讀 `~/.config/opencode/skills/`(也會讀 `~/.claude/skills/`、`~/.agents/skills/`)。 - -```bash -# 安裝 -git clone https://gitea.jsc.idv.tw/plugins/template.git ~/plugins/template -mkdir -p ~/.config/opencode/skills -cp -r ~/plugins/template/skills/* ~/.config/opencode/skills/ - -# 更新 -git -C ~/plugins/template pull -cp -r ~/plugins/template/skills/* ~/.config/opencode/skills/ - -# 移除 -rm -rf ~/.config/opencode/skills/hello -``` - -> **Windows PowerShell**:`cp -r A B` → `Copy-Item A B -Recurse -Force`、`rm -rf X` → `Remove-Item X -Recurse -Force`、`~` → `$HOME`。 - -- **呼叫**:直接描述需求,模型會依 skill 描述自動透過 skill 工具呼叫。 - -### GitHub Copilot CLI - -Copilot CLI 支援與 Claude Code 類似的原生 plugin / marketplace 指令,可直接從 marketplace 安裝、更新與移除本 plugin。 - -```bash -# 安裝 -copilot plugin marketplace add https://gitea.jsc.idv.tw/plugins/template.git -copilot plugin install jsc-template@template - -# 更新 -copilot plugin marketplace update template -copilot plugin update jsc-template@template - -# 移除 -copilot plugin uninstall jsc-template@template -copilot plugin marketplace remove template -``` - -- 安裝 token `jsc-template@template` = plugin 名(plugin manifest 的 `name`)@ marketplace 名。 -- `copilot plugin marketplace add` 支援 GitHub `owner/repo`、git URL 與本地路徑;Gitea repo 可用上方 HTTPS URL。 -- **呼叫**:在 Copilot CLI 中用自然語言描述需求,例如 `copilot -i "跑 hello 確認 plugin 裝好了"`。 - ---- - -## 用 CLI 直接執行 skill(headless / 一次性) - -安裝好之後,不必進互動介面,一行指令就能叫某個 skill 跑完並印出結果: - -| 助理 | headless 指令 | 執行 `hello` skill | -| --- | --- | --- | -| Claude Code | `claude -p ""` | `claude -p "/jsc-template:hello"` | -| Codex | `codex exec ""` | `codex exec '$hello'` | -| Antigravity | `agy -p ""` | `agy -p "/jsc-template:hello"` | -| OpenCode | `opencode run ""` | `opencode run "用 hello skill 打個招呼"` | -| GitHub Copilot CLI | `copilot -p ""` | `copilot -p "用 hello skill 打個招呼"` | - -- Claude / Antigravity 支援 `/jsc-template:` 前綴,直接 `-p "/jsc-template:"` 即可。 -- Codex 以 `$` 觸發;在 shell 請用**單引號**避免 `$` 被展開:`codex exec '$hello'`。 -- OpenCode 與 Copilot 沒有前綴,用自然語言描述需求;Copilot CLI 會讀取已安裝 plugin 提供的 skills。 -- 帶引數就接在後面,例如 `claude -p "/jsc-template:hello 參數"`、`codex exec '$hello 參數'`。 - ---- +其他 CLI(codex / copilot / antigravity / kiro)與批次安裝、更新、解除安裝:使用 `/jsc-cli:deploy`。 ## Skills 目錄 -> 此區塊列出本 plugin 內含的所有 skills(名稱/描述/使用方法)。 -> 新增或修改 skill 後,請同步手動更新標記之間的內容。 +呼叫方式:Claude / Antigravity `/jsc-sdlc:{name}`;Codex `${name}`;Copilot / Kiro 描述需求自動觸發。 -### `hello` +### `plan` -範例 skill,用來驗證 jsc plugin 是否安裝成功,也是新增 skill 的範本。當使用者輸入 hello、想測試 plugin、或想看 skill 模板長什麼樣子時觸發;回覆一句問候並簡述此 plugin 的用途。 +規劃:讀計畫目錄 → 補充或新建計畫 → 決策樹補全目標 / 範圍 / 可行性至共識 → 產生使用者故事 → 寫回 `PLAN_{yyyyMMdd}_{HHmmss}_{HASH}`。純邏輯,禁止程式碼與修改檔案。 -- **Claude Code / Antigravity**:`/jsc-template:hello` -- **Codex**:`$hello`,或用 `/skills` 選單 -- **OpenCode / GitHub Copilot CLI**:描述需求自動觸發 +### `analyze` + +分析:搭配現況(工作目錄 + `REPO_{HASH}` 盤點複用)分析使用者故事 → WBS 產生編號工作包 → CPM 估工時與天數 → TDD 拆待辦 → 寫回 `ANALYZE_{yyyyMMdd}_{HHmmss}_{HASH}`。純邏輯,禁止程式碼與修改檔案。 + +### `implement` + +實作:產生工作證鎖定「未完成、無相依、無工作證」的工作包 → 逐項 TDD 實作、每完成一項立即更新 wiki → 程式碼審查 → 詢問是否加入維護目錄。 + +### `maintain` + +維護:讀取維護期內的專案,每個專案一個 sub agent:切 develop/master → 至少五種建議維護方法 → commit / push / PR → 更新前次維護時間。 ---- +## 範本與參考 -## 新增一個 skill +| 檔案 | 用途 | +| --- | --- | +| `templates/plan-page.md`、`templates/plan-contents.md` | 計畫頁與計畫目錄 | +| `templates/analyze-page.md`、`templates/analyze-contents.md` | 分析頁(WBS / CPM / TDD 待辦)與分析目錄 | +| `templates/repo-page.md`、`templates/repo-contents.md` | 存取庫盤點頁(功能與端點 + commit sha)與盤點目錄 | +| `templates/maintain-contents.md` | 維護目錄(截止日 NULL = 永久維護) | +| `references/tdd.md` | 接縫、紅綠循環規則、反模式 | -1. 複製範本:`cp -r skills/hello skills/` -2. 編輯 `skills//SKILL.md` 的 frontmatter: - - `name`:小寫、數字、連字號(`-`),最長 64 字元。**這就是 Claude Code / Antigravity 的 `/jsc-template:`**。 - - `description`:第三人稱,寫清楚「何時用、何時不用」與觸發關鍵字 — 這是各助理自動載入的唯一依據。 -3. 在內文寫下 skill 的具體步驟。 -4. 手動把這個 skill 補進上方「Skills 目錄」區塊。 -5. **bump 版本並 push**:各助理都以 git 內容/版本判斷更新,請把 `.claude-plugin/plugin.json`、`.codex-plugin/plugin.json`、`plugin.json` 三個 manifest 的 `version` 一起 bump,commit 後 push 到 gitea。 -6. 讓各助理更新: - - Claude:`claude plugin update jsc-template@template` - - Codex:`codex plugin marketplace upgrade template` - - Antigravity:`git -C ~/jsc-plugin pull && agy plugin uninstall jsc-template && agy plugin install ~/jsc-plugin` - - OpenCode:`git pull` 後重新複製 `skills/` - - Copilot:`copilot plugin marketplace update template && copilot plugin update jsc-template@template` +## 環境變數 + +Wiki 位置:`JSC_WIKI_REPO_PLAN` / `JSC_WIKI_REPO_ANALYZE` / `JSC_WIKI_REPO_REPO` / `JSC_WIKI_REPO_MAINTAIN`,未設定退回 `JSC_WIKI_REPO`,再未設定就詢問(見 `jsc-gitea`)。 + +## 相關 domain + +- `jsc-cli`:模型能力標籤(`jsc-cli:models`) +- `jsc-gitea`:wiki 讀寫 +- `jsc-review`:實作完成後的程式碼審查 +- `jsc-git` / `jsc-pkg`:維護階段的 commit / PR 與套件更新 +- `jsc-log`:完工後的工作日誌 -- 2.53.0 From 8bc4ab4f83b605259b2ea8fb625caa5a355c718f Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 14:03:40 +0800 Subject: [PATCH 04/10] =?UTF-8?q?chore(sdlc):=20=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E8=99=9F=E6=94=B9=E7=82=BA=200.0.1=20=E4=B8=A6=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E5=80=8B=E5=88=A5=20marketplace=EF=BC=88=E7=B5=B1?= =?UTF-8?q?=E4=B8=80=E7=82=BA=20jsc=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- .agents/plugins/marketplace.json | 12 ------------ .claude-plugin/marketplace.json | 14 -------------- .claude-plugin/plugin.json | 2 +- .codex-plugin/plugin.json | 2 +- plugin.json | 2 +- 5 files changed, 3 insertions(+), 29 deletions(-) delete mode 100644 .agents/plugins/marketplace.json delete mode 100644 .claude-plugin/marketplace.json diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json deleted file mode 100644 index 79a08b0..0000000 --- a/.agents/plugins/marketplace.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "sdlc", - "plugins": [ - { - "name": "jsc-sdlc", - "source": { - "source": "url", - "url": "https://gitea.jsc.idv.tw/plugins/sdlc.git" - } - } - ] -} diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json deleted file mode 100644 index 9b581af..0000000 --- a/.claude-plugin/marketplace.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "sdlc", - "description": "jsc 技能組 sdlc domain 的 marketplace。", - "owner": { - "name": "JSC" - }, - "plugins": [ - { - "name": "jsc-sdlc", - "source": "./", - "description": "開發生命週期:規劃/分析/實作/維護(wiki 追蹤)" - } - ] -} diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index d03db13..9d70ac0 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-sdlc", - "version": "0.2.0", + "version": "0.0.1", "description": "開發生命週期:規劃/分析/實作/維護(wiki 追蹤)", "skills": "./skills", "author": { diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index 07ab8bf..02b5875 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-sdlc", - "version": "0.2.0", + "version": "0.0.1", "description": "開發生命週期:規劃/分析/實作/維護(wiki 追蹤)", "skills": "./skills" } diff --git a/plugin.json b/plugin.json index 9e10bd8..a285c44 100644 --- a/plugin.json +++ b/plugin.json @@ -1,6 +1,6 @@ { "name": "jsc-sdlc", - "version": "0.2.0", + "version": "0.0.1", "description": "開發生命週期:規劃/分析/實作/維護(wiki 追蹤)", "skills": "./skills/" } -- 2.53.0 From bc4aff7bf4dfa2842a701281b122805fab0c7f2c Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 14:03:40 +0800 Subject: [PATCH 05/10] =?UTF-8?q?docs(sdlc):=20README=20=E5=AE=89=E8=A3=9D?= =?UTF-8?q?/=E6=9B=B4=E6=96=B0/=E7=A7=BB=E9=99=A4=E6=94=B9=E7=82=BA?= =?UTF-8?q?=E6=AF=8F=E6=8C=87=E4=BB=A4=E4=B8=80=E8=A1=8C=EF=BC=88=E4=BA=94?= =?UTF-8?q?=E5=80=8B=20CLI=EF=BC=89=E4=B8=A6=E7=82=BA=E7=9B=B8=E9=97=9C=20?= =?UTF-8?q?domain=20=E5=8A=A0=E4=B8=8A=20repo=20=E9=80=A3=E7=B5=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- README.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index bbf6d7c..f0d1878 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,19 @@ jsc 技能組的 sdlc domain:規劃 → 分析 → 實作 → 維護四個階段,全程以 wiki 頁追蹤(`PLAN_*`、`ANALYZE_*`、`REPO_*`、`MAINTAIN_CONTENTS`)。每階段先做模型能力檢查,不適合就阻擋流程。 -## 安裝 +## 安裝 / 更新 / 移除 -```bash -claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/sdlc.git -claude plugin install jsc-sdlc@sdlc -``` +Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安裝 token 為 `jsc-sdlc@jsc`。每個指令一行: -其他 CLI(codex / copilot / antigravity / kiro)與批次安裝、更新、解除安裝:使用 `/jsc-cli:deploy`。 +| CLI | 安裝 | 更新 | 移除 | +| --- | --- | --- | --- | +| claude | `claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/jsc.git && claude plugin install jsc-sdlc@jsc` | `claude plugin marketplace update jsc && claude plugin update jsc-sdlc@jsc` | `claude plugin uninstall jsc-sdlc@jsc` | +| codex | `codex plugin marketplace add https://gitea.jsc.idv.tw/plugins/jsc.git && codex plugin add jsc-sdlc@jsc` | `codex plugin marketplace upgrade jsc` | `codex plugin remove jsc-sdlc@jsc` | +| copilot | `copilot plugin marketplace add https://gitea.jsc.idv.tw/plugins/jsc.git && copilot plugin install jsc-sdlc@jsc` | `copilot plugin marketplace update jsc && copilot plugin update jsc-sdlc@jsc` | `copilot plugin uninstall jsc-sdlc@jsc` | +| antigravity | `git clone https://gitea.jsc.idv.tw/plugins/sdlc.git ~/plugins/sdlc && agy plugin install ~/plugins/sdlc` | `git -C ~/plugins/sdlc pull && agy plugin uninstall jsc-sdlc && agy plugin install ~/plugins/sdlc` | `agy plugin uninstall jsc-sdlc` | +| kiro | `kiro-cli plugin marketplace add https://gitea.jsc.idv.tw/plugins/jsc.git && kiro-cli plugin install jsc-sdlc@jsc` | `kiro-cli plugin marketplace update jsc && kiro-cli plugin update jsc-sdlc@jsc` | `kiro-cli plugin uninstall jsc-sdlc@jsc` | + +> antigravity 不支援 gitea URL 安裝,改用本地 clone 路徑。批次操作五個 CLI:使用 `/jsc-cli:deploy`。 ## Skills 目錄 @@ -51,8 +56,8 @@ Wiki 位置:`JSC_WIKI_REPO_PLAN` / `JSC_WIKI_REPO_ANALYZE` / `JSC_WIKI_REPO_RE ## 相關 domain -- `jsc-cli`:模型能力標籤(`jsc-cli:models`) -- `jsc-gitea`:wiki 讀寫 -- `jsc-review`:實作完成後的程式碼審查 -- `jsc-git` / `jsc-pkg`:維護階段的 commit / PR 與套件更新 -- `jsc-log`:完工後的工作日誌 +- [`jsc-cli`](https://gitea.jsc.idv.tw/plugins/cli):模型能力標籤(`jsc-cli:models`) +- [`jsc-gitea`](https://gitea.jsc.idv.tw/plugins/gitea):wiki 讀寫 +- [`jsc-review`](https://gitea.jsc.idv.tw/plugins/review):實作完成後的程式碼審查 +- [`jsc-git`](https://gitea.jsc.idv.tw/plugins/git) / [`jsc-pkg`](https://gitea.jsc.idv.tw/plugins/pkg):維護階段的 commit / PR 與套件更新 +- [`jsc-log`](https://gitea.jsc.idv.tw/plugins/log):完工後的工作日誌 -- 2.53.0 From ebd1aa9eb9d099cae18b7690f96d07193305ced3 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 14:13:27 +0800 Subject: [PATCH 06/10] =?UTF-8?q?docs(sdlc):=20AGENTS=20=E8=AA=9E=E8=A8=80?= =?UTF-8?q?=E8=A6=8F=E5=89=87=E6=94=B9=E6=8C=87=E5=90=91=20jsc-meta=20?= =?UTF-8?q?=E7=9A=84=20references/ste100.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- AGENTS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index fbf6cef..89b5566 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,7 @@ ## 規則 -1. 所有交談與輸出內容基於 STE100 使用繁體中文:短句、一句一指令、主動語態、術語一致、UTF-8 無亂碼。 +1. 所有交談與輸出內容使用 STE100 繁體中文,帶擬人台灣感:短句、一句一指令、台灣用語、全形標點、去 AI 味、直接講重點。完整規則的唯一來源:`plugins/meta` 的 `references/ste100.md`。 2. 技能位於 `skills/{name}/SKILL.md`;處理任務前先比對需求與各技能的 `description`,相符就載入並依其步驟執行。 3. 技能準則的唯一來源:`plugins/meta` 存取庫的 `references/guidelines.md`。 4. 所有 hook 只放在 `jsc-hooks`;gitea 操作一律經由 `jsc-gitea` 的 `tools/gitea.sh`;問使用者一律依 `jsc-ask:ask` 的決策樹規則。 -- 2.53.0 From 9f606b277b695194a1ef417c4c6a4e2e9303531e Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 14:17:32 +0800 Subject: [PATCH 07/10] =?UTF-8?q?style(sdlc):=20=E4=BE=9D=20STE100=20?= =?UTF-8?q?=E6=93=AC=E4=BA=BA=E5=8F=B0=E7=81=A3=E6=84=9F=E8=A6=8F=E5=89=87?= =?UTF-8?q?=E6=94=B9=E5=AF=AB=E8=AA=9E=E6=84=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- README.md | 4 ++-- skills/analyze/SKILL.md | 6 +++--- skills/implement/SKILL.md | 2 +- skills/plan/SKILL.md | 4 ++-- templates/analyze-contents.md | 2 +- templates/analyze-page.md | 4 ++-- templates/maintain-contents.md | 2 +- templates/plan-page.md | 2 +- templates/repo-page.md | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index f0d1878..70d464a 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安 ### `analyze` -分析:搭配現況(工作目錄 + `REPO_{HASH}` 盤點複用)分析使用者故事 → WBS 產生編號工作包 → CPM 估工時與天數 → TDD 拆待辦 → 寫回 `ANALYZE_{yyyyMMdd}_{HHmmss}_{HASH}`。純邏輯,禁止程式碼與修改檔案。 +分析:搭配現況(工作目錄與 `REPO_{HASH}` 盤點複用)分析使用者故事 → WBS 產生編號工作包 → CPM 估工時與天數 → TDD 拆待辦 → 寫回 `ANALYZE_{yyyyMMdd}_{HHmmss}_{HASH}`。純邏輯,禁止程式碼與修改檔案。 ### `implement` @@ -46,7 +46,7 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安 | --- | --- | | `templates/plan-page.md`、`templates/plan-contents.md` | 計畫頁與計畫目錄 | | `templates/analyze-page.md`、`templates/analyze-contents.md` | 分析頁(WBS / CPM / TDD 待辦)與分析目錄 | -| `templates/repo-page.md`、`templates/repo-contents.md` | 存取庫盤點頁(功能與端點 + commit sha)與盤點目錄 | +| `templates/repo-page.md`、`templates/repo-contents.md` | 存取庫盤點頁(功能與端點,附 commit sha)與盤點目錄 | | `templates/maintain-contents.md` | 維護目錄(截止日 NULL = 永久維護) | | `references/tdd.md` | 接縫、紅綠循環規則、反模式 | diff --git a/skills/analyze/SKILL.md b/skills/analyze/SKILL.md index be4ab9b..04aacdd 100644 --- a/skills/analyze/SKILL.md +++ b/skills/analyze/SKILL.md @@ -14,15 +14,15 @@ description: SDLC analysis stage. Gate on model capability tags, pick a plan fro ## 流程 1. **模型能力檢查**:依 `jsc-cli:models` 的能力標籤確認目前模型具備「分析」能力。不適合就阻擋流程,並告知使用者建議改用的模型。 -2. 經由 `jsc-gitea:wiki` 讀取 `PLAN_CONTENTS` 的**未分析**計畫(名稱 + HASH),並讀取 `ANALYZE_CONTENTS` 的既有分析。 +2. 經由 `jsc-gitea:wiki` 讀取 `PLAN_CONTENTS` 的**未分析**計畫(名稱與 HASH),並讀取 `ANALYZE_CONTENTS` 的既有分析。 3. 依 `jsc-ask:ask` 規則讓使用者選擇:**補充既有分析**或**分析新計畫**。每個選項標明影響範圍。 4. 搭配**現況**,依 `jsc-ask:ask` 決策樹逐條分析計畫頁的使用者故事,直到補全所有疑慮;只要還沒達成共識就繼續詢問。現況定義: 1. 工作目錄的所有檔案。 2. **盡量複用既有方法或端點**: - 優先查 `REPO_{HASH}` 盤點頁。若功能與端點不存在,或紀錄的 commit sha 與目前不同,就重新盤點。 - 重新盤點**必須以 sub agent 執行**:分析該存取庫的功能與端點,加上目前 commit sha,套用 `templates/repo-page.md` 寫回 `REPO_{HASH}`,並依 `templates/repo-contents.md` 更新 `REPO_CONTENTS`。 - - 對候選的複用目標,先確認檔案路徑與方法名稱,再分析其邏輯是否符合需求。 -5. 執行**工作分解結構(WBS)**:把使用者故事拆成工作包,每個工作包給編號(`WP-01`、`WP-02`…)並標明相依關係。 + - 對候選的複用目標,先確認檔案路徑與方法名稱,再分析邏輯是否符合需求。 +5. 執行**工作分解結構(WBS)**:把使用者故事拆成工作包,每個工作包給編號(`WP-01`、`WP-02` 依序遞增)並標明相依關係。 6. 以**關鍵路徑法(CPM)**估算每個工作包的工時與天數,標出關鍵路徑。 7. 以**測試驅動開發(TDD)**把每個工作包拆解成多個待辦事項,格式 `[ ]`(未完成)/ `[x]`(完成),每項為一個垂直切片(一個接縫、一個測試、一個最小實作);接縫與反模式見 `references/tdd.md`。 8. 套用 `templates/analyze-page.md` 產生或更新分析頁,經由 `jsc-gitea:wiki` 寫回。 diff --git a/skills/implement/SKILL.md b/skills/implement/SKILL.md index 665c313..2dfb795 100644 --- a/skills/implement/SKILL.md +++ b/skills/implement/SKILL.md @@ -12,7 +12,7 @@ description: SDLC implementation stage. Gate on model capability tags, claim a r 1. **模型能力檢查**:依 `jsc-cli:models` 的能力標籤確認目前模型具備「實作」能力。不適合就阻擋流程,並告知使用者建議改用的模型。 2. **產生工作證**:格式 `TICKET_{session id 前 8 碼}_{yyyyMMddHHmmss}`,並嘗試將目前 session 重新命名為工作證名稱(CLI 不支援時略過)。 -3. 經由 `jsc-gitea:wiki` 讀取 `ANALYZE_CONTENTS`,列出未完成的:計畫名稱 + HASH + 工作包編號 + 未完成項目數量。可選的工作包必須同時滿足:**未完成、無相依(或相依都已完成)、無工作證**。 +3. 經由 `jsc-gitea:wiki` 讀取 `ANALYZE_CONTENTS`,列出未完成的:計畫名稱、HASH、工作包編號、未完成項目數量。可選的工作包必須同時滿足:**未完成、無相依(或相依都已完成)、無工作證**。 4. 依 `jsc-ask:ask` 規則讓使用者選擇要實作的工作包(選項標明未完成項目數與預估工時)。把工作證寫入分析頁該工作包的「工作證」欄位並寫回 wiki,**成功標上工作證才可以進入下一步**。 5. 列出該工作包所有未完成項目,**逐項實作**: - 依 TDD 循環:先紅後綠、一次一片;規則與反模式見 `references/tdd.md`(重構留給審查階段)。 diff --git a/skills/plan/SKILL.md b/skills/plan/SKILL.md index af399b8..3ae99c9 100644 --- a/skills/plan/SKILL.md +++ b/skills/plan/SKILL.md @@ -14,13 +14,13 @@ description: SDLC planning stage. Gate on model capability tags, pick or create ## 流程 1. **模型能力檢查**:依 `jsc-cli:models` 的能力標籤確認目前模型具備「規劃」能力。不適合就阻擋流程,並告知使用者建議改用的模型。 -2. 經由 `jsc-gitea:wiki` 讀取 `PLAN_CONTENTS`,列出**未分析**的計畫名稱 + HASH。 +2. 經由 `jsc-gitea:wiki` 讀取 `PLAN_CONTENTS`,列出**未分析**的計畫名稱與 HASH。 3. 依 `jsc-ask:ask` 規則讓使用者選擇:**補充既有計畫**(列出未分析計畫為選項)或**新建計畫**。每個選項標明影響範圍。 4. 依 `jsc-ask:ask` 決策樹詢問,補全以下三項直到沒有疑慮;只要還沒達成共識就繼續詢問: - 計畫目標:要解決什麼問題、成功的判斷標準。 - 計畫範圍:包含什麼、排除什麼、涉及哪些存取庫。 - 可行性:系統架構與資料來源是否支撐目標。 -5. 由共識產生**使用者故事**(身為…我想要…以便…),逐條列出。 +5. 由共識產生**使用者故事**(身為⋯⋯我想要⋯⋯以便⋯⋯),逐條列出。 6. 套用 `templates/plan-page.md` 產生或更新計畫頁,經由 `jsc-gitea:wiki` 寫回。 7. 若是新的計畫頁,套用 `templates/plan-contents.md` 的條目格式,將其加入 `PLAN_CONTENTS`(狀態=未分析)。 diff --git a/templates/analyze-contents.md b/templates/analyze-contents.md index 4fcecb9..e6fbf01 100644 --- a/templates/analyze-contents.md +++ b/templates/analyze-contents.md @@ -2,4 +2,4 @@ | 計畫名稱 | 分析頁 | HASH | 工作包 | 未完成項目 | 狀態 | | --- | --- | --- | --- | --- | --- | -| {計畫名稱} | [[ANALYZE_{yyyyMMdd}_{HHmmss}_{HASH}]] | {HASH} | WP-01, WP-02 | {n} | 未完成 | +| {計畫名稱} | [[ANALYZE_{yyyyMMdd}_{HHmmss}_{HASH}]] | {HASH} | WP-01、WP-02 | {n} | 未完成 | diff --git a/templates/analyze-page.md b/templates/analyze-page.md index 42ca3d4..531bcd7 100644 --- a/templates/analyze-page.md +++ b/templates/analyze-page.md @@ -18,7 +18,7 @@ | WP-01 | {名稱} | - | {h} | {d} | | 未完成 | | WP-02 | {名稱} | WP-01 | {h} | {d} | | 未完成 | -- 關鍵路徑:{WP-01 → WP-02 → …},總天數 {d} +- 關鍵路徑:{WP-01 → WP-02 → ⋯⋯},總天數 {d} ## 待辦事項(TDD) @@ -30,4 +30,4 @@ ### WP-02 {工作包名稱} -- [ ] … +- [ ] ⋯⋯ diff --git a/templates/maintain-contents.md b/templates/maintain-contents.md index 57a1330..5c06110 100644 --- a/templates/maintain-contents.md +++ b/templates/maintain-contents.md @@ -4,4 +4,4 @@ | 存取庫 | 維護方式 | 維護起始日 | 維護截止日 | 前次維護時間 | | --- | --- | --- | --- | --- | -| {owner}/{repo} | {例:套件更新+安全掃描} | {yyyy-MM-dd} | NULL | {yyyy-MM-dd} | +| {owner}/{repo} | {例:套件更新與安全掃描} | {yyyy-MM-dd} | NULL | {yyyy-MM-dd} | diff --git a/templates/plan-page.md b/templates/plan-page.md index 3cfb0ab..d8e67f5 100644 --- a/templates/plan-page.md +++ b/templates/plan-page.md @@ -24,7 +24,7 @@ ## 使用者故事 1. 身為 {角色},我想要 {功能},以便 {價值}。 -2. … +2. ⋯⋯ ## 問詢共識 diff --git a/templates/repo-page.md b/templates/repo-page.md index 57c8967..fa49503 100644 --- a/templates/repo-page.md +++ b/templates/repo-page.md @@ -8,4 +8,4 @@ | 檔案路徑 | 方法/端點名稱 | 類型 | 邏輯摘要 | | --- | --- | --- | --- | -| {path} | {method 或 HTTP 動詞 + 路由} | 方法 \| 端點 | {做什麼、輸入輸出概要} | +| {path} | {method 或 HTTP 動詞加路由} | 方法 \| 端點 | {做什麼、輸入輸出概要} | -- 2.53.0 From 71bebc6848e25f400aa5dac7a72f17ecaf309420 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 14:29:47 +0800 Subject: [PATCH 08/10] docs(sdlc): translate SKILL.md into English per guidelines Co-Authored-By: Claude Fable 5 --- skills/analyze/SKILL.md | 46 +++++++++++++++++++-------------------- skills/implement/SKILL.md | 33 ++++++++++++++-------------- skills/maintain/SKILL.md | 36 +++++++++++++++--------------- skills/plan/SKILL.md | 40 +++++++++++++++++----------------- 4 files changed, 78 insertions(+), 77 deletions(-) diff --git a/skills/analyze/SKILL.md b/skills/analyze/SKILL.md index 04aacdd..e823e13 100644 --- a/skills/analyze/SKILL.md +++ b/skills/analyze/SKILL.md @@ -3,32 +3,32 @@ name: analyze description: SDLC analysis stage. Gate on model capability tags, pick a plan from PLAN_CONTENTS, analyze user stories against the current state (working directory plus REPO_{HASH} inventory for reuse). Run WBS to produce numbered work packages, estimate them with CPM, split each into TDD todos, and write wiki page ANALYZE_{yyyyMMdd}_{HHmmss}_{HASH}. Logic only - never write code or modify files. Use after planning and before implementation. --- -# analyze — 分析 +# analyze -目標:產出或補充 WIKI 分析頁 `ANALYZE_{yyyyMMdd}_{HHmmss}_{HASH}`。 -本技能是**純邏輯**階段:不可以出現任何程式碼,也**禁止修改任何檔案**。 +Goal: create or extend the wiki analysis page `ANALYZE_{yyyyMMdd}_{HHmmss}_{HASH}`. +This skill is a **logic-only** stage: never output code, and **never modify any file**. -`{HASH}` = `{owner}/{repo}` 的 SHA-1 前 8 碼、大寫。 -所有 wiki 讀寫一律經由 `jsc-gitea:wiki`。 +`{HASH}` = first 8 chars of the SHA-1 of `{owner}/{repo}`, uppercase. +All wiki reads and writes go through `jsc-gitea:wiki`. -## 流程 +## Steps -1. **模型能力檢查**:依 `jsc-cli:models` 的能力標籤確認目前模型具備「分析」能力。不適合就阻擋流程,並告知使用者建議改用的模型。 -2. 經由 `jsc-gitea:wiki` 讀取 `PLAN_CONTENTS` 的**未分析**計畫(名稱與 HASH),並讀取 `ANALYZE_CONTENTS` 的既有分析。 -3. 依 `jsc-ask:ask` 規則讓使用者選擇:**補充既有分析**或**分析新計畫**。每個選項標明影響範圍。 -4. 搭配**現況**,依 `jsc-ask:ask` 決策樹逐條分析計畫頁的使用者故事,直到補全所有疑慮;只要還沒達成共識就繼續詢問。現況定義: - 1. 工作目錄的所有檔案。 - 2. **盡量複用既有方法或端點**: - - 優先查 `REPO_{HASH}` 盤點頁。若功能與端點不存在,或紀錄的 commit sha 與目前不同,就重新盤點。 - - 重新盤點**必須以 sub agent 執行**:分析該存取庫的功能與端點,加上目前 commit sha,套用 `templates/repo-page.md` 寫回 `REPO_{HASH}`,並依 `templates/repo-contents.md` 更新 `REPO_CONTENTS`。 - - 對候選的複用目標,先確認檔案路徑與方法名稱,再分析邏輯是否符合需求。 -5. 執行**工作分解結構(WBS)**:把使用者故事拆成工作包,每個工作包給編號(`WP-01`、`WP-02` 依序遞增)並標明相依關係。 -6. 以**關鍵路徑法(CPM)**估算每個工作包的工時與天數,標出關鍵路徑。 -7. 以**測試驅動開發(TDD)**把每個工作包拆解成多個待辦事項,格式 `[ ]`(未完成)/ `[x]`(完成),每項為一個垂直切片(一個接縫、一個測試、一個最小實作);接縫與反模式見 `references/tdd.md`。 -8. 套用 `templates/analyze-page.md` 產生或更新分析頁,經由 `jsc-gitea:wiki` 寫回。 -9. 若是新的分析頁:依 `templates/analyze-contents.md` 加入 `ANALYZE_CONTENTS`,並把 `PLAN_CONTENTS` 對應計畫的狀態改為「已分析」。 +1. **Model capability gate**: check the capability tags from `jsc-cli:models` and confirm the current model qualifies for analysis. If not, block the flow and tell the user which model to switch to. +2. Read `PLAN_CONTENTS` via `jsc-gitea:wiki` for plans whose status is the literal 「未分析」 (name and HASH), and read `ANALYZE_CONTENTS` for existing analyses. +3. Let the user choose per `jsc-ask:ask` rules: **extend an existing analysis** or **analyze a new plan**. State the impact scope on every option. +4. Analyze the plan page's user stories one by one against the **current state**, questioning via the `jsc-ask:ask` decision tree until no doubt remains; keep asking while consensus is missing. Current state means: + 1. Every file in the working directory. + 2. **Reuse existing methods and endpoints whenever possible**: + - Check the `REPO_{HASH}` inventory page first. Re-inventory when the feature or endpoint is missing, or when the recorded commit sha differs from the current one. + - Re-inventory **MUST run as a sub agent**: analyze the repository's features and endpoints, attach the current commit sha, write back to `REPO_{HASH}` with `templates/repo-page.md`, and update `REPO_CONTENTS` per `templates/repo-contents.md`. + - For each reuse candidate, confirm the file path and method name first, then analyze whether its logic fits the requirement. +5. Run a **Work Breakdown Structure (WBS)**: split the user stories into work packages, number them sequentially (`WP-01`, `WP-02`, ...) and mark dependencies. +6. Estimate every work package's effort in hours and days with the **Critical Path Method (CPM)**, and mark the critical path. +7. Split every work package into todos with **Test-Driven Development (TDD)**, formatted `[ ]` (open) / `[x]` (done). Each todo is one vertical slice: one seam, one test, one minimal implementation. Seams and anti-patterns: `references/tdd.md`. +8. Apply `templates/analyze-page.md` to create or update the analysis page and write it back via `jsc-gitea:wiki`. The page content is Traditional Chinese, exactly as the template dictates. +9. If the analysis page is new: add it to `ANALYZE_CONTENTS` per `templates/analyze-contents.md`, and flip the plan's status in `PLAN_CONTENTS` to the literal 「已分析」. -## 禁止事項 +## Hard limits -- 不可輸出任何程式碼片段(檔案路徑與方法名稱可以)。 -- 不可修改工作目錄的任何檔案。 +- Never output a code snippet (file paths and method names are allowed). +- Never modify any file in the working directory. diff --git a/skills/implement/SKILL.md b/skills/implement/SKILL.md index 2dfb795..e02dc95 100644 --- a/skills/implement/SKILL.md +++ b/skills/implement/SKILL.md @@ -3,24 +3,25 @@ name: implement description: SDLC implementation stage. Gate on model capability tags, claim a ready work package from ANALYZE_CONTENTS with a work ticket, then complete its TDD todos one by one, updating the wiki after every item. Ends with jsc-review code-review and an optional MAINTAIN_CONTENTS entry. Use when analysis is done and code must be written; not for planning or analysis. --- -# implement — 實作 +# implement -目標:逐項完成分析頁的待辦事項;**每完成一項就必須立即更新 WIKI 狀態**。 -所有 wiki 讀寫一律經由 `jsc-gitea:wiki`。 +Goal: complete the analysis page's todos one by one; **update the wiki status immediately after every completed item**. +All wiki reads and writes go through `jsc-gitea:wiki`. -## 流程 +## Steps -1. **模型能力檢查**:依 `jsc-cli:models` 的能力標籤確認目前模型具備「實作」能力。不適合就阻擋流程,並告知使用者建議改用的模型。 -2. **產生工作證**:格式 `TICKET_{session id 前 8 碼}_{yyyyMMddHHmmss}`,並嘗試將目前 session 重新命名為工作證名稱(CLI 不支援時略過)。 -3. 經由 `jsc-gitea:wiki` 讀取 `ANALYZE_CONTENTS`,列出未完成的:計畫名稱、HASH、工作包編號、未完成項目數量。可選的工作包必須同時滿足:**未完成、無相依(或相依都已完成)、無工作證**。 -4. 依 `jsc-ask:ask` 規則讓使用者選擇要實作的工作包(選項標明未完成項目數與預估工時)。把工作證寫入分析頁該工作包的「工作證」欄位並寫回 wiki,**成功標上工作證才可以進入下一步**。 -5. 列出該工作包所有未完成項目,**逐項實作**: - - 依 TDD 循環:先紅後綠、一次一片;規則與反模式見 `references/tdd.md`(重構留給審查階段)。 - - 每完成一項,立即把分析頁該項 `[ ]` 改為 `[x]` 並寫回 wiki,才可以進行下一項。 -6. 全部完成後呼叫 `jsc-review:code-review` 等待程式碼審查;審查未過就修正並重新審查。 -7. 依 `jsc-ask:ask` 規則詢問是否將本專案加入維護:套用 `templates/maintain-contents.md` 加入 `MAINTAIN_CONTENTS`。必填:存取庫名稱 `{owner}/{repo}`、維護方式、維護起始日。選填:維護截止日(NULL = 永久維護)、前次維護時間。 +1. **Model capability gate**: check the capability tags from `jsc-cli:models` and confirm the current model qualifies for implementation. If not, block the flow and tell the user which model to switch to. +2. **Generate a work ticket**: format `TICKET_{first 8 chars of session id}_{yyyyMMddHHmmss}`. Try to rename the current session to the ticket name (skip when the CLI does not support it). +3. Read `ANALYZE_CONTENTS` via `jsc-gitea:wiki` and list what is unfinished: plan name, HASH, work package number, count of open items. A selectable work package must satisfy all three: **unfinished, dependency-free (or all dependencies done), and not holding a work ticket**. +4. Let the user pick a work package per `jsc-ask:ask` rules (options state open-item count and estimated effort). Write the ticket into that work package's ticket column (the zh-TW field 「工作證」) on the analysis page and save it back to the wiki. **Only after the ticket is saved successfully may you proceed.** +5. List every open item of the work package and implement them **one at a time**: + - Follow the TDD loop: red before green, one slice at a time; rules and anti-patterns in `references/tdd.md` (refactoring belongs to the review stage). + - After each item, flip its `[ ]` to `[x]` on the analysis page and save to the wiki before starting the next item. +6. When all items are done, call `jsc-review:code-review` and wait for the review; on failure, fix and re-review until it passes. +7. Ask per `jsc-ask:ask` rules whether to register this project for maintenance: append to `MAINTAIN_CONTENTS` with `templates/maintain-contents.md`. Required: repository `{owner}/{repo}`, maintenance method, start date. Optional: end date (NULL = maintain forever), last-maintained time. -## 規則 +## Rules -- 工作證是互斥鎖:看到已有工作證的工作包一律跳過,不可搶占。 -- 不可一次完成多項才批次更新 wiki;一項一更新。 +- The work ticket is a mutex: always skip work packages that already hold a ticket; never take one over. +- Never batch wiki updates across items; one item, one update. +- Everything the skill writes out (wiki content, commit messages, PR descriptions) stays Traditional Chinese per the STE100 rule. diff --git a/skills/maintain/SKILL.md b/skills/maintain/SKILL.md index c78b78c..bde4bbd 100644 --- a/skills/maintain/SKILL.md +++ b/skills/maintain/SKILL.md @@ -3,24 +3,24 @@ name: maintain description: SDLC maintenance stage. Gate on model capability tags, read projects still inside their maintenance window from MAINTAIN_CONTENTS, then run one sub agent per project: switch to develop or master, propose at least five maintenance actions, commit to a new branch, push, and PR. Update the last-maintained timestamp afterward. Use for periodic upkeep of delivered projects. --- -# maintain — 維護 +# maintain -目標:逐項完成維護目錄內專案的例行維護。 -所有 wiki 讀寫一律經由 `jsc-gitea:wiki`。 +Goal: run routine maintenance for every project in the maintenance contents page. +All wiki reads and writes go through `jsc-gitea:wiki`. -## 流程 +## Steps -1. **模型能力檢查**:依 `jsc-cli:models` 的「SDLC 階段需求」表確認目前模型適合維護階段(維護接受任意標籤,但模型必須列於對照表)。不適合就阻擋流程,並告知使用者建議改用的模型。 -2. 經由 `jsc-gitea:wiki` 讀取 `MAINTAIN_CONTENTS`,篩出**仍在維護期間內**的專案:維護起始日 ≤ 今天,且(維護截止日為 NULL 或 ≥ 今天)。 -3. 每一個專案**必須啟動一個 sub agent** 依以下流程執行: - 1. 將專案切換到 `develop` 分支,沒有就切 `master`,並更新到最新。 - 2. 提供**至少五種**建議的維護方法,依專案狀況取捨執行,例如: - - 相依套件更新(複用 `jsc-pkg:pkg-update`) - - 安全性弱點掃描與修補 - - 死碼與過期註解清理 - - 測試覆蓋率補強 - - 文件與 README 同步 - - 建置警告消除 - 3. 依 `jsc-git:commit` 把變更 commit 到新分支,push 後依 `jsc-git:pr` 建立 PR 回 develop 或 master。 - 4. 更新 `MAINTAIN_CONTENTS` 中該專案的「前次維護時間」為今天。 -4. 主 agent 彙整回報:每個專案執行了哪些維護方法、PR 連結、失敗原因。 +1. **Model capability gate**: check the 「SDLC 階段需求」 table from `jsc-cli:models` and confirm the current model qualifies for maintenance (any tag qualifies, but the model must be listed in the mapping table). If not, block the flow and tell the user which model to switch to. +2. Read `MAINTAIN_CONTENTS` via `jsc-gitea:wiki` and filter projects **still inside their maintenance window**: start date ≤ today, and (end date is NULL or ≥ today). +3. Every project **MUST run as a sub agent** with this flow: + 1. Switch the project to the `develop` branch, falling back to `master`, and pull to latest. + 2. Propose **at least five** maintenance methods and apply the ones that fit the project, for example: + - dependency updates (reuse `jsc-pkg:pkg-update`) + - security vulnerability scan and patching + - dead code and stale comment cleanup + - test coverage reinforcement + - docs and README synchronization + - build warning elimination + 3. Commit the changes to a new branch per `jsc-git:commit`, push, then open a PR back to develop or master per `jsc-git:pr`. + 4. Update the project's last-maintained field (the zh-TW column 「前次維護時間」) in `MAINTAIN_CONTENTS` to today. +4. The main agent reports the summary: maintenance methods applied per project, PR links, and failure reasons. The report and all generated wiki content, commits, and PR descriptions stay Traditional Chinese per the STE100 rule. diff --git a/skills/plan/SKILL.md b/skills/plan/SKILL.md index 3ae99c9..b972f56 100644 --- a/skills/plan/SKILL.md +++ b/skills/plan/SKILL.md @@ -3,29 +3,29 @@ name: plan description: SDLC planning stage. Gate on model capability tags, pick or create a plan from PLAN_CONTENTS, then run a decision tree until goal, scope, and feasibility reach consensus. Produce user stories into wiki page PLAN_{yyyyMMdd}_{HHmmss}_{HASH}. Logic only - never write code or modify files. Use when the user wants to start or refine a plan; not for analysis or implementation. --- -# plan — 規劃 +# plan -目標:產出或補充 WIKI 計畫頁 `PLAN_{yyyyMMdd}_{HHmmss}_{HASH}`。 -本技能是**純邏輯**階段:不可以出現任何程式碼,也**禁止修改任何檔案**。 +Goal: create or extend the wiki plan page `PLAN_{yyyyMMdd}_{HHmmss}_{HASH}`. +This skill is a **logic-only** stage: never output code, and **never modify any file**. -`{HASH}` = `{owner}/{repo}` 的 SHA-1 前 8 碼、大寫。 -所有 wiki 讀寫一律經由 `jsc-gitea:wiki`。 +`{HASH}` = first 8 chars of the SHA-1 of `{owner}/{repo}`, uppercase. +All wiki reads and writes go through `jsc-gitea:wiki`. -## 流程 +## Steps -1. **模型能力檢查**:依 `jsc-cli:models` 的能力標籤確認目前模型具備「規劃」能力。不適合就阻擋流程,並告知使用者建議改用的模型。 -2. 經由 `jsc-gitea:wiki` 讀取 `PLAN_CONTENTS`,列出**未分析**的計畫名稱與 HASH。 -3. 依 `jsc-ask:ask` 規則讓使用者選擇:**補充既有計畫**(列出未分析計畫為選項)或**新建計畫**。每個選項標明影響範圍。 -4. 依 `jsc-ask:ask` 決策樹詢問,補全以下三項直到沒有疑慮;只要還沒達成共識就繼續詢問: - - 計畫目標:要解決什麼問題、成功的判斷標準。 - - 計畫範圍:包含什麼、排除什麼、涉及哪些存取庫。 - - 可行性:系統架構與資料來源是否支撐目標。 -5. 由共識產生**使用者故事**(身為⋯⋯我想要⋯⋯以便⋯⋯),逐條列出。 -6. 套用 `templates/plan-page.md` 產生或更新計畫頁,經由 `jsc-gitea:wiki` 寫回。 -7. 若是新的計畫頁,套用 `templates/plan-contents.md` 的條目格式,將其加入 `PLAN_CONTENTS`(狀態=未分析)。 +1. **Model capability gate**: check the capability tags from `jsc-cli:models` and confirm the current model qualifies for planning. If not, block the flow and tell the user which model to switch to. +2. Read `PLAN_CONTENTS` via `jsc-gitea:wiki` and list the plans whose status is the literal 「未分析」 (not analyzed), with names and HASH. +3. Let the user choose per `jsc-ask:ask` rules: **extend an existing plan** (list the not-analyzed plans as options) or **create a new plan**. State the impact scope on every option. +4. Question via the `jsc-ask:ask` decision tree until no doubt remains on all three items; keep asking while consensus is missing: + - Goal: the problem to solve and the criteria for success. + - Scope: what is included, what is excluded, which repositories are involved. + - Feasibility: whether the system architecture and data sources support the goal. +5. Turn the consensus into **user stories** (the zh-TW pattern 「身為⋯⋯我想要⋯⋯以便⋯⋯」), one per line. +6. Apply `templates/plan-page.md` to create or update the plan page, and write it back via `jsc-gitea:wiki`. The page content is Traditional Chinese, exactly as the template dictates. +7. If the plan page is new, add it to `PLAN_CONTENTS` using the entry format of `templates/plan-contents.md`, with status set to the literal 「未分析」. -## 禁止事項 +## Hard limits -- 不可輸出任何程式碼片段。 -- 不可修改工作目錄的任何檔案。 -- 不可跳過決策樹直接假設需求。 +- Never output a code snippet. +- Never modify any file in the working directory. +- Never skip the decision tree and assume requirements. -- 2.53.0 From 87557df5397a25eb953ae5ec37ee50eaa8280ea7 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 14:29:47 +0800 Subject: [PATCH 09/10] =?UTF-8?q?style(sdlc):=20=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E4=B8=A6=E5=88=97=E6=94=B9=E9=A0=93=E8=99=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- AGENTS.md | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 89b5566..b7e0a85 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # jsc-sdlc — 給 AI 助理的指引 -本 repo 是 jsc 技能組的 `sdlc` domain(開發生命週期:規劃/分析/實作/維護(wiki 追蹤)),可同時被 Claude Code / Codex / Copilot / Antigravity / Kiro 使用。 +本 repo 是 jsc 技能組的 `sdlc` domain(開發生命週期:規劃、分析、實作、維護,wiki 追蹤),可同時被 Claude Code / Codex / Copilot / Antigravity / Kiro 使用。 ## 規則 diff --git a/README.md b/README.md index 70d464a..9e13126 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ jsc 技能組的 sdlc domain:規劃 → 分析 → 實作 → 維護四個階段,全程以 wiki 頁追蹤(`PLAN_*`、`ANALYZE_*`、`REPO_*`、`MAINTAIN_CONTENTS`)。每階段先做模型能力檢查,不適合就阻擋流程。 -## 安裝 / 更新 / 移除 +## 安裝、更新、移除 Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安裝 token 為 `jsc-sdlc@jsc`。每個指令一行: @@ -24,7 +24,7 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安 ### `plan` -規劃:讀計畫目錄 → 補充或新建計畫 → 決策樹補全目標 / 範圍 / 可行性至共識 → 產生使用者故事 → 寫回 `PLAN_{yyyyMMdd}_{HHmmss}_{HASH}`。純邏輯,禁止程式碼與修改檔案。 +規劃:讀計畫目錄 → 補充或新建計畫 → 決策樹補全目標、範圍、可行性至共識 → 產生使用者故事 → 寫回 `PLAN_{yyyyMMdd}_{HHmmss}_{HASH}`。純邏輯,禁止程式碼與修改檔案。 ### `analyze` @@ -45,7 +45,7 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安 | 檔案 | 用途 | | --- | --- | | `templates/plan-page.md`、`templates/plan-contents.md` | 計畫頁與計畫目錄 | -| `templates/analyze-page.md`、`templates/analyze-contents.md` | 分析頁(WBS / CPM / TDD 待辦)與分析目錄 | +| `templates/analyze-page.md`、`templates/analyze-contents.md` | 分析頁(WBS、CPM、TDD 待辦)與分析目錄 | | `templates/repo-page.md`、`templates/repo-contents.md` | 存取庫盤點頁(功能與端點,附 commit sha)與盤點目錄 | | `templates/maintain-contents.md` | 維護目錄(截止日 NULL = 永久維護) | | `references/tdd.md` | 接縫、紅綠循環規則、反模式 | -- 2.53.0 From a245ae8eea75be831a69f36ec0c3f1f53514c3be Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 14:37:51 +0800 Subject: [PATCH 10/10] =?UTF-8?q?chore(sdlc):=20=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E7=B5=B1=E4=B8=80=20jsc=20marketplace=20=E5=89=AF=E6=9C=AC?= =?UTF-8?q?=EF=BC=88=E8=88=87=E6=AD=A3=E6=9C=AC=E4=B8=80=E8=87=B4=EF=BC=8C?= =?UTF-8?q?=E4=BB=BB=E4=B8=80=20repo=20=E5=8F=AF=E4=BD=9C=E8=A8=BB?= =?UTF-8?q?=E5=86=8A=E5=85=A5=E5=8F=A3=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- .agents/plugins/marketplace.json | 75 +++++++++++++++++++++++++++ .claude-plugin/marketplace.json | 89 ++++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+) create mode 100644 .agents/plugins/marketplace.json create mode 100644 .claude-plugin/marketplace.json diff --git a/.agents/plugins/marketplace.json b/.agents/plugins/marketplace.json new file mode 100644 index 0000000..12df680 --- /dev/null +++ b/.agents/plugins/marketplace.json @@ -0,0 +1,75 @@ +{ + "name": "jsc", + "plugins": [ + { + "name": "jsc-ask", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/ask.git" + } + }, + { + "name": "jsc-cli", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/cli.git" + } + }, + { + "name": "jsc-git", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/git.git" + } + }, + { + "name": "jsc-gitea", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/gitea.git" + } + }, + { + "name": "jsc-hooks", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/hooks.git" + } + }, + { + "name": "jsc-log", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/log.git" + } + }, + { + "name": "jsc-meta", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/meta.git" + } + }, + { + "name": "jsc-pkg", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/pkg.git" + } + }, + { + "name": "jsc-review", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/review.git" + } + }, + { + "name": "jsc-sdlc", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/sdlc.git" + } + } + ] +} diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..28bb223 --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,89 @@ +{ + "name": "jsc", + "description": "jsc 跨 AI 助理技能組的統一 marketplace(claude / codex / copilot / antigravity / kiro)。", + "owner": { + "name": "JSC" + }, + "plugins": [ + { + "name": "jsc-ask", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/ask.git" + }, + "description": "決策樹問詢與問詢紀錄(QUESTION_* wiki 頁)" + }, + { + "name": "jsc-cli", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/cli.git" + }, + "description": "CLI 偵測、模型能力標籤與技能庫批次部署" + }, + { + "name": "jsc-git", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/git.git" + }, + "description": "Commit 分組認可與 Push Request 建立" + }, + { + "name": "jsc-gitea", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/gitea.git" + }, + "description": "Gitea API 工具、Wiki 讀寫與存取庫批次同步" + }, + { + "name": "jsc-hooks", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/hooks.git" + }, + "description": "跨 CLI hooks:STE100 語言強制、工時計時、技能用量記錄" + }, + { + "name": "jsc-log", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/log.git" + }, + "description": "工作日誌(LOG_* wiki 頁)與技能使用統計" + }, + { + "name": "jsc-meta", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/meta.git" + }, + "description": "技能組自我管理:新建/更新/刪除技能與技能準則" + }, + { + "name": "jsc-pkg", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/pkg.git" + }, + "description": "套件批次更新(nodejs/python/dotnet),失敗還原" + }, + { + "name": "jsc-review", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/review.git" + }, + "description": "程式碼審查:Refactoring 壞味道六組 + 註解規範 + 淺模組" + }, + { + "name": "jsc-sdlc", + "source": { + "source": "url", + "url": "https://gitea.jsc.idv.tw/plugins/sdlc.git" + }, + "description": "開發生命週期:規劃/分析/實作/維護(wiki 追蹤)" + } + ] +} -- 2.53.0