Let’s say you ask AI to change an online store’s free-shipping threshold to 50,000 won. After editing the code, AI tells you, “Tests passed.” But the questions you really care about remain: Will shipping still be free when the cart total is exactly 50,000 won? If a discount applies, is the threshold based on the amount before or after the discount? 1

Tests tell you whether a program passed a set of checks defined in advance. But that alone doesn’t mean every input people might care about, or every business decision, has been checked. That’s why you may need a way to inspect the actual outputs before “merging” the changed code into the existing codebase. 1, 2

Heirloom is a tool a developer released in an effort to address this problem. It’s an open-source plugin for AI tools that handle coding tasks. It’s designed to run the code before and after a change, let a person predict the results, and then compare those predictions with the actual outputs. The shipping example below is one described by its creator, not the result of a real-world experiment whose effectiveness was verified at an online store. 1, 2

Compare the shipping charge at 50,000 won

Let’s say AI hands off the task after changing the free-shipping threshold. A handoff is when AI passes its changes to a person for review. According to the creator, Heirloom runs the code before and after the change in separate workspaces. This lets you test both versions with the same inputs and compare what changed. 1, 2

A flow showing inputs below, exactly at, and above 50,000 won entered into the code before and after a change, with the results compared side by side. An illustration explaining why boundary values are checked separately.

For the shipping example, the input you want to check is “exactly 50,000 won.” You’re checking not only amounts clearly below or above the threshold, but also one right on the boundary. If the rule you have in mind is “free shipping from 50,000 won,” there should be no shipping charge for this input. If the actual output differs from that expectation, you can revisit the intent of the change, regardless of the report that the tests passed. 1

In Heirloom, AI creates a command that will reveal how the change behaves. The command runs only after a person approves it in the dashboard, a screen for inspecting and judging the results. The creator also says that existing tests are run on both versions, and any items with different results are collected. 2

This comparison shows the results produced by the inputs and commands that were run. It doesn’t mean that every possible order condition has been checked automatically. 1, 2

Why answer before seeing the results?

Once the tool has gathered the outputs, AI explains the behavioral differences and creates three to five questions. In the shipping example, a person might predict how much shipping will cost for a 50,000-won order before seeing the actual result. According to the creator, the server doesn’t reveal the actual output until the prediction is saved, and a saved prediction can’t be changed. 1, 2

The sequence: save a prediction first, then reveal the actual output, compare it with the prediction, and make a judgment. An illustration explaining the process of withholding the results until after the prediction.

Then you reveal the actual output, compare it with your prediction, and judge each question. You can mark whether the result matched your expectation or whether you had misunderstood the behavior. You can also ask for the change to be reverted or for some of it to be separated out. The creator says that if even one item is reverted or separated, the task goes back to AI with an explanation. If the same question is sent back a second time, the recommendation is to agree on the design again rather than keep making repeated fixes. 2

If you accept everything, AI creates a request to merge the changes, called a PR, and records the behavior a person checked in its description. A PR is a request opened to review and merge changes. According to the creator, incorrect predictions are also left in the record as they were. 2

There’s also a process for checking AI-written explanations against the outputs. It mechanically checks whether numbers and quoted values in the explanation appear in the actual output, and whether citations from the task specification or conversation match the originals. Claims that couldn’t be verified through execution are marked separately as “no execution evidence.” The aim is to help readers distinguish which parts of the explanation are tied to actual runs. 2

Carrying a discount decision forward to the next change

When checking shipping costs, some decisions can’t be settled by looking at outputs alone. For example, how should an order be handled if its cart total is 50,000 won but its total after a discount falls below that amount? The creator gives “base it on the amount after the discount” as an example of a decision that can be saved and linked to the relevant code and tests. 1

A mobile shopping cart displays the price before discount, 6,600 won; the price after discount, 6,500 won; and a product discount of 100 won.

Image source · shopnotice.cafe24.com

The purpose of this record is to give AI the context behind a decision when it changes the same part of the code in the future. Rather than explain from scratch each time why a rule was chosen, the decision is linked to the code and tests that implement or check it. According to the creator, only decisions a person has chosen to keep in the repository, or decisions a person has confirmed were finalized in a discussion, are recorded. 1, 2

When a new task starts later, AI retrieves related records before changing the relevant files. But those records aren’t treated as answers that will always remain correct. If the linked code has disappeared or a test that enforces the decision fails, the creator says the record is flagged as potentially outdated, and AI is expected to ask a person about it. 2

What if the code changes again after review?

Even after someone has checked the shipping results, the code may change again. Heirloom says it records the review status against the same commit as the code a person judged. A commit is a snapshot of code changes saved at a particular point in time. If a new commit is added after the review, that commit won’t have the same status, making it possible to see in the PR that the code has changed since the version that was reviewed. 2

A GitHub PR overview showing that approval is required and displaying approvals by reviewer.

Image source · github.blog

According to the creator, if the code changes after review, the previously used commands are run again, and only questions whose outputs have changed are asked again. Each repository decides whether a review status is required for merging. 2

There are limits on execution, too. Commands run in a temporary workspace with the current user’s permissions, after that person has approved them. The dashboard is accessible only at an internal address on that computer. But the creator says the tool can’t prevent a program running with the same operating-system user permissions from deliberately bypassing it. The goal, they explain, is detection and auditing rather than complete prevention. 2

Wrap-up

Let’s return to the 50,000-won cart. A report that tests passed can be a starting point, telling you the checks have finished, but it doesn’t answer what the shipping charge will be for an order of exactly 50,000 won or how the discount threshold is applied. Before merging, a person can run important inputs directly, compare the results with their expectations, and record the reasons behind decisions for the next change. 1, 2

When reviewing work assigned to AI, what result would you want to inspect yourself first?

References

  1. ↩
  2. ↩