A pipeline passes artifacts between stages

An agent pipeline is easier to control when each stage consumes a named artifact and produces a bounded output. Passing the whole conversation between stages hides assumptions and makes recovery difficult.

Use a pipeline when stages are sequential and each output can be checked before the next stage starts.

StageArtifact
DiscoverCODEBASE_INVENTORY.md or research note
PlanPLAN.md or TASK_SPEC.md
ImplementDiff and changed-file list
VerifyTest and review evidence
HandoffHANDOFF_NOTE.md

Pipeline contract

  1. Name input and output for every stage.
  2. Record the check that makes an output usable.
  3. Stop when an output is incomplete or contradictory.
  4. Keep artifacts small enough for a fresh reviewer.
  5. Resume from the last accepted artifact rather than repeating all stages.

Example pipeline

issue
  → TASK_SPEC.md
  → PLAN.md
  → diff
  → verification report
  → HANDOFF_NOTE.md

Canonical lesson source · JavaRush

Open JavaRush material