Seria: Doświadczenie, AI i zarządzanie firmą · 1/4

Jak zamieniłem doświadczenie w ORPR

Otwarty standard procesów handlu detalicznego powstał z prostej potrzeby. Agent AI musiał mieć punkt odniesienia, zanim zacznie zgadywać, jak działa retail.

Najdroższe nieporozumienie między biznesem i IT potrafi zmieścić się w jednym zwyczajnym słowie. „Sprzedane”. „Dostępne”. „Przyjęte”. Każdy uczestnik rozmowy rozumie je bez trudu. Problem zaczyna się wtedy, gdy każdy rozumie je odrobinę inaczej, a na tej podstawie powstają decyzje albo kod systemów IT wspierających zarządzanie.

Im łatwiej tworzyć oprogramowanie, tym dokładniej trzeba określić, jak ma działać biznes, który ono obsługuje. Szybka implementacja zazwyczaj skraca drogę od niejasnego założenia do kosztownego błędu.

To jeden z powodów, dla których zbudowałem „Open Retail Process Reference”. Jest to otwarty, wersjonowany standard architektury procesów biznesowych w handlu detalicznym. ORPR ma dawać wspólny punkt odniesienia ludziom projektującym zmianę oraz systemom i agentom AI, które pomagają ją wykonać.

Impuls do opracowania tego standardu pojawił się podczas pracy nad aplikacją tworzoną metodą Spec Driven Development, czyli na podstawie specyfikacji opisującej oczekiwane działanie. Potrzebowałem materiału, do którego agent AI mógłby się odwołać, zanim zacznie uzupełniać brakujące informacje własnym wyobrażeniem o retailu.

Bez tej warstwy proces SDD generuje zbyt dużo kosztownych w usuwaniu błędów. Większy problem jest jednak w tym, że nie jest ich w stanie wykryć ani informatyk, ani nawet analityk biznesowy. Do tego potrzebna jest wiedza wykraczająca poza to, jak działa proces czy funkcjonalność. Niezbędna jest perspektywa całego biznesu.

Zacząłem od podstaw. Co opisujemy, gdzie stawiamy granice i po czym poznamy poprawne wykonanie? Odpowiedzi ukształtowały konstrukcję ORPR.

Proces rozpoznajemy po wyniku i granicach

Nazwa działu nie wystarcza. Zakres modułu systemu też nie. To, że dwie czynności wykonuje dziś jeden pracownik albo jedna aplikacja, nie przesądza, że stanowią ten sam proces.

Weźmy sprzedaż z późniejszym odbiorem towaru. Klient kupił produkt, ale jeszcze go nie odebrał. Firma ma zobowiązanie wobec klienta. Towar nadal fizycznie stoi w lokalizacji. Trzeba ograniczyć możliwość ponownego sprzedania tej samej ilości, a jednocześnie zachować prawdziwą informację o jej fizycznym stanie.

Jeżeli system utożsami sprzedaż z wydaniem, utraci tę różnicę. Później zaczyna się łatanie dziur: wyjątki, dodatkowe pola i ręczne wyjaśnienia. Ten błąd oglądałem w systemach obsługujących setki punktów sprzedaży i naprawa zawsze wyglądała tak samo. Dodatkowe pole i instrukcja dla kasjera.

W ORPR SAL-01 opisuje przejście od koszyka do sprzedaży, a SAL-03 przejście od sprzedaży do wydania towaru. To rozróżnienie ma konkretny skutek. Zapis sprzedaży nie jest dowodem fizycznego wydania, więc rozchód musi mieć własne potwierdzenie.

Taki zapis pomaga zarówno w rozmowie biznesowej, jak i przy projektowaniu systemu. Daje też podstawę do oceny, czy rozwiązanie wykonało to, co miało wykonać.

Reguła musi wytrzymać sprawdzenie

Zdanie „system ma prawidłowo obsługiwać sprzedaż” pozostawia prawie całą pracę do wykonania. Słowo „prawidłowo” ma tę wygodną właściwość, że każdy może podpisać pod nim coś innego. Trzeba ustalić, jakie zdarzenie kończy sprzedaż, co ją pokrywa, co dzieje się przy ponowieniu komunikatu i które skutki należą już do innych procesów.

Dlatego ORPR zawiera niezmienniki, czyli warunki, które muszą pozostać prawdziwe podczas działania procesu, oraz kontrakty określające jego granice. Ich wartość polega na tym, że można skonfrontować z nimi konkretne wykonanie.

Model potrafi przekonująco uzasadnić swoje działanie. Branie takiego wyjaśnienia za dobrą monetę to za mało, trzeba jeszcze sprawdzić rezultat. Opis warunku i dowód jego spełnienia pozwalają oddzielić te dwie rzeczy.

Brak decyzji trzeba ujawnić

Organizacje mają różne modele działania. Ten sam proces występuje w sklepie niezależnym, programie partnerskim i sieci własnej, ale prawo do decyzji może należeć do innych osób lub podmiotów. Przeniesienie rozwiązania z jednego modelu do drugiego wymaga rozpoznania tych różnic.

Z tego powodu karta zawiera pytania analityczne. Mają pomóc odkryć, czego jeszcze nie ustalono, jakie warunki występują w konkretnej firmie i gdzie pozorna zgodność nazw ukrywa różnicę działania.

Jeżeli nie wiadomo, kto może zwolnić potrzebę do zakupu, agent nie powinien rozwiązywać problemu przez wybranie najbardziej prawdopodobnej roli. Powinien ujawnić brak rozstrzygnięcia. To organizacja nadaje uprawnienie i bierze odpowiedzialność za jego zakres.

To samo dotyczy odstępstw od referencji. Firma może mieć uzasadniony powód, żeby działać inaczej. Różnica powinna być jawną decyzją z opisanymi konsekwencjami. Wymagań wynikających z prawa nie można przy tym traktować jak dowolnej preferencji projektowej.

Człowiek i maszyna potrzebują tej samej wersji treści

Każdy proces ma stabilny identyfikator. Dzięki temu można odwołać się do niego w rozmowie, wymaganiu, integracji czy odpowiedzi agenta. Wersja pozwala ustalić, do jakiego opisu odnosimy decyzję. Dostęp maszynowy umożliwia pobranie tego materiału bez przepisywania go z prezentacji.

To jest praktyczne znaczenie API i plików przeznaczonych do odczytu przez modele. Nie wystarczy udostępnić dużej ilości tekstu. Trzeba jeszcze wiedzieć, który fragment dotyczy danego procesu i jakie wydanie stanowi podstawę pracy.

Pierwsze wydanie mapy ORPR obejmuje 74 procesy w 22 obszarach. Liczby określają zakres, ale same nie dowodzą wartości. Tę trzeba oceniać na konkretnych rozstrzygnięciach i zastosowaniach. Rejestr ORPR.

ORPR jako warstwa translacyjna między biznesem i IT

Intencję „obsłuż sprzedaż” trzeba przełożyć na opis wyniku, danych, uprawnień i warunków poprawności. Ten opis może następnie wykorzystać analityk, architekt albo agent tworzący rozwiązanie. Każdy powinien mieć możliwość sprawdzenia, gdzie kończy się uzgodniona reguła, a zaczyna założenie wymagające decyzji.

Czym ORPR nie jest? Nie jest notacją modelowania taką jak BPMN ani zamiennikiem SCOR, modelu referencyjnego dla łańcucha dostaw. Z APQC PCF, także w wersji retail, łączy go porządkowanie procesów. Różni jednak podejście do tematu. APQC klasyfikuje, ORPR opisuje granice wykonania, niezmienniki i pytania, które trzeba rozstrzygnąć w konkretnej firmie, zanim ktoś napisze pierwszą linię kodu.

O przydatności ORPR ostatecznie rozstrzygnie rzeczywiste użycie w kolejnych wdrożeniach. Publikacja autorskiego standardu oczywiście nie oznacza jeszcze przyjęcia go przez branżę. Publicznie dostępne są mapa, opisy procesów i sześć pełnych kart. Pozostałe 68 kart istnieje w pełnej wersji, publicznie widać jedynie ich streszczenia.

Wartość własnego doświadczenia sprawdzam tu bardzo praktycznie. Czy potrafię wyjaśnić różnicę, zapisać jej konsekwencje i podać warunek, po którym ktoś inny rozpozna poprawne wykonanie? Wiedza pozostająca wyłącznie w głowie autora ma ograniczony zasięg. Zapisana w ten sposób może stać się podstawą cudzej pracy i przedmiotem rzeczowej krytyki.

ORPR jest rezultatem takiego podejścia. Chcę, żeby pomagał przechodzić od doświadczenia i intencji biznesowej do jawnych zasad, według których ludzie oraz systemy mogą działać. Im więcej wykonania przejmą agenci, tym większą wagę będzie miała jakość tych zasad.

Rafał Myrta
Rafał Myrta
Porządkuje procesy, role i systemy w firmach wielolokalizacyjnych i regulowanych. Projekty AI prowadzi metodą Spec-Driven Development. Autor ORPR.
Porozmawiajmy →
Series: Experience, AI and running a company · 1/4

How I turned experience into ORPR

An open standard for retail processes grew out of a simple need. An AI agent had to have a point of reference before it started guessing how retail works.

The most expensive misunderstanding between business and IT can fit inside a single ordinary word. "Sold". "Available". "Received". Everyone in the room understands them without effort. The trouble starts when everyone understands them slightly differently, and decisions or the code of management systems are then built on that.

The easier software becomes to write, the more precisely you have to state how the business it serves is supposed to work. Fast implementation usually shortens the road from a vague assumption to an expensive mistake.

That is one of the reasons I built the Open Retail Process Reference. It is an open, versioned standard for the architecture of business processes in retail. ORPR is meant to give a shared point of reference to the people designing a change, and to the systems and AI agents that help carry it out.

The impulse came while I was working on an application built with Spec Driven Development, that is, from a specification describing the expected behaviour. I needed material an AI agent could refer to before it started filling the gaps with its own idea of what retail looks like.

Without that layer, the SDD process produces too many errors that are expensive to remove. The larger problem is that neither a developer nor even a business analyst is able to catch them. That takes knowledge reaching beyond how a process or a feature works. It takes the perspective of the whole business.

I started from the basics. What are we describing, where do we draw the boundaries, and how will we recognise correct execution? The answers shaped how ORPR is built.

A process is recognised by its outcome and its boundaries

The name of a department is not enough. Neither is the scope of a system module. The fact that two activities are performed today by one employee or one application does not settle whether they are the same process.

Take a sale with later collection of the goods. The customer has bought the product but has not picked it up. The company has an obligation towards that customer. The goods are still physically standing in the location. You have to prevent the same quantity from being sold again while keeping truthful information about its physical state.

If a system treats the sale and the release as the same event, that difference is lost. What follows is patching: exceptions, extra fields and manual explanations. I have watched this error in systems serving hundreds of points of sale, and the repair always looked the same. An extra field and an instruction for the cashier.

In ORPR, SAL-01 describes the move from basket to sale, and SAL-03 the move from sale to release of the goods. That distinction has a concrete consequence. A sales record is not proof of physical release, so the outbound movement needs its own confirmation.

Writing it down this way helps both the business conversation and the design of the system. It also gives you a basis for judging whether the solution did what it was supposed to do.

A rule has to survive being checked

The sentence "the system shall handle sales correctly" leaves almost all the work still to be done. The word "correctly" has the convenient property that everyone can sign up to something different underneath it. You have to establish which event closes the sale, what covers it, what happens when a message is repeated, and which effects already belong to other processes.

That is why ORPR contains invariants, that is, conditions that must remain true while the process runs, together with contracts that define its boundaries. Their value lies in the fact that an actual execution can be held up against them.

A model can justify its own behaviour convincingly. Taking that explanation at face value is not enough; the result still has to be checked. A written condition and evidence that it holds let you separate the two.

A missing decision has to be surfaced

Organisations operate under different models. The same process occurs in an independent store, in a partner programme and in a fully owned chain, but the right to decide may sit with different people or different legal entities. Moving a solution from one model to another requires recognising those differences.

For that reason every card carries analytical questions. They are there to help uncover what has not been settled yet, which conditions apply in a particular company, and where matching names hide a difference in how things actually work.

If it is not clear who may release a purchase requirement, an agent should not solve the problem by picking the most probable role. It should surface the missing decision. It is the organisation that grants authority and takes responsibility for its scope.

The same goes for departures from the reference. A company may have a good reason to work differently. That difference should be an explicit decision with its consequences written down. Requirements that follow from law cannot be treated as one more design preference along the way.

People and machines need the same version of the content

Every process has a stable identifier. That lets you refer to it in a conversation, a requirement, an integration or an agent's answer. The version tells you which description a decision refers to. Machine access means the material can be fetched without being retyped from a slide deck.

That is the practical meaning of an API and of files meant to be read by models. Publishing a large amount of text is not enough. You also have to know which fragment concerns which process, and which release is the basis for the work.

The first release of the ORPR map covers 74 processes across 22 areas. The numbers define the scope; on their own they prove nothing about value. That has to be judged on concrete rulings and concrete uses. The ORPR registry.

ORPR as a translation layer between business and IT

The intention "handle the sale" has to be turned into a description of the outcome, the data, the permissions and the conditions of correctness. That description can then be used by an analyst, an architect or an agent building the solution. Each of them should be able to check where the agreed rule ends and an assumption requiring a decision begins.

What ORPR is not: it is not a modelling notation such as BPMN, nor a replacement for SCOR, the reference model for the supply chain. What it shares with APQC PCF, including its retail version, is bringing order to processes. The approach differs. APQC classifies; ORPR describes execution boundaries, invariants and the questions a particular company has to settle before anyone writes the first line of code.

Whether ORPR is useful will be settled by real use in future implementations. Publishing a standard of one's own does not yet mean the industry has adopted it. The map, the process descriptions and six full cards are publicly available. The remaining 68 cards exist in full; publicly only their summaries are visible.

I test the value of my own experience here in a very practical way. Can I explain the difference, write down its consequences, and state the condition by which someone else will recognise correct execution? Knowledge that stays only in the author's head has a limited reach. Written down like this, it can become the basis of someone else's work and the object of substantive criticism.

ORPR is the result of that approach. I want it to help move from experience and business intent to explicit rules that both people and systems can work by. The more of the execution agents take over, the more the quality of those rules will matter.

Rafał Myrta
Rafał Myrta
Brings order to processes, roles and systems in multi-site and regulated companies. Runs AI projects with Spec-Driven Development. Author of ORPR.
Let's talk →