Documentation Index
Fetch the complete documentation index at: https://docs.trykode.xyz/llms.txt
Use this file to discover all available pages before exploring further.
kode stats reads the JSONL audit log written by kode verify and kode loop and prints a rich summary of your project’s verification health. You get overall pass and fail rates, a ranked list of the most problematic files, a breakdown of which gate types are failing most often, a per-model usage table, and a visual daily trend chart — all from the terminal without leaving your workflow.
Synopsis
What it does
kode stats opens <cwd>/logs/kode.log (or the directory you specify with --log-dir), parses each JSONL line as an audit entry, and computes:
- Overall totals — total verifications run, pass count, fail count, pass rate, and average verification duration.
- Failure type breakdown — which gate names are failing most frequently, sorted by count.
- Most failed files — the source files that appear in failure records most often (top N, configurable).
- Model usage — which LLM models were used and how many verifications each drove.
- Daily trend — a text bar chart of pass/fail counts for each of the last N days, so you can see whether verification health is improving or degrading over time.
- Recent verdicts — a one-line sparkline of the last 20 verification results using
✓and✗.
Flags
Directory containing
kode.log. Kode looks for a file named kode.log inside this directory. Use this flag if your audit log is in a non-standard location.Number of top-failing files to display in the “Most Failed Files” section.
Number of days to include in the daily trend chart. Entries older than this window are parsed for aggregate totals but excluded from the chart.
Example output
Audit log format
Every run ofkode verify or kode loop appends a JSONL entry to logs/kode.log. Each line is a self-contained JSON object:
failures map uses gate names as prefixes (e.g. syntax:, imports:, security:, architecture:), which is how kode stats builds the failure type breakdown.
kode stats reads the log but never modifies it. You can safely run it in CI or in a watch loop without risk of corrupting the audit trail. To reset your statistics, delete or rotate logs/kode.log manually.Interpreting the results
- Pass rate below 70% — your prompts are likely too broad or the blast radius limit is too tight for the task size. Try using
kode plan --packetto give the LLM better context. syntaxfailures dominate — the LLM is producing malformed code. Consider switching to a stronger model or reducing task scope.securityfailures on the same file repeatedly — that file may have a pre-existing vulnerability pattern. Review it manually and consider adding an inline suppression annotation.- Blast radius failures — your
max_blast_radiusinkode.jsonmay be too conservative for the task. Increase it or break the task into smaller steps.