IBM · Filed Apr 24, 2025 · Published Oct 29, 2026

IBM Files Patent to Make AI Coding Tools Remember What Your Code Is For

A family-tree method from biology sits at the center of IBM's new patent, which tries to teach AI coding tools what each piece of code is actually for.

Sample computer code paired with plain-language explanations of what each part is meant to accomplish. Drawing from patent filing US 2026/0339622 A1.
Sample computer code paired with plain-language explanations of what each part is meant to accomplish.
See all 7 drawings from this filing ↓
Publication number US 2026/0339622 A1 US20260339622A1
Applicant INTERNATIONAL BUSINESS MACHINES CORPORATION
Filing date Apr 24, 2025
Publication date Oct 29, 2026
Inventors Lucia Larise Stavarache, Kyle Gene Brown, Gennaro Anthony Cuomo, Yu Cai, Stephen Meier, TADAS DANIELIUS
US classification 717/106
Status when we published Waiting for an examiner (May 13, 2025)
Document 20 claims

What IBM's intention-tree idea actually does

Today's AI coding assistants learn by reading enormous piles of code and guessing what comes next. That gets the grammar right, but the tools often miss how a piece of code fits into the bigger project and what it was meant to do. The result can drift away from what you asked for.

IBM's filing adds a middle step. First, the system reads a company's existing code and sorts it into a tree that shows its structure. Then an AI writes a plain-language note for each chunk, such as 'defines a class named BubbleSort,' and those notes get attached to the matching code. The result is what IBM calls an intention tree: a map of what the code does and why.

When you later ask the AI to write, rewrite or translate code, it can use that map as a guide. IBM also says the map can help spot duplicate code, so the AI doesn't keep writing the same thing twice.

From the filing · CLAIM 1
… generating an intention tree using the cladogram to represent the syntactical information associated with intention statements that describe an intention associated with portions of the original code base …

Translation: The tool creates an intention tree by linking code syntax with statements about what the code is supposed to do.

How IBM turns code into a tree of purposes

The claims describe a four-step method. The system starts with an existing code base (the full set of files in a software project) and turns it into a syntax tree, a branching diagram of how each statement is built, such as an operator with its two inputs hanging below it.

Next, it converts that syntax tree into a cladogram. That's a family-tree-style diagram borrowed from biology, where scientists group species by shared traits. Here the 'species' are algorithms, and the traits include things like recursion (a function that calls itself), stability, and in-place operation. The filing's example compares bubble sort, merge sort, quick sort and insertion sort.

Then the system builds the intention tree:

  • Syntax nodes stand for pieces of the original code.
  • Intention nodes hold a plain-language description of each piece, which can be written by a large language model (the AI behind chatbots).
  • Edges (links) connect each intention to its code, join different versions of the same component, and join pieces with similar intentions.

The notes can be written per line or per function. Finally, code is generated from the tree. The filing lists copying code, rewriting it while keeping its purpose, translating it into another programming language, writing documentation, and refactoring (cleaning up) by clustering similar intentions to remove redundant code.

Why IBM is aiming at old, duplicated code

If you work on software, the practical promise is an AI assistant that stays closer to what your code is supposed to do. It could help with chores like translating an old program into a new language, writing missing documentation, or finding the near-identical copies of a function that pile up over the years. The filing says translation could work without training on paired examples of the two languages.

For IBM, the angle is older code. The filing mentions working out the intent of undocumented or legacy code and checking code against written requirements. Many large companies have that problem. Still, this is a patent application describing a method, and the text gives no test results, so how well it works is unknown.

This is the 46th AI assistant and agent filing from IBM we've tracked since May, a company that has also applied to trim old chat history and pick the best chatbot answer.

Editorial take

If you write code for a living, you'd notice this one in the dull places: fewer duplicate functions, notes on old code nobody documented, and AI suggestions that match what a program is for. That is a modest but useful benefit.

If you don't code, you'd likely never see it directly. It would show up as apps and company software that are easier to fix and update, if it works.

The biology borrowing is a fun idea. The filing gives no results, so the benefit stays a promise. A tool that explains each chunk of code in plain English, then checks new code against those notes, would save real time on cleanup. Whether it beats simply asking an AI to read the code is the open question.

Get our take in your Top Stories

Liked this breakdown? Add Patentlyze as a preferred source on Google, and our plain-English take shows up more often in your Top Stories the next time IBM patent news breaks.

There are more where this came from

We read every patent application Big Tech publishes and send you the ones worth knowing. Plain English, free, every week.

The drawings

7 drawing sheets from US 2026/0339622 A1 · click any drawing to enlarge

Feeding user goals to the AI to write software, drawing sheet 1 from US 2026/0339622 A1
Sheet 1 Feeding user goals to the AI to write software
Translating lines of raw code into plain functional goals, drawing sheet 2 from US 2026/0339622 A1
Sheet 2 Translating lines of raw code into plain functional goals
Using recorded intent to rewrite and explain existing software, drawing sheet 3 from US 2026/0339622 A1
Sheet 3 Using recorded intent to rewrite and explain existing software
Mapping code components into a tree of functional goals, drawing sheet 4 from US 2026/0339622 A1
Sheet 4 Mapping code components into a tree of functional goals
Networked computers that analyze and manage code purpose, drawing sheet 5 from US 2026/0339622 A1
Sheet 5 Networked computers that analyze and manage code purpose
An AI model trained to interpret coding commands, drawing sheet 6 from US 2026/0339622 A1
Sheet 6 An AI model trained to interpret coding commands
Adding deeper processing to enhance the AI coding model, drawing sheet 7 from US 2026/0339622 A1
Sheet 7 Adding deeper processing to enhance the AI coding model
Browse all the drawings 7 drawing sheets
Patent filing page

Source. Full patent text and figures from the official USPTO publication PDF.
Reader comments

Be the first to weigh in

Start the discussion

Real name or a handle, either is fine. Comments are read by a person before they appear, so allow a little time. Keep it about the filing.