Layer 10 · evaluation
kpi
A KPI as data: its name, unit, kind, the block it belongs to, the events it reads and whether it is a gate. A work mode (autonomous, pairing, review) gives each KPI a direction. A measurement is one value of a KPI for an architecture revision or an observed window, from a simulated or an observed run.
Depends on
- architecture · layer 9 · 4 references
- shared · layer 0 · 7 references
Used by
- experiment · layer 10 · 11 references
Entities
Kpi
One KPI definition, read by the code that scores a simulated and an observed run alike.
Identified by kpi_id (KpiId).
| field | type |
|---|---|
name | Name |
unit | Unit |
block | Block |
reads | list of EventName |
kind | KpiKind |
percentile | optional integer |
gate | boolean |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Lifecycle of Kpi
Retired.Measurement
One value of a KPI for an architecture revision or an observed window.
Identified by measurement_id (MeasurementId).
| field | type |
|---|---|
kpi_id | KpiId |
revision_id | optional ArchitectureRevisionId |
window | optional Window |
value | decimal |
source | Source |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
kpireferences Kpi (one, bykpi_id)revisionreferences ArchitectureRevision of architecture (one, byrevision_id)
Lifecycle: one state, Recorded; a recorded Measurement does not change.
WorkMode
A way of working (autonomous, pairing, review) under which each KPI has a direction.
Identified by work_mode_id (WorkModeId).
| field | type |
|---|---|
name | Name |
kind | WorkModeKind |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
directionsowns WorkModeDirection (many, bywork_mode_id)
Lifecycle: one state, Active; a recorded WorkMode does not change.
WorkModeDirection
The direction one KPI has under one work mode.
Identified by direction_id (DirectionId).
| field | type |
|---|---|
work_mode_id | WorkModeId |
kpi_id | KpiId |
direction | Direction |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
kpireferences Kpi (one, bykpi_id)
Lifecycle: one state, Set; a recorded WorkModeDirection does not change.
Commands
CreateWorkMode
Create a work mode.
| field | type |
|---|---|
name | Name |
kind | WorkModeKind |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
name-taken refused | a WorkMode with name == input. | Work: A work mode of this name exists, and nothing was created. |
created | otherwise | creates a WorkMode in Active; emits Work |
More columns: swipe horizontally, or focus the table and use the arrow keys.
DefineKpi
Define a KPI.
| field | type |
|---|---|
name | Name |
unit | Unit |
block | Block |
reads | list of EventName |
kind | KpiKind |
percentile | optional integer |
gate | boolean |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
no-events-read refused | reads. | No: A KPI reads at least one event, and nothing was defined. |
percentile-missing refused | kind == Percentile and not (defined(percentile)) | Percentile: A Percentile KPI names its percentile, between 1 and 99, and nothing was defined. |
percentile-out-of-range refused | (percentile < 1 or percentile > 99) | Percentile: A Percentile KPI names its percentile, between 1 and 99, and nothing was defined. |
name-taken refused | a Kpi with name == input. | Kpi: A KPI of this name exists, and nothing was defined. |
defined | otherwise | creates a Kpi in Active; emits Kpi |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RecordMeasurement
Record a measurement.
| field | type |
|---|---|
kpi_id | KpiId |
revision_id | optional ArchitectureRevisionId |
window | optional Window |
value | decimal |
source | Source |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
revision-missing refused | source == Simulated and not (defined(revision_ | Revision: A simulated measurement names the architecture revision that was simulated, and nothing was recorded. |
window-missing refused | source == Observed and not (defined(window)) | Window: An observed measurement names the window it was observed in, and nothing was recorded. |
invalid-window refused | window. | Invalid: A window ends after it starts, and nothing was recorded. |
no-such-kpi refused | no Kpi for kpi_ | No: No KPI has this id, and nothing changed. |
no-such-revision refused | no ArchitectureRevision for revision_ | No: No architecture revision has this id, and nothing was recorded. |
kpi-retired refused | the Kpi of kpi_ has state == Retired | Retired: The KPI is retired, so it takes no direction and no measurement, and nothing changed. |
recorded | otherwise | creates a Measurement in Recorded; emits Measurement |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RetireKpi
Retire a KPI.
| field | type |
|---|---|
kpi_id | KpiId |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
no-such-kpi refused | no such Kpi | No: No KPI has this id, and nothing changed. |
retired | otherwise | moves the Kpi Active → Retired; emits Kpi |
wrong-state refused | the Kpi is in a state that does not allow it | Retired: The KPI is retired, so it takes no direction and no measurement, and nothing changed. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
SetDirection
Give a KPI a direction under a work mode.
| field | type |
|---|---|
work_mode_id | WorkModeId |
kpi_id | KpiId |
direction | Direction |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
no-such-work-mode refused | no WorkMode for work_ | No: No work mode has this id, and nothing changed. |
no-such-kpi refused | no Kpi for kpi_ | No: No KPI has this id, and nothing changed. |
kpi-retired refused | the Kpi of kpi_ has state == Retired | Retired: The KPI is retired, so it takes no direction and no measurement, and nothing changed. |
direction-exists refused | a WorkModeDirection with work_ | Direction: The work mode already gives this KPI a direction, and nothing changed. |
set | otherwise | creates a WorkModeDirection in Set; emits Direction |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Events
| event | fields | emitted by |
|---|---|---|
DirectionSet | direction_ DirectionId, work_ WorkModeId, kpi_ KpiId, direction Direction | Set |
KpiDefined | kpi_ KpiId, name Name, block Block, kind KpiKind, gate boolean | Define |
KpiRetired | kpi_ KpiId | Retire |
MeasurementRecorded | measurement_ MeasurementId, kpi_ KpiId, value decimal, source Source | Record |
WorkModeCreated | work_ WorkModeId, name Name, kind WorkModeKind | Create |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Views
| view | rows | fields |
|---|---|---|
Directions | each WorkModeDirection with work_asked with work_ WorkModeId | direction_ DirectionId, work_ WorkModeId, kpi_ KpiId, direction Direction |
Kpis | each Kpi | kpi_ KpiId, name Name, unit Unit, block Block, reads list of EventName, kind KpiKind, percentile optional integer, gate boolean, state State |
Measurements | each Measurement with kpi_asked with kpi_ KpiId | measurement_ MeasurementId, kpi_ KpiId, revision_ optional ArchitectureRevisionId, window optional Window, value decimal, source Source |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Types
| type | is | values or fields |
|---|---|---|
Block | one of | Principal, Delegation, Model, Gateway, Tool, Knowledge, Store, Time, Agent, Harness, Work, Process, Authority, Channel, Question, Trigger, Derivation, Workspace, Sandbox, Runtime, Resource, Architecture, Deployment, Run |
Direction | one of | Higher, Lower, Ignore |
DirectionId | an identifier or value | uuid |
EventName | an identifier or value | string |
KpiKind | one of | Count, Sum, Ratio, Duration, Percentile |
MeasurementId | an identifier or value | uuid |
Source | one of | Simulated, Observed |
UnitThe unit a value is in (seconds, tokens, micro-USD, a share). | an identifier or value | string |
Window | a record | from timestamp, to timestamp |
WorkModeKind | one of | Autonomous, Pairing, Review |
More columns: swipe horizontally, or focus the table and use the arrow keys.
KPIs
2 KPIs from the KPI catalogue. A gate must be zero for a variant of an architecture to count.
Correctness
| KPI | unit | better | gate | status |
|---|---|---|---|---|
kpi_without_directionDefined KPIs that lack a direction for some work mode. How: KpiDefined events whose KPI has no DirectionSet for one of the created work modes. Must be 0. | count | lower | gate | planned source: design |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Completeness
| KPI | unit | better | gate | status |
|---|---|---|---|---|
kpi_measured_shareShare of defined, unretired KPIs with at least one measurement. How: KPIs with a MeasurementRecorded divided by KPIs with a KpiDefined and no KpiRetired. | share | higher | – | planned source: design |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Settings
The settings a part of this block carries in an architecture document. agenticspec sim check refuses any other setting (setting_unknown) and a value outside its type (setting_invalid), and a part that lacks a setting marked required in the default column; the contract copies a setting into the ports it narrows. The last rows of each table are the settings every part takes. What no setting here types (a file, a path, an audience, the use of a model) goes into the part's notes, a map with free keys and values that the check takes as written and nothing reads.
A part kpi:
| setting | type | unit | default | contract | what |
|---|---|---|---|---|---|
kind | string | What the KPI measures. | |||
count | integer of at least 1 | 1 | How many copies of the part run. | ||
per | part | One copy of the part for each copy of the named part. | |||
notes | notes | Free notes on the part, a map with keys and values of any kind: what no setting of its block types. The check takes any map; the simulator, the search and the contract never read it. |
More columns: swipe horizontally, or focus the table and use the arrow keys.