Skip to content

Repository files navigation

code_pipelines

Automated code pipelines for Agent Zero: isolated worktree bundles, subagent builds, exit-code verification, parallel multi-model review, a bounded fix loop, and PR creation — with terminal-state notifications.

The flow

dispatch {task, verify_commands?, base?, timeout_minutes?}
  ├─ worktree  — one git worktree per repo in the project + a shadow repo
  │              for project instructions (.a0proj etc.), under
  │              usr/worktrees/<project>/<pipeline-id>/
  ├─ build     — developer subagent works ONLY in the worktrees
  ├─ verify    — exit-code gates in the primary repo worktree
  │              (auto-detects pytest / npm test when not given)
  ├─ review    — up to 3 reviewer subagents in parallel (different agent
  │              profiles → different model presets); VERDICT: APPROVE or
  │              concrete issues; infra failures retried once and never
  │              count as code issues
  ├─ fix loop  — feedback steers the SAME developer context; hard cap of
  │              2 rounds, then needs_human
  └─ pr        — push branch + gh pr create per changed repo
→ terminal notification wakes the parent: done | no_remote | needs_human |
  failed | interrupted (bundle kept on everything except done)

Reliability rules

  • Deterministic gates: tests pass by exit code; LLMs judge code quality only. Reviewer infrastructure errors (rate limits, transport) retry once and degrade gracefully — approvals proceed, all-failed goes needs_human.
  • Everything bounded: per-job timeouts, 2-round fix cap.
  • State is one JSON record per pipeline + git itself; worktrees/branches are the ground truth, always recreatable (resume re-attaches from the branch; committed work survives restarts).
  • Bundles are cleaned ONLY after PRs exist — never mid-run; failures keep the bundle. Branches survive cleanup for recovery.
  • Startup marks non-terminal pipelines interrupted; resume from build or fix stage.

Worktree policy

Bundles live at usr/worktrees/<project>/<pipeline-id>/ (the framework's persistent user dir — deployment-agnostic, never indexed, outside every repo). Each repo gets repos/<name>/; the shadow repo (shadow/) isolates project instruction files with their own branch. No remote configured → no_remote terminal with branches ready for manual push.

Tool

pipeline — actions: dispatch (fan out one pipeline), status, resume (interrupted/failed/needs_human). Requires a project-bound chat. Developer/reviewer profiles come from agents/ (default reviewers: implementor, developer, reviewer — override via the pipeline record's reviewers list).

Requirements

  • Agent Zero's subagents plugin must be installed and enabled. The optional synthetic_context plugin keeps terminal callbacks out of the user role; stock UserMessage delivery is used as a compatibility fallback.
  • git is required. The GitHub CLI (gh) is required only when a changed repository has a GitHub remote and the pipeline should create a PR.
  • The default build profile is developer. Reviewer profiles are discovered from the installation and selected from the configured preference list, so missing optional profiles are skipped instead of producing failed jobs.

State and worktree bundles live under Agent Zero's persistent usr/ folder. Uninstalling the plugin does not delete branches, worktrees, or recovery state.

About

Automated code pipelines: per-repo worktree bundles plus a shadow repo for project instructions, developer subagent builds, exit-code verification, parallel review by up to 3 agent profiles, a bounded fix loop with feedback to the developer, and push + PR — with terminal-state notifications. Built on stock parallel jobs and the subagents orchestrat

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages