Results and the weekly brief

A decision is worth what it was meant to save, once it holds. When an action type listed under results is applied, the platform records a result with the value the decision claims at that moment: the value at risk on a quality issue closed, the units of a lot pulled from sale, the litres of a milk load kept out of the main silos. After a set period it looks at the object again and marks the result confirmed or not realised. An undo marks it reversed. Every week the owners of results get a brief built from those rows

RecordedWhen the action is applied, with the value it claims
CheckedAfter a period, by a filter on the object or a function
Per unitCAD, hours, units, litres or any word, never added across units
Weekly briefBuilt from the rows, with no language model

In the platform today

Built
  • Results run in the platform service, configured under results in ontology.yaml
  • A result is recorded once per applied action, in ops.results, whoever or whatever applied it
  • A timer checks results whose period is over and writes the weekly brief into ops.results_briefs and the owners' inbox
  • In the app, the Results screen sits under Explore, with the results, their totals and, for owners, the weekly briefs
In the demo
  • The illustrative ice cream maker records four kinds of result and gets its brief every Monday at 07:00

The results block

This is the block the illustrative ice cream maker's sample workspace ships with. Each entry under actions is an action type that produces a result

results:
  owners: [operations]
  actions:
    close-quality-issue:
      name: Quality issue closed with its product protected
      category: Quality
      value: { parameter: issue, property: impact }
      # still closed two weeks on: not reopened
      confirm: { after: 14d, where: { status: Resolved } }
    pull-lot:
      name: Lot pulled from sale
      category: Quality
      value: { parameter: lot, property: units }
      unit: units
      confirm: { after: 3d, where: { status: { $ne: Sold through } } }
    divert-load:
      name: Milk load kept out of the main silos
      category: Milk supply
      value: { parameter: pickup, property: litres }
      unit: litres
    reallocate-tubs:
      name: Tubs moved to a shop that will sell them
      category: Shops
      value: { parameter: tubs }
      unit: tubs
  brief:
    day: monday
    at: "07:00"
    metrics: [waste-cost, shop-sales, batch-yield]

A closed quality issue claims its value at risk in CAD, the default unit, and is confirmed if the issue is still Resolved 14 days later. A diverted load and a reallocation have no confirm, so they count as soon as the action is applied

SettingWhat it doesDefault
ownersGroups who see every result, confirm or reject one by hand, and receive the brief. Administrators always count as ownersAdministrators only
currencyThe unit for actions that name noneCAD
actions.<action type>An action type that records a result each time it is applied
nameWhat the result is called in lists and the briefThe action type's name
categoryThe area it is totalled underGeneral
valueWhat the decision claims: a number, or an operand read when the action is applied, in the same form as writeback payloads, such as { parameter: issue, property: impact }Required
unitCAD, hours, units, litres, kg or any wordcurrency
confirm.afterHow long after the action the check runs, such as 3d, 36h or 2wRequired with confirm
confirm.whereA filter on the action's main object, in the syntax of object sets. The result is confirmed when the object still matches
confirm.functionA function given {logId, objectType, objectKey, claimed} that returns true or false, or a number: the value realised
brief.dayThe day the brief is written, in the ontology's time zonemonday
brief.atThe time of day it is written"07:00"
brief.metricsMetrics shown with the week's value and the week beforeNone
brief.to{ group: … } or { user: … }: whose inbox the brief goes toThe owners, or administrators when there are none

A confirm needs where or function. GET /api/v2/results/config returns the block with its problems, such as an action type, a function or a metric that does not exist, a value left out or an after that is not a duration

From decision to result

  1. Recorded. When a listed action is applied, by a person, an approved proposal, an agent or an automation, a row goes into ops.results with the value claimed, the unit, the object, who decided and, where they apply, the agent, the automation and the proposal. An action finished from its journal after a copy of the service stopped is recorded once, not twice
  2. Checked. Once after has passed, the timer reads the object as the person who decided. With where, a match confirms the result at the value claimed and no match marks it not realised at 0. With function, true confirms at the value claimed, a number other than 0 confirms at that number, and false or 0 marks it not realised. A check that fails is tried again at the next pass
  3. Reversed. When the action is undone, the result is marked reversed, whatever its status was, with the undo's log id in its note
  4. Decided by hand. An owner can confirm a result, optionally with the value realised, or reject it, with a note. A reversed result can't be decided (409 RESULT_REVERSED)

Statuses

StatusMeansCounts as
recordedThe action has no confirm: it counts once appliedRealised, at the value claimed
pendingWaiting for its checkClaimed only, shown as waiting
confirmedThe check passed, or an owner confirmed itRealised, at the value confirmed
not_realisedThe check did not pass, or an owner rejected itNot realised
reversedThe action was undoneUndone

Totals per unit

Values are summed per unit and never across units: 18,400 CAD and 640 units are two totals, not one. For each unit a summary gives the value realised, the value waiting for its check, the value not realised, the value undone and the number of results. By area, it gives what was realised and what is waiting per category and unit. It also lists the five largest results, realised or waiting, and the count in each status

Who sees what

WhoResultsBriefsConfirm or reject
Owners and administratorsEvery resultEvery brief, and can write oneYes
Anyone elseThe results of the decisions they tookNo (403 RESULTS_OWNER_ONLY)No (403 RESULTS_OWNER_ONLY)

The check reads the object with the access of the person who decided, so a check never sees more than they could. Confirming and rejecting are recorded in the audit log as result.confirmed and result.rejected

The weekly brief

The brief covers the week before, Monday to Sunday, in the ontology's time zone. The timer writes it at the first pass after brief.day and brief.at in the current week, once per week, and sends it to the inbox of brief.to. The brief is built from the rows, with no language model, and holds:

  • The decisions applied that week, not counting undos, and how many of them came from agents or automations
  • The week's results per unit: realised, waiting for its check, not realised and undone
  • What was confirmed during the week, whenever the decision was taken
  • The week's results by area, and the five largest
  • Each metric in brief.metrics with the week's value, the week before and the direction
  • The number of proposals still waiting for a decision, and the oldest

Each brief is kept in ops.results_briefs twice: as JSON (body) and as Markdown (text), which is what the inbox shows and what an export carries. A brief the timer writes reads its metrics with administrator access; one written by hand reads them as the person who asked

# Results, week of 2026-10-26

37 decisions applied, 12 of them by agents or automations

- 18,400 CAD realised, 9,250 CAD waiting for its check
- 640 units realised, 1,200 units waiting for its check
- 21,000 litres realised
- Checked this week: 6,300 CAD confirmed

## By area

- Quality: 18,400 CAD realised, 9,250 CAD waiting
- Quality: 640 units realised, 1,200 units waiting
- Milk supply: 21,000 litres realised

## Measures

- Waste cost: 4,180 (week before 4,610, better)

3 proposals are waiting for a decision

API

GET /api/v2/results?status=&category=&from=&to=&limit=

The results the caller may see, newest first, decided between from and to: the last 28 days by default. A date or time without a zone is read in the ontology's time zone. status is one of the five statuses. limit is 200 by default and 1000 at most, and total counts every match

GET /api/v2/results/summary?from=&to=

The totals per unit and status, by category, and the five largest results, over the same rows

POST /api/v2/results/{id}:confirm
{ "note": "Lot destroyed on site, confirmed with the shop", "value": 580 }

Owners only. Without value, :confirm keeps the value claimed and :reject sets it to 0. Both answer with the result

EndpointDoes
GET /api/v2/resultsResults the caller may see
GET /api/v2/results/{id}One result
GET /api/v2/results/summaryTotals per unit, by category, and the largest results
GET /api/v2/results/configThe results block, its problems and whether the caller is an owner
POST /api/v2/results/{id}:confirmOwners: confirm, with {note, value}
POST /api/v2/results/{id}:rejectOwners: mark not realised, with {note, value}
GET /api/v2/results/briefsOwners: the briefs, newest week first
GET /api/v2/results/briefs/{id}Owners: one brief, with body and text
POST /api/v2/results/briefs:generateOwners: write a brief now for {weekStart}, a Monday, by default the week before. Each call writes a new brief and sends it

Refusals carry reasons such as RESULT_NOT_FOUND, BRIEF_NOT_FOUND, RESULTS_OWNER_ONLY and RESULT_REVERSED, in the shape on error codes

Tables and the timer

TableOne row perHolds
ops.resultsResultThe action and its log id, name, category, object, unit, value claimed and realised, status, who decided, the agent, automation or proposal, when it happened, when the check is due, when and by whom it was checked, and the note
ops.results_briefsBriefThe week it covers, when and by whom it was written, the brief as JSON and as Markdown

The timer runs every 300 seconds by default, a service setting. One copy of the service runs it, with automatic failover, so several copies on one lake check each result and write each brief once

Limitations

  • A result is about the action's main object. A check can't look at other objects the action edited, except through a function
  • Values in different units are never converted or added together
  • A check runs once its period is over. Changes to the object after the check do not change the result; an owner can still confirm or reject it by hand
  • The brief is a summary of rows and metrics. It has no commentary and makes no recommendations

Related