Diagnosing TraceDecay analytics
SkillDatabases & dataUse when checking TraceDecay adoption or telemetry health — usage analytics, silent hooks, stale hook logs, or empty analytics tables. Uses the analytics, doctor, and sessions CLI, never raw database queries.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Diagnosing TraceDecay analytics skill
What this skill tells your AI
The instructions your AI receives, as published by scriptedalchemy/tracedecay in plugin/skills/diagnosing-analytics/SKILL.md and read by ahel’s review.
TraceDecay records three telemetry streams: durable analytics_events in the
user-level global store (mcp_tool_call rows from the MCP server,
hook_route rows from daemon routing, and hook_<agent> rows bridged from
hook logs), append-only hook_analytics.jsonl files (one per project store
plus a user-level fallback for hooks that could not resolve a project), and
the per-project session store used for message-level usage. Adoption and
health questions are answered from the durable table — never by opening
store databases directly.
Commands
tracedecay analytics diagnostics— the one-stop summary. Imports any new hook-log rows into the durable table first, then prints event, tool, and hook counts, the TraceDecay tool-call count, per-tool/per-hook rollups,hook_sourceswith per-file row counts, and usage ratios. Flags:--all(every project, not just the current one),--no-sync(skip the import pass; read-only). Use the read-only MCP twintracedecay_analyticswhen the answer should be returned inside an agent tool call instead of a shell command.tracedecay analytics sync— run only the hook-log import and report how many rows each source contributed.tracedecay doctor— per-agent install health: hook registration, MCP config, binary staleness. Run this first when a hook seems silent (Codex hooks may exist but stay skipped until trusted in Codex's own hooks approval prompt).tracedecay tool lcm_status --provider all --jsonandtracedecay tool lcm_doctor --provider codex --mode diagnose --json— session-store ingest and compression health per provider.tracedecay sessions search "mcp__tracedecay" --provider all— find tool usage evidence inside ingested transcripts across providers.tracedecay gain/tracedecay cost— token savings ledger and spend rollups.- Dashboard:
tracedecay dashboardserves the same summaries at/api/plugins/analytics/overview|diagnostics|usage|hints.
Reading the diagnostics output
source: "analytics_events"means durable data answered; asession_messages_and_hook_analyticssource means no durable events matched and the summary fell back to hook logs only.hook_sourceslists each hook-log file withrows_totalvsrows_included. A large gap means rows written before project attribution existed; they are visible under--allbut cannot be assigned to a project.rows_malformed/first_malformed_lineshow JSONL corruption that the reader skipped and should usually be investigated as a concurrent append bug.project_id: nullmeans the command ran outside an indexed project and reported globally. Run from an indexed project root for per-project scope, or pass--alldeliberately.import.importedgreater than zero means a hook-log backlog was just bridged — re-read the counts, they include it.- A high hook-call count with a low TraceDecay tool-call count is an adoption gap:
hooks fire, but sessions are not using tracedecay tools. Check
by_prompt_categoryto see which task types miss it.
Guardrails
- A zero-row
analytics_eventstable inside a project store is not evidence that telemetry is broken — durable events live in the user-level store. Runtracedecay analytics diagnosticsbefore concluding anything is dead. - Never query store databases with sqlite3 or scripts; schemas are internal. The diagnostics JSON already merges every relevant source.
- If the MCP transport is down, every command above still works — they are
plain CLI subcommands (see
tracedecay:using-the-cli).
If tools are deferred or MCP fails
- This skill is already CLI-first: the
tracedecay analytics/doctor/sessionssubcommands run over shell and need no MCP transport. - The
tracedecay tool lcm_status/lcm_doctorcalls also work via MCP; if those tools are deferred, load once with ToolSearch —select:tracedecay_lcm_status,tracedecay_lcm_doctor— or just use the CLI form shown above (seetracedecay:using-the-cli).
Deliverable
Do not end this workflow without: headline counts (events, MCP tool calls,
tracedecay calls, hook calls) with the exact command used, plus any gaps
found: unattributed hook rows, stale or missing sources, providers with hooks
firing but zero tool usage. Report any tracedecay_metrics: line to the user.
Signals
- GitHub stars
- 73
- Forks
- 5
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
diagnosing-analytics- Source
- github.com/scriptedalchemy/tracedecay