What: 新增 tools/slugify.sh 腳本,將分支類型與短語轉成 ASCII slug;修改 skills/pr/SKILL.md,把原本內嵌在文字說明中的 slugify 規則改為呼叫 tools/slugify.sh,並把 Rules 段落中「分支標題摘要」與「描述撰寫」都標記為必須交由 sub agent 執行(原本只有描述撰寫一項),同時把一個非英文範例字串替換成全英文範例;plugin.json、.claude-plugin/plugin.json、.codex-plugin/plugin.json 三份 manifest 版本號由 0.0.1 升到 0.0.2。 Why: 因應 jsc-meta:skill-check 稽核結果,pr 技能有兩項不合規:決定性的分支名稱 slugify 流程應該工具化而非寫成文字規則,避免各 agent 各自理解出現落差;另外,需要判斷力的步驟(分支標題摘要、描述撰寫)標記不一致,只標了描述撰寫一項會讓分支標題摘要漏掉必要的 sub agent 隔離;範例字串混雜非英文也不符合技能文件全英文的要求。 How: 新增可執行的 tools/slugify.sh(小寫化、非 a-z0-9 字元轉連字號、合併連續連字號、去除頭尾連字號),並在 SKILL.md 步驟 3.2 改為呼叫此腳本;同步更新 Rules 第 3 項,把「分支標題摘要」與「描述撰寫」都列為必須交由 sub agent 執行;把範例改成全英文;三份 plugin manifest 版本號同步升版以反映此次修改。 Who: 影響 jsc-git 的 pr 技能與其新增的 slugify.sh 工具,屬 pr 流程分支命名與稽核合規的功能性變更。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2.5 KiB
2.5 KiB
name, description
| name | description |
|---|---|
| pr | Commit all changes via jsc-git:commit, create a target branch named from the highest-priority commit type plus a summarized title, push, then open a Gitea PR with the templated description. Branch priority is revert > fix > feat > perf > refactor > test > docs > style > chore. Use when work is ready for review; not for plain commits. |
pr — create a Push Request
Steps
- Call
jsc-git:committo commit every file change first. - Pick the base branch: use
developwhen it exists on the remote, elsemain, elsemaster. - Create the target branch from the remote base branch:
- Take the type with the highest priority across all commits:
revert > fix > feat > perf > refactor > test > docs > style > chore. - Summarize one title from all commit messages.
- Branch names allow ASCII only; always slugify as
{type}/{requirement or feature}-{title}. Translate the requirement and title into a short English phrase first, then calltools/slugify.sh {type} {phrase}to produce the final slug (example: translate a non-English request to English first, then slugify — "export report" → export-report → feat/order-export-report). No spaces, parentheses, colons, or any non-ASCII character.
- Take the type with the highest priority across all commits:
- Run
git push -u origin {target branch}. - Create the PR:
jsc-gitea/tools/gitea.sh pr-create {owner}/{repo} {target branch} {base branch} "{branch name}" {description file}.- Title = branch name.
- Write the description into a temp file first, using
templates/pr-description.md(a Traditional Chinese template; the generated description stays in Traditional Chinese per the STE100 output rule).
- Prerequisite PR blocking: when the description lists a prerequisite Push Request, run
jsc-gitea/tools/gitea.sh pr-depend {owner}/{repo} {this PR number} {prerequisite owner}/{repo} {prerequisite PR number}to add the dependency. Gitea then blocks merging until the prerequisite PR closes. If the API is unavailable, degrade: prefix the PR title withWIP:(Gitea blocks merging natively) and remove it once the prerequisite is done. - Report the PR URL.
Rules
- No template section may stay empty: fill the literal 「無」 when there is no plan page, analyze page, or prerequisite PR.
- Take the plan page and analyze page links from the
jsc-sdlcwiki pages; the analyze link must point at the work package heading anchor. - Branch title summarization (step 3.2) and description drafting MUST run as a sub agent.