️ Pipeline Visualization β€” `[ResultFlow]`

Annotate any fluent pipeline with [ResultFlow] and with single-click code action ResultFlow will insert a Mermaid diagram comment so you can visualize every success path, failure branch, and typed error edge β€” zero runtime overhead, zero maintenance.

/*
```mermaid
flowchart LR
    N0_CreateUser["CreateUser<br/>User"]:::operation
    N0_CreateUser --> N1_EnsureAsync
    N1_EnsureAsync["EnsureAsync ⚑<br/>User"]:::gatekeeper
    N1_EnsureAsync -->|pass| N2_BindAsync
    N1_EnsureAsync -->|ValidationError| FAIL
    N2_BindAsync["BindAsync ⚑<br/>User"]:::transform
    N2_BindAsync -->|ok| N3_TapAsync
    N2_BindAsync -->|DatabaseError| FAIL
    N3_TapAsync["TapAsync ⚑<br/>User"]:::operation
    N3_TapAsync --> N4_MapAsync
    N4_MapAsync["MapAsync ⚑<br/>User β†’ UserDto"]:::transform
    FAIL([fail]):::failure
    classDef gatekeeper fill:#e3e9fa,color:#3f5c9a
    classDef transform fill:#e3f0e8,color:#2f7a5c
    classDef failure fill:#f8e3e3,color:#b13e3e
    classDef operation fill:#e8f4f0,color:#1c7e6f
```*/
[ResultFlow]
public Task<Result<UserDto>> RegisterAsync(RegisterCommand cmd) =>
    CreateUser(cmd)
        .EnsureAsync(IsEmailValid, u => new ValidationError("email", "invalid"))
        .BindAsync(SaveUser)
        .TapAsync(SendWelcomeEmail)
        .MapAsync(ToUserDto);

Here you can see the resulting diagram:

Full pipeline β€” all node kinds

Each operation is color-coded by semantic role: lavender = gatekeepers (Ensure), mint = transforms (Bind/Map), teal = entry-point / side effects (Tap), soft pink = failure paths. Named error types appear directly on failure edges.