How karanb192/itr-wala works
Purpose and Entry Points
itr-wala is a local-first AI-agent skill for preparing Indian resident individual income-tax returns for FY 2025-26 / AY 2026-27. The agent reads and interviews; deterministic Python validates inputs and calculates tax. Main entry points are installation via install.sh, skill instructions in skills/itr-wala/SKILL.md, and direct execution of skills/itr-wala/scripts/tax_engine.py against an income JSON file.
Skill-Orchestrated Filing Workflow
The skill defines the human/agent workflow: self-test, collect Form 16/AIS/26AS data, transcribe into a structured return, validate and reconcile it, calculate both tax regimes, then create a reviewable portal-filing pack. The agent is explicitly bounded from handling passwords/OTPs or performing Pay, Submit, or e-Verify actions.
Paths: skills/itr-wala/SKILL.md, skills/itr-wala/references/portal-walkthrough.md, skills/itr-wala/references/form-selector.md.
Structured Income Contract and Privacy Gate
Income is represented as a strict JSON schema rather than free-form LLM output. The validator rejects unknown or malformed fields and PAN/Aadhaar-shaped values, preventing sensitive identifiers and typoed data from reaching computation. Example data provides the executable input contract.
Paths: skills/itr-wala/scripts/validate_income.py, skills/itr-wala/scripts/ais_schema.py, skills/itr-wala/assets/example-income.json.
Document Extraction and Reconciliation Boundary
Document-derived data enters through dedicated local scripts: AIS/TIS extraction and decryption, 26AS archive parsing, and optional redaction/blind-copy workflows. This is the trust boundary between model-assisted transcription/source documents and the canonical income JSON. Validation cross-checks reported totals, especially TDS, against independent sources before calculation.
Paths: skills/itr-wala/scripts/decrypt_ais.py, skills/itr-wala/scripts/extract_tis.py, skills/itr-wala/scripts/parse_26as.py.
Deterministic Tax Computation Core
The central engine computes gross/total income, deductions, old-versus-new regime results, special-rate income, rebates and marginal relief, surcharge, cess, interest, fees, TDS adjustments, and final payable/refund. It is pinned to the supported assessment year and is intended to read JSON and emit results locally to stdout, with no third-party Python dependencies or remote tax service.
Paths: skills/itr-wala/scripts/tax_engine.py, skills/itr-wala/references/rates-fy2025-26.md, skills/itr-wala/references/capital-gains.md.
Correctness Assurance
Tax-law arithmetic is protected by hand-derived golden tests, validator tests, extraction tests, and a deterministic boundary-biased property fuzzer. The engine self-test is a required workflow stage before processing a return; GitHub Actions runs the suite on commits.
Paths: skills/itr-wala/scripts/test_tax_engine.py, skills/itr-wala/scripts/fuzz_engine.py, .github/workflows/tests.yml.
Distribution and Runtime Integration
install.sh copies the reviewed skill into Claude, Codex, Gemini, or cross-agent skill directories; it supports global/project scope and controlled fetch/pinning when not run from a checkout. Python 3.9+ and shell tooling are the material runtime dependencies. Claude plugin metadata enables marketplace installation; skills.sh is an optional external distribution channel.
Paths: install.sh, .claude-plugin/plugin.json, .agents/skills.
Main entry points: SKILL.md ITR-Wala Skill · validate_income.py Income Validator · tax_engine.py Tax Engine · example-income.json Canonical Income JSON
Components 19
Agent Workflow
- ITR-Wala Skill · Orchestrates interview, review, and portal-filing preparation without credentials or submission actions.
skills/itr-wala/SKILL.md - Portal Filing Pack · Reviewable filing guidance; payment, submission, and e-Verify remain manual.
skills/itr-wala/references/portal-walkthrough.md - ITR Form Selection
skills/itr-wala/references/form-selector.md
Local Data Boundary
- Tax Source Documents · Form 16, AIS/TIS, 26AS, and taxpayer-provided records.
- AIS and 26AS Extraction · Decrypts and parses document-derived tax data locally.
skills/itr-wala/scripts/decrypt_ais.py - TIS Extractor
skills/itr-wala/scripts/extract_tis.py - 26AS Parser
skills/itr-wala/scripts/parse_26as.py - Canonical Income JSON · Structured, identifier-safe input to validation and computation.
skills/itr-wala/assets/example-income.json - Income Validator · Rejects malformed fields, unknown fields, and PAN/Aadhaar-shaped values; reconciles reported totals.
skills/itr-wala/scripts/validate_income.py - Income Schema
skills/itr-wala/scripts/ais_schema.py
Deterministic Tax Core
- Tax Engine · Locally computes both regimes, special rates, relief, tax adjustments, payable amount, or refund.
skills/itr-wala/scripts/tax_engine.py - Tax Rules References · FY 2025-26 rates and capital-gains rules supporting the pinned assessment year.
skills/itr-wala/references/rates-fy2025-26.md - Tax Results · Deterministic calculation output for agent review and filing preparation.
Correctness
- Golden and Validator Tests · Hand-derived engine cases plus validation and extraction coverage.
skills/itr-wala/scripts/test_tax_engine.py - Boundary Property Fuzzer
skills/itr-wala/scripts/fuzz_engine.py - GitHub Actions
.github/workflows/tests.yml
Distribution
- Installer · Installs the reviewed skill into supported agent environments.
install.sh - Claude Plugin Metadata
.claude-plugin/plugin.json - Cross-Agent Skill Target
.agents/skills
Connections 23
- Installer → ITR-Wala Skill: installs
- Installer → Cross-Agent Skill Target: targets
- Claude Plugin Metadata → ITR-Wala Skill: enables marketplace install
- ITR-Wala Skill → ITR Form Selection: selects return form
- ITR-Wala Skill → Tax Source Documents: collects and transcribes
- ITR-Wala Skill → Income Validator: requires validation
- ITR-Wala Skill → Portal Filing Pack: prepares
- Tax Source Documents → AIS and 26AS Extraction: AIS input
- Tax Source Documents → TIS Extractor: TIS input
- Tax Source Documents → 26AS Parser: 26AS input
- AIS and 26AS Extraction → Canonical Income JSON: document data
- TIS Extractor → Canonical Income JSON: reported totals
- 26AS Parser → Income Validator: independent TDS check
- Income Schema → Income Validator: defines contract
- Canonical Income JSON → Income Validator: validates
- Income Validator → Tax Engine: validated income
- Tax Rules References → Tax Engine: rates and gains rules
- Tax Engine → Tax Results: emits locally
- Tax Results → Portal Filing Pack: drives review
- Golden and Validator Tests → Tax Engine: verifies arithmetic
- Boundary Property Fuzzer → Tax Engine: probes boundaries
- GitHub Actions → Golden and Validator Tests: runs on commits
- GitHub Actions → Boundary Property Fuzzer: runs on commits