From 728a950e8b0fb07e546d7cd4497c3add84b09fe2 Mon Sep 17 00:00:00 2001 From: Evan Senter Date: Sat, 10 Jan 2026 13:36:57 +0000 Subject: [PATCH] feat(improve-workflow): Add Phase 0 for data quality + get_error_details - Add Phase 0 to ingest logs, git commits from all projects, and correlate - Use ingest_git_history_all_projects() for cross-repo git correlation - Add get_error_details() call to drill into specific failing patterns - Note that warmup events no longer count as errors (fixed in session-analytics) Ref: evansenter/claude-session-analytics#76 Co-Authored-By: Claude Opus 4.5 --- home/.claude/agents/improve-workflow.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/home/.claude/agents/improve-workflow.md b/home/.claude/agents/improve-workflow.md index fdcc712b..3da28a60 100644 --- a/home/.claude/agents/improve-workflow.md +++ b/home/.claude/agents/improve-workflow.md @@ -16,6 +16,23 @@ Don't just run fixed queries and report numbers. Use the session-analytics MCP a 5. **Verify** - Check if the data supports the hypothesis 6. **Propose concrete fixes** - Not observations, but implementations +## Phase 0: Ensure Data Quality + +Before analysis, ensure data is fresh and complete: + +``` +# Ingest recent logs +mcp__session-analytics__ingest_logs(days=7) + +# Ingest git commits from ALL known projects (not just current repo) +mcp__session-analytics__ingest_git_history_all_projects(days=7) + +# Link commits to sessions +mcp__session-analytics__correlate_git_with_sessions(days=7) +``` + +This ensures cross-project git correlation works properly. + ## Phase 1: Gather Initial Signals ``` @@ -109,11 +126,15 @@ For each notable pattern, drill down: **High error rates?** ``` mcp__session-analytics__analyze_failures(days=7) +mcp__session-analytics__get_error_details(days=7, limit=20) ``` -Look at `error_examples` - what specific commands are failing? Are they: +Look at `error_examples` and error details - what specific commands are failing? Are they: - Typos that could be aliased? - Missing tools that could be installed? - Permission issues that need allowlist updates? +- Glob/Grep patterns that consistently fail? + +Note: Warmup events (Task tool with max_turns: 1) are no longer counted as errors. **Debugging-heavy sessions?** ```