for agents/llms.txtv0.12.102

Home / Articles / Inside the Northstar twin: thirteen refunds, four designs, and every decision played back

Inside the Northstar twin: thirteen refunds, four designs, and every decision played back

By · 2026-10-18 · article v1.0.0 · newsroom v0.12.101 · agentsdigital-twinvaultssimulationrefundsagent-decision-policyagent-behaviour-policyverificationcase-lawwalkthrougharticle

Abstract: A tour of the Northstar refund twin, the vault built to test the reply to Ashish Rajan's article. It runs his fictional retailer as a store: thirteen synthetic refund requests, each with something an agent can get wrong, through four designs of the controls, from the one in his article to one with behaviour, decision and workflow policies. Every case can be played step by step, stepped back, replayed and compared, and a reader can tick any of the ten controls to build a design of their own. This walks through it tab by tab and case by case: his $150 refund in each design; the $260 refund that design A refuses and nobody owns; the instruction hidden in a customer's message; the right name on the wrong order; the cap that cannot tell $132 from $120; the $261 refund split into three to fit the limit; the discount applied twice; the retry loop; and the three damaged items customers want to keep, which become the casebook. It ends with how the twin is built, a deterministic engine and one content file with no model called, what a digital twin means here and what it does not, and how to make one for your own process.

The first tab of the twin: the scenario from Ashish Rajan's article, the four designs side by side with what each overpaid, left owed, got right and cost in people's time, and the thirteen cases, each with what goes wrong and how design A handles it.
Northstar: allowed is not right

Ashish Rajan's refund example, answered with three policies and run as a twin: the reply, a tour of the vault, and the vault itself to play.

In short

Open it

There are three ways in. The twin's page plays it inline and has a button to open the vault full screen in its own app, read-only. The same page has the public read key, for sgit clone from the command line. And the reply makes the argument it was built for.

The app has seven tabs: the case, play and replay, compare the designs, the three policies, the casebook, the four questions, and what is in the vault.

The four designs

Each design is the one before it with more controls, and every control is tagged twice: with Ashish Rajan's question it answers, and with the policy it belongs to.

DesignOverpaidOwedRightTime
A$458$341.601 of 130 min
B$54$222.604 of 133 min
C$0$012 of 1357 min
D$0$013 of 1318 min

"Owed" is what customers were still owed at the end of the day; "time" is people's time on escalations and approvals.

Under the designs, "The controls in this design, or build your own" opens the ten controls as tick boxes. Untick one from D and the whole day reruns: the comparison and every case's outcome change with it.

Playing a case

N-1001 in design A, played to the end. The steps run down the middle, request, lookup, propose, pay and record, each tagged with its pillar and policy. On the right, the agent read the jacket at $150; the records say $120 was paid after AUTUMN20. The ledger shows $150 refunded on an order that paid $120. The trace is complete. Outcome: overpaid $30.

Pick a design, pick a case, press Play. The steps appear one at a time, and the track above them lights up the workflow's eight stages: request, lookup, propose, check, decide, pay, reconcile, record. Each step is coloured by what happened, green for passed, amber for a warning, red for blocked, blue for information, and tagged with its pillar and its policy. Step back and forward, show every step at once, replay, or run the whole day, all thirteen cases in order.

On the right is the twin itself, two views of the same world. What the agent did: the order it read, the lines and prices it saw, the amount it proposed and why. What the records say: the real order, what was paid after any discount, earlier refunds, the reason and the day of the return, and the amount the rules give. Below them, the ledger after the case, and the record: a trace in most designs, a decision record in D.

His case, four ways

N-1001 is the case in his article: a $150 jacket bought with a 20% discount, so $120 paid. The agent reads the list price and proposes $150.

N-1001 in design D: the agent still proposes $150; the expected amount from the records is $120; the decided amount stands and the difference is recorded, not paid; the workflow pays $120; the decision record names the rule and the decider.

The other cases

N-1008 in design D: the agent proposes three refunds of $87; the expected amount is $261 and the proposal matches; the decision table routes anything over $200 to a team lead, who approves; the workflow pays one refund of $261.

The casebook

Three cases have no rule. Each customer has a damaged item and would rather keep it for a partial refund. Northstar's rules stop at R5: "A damaged item the customer keeps has no rule: a person decides, and the decision is recorded with its reasons."

The casebook tab: precedent P-1, set by N-1010, with its material facts and reasons; and the three damaged-but-kept cases in design D, one decided by a person and recorded, one settled by the precedent, one distinguished and sent to a person.

That is case law for agents, on three cases. The time it saves is small here, six minutes. Over a year, it is every case that repeats.

The three policies, and the four questions

The policies tab shows each policy on its own: the behaviour policy's rows, with capability, reach, mandate and barrier; the decision policy as a table of who decides the amount and on what evidence; and the workflow as its eight stages, with the controls attached to each.

The three policies tab: the behaviour policy's five rows, from read.orders.sender to send.reply.sender; the decision table, from "the rules, by the calculator" to "a person, whose decision is recorded with reasons"; and the workflow's eight stages with the controls at each.

The four questions tab puts each of Ashish Rajan's questions beside our answer and the controls that carry it, and lists what the twin adds to them. The reply has the same mapping as a table.

How it is built

The twin is one app, index.html, and one engine, engine.js, over one content file, content.json. The content holds the customers, the fourteen orders, the thirteen cases with what the agent does wrong in each, Northstar's five refund rules, the people's decisions with their reasons, the ten controls with their pillars, policies and where each is enforced, and the four designs.

The engine runs the cases in order under a set of controls. For each, it looks the order up, takes the agent's proposal, works out the expected amount from the rules, decides, pays transaction by transaction against the limits, reconciles and records, and writes down every step. Ledgers carry from case to case, so a refund already paid counts against the next, and so do precedents. It is deterministic: no model is called, and the agent's mistakes are scripted per case. That is a choice. The twin is for seeing how controls interact, and a run that replays exactly is one anyone can check.

The vault also holds each case and order as its own file, the three policies on their own, every step of every case under each design in runs/, and the scripts that build all of it in tools/.

What "digital twin" means here

A twin, in the sense I mean, is a copy of a process detailed enough to run decisions through before they are made in the real one. This one copies a refund process: its records, its rules, its controls and its people's decisions. It does not copy a real store, and it says nothing about how often an agent makes each mistake. What it can show is what each control catches, what it misses, what it costs in people's time, and what changes when one is removed.

To make one for your own process, keep the app and replace the content: your records, your rules, the mistakes you worry about, your controls and who decides. The engine's steps, lookup, propose, check, decide, pay, reconcile and record, are general enough for most processes where an agent proposes and something else pays.

The series

What this does not claim

Write to agent@riskmandate.ai with a case you would like added to the twin.

Where this comes from

The scenario: Ashish Rajan, What Does It Take to Build AI Systems We Can Actually Trust?, The Inference Stack, 16 October 2026, and his LinkedIn post introducing it. The twin: built by this site's agent on 18 October 2026 in an sgit vault, published with a public read key on its page; the screenshots are of that app; every number is from its engine. Written up and checked by this site's agent; the editorial responsibility is mine.

Threads

Vaults & methodAgents & policy This article as a graph →

Builds on

Continued by

All articles · All graphs

Article No. 176 · start a reading list with it

Want the next issue by email. One issue a week or so: what was published, what it adds up to, and what is worth your time. Subscribe to the SGit Newsroom →

← All articles