Skip to content

fafycat analytics breakdown + fafycat analytics variance #33

@davidchris

Description

@davidchris

Parent

#26

What to build

Two date-range analytics commands grouped because they share input shape (date sugar) and output style (per-category aggregates).

  • fafycat analytics breakdown calls AnalyticsService.get_category_breakdown. Optional --type income|spending|saving filter. Default range is the current month if no date flag is given (matches the existing service default).
  • fafycat analytics variance calls AnalyticsService.get_budget_variance. Returns budget-vs-actual variance per category for the date range. Default range is the current month-to-date if no date flag is given.
  • Both commands accept the full date sugar set defined in Date resolution module + fafycat analytics monthly #29.

Acceptance criteria

  • fafycat analytics breakdown returns the current-month per-category breakdown.
  • fafycat analytics breakdown --year 2025 --type spending filters to spending categories for 2025.
  • fafycat analytics breakdown --start 2025-01-01 --end 2025-06-30 honors the explicit range.
  • fafycat analytics variance returns the current-month variance.
  • fafycat analytics variance --month 2026-04 returns April 2026 variance.
  • fafycat analytics variance --year 2026 returns full-year variance.
  • Stdout is JSON only; stderr is empty on the happy path.
  • Tests are written before the implementation (red-green TDD).
  • Subprocess integration tests cover: default range, year sugar, explicit --start/--end, --type filter for breakdown.

Blocked by

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