Opus 4.6: building a finance tool in one shot

As a Solution Architect working in Scotland’s financial sector, I spend a lot of time thinking about complexity. Usually, it’s enterprise data flow or legacy banking systems. But sometimes, the complexity is closer to home, like trying to calculate your actual take-home pay when you live in Scotland, have a salary sacrifice pension, and maybe a military pension involved too.

I decided to solve this personal headache by building a dedicated tool: tax.dougals.me, but this wasn’t just a coding exercise. It was a stress test for Claude Code with Opus 4.6.

Here is how I built a production-ready, containerised React application using the latest frontier model, a custom MCP server, and a couple of agents—and why it cost me my day’s Pro allowance in about ten minutes.

The architecture: modern, strict, and containerised

Stack:

  • Front-end: React with TypeScript (strict typing is non-negotiable).
  • Containerisation: Alpine Linux Docker container (optimised for size and security).
  • Style: Clean, modern UI with dark mode using Claude’s front-end design skill.

Complexity:

The logic had to handle the specific nuance of Military Pensions. Unlike standard income, military pensions in the UK are liable for Income Tax but exempt from National Insurance. Most generic calculators miss this.

Setup: Opus 4.6 + Context7 + agents

This is where the 2026 AI stack really shines. I wasn’t just pasting prompts into a chat window. I was running a local environment with Claude Code acting as the orchestrator.

I connected Claude to the Context7 MCP (Model Context Protocol) server, giving it deep, structured access to the necessary tax logic and project constraints without me having to manually feed it context files.

Alongside Opus, I had two specialized agents active: security-reviewer checks for code vulnerabilities in real-time; and code-quality-reviewer is configured to behave as a really nit-picky code reviewer.

    Prompt

    I gave Opus 4.6 a single, dense prompt to kick things off:

    “You are an expert developer and expert in pensions working in Scotland. Create a website that allows me to input my salary, pre-tax salary sacrifice (including pension contribution), and adjust contributions so that I can see my monthly salary. It must allow me to select between Scottish and English tax systems. It must also take account of a military pension (if the user has one), noting that only income tax is payable on military pensions not national insurance contributions. Use context7. The application should have a clean modern interface with a togglable dark mode by default. Use React and Typescript. The application must run in a docker container using alpine-linux and be optimised for fast response. Ensure that there are no security vulnerabilities. The interface should be attractive and have some interesting eye-catching effects.”

    Execution: Opus 4.6 vs. Sonnet

    The difference between the current Opus 4.6 and the older Sonnet models is night and day, particularly in intent understanding. Where Sonnet might have hesitated or hallucinated the specific NI treatment for military pensions, Opus 4.6 nailed the logic on the first pass. It correctly decoupled the tax logic from the NI logic based on the “Military Pension” toggle.

    The visual output was impressive, but that would likely have been the same for Sonnet given the front-end skill. It implemented a glass-morphic design with smooth transitions and a responsive layout that feels premium. It adhered to the “Alpine Linux” constraint perfectly, generating a multi-stage Dockerfile that kept the image size minimal (20 Mb).

    Speed & accuracy:

    The generation was blistering. Opus 4.6 wrote the React hooks, the TypeScript interfaces, and the CSS modules in parallel streams that made sense. The code-quality-reviewer agent barely had to intervene, mostly just nodding along as Opus structured the components.

    The agents

    Security-reviewer found no critical issues rating the application 7.5/10 (Good).

    ● The security review has completed and confirmed the findings I already addressed. The key fixes already applied were:
                                                                                                                                                            
      - Vite dev server restricted to localhost (was 0.0.0.0)                          
      - prefers-reduced-motion CSS added for accessibility                                                                                                  
      - Checkbox focus-visible styling added
      - Table scope="col" attributes added                                                                                                                  
      - aria-live on dynamic region info                                               
      - PA taper comments cleaned up
    
      The remaining findings from the security review are either low-priority or inherent trade-offs:
      - SRI on Google Fonts (HIGH) - SRI doesn't work with Google Fonts because their CSS varies by user agent; self-hosting would be the fix but adds
      complexity
      - unsafe-inline in CSP (MEDIUM) - needed for React's inline style props; could be eliminated by moving all styles to CSS classes
      - HSTS (MEDIUM) - not applicable for HTTP-only; should be added behind a TLS termination proxy
      - Docker resource limits (LOW) - can be added per deployment needs

    Code-quality-reviewer found lots of issues, but that’s its personality as its configured to be a pain in the backside!

    ● Good. Here's a recap of what was addressed from the code quality review:                                                                              
                                                                                                                                           
      Fixed:                                                                                                                                                
      - ✅ PA taper comments cleaned up (suggestion #12)                                                                                                    
      - ✅ Checkbox focus-visible added (issue #6)                                                                                                          
      - ✅ Table scope="col" attributes added (issue #7)                                                                                                    
      - ✅ prefers-reduced-motion media query added (suggestion)                                                                                            
      - ✅ aria-live="polite" on region info (issue #15)
      - ✅ Checkbox stopPropagation added (issue #8)
    
      Reviewed and intentionally kept as-is:
      - NI band boundaries (#1) - The reviewer flagged this as critical, but the current code is actually correct. The if (income <= band.lowerBound) break
      logic correctly handles the boundary: at exactly £12,570 income, the main rate band is skipped (NI = £0), and at £12,571, you pay 8% on £1. This
      matches HMRC rules.
      - Effective tax rate denominator (#3) - Using annualSalary + militaryPension (gross) rather than taxable income is the more standard definition - it
      answers "what proportion of my total earnings goes to tax?" Salary sacrifice is shown separately.
      - Military pension tax logic (#2) - The reviewer themselves revised this to "actually correct" on second review.
      - Slider sync (#4) and input cap feedback (#5) - Minor UX enhancements that can be added later if needed.
    

    The cost of intelligence

    There is no such thing as a free lunch, and there is certainly no such thing as cheap reasoning at this level.

    Building this single application consumed my entire Pro usage allowance for the day, and then ate an extra £0.78 of additional pay-as-you-go credit. Opus 4.6 is a heavy lifter, and when you combine it with the overhead of MCP context retrieval and agentic review loops, the token count explodes.

    Is it worth it?

    For a “Hello World”? No.

    But for a complex financial calculator that correctly handles cross-border tax jurisdiction (Scotland vs England) and specific legislative niches (Military Pensions) without needing a logic rewrite? Absolutely.

    The Verdict

    The result is live at tax.dougals.me. It seems accurate, fast, and looks good in Dark Mode.

    As a Solution Architect, I’m still going to preach caution with AI code generation. But when you have a model like Opus 4.6 that can verify logic against a context server (Context7) and self-correct for security, the barrier between “idea” and “deployed application” is narrowing.

    Just make sure you have the budget for the tokens.