An AI code generation tool used by 20,000 engineers

Refraction was Twistag's own AI code generation tool, started in early 2022 before Cursor existed. It routed each request to the model best suited to the language and task, and grew to more than 20,000 engineers and 2.9 million lines of code across 56 languages. Twistag closed it in 2024 as the market consolidated, and the experience now underpins the AI products it builds for clients.

  • Refraction
  • Software & platforms
  • AI & Agents
  • Product Engineering
A glass prism splitting one beam of light into several on a dark surface
  • 20,000+engineers using the product
  • 2.9Mlines of code generated
  • 56programming languages supported
Client
Refraction
Industry
Software & platforms
Practices
AI & Agents, Product Engineering
Timeline
Internal product, 2022–2024
Stack
OpenAI, Anthropic Claude, Next.js, React
Discuss a similar case
The challenge

Senior hours spent on patternable work.

Refraction was Twistag's own AI code generation product, used by more than 20,000 engineers across 56 programming languages to generate over 2.9 million lines of code — and Twistag deliberately shut it down in 2024 as the market consolidated. Twistag started building it in early 2022, before Cursor existed and while GitHub Copilot was in limited preview, to solve its own engineers' problem: unit tests, documentation and language conversion consuming senior hours. Refraction ran on a multi-provider LLM abstraction routing each request to the best model for that language and task. The engineering knowledge it produced now underpins every AI product Twistag builds for clients.

Refraction was an internal Twistag product, built by Twistag for Twistag's own engineers first and then distributed externally. It is not client work and should never be counted as such. Twistag started it in early 2022, before Cursor existed and while GitHub Copilot was in limited preview, because senior engineering hours were going into unit tests, documentation and language conversion — work that is patternable but not trivial. Engineers examine AI-generated code with more scrutiny than almost any other user group examines AI output, so the quality bar for a developer tool is higher than for other software: output that is nearly right is worse than no output, because verifying it costs more than writing it. Users came from teams at Accenture, Amazon, Google and Uber, among many smaller organisations.

The approach

The right model for each task.

  1. A multi-provider layer.

    Each request went to the model best suited to its language, framework and task, which also turned provider outages and price changes into routine events.

  2. Grown from usage.

    Refactoring, tests and documentation first; then bug detection, language conversion, SQL, regex and diagrams; then VS Code and JetBrains extensions; then team features for enterprise use.

  3. Fifty-six languages, each idiomatic.

    Language-specific prompts kept output true to each language's conventions, from Python type hints to Rust ownership rules.

  4. Its own first users.

    Built for Twistag's engineers first, so every feature had a demanding user in the building.

The impact

A deliberate close, lasting expertise.

By 2024 Refraction was serving more than 20,000 engineers, including users at Accenture, Amazon, Google and Uber, and had generated over 2.9 million lines of code across 56 programming languages. Twistag then made the strategic decision to shut the product down as the market consolidated around competitors with fundamentally different capital structures. What the four years produced was first-hand expertise in LLM integration, prompt engineering at scale, developer experience design, and the operational reality of running AI live at scale — including provider outages, cost management and quality regression at volume. That expertise is the foundation of every AI product Twistag now builds for clients.

This case study is about a deliberate strategic decision and what it created.

  • OpenAI
  • Anthropic Claude
  • Next.js
  • React
Refraction was Twistag's own AI code generation product, used by more than 20,000 engineers to generate over 2.9 million lines of code.
Have a similar challenge?

Start with the work that should change first.

A thirty-minute call, then a one-page outline of how Twistag would approach it.

A senior lead replies within one working day.

Talk to us

Tell us where work gets stuck.

A senior engineer replies within one working day.

Interested in

Thirty-minute call

Pick a time.