Skip to content

Add efficiency metrics to analyze_trends() #78

Description

@evansenter

Problem

analyze_trends() compares current vs previous period for events, sessions, errors, and tokens - but doesn't include efficiency metrics that would answer "am I getting better at not burning context?"

Proposed Solution

Add efficiency-related metrics to the trends output:

{
    "avg_compactions_per_session": {"current": 4.2, "previous": 5.4, "change_pct": -22},
    "avg_files_read_multiple_times": {"current": 3.1, "previous": 4.8, "change_pct": -35},
    "avg_session_bytes": {"current": 2.1e6, "previous": 2.8e6, "change_pct": -25}
}

Value

This directly answers "are my workflow improvements working?" - the whole point of /improve-workflow.

Implementation

  1. Query get_session_efficiency() for both periods
  2. Aggregate metrics (avg compactions, avg bytes, avg files read multiple times)
  3. Calculate change percentages
  4. Add to existing trends output

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions