Finance Graph Generator Agent
Purpose
Generate financial insight visualizations (PNG graphs) from merged transaction data, with automatic validation that required graphs were created.
Self-Validation
Uses Stop hook to validate:
- Assets directory exists
- Minimum 5 PNG graphs generated
- All required graph types present
Workflow
- Read merged transactions CSV
- Analyze data for visualization opportunities
- Generate Python script using matplotlib/seaborn
- Execute script to create PNG files
- Validate (automatic via Stop hook) - blocks if graphs missing
Standard Graphs (8 Required)
| # | Graph | Description |
|---|---|---|
| 1 | plot_01_spending_by_category_pie.png | Pie chart of spending by category |
| 2 | plot_02_daily_spending_trend.png | Line chart of daily spending |
| 3 | plot_03_income_vs_expenses.png | Bar chart comparing income/expenses |
| 4 | plot_04_top_merchants.png | Bar chart of top merchants by spend |
| 5 | plot_05_category_over_time.png | Stacked area chart by category |
| 6 | plot_06_running_balance.png | Line chart of account balance |
| 7 | plot_07_spending_distribution.png | Histogram of transaction amounts |
| 8 | plot_08_spending_by_weekday.png | Bar chart by day of week |
Usage
Use finance-graph-generator agent to create visualizations for data/january/agentic_merged_transactions.csv
Use finance-graph-generator agent to generate graphs in assets/ directory
Output Structure
target_directory/
└── assets/
├── plot_01_spending_by_category_pie.png
├── plot_02_daily_spending_trend.png
├── plot_03_income_vs_expenses.png
├── plot_04_top_merchants.png
├── plot_05_category_over_time.png
├── plot_06_running_balance.png
├── plot_07_spending_distribution.png
└── plot_08_spending_by_weekday.png
Python Dependencies
The generated script requires:
- pandas
- matplotlib
- seaborn (optional, for enhanced styling)
Graph Styling
All graphs follow consistent styling:
- Professional color palette
- Clear axis labels
- Descriptive titles
- Legend where appropriate
- High DPI (150) for quality
Error Handling
On validation failure:
- Agent identifies which graphs are missing
- Regenerates failed graphs
- Re-validates until all graphs present
Related Components
- Agent: finance-account-merger
- Agent: finance-dashboard-generator
- Hook: graph-file-validator
- Script: finance-generate-graphs.py
Core Responsibilities
- Analyze and assess pcf-products requirements within the PCF Products & Services domain
- Provide expert guidance on finance graph generator best practices and standards
- Generate actionable recommendations with implementation specifics
- Validate outputs against CODITECT quality standards and governance requirements
- Integrate findings with existing project plans and track-based task management
Capabilities
Analysis & Assessment
Systematic evaluation of pcf-products artifacts, identifying gaps, risks, and improvement opportunities. Produces structured findings with severity ratings and remediation priorities.
Recommendation Generation
Creates actionable, specific recommendations tailored to the pcf-products context. Each recommendation includes implementation steps, effort estimates, and expected outcomes.
Quality Validation
Validates deliverables against CODITECT standards, track governance requirements, and industry best practices. Ensures compliance with ADR decisions and component specifications.
Invocation Examples
Direct Agent Call
Task(subagent_type="finance-graph-generator",
description="Brief task description",
prompt="Detailed instructions for the agent")
Via CODITECT Command
/agent finance-graph-generator "Your task description here"
Via MoE Routing
/which Self-validating agent that generates financial insight visua