Skip to main content
Glama

advance_pipeline

Run an orchestration tick to dispatch ready stories, advance finished ones through test, review, and PR, and adjudicate merges against risk thresholds. Idempotent and repeatable by scheduler.

Instructions

Run one orchestration tick: dispatch every ready story (deps satisfied), advance finished stories through test -> review -> PR, and adjudicate merges against the risk threshold. Idempotent; designed to be called repeatedly by a scheduler (/loop or cron). In PIPELINE_AUTONOMY=dry-run it plans and logs only, taking no actions.

Honors a per-backend resource gate: dispatch and review are gated independently by their own backend's resource_status() (see _role_resource_ok). If the dispatch backend is gated, in-progress stories are interrupted (checkpointed, resumable) and no new dispatch starts; if the review backend is gated, review is deferred. Each is independent, so a Claude usage pause no longer freezes local-backed dispatch. Merge adjudication always runs (no model usage). "interrupted" stories are dispatch-eligible like "todo" ones, so they resume automatically once the dispatch backend frees up.

Also honors MAX_CONCURRENT_AGENTS: dispatch is capped to the number of free slots remaining (limit minus agents already in_progress across all plans), so a tick never starts more agents than the configured ceiling. Stories left undispatched this tick stay "todo"/"interrupted" and are picked up on a later tick as slots free up.

Skips entirely (returns {"ok": True, "skipped": "locked"}) if another tick for this same plan is already running - see _plan_lock.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
plan_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full responsibility and does so thoroughly. It discloses idempotency, dry-run behavior, per-backend gating with independent dispatch/review gates, interruption/resume semantics, MAX_CONCURRENT_AGENTS cap, and the locked-skip response. This is exceptional transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but every sentence adds essential behavioral context. It is front-loaded with the core purpose, then progressively details gating, concurrency, and locking. There is no filler or redundancy; each clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex orchestration tool, the description covers all critical aspects: what actions are taken, idempotency, gating logic, concurrency limits, and lock behavior. The existence of an output schema covers return-value details, so nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The only parameter, plan_name, has zero schema description. The description doesn't explicitly define it, but the tool name and the phrase 'Run one orchestration tick' make it obvious that plan_name identifies the plan to advance. Given the single-parameter simplicity, this is acceptable; a baseline 4 applies due to low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a precise verb and resource: 'Run one orchestration tick' and then enumerates the specific actions (dispatch ready stories, advance through test->review->PR, adjudicate merges). It clearly differentiates from siblings like advance_all_plans (one plan vs all) and dispatch_story (single story vs orchestrated batch).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says it is idempotent and designed for repeated scheduler calls, and describes the skip-on-lock behavior. It doesn't explicitly name alternatives (e.g., 'use advance_all_plans for all plans'), but the one-plan scope is clear from the purpose and the lock behavior.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.