Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4bad5282a | ||
|
|
d544d37f5d | ||
|
|
1df10fcdae | ||
|
|
3cfdcf9f0d | ||
|
|
ca8867e9bb | ||
|
|
0c76d3ad32 | ||
|
|
c26ca4bd37 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "herdr-issue",
|
"name": "herdr-issue",
|
||||||
"version": "0.0.3",
|
"version": "0.0.5",
|
||||||
"description": "透過 Herdr 讓 Claude agent 逐一實作 Gitea 議題(每個議題一個 worktree 與 tab)。",
|
"description": "透過 Herdr 讓 Claude agent 逐一實作 Gitea 議題(每個議題一個 worktree 與 tab)。",
|
||||||
"skills": "./skills",
|
"skills": "./skills",
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "herdr-issue",
|
"name": "herdr-issue",
|
||||||
"version": "0.0.3",
|
"version": "0.0.5",
|
||||||
"description": "透過 Herdr 讓 Claude agent 逐一實作 Gitea 議題(每個議題一個 worktree 與 tab)。",
|
"description": "透過 Herdr 讓 Claude agent 逐一實作 Gitea 議題(每個議題一個 worktree 與 tab)。",
|
||||||
"skills": "./skills"
|
"skills": "./skills"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ copilot plugin marketplace remove herdr-issue
|
|||||||
|
|
||||||
### `herdr-issue`
|
### `herdr-issue`
|
||||||
|
|
||||||
透過 Herdr 讓 GitHub Copilot agent 逐一實作 Gitea 議題:每個議題一個 worktree 與 tab,監看到議題關閉後清理,並推薦下一批可執行的議題。僅在使用者執行 `/herdr-issue` 或明確要求以 Herdr 驅動 Gitea 議題/repo 連結時觸發。需在 Herdr 內(`HERDR_ENV=1`)執行。
|
透過 Herdr 讓 Claude agent 逐一實作 Gitea 議題:每個議題一個 worktree 與 tab,監看到議題關閉後清理,並推薦下一批可執行的議題。僅在使用者執行 `/herdr-issue` 或明確要求以 Herdr 驅動 Gitea 議題/repo 連結時觸發。需在 Herdr 內(`HERDR_ENV=1`)執行。
|
||||||
|
|
||||||
- **Claude Code**:`/herdr-issue:herdr-issue <議題或 repo 連結>`
|
- **Claude Code**:`/herdr-issue:herdr-issue <議題或 repo 連結>`
|
||||||
- **skills CLI**:`npx skills add https://gitea.jsc.idv.tw/plugins/herdr-issue.git --skill herdr-issue -g`,之後 `/herdr-issue <連結>`
|
- **skills CLI**:`npx skills add https://gitea.jsc.idv.tw/plugins/herdr-issue.git --skill herdr-issue -g`,之後 `/herdr-issue <連結>`
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "herdr-issue",
|
"name": "herdr-issue",
|
||||||
"version": "0.0.3",
|
"version": "0.0.5",
|
||||||
"description": "透過 Herdr 讓 Claude agent 逐一實作 Gitea 議題(每個議題一個 worktree 與 tab)。",
|
"description": "透過 Herdr 讓 Claude agent 逐一實作 Gitea 議題(每個議題一個 worktree 與 tab)。",
|
||||||
"skills": "./skills/"
|
"skills": "./skills/"
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
name: herdr-issue
|
name: herdr-issue
|
||||||
description: "Run Gitea issues through Herdr: one GitHub Copilot agent per issue in its own worktree and tab, watch the issue to closure, then offer the next unblocked issues. Use only when the user runs /herdr-issue or explicitly asks to drive a Gitea issue or repo link with Herdr."
|
description: "Run Gitea issues through Herdr: one Claude agent per issue in its own worktree and tab, watch the issue to closure, then offer the next unblocked issues. Use only when the user runs /herdr-issue or explicitly asks to drive a Gitea issue or repo link with Herdr."
|
||||||
---
|
---
|
||||||
|
|
||||||
# herdr-issue
|
# herdr-issue
|
||||||
|
|
||||||
把 Gitea 議題交給 Herdr 裡的 GitHub Copilot agent 實作。所有確定性的工作都在 `scripts/` 裡,你只在「要做決定」的時刻出手。腳本都要在該 repo 的 clone 裡執行;`S` 代表 `~/.claude/skills/herdr-issue/scripts`。
|
把 Gitea 議題交給 Herdr 裡的 Claude agent 實作。所有確定性的工作都在 `scripts/` 裡,你只在「要做決定」的時刻出手。腳本都要在該 repo 的 clone 裡執行;`S` 代表 `~/.claude/skills/herdr-issue/scripts`。
|
||||||
|
|
||||||
## 語言規則
|
## 語言規則
|
||||||
|
|
||||||
@@ -55,4 +55,4 @@ description: "Run Gitea issues through Herdr: one GitHub Copilot agent per issue
|
|||||||
| `tick.sh` | 子 agent | 勾議題內文第 k 個核取方塊 |
|
| `tick.sh` | 子 agent | 勾議題內文第 k 個核取方塊 |
|
||||||
| `pr-wait.sh` | 子 agent(背景) | 等 PR 衝突、關閉或合併 |
|
| `pr-wait.sh` | 子 agent(背景) | 等 PR 衝突、關閉或合併 |
|
||||||
|
|
||||||
環境變數:`HERDR_ISSUE_INTERVAL`(pr-wait 輪詢秒數,預設 300)、`HERDR_ISSUE_WATCH_INTERVAL`(watch-issue 輪詢秒數,預設 5)、`HERDR_ISSUE_BLOCKED_AFTER`(blocked 多久才通知,預設 60 秒)、`HERDR_ISSUE_MODEL`(預設 `auto`)。
|
環境變數:`HERDR_ISSUE_INTERVAL`(pr-wait 輪詢秒數,預設 300)、`HERDR_ISSUE_WATCH_INTERVAL`(watch-issue 輪詢秒數,預設 5)、`HERDR_ISSUE_BLOCKED_AFTER`(blocked 多久才通知,預設 60 秒)、`HERDR_ISSUE_MODEL`(預設 `claude-opus-5-5`)。
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ LABEL="in-progress"
|
|||||||
LABEL_COLOR="0e8a16"
|
LABEL_COLOR="0e8a16"
|
||||||
LABEL_DESC="Herdr 的 agent 正在實作"
|
LABEL_DESC="Herdr 的 agent 正在實作"
|
||||||
INTERVAL="${HERDR_ISSUE_INTERVAL:-300}"
|
INTERVAL="${HERDR_ISSUE_INTERVAL:-300}"
|
||||||
MODEL="${HERDR_ISSUE_MODEL:-auto}"
|
MODEL="${HERDR_ISSUE_MODEL:-claude-opus-5-5}"
|
||||||
SCRIPTS="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPTS="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
die() { echo "herdr-issue: $*" >&2; exit 1; }
|
die() { echo "herdr-issue: $*" >&2; exit 1; }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# 用法:start.sh <owner/repo> <N>
|
# 用法:start.sh <owner/repo> <N>
|
||||||
# 在目前 clone 旁建 worktree、開 Herdr tab、啟動 copilot、送提示詞並確認 agent 有反應、掛 in-progress 標籤。
|
# 在目前 clone 旁建 worktree、開 Herdr tab、啟動 claude、送提示詞並確認 agent 有反應、掛 in-progress 標籤。
|
||||||
# 送出提示詞後 15 秒內沒觀察到 working 或 blocked 就視為失敗並回滾(關 tab、移除 worktree、刪本次新建的分支)。
|
# 送出提示詞後 15 秒內沒觀察到 working 或 blocked 就視為失敗並回滾(關 tab、移除 worktree、刪本次新建的分支)。
|
||||||
# 最後一行印出 JSON:{"tab":..,"pane":..,"path":..,"resumed":..,"state":"working"|"blocked"}
|
# 最後一行印出 JSON:{"tab":..,"pane":..,"path":..,"resumed":..,"state":"working"|"blocked"}
|
||||||
source "$(dirname "$0")/lib.sh"
|
source "$(dirname "$0")/lib.sh"
|
||||||
@@ -39,13 +39,13 @@ rollback() {
|
|||||||
$RESUMED || git -C "$CLONE" branch -D "$BRANCH" >/dev/null 2>&1 || true
|
$RESUMED || git -C "$CLONE" branch -D "$BRANCH" >/dev/null 2>&1 || true
|
||||||
}
|
}
|
||||||
|
|
||||||
TAB_JSON="$(herdr tab create --workspace "${HERDR_WORKSPACE_ID:?}" --cwd "$WT" --env COPILOT_ALLOW_ALL=true --label "#$N" --no-focus)"
|
TAB_JSON="$(herdr tab create --workspace "${HERDR_WORKSPACE_ID:?}" --cwd "$WT" --label "#$N" --no-focus)"
|
||||||
TAB="$(jq_py 'print(find(d,"tab")["tab_id"])' <<<"$TAB_JSON")"
|
TAB="$(jq_py 'print(find(d,"tab")["tab_id"])' <<<"$TAB_JSON")"
|
||||||
PANE="$(jq_py 'print(find(d,"root_pane")["pane_id"])' <<<"$TAB_JSON")"
|
PANE="$(jq_py 'print(find(d,"root_pane")["pane_id"])' <<<"$TAB_JSON")"
|
||||||
|
|
||||||
START_ERR="$(mktemp)"
|
START_ERR="$(mktemp)"
|
||||||
for _ in 1 2 3 4 5 6; do
|
for _ in 1 2 3 4 5 6; do
|
||||||
if herdr agent start "issue-$N" --kind copilot --pane "$PANE" --timeout 90000 -- --model "$MODEL" --allow-all-tools --allow-all-paths >/dev/null 2>"$START_ERR"; then
|
if herdr agent start "issue-$N" --kind claude --pane "$PANE" --timeout 90000 -- --model "$MODEL" >/dev/null 2>"$START_ERR"; then
|
||||||
rm -f "$START_ERR"; break
|
rm -f "$START_ERR"; break
|
||||||
fi
|
fi
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|||||||
Reference in New Issue
Block a user