Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41762db1b8 | ||
|
|
e5584bee80 | ||
|
|
99e2e09175 | ||
|
|
9f5657c108 | ||
|
|
80e0b495c6 | ||
|
|
13c9684246 | ||
|
|
2319ef6bbb | ||
|
|
9ce424e28f | ||
|
|
49e4f3e35b | ||
|
|
be70cd58ee | ||
|
|
06471548d9 | ||
|
|
121cc93c38 | ||
|
|
89f30f9c5e | ||
|
|
226dcc4a6b | ||
|
|
a308aed68f | ||
|
|
e8d1c28b5a |
@@ -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 追蹤)"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -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 追蹤)"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jsc-git",
|
"name": "jsc-git",
|
||||||
"version": "0.0.1",
|
"version": "0.0.4",
|
||||||
"description": "Commit 分組認可與 Push Request 建立",
|
"description": "Commit 分組認可與 Push Request 建立",
|
||||||
"skills": "./skills",
|
"skills": "./skills",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jsc-git",
|
"name": "jsc-git",
|
||||||
"version": "0.0.1",
|
"version": "0.0.4",
|
||||||
"description": "Commit 分組認可與 Push Request 建立",
|
"description": "Commit 分組認可與 Push Request 建立",
|
||||||
"skills": "./skills"
|
"skills": "./skills"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
## 規則
|
## 規則
|
||||||
|
|
||||||
1. 所有交談與輸出內容基於 STE100 使用繁體中文:短句、一句一指令、主動語態、術語一致、UTF-8 無亂碼。
|
1. 所有交談與輸出內容使用 STE100 繁體中文,帶擬人台灣感:短句、一句一指令、台灣用語、全形標點、去 AI 味、直接講重點。完整規則的唯一來源:`plugins/meta` 的 `references/ste100.md`。
|
||||||
2. 技能位於 `skills/{name}/SKILL.md`;處理任務前先比對需求與各技能的 `description`,相符就載入並依其步驟執行。
|
2. 技能位於 `skills/{name}/SKILL.md`;處理任務前先比對需求與各技能的 `description`,相符就載入並依其步驟執行。
|
||||||
3. 技能準則的唯一來源:`plugins/meta` 存取庫的 `references/guidelines.md`。
|
3. 技能準則的唯一來源:`plugins/meta` 存取庫的 `references/guidelines.md`。
|
||||||
4. 所有 hook 只放在 `jsc-hooks`;gitea 操作一律經由 `jsc-gitea` 的 `tools/gitea.sh`;問使用者一律依 `jsc-ask:ask` 的決策樹規則。
|
4. 所有 hook 只放在 `jsc-hooks`;gitea 操作一律經由 `jsc-gitea` 的 `tools/gitea.sh`;問使用者一律依 `jsc-ask:ask` 的決策樹規則。
|
||||||
|
|||||||
@@ -1,21 +1,23 @@
|
|||||||
# jsc-git — Commit 與 Push Request
|
# jsc-git — Commit 與 Push Request
|
||||||
|
|
||||||
jsc 技能組的 git domain:把檔案變更依「類型 + 需求/功能」分組認可,並建立符合範本的 Push Request。
|
jsc 技能組的 git domain:把檔案變更依同類型與同需求或功能分組認可,並建立符合範本的 Push Request。
|
||||||
|
|
||||||
## 安裝 / 更新 / 移除
|
## 安裝、更新、移除
|
||||||
|
|
||||||
Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安裝 token 為 `jsc-git@jsc`。每個指令一行:
|
Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/meta.git),安裝 token 為 `jsc-git@jsc`。每個指令一行:
|
||||||
|
|
||||||
| CLI | 安裝 | 更新 | 移除 |
|
| CLI | 安裝 | 更新 | 移除 |
|
||||||
| --- | --- | --- | --- |
|
| --- | --- | --- | --- |
|
||||||
| claude | `claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/jsc.git && claude plugin install jsc-git@jsc` | `claude plugin marketplace update jsc && claude plugin update jsc-git@jsc` | `claude plugin uninstall jsc-git@jsc` |
|
| claude | `claude plugin marketplace add https://gitea.jsc.idv.tw/plugins/meta.git && claude plugin install jsc-git@jsc` | `claude plugin marketplace update jsc && claude plugin update jsc-git@jsc` | `claude plugin uninstall jsc-git@jsc` |
|
||||||
| codex | `codex plugin marketplace add https://gitea.jsc.idv.tw/plugins/jsc.git && codex plugin add jsc-git@jsc` | `codex plugin marketplace upgrade jsc` | `codex plugin remove jsc-git@jsc` |
|
| codex | `codex plugin marketplace add https://gitea.jsc.idv.tw/plugins/meta.git && codex plugin add jsc-git@jsc` | `codex plugin marketplace upgrade jsc` | `codex plugin remove jsc-git@jsc` |
|
||||||
| copilot | `copilot plugin marketplace add https://gitea.jsc.idv.tw/plugins/jsc.git && copilot plugin install jsc-git@jsc` | `copilot plugin marketplace update jsc && copilot plugin update jsc-git@jsc` | `copilot plugin uninstall jsc-git@jsc` |
|
| copilot | `copilot plugin marketplace add https://gitea.jsc.idv.tw/plugins/meta.git && copilot plugin install jsc-git@jsc` | `copilot plugin marketplace update jsc && copilot plugin update jsc-git@jsc` | `copilot plugin uninstall jsc-git@jsc` |
|
||||||
| antigravity | `git clone https://gitea.jsc.idv.tw/plugins/git.git ~/plugins/git && agy plugin install ~/plugins/git` | `git -C ~/plugins/git pull && agy plugin uninstall jsc-git && agy plugin install ~/plugins/git` | `agy plugin uninstall jsc-git` |
|
| antigravity | `git clone https://gitea.jsc.idv.tw/plugins/git.git ~/plugins/git && agy plugin install ~/plugins/git` | `git -C ~/plugins/git pull && agy plugin uninstall jsc-git && agy plugin install ~/plugins/git` | `agy plugin uninstall jsc-git` |
|
||||||
| kiro | `kiro-cli plugin marketplace add https://gitea.jsc.idv.tw/plugins/jsc.git && kiro-cli plugin install jsc-git@jsc` | `kiro-cli plugin marketplace update jsc && kiro-cli plugin update jsc-git@jsc` | `kiro-cli plugin uninstall jsc-git@jsc` |
|
| kiro | `kiro-cli plugin marketplace add https://gitea.jsc.idv.tw/plugins/meta.git && kiro-cli plugin install jsc-git@jsc` | `kiro-cli plugin marketplace update jsc && kiro-cli plugin update jsc-git@jsc` | `kiro-cli plugin uninstall jsc-git@jsc` |
|
||||||
|
|
||||||
> antigravity 不支援 gitea URL 安裝,改用本地 clone 路徑。批次操作五個 CLI:使用 `/jsc-cli:deploy`。
|
> antigravity 不支援 gitea URL 安裝,改用本地 clone 路徑。批次操作五個 CLI:使用 `/jsc-cli:deploy`。
|
||||||
|
|
||||||
|
> 舊入口 `plugins/jsc` 已移除,marketplace 正本移到 `plugins/meta`。marketplace 名稱仍是 `jsc`(取自 marketplace.json 的 `name` 欄位,與存取庫名無關),安裝 token 不變;已從舊入口安裝過的人先執行 `claude plugin marketplace remove jsc`,再依上表重新 add。
|
||||||
|
|
||||||
## Skills 目錄
|
## Skills 目錄
|
||||||
|
|
||||||
呼叫方式:Claude / Antigravity `/jsc-git:{name}`;Codex `${name}`;Copilot / Kiro 描述需求自動觸發。
|
呼叫方式:Claude / Antigravity `/jsc-git:{name}`;Codex `${name}`;Copilot / Kiro 描述需求自動觸發。
|
||||||
@@ -36,7 +38,7 @@ Marketplace 統一為 `jsc`(https://gitea.jsc.idv.tw/plugins/jsc.git),安
|
|||||||
|
|
||||||
| 檔案 | 用途 |
|
| 檔案 | 用途 |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `templates/pr-description.md` | PR 描述:摘要 / 變更內容 / 設計重點 / 測試結果 / 前置 PR |
|
| `templates/pr-description.md` | PR 描述:摘要、變更內容、設計重點、測試結果、前置 PR |
|
||||||
|
|
||||||
## 相關 domain
|
## 相關 domain
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jsc-git",
|
"name": "jsc-git",
|
||||||
"version": "0.0.1",
|
"version": "0.0.4",
|
||||||
"description": "Commit 分組認可與 Push Request 建立",
|
"description": "Commit 分組認可與 Push Request 建立",
|
||||||
"skills": "./skills/"
|
"skills": "./skills/"
|
||||||
}
|
}
|
||||||
|
|||||||
+25
-25
@@ -3,38 +3,38 @@ name: commit
|
|||||||
description: Group all pending file changes by conventional type and feature, then commit each group as {type}({scope}): {message}. Message style is full (What/Why/How/Who), brief (one line from git diff), or custom, chosen via decision tree. Use whenever changes must be committed; not for push or PR creation.
|
description: Group all pending file changes by conventional type and feature, then commit each group as {type}({scope}): {message}. Message style is full (What/Why/How/Who), brief (one line from git diff), or custom, chosen via decision tree. Use whenever changes must be committed; not for push or PR creation.
|
||||||
---
|
---
|
||||||
|
|
||||||
# commit — 分組認可檔案變更
|
# commit — group and commit file changes
|
||||||
|
|
||||||
## 步驟
|
## Steps
|
||||||
|
|
||||||
1. 追蹤所有檔案變更:先 `git status --porcelain` 檢視全部變更,再逐組 `git add`(不可盲目 `git add -A` 後一次 commit)。
|
1. Track every file change: inspect all changes with `git status --porcelain` first, then `git add` group by group. Never `git add -A` and commit everything at once.
|
||||||
2. 依「同類型 + 同需求/功能」將檔案變更分組,一組一個 commit。
|
2. Group the changes by same type plus same requirement or feature. One group is one commit.
|
||||||
3. 每組依格式認可:`{類型}({需求 or 功能}): {訊息}`。
|
3. Commit each group with the format `{type}({requirement or feature}): {message}`.
|
||||||
|
|
||||||
## 類型表
|
## Type table
|
||||||
|
|
||||||
| 類型 | 用途 |
|
| Type | Purpose |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| feat | 新增/修改功能 |
|
| feat | add or change a feature |
|
||||||
| fix | 修補 bug |
|
| fix | fix a bug |
|
||||||
| docs | 文件 |
|
| docs | documentation |
|
||||||
| style | 格式(不影響程式碼運行的變動) |
|
| style | formatting; no change to how the code runs |
|
||||||
| refactor | 重構(既不是新增功能,也不是修補 bug 的程式碼變動) |
|
| refactor | code change that neither adds a feature nor fixes a bug |
|
||||||
| perf | 改善效能 |
|
| perf | improve performance |
|
||||||
| test | 增加測試 |
|
| test | add tests |
|
||||||
| chore | 建構程序或輔助工具的變動 |
|
| chore | build process or tooling change |
|
||||||
| revert | 撤銷回覆先前的 commit |
|
| revert | revert an earlier commit |
|
||||||
|
|
||||||
## 訊息格式(三選一)
|
## Message format (pick one of three)
|
||||||
|
|
||||||
依 `jsc-ask:ask` 規則詢問使用者;問詢紀錄或本 session 已有慣例就不再問。
|
Ask the user per the `jsc-ask:ask` rules. Skip the question when the question record or this session already holds a convention.
|
||||||
|
|
||||||
1. **完整版**:包含做什麼(What)、為什麼做(Why)、怎麼做(How)、哪個功能做(Who)。
|
1. **Full**: covers What, Why, How, and Who (which feature).
|
||||||
2. **簡易版**:根據 `git diff` 總結出一句描述。
|
2. **Brief**: one sentence summarized from `git diff`.
|
||||||
3. **自訂**:使用者自行輸入訊息。
|
3. **Custom**: the user types the message.
|
||||||
|
|
||||||
## 規則
|
## Rules
|
||||||
|
|
||||||
1. 分組與訊息草擬的細節**必須以 sub agent 執行**,主 agent 只確認分組結果與執行 commit。
|
1. The grouping and message drafting details **MUST run as a sub agent**. The main agent only confirms the grouping and runs the commits.
|
||||||
2. 訊息一律 UTF-8 繁體中文(類型與 scope 除外)。
|
2. Write messages in UTF-8 Traditional Chinese (the type and scope stay in English), per the STE100 output rule.
|
||||||
3. 不可 push;push 與 PR 由 `jsc-git:pr` 負責。
|
3. Never push. Push and PR belong to `jsc-git:pr`.
|
||||||
|
|||||||
+21
-21
@@ -1,29 +1,29 @@
|
|||||||
---
|
---
|
||||||
name: pr
|
name: pr
|
||||||
description: 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.
|
description: 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 against the base branch the caller passed in (falling back to develop, main, master only when none was given). Branch priority is revert > fix > feat > perf > refactor > test > docs > style > chore. Use when work is ready for review; not for plain commits.
|
||||||
---
|
---
|
||||||
|
|
||||||
# pr — 建立 Push Request
|
# pr — create a Push Request
|
||||||
|
|
||||||
## 步驟
|
## Steps
|
||||||
|
|
||||||
1. 呼叫 `jsc-git:commit` 將所有檔案變更認可完成。
|
1. Call `jsc-git:commit` to commit every file change first.
|
||||||
2. 決定來源分支:遠端存在 `develop` 就用 `develop`,否則用 `main`(再否則用 `master`)。
|
2. Pick the base branch. **A base branch passed in by the caller wins over everything else** — `jsc-sdlc:implement` passes the analysis page's source branch, and silently retargeting that PR at `develop` would merge a single work package straight past the feature branch it belongs to. Only when no caller supplied one: use `develop` when it exists on the remote, else `main`, else `master`. Verify the chosen base exists on the remote (`git fetch --prune origin` first, then `git branch -r`); it does not exist → report and stop, never fall back silently.
|
||||||
3. 從遠端來源分支建立目標分支:
|
3. Create the target branch from the remote base branch:
|
||||||
1. 類型取所有 commit 中優先度最高者:`revert > fix > feat > perf > refactor > test > docs > style > chore`。
|
1. Take the type with the highest priority across all commits: `revert > fix > feat > perf > refactor > test > docs > style > chore`.
|
||||||
2. 標題從所有 commit 的訊息總結出一句。
|
2. Summarize one title from all commit messages.
|
||||||
3. 分支名**只允許 ASCII**,一律 slug 化:`{類型}/{需求 or 功能}-{標題}`。需求/功能與標題先翻譯成英文短語,再轉小寫、非 `a-z0-9` 字元以連字號取代、連續連字號合併、頭尾連字號移除(例:`feat/order-匯出報表` → `feat/order-export-report`)。不可含空白、括號、冒號與任何非 ASCII 字元。
|
3. 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 call `tools/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.
|
||||||
4. `git push -u origin {目標分支}`。
|
4. Run `git push -u origin {target branch}`.
|
||||||
5. 建立 PR:`jsc-gitea/tools/gitea.sh pr-create {owner}/{repo} {目標分支} {來源分支} "{分支名}" {描述檔}`。
|
5. Create the PR: `jsc-gitea/tools/gitea.sh pr-create {owner}/{repo} {target branch} {base branch} "{branch name}" {description file}`.
|
||||||
- 標題 = 分支名。
|
- Title = branch name.
|
||||||
- 描述先套用 `templates/pr-description.md` 寫入暫存檔再帶入。
|
- 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).
|
||||||
6. **前置 PR 阻擋**:描述中有前置 Push Request 時,執行
|
6. **Prerequisite PR blocking**: when the description lists a prerequisite Push Request, run
|
||||||
`jsc-gitea/tools/gitea.sh pr-depend {owner}/{repo} {本 PR 編號} {前置 owner}/{repo} {前置 PR 編號}`
|
`jsc-gitea/tools/gitea.sh pr-depend {owner}/{repo} {this PR number} {prerequisite owner}/{repo} {prerequisite PR number}`
|
||||||
把本 PR 掛上依賴;前置 PR 未關閉前 Gitea 會阻擋合併,避免誤合併。API 不可用時降級:PR 標題加 `WIP:` 前綴(Gitea 原生阻擋合併),前置完成後移除。
|
to add the dependency. Gitea then blocks merging until the prerequisite PR closes. If the API is unavailable, degrade: prefix the PR title with `WIP:` (Gitea blocks merging natively) and remove it once the prerequisite is done.
|
||||||
7. 回報 PR URL。
|
7. Report the PR URL.
|
||||||
|
|
||||||
## 規則
|
## Rules
|
||||||
|
|
||||||
1. 描述範本各節不可留空:沒有計畫/分析頁就填「無」,沒有前置 PR 就填「無」。
|
1. No template section may stay empty: fill the literal 「無」 when there is no plan page, analyze page, or prerequisite PR.
|
||||||
2. 計畫頁與分析頁連結由 `jsc-sdlc` 的 wiki 頁取得;分析頁連結必須導向工作包標題錨點。
|
2. Take the plan page and analyze page links from the `jsc-sdlc` wiki pages; the analyze link must point at the work package heading anchor.
|
||||||
3. 描述草擬的細節**必須以 sub agent 執行**。
|
3. Branch title summarization (step 3.2) and description drafting MUST run as a sub agent.
|
||||||
|
|||||||
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
# slugify.sh — 把分支類型與描述轉成 ASCII 分支名 slug。
|
||||||
|
# 用法: slugify.sh {type} {phrase}
|
||||||
|
# 規則: 全部轉小寫,非 a-z0-9 的字元換成連字號,
|
||||||
|
# 連續連字號合併成一個,並去除開頭與結尾的連字號。
|
||||||
|
# 輸出: {type}/{slug}(例如: slugify.sh feat "export report" → feat/export-report)
|
||||||
|
set -u
|
||||||
|
|
||||||
|
if [ "$#" -lt 2 ]; then
|
||||||
|
echo "用法: slugify.sh {type} {phrase}" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
TYPE="$1"
|
||||||
|
shift
|
||||||
|
PHRASE="$*"
|
||||||
|
|
||||||
|
slug=$(printf '%s' "$PHRASE" | tr '[:upper:]' '[:lower:]' | sed -e 's/[^a-z0-9]/-/g' -e 's/-\{2,\}/-/g' -e 's/^-//' -e 's/-$//')
|
||||||
|
|
||||||
|
printf '%s/%s\n' "$TYPE" "$slug"
|
||||||
Reference in New Issue
Block a user