iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🛍️

On-Distribution Technology Selection in the AI Era: A Case Study from Claude Code Team

に公開
2025/10/15

Did you know that Claude Code started as an internal tool that "displays the music engineers are listening to while working" in the terminal?

This music tool, created as one of the prototypes, evolved after being given file system access and bash capabilities, eventually becoming Claude Code.

This episode was mentioned in "How Claude Code is built" by Gergely Orosz.

https://newsletter.pragmaticengineer.com/p/how-claude-code-is-built

  • At Anthropic, the introduction of Claude Code doubled the number of engineers while improving per-engineer productivity (number of PRs) by 67%
  • About 90% of Claude Code's own code was written by Claude Code itself
  • The architecture is intentionally kept simple
  • Whenever a more powerful AI model is released, outdated code that is no longer needed is actively removed
  • For one feature (a TODO list), over 20 different prototypes were created in just two days
  • The architecture is intentionally kept simple, with a philosophy of maximizing the model's strengths

There were many things that caught my interest, but one of them is the mention of technology choices.
Based on the philosophy of "play to the strengths of the model", they deliberately chose "on distribution" technologies that AI excels at, such as TypeScript and React.

In this article, I'd like to explore the perspective and examples of on-distribution technology selection.
To put it bluntly, this is a longer discussion of the seemingly obvious point that AI-native or AI-friendly technology choices matter.

The concept of "on distribution"

Strictly speaking, "on distribution" refers to "data that has the same statistical properties as the data used for training."
In the interview with the Claude Code team, it was used to refer to areas the model already excels at or knows well. Conversely, areas where the model struggles are called "off distribution."

In this article, apart from the strict definition in machine learning, I will treat "on distribution" as "the well-known areas that the model has seen enough from its training data," which aligns closely with the intent of the interview.

In-Distribution (On-Distribution): Data that has the same statistical properties as the data used to train an AI model. For example, for an AI trained on images of various cat breeds, a new image of a cat is "In-Distribution" data. The AI is expected to perform well on such data.
Out-of-Distribution (off distribution): Data with completely different properties that was not included in the AI model's training data. For an AI trained on cat images, images of dogs or cars are "Out-of-Distribution" data.

https://spotintelligence.com/2024/11/11/out-of-distribution-in-machine-learning-made-simple-how-to-detect-it/

What we can learn from Claude Code about "on distribution"

The Claude Code team intentionally prioritized being "on distribution" in the early stages of development.

Off-distribution stacks also work—models can learn. But we would have to teach the model how to work. What we needed was a tech stack that didn't need to be taught—a stack that Claude Code could build on its own. And it has worked: about 90% of Claude Code's code is written by Claude Code.
Source: How Claude Code is built

Based on this philosophy, here are the technology stacks they chose:

  • TypeScript / React
  • Ink (React-based UI library for CLI)
  • Bun (Build tool)
  • Yoga (Layout engine)

The architecture itself is simple (it is a CLI, after all), and there's nothing particularly surprising about the stack.
Nevertheless, TypeScript and React likely account for a significant portion of the massive code datasets that modern LLMs have been trained on.
And it's stated that these were chosen precisely because they are on distribution for the Claude model.

Given that Claude Code is a CLI tool, the choices were somewhat limited.
In web application development, you can apply the philosophy of "deliberately choosing the arena AI excels at" more broadly, including development tools and implementation patterns.

The choice of TypeScript/React itself is not novel and may be hard to grasp intuitively, but I feel that the decision criterion of deliberately choosing the arena AI excels at points to a new perspective for future technology selection.

Bias in Training Data by Language

As a matter of fact, it is expected that there is a certain bias in training data toward particular languages and frameworks.

StarCoder, a model specialized for code-related tasks, has been trained on code from over 80 programming languages. However, looking at the breakdown, the majority of the 86 languages and 783GB of code is dominated by major web-application technologies such as Java, JavaScript, and Python.

https://huggingface.co/blog/starcoder

More specifically, Java (11%) has the largest share, followed by Markdown (10%), JavaScript/Python/PHP (8% each), C (7%), C#/C++ (6% each), Issues (7%), and Commits (4%), with the remaining 78 languages occupying 25%.

What Makes Something "On Distribution"

It is clear that the benefits of AI-assisted code generation depend not only on "which programming language you use" but also on "what kind of tasks you delegate to AI."

In fact, a study published by Cisco in June 2024, "Transforming Software Development," measured productivity improvements per task in real projects with large, proprietary codebases.

  • Significant productivity gains are seen in languages like Java, Go, and Python, which are frequently used in web development and cloud-native environments.
  • On the other hand, for C and C++, which play a central role in systems programming, the benefits of AI are smaller, and there are even reported cases where AI fails to generate useful code.


Figure of efficiency by language from https://arxiv.org/pdf/2406.17910

This difference cannot be simply attributed to a lack of data. Possible factors include the complexity of the language specifications and the diverse ways languages are used (low-level systems programming, embedded systems, game development, etc.), which may make code generation more difficult compared to web development.

Furthermore, regardless of language, AI tends to be effective for routine and repetitive tasks (generating boilerplate code, implementing simple UI components, creating documentation, etc.). The Cisco study listed the following tasks and their time reduction rates:

Task Time Reduction Rate Details
Code documentation (comments, Doxygen generation) Up to 50% The area with the most significant time savings
Code auto-completion Up to 50% Significant improvement over traditional IDE features
Repetitive coding (boilerplate, etc.) 30–40% Highly effective for routine code generation
Unit test generation 30–40% Effective for simple cases; contributes to improved test coverage
Debugging (compiler errors, linter errors) 30–40% Especially effective when the problem is clearly described


Figure of efficiency by task type from https://arxiv.org/pdf/2406.17910

This suggests that it's not just about the popularity of a language, but that the very nature of the task plays a deep role. In other words, tasks that are universal across projects—such as documentation creation and boilerplate code generation—are themselves "on distribution" areas for AI.

On the other hand, there is a clear tendency for performance to decline when dealing with complex, large-scale proprietary codebases specific to a company.
This phenomenon can be seen as the typical "off distribution" barrier that companies face when introducing AI coding assistants.

  • Company-specific APIs
  • Company-proprietary design patterns
  • Domain-specific business logic

Ultimately, it shows that AI effectiveness depends not only on language popularity, but also on the nature of the task and the context of the codebase.

How to Deal with Off Distribution

That said, with the advent of MCP, llms.txt (a file that specifies which files and directories LLMs should reference), and other tools, AI now has more ways to gather project-specific context (off-distribution information). Moreover, the performance of the models themselves has improved.

https://llmstxt.org/

Recently, I also use technologies like Convex, Turso, and Neon. These are relatively new platforms, and it is likely that they have not been trained on enough data to be considered truly "on distribution." However, their compatibility with Claude Code is excellent, and I have not run into any particular issues.

https://www.convex.dev/

https://turso.tech/

I believe this is because they provide type-safe APIs and clear documentation, resulting in a structure that is easy for AI to understand—an AI-friendly structure. Of course, the raw power and performance improvements of the models themselves also play a role.

As mechanisms that can be called "context bridges" continue to develop, the handicap of choosing an off-distribution technology stack may diminish in the future.

The essential point is not simply whether a technology is "old or new," but whether it has "a structure that AI can easily understand."

Just saying "AI-friendly" is practically meaningless without deeper analysis. We need the ability to discern, taking into account the resolution and practical knowledge of what constitutes an "AI-understandable structure," as well as the performance improvements of AI models themselves, to determine what truly matters.

Will the Flywheel Effect Work?

Assuming that the advantages and adoption of on-distribution technologies increase, it is tempting to imagine the potential for a kind of flywheel effect.

  1. Popular technology stacks (e.g., React, TypeScript) become the primary training data for AI.
  2. As a result, those stacks become "on distribution" for AI, and AI tools perform at a high level on those stacks.
  3. Developers actively adopt those technology stacks to maximize the benefits of AI.
  4. Consequently, the amount of code written in those stacks increases, further enriching the training data for the next generation of AI (return to step 1).

If this cycle starts to spin, major technology stacks will become even more powerful with the evolution of AI, and the productivity gap with minor technologies may widen further.

According to the IEEE Spectrum 2025 Programming Language Ranking, the number of questions on Stack Exchange has also decreased, with the weekly number of questions dropping to 22% of the 2024 level. This indicates that developers are now resolving their questions through conversations with Claude or ChatGPT, showing how the spread of AI tools is significantly changing activities in the programming community.

However, for technologies that have just appeared with few code samples, AI may not be able to generate high-quality code, and there is a possibility that the popularity of existing major technologies could become entrenched.

The Axis of "AI Leverage"

Now that AI has permeated every aspect of the development process, whenever I consider anything, the perspective of AI leverage (AI Affinity)—how much can we draw out AI's capabilities?—lingers in my mind.

AI will try to generate code with full confidence even for unfamiliar technologies.

Choosing technologies that are on distribution for AI is one approach to leverage AI's capabilities—to draw out as much of AI's potential as possible.

Heck, services like v0.app deliberately narrow down the technology stack of the output code to ensure the quality and consistency of AI-generated code. This is also a strategy for drawing out AI's capabilities.

As seen in studies like Rethinking Technology Stack Selection with AI Coding Proficiency (which I happened to find while writing this), the search for know-how and knowledge to identify technologies that LLMs excel at is bound to continue.

Summary

We have entered an era where technology selection is no longer determined solely by human convenience—we must take into account AI's strengths and weaknesses. On-distribution technology selection is one option premised on collaboration with AI.

Of course, there is also the approach of simply trusting the power and evolution of AI models. (Personally, I lean toward this stance as well, so I prefer to avoid overly elaborate approaches if possible.)

I decided to be more conscious of the question: "Is this on distribution for AI?" from now on.

On a personal note, I am also interested in "How do we measure/judge what is on distribution?" I'm aware that I've been relying on intuition and gut feeling, so I'd like to think about whether we can approach this more experimentally.

What I'm currently doing is trying different technologies with the same task and instructions, and checking whether even lower-performance models (like Haiku or gpt-oss 20b) show less variance in accuracy.

That's all for this time!

Discussion