Skip to main content

Layer 5 · work

process

blocks/5-work/process.yaml

layer 5work
1entity
2commands
2events
1view
5refusals
2KPIs

The procedure a task follows, held by identifier only. A process has a name, a version and the digest of its source; it is published or withdrawn. It may declare the named outcomes a run of it ends with (merged, abandoned). It states whether it needs a model and may name the route its runs take; a process that needs no model takes no route. Whether a step of a task is legitimate under the process is decided by an external evaluator, never here.

Depends on​

  • model · layer 2 · 5 references
  • shared · layer 0 · 4 references

Used by​

  • work · layer 5 · 20 references
  • trigger · layer 7 · 4 references
  • deployment · layer 9 · 4 references

Entities​

Process​

One published version of a procedure. A task names it by ProcessId; the source itself lives with the evaluator and is known here by its digest.

Identified by process_id (ProcessId).

fieldtypemeaning
nameName
versioninteger
source_digeststringsha256 of the process source, lower-case hex.
outcome_namesoptional list of NameThe outcomes the process declares for a run of it, such as merged and abandoned. A run of the process that ends with a named outcome names one of these (agentic.work EndRun); a process that declares none takes no named outcome.
needs_modelbooleanWhether a step of the process makes a model call. False for a process whose steps make none, such as one whose programs all have a model budget of 0: a run of it takes no route (agentic.work StartRun).
route_idoptional RouteIdThe route the runs of the process take; a run of it on another route is refused (agentic.work StartRun). Absent, a run takes any route.

Relations:

  • route references Route of model (one, by route_id)

Lifecycle of Process

PublishedWithdrawnwithdrawPublishedWithdrawnwithdraw
Ends in Withdrawn.

Commands​

PublishProcess​

Publish a process.

fieldtypemeaning
process_idProcessId
nameName
versioninteger
source_digeststring
outcome_namesoptional list of Name
needs_modeloptional booleanFalse for a process whose steps make no model call; absent, the process needs a model.
route_idoptional RouteIdThe route the runs of the process take; absent, a run takes any route.
attimestamp
outcomewhenresult
route-without-model refuseddefined(needs_model) and needs_model == false and defined(route_id)RouteForModelFreeProcess: A process that needs no model names a route; nothing was published.
invalid-version refusedversion < 1InvalidVersion: A version starts at 1.
publishedotherwisecreates a Process in Published; emits ProcessPublished
already-published refusedthe Process exists alreadyProcessAlreadyPublished: A process of this identifier exists; a changed procedure is a new identifier.

WithdrawProcess​

Withdraw a process.

fieldtype
process_idProcessId
attimestamp
outcomewhenresult
no-such-process refusedno such ProcessProcessNotFound: No process of this identifier was published.
withdrawnotherwisemoves the Process Published → Withdrawn; emits ProcessWithdrawn
wrong-state refusedthe Process is in a state that does not allow itProcessStateConflict: The process is not in a state this command acts from.

Events​

eventfieldsemitted by
ProcessPublishedprocess_id ProcessId, name Name, version integer, source_digest string, outcome_names optional list of Name, needs_model boolean, route_id optional RouteId, at timestampPublishProcess
ProcessWithdrawnprocess_id ProcessId, at timestampWithdrawProcess

Views​

viewrowsfields
Processes
Processes
each Processprocess_id ProcessId, name Name, version integer, source_digest string, outcome_names optional list of Name, needs_model boolean, route_id optional RouteId, state State

KPIs​

2 KPIs from the KPI catalogue. A gate must be zero for a variant of an architecture to count.

Correctness​

KPIunitbettergatestatus
task_under_withdrawn_process
Tasks created under a process that was withdrawn.
How: TaskCreated events naming a process with a ProcessWithdrawn earlier. Must be 0.
countlowergateplanned
source: design

Completeness​

KPIunitbettergatestatus
process_steps_done_share
Share of the steps of a task's process that have a recorded result.
How: For tasks that name a process, steps with a recorded result divided by steps of the published process. The process is referenced by identifier and evaluated elsewhere.
sharehigher–planned
source: design

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 process:

settingtypeunitdefaultcontractwhat
stepsinteger of at least 1steps1The steps of the process's program; a run executes each once.
agent_stepsinteger of at least 0stepsHow many of the steps are agent steps, each a turn of the role with a model call when the running part reaches a model. Named with person_steps or alone; the steps neither names are program steps, each lasting the role's turn_seconds with no model call. Without both, every step is a turn of the role. With both, at most steps together.
person_stepsinteger of at least 0stepsHow many of the steps are person steps, each a question to the part the running part's question link reaches, answered with that part's delay; a running part without a question link is refused. Without agent_steps, the other steps are program steps.
rolestringThe role of the behaviour profile whose turn_seconds a step of a run takes.
model_sharesharesThe share of the process's model calls each model part it reaches gets; without it, equal shares.
countinteger of at least 11How many copies of the part run.
perpartOne copy of the part for each copy of the named part.
notesnotesFree 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.