Summary
Add session analytics data to /status-report to provide richer context about work patterns, session health, and Claude Code usage beyond GitHub state.
Problem / Motivation
The current /status-report focuses on GitHub state (PRs, issues, worktrees, event bus). While useful for understanding what's open and merged, it misses:
- Session health: Error rates, rework patterns that indicate friction
- Tool usage: What tools are being used most, command patterns
- Permission gaps: Commands that should be added to settings.json
The claude-session-analytics MCP server now provides these signals via:
get_session_signals() - raw session metrics
get_tool_frequency() - tool usage counts
get_permission_gaps() - commands needing permissions
Context
Proposed Solution
Add a new section to /status-report that queries session-analytics MCP tools and displays raw signals. Per RFC #17, we pass raw data and let the LLM generating the report interpret meaning.
New Section: Session Analytics
### Session Analytics (7 days)
**Overview**
| Metric | Value |
|--------|-------|
| Sessions | 12 |
| Events | 2,847 |
| Errors | 41 (1.4%) |
**Recent Sessions** (top 5 by event count)
| Session | Events | Errors | Commits | Flags |
|---------|--------|--------|---------|-------|
| abc123 | 450 | 2 (0.4%) | 3 | PR |
| def456 | 120 | 15 (12.5%) | 0 | rework |
**Top Tools** (last 7 days)
Read (892), Edit (341), Bash (298), Grep (156)
**Permission Gaps** (commands to add to settings.json)
| Command | Count | Suggestion |
|---------|-------|------------|
| npm test | 23 | Bash(npm test:*) |
| cargo clippy | 18 | Bash(cargo clippy:*) |
Graceful Degradation
If session-analytics MCP is unavailable:
- Try CLI fallback:
session-analytics-cli status --json
- If that fails, skip section with note: "Session analytics unavailable"
Integration with Recommendations
The LLM can use raw signals to inform recommendations:
- High error rate in a session → suggest investigating
- Permission gaps → suggest adding to settings.json
- Rework patterns → note potential friction
Important: The analytics section provides raw data. The LLM interprets it contextually when generating recommendations - no pre-baked conclusions.
Assumptions
| Assumption |
Confidence |
Impact if Wrong |
| session-analytics MCP available |
High |
Section skipped gracefully |
| CLI fallback works |
High |
Can shell out if MCP fails |
| Data is fresh (<5min) |
High |
Auto-refresh built into queries |
Open Questions
- Project filter: Should we filter to current project only, or show cross-project data?
- Time window: Default to 7 days, or make configurable?
Actionable Requirements
| # |
Requirement |
Owner |
Blocked By |
| 1 |
Add session-analytics MCP calls to status-report.md |
Claude |
None |
| 2 |
Format raw signals in readable tables |
Claude |
#1 |
| 3 |
Add graceful fallback if analytics unavailable |
Claude |
#1 |
| 4 |
Update recommendation logic to consider signals |
Claude |
#2 |
Implementation Checklist
🤖 Generated with Claude Code
Summary
Add session analytics data to
/status-reportto provide richer context about work patterns, session health, and Claude Code usage beyond GitHub state.Problem / Motivation
The current
/status-reportfocuses on GitHub state (PRs, issues, worktrees, event bus). While useful for understanding what's open and merged, it misses:The
claude-session-analyticsMCP server now provides these signals via:get_session_signals()- raw session metricsget_tool_frequency()- tool usage countsget_permission_gaps()- commands needing permissionsContext
~/.claude/commands/status-report.mdProposed Solution
Add a new section to
/status-reportthat queries session-analytics MCP tools and displays raw signals. Per RFC #17, we pass raw data and let the LLM generating the report interpret meaning.New Section: Session Analytics
Graceful Degradation
If session-analytics MCP is unavailable:
session-analytics-cli status --jsonIntegration with Recommendations
The LLM can use raw signals to inform recommendations:
Important: The analytics section provides raw data. The LLM interprets it contextually when generating recommendations - no pre-baked conclusions.
Assumptions
Open Questions
Actionable Requirements
Implementation Checklist
mcp__session-analytics__get_status()checkmcp__session-analytics__get_session_signals(days=7)callmcp__session-analytics__get_tool_frequency(days=7)callmcp__session-analytics__get_permission_gaps(days=7)call🤖 Generated with Claude Code