The Compile-Once Enterprise · Retail group

Larkmere is a fictional composite. Industry facts are sourced; company figures are illustrative.

Architecture concept · Whole retail group · 2027 planning

Empty shelves and excess stock cost retail $1.73 trillion a year. Most groups still write every fix once per country.

That's IHL Group's 2025 estimate, 6.5% of global retail sales.1 A retail group asks the same questions in every banner and every market. What is really on the shelf? What was the price before this promotion? Who bought the recalled lot? Who can work on Saturday, and with how much notice? Each line answers with its own code, on its own point-of-sale and order systems, behind its own change queue. The Compile-Once Enterprise answers each question once: a model builds the function as small, tested code, and plain code runs it in every store, site and country.

The LLM builds. Code runs.

An architecture concept by Muthukumar Subramanian · Agentic AI Architect

Larkmere is a fictional composite. Industry facts are sourced; company figures are illustrative.

The rules arriving at the shelf edge

Sourced dates

Meet the group

Larkmere: twelve countries, eight business lines, one start-up still joining

A fictional retail group built from what the largest real ones look like. Hypermarkets and convenience stores, e-commerce, a marketplace, pharmacies, its own brands and sourcing offices, a loyalty programme that also sells advertising, and a quick-commerce start-up it bought this year. Every line grew its own systems. Every country runs its own tills.

Directory · business lines

  • 01
    Hypermarkets410 stores in 9 countries · food, home, clothing, fuel
  • 02
    Convenience2,900 stores in 9 countries · franchise and owned
  • 03
    E-commerce12 sites and apps · home delivery, click and collect
  • 04
    Marketplace41,000 third-party sellers in 8 countries
  • 05
    Pharmacy640 in-store pharmacies in the US, Canada, Mexico and the UK
  • 06
    Private label and sourcing9,000 own-brand products · 4 sourcing offices
  • 07
    Loyalty and retail media38 million members · audiences sold to brands
  • 08
    Quick commerceKitebasket, acquired March 2026 · 64 dark stores in 9 cities across the UK, the Netherlands and Germany

Back of house · shared functions

Merchandising and pricingSupply chain · 14 DCsFinanceHR · 310,000 people, mostly hourlyProcurementPropertyLegal and complianceCyber and IT

Partners at the loading dock

6,200 suppliers41,000 marketplace sellersCarriers and last-mile partnersPayment providersBrand advertisers

Twelve countries

USUnited StatesCACanadaMXMexicoBRBrazil UKUnited KingdomNLNetherlandsDEGermanyPLPoland ESSpainAEUAEZASouth AfricaMYMalaysia

The question nobody can answer fast

"How many versions of this rule do we run?" Pricing, recall, returns and rota rules are each coded once per line and often once per country.

Under the floor
Source systems, by category. They stay where they are.

POS ×12, one per countryERP ×3WMS ×5OMS ×4Loyalty ×2Supplier portals ×6Pharmacy dispensing ×3Workforce scheduling ×4Payroll ×7Marketplace platform ×1Kitebasket: own catalogue, OMS, rider app

All company figures are illustrative.

The group as one planogram

Shelves are business lines. Bays are countries. Every label is an answer.

Watch one pricing rule go from forty-two hand-coded answers to one tested capsule, then three jobs that cross the whole group: a recall, a promotion, and the acquired start-up joining. Click any shelf, sphere or capsule label to see what sits there.

01 / 08 · Today

    All store counts, timings and volumes in the animation are illustrative. Keyboard: focus the planogram, use the arrow keys to move between shelves and Enter to open one; Space plays or pauses.

    What's hurting retail right now

    Ten pressures on a retail group's board in 2026

    Not only the shop floor. Finance, regulation, people, suppliers, sellers, customers, the acquisition and cyber all land on the same systems. Each one names the capsule or constellation that helps, and says where a person or a model has to stay.

    $1.73Ta year · 2025

    Inventory distortion and phantom stock

    IHL Group puts out-of-stocks and overstocks at $1.73 trillion in 2025, 6.5% of global retail sales, with Asia-Pacific the largest region at $642 billion.1 In a group, each country's tills and warehouses keep their own idea of on-hand stock, and the website promises what the shelf no longer holds.

    With Compile-Oncewhere-is-it and phantom-stock-finder on the Stock sphere read every store, DC and dark store through one contract, stock.v9, and raise count tasks. Same code in every market.

    −12.4%shoplifting incidents, 2025 · fraud up

    Theft moving from the shelf to fraud

    NRF's 2026 study found shoplifting incidents fell 12.4% in 2025, after an 18% rise in 2024. The losses moved: 69% of retailers saw more phone scams, 51% more loyalty fraud and 42% more gift-card fraud.23

    With Compile-Oncerefund-void-watch on Store Ops and points-anomaly on Customer scan every till and loyalty account each hour and hand investigators a ranked list. Accusing anyone stays with a person.

    30 daysEU prior-price window

    Reference prices and the 30-day rule

    The Court of Justice confirmed on 26 September 2024 (C-330/23) that an announced reduction must be measured against the lowest price of the prior 30 days.4 In the UK the CMA has fined consumer-law breaches directly since 6 April 2025, up to 10% of global turnover.5

    With Compile-Oncelowest-prior-price on Price & Promo, built once in the Forge and installed in every line and country with the local window as a parameter. It's the capsule in the animation.

    2 working daysEU GPSR · since 13 Dec 2024

    Marketplace product safety

    The General Product Safety Regulation requires online marketplaces to act on authority orders about dangerous products within two working days and to notify affected buyers.6 Since February 2024 the Digital Services Act has also required them to trace and verify the traders they host.7

    With Compile-Onceseller-kyb-check and listing-takedown on Sellers & Listings, joined to affected-buyers in the recall constellation. Judging whether a product is dangerous stays with product-safety people.

    €3per item · EU · from 1 Jul 2026

    Low-value parcels lose duty-free entry

    The US ended duty-free de minimis entry for low-value shipments on 29 August 2025.8 From 1 July 2026 the EU charges a temporary €3 customs duty per item, by tariff classification, on parcels worth up to €150.9 Landed cost, seller fees and checkout prices all move for cross-border offers.

    With Compile-Oncelanded-cost on Price & Promo groups each parcel's items by tariff classification and computes duty, carrier and seller fees for every cross-border offer. Classifying a new kind of product stays with a customs specialist.

    12 Aug 2026EU packaging rules apply

    Packaging data for every own-brand pack

    The EU Packaging and Packaging Waste Regulation (2025/40) began to apply on 12 August 2026, with obligations phasing in after that.10 For a group with 9,000 own-brand products, pack materials and weights have to be right for every country.

    With Compile-Oncepack-data-gap on Product flags own-brand items missing material and weight data; epr-fee-calculator on Finance computes producer fees per country from the same contract.

    1 Jul 2025LA County fair workweek · EU pay reports 2027

    Hourly workforce rules, city by city

    Oregon has a statewide predictive scheduling law and cities including New York, Chicago, Seattle and Los Angeles have their own; Los Angeles County's took effect on 1 July 2025.1314 EU pay transparency rules were due in national law by 7 June 2026, with the first pay-gap reports in June 2027.15

    With Compile-Onceschedule-notice-check on People tests every rota change against the local rule; pay-gap-report builds the EU report from the same people.v4 contract. Rota trade-offs stay with the store manager.

    $849.9BUS returns · 2025

    Returns, return fraud and what happens next

    NRF and Happy Returns expect US shoppers to return $849.9 billion of goods in 2025, 15.8% of sales and 19.3% of online sales; retailers estimate 9% of returns are fraudulent.12 In the EU, large companies may not destroy unsold clothes and shoes from 19 July 2026.11

    With Compile-Oncereturn-eligibility, return-fraud-score and disposition-router decide refund, resale, outlet or donation and keep the record the EU disclosure will ask for. Refusing a customer stays with a person.

    ~$70BUS retail media · 2026 forecast

    Retail media that finance can trust

    eMarketer expects US retail media ad spending to near $70 billion in 2026.16 Brands pay for closed-loop proof, and the IAB/MRC Retail Media Measurement Guidelines (January 2024) set out how incrementality and reporting should work.17

    With Compile-Oncecampaign-lift-report on Retail Media computes test-versus-control lift from the same sales data finance uses, so the brand's report matches the ledger. Choosing test design for a new format stays with an analyst.

    £270–440Mone 2025 UK retail cyber event

    Cyber resilience across a sprawling estate

    In June 2025 the UK's Cyber Monitoring Centre rated a ransomware campaign against two major UK retailers a Category 2 systemic event, with estimated costs of £270 million to £440 million.18

    With Compile-OnceCapsules are small, versioned code with no model calls at run time, so they can be redeployed from the Exchange onto clean infrastructure in a known state. Containment and the decision to reconnect stay with the security team.

    The group on Compile-Once

    Fourteen spheres, twenty-four capsules, three constellations

    Group spheres are shared by every line. Line spheres belong to one business line. Each is reached through a versioned contract; the tills, ERPs, warehouses and order systems stay where they are. Every capsule is a small, tested program bound to one sphere, with a named owner and zero model calls at run time.

    Group spheres SHARED BY ALL LINES

      Business-line spheres OWNED BY ONE LINE

        Capsules on the Exchange, by who uses them

        H hypermarketsC convenienceE e-commerceM marketplaceRx pharmacyQ quick commerce

        Three constellations that cross the group

        Timings illustrative

        The people side

        Who does what when the code writes itself

        The software team's work moves from writing the same rule twelve times to owning contracts, governing the Forge and curating the Exchange. Store and DC teams get task lists from capsules; the decisions stay theirs.

        Per sphere

        Contract owners

        Group Pricing owns price.v5; Supply Chain owns stock.v9. A contract owner decides what the sphere guarantees, signs off each new version and answers for the tests every bound capsule must pass.

        Group level

        Forge governance board

        Pricing compliance, privacy, security, architecture and one rotating business-line lead. It decides which spheres the Forge may build on, reviews regenerations after a contract change and keeps approvals small enough to read.

        Group level

        Exchange curators

        They merge near-duplicate capsules using usage data, retire the ones nobody runs, and publish what each line and country can install. The Exchange is also the inventory auditors ask for.

        Per country

        Parameter owners

        Local teams stop maintaining forks. They own the values a capsule takes in their market: the prior-price window, notice periods for rotas, public holidays, packaging fee rates.

        New role · titles still settling

        Forward deployed engineers

        An FDE is an engineer who sits with a business team, here a country's pricing desk or the Kitebasket integration team, and turns their needs into Forge requests and contracts. Some groups will call it something else.

        Stores, DCs and dark stores

        The people who decide

        A store manager still settles a rota trade, a pharmacist still decides on a prescription, a loss-prevention lead still decides whom to approach. Capsules hand them better lists.

        Edges, honestly

        Where code alone isn't enough in retail

        Compile-Once moves repeatable work into code so people and models are spent where judgement matters. These are the places to design for from day one.

        For retail leaders planning 2027

        Planning 2027 at retail-group scale? Let's map your first Data Sphere.

        Start with one business line and one sphere. Write its contract with the people who own the data, forge the first capsules, and install one of them in a second line or country. Then measure.

        Talk to Muthukumar on LinkedIn

        A working conversation about your group, your lines and where a first sphere would pay back.

        A first 8 weeks

        Illustrative pilot
        1. Weeks 1–2
          One line, one sphere, one contractFor example Price & Promo for one country's e-commerce. Write price.v1 with its owner: sources, schema, rules, access.
        2. Weeks 3–6
          Forge 10–20 capsulesPrior-price check, promo stacking, markdown rules, landed cost. Each with tests and a named owner.
        3. Weeks 5–7
          One cross-line reuseInstall one capsule in a second line or country with its local parameters. No copies.
        4. Weeks 7–8
          MeasureRuntime cost, latency, change backlog and audit readiness, against the path you run today.

        Sources

        Behind every figure, rule and date

        Industry facts only. Nothing here describes Larkmere, which is fictional.

        1. IHL Group, "Retail Inventory Crisis Persists Despite $172 Billion in Improvements" (Sept 2025). ihlservices.com; and Board, "The $1.73 trillion wake-up call". board.com
        2. NRF, "Retailers see fraud schemes evolve as shoplifting declines, NRF study finds" (30 July 2026). nrf.com
        3. NRF, "New study finds retailers continue to contend with rising levels of theft and violence" (October 2025). nrf.com
        4. Court of Justice of the EU, press release 152/24, Case C-330/23 (26 September 2024). curia.europa.eu
        5. GOV.UK / CMA, "CMA to boost consumer and business confidence as new consumer protection regime comes into force" (April 2025). gov.uk
        6. Regulation (EU) 2023/988 on general product safety, applies from 13 December 2024. eur-lex.europa.eu
        7. Digital Services Act, Regulation (EU) 2022/2065, Article 30, traceability of traders. springlex.eu
        8. The White House, fact sheet on suspending the de minimis exemption for commercial shipments globally (July 2025), effective 29 August 2025. whitehouse.gov
        9. European Commission, "Ensuring fairness and safety: €3 customs duty on low-value parcels" (29 June 2026). commission.europa.eu
        10. European Commission, "New EU rules on packaging enter into application" (August 2026). environment.ec.europa.eu
        11. European Commission, "Ban on destruction of unsold clothes and shoes enters into application" (July 2026). environment.ec.europa.eu
        12. NRF and Happy Returns, "Consumers expected to return nearly $850 billion in merchandise in 2025" (October 2025). nrf.com
        13. SHRM, "Understanding Los Angeles County's new Fair Workweek law". shrm.org
        14. Paycor, "Predictive work schedule laws: a city-by-city guide". paycor.com
        15. Mayer Brown, "EU Pay Transparency Directive: practical briefing for international employers" (June 2026). mayerbrown.com; KPMG GMS Flash Alert 2026-214. kpmg.com
        16. eMarketer, "US retail media ad spending will near $70 billion in 2026". emarketer.com
        17. IAB and MRC, Retail Media Measurement Guidelines (January 2024). iab.com
        18. CIR Magazine, the Cyber Monitoring Centre's Category 2 assessment of the 2025 UK retail cyber event (June 2025). cirmagazine.com