feat(analytics): durable adoption analytics, diagnosing-analytics skill, hook replay test, Claude schema validation - #260
Merged
Conversation
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
ScriptedAlchemy
force-pushed
the
feat/analytics-adoption-diagnostics
branch
2 times, most recently
from
July 3, 2026 23:16
9b98fe0 to
e86a876
Compare
Adoption telemetry was split and partly unreadable: the only writer of analytics_events targets the user-level global DB (the per-project copy is schema-only), hook_analytics.jsonl splits between the project store and the user-level fallback with no attribution, dashboard diagnostics read only the project-store file, and there was no CLI to answer adoption questions. - hooks: stamp project_root/event_cwd on hook analytics rows; resolve the project root in Claude preToolUse (event cwd, then process cwd) and the Kiro hooks instead of hardcoding None - dashboard: diagnostics merges the project-store and user-level hook files (user-level rows filtered by attribution) and reports hook_sources - analytics_bridge: idempotent hook-JSONL -> analytics_events import using parse_offsets byte cursors; partial trailing lines stay unconsumed - cli: new `tracedecay analytics diagnostics [--all|--no-sync]` and `tracedecay analytics sync` - plugin: new diagnosing-analytics skill teaching the analytics/doctor/ lcm_status/sessions surface; added to CURSOR_PLUGIN_SKILLS - tests: end-to-end hook replay driving all four providers' hook subcommands through the binary and asserting JSONL attribution plus durable bridging; vendored Claude Code schemas (hooks/plugin/marketplace) with positive and negative validation, closing the gap where only Cursor/Codex configs were schema-checked Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ScriptedAlchemy
force-pushed
the
feat/analytics-adoption-diagnostics
branch
from
July 3, 2026 23:24
e86a876 to
e9b75f3
Compare
ScriptedAlchemy
added a commit
that referenced
this pull request
Jul 3, 2026
Working-tree twin of PR #260 (feat/analytics-adoption-diagnostics) so this branch carries the same analytics work: hook-row project attribution, merged hook JSONL diagnostics with hook_sources, the analytics_bridge hook-JSONL -> analytics_events import, the `tracedecay analytics` CLI (diagnostics/sync) with rich help, the diagnosing-analytics plugin skill, the provider hook replay E2E test, and vendored Claude Code schema validation (hooks/plugin/marketplace). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 3, 2026
Merged
ScriptedAlchemy
added a commit
that referenced
this pull request
Jul 4, 2026
Return raw JSON envelopes from the fact_store and fact_feedback memory write handlers instead of markdown-rendered output. After the markdown default output change, these write-path handlers rendered their status JSON as markdown, which interfered with the memory digest export lifecycle. A new `tool_json` helper emits the truncated JSON envelope (with project handle) directly; `handle_memory_status` continues to use the rendered path. Recovered from a stranded worktree whose stale rebase base had reverted unrelated master work (PR #258/#260 agent-surface changes); only the genuine memory.rs fix is carried forward here, rebuilt cleanly on current origin/master. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Investigating "is TraceDecay actually being used?" surfaced four structural problems:
analytics_eventslooked dead but wasn't. The only writer targets the user-levelglobal.db; the per-projectsessions.dbcarries the same schema with no writer, so anyone inspecting the project store concludes telemetry is broken.~/.tracedecay/hook_analytics.jsonlwhen they can't (ClaudepreToolUseand all Kiro hooks hardcodedNone). Rows carried no project field, so the split streams could never be re-joined.tracedecay analytics …didn't exist, and nothing taught agents which surface to use.What
project_root/event_cwd; ClaudepreToolUseresolves the root from the event cwd then the process cwd, and the three Kiro hooks resolve from the event cwd.hook_sourceslist with per-file row counts.analytics_bridge— idempotent hook-JSONL →analytics_eventsimport usingparse_offsetsbyte cursors; partial trailing lines stay unconsumed for the next run.tracedecay analytics diagnostics [--all|--no-sync](imports, then prints the same summary the dashboard serves) andtracedecay analytics sync.diagnosing-analyticsteaches agents the analytics/doctor/lcm_status/sessions surface and its guardrails (never raw sqlite); added toCURSOR_PLUGIN_SKILLS.analytics syncbridges every row intoanalytics_events.hooks.json,plugin.json, andmarketplace.jsonwith positive + negative tests, closing the gap where only Cursor/Codex configs were schema-checked.docs/PLUGIN-VALIDATION.mdtable updated.Verification
analytics_eventsand the diagnostics command now answers adoption questions in one shot.🤖 Generated with Claude Code