Pre-ship quality gates for the agentsys ecosystem.
Run all quality checks on your implementation before shipping - deslop, simplify, agnix, enhance, review loop, delivery validation, and docs sync. Does not create PRs or push.
agentsys install prepare-deliveryOr add the marketplace in Claude Code with claude plugin marketplace add agent-sh/agentsys and install prepare-delivery from it.
/prepare-delivery # Run all quality gates
/prepare-delivery --skip-review # Skip review loop
/prepare-delivery --skip-docs # Skip docs sync
/prepare-delivery --base=develop # Against a specific base branch| Phase | What runs | Mode |
|---|---|---|
| 1 | deslop + simplify + test-coverage-checker | Parallel; deslop fixes are applied by the pipeline itself |
| 2 | agnix + enhance | Only when changes touch agent/skill/plugin configs |
| 3 | 4 core reviewers + signal-based specialists | Iterative, max 5 rounds, stops on a stall |
| 4 | delivery-validator (tests, build, requirements, review status) | Blocking |
| 5 | sync-docs agent | Fixes applied by the pipeline |
Each gate commits only the files it edited, so uncommitted work in your tree is left alone. A missing optional plugin (deslop, sync-docs, enhance, agnix, simplify) skips its gate with a warning.
scripts/delivery.js does the deterministic parts: branch context and repo-intel signals (context), parsing result blocks (extract), the review aggregation and its false-positive rules (aggregate), and the flow state /ship --state-file reads (flow).
Flow-state writes take a lock against other writers. Intents left by dead writers are ignored without being deleted, and a live owner never expires by age; an old lock with missing or invalid owner metadata needs manual inspection and removal. The lock assumes a local, coherent filesystem and one host's PID namespace, so a state directory shared across hosts needs its own coordination. Keep the state directory's parent trusted and stable during updates: the inferred-directory check rejects an existing escape, but it does not guard against an adversary replacing the directory's ancestors mid-write.
/prepare-delivery = quality gates only
/ship = PR + CI + merge only
/gate-and-ship = /prepare-delivery + /ship
/next-task = full workflow (uses prepare-delivery agents in phases 8-10)
| Agent | Model | Purpose |
|---|---|---|
| prepare-delivery-agent | inherits | Orchestrates the full pipeline via skill |
| delivery-validator | sonnet | Autonomous pass/fail validation |
| test-coverage-checker | sonnet | Test quality validation (advisory) |
| Skill | Purpose |
|---|---|
| prepare-delivery | 5-phase pipeline orchestration |
| check-test-coverage | Test existence, quality, risk-weighted validation |
| orchestrate-review | Multi-pass parallel code review with iteration |
| validate-delivery | Tests, build, requirements, diff-risk checks |
| Phase | Plugin | Agent/Skill |
|---|---|---|
| Pre-review gates | deslop | deslop:deslop-agent |
| Pre-review gates | (own) | prepare-delivery:test-coverage-checker |
| Pre-review gates | (optional) | simplify skill, when the harness has it |
| Config lint | agnix | agnix CLI (conditional) |
| Config lint | enhance | /enhance skill (conditional) |
| Review loop | (general-purpose) | 4 core + conditional reviewer agents |
| Delivery validation | (own) | prepare-delivery:delivery-validator |
| Docs sync | sync-docs | sync-docs:sync-docs-agent |
| Ship (via /gate-and-ship) | ship | ship:ship command |
Works with Claude Code, OpenCode, Codex CLI, and Cursor via agentsys.
MIT