Gemini AI and I Just Rewrote the U.S. Tax Code

This is Part 3 of a three-part series on using an AI agent to reduce and simplify regulation—specifically, the tangled web of the U.S. tax code.
Previous posts for context:

  1. America’s Tax Code: A Hot Mess by Design
  2. Cracking the Code: AI-Driven Tax Code Analysis

Today’s post dives into the results:
✅ Every one of the 2,142 active sections was reviewed.
✅ The total size of the code was reduced by 60%—from over 7,000 pages to around 2,800.

Simplifying the tax code.


Tools, Not Sledgehammers

This wasn’t brute force deletion. The AI agent worked surgically, equipped with:

  • Editing tools to simplify or redraft sections
  • Complexity estimation models
  • A running ledger tracking progress toward shrinking the code while maintaining revenue neutrality
  • Historical tracking of every edit made
  • A calculator for impact estimates

Over the course of two days, the agent analyzed and edited section by section, applying four possible actions: keep, simplify, redraft, or delete.


Examples of Major Changes

🛡️ Keep (288 times)

Section 1: Individual Tax Rates
Section 1 defines America’s core progressive tax brackets. Too fundamental (and sprawling) to casually rewrite, the agent smartly recommended keeping it intact for now, deferring a deeper overhaul to future iterations.

✍️ Redraft (1,041 times)

Section 1031: Like-Kind Exchanges
Originally a maze of archaic phrasing, this key provision governing property exchanges was redrafted for clarity and structure. Given its major tax implications, a clean modernization was critical.

✂️ Simplify (552 times)

Section 11: Corporate Income Tax
Simplified without touching the structure: Gemini AI clarified the 21% corporate rate and stripped out decades of amendment clutter—shrinking the text while preserving billions in annual revenue.

🗑️ Delete (261 times)

Section 1000 and Others: Repealed or Reserved Sections
Hundreds of sections were dead wood: repealed laws, placeholders (“Reserved”), and outdated references. These deletions meaningfully shrank the code without any financial or policy consequences.


Iterative Simplification

Each decision was rationalized and recorded, creating a full audit trail.

This matters because the agent isn’t stopping here.
The plan is iterative:

  • First pass: reduced the original tax code by 60%.
  • Next pass: target a further 50% reduction of the remaining text.
  • And then again, and again — until the entire U.S. tax code fits into something close to 20 pages.

The goal isn’t just brevity—it’s clarity, accessibility, and modernization.


Acknowledgements

  • Google and Kaggle: for the free Generative AI course, which made this capstone project possible.
  • Derek Thompson and Ezra Klein: for Abundance, the book that lit the spark for focusing on tax reform.

All code, data, and AI prompts are open-sourced and available here:
🔗 https://github.com/candrasick/ai_tax_agent