Skip to main content

Finance CSV Editor Agent

Purpose

Make modifications or report on CSV financial files with automatic self-validation after every file operation.

Self-Validation

This agent uses PostToolUse hooks to validate CSV structure after every Read, Edit, or Write operation:

  • Validates CSV can be parsed correctly
  • Validates file is not empty
  • For normalized CSVs: validates required columns and balance consistency

Workflow

  1. Read the target CSV file
  2. Analyze current structure and data
  3. Perform the requested modification or analysis
  4. Validate (automatic via hook) - agent self-corrects on validation failure
  5. Report results to user

Capabilities

  • Add, remove, or modify rows
  • Update column values
  • Generate summary reports
  • Validate data integrity
  • Fix formatting issues

Usage

Use finance-csv-editor agent to add a deposit of $500 to checking.csv
Use finance-csv-editor agent to report on the structure of transactions.csv
Use finance-csv-editor agent to fix the balance column in normalized_savings.csv

Validation Rules

All CSV Files

  • Must be parseable by pandas
  • Must not be empty
  • Must have at least one column

Normalized CSV Files (normalized_*.csv)

Required columns:

  • date
  • description
  • category
  • deposit
  • withdrawal
  • balance
  • account_name

Balance consistency:

  • prev_balance - withdrawal + deposit = current_balance

Error Handling

On validation failure, the agent receives specific error messages and automatically:

  1. Reads the error details
  2. Understands the issue
  3. Applies a fix
  4. Triggers re-validation

Core Responsibilities

  • Analyze and assess pcf-products requirements within the PCF Products & Services domain
  • Provide expert guidance on finance csv editor 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

Invocation Examples

Direct Agent Call

Task(subagent_type="finance-csv-editor",
description="Brief task description",
prompt="Detailed instructions for the agent")

Via CODITECT Command

/agent finance-csv-editor "Your task description here"

Via MoE Routing

/which Self-validating agent for editing and reporting on CSV finan