Show HN: A proof-of-concept formalization of the IRS federal tax forms

71 points by RGS1811 a day ago on hackernews | 13 comments

[OP] RGS1811 | 12 hours ago

Author here: if you want a detailed overview of the project, the spec is better than the (claude-authored) README file:

https://github.com/emmilco/us-tax-model/blob/main/spec/spec....

GrumpyGoblin | 11 hours ago

Have fun keeping this up to date. It's an admirable idea, but the tax forms and rules change significantly every year. I built a payroll system for a suite of small and medium sized businesses back in the day. Even during a stable administration the rules are impossible to keep up with. We had a team of engineers who every year had to spend weeks to months trying to keep it up to date and verify the numbers. It's why my accountant makes $400/hr and why there are no open source projects that have ever taken hold in the market.

> Most tax software derives trust from the party who maintains it (e.g. Intuit, the IRS, etc.)

Because they have the resources to keep it up to date. And even they get it wrong sometimes. Including the IRS itself: https://www.irs.gov/e-file-providers/known-issues-and-soluti...

This seems like something that once would've been hard / impractical but with some proper AI agents it could easily be automated, no?

[OP] RGS1811 | 11 hours ago

That's the dream!

It's also something that can be made more achievable by pruning coverage to the most common tax situations. E.g. my target coverage for this project is 80% of federal filers, individuals only. This is a lot more achievable than achieving coverage for all individuals plus businesses, etc.

dprkh | 11 hours ago

> That's the dream!

I hope your joking.

michaelrpeskin | 10 hours ago

I did a similar project just for myself recently, and I think AI interpretation of the IRS is probably one of the ideal projects. AI is generally pretty good at following a spec, and the IRS is generally pretty good at writing detailed specs.

In my case, I had an Inherited IRA that, and this is the first year I have to take a distribution from it. It needs to be emptied in 10 years and starting this year I have a minimum amount to take out based on my age. My goal was to write a simulation of how much I take out each year, what that does to my income taxes, how much tax deferred growth I get by leaving it, etc. I have an optimizer to connect to the simulation, so I could then figure out how much I should take each year.

I decided to vibe it, just for fun. I started very simply: write me a simulation for each year with this much projected growth, etc. The AI asked me some questions like "do you have kids going to college during this time frame?" and did you know that your state has an allowance for this much tax free withdrawal, etc. That took me down a rabbit hole since I didn't know all of those things. I said, go read the IRS code and my state tax code, figure out all of the things that are relevant for my finances (normal W-2 employee, no fancy stuff), and it wrote me a much more detailed simulation than I would have thought of and tied it all to all of the tax things that might be relevant for me.

I was shocked at how good of a job it did, I can (and did) independently verify it since my taxes aren't that complicated. It did find savings that I didn't know were available to me.

I think that this is a great area for AI-based development since it's essentially transpiling detailed IRS specs into code, and that's what AI is really good at.

CamperBob2 | 11 hours ago

Have fun keeping this up to date.

Why? These rules are written down somewhere. Looks like the spec was created by pointing the model at irs.gov and/or the Federal Register itself and telling it something like, "Create a specification for a verifiable tax model and the tools to verify it."

Next year, all the maintainer has to do is issue the same prompt, no?

lnkdinsuxs | 7 hours ago

> but the tax forms and rules change significantly every year

but so does React, Vue and Kubernetes and coding agents are crushing it.

I think if you started your company today, you would have a very different take.

> Because they have the resources to keep it up to date. And even they get it wrong sometimes

are these resources that require intelligence or something else?

Would this method have turned up inconsistencies in the IRS's own guidance if such inconsistencies existed?

lnkdinsuxs | 7 hours ago

Yes and then? Sue them in federal court? Refuse to pay the taxes? Write them a letter pointing out inconsistencies?

Inconsistencies already are known and well studied - this is one of the domains of corporate tax lawyers - how to interpret the inconsistencies into a strategy to benefit the company, so that even if the company is sued by the IRS, a well formed argument would be made and case dismissed or fines significantly reduced.

atcole | 7 hours ago

Hey, I'm working on something similar here:

https://github.com/captaincole/OpenReturn

And I have a concept as well for how people can verify the solver by running their own previous returns through the engine. Would love to collaborate as this is a side project for me as well.

Actual subject matter experts at the IRS already did this, but then funding was killed. They did open-source it during the project's death throes. https://www.reddit.com/r/programming/comments/1l13uvu/irs_op...

Filing your taxes seems like one of the worst conceivable use of vibe-coding, out of innumerable terrible uses.