{% extends "base.html" %} {% block title %}Health{% endblock %} {% block content %}

Library Health

Deterministic metrics snapshot — coverage, complexity, churn, docs gates, and hygiene counts. No LLM judgment layer here; see the latest narrative report below.

{% if not snapshot %}

No snapshot collected yet.

Run python -m attune.ops.health_snapshot, or click Refresh below — a background collection just started.

{% else %} {% set signals = snapshot.signals %}

Collected {{ snapshot.collected_at }} {% if stale %} stale {% else %} fresh {% endif %} {% if refreshing %} refreshing… {% endif %}

Coverage
{% if signals.coverage.status == "ok" %}
{{ signals.coverage.value.coverage_percent }}%
Codecov, main
{% else %}
unavailable
{% endif %}
Avg complexity
{% if signals.complexity.status == "ok" %}
{{ signals.complexity.value.avg_rank }} ({{ signals.complexity.value.avg_complexity }})
{{ '{:,}'.format(signals.complexity.value.blocks) }} blocks
{% else %}
unavailable
{% endif %}
D-or-worse blocks
{% if signals.complexity.status == "ok" %}
{{ signals.complexity.value.d_or_worse_count }}
radon complexity ratchet
{% else %}
unavailable
{% endif %}
Churn (90d)
{% if signals.churn.status == "ok" %}
{{ '{:,}'.format(signals.churn.value.total_changes) }}
file-changes under src/
{% else %}
unavailable
{% endif %}
TODO markers
{% if signals.todos.status == "ok" %}
{{ signals.todos.value.count }}
real comments only, src/
{% else %}
unavailable
{% endif %}
Open PRs / issues
{% if signals.open_prs_issues.status == "ok" %}
{{ signals.open_prs_issues.value.open_prs }} / {{ signals.open_prs_issues.value.open_issues }}
via gh CLI
{% else %}
unavailable
{% endif %}
SLOC
{% if signals.sloc.status == "ok" %}
{{ '{:,}'.format(signals.sloc.value.src_lines) }}
{{ '{:,}'.format(signals.sloc.value.src_files) }} files
{% else %}
unavailable
{% endif %}
Tests
{% if signals.sloc.status == "ok" %}
{{ '{:,}'.format(signals.sloc.value.test_function_count | default(0)) }}
{{ '{:,}'.format(signals.sloc.value.test_files) }} files {%- if signals.sloc.value.test_to_src_ratio %} · {{ signals.sloc.value.test_to_src_ratio }}:1 LOC ratio{% endif %}
{% else %}
unavailable
{% endif %}

Docs & single-source gates

GateResult
doc-import audit {% if signals.doc_import_audit.status == "ok" %} {% if signals.doc_import_audit.value.clean %}clean {% else %}findings (exit {{ signals.doc_import_audit.value.exit_code }}){% endif %} {% else %}unavailable{% endif %}
docs wiring audit {% if signals.docs_wiring_audit.status == "ok" %} {% if signals.docs_wiring_audit.value.clean %}clean {% else %}findings (exit {{ signals.docs_wiring_audit.value.exit_code }}){% endif %} {% else %}unavailable{% endif %}
help completeness {% if signals.help_completeness.status == "ok" %} {% if signals.help_completeness.value.clean %}clean {% else %}findings (exit {{ signals.help_completeness.value.exit_code }}){% endif %} {% else %}unavailable{% endif %}
projection drift {% if signals.projection_drift.status == "ok" %} {% if signals.projection_drift.value.findings_count == 0 %}clean {% else %}{{ signals.projection_drift.value.findings_count }} finding(s){% endif %} {% else %}unavailable{% endif %}
{% if signals.churn.status == "ok" and signals.churn.value.top_files %}

Hotspots (churn, 90d)

{% for f in signals.churn.value.top_files %} {% endfor %}
FileChanges
{{ f.path }}{{ f.changes }}
{% endif %}

{% if latest_report %} Narrative findings + ranked improvement plan (LLM-generated, not regenerated by this page): {{ latest_report }} {% else %} No LLM narrative report found under docs/reports/. {% endif %}

{% endif %} {# Environment + state files — independent of the snapshot, so it renders in BOTH branches, and lives in the content block: it was previously stranded in {% block scripts %}, which base.html renders AFTER — the section escaped the centered page container entirely (Patrick, 2026-07-21). #} {# Elicitation surface mix (#1653) — a live read of telemetry/form_events.jsonl, independent of the snapshot. Honest framing: this is the SURFACE MIX of Python-routed forms, not a fire rate — a hand-written AskUserQuestion turn never enters Python and is invisible here. #}

Elicitation surface mix

Which surface rendered each Python-routed form, read live from telemetry/form_events.jsonl. Surface mix only, not a fire rate — a hand-written AskUserQuestion turn never enters Python, so it is invisible here.

{% if surface_mix %} {% for surface, count in surface_mix | dictsort(by='value', reverse=true) %} {% endfor %}
SurfaceForms routed
{{ surface }}{{ count }}
total{{ surface_mix_total }}
{% else %}

No form routing events recorded yet.

{% endif %}

Environment

Environment + state file presence (formerly the standalone Health page).

Python{{ env.python }}
Platform{{ env.platform }}
Project root{{ env.project_root }}
attune-home{{ env.attune_home }}
attune-home exists{% if env.attune_home_exists %}yes{% else %}no{% endif %}
Telemetry log{% if env.telemetry_present %}present{% else %}absent{% endif %}
Memory dir{% if env.memory_dir_present %}present{% else %}absent{% endif %}
Sessions dir{% if env.sessions_dir_present %}present{% else %}absent{% endif %}
ANTHROPIC_API_KEY{% if env.anthropic_api_key %}set{% else %}unset{% endif %}
{% endblock %} {% block scripts %} {% endblock %}