PIPELINE-VALIDATION — 7-Phase Pipeline (Phase 0 → Phase 6)¶
Status: live · Version: 1.0.0 · Camada: 7 (Pipeline de Confiabilidade) Every artifact produced by an agent passes through these 7 phases before acceptance.
The 7 phases¶
| # | Phase | Owner | Output | Gate type |
|---|---|---|---|---|
| 0 | Reception | inbound agent | capsule_accepted event | schema check |
| 1 | Reality Anchor | producer agent | grounded_facts.yaml | UBT-000 truthfulness |
| 2 | Planning | producer agent | PLAN.md (per template) | DoR ≥ profile threshold |
| 3 | Automated Gates | CI / Phase-3 runner | gate report | absolute rules check |
| 4 | Execution | producer agent + skills | artifact draft | quality assertions |
| 5 | Independent Review | verification-agent (Rule 15) | REVIEW.md (APPROVED/CHANGES/REJECTED) | reviewer ≠ producer |
| 6 | Hand-off | producer agent | HANDOFF capsule + CHECKPOINT | total transfer (Rule 6) |
Phase 0 — Reception¶
Inbound capsule arrives. Validate against handoff-capsule.schema.json. Reject if:
- deadline in past
- budget exceeds receiver's hard cap
- intent_class unknown
- resource_locks unavailable
Phase 1 — Reality Anchor¶
Mandatory. Producer agent grounds outputs in observable facts before any downstream reasoning. Implements Regra Zero (NUNCA MINTA). Output: grounded_facts.yaml per the capsule's context.
UBT-000 self-test: producer asserts truthfulness; auditor-haiku verifies.
Phase 2 — Planning¶
Producer agent generates PLAN.md (see template). DoR (Definition of Ready) must pass: - 10 criteria evaluated - threshold per PROJECT_PROFILE (startup: 7/10; enterprise: 9; healthcare: 10)
Phase 3 — Automated Gates¶
Pure-function checks (no LLM):
- validate_absolute_rules(action) — 20 inviolable
- get_contextual_threshold(rule, profile) — 12 contextual
- schema validation on planned outputs
- budget check (cumulative since start of story)
Failure here = HALT, escalate to orchestrator. No correction loop at this phase.
Phase 4 — Execution¶
Producer runs skills, generates artifact. Emits checkpoint per capsule's checkpoint_policy. Quality assertions evaluated:
- linter pass
- type-checker pass
- tests pass (TDD if applicable)
Phase 5 — Independent Review¶
Verification agent (auditor-haiku or domain specialist ≠ producer) reviews using REVIEW.md template. Results: APPROVED / CHANGES_REQUESTED / REJECTED.
CHANGES_REQUESTED → Phase 4 again (Correction Loop, max 3 cycles per Rule 12). REJECTED → HALT, escalate.
Phase 6 — Hand-off¶
Producer emits final HANDOFF capsule + final CHECKPOINT. Receiver is either: - next agent in the story sequence - parent orchestrator (story complete)
Phase 6 completes the cycle. Story marked done in the task orch.
Lifecycle¶
Any phase failure with no recovery path → HALT, escalate.
Skipping phases¶
Phase 1 and Phase 4 may be reduced ("intuition active" mode, Rule 11 contextual) when: - agent has invoked the same procedure ≥ N times successfully (procedural memory) - AND no failures in last 30 days for this pattern - AND profile allows (e.g., startup profile may skip; healthcare never)
Default: all 7 phases required.
Cross-references¶
- TOKEN-BUDGET-PROTOCOL (sibling, C7) — Phase 3 budget gate
- VALIDATION-RULES (sibling, C7) — per-phase rule details
- VERIFICATION-AGENT (sibling, C7) — Phase 5 reviewer spec
- RESOURCE-LOCK-REGISTRY (sibling, C7) — Phase 0 lock check
- CONTINUATION-PROTOCOL (sibling, C7) — what to do when paused
- Templates: PLAN, CHECKPOINT, HANDOFF, REVIEW, FIX
- CONSTITUTION — the rules each phase enforces