beads-looper
Use when a persistent session should own a bounded Beads outcome end to end, implementing cohesive packages, testing, diagnosing failures, correcting review findings and landing or explicitly handing off. Also use for an independent review session serving those owners, including self-paced Claude /loop or Codex continuation without a central coordinator.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- beads-looper
- metadata
- { "owner": "tze", "status": "active", "authors": [ "tze", "Claude Opus 5.5" ], "last_reviewed": "2026-11-06" }
- description
- Use when a persistent session should own a bounded Beads outcome end to end, implementing cohesive packages, testing, diagnosing failures, correcting review findings and landing or explicitly handing off. Also use for an independent review session serving those owners, including self-paced Claude /loop or Codex continuation without a central coordinator.
- compatibility
- Requires a Beads-backed repository with `bd` v1.3+ (`--claim`, `--if-assignee`), `uv`, `git` with worktree support, an authenticated `gh`, `jq`, and `python3`, plus a native subagent mechanism for the verifier and a self-paced repeat primitive such as Claude Code's `/loop`.
02 资源文件 5
- 参考文档agents/openai.yaml352 B
- 参考文档references/adversarial-verifier.md1.6 KB
- 参考文档references/implement-cycle.md5.4 KB
- 参考文档references/review-cycle.md5.0 KB
- 脚本tests/test_skill_package.py2.1 KB
03 SKILL.md 正文
Beads Looper
Persistent outcome ownership using the existing actor registry, claims, ranker and worker/reviewer mechanisms. Default implementation path for a bounded outcome; several disjoint owners can share a tracker. A small coordinator is optional for allocation/recovery and dispatched-worker lifecycle writes.
Use when
“Own this epic until its accepted outcome is complete”, “run this pane as a Beads lane”, “/loop through this prerequisite chain”, or “be the independent reviewer for these outcome owners”. A supplied dispatched package uses beads-worker; backlog authoring uses beads-writer.
Modes and contract
Read shared delivery model first. Tracking beads differ from packages and outcomes; keep per-member acceptance. Normal work lands bounded packages frequently to main. An integration branch is optional, policy-dependent, and does not change who owns the session or independent review.
| Mode | Responsibility | Read next |
|---|---|---|
| implement (default) | Retain one outcome through packages, implementation, tests, diagnosis, corrections and landing/handoff | implement cycle |
| review | Independently review one package in its own worktree; send findings directly to the existing owner and reuse the same record through rechecks | review cycle |
The independent reviewer can be another pane or a native subagent. A permanently separate review looper is optional, not a prerequisite for delivery. Never review content you authored. Verifier guidance explains early review without another mandatory review cycle.
Launch and continuation
Resolve REPO_ROOT from the shared Git common directory; do not use a nested
submodule or arbitrary worker's --show-toplevel as the tracker root. Read target
AGENTS/CLAUDE and preserve dirt before changing state. Mint LOOPER_ID through
coordinator_registry.py
new-id; register --startup once, renew on work/wake and deregister on stop.
Pass --actor "$LOOPER_ID" on lifecycle writes; do not share an actor with another
live session. Use existing beads.max_lanes, never change it without owner instruction.
Claude /loop and native Codex thread continuation use the same contract:
Use beads-orchestration → beads-looper, implement mode, outcome <existing-id>.
Retain ownership through corrections; finish accepted scope or publish explicit handoff.
Resume the existing session where available. A new launch validates ownership, current packet, published/local branch and journal before edits. Compaction state includes actor, outcome, anchor/members, session locator, current PR/head, review findings/evidence and waits. Do not treat session launch as continuation by name alone.
Invariants
- Mutate only held claims; adopt dead peers only under runtime safety.
- Claim a package, not an entire backlog. Independent outcomes retain distinct owners and rollback paths. One shared prerequisite has one owner.
- Implementation claims and worktree remain with the owner during review/CI.
Reviewer owns its review bead and
review/<review-id>snapshot, never the implementation branch. Corrections return directly to the current owner. - No fleet restarts, deployment or policy changes are implied by execution. Decision autonomy preserves actual authority gates; continue work that does not depend on a held decision.
- Preserve published useful work and quarantine unpublished work on failure. Worktree deletion is completion/recovery cleanup, not a PR-open handoff step.
- Close only individually verified and actually landed acceptance; keep the original outcome visibly partial until all required behavior/proof is met.
Wait and report
Use event-driven continuation for CI/review/dependency/owner events, with the bounded fallback/stop rule in runtime safety. Use the same review-first admission queue in either mode; mode filters capability, not global priority. Retained claims do not consume parked execution slots. Only admit disjoint spillover after runnable higher-class work is admitted and execution and WIP capacity permit it; keep resume events and returning-correction priority. P0 can preempt at a safe published checkpoint, with explicit claim disposition and resume owner. On drift, publish recovery and retire.
Every state-change report names LOOPER_ID, REPO_ROOT, outcome, package/members,
accepted vs remaining behavior, PR, review/wait event, next action and recovery.
Final report also names released/retained claims and registry disposition. Reuse
coordinator hold procedure
and held-PR inventory when considering landing. Search
known errors before re-deriving recovery.
04 同仓库更多 Skills
user-run
Use when a step needs privileges this session lacks (docker, sudo, another user's checkout or secrets, host access) and the owner must run it as tze. Writes a reviewable /home/orca/.tmp/<slug>/run.sh that impersonates tze (USER_TO_IMPERSONATE overrides), tees timestamped logs plus latest.log and collects artifacts there; Claude presents it with a risk and time brief, then continues from the logs. Triggers: "I'll run it for you", "permission denied on docker.sock", "needs sudo", "sudo: a password is required", "run as tze", "/user-run".
requesting-code-review
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
receiving-code-review
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
finishing-a-development-branch
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
executing-plans
Use when you have a written implementation plan to execute in a separate session with review checkpoints
dispatching-parallel-agents
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies