← All work

Business software·2026

NewBranch OS

One operating system for a service business, joining customers, work, money and automation, with a Company Brain that answers why questions from cited records and AI agents that cannot act without approval.

Client
NewBranch (in-house product)
Role
Product strategy, architecture, design, engineering
Sector
Business software
Status
Cleared for controlled pilot
NewBranch OS operational memory screen with cited records

The challenge

Owners of growing service businesses run customers, delivery and money in separate tools. Answering a plain question, such as why a client has not paid, means opening several systems and asking around.

Our approach

We built one modular application on a single Postgres database, joined by one durable event backbone. The Company Brain indexes those events as cited memory, and AI agents can read it but cannot take a material action until a person approves it.

In brief

171

tenant tables, every one protected by row-level security

9

kinds of source the Company Brain indexes, each with a citation

17

acceptance criteria scored from live data before we call it connected

What we found

Capable modules, joined badly.

NewBranch OS started life as JourneyFlow, a client-journey platform, and grew modules for CRM, operations, finance, commerce and a document-based Company Brain. An internal audit in August 2026 found that each module worked on its own but the joins between them did not.

The durable event outbox existed, but nothing consumed an operations or finance event to create work in another module. The only live automation ran on a second, browser-side event path. With two competing integration routes and no domain consumers, a won deal did not reliably become a handover, an order and an invoice. That is the gap an owner feels when one screen disagrees with another.

What we built

One event backbone, and one owner for every business concept.

Every material action now publishes one event to a single transactional outbox. The event records the organisation, the record it concerns, who acted and when, plus correlation and causation ids that tie a deal to the handover, order, invoice, payment and fulfilment that followed. Each consumer records what it has processed, tolerates duplicate delivery, retries with back-off, sets aside events that keep failing and can replay them.

Each business concept has exactly one owner. The CRM owns the relationship, operations owns orders and projects, finance owns invoices and payments, the journey engine owns process state and the Company Brain holds memory. Modules talk through versioned events and public functions and never read each other's private tables. The acceptance harness runs a fresh deal through the chain below, and also checks that client conversations raise delivery risk and that an overdue invoice enrols the account in collections.

  1. 01Deal wonCRM
  2. 02HandoverCRM to operations
  3. 03OrderOperations
  4. 04InvoiceFinance
  5. 05PaymentFinance
  6. 06FulfilmentOperations, released by payment
  7. 07Customer healthBack to the CRM
The connected lifecycle, with the module that owns each step. A won deal becomes exactly one handover, order and invoice.

Company Brain

Memory that cites its sources and respects permissions.

The first Company Brain was document search: files split into passages and retrieved by similarity. That cannot answer the questions owners actually ask, such as why an invoice is unpaid or what happened after a deal was won. The evidence for those answers was already being written to the event backbone, so we made the backbone the memory.

The Brain now indexes selected CRM, operations, finance and journey events alongside documents, decisions, approvals, metrics and conversations. Every memory row carries its citation: the source record, the event, the actor, the time and the correlation chain. A question about an unpaid invoice is answered by walking that chain and returning the cited evidence, not by generating a paragraph.

Retrieval runs with the asking user's own permissions, so the Brain cannot reveal anything the user could not see in the source module. Finance evidence is marked restricted and shown only to admins. Deleting a source removes its citations, and a retention policy archives memory unless it is under legal hold.

AI agents

Agents can propose. A person approves.

Agents receive context through a single pack assembled from public module functions, and every item in it carries its source, timestamp, version and a freshness flag. They act only through a typed tool registry. Each tool declares its module, the role it needs, whether it is safe to repeat, its side effects and the audit event it writes.

Material actions are registered as needing approval: fulfilling an order, issuing or crediting an invoice, raising a purchase order, deciding a risk signal. When an agent proposes one, the request is recorded and nothing runs until an admin approves it. Proposals, approvals, executions and failures are written back to the Brain. A deterministic evaluation suite tests grounding, permissions, hallucination, tenant isolation, stale context, tool misuse and refusal.

  1. 01Agent proposesFrom the cited context pack
  2. 02Request recordedPending approval, nothing runs
  3. 03Admin approvesOnly an admin can dispatch it
  4. 04Tool runsTyped, permissioned and audited
  5. 05Outcome storedWritten back to the Company Brain
How a material action moves from an agent's proposal to execution. Every step is recorded as memory.

Tenancy and security

Isolation enforced in the database, then tested.

Each organisation's data is separated by Postgres row-level security keyed to the signed-in user's verified identity, never to an organisation id sent by the browser. A forged id returns no rows. Roles are read from live membership records rather than token claims, so a removed user loses access straight away. The browser only holds a publishable key; anything privileged runs in a server function.

We ran a tenancy security assessment against the code and the live schema, including a dynamic isolation test. It found no critical or high issues and no cross-tenant path. All 171 tenant tables have row-level security, and vector search filters by organisation before it ranks by similarity. It also found two public endpoints that write without authentication (neither can cross tenants) and no automated isolation suite in CI across the whole schema. The verdict was a conditional pass.

Interface

Rebuilt so the evidence is the first thing you see.

An audit scored the design system 2.4 out of 5. The foundations were sound, but three component libraries ran side by side, the same primitive existed up to five times and hundreds of hard-coded colours bypassed the tokens. We consolidated rather than rebuilt: one accessible base layer, one product layer for NewBranch parts such as briefings and metric bands, brand assets only in the brand layer, and repository checks that fail when new drift appears.

The first full migration was the Brain's operational memory screen. Before, two paragraphs of explanation and a stacked metric block pushed the evidence table about 550 pixels down the page, with no filters and no way to inspect a row. After, the table starts 216 pixels below the top bar, around fifteen rows fit in the first view, filters sit on the data and a side inspector shows the full citation. Every value on screen maps to a field the database returns. The data has no freshness signal yet, so the screen makes no freshness claim.

Operational memory screen before the redesign, with explanatory paragraphs and a stacked metric block above the evidence table
Before. Two paragraphs and a stacked metric block push the evidence table about 550 pixels down the page.
Operational memory screen after the redesign, with a one-line metric band, filters on the table and rows starting near the top
After. One line of measures, filters on the data and the table 216 pixels below the top bar. Demonstration tenant.
NewBranch OS operations workspace
NewBranch OS record inspector

Key decisions

What we chose, why, and what it cost us.

  1. 01

    Extend the existing database outbox as the only event path, instead of adding a message broker.

    Why

    The outbox already existed. One durable path inside a modular monolith can be tested, traced from deal to payment and watched for health, with no new service to deploy or secure.

    Trade-off

    Two runtimes, one in the database and one in server functions, share the same queue. We bounded that with a strict split of consumers, and the in-database dispatcher has to be scheduled in production.

  2. 02

    Build the Company Brain on the event backbone, not as a bigger document search.

    Why

    The questions owners ask are about what happened and why. Those answers live in operational events that already carry actors, times and correlation ids, so indexing them avoids a second copy of the truth.

    Trade-off

    Why queries return cited evidence rather than fluent prose. Semantic search over documents stays a separate layer that can sit on top.

  3. 03

    Let agents propose material actions but never execute them without an admin.

    Why

    Fulfilment, invoicing, purchase orders and risk decisions change money and commitments. The gate lives in the platform, so it holds whichever model sits on top.

    Trade-off

    Every material action waits for a person. So far the registry dispatches only the highest-risk tools; others are added one declaration at a time.

  4. 04

    Make row-level security the security boundary and treat interface gates as convenience.

    Why

    Hiding a button protects nothing. Enforcing access in Postgres, keyed to the verified user, means a bug in the interface cannot expose another organisation's data.

    Trade-off

    Every new table needs row-level security and explicit policies before it passes review, and every query still filters by organisation for cache correctness.

  5. 05

    Consolidate the design system rather than start again.

    Why

    The audit showed the raw materials were strong. The problem was parallel libraries and no governance, which a rebuild would not have fixed.

    Trade-off

    Changes are additive first and roll out page by page with screenshots, because shared defaults feed hundreds of files. Old components are deleted only once nothing calls them.

  6. 06

    Organise the product around business areas, not software modules.

    Why

    Only 17 of 157 routes were reachable from the sidebar, and users had to think in CRM, ERP and finance terms. The product is now arranged as Today, Customers, Work, Money, Engage, Store, Automate and Knowledge.

    Trade-off

    Every legacy address has to keep resolving through tracked redirects until it can be retired, and internal reliability pages moved behind a system-only boundary.

  7. 07

    Show nothing the data cannot support.

    Why

    An operating system that invents a freshness score or a relationship loses trust the first time someone checks. Each value on the migrated screen traces to a returned field.

    Trade-off

    Some useful indicators, such as staleness and saved views, wait until the backend can supply them honestly.

Where it stands

NewBranch OS is our own product and is not yet generally available. The tenancy release gate clears it for a small number of controlled pilot tenants. Broad onboarding waits on the items below.

What we would do next

  • 01

    Run the cross-tenant isolation test against every tenant table in CI, so a future change cannot quietly open a gap.

  • 02

    Add authentication to the two public write endpoints the assessment flagged.

  • 03

    Confirm that platform-admin reads of tenant data are logged.

  • 04

    Replace the demonstration checkout settlement with a real payment provider before any live payment is taken.

  • 05

    Give operational memory an as-of contract so the interface can show when evidence is stale.

  • 06

    Move the remaining product areas onto the new interface system in reviewed waves.

Written from NewBranch's architecture decision records (August 2026), the tenancy security assessment and release gate, the design system audit and the interface pilot report. No client data appears on this page.