Inspiration

I've worked in tax for about fifteen years, mostly in a tax and accounting consultancy. I started in junior roles, moved through different parts of the practice, and now work independently as a consultant.

Small software companies often come to me with the same problem: they want to sell abroad, but they cannot hire several advisers for every new contract. At the same time, a VAT mistake can easily cost more than the advice they were trying to save money on.

The difficulty often starts before anyone calculates a tax. A product sold as a “managed AI assistant” might include cloud software, custom integration, hosting, a licence, technical support and staff training. Those parts do not necessarily follow the same tax treatment.

Most tools I know become useful only after somebody has already classified the transaction. Tax calculators calculate, and research tools help when a professional already knows which question to ask. I wanted something that could help with the step before that.

My longer-term idea is a platform that guides a small company through a cross-border deal, including tax, documentation, certification and compliance. The Build Week announcement reached me three days before the deadline, so I discussed the idea with ChatGPT and Codex and cut it down to one part that could realistically be built and tested.

That part became TaxGraph.

What it does

TaxGraph analyses a cross-border software or AI transaction before the first invoice is issued.

The user completes a short form, describes the product in ordinary language and can optionally paste part of the contract.

GPT-5.6 turns that information into structured facts and separates a mixed product into components such as SaaS access, integration, hosting, support, training and software licensing.

It also keeps track of where each fact came from. If the form describes a private customer in France but the contract names a German GmbH with a VAT ID, TaxGraph shows the conflict instead of quietly choosing one version.

The tax mapping is handled by deliberately boring TypeScript code. The MVP has twelve fixed rules covering EU place of supply, electronically supplied services, the non-Union OSS route, reverse charge, invoice requirements, evidence of customer location, VAT ID verification and treaty review where software rights may be involved.

GPT-5.6 does not decide the tax result. It reads and structures the transaction, identifies gaps and explains the output produced by the rule engine.

Each substantive claim has a footnote. Clicking it opens the exact stored excerpt from the official source, together with its pinpoint and review status.

Missing information appears as questions inside the analysis. When the user answers one, the rule engine runs again without another model call and highlights what changed.

For example, confirming that the customer is a German VAT-registered company can change the workflow from a consumer VAT registration question to a reverse-charge review.

TaxGraph can also check VAT IDs through VIES when the official service is available.

The final result is not a tax opinion. It is an adviser brief showing how the transaction was classified, which rules may be relevant, what information is still missing and what a professional should review.

When the available information is not enough for a reliable answer, the application says so.

How we built it

The application code was built with Codex in one retained development session over three days. The repository currently contains seven scoped pull requests and 63 tests.

I gave Codex two important restrictions at the start.

It was not allowed to invent tax content. The legal rules and source records were researched separately and placed in data files that the implementation agent was instructed not to rewrite substantively.

It was also not allowed to claim that something had worked unless it had actually run. Tests, builds, commits and known limitations were recorded in a build log.

At runtime, GPT-5.6 handles five limited server-side tasks:

  1. turning the form, free text and contract excerpt into typed facts;
  2. separating a mixed service into components;
  3. generating questions about facts that could change the analysis;
  4. explaining the completed analysis;
  5. explaining differences between two scenarios.

The model outputs are checked against schemas before entering the rest of the application.

Generated explanations then pass through a citation gate. Claims must reference sources available in the current analysis. Unknown source IDs are rejected, and quotations are matched against the stored excerpts.

The rule pack references fourteen official-source records, including EUR-Lex, European Commission OSS guidance, VIES, French and German tax sources, the Serbian VAT Act and the Germany–Yugoslavia treaty record. Each record contains a pinpoint, an excerpt and a visible review status.

Challenges we ran into

The hardest part was deciding how much the model should be allowed to do.

A fluent but incorrect explanation is especially dangerous in tax work. Asking the model to be careful was not enough, so its role had to be limited in code. It can extract and explain facts, while the tax rules are evaluated separately.

Near the end of development, I asked Codex to review the application as if it were trying to break it.

It found that an early version of the explanation endpoint trusted analysis data sent by the browser. A user could construct a false claim, attach a genuine but irrelevant source and potentially pass it through the citation check.

The server now rebuilds the analysis from validated transaction data, reruns the rules and verifies the claims before asking the model to explain them.

The original version did not crash or show an obvious error. It simply trusted too much, which made the issue more important to fix.

Accomplishments that we're proud of

TaxGraph is deployed as a working application rather than a static mockup.

GPT-5.6 runs in production, and VAT IDs can be checked through VIES when the official service is available.

The citation layer rejects claims that do not have valid supporting references, including deliberately forged test claims.

The missing-facts workflow updates the analysis without making another model request. The application also preserves whether a fact came from the form, the free-text description, the contract or a later answer from the user.

The two demo scenarios show how the same AI product can lead to different questions:

  • a French consumer buying a mostly automated subscription;
  • a German VAT-registered company buying a negotiated integration with substantial human work.

The adviser brief is intended as a practical starting point for professional review, not as a replacement for that review.

I am also pleased that the development process is inspectable. The build log records failed attempts and limitations as well as completed work.

What we learned

The biggest lesson was that a prompt cannot provide the safeguards needed for professional tax work.

The useful controls ended up being ordinary engineering controls: typed data, fixed rules, source allowlists, quote validation, visible uncertainty and server-side verification.

I also learned that Codex is more useful as a reviewer when it is explicitly asked to challenge its own implementation. Some of its most valuable work on this project came after the first version was already running.

What's next for TaxGraph for Software & AI Services

The next jurisdiction packs I want to add are Kazakhstan and Kyrgyzstan, since those are markets my clients ask about regularly.

I also want to build a reviewer workflow for accounting and tax firms. A client could describe the deal in their own words, and the firm would receive a structured intake brief with the relevant sources and unresolved questions already organised.

Later versions could cover founder tax residency, multi-entity structures, salaries and dividends, intercompany services, loans, transfer pricing and alerts when the underlying rules change.

The broader goal remains the same: a practical workflow that helps small companies understand the tax, documentation and compliance work involved before entering a new market.

Built With

  • codex
  • compliance
  • gpt-5.6
  • legaltech
  • next.js
  • openai
  • react
  • rest-api
  • structured-outputs
  • taxtech
  • typescript
  • vat
  • vercel
  • vies
  • vitest
  • zod
Share this project:

Updates