Execute a Bounded Pipeline
Reproduce an improvised code-change run, then turn it into an explicit Anvia pipeline.
Failure pattern
The coding agent decides its own workflow: inspect random files, edit code, run a broad test command, summarize confidently, and stop. If the baseline was already broken or the target failure was never reproduced, the final answer still sounds complete.
Reproduce the failure
await agent.prompt("Fix invite acceptance and tell me when it is done.").send();
There is no forced order: work surface, preflight, reproduce failure, patch, verify, review packet.
Successful Anvia pattern
Use PipelineBuilder to make the coding workflow explicit.
import { PipelineBuilder } from "@anvia/core";
const codingPipeline = new PipelineBuilder<CodingTask>({
id: "invite-acceptance-fix",
name: "Invite acceptance fix pipeline",
})
.step(validateWorkSurface, { name: "Validate work surface" })
.step(runRepoPreflight, { name: "Run repo preflight" })
.step(reproduceTargetFailure, { name: "Reproduce target failure" })
.prompt(codingAgent, { name: "Prepare bounded patch" })
.step(runRequiredEvidence, { name: "Run required evidence" })
.step(buildReviewPacket, { name: "Build review packet" })
.build();
const result = await codingPipeline.run(task);
Why it succeeds
The pipeline prevents the common bad sequence: edit first, understand later. The agent cannot skip the target failure. It cannot treat a broad summary as evidence. The review packet is downstream of verification.
Successful pattern
task
-> validate work surface
-> preflight repo
-> reproduce target failure
-> prepare bounded patch
-> run required checks
-> build review packet
Success check
Each stage should answer one question:
| Stage | Question |
|---|---|
| work surface | what behavior is active? |
| preflight | is the repo in a known state? |
| reproduce | can we see the failure before patch? |
| patch | did the agent stay in scope? |
| evidence | what proves the behavior changed? |
| review packet | what should a human inspect? |
Next move
Once execution is explicit, record what happened.