Skip to content

CLI: Add compact report format for social media sharing #54

@sanggggg

Description

@sanggggg

Motivation

Users want to share their session insights on social media (Twitter/X, etc.) but current report outputs are too verbose. We need a compact, punchy format optimized for character-limited platforms with visual appeal.

User Story

As a retrochat user, I want to generate a compact report summary so that I can easily share my coding session insights on Twitter/X or other social platforms.

Requirements

Output Format

  • Character limit: ~280 characters (Twitter/X compatible)
  • Content: Top 3 scores, 1-2 key metrics, 1 standout insight
  • Visual: Emoji support for visual appeal and engagement
  • Copy-friendly: Easy to copy-paste for immediate sharing

CLI Interface

cargo run -- analyze insights --compact
cargo run -- analyze insights --format compact

Example Output

🚀 Today's Session: 85% productivity • 12 files changed • 3.2k tokens
📊 Scores: Code Quality 92 | Efficiency 81 | Learning 88
💡 Key insight: Strong refactoring with comprehensive testing
#coding #productivity

Technical Implementation

Files to Modify

  • src/cli/analytics.rs - Add compact formatting function
  • src/cli/mod.rs - Add --compact flag or --format compact option
  • src/services/analytics/models.rs - May need summary extraction helpers

Approach

  1. Add CLI argument for compact format
  2. Create format_compact_report() function
  3. Extract top 3 scores (sorted by value)
  4. Select 1-2 most impactful quantitative metrics
  5. Pick highest-priority qualitative insight
  6. Format with emojis and visual hierarchy
  7. Ensure output stays within ~280 char limit

Dependencies

  • No new dependencies needed (use existing formatting)
  • Consider emoji crate or Unicode literals for icons

Acceptance Criteria

  • --compact flag added to analyze command
  • Output is ≤280 characters
  • Includes top 3 scores
  • Includes 1-2 key metrics
  • Includes 1 standout insight
  • Uses emojis for visual appeal
  • Easy to copy-paste
  • Works with existing analytics pipeline
  • Documented in CLI help text

Related Code References

  • Current analytics output: src/cli/analytics.rs:48-120
  • Report formatting: src/cli/analytics.rs:122-200
  • CLI argument parsing: src/cli/mod.rs:30-50

Priority

Medium - Nice to have for user engagement and sharing

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions