{% macro render_ownership_table(rows) -%} {% for row in rows %} {% endfor %}
artifact_key writers (agent · writes) readers (agent · reads) versions
{{ row.artifact_key }} {% if row.append_only %}append-only{% endif %} {% if row.writers %} {% for agent, count in row.writers %}{{ agent }} ({{ count }}){% if not loop.last %}, {% endif %}{% endfor %} {% else %} none observed {% endif %} {% if row.readers %} {% for agent, count in row.readers %}{{ agent }} ({{ count }}){% if not loop.last %}, {% endif %}{% endfor %} {% else %} none observed {% endif %} {{ row.version_range }}
{%- endmacro %} ccs-diagnose v0-preview report
{# ============================================================ #} {# Section 1 - Headline #} {# ============================================================ #}

{{ headline_label }}

{{ headline_subtitle }}

{% if is_insufficient %}

Run was too short to classify

{{ verdict_reason }}

{% else %} {% if secondary_kpi_kind == "cost" %} {% if cost_unmeasurable_reason %}

Rework cost: unmeasurable

{{ cost_unmeasurable_message }}

{% else %}

Rework cost (annualized): {{ rework_cost_annualized_str }}

floor — does not include broadcast rebroadcasting or redundant fetches. Based on {{ rework_tokens_this_run }} tokens this run.

{% endif %} {% else %}

{{ headline_event_count }} divergence event{{ '' if headline_event_count == 1 else 's' }} affecting {{ agent_pain_count }} node{{ '' if agent_pain_count == 1 else 's' }}

agent_pain_count: distinct later_read.node values across headline events.

{% endif %} {% endif %} {% if not is_insufficient %} {# ============================================================ #} {# Section 2 - Above-the-fold panel #} {# ============================================================ #}

{% if has_events %}The Event That Matters Most{% else %}Artifact Ownership Map{% endif %}

{% if has_events and top_event %}

Forensic mini-timeline of the highest-impact divergence event. Field names follow ReadObservation semantics — runtime "handed" the node a value at this version, not "node read" attribution.

artifact_key: {{ top_event.artifact_key }}

earlier_read: node={{ top_event.earlier_read.node }} tick={{ top_event.earlier_read.tick }} version={{ top_event.earlier_read.version }}

later_read: node={{ top_event.later_read.node }} tick={{ top_event.later_read.tick }} version={{ top_event.later_read.version }}

{% if top_event.canonical_writer %}

canonical_writer: {{ top_event.canonical_writer }} (tick {{ top_event.canonical_writer_tick }}) — most recent observed writer at later_read.tick

{% endif %} {% if top_event.is_sequential_staleness %}

classification: sequential_staleness (promoted to headline by --strict)

{% endif %}
{% else %}

No headline divergence events were observed. The map below shows every tracked artifact's writers and readers as observed during the run. Multi-writer rows are highlighted — these are the shared_artifact shape at the artifact level even when no individual divergence event was caught.

{{ render_ownership_table(ownership) }} {% endif %} {# ============================================================ #} {# Section 3 - Per-Artifact Heatmap #} {# ============================================================ #} {% if show_heatmap %}

Per-Artifact Heatmap

divergent_reads is the count of distinct reads handed a version that diverged from another read of the same artifact; share is that count over total_reads. Witness-quality — a divergent handing is observed; whether the node acted on the value is unobservable. Rows are ordered with genuine multi-writer artifacts first — those are the coordination signal. A high share on a single-writer artifact is usually expected pipeline ordering (readers handed the pre-write value), not a coordination gap. The Event That Matters Most panel above ranks by rework impact (highest divergent_reads); this table ranks by coordination signal (multi-writer first), so the two panels may highlight different artifacts.

{% for row in heatmap_rows %} {% endfor %}
artifact_key writers divergent_reads total_reads share
{{ row.artifact_key }} {% if row.writer_count > 0 %}{{ row.writer_count }}{% else %}—{% endif %} {% if row.is_multi_writer %}multi-writer{% elif row.writer_count == 1 %}pipeline ordering{% endif %} {{ row.divergent_reads }} {{ row.total_reads }} {% set pct = (row.divergent_reads * 100 / row.total_reads) if row.total_reads > 0 else 0 %} {% set bar_pct = 100 if pct > 100 else pct %} {{ pct|round(1) }}%
{% if show_ownership_appendix %}
All tracked artifacts (Ownership Map appendix — single-writer rows shown for completeness) {{ render_ownership_table(ownership) }}
{% endif %} {% endif %} {# ============================================================ #} {# Section 4 - Reader-Pair Matrix #} {# ============================================================ #} {% if show_reader_pairs %}

Reader-Pair Matrix

Top (earlier_read.node, later_read.node) pairs by headline divergence event count. Pair semantics are observation-only — both nodes were *handed* the artifact at different versions; whether they read it is unobservable.

{% for pair in reader_pairs %} {% endfor %}
earlier_reader later_reader events
{{ pair.earlier_reader }} {{ pair.later_reader }} {{ pair.event_count }}
{% endif %} {# ============================================================ #} {# Section 5 - Excluded panel #} {# ============================================================ #} {% if show_excluded %}

What We Excluded

{% if (not strict_mode) and exclusion_panel.sequential_staleness_count > 0 %}

Re-run with --strict to promote sequential_staleness exclusions back into the headline count.

{% endif %}
{% endif %} {% endif %} {# /not is_insufficient #} {# ============================================================ #} {# Section 6 - Tracked Artifacts (Transparency Panel) #} {# ============================================================ #}

Tracked Artifacts (Transparency Panel)

Tracked: {{ tracked_keys|length }} · Ignored: {{ ignored_framework_keys|length + ignored_ephemera_keys|length }} ({{ ignored_framework_keys|length }} framework, {{ ignored_ephemera_keys|length }} ephemera) · Append-only: {{ append_only_keys|length }} · Mutable: {{ mutable_keys|length }}

{% if tracked_keys %}

tracked

{% for key in tracked_keys %}{{ key }}{% if not loop.last %} {% endif %}{% endfor %}

{% endif %} {% if append_only_keys %}

append-only

{% for key in append_only_keys %}{{ key }}append-only{% if not loop.last %} {% endif %}{% endfor %}

{% endif %} {% if ignored_framework_keys %}

ignored — framework

{% for key in ignored_framework_keys %}{{ key }}{% if not loop.last %} {% endif %}{% endfor %}

{% endif %} {% if ignored_ephemera_keys %}

ignored — ephemera

{% for key in ignored_ephemera_keys %}{{ key }}{% if not loop.last %} {% endif %}{% endfor %}

{% endif %}
{% if unknown_underscore_keys %}
Staleness sensor: the run surfaced {{ unknown_underscore_keys|length }} unknown __-prefixed key{{ '' if unknown_underscore_keys|length == 1 else 's' }} not in the v0-preview framework allow-list. v0 ignores them safely; the calibration corpus tracks them so future versions add explicit handling.

Detected: {% for key in unknown_underscore_keys %}{{ key }}{% if not loop.last %} {% endif %}{% endfor %}

{% endif %} {# ============================================================ #} {# Section 7 - Coverage #} {# ============================================================ #}

Coverage

{{ coverage.tick_count }} turns · {{ coverage.read_count }} reads · {{ coverage.write_count }} writes · {{ coverage.artifact_count }} artifacts · {{ confidence_label }} confidence

Thresholds for high confidence: tick_count >= {{ coverage_thresholds.tick_count }}, read_count >= {{ coverage_thresholds.read_count }}, write_count >= {{ coverage_thresholds.write_count }}.

{# ============================================================ #} {# Section 8 - What This Report Does NOT Measure (mandatory) #} {# ============================================================ #}

What This Report Does NOT Measure

{# ============================================================ #} {# Section 9 - What This Report Cannot Tell You (mandatory) #} {# ============================================================ #}

What This Report Cannot Tell You

{# ============================================================ #} {# Section 10 - CTA (variant-selected) #} {# ============================================================ #}

Next Step

{% if cta_variant == "warm_lead" %}

For our call, two questions I'd love your read on:

  1. {{ warm_lead_questions[0] }}
  2. {{ warm_lead_questions[1] }}
{% elif cta_variant == "cold_lead" %}

30-min walk-through — I'll trace your top-3 divergence events live.

Book a 30-min call

{{ soft_ask_message }}

Or reply to {{ contact_email }}.

{% elif cta_variant == "forward_looking" %}

Zero divergence events in this run. If any of these are on your roadmap, the conversation is worth having before you build:

    {% for trigger in upgrade_triggers %}
  1. {{ trigger }}
  2. {% endfor %}

Book a 30-min call

{{ soft_ask_message }}

{% else %} {# insufficient #}

Run was too short to classify — coverage shape: {{ coverage.tick_count }} ticks / {{ coverage.read_count }} reads / {{ coverage.write_count }} writes. Re-run on a longer workload, or schedule a 15-min call to discuss what shape would tell us something: {{ book_a_call_url }}.

{% endif %}