What(做了什麼):
1. 移除 plan、analyze、implement 三個 skill 及 README.md 中各自重述的 wiki hash 演算法說明(原本各處都各自寫一遍「取 SHA-1 前 8 碼大寫十六進位,開頭若為數字或 A/B/C 則替換為 H 加後 7 碼」),改為統一指向唯一權威工具 jsc-gitea/tools/hash-id(透過 jsc-gitea:wiki 使用)。
2. 移除 plan、analyze、implement、maintain 四個 skill 中重複的 model chain fallback 選擇邏輯說明(原本各自描述「執行 jsc-cli/tools/model-config.sh get {stage},若印出 chain 則取目前 CLI 可用的第一個,fallback 依 chain 順序套用」),改為統一呼叫新的共用子指令 jsc-cli/tools/model-config.sh resolve {stage},由該子指令自行封裝解析邏輯(此 resolve 子指令由另一位 agent 同時在 sibling repo jsc-cli 開的配套 PR 新增,本 PR 依賴該 PR)。
3. implement/SKILL.md 移除自身多餘的「先解析環境變數」步驟(原第 2 步,手動檢查 JSC_WIKI_REPO_ANALYZE、JSC_WIKI_REPO、JSC_WIKI_REPO_QUESTION、GITEA_HOST、GITEA_TOKEN 後才詢問使用者),因為此解析已由 implement 其他步驟委派的 jsc-gitea:wiki 正確處理,屬於死重複邏輯;後續步驟由 2-8 重新編號為 2-7。
4. maintain/SKILL.md 在 frontmatter description 欄位加入明確的負向觸發說明,釐清此 skill 僅用於已交付、仍在維護窗口內的專案,「不適用於仍在實作中或尚未登錄於 MAINTAIN_CONTENTS 的專案」。
5. plugin.json、.claude-plugin/plugin.json、.codex-plugin/plugin.json 三份版本號檔案,由 0.0.3 升版至 0.0.4。
Why(為什麼改):
四個 SDLC skill 各自重述相同的 hash 演算法與 model chain fallback 邏輯,違反 jsc-meta:skill-check 稽核準則中「單一權威來源」的要求,日後維護容易改一處漏一處;implement 的環境變數解析步驟與其他步驟委派的 jsc-gitea:wiki 功能重疊,屬死碼;maintain 的觸發時機描述不夠明確,容易被誤用在尚未進入維護窗口的專案上。
How(怎麼改的):
將重複邏輯抽離,改為指向或呼叫唯一權威工具/skill(jsc-gitea/tools/hash-id、jsc-cli/tools/model-config.sh resolve、jsc-gitea:wiki),移除 implement 中的死步驟並重新編號,於 maintain frontmatter 補上負向觸發描述,並同步升版三份 plugin.json。全程不改變任何對外行為,純屬重構。
Who(誰/哪個需求):
jsc-meta:skill-check 對 plan、analyze、implement、maintain 四個 SDLC skill 的例行合規稽核修正。
35 lines
2.8 KiB
Markdown
35 lines
2.8 KiB
Markdown
---
|
|
name: plan
|
|
description: SDLC planning stage. Gate on the designated model (model-config) or capability tags, lock the model for the stage via sdlc-gate, 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_{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
|
|
|
|
Goal: create or extend the wiki plan page `PLAN_{HASH}`.
|
|
This skill is a **logic-only** stage: never output code, and **never modify any file**.
|
|
|
|
`{HASH}` = the shared wiki hash for `{owner}/{repo}` used to build the `PLAN_{HASH}` page name, computed by `jsc-gitea/tools/hash-id` (see `jsc-gitea:wiki`).
|
|
All wiki reads and writes go through `jsc-gitea:wiki`.
|
|
|
|
## Steps
|
|
|
|
1. **Model gate and stage lock**:
|
|
1. Run `jsc-cli/tools/model-config.sh resolve plan` to get the required model; if it prints nothing, fall back to the capability-tag check via `jsc-cli:models` (planning requires the reasoning-high tag).
|
|
2. If the current model is not the required model, or fails the tag check, block the flow and tell the user which model to switch to. Completion condition: the current model satisfies the gate.
|
|
3. Lock the stage: run `jsc-hooks/hooks/sdlc-gate.sh lock plan {current-model}`. From now until the next SDLC stage's gate runs, the sdlc-gate hook enforces this model on every prompt; switching models mid-stage gets blocked. Completion condition: the lock file is written, verified with `sdlc-gate.sh report`.
|
|
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.
|