Agent Pipelines

Which sensors run, which eval scores the result, and where the gate sits, from command to artifact. Pipeline and Stages describes the stages, Sensors and Evals describe the two kinds of feedback.

The loop every stage runs

The agent writes the artifact under .claude/runtime/outputs/. Sensors check it deterministically through the committed runner, pass or fail, no score. Then a judge that did not write the artifact answers the rubric's yes/no checks in .claude/agents/{agent}/evals/*.md.

The judge is the one picked with /hk:eval jev | local: a fresh Claude evaluator that gets only the artifact and rubric paths, or Jev, which escalates to Claude when unsure on a deciding check. eval-score.py recomputes the weighted total and refuses a judge whose arithmetic or keys do not match. Below 8.0 the agent regenerates only the failed checks, up to 3 attempts, then returns a blocker. On pass it appends <!-- approved: {YYYY-MM-DD} score={weighted-total} -->, the marker the next stage checks. Details in Evals.

sequenceDiagram
    participant A as agent
    participant S as sensors
    participant J as judge (local or jev)
    participant V as eval-score.py
    A->>A: write artifact
    A->>S: run sensors
    S-->>A: pass or fail
    A->>J: artifact + rubric
    J-->>A: per-check yes/no, dimension scores
    A->>V: verify weighted total
    V-->>A: exit 0 >= 8.0, exit 1 retry, exit 2 malformed
    A->>A: approval marker, or retry failed checks (max 3)

Human gates belong to the orchestrator. /pipeline:run stops at two: approve the direction after the PRD, approve the PR before it opens. Stages never add their own.

Stage lookup

Stage Sensors Eval
prd prd-structure, prd-acceptance-criteria prd-quality, prd-readiness (advisory)
prp prp-structure, prp-context-quality, prp-links prp-quality, prp-context-readiness
plan plan-structure plan-quality
dev code-conventions, test-coverage, dev-structure dev-quality
test test-structure test-quality, approved only on exit code 0
pr pr-structure pr-quality
design design-structure, design-rigor design-quality
review design-structure (review variant) design-review-depth

Artifacts land at .claude/runtime/outputs/pm/{prd,prp}/{feature_id}.md, .claude/runtime/outputs/sse/{plan,dev,test,pr}/{feature_id}.md, and .claude/runtime/outputs/architect/{design,review}/{feature_id}.md.

product-manager

/product-manager:run runs prd then prp. Inputs come from the intake artifact, so the agent does not stop to ask. pre-prp-check.sh refuses to start the PRP without an approved PRD.

prd-readiness is advisory and never blocks. prp-context-readiness is the handoff gate: it passes only when every structural sensor passed, shippable is yes or partial, there are at most 2 blocking questions, and one_shot_likelihood >= 0.7. A passing PRP is marked ready-for-handoff.

staff-software-engineer

/sse:run runs plan, dev, test, pr. It reads the latest approved PRP, detects the area skill (backend, web, mobile, devops) from the repo files, and adds the designer skill when the work is a new UI.

dev gates twice: code-conventions and test-coverage run on the code after each implementation step, then dev-structure and dev-quality run on the written summary. Failing tests are never retried automatically; the agent returns a blocker with the failing test names. /sse:run --local stops after test. Otherwise pr runs gh pr create --draft, scores pr-quality, and /sse:pr-monitor polls until the merge clears the pipeline state.

The SDD variant

/sse:sdd plans once, then loops dev, test, and a supervisor eval up to 3 iterations. It is local only and never opens a PR. The prp-has-acceptance-criteria sensor runs first and blocks the run on failure.

The supervisor eval, spec-satisfied, always runs on Claude in a fresh session that gets the PRP, the dev summary, the test report, and git diff main...HEAD. Every bullet under Success criteria (verifiable) must be met by code and a test, and every command in Validation gates must exit 0. FAIL returns next_iter_focus, passed to the next /sse:dev --focus. Hitting the cap means the spec and the code disagree.

system-architect

/system-design:run runs design then review. It is an optional front stage before the PRP, outside the golden path. It routes to a topic skill (url-shortener, rate-limiter, search-engine) when the problem matches one, and to the generic design skill otherwise.

The agent has no hooks and no sensor runner; it applies its sensor rules itself, so it ports to any tool that reads AGENTS.md. The review answers the 10 staff questions skeptically and returns ship, revise, or block. A block verdict is terminal: the design is not marked ready and the run surfaces the blockers.

Related

Pipeline and Stages, Sensors, Evals, Agents, Golden Path, System Design Method.

This page mirrors Agent Pipelines in the wiki. Edit it there.