|
| 1 | +# CLAUDE.md - Tax Automation Agent (Gemini / Google Cloud Agent Builder) |
| 2 | + |
| 3 | +## Project Overview |
| 4 | +This repository contains a functional, multi-step autonomous agent powered by Gemini and Google Cloud Agent Builder. The agent streamlines personal tax workflows by integrating State Management, Google Workspace (Gmail, Calendar, Drive, Sheets), and a deterministic tax calculator supporting ITR-1 and ITR-2 forms. |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +## System Workflow & Tool Execution |
| 9 | + |
| 10 | +### 1. State Management (Mandatory First Step) |
| 11 | +- **Rule:** Before initiating *any* task, the agent must query the State Management MCP server to check current task flags, execution history, and unmet dependencies. |
| 12 | +- **Rule:** The agent state is strictly isolated. State transitions must be written immediately back to the State Management MCP upon step completion. |
| 13 | + |
| 14 | +### 2. Communication & Document Pipeline |
| 15 | +- **Google Drive:** Used as the primary shared medium for all file tasks (e.g., document uploads, PDFs). |
| 16 | +- **Google Sheets:** Acts as the interaction UI for unvouched transaction values (real estate amounts, gold deals, etc.). |
| 17 | +- **Gmail & Calendar:** Used strictly for sending verification requests, action reminders, and file upload prompts to the user. |
| 18 | + |
| 19 | +### 3. Deterministic Tax Calculator (ITR-1 & ITR-2) |
| 20 | +- **Constraint:** The tax calculator tool must only be executed after the agent confirms via the State Management MCP that all user inputs and documentation requirements are fully met. |
| 21 | +- **Data Grounding:** For all tax-related logic, parameters, and computations, the system must strictly rely on the official government data source: https://www.incometaxindia.gov.in/ (it should be deterministic and should not use an ai agent) |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +## Security & Data Protection Guardrails |
| 26 | + |
| 27 | +### 1. PII Anonymization (Gateway Pattern) |
| 28 | +- **Data Isolation:** The agent must never ingest raw personally identifiable information (PII). |
| 29 | +- **Inbound Data:** All data coming from Google Sheets/Drive must pass through the local gateway logic to replace names, PANs, and tracking info with synthetic tokens. |
| 30 | +- **Outbound Data:** The agent generates outputs using synthetic tokens. The local execution layer reconstructs the personal data immediately prior to final Google Sheet/Gmail updates. |
| 31 | + |
| 32 | +### 2. Authorization Limits |
| 33 | +- **Strict Scope:** The agent is forbidden from executing tasks outside the predefined State Management workflow. |
| 34 | +- **Zero Drift:** If an ambiguous step is encountered, the agent must halt execution and issue a clarification request via Gmail. |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## Development Environment & Resources |
| 39 | +- **Tech Stack:** Gemini API, Google Cloud Agent Builder, Node.js/Python, MongoDB. |
| 40 | +- **Credentials:** All runtime configurations, MongoDB connection uris, and Google OAuth keys are read strictly from the root `.env` file. Never commit these keys. |
| 41 | +- **License:** Distributed under an open-source license. Ensure the license file remains visible in the repository's About section. |
0 commit comments