# Examples

Each pair (`*.pipeline.json` + `*.rendered.html`) is a self-contained proof that
a specific combination of pipeline features validates and renders correctly.
Open any `.rendered.html` directly in a browser — no server needed.

---

## pedidos-pendentes

**Rule:** "Flag orders that have been pending for more than 3 days."

| Property | Value |
|----------|-------|
| `source_type` | `doc` — extracted from a business description, no code |
| `data_origin` | `synthetic` — 20 records generated to cover all branches |
| Steps | `filter` → `filter` |
| Confidence | all `confirmed` (rule is unambiguous in the source doc) |

**What this proves:** the simplest valid pipeline — two consecutive filters,
count chain enforced, no optional fields required. Baseline coverage for
schema v2 + count-chain validator + viewer rendering.

---

## triagem-leads

**Rule:** "Score and assign inbound leads; notify each responsible sales rep."

| Property | Value |
|----------|-------|
| `source_type` | `doc` — extracted from a qualification playbook |
| `data_origin` | `synthetic` — 18 leads covering email/score/region edge cases |
| Steps | `filter` → `transform` → `group` → `lookup` → `action` |
| Confidence | all `confirmed` |

**What this proves:** all five `step_type` values in one pipeline.
Covers the unit-change boundary (`group` changes what `output_count` counts),
the `lookup` enrichment pattern, and the `action` step with `result_from`
in `final_result`. Full validator + viewer coverage for every step renderer.

---

## collection-queue

**Rule:** Code in `src/billing/collection-queue.js` that builds a prioritized
collection queue from overdue contracts.

| Property | Value |
|----------|-------|
| `source_type` | `code` — static analysis of a real JS function |
| `data_origin` | `synthetic` — 16 contracts covering all three filter conditions |
| Steps | `filter` → `transform` → `filter` |
| Confidence | all `assumed` — three magic numbers (5 days, ×1.2, ÷200, threshold 50) have no comments or config references in the source |

**What this proves:** the `source_type: "code"` path, the `confidence` field
on every step type, amber visual signaling in the viewer (`~assumed` badge +
left border), and `confidence_note` explaining each uncertainty. The uniform
amber across all three steps is intentional: the signal accurately reflects
that the entire pipeline rests on undocumented thresholds.
