用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/rlaope/bestwork-agent --skill pipeline-run命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Evidence-driven causal tracing — competing hypotheses, falsification, rebuttal round, recommended next probes
Feature validation gate — research, define purpose, stress-test from real user perspective before building
Maximum parallelism burst — all tasks execute simultaneously with no coordination overhead
基于 SOC 职业分类
正在显示 SKILL.md
| name | pipeline-run |
| description | Queue and auto-process multiple GitHub issues — each gets its own branch, team, PR, and merge |
When this skill is invoked, IMMEDIATELY print:
[BW] pipeline starting...
./pipeline-run #16 #17 #18 — explicit issue numbers./pipeline-run --resume — resume from last saved state (skip completed issues)./pipeline-run --dry-run #16 #17 #18 — preview queue and schedule without executing./pipeline-run --sequential — force all issues sequential (no parallel solos)Check for --resume first:
# Read saved state
cat .bestwork/state/pipeline-run.json
Filter to issues with status != "merged". Print:
[BW] resuming pipeline — {N} of {M} issues remaining
[BW] skipping: #16 (merged), #18 (merged)
[BW] resuming: #17 (in_progress, attempt 2), #19 (pending)
The user can provide:
./pipeline-run #16 #17 #18If explicit numbers given:
# For each number, read the issue
gh issue view {N} --json title,body,labels --jq '{number: {N}, title: .title, body: .body}'
If natural language (no numbers):
# List all open issues
gh issue list --state open --limit 30 --json number,title,labels
Then filter based on user intent:
v2.0 or title containing "v2.0"bug + criticalgh issue list --assignee @mePrint the queue:
[BW] pipeline queue:
1. #16 — complete all 49 agent prompts (large)
2. #17 — agent effectiveness scoring (medium)
3. #18 — user-extensible skills (medium)
3 issues queued. processing...
For each issue, read its title and body. Determine:
Print classification:
[BW] #16 → blitz (34 prompt files, tech-writer)
[BW] #17 → trio (agent-engineer + pm-dx + critic-agent)
[BW] #18 → solo (tech-plugin)
[BW] deps: #17 blocked by #16 (shared prompt format)
Scheduling rules (CRITICAL — prevents context explosion):
If --sequential flag: force all issues sequential.
Example with 4 issues:
[BW] schedule:
parallel: #18 (solo) + #20 (solo) ← fast, run together
then: #16 (blitz, 34 files) ← heavy, run alone
then: #17 (trio, blocked by #16) ← heavy + dependency
NEVER spawn more than 5 agents at once. If a trio (3 agents) is running, do NOT start another trio in parallel.
If --dry-run, print the schedule and STOP. Do not execute:
[BW] dry-run complete — {N} issues classified, schedule above
[BW] run without --dry-run to execute
Write .bestwork/state/pipeline-run.json:
{
"created": "<ISO timestamp>",
"userRequest": "<original prompt>",
"flags": { "resume": false, "dryRun": false, "sequential": false },
"issues": [
{
"number": 16,
"title": "complete all 49 agent prompts",
"scale": "blitz",
"agents": ["tech-writer"],
"status": "pending",
"attempts": 0,
"branch"
For EACH issue, call TaskCreate:
TaskCreate: subject="pipeline #N: {title}", activeForm="pipeline: processing #N..."
Append to .bestwork/state/meeting.jsonl:
{"type":"header","teamName":"pipeline-run","task":"Queue: #16, #17, #18","classification":"PIPELINE","issueCount":3,"timestamp":"<ISO>"}
Process according to the schedule from Step 2.5:
git checkout main && git pull && git checkout -b feat/issue-{N}
Update state: status: "branched"
Based on the classification:
Each scale has concrete gate conditions — NOT just "tests pass":
Solo gates:
npx tsc --noEmit — type check passesnpm test — all tests passTrio gates:
npx tsc --noEmit — type check passesnpm test — all tests passBlitz gates:
npx tsc --noEmit — type check passesnpm test — critical tests pass (filter to changed file tests if possible)Print gate results:
[BW] #17 gates:
[✓] type check
[✓] tests (142 passed)
[✓] PM: matches issue spec
[✗] critic: regression in orchestrator.test.ts
[BW] ↻ fixing #17 (attempt 2)...
If gate fails: fix and retry. Max 3 attempts per issue.
After attempt 3, escalate:
[BW] #17 stuck after 3 attempts
[BW] last failure: critic — regression in orchestrator.test.ts
[BW] options:
a) skip and continue pipeline
b) create PR as draft (for manual review)
c) halt pipeline
Update state after each gate check: status: "verified" or attempts: N+1
git add -A
git commit --signoff -m "feat: {description from issue} (#{N})"
git push -u origin feat/issue-{N}
gh pr create --title "{issue title} (#{N})" --body "Closes #{N}\n\n{summary of changes}"
Update state: status: "pr_created", pr: {prNumber}
# Wait for CI
gh run watch $(gh run list --limit 1 --json databaseId -q '.[0].databaseId') --exit-status
# Merge with rebase (keeps claude as author)
gh pr merge --rebase --delete-branch
# Close issue
gh issue close {N}
Update state: status: "merged", merged: true
Print per-issue result and update task:
[BW] ✓ #17 → PR #34 merged (agent effectiveness scoring) [attempt 1]
TaskUpdate: status="completed"
Append to .bestwork/state/meeting.jsonl:
{"type":"issue","number":17,"scale":"trio","agents":["agent-engineer","pm-dx","critic-agent"],"status":"merged","pr":34,"attempts":1,"timestamp":"<ISO>"}
After each issue completes or fails, update .bestwork/state/pipeline-run.json with current state. This enables --resume if the pipeline is interrupted.
If a PR fails CI after merge attempt:
gh run view --log-failed)[BW] ✗ #16 — CI failed 3 times
[BW] last error: {error summary}
[BW] options:
a) skip — continue to next issue
b) draft PR — create as draft for manual review
c) halt — stop pipeline entirely
Update state: status: "skipped" or status: "draft" with error: "{reason}"
[BW] ═══════════════════════════════════
[BW] pipeline complete
[BW] ✓ 2/3 issues merged (#17, #18)
[BW] ✗ 1/3 issues skipped (#16 — CI failure)
[BW] PRs: #34, #35
[BW] total attempts: 5 (avg 1.7 per issue)
[BW] duration: 12m 34s
[BW] ═══════════════════════════════════
After printing the summary block, call report-writer (src/observe/report-writer.ts) to save detailed output:
writeReport("pipeline-run", {
total: {total issues},
done: {merged issues},
agents: [all agents used across all issues],
tasks: [issue titles with status, e.g. "#17 merged (attempt 1)"],
durationMs: {elapsed ms},
decisions: [skipped issues with reasons, escalation choices]
}, projectRoot)
Then call summarize (src/observe/result-summarizer.ts) and print the 1-liner:
[BW] ✓ {merged}/{total} done — details: .bestwork/reports/pipeline-run-{timestamp}.md
Update state: completedAt: "<ISO timestamp>"
Append to .bestwork/context/decisions.md:
## {date}: Pipeline run
- **Issues**: #16, #17, #18
- **Result**: 2/3 merged, 1 skipped
- **PRs**: #34, #35
- **Attempts**: 5 total (1.7 avg)
- **Duration**: 12m 34s
- **Skipped**: #16 (CI failure — {reason})
Append meeting footer to .bestwork/state/meeting.jsonl:
{"type":"footer","teamName":"pipeline-run","result":"2/3 merged","duration":"12m34s","timestamp":"<ISO>"}
git checkout main && git pull before creating each branch--signoff on commitsgh pr merge --rebase --delete-branch (not --squash, to keep claude author)--resume — never delete it until pipeline fully completes--dry-run must NEVER execute any git/gh commands beyond reading issues