Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion home/.claude/agents/improve-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

```
Expand Down Expand Up @@ -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?**
```
Expand Down