Skip to main content

Layer 9 · composition

architecture

blocks/9-composition/architecture.yaml

layer 9composition
11entities
19commands
19events
10views
97refusals
54KPIs

An architecture composes building blocks into one concrete setup: parts (named instances of a block, with a count), links (which part may call or message which, and what the link carries), a border (the parts a human principal reaches) and immutable revisions. No link, no reach: two parts without a link cannot reach each other.

Depends on​

  • shared · layer 0 · 27 references

Used by​

Entities​

Architecture​

One composed setup, edited as parts, links and a border, frozen by each commit into a revision.

Identified by architecture_id (ArchitectureId).

fieldtype
nameName

Relations:

  • parts owns Part (many, by architecture_id)
  • links owns Link (many, by architecture_id)
  • revisions owns ArchitectureRevision (many, by architecture_id)
  • patch_applications owns PatchApplication (many, by architecture_id)
  • ingresses owns Ingress (many, by architecture_id)

Lifecycle of Architecture

DraftRetiredretireDraftRetiredretire
Ends in Retired.

ArchitectureRevision​

An immutable snapshot of an architecture's parts, links and border.

Identified by revision_id (ArchitectureRevisionId).

fieldtype
architecture_idArchitectureId
numberinteger
digestDigest

Always holds: number >= 1.

Lifecycle: one state, Recorded; a recorded ArchitectureRevision does not change.

Contract​

The ports one architecture revision uses, narrowed by its settings, with the routing invariants of its links.

Identified by contract_id (ContractId).

fieldtype
revision_idArchitectureRevisionId
digestDigest
portslist of ContractPort
invariantslist of RoutingInvariant
borderlist of PartId
ingresslist of ContractIngress

Relations:

  • revision references ArchitectureRevision (one, by revision_id)
  • border_parts references Part (many, by border)

Lifecycle: one state, Recorded; a recorded Contract does not change.

Export​

The protocol an ingress's interface is served over.

Identified by export_id (ExportId).

fieldtype
ingress_idIngressId
protocolExportProtocol

Lifecycle: one state, Declared; a recorded Export does not change.

Ingress​

For whom an architecture is reachable from outside, what that audience may use, and whether callers authenticate.

Identified by ingress_id (IngressId).

fieldtype
architecture_idArchitectureId
nameName
audience_part_idoptional PartId
implied_audienceoptional ImpliedAudience
authenticatedboolean
interfacestring

Relations:

  • audience references Part (one, by audience_part_id)
  • exports owns Export (many, by ingress_id)

Lifecycle: one state, Declared; a recorded Ingress does not change.

An allowed call or message from one part to another of the same architecture, carrying one kind of traffic.

Identified by link_id (LinkId).

fieldtypemeaning
architecture_idArchitectureId
from_part_idPartId
to_part_idPartId
carriesCarries
over_part_idoptional PartId
as_part_idoptional PartIdThe principal part the link posts for, in whose name what it carries is sent.
under_part_idoptional PartIdThe authority part that decides each call the link carries; the link is one standing grant of it, and a call no such link allows is denied.
action_classoptional ToolCategoryThe class of actions the link's grant allows; without it, the category of the tool it calls.
from_kindPartKind
to_kindPartKind

Relations:

  • from references Part (one, by from_part_id)
  • to references Part (one, by to_part_id)
  • over references Part (one, by over_part_id)
  • as references Part (one, by as_part_id)
  • under references Part (one, by under_part_id)

Lifecycle: one state, Declared; a recorded Link does not change.

Part​

A named instance of a building block inside one architecture.

Identified by part_id (PartId).

fieldtype
architecture_idArchitectureId
nameName
kindPartKind
countinteger
per_part_idoptional PartId
acts_for_part_idoptional PartId
settingslist of Setting
on_borderboolean
coordinationCoordination
start_staggeroptional duration

Relations:

  • per references Part (one, by per_part_id)
  • acts_for references Part (one, by acts_for_part_id)

Always holds: count >= 1.

Lifecycle: one state, Declared; a recorded Part does not change.

Patch​

An ordered list of selector and transform rules that changes an architecture as one revision.

Identified by patch_id (PatchId).

fieldtype
nameoptional Name
ruleslist of PatchRule
digestDigest

Lifecycle: one state, Recorded; a recorded Patch does not change.

PatchApplication​

One application of a patch to an architecture, applied as one revision or refused whole with the rule and its error.

Identified by application_id (PatchApplicationId).

fieldtype
architecture_idArchitectureId
patch_idPatchId
dry_runboolean
revision_idoptional ArchitectureRevisionId
changed_rowsoptional integer
rule_indexoptional integer
erroroptional string

Relations:

  • patch references Patch (one, by patch_id)
  • revision references ArchitectureRevision (one, by revision_id)

Lifecycle of PatchApplication

AppliedRefusedRequestedapplyrefuseAppliedRefusedRequestedapplyrefuse
Ends in Applied, Refused.

Placement​

Where one entity of a lower block sits in an architecture: the revision, the part's path, the copy of the part, and the entity's name and id. A row of a block view is in scope of a part when its own id, or an id field of its view one hop away, is placed to that part.

Identified by placement_id (PlacementId).

fieldtype
architecture_idArchitectureId
revision_idArchitectureRevisionId
part_idPartId
part_pathName
instanceoptional integer
entity_nameEntityName
entity_iduuid

Relations:

  • architecture references Architecture (one, by architecture_id)
  • revision references ArchitectureRevision (one, by revision_id)
  • part references Part (one, by part_id)

Lifecycle: one state, Recorded; a recorded Placement does not change.

Port​

A leaf of the building blocks with effects outside them, which a runtime must implement.

Identified by port_id (PortId).

fieldtype
nameName
blockName
kindPortKind
intent_eventoptional EventName
waiting_stateoptional StateName
reportslist of CommandName
protocolProtocol

Lifecycle: one state, Declared; a recorded Port does not change.

Commands​

AddExport​

Export an ingress over a protocol.

fieldtype
export_idExportId
ingress_idIngressId
protocolExportProtocol
outcomewhenresult
no-such-ingress refusedno Ingress for ingress_idNoSuchIngress: No ingress has this id, and nothing was added.
exists refuseda Export with ingress_id == input.ingress_id and protocol == input.protocolExportExists: The ingress already exports over this protocol, and nothing was added.
addedotherwisecreates a Export in Declared; emits ExportAdded

AddIngress​

Add an ingress.

fieldtype
ingress_idIngressId
architecture_idArchitectureId
nameName
audience_part_idoptional PartId
implied_audienceoptional ImpliedAudience
authenticatedboolean
interfacestring
outcomewhenresult
no-audience refusednot (defined(audience_part_id)) and not (defined(implied_audience))NoAudience: An ingress names its audience, a principal part or an implied audience, and this one names neither; nothing was added.
two-audiences refuseddefined(audience_part_id) and defined(implied_audience)TwoAudiences: An ingress names one audience, and this one names both a part and an implied audience; nothing was added.
no-such-architecture refusedno Architecture for architecture_idNoSuchArchitecture: No architecture has this id, and nothing changed.
no-such-audience refusedno Part for audience_part_idNoSuchPart: A part this request names does not exist, and nothing changed.
retired refusedthe Architecture of architecture_id has state == RetiredRetiredArchitecture: The architecture is retired, so it takes no edit and no commit, and nothing changed.
foreign-audience refusedthe Part of audience_part_id has architecture_id != input.architecture_idForeignPart: A part this request names belongs to another architecture, and nothing changed.
audience-not-principal refusedthe Part of audience_part_id has kind != PrincipalAudienceNotPrincipal: The audience of an ingress is a principal part, and the part named is not one; nothing was added.
name-taken refuseda Ingress with architecture_id == input.architecture_id and name == input.nameIngressNameTaken: The architecture already has an ingress of this name, and nothing was added.
addedotherwisecreates a Ingress in Declared; emits IngressAdded

Allow a link.

fieldtypemeaning
architecture_idArchitectureId
from_part_idPartId
to_part_idPartId
carriesCarries
over_part_idoptional PartId
as_part_idoptional PartIdThe principal part the link posts for.
under_part_idoptional PartIdThe authority part that decides each call the link carries.
action_classoptional ToolCategoryThe class of actions the link's grant allows, only beside under_part_id.
outcomewhenresult
self-link refusedfrom_part_id == to_part_idSelfReference: A link, a per or an acts-for names the part itself, and nothing changed.
grant-without-authority refuseddefined(action_class) and not (defined(under_part_id))GrantNeedsAuthority: A link names the action class its grant allows, and no authority part it is under; nothing was added.
no-such-architecture refusedno Architecture for architecture_idNoSuchArchitecture: No architecture has this id, and nothing changed.
no-such-from-part refusedno Part for from_part_idNoSuchPart: A part this request names does not exist, and nothing changed.
no-such-to-part refusedno Part for to_part_idNoSuchPart: A part this request names does not exist, and nothing changed.
no-such-channel-part refusedno Part for over_part_idNoSuchPart: A part this request names does not exist, and nothing changed.
no-such-as-part refusedno Part for as_part_idNoSuchPart: A part this request names does not exist, and nothing changed.
no-such-under-part refusedno Part for under_part_idNoSuchPart: A part this request names does not exist, and nothing changed.
retired refusedthe Architecture of architecture_id has state == RetiredRetiredArchitecture: The architecture is retired, so it takes no edit and no commit, and nothing changed.
foreign-from-part refusedthe Part of from_part_id has architecture_id != input.architecture_idForeignPart: A part this request names belongs to another architecture, and nothing changed.
foreign-to-part refusedthe Part of to_part_id has architecture_id != input.architecture_idForeignPart: A part this request names belongs to another architecture, and nothing changed.
foreign-channel-part refusedthe Part of over_part_id has architecture_id != input.architecture_idForeignPart: A part this request names belongs to another architecture, and nothing changed.
foreign-as-part refusedthe Part of as_part_id has architecture_id != input.architecture_idForeignPart: A part this request names belongs to another architecture, and nothing changed.
foreign-under-part refusedthe Part of under_part_id has architecture_id != input.architecture_idForeignPart: A part this request names belongs to another architecture, and nothing changed.
not-a-channel refusedthe Part of over_part_id has kind != ChannelNotAChannel: A link travels over a channel part, and the part named is not one; nothing was added.
as-not-principal refusedthe Part of as_part_id has kind != PrincipalAsNotPrincipal: A link posts as a principal part, and the part named is not one; nothing was added.
under-not-authority refusedthe Part of under_part_id has kind != AuthorityUnderNotAuthority: A link's calls are decided by an authority part, and the part named is not one; nothing was added.
trigger-source-not-trigger refusedthe Part of from_part_id has input.carries == Trigger and kind != Trigger and kind != ScheduleTriggerSourceNotTrigger: A link carrying Trigger starts at a trigger or schedule part, and the part named is neither; nothing was added.
trigger-target-not-agent refusedthe Part of to_part_id has input.carries == Trigger and kind != Agent and kind != Runtime and kind != ProcessTriggerTargetNotAgent: A link carrying Trigger wakes an agent, runtime or process part, and the part named is none of them; nothing was added.
target-cannot-answer refusedthe Part of to_part_id has input.carries == Question and kind != Principal and kind != AgentTargetCannotAnswer: A link carrying questions ends at a principal or an agent part, the only parts that answer; nothing was added.
exists refuseda Link with from_part_id == input.from_part_id and to_part_id == input.to_part_id and carries == input.carriesLinkExists: The architecture already has this link, and nothing was added.
addedotherwisecreates a Link in Declared; emits LinkAdded

AddPart​

Add a part.

fieldtype
part_idPartId
architecture_idArchitectureId
nameName
kindPartKind
countinteger
settingslist of Setting
outcomewhenresult
invalid-count refusedcount < 1InvalidCount: A part runs at least one copy, and nothing was added.
no-such-architecture refusedno Architecture for architecture_idNoSuchArchitecture: No architecture has this id, and nothing changed.
retired refusedthe Architecture of architecture_id has state == RetiredRetiredArchitecture: The architecture is retired, so it takes no edit and no commit, and nothing changed.
name-taken refuseda Part with architecture_id == input.architecture_id and name == input.namePartNameTaken: The architecture already has a part of this name, and nothing was added.
addedotherwisecreates a Part in Declared; emits PartAdded

ApplyPatch​

Apply a patch.

fieldtype
architecture_idArchitectureId
patch_idPatchId
dry_runboolean
outcomewhenresult
no-such-architecture refusedno Architecture for architecture_idNoSuchArchitecture: No architecture has this id, and nothing changed.
no-such-patch refusedno Patch for patch_idNoSuchPatch: No patch has this id, and nothing changed.
retired refusedthe Architecture of architecture_id has state == RetiredRetiredArchitecture: The architecture is retired, so it takes no edit and no commit, and nothing changed.
requestedotherwisecreates a PatchApplication in Requested; emits PatchRequested

CommitRevision​

Commit an architecture revision.

fieldtype
architecture_idArchitectureId
outcomewhenresult
no-such-architecture refusedno Architecture for architecture_idNoSuchArchitecture: No architecture has this id, and nothing changed.
retired refusedthe Architecture of architecture_id has state == RetiredRetiredArchitecture: The architecture is retired, so it takes no edit and no commit, and nothing changed.
empty refusedno Part with architecture_id == input.architecture_idEmptyArchitecture: The architecture has no part, so no revision was recorded.
agent-without-model refuseda Part with architecture_id == input.architecture_id and kind == Agent and not (some link in each Link with link.from_part_id == part_id and link.carries == ModelCall and (link.to_kind == Model or link.to_kind == Gateway))AgentWithoutModel: An agent part has no link carrying model calls to a model or gateway part, so no revision was recorded.
question-without-answerer refuseda Link with architecture_id == input.architecture_id and carries == Question and to_kind == Agent and not (some target in each Part with target.part_id == to_part_id and defined(target.acts_for_part_id)) and not (some forward in each Link with forward.from_part_id == to_part_id and forward.carries == Question and forward.to_kind == Principal) and some principal in each Part with principal.architecture_id == architecture_id and principal.kind == PrincipalQuestionWithoutAnswerer: A link carries questions to an agent part that acts for no principal and forwards questions to none, in an architecture that has a principal part, so no party may answer and no revision was recorded.
gateway-without-model refuseda Part with architecture_id == input.architecture_id and kind == Gateway and not (some link in each Link with link.from_part_id == part_id and link.carries == ModelCall and link.to_kind == Model)GatewayWithoutModel: A gateway part has no link carrying model calls to a model part, so the calls it passes reach no model and no revision was recorded.
not-reached-by-principal refuseda Part with architecture_id == input.architecture_id and on_border == true and some principal in each Part with principal.architecture_id == architecture_id and principal.kind == Principal and not (some link in each Link with link.to_part_id == part_id and (link.from_kind == Principal or link.carries == Grant))NotReachedByPrincipal: The architecture has a principal part, and neither a link from one nor a link carrying Grant reaches this part, so it cannot be on the border; nothing changed.
committedotherwisecreates a ArchitectureRevision in Recorded; emits RevisionCommitted

CreateArchitecture​

Create an architecture.

fieldtype
nameName
outcomewhenresult
createdotherwisecreates a Architecture in Draft; emits ArchitectureCreated

DeclarePort​

Declare a port.

fieldtype
nameName
blockName
kindPortKind
intent_eventoptional EventName
waiting_stateoptional StateName
reportslist of CommandName
protocolProtocol
outcomewhenresult
name-taken refuseda Port with name == input.namePortNameTaken: A port of this name is already declared, and nothing was declared.
declaredotherwisecreates a Port in Declared; emits PortDeclared

PlaceEntity​

Place an entity on a part.

fieldtype
architecture_idArchitectureId
revision_idArchitectureRevisionId
part_idPartId
instanceoptional integer
entity_nameEntityName
entity_iduuid
outcomewhenresult
invalid-instance refuseddefined(instance) and instance < 1InvalidInstance: A copy of a part is counted from 1, and nothing was placed.
no-such-architecture refusedno Architecture for architecture_idNoSuchArchitecture: No architecture has this id, and nothing changed.
no-such-revision refusedno ArchitectureRevision for revision_idNoSuchRevision: No architecture revision has this id, and nothing changed.
no-such-part refusedno Part for part_idNoSuchPart: A part this request names does not exist, and nothing changed.
foreign-revision refusedthe ArchitectureRevision of revision_id has architecture_id != input.architecture_idForeignRevision: The revision belongs to another architecture, and nothing was placed.
part-not-in-revision refusedthe Part of part_id has architecture_id != input.architecture_idPartNotInRevision: The part belongs to another architecture than the revision, so it is not in that revision; nothing was placed.
instance-without-copies refusedthe Part of part_id has defined(input.instance) and count == 1 and not (defined(per_part_id))InstanceWithoutCopies: The part runs one copy and is per no other part, so a placement names no copy of it; nothing was placed.
instance-out-of-range refusedthe Part of part_id has defined(input.instance) and count > 1 and not (defined(per_part_id)) and input.instance > countInstanceOutOfRange: The part runs fewer copies than the copy named, and nothing was placed.
exists refuseda Placement with revision_id == input.revision_id and part_id == input.part_id and entity_name == input.entity_name and entity_id == input.entity_idPlacementExists: The entity is already placed to this part of this revision, and nothing was placed.
placedotherwisecreates a Placement in Recorded; emits EntityPlaced

RecordContract​

Record the contract of a revision.

fieldtype
revision_idArchitectureRevisionId
portslist of ContractPort
invariantslist of RoutingInvariant
borderlist of PartId
ingresslist of ContractIngress
outcomewhenresult
empty refusedports.count == 0EmptyContract: A contract names at least one port, and nothing was recorded.
no-such-revision refusedno ArchitectureRevision for revision_idNoSuchRevision: No architecture revision has this id, and nothing changed.
contract-exists refuseda Contract with revision_id == input.revision_idContractExists: The revision already has a contract, and nothing was recorded.
recordedotherwisecreates a Contract in Recorded; emits ContractRecorded

RecordDryRunApplied​

Record an applied dry run.

fieldtype
application_idPatchApplicationId
changed_rowsinteger
outcomewhenresult
no-such-application refusedno such PatchApplicationNoSuchPatchApplication: No patch application has this id, and nothing changed.
not-a-dry-run refuseddry_run == falseAppliedWithoutRevision: A patch applied outside a dry run names the revision it committed, and nothing changed.
appliedotherwisemoves the PatchApplication Requested → Applied; emits DryRunApplied
settled refusedthe PatchApplication is in a state that does not allow itPatchApplicationSettled: The patch application was already applied or refused, and nothing changed.

RecordPatch​

Record a patch.

fieldtype
nameoptional Name
ruleslist of PatchRule
outcomewhenresult
empty refusedrules.count == 0EmptyPatch: A patch has at least one rule, and nothing was recorded.
recordedotherwisecreates a Patch in Recorded; emits PatchRecorded

RecordPatchApplied​

Record an applied patch.

fieldtype
application_idPatchApplicationId
revision_idArchitectureRevisionId
changed_rowsinteger
outcomewhenresult
no-such-application refusedno such PatchApplicationNoSuchPatchApplication: No patch application has this id, and nothing changed.
no-such-revision refusedno ArchitectureRevision for revision_idNoSuchRevision: No architecture revision has this id, and nothing changed.
appliedotherwisemoves the PatchApplication Requested → Applied; emits PatchApplied
settled refusedthe PatchApplication is in a state that does not allow itPatchApplicationSettled: The patch application was already applied or refused, and nothing changed.

RecordPatchRefused​

Record a refused patch.

fieldtype
application_idPatchApplicationId
rule_indexoptional integer
errorstring
outcomewhenresult
invalid-rule-index refusedrule_index < 1InvalidRuleIndex: A rule's position starts at 1, and nothing changed.
no-such-application refusedno such PatchApplicationNoSuchPatchApplication: No patch application has this id, and nothing changed.
refusedotherwisemoves the PatchApplication Requested → Refused; emits PatchRefused
settled refusedthe PatchApplication is in a state that does not allow itPatchApplicationSettled: The patch application was already applied or refused, and nothing changed.

RetireArchitecture​

Retire an architecture.

Called by: Deployer.

fieldtype
architecture_idArchitectureId
outcomewhenresult
no-such-architecture refusedno such ArchitectureNoSuchArchitecture: No architecture has this id, and nothing changed.
retiredotherwisemoves the Architecture Draft → Retired; emits ArchitectureRetired
wrong-state refusedthe Architecture is in a state that does not allow itRetiredArchitecture: The architecture is retired, so it takes no edit and no commit, and nothing changed.

SetActsFor​

Let an agent part act for a principal part.

fieldtype
architecture_idArchitectureId
part_idPartId
principal_part_idPartId
outcomewhenresult
self-reference refusedpart_id == principal_part_idSelfReference: A link, a per or an acts-for names the part itself, and nothing changed.
no-such-part refusedno such PartNoSuchPart: A part this request names does not exist, and nothing changed.
foreign-part refusedarchitecture_id != input.architecture_idForeignPart: A part this request names belongs to another architecture, and nothing changed.
not-an-agent refusedkind != AgentActsForNeedsAgent: Only an agent part acts for a principal, and nothing was added.
no-such-architecture refusedno Architecture for architecture_idNoSuchArchitecture: No architecture has this id, and nothing changed.
no-such-principal-part refusedno Part for principal_part_idNoSuchPart: A part this request names does not exist, and nothing changed.
retired refusedthe Architecture of architecture_id has state == RetiredRetiredArchitecture: The architecture is retired, so it takes no edit and no commit, and nothing changed.
foreign-principal-part refusedthe Part of principal_part_id has architecture_id != input.architecture_idForeignPart: A part this request names belongs to another architecture, and nothing changed.
not-a-principal refusedthe Part of principal_part_id has kind != PrincipalActsForNotPrincipal: An agent part acts for a principal part, and the part named is not one; nothing was added.
setotherwiseupdates the Part; emits AgentActsFor

SetBorder​

Put a part on the border.

fieldtype
architecture_idArchitectureId
part_idPartId
outcomewhenresult
no-such-part refusedno such PartNoSuchPart: A part this request names does not exist, and nothing changed.
no-such-architecture refusedno Architecture for architecture_idNoSuchArchitecture: No architecture has this id, and nothing changed.
missing-part refusedno Part for part_idNoSuchPart: A part this request names does not exist, and nothing changed.
foreign-part refusedthe Part of part_id has architecture_id != input.architecture_idForeignPart: A part this request names belongs to another architecture, and nothing changed.
retired refusedthe Architecture of architecture_id has state == RetiredRetiredArchitecture: The architecture is retired, so it takes no edit and no commit, and nothing changed.
not-reached refuseda Part with part_id == input.part_id and some principal in each Part with principal.architecture_id == architecture_id and principal.kind == Principal and not (some link in each Link with link.to_part_id == part_id and (link.from_kind == Principal or link.carries == Grant))NotReachedByPrincipal: The architecture has a principal part, and neither a link from one nor a link carrying Grant reaches this part, so it cannot be on the border; nothing changed.
borderedotherwiseupdates the Part; emits PartBordered

SetPer​

Run a part once per copy of another.

fieldtype
architecture_idArchitectureId
part_idPartId
per_part_idPartId
outcomewhenresult
self-reference refusedpart_id == per_part_idSelfReference: A link, a per or an acts-for names the part itself, and nothing changed.
no-such-part refusedno such PartNoSuchPart: A part this request names does not exist, and nothing changed.
foreign-part refusedarchitecture_id != input.architecture_idForeignPart: A part this request names belongs to another architecture, and nothing changed.
no-such-architecture refusedno Architecture for architecture_idNoSuchArchitecture: No architecture has this id, and nothing changed.
no-such-per-part refusedno Part for per_part_idNoSuchPart: A part this request names does not exist, and nothing changed.
retired refusedthe Architecture of architecture_id has state == RetiredRetiredArchitecture: The architecture is retired, so it takes no edit and no commit, and nothing changed.
foreign-per-part refusedthe Part of per_part_id has architecture_id != input.architecture_idForeignPart: A part this request names belongs to another architecture, and nothing changed.
setotherwiseupdates the Part; emits PartPerSet

SetSwarm​

Make an agent part a swarm.

fieldtype
architecture_idArchitectureId
part_idPartId
coordinationCoordination
start_staggeroptional duration
outcomewhenresult
no-such-part refusedno such PartNoSuchPart: A part this request names does not exist, and nothing changed.
foreign-part refusedarchitecture_id != input.architecture_idForeignPart: A part this request names belongs to another architecture, and nothing changed.
not-an-agent refusedkind != AgentSwarmNeedsAgent: Only the copies of an agent part coordinate as a swarm, and nothing changed.
no-such-architecture refusedno Architecture for architecture_idNoSuchArchitecture: No architecture has this id, and nothing changed.
retired refusedthe Architecture of architecture_id has state == RetiredRetiredArchitecture: The architecture is retired, so it takes no edit and no commit, and nothing changed.
setotherwiseupdates the Part; emits SwarmSet

Events​

eventfieldsemitted by
AgentActsForpart_id PartId, principal_part_id PartIdSetActsFor
ArchitectureCreatedarchitecture_id ArchitectureId, name NameCreateArchitecture
ArchitectureRetiredarchitecture_id ArchitectureIdRetireArchitecture
ContractRecordedcontract_id ContractId, revision_id ArchitectureRevisionId, digest DigestRecordContract
DryRunAppliedapplication_id PatchApplicationId, changed_rows integerRecordDryRunApplied
EntityPlacedplacement_id PlacementId, architecture_id ArchitectureId, revision_id ArchitectureRevisionId, part_id PartId, part_path Name, instance optional integer, entity_name EntityName, entity_id uuidPlaceEntity
ExportAddedexport_id ExportId, ingress_id IngressId, protocol ExportProtocolAddExport
IngressAddedingress_id IngressId, architecture_id ArchitectureId, name Name, audience_part_id optional PartId, implied_audience optional ImpliedAudienceAddIngress
LinkAddedlink_id LinkId, architecture_id ArchitectureId, from_part_id PartId, to_part_id PartId, carries Carries, under_part_id optional PartId, action_class optional ToolCategoryAddLink
PartAddedpart_id PartId, architecture_id ArchitectureId, name Name, kind PartKind, count integerAddPart
PartBorderedpart_id PartId, architecture_id ArchitectureIdSetBorder
PartPerSetpart_id PartId, per_part_id PartIdSetPer
PatchAppliedapplication_id PatchApplicationId, revision_id ArchitectureRevisionId, changed_rows integerRecordPatchApplied
PatchRecordedpatch_id PatchId, digest DigestRecordPatch
PatchRefusedapplication_id PatchApplicationId, rule_index optional integer, error stringRecordPatchRefused
PatchRequestedapplication_id PatchApplicationId, architecture_id ArchitectureId, patch_id PatchId, dry_run booleanApplyPatch
PortDeclaredport_id PortId, name Name, block NameDeclarePort
RevisionCommittedrevision_id ArchitectureRevisionId, architecture_id ArchitectureId, number integer, digest DigestCommitRevision
SwarmSetpart_id PartId, coordination Coordination, start_stagger optional durationSetSwarm

Views​

viewrowsfields
Architectureseach Architecturearchitecture_id ArchitectureId, name Name, state State
Contractseach Contract with revision_id == param.revision_id
asked with revision_id ArchitectureRevisionId
contract_id ContractId, revision_id ArchitectureRevisionId, digest Digest, ports list of ContractPort, invariants list of RoutingInvariant, border list of PartId, ingress list of ContractIngress
Ingresseseach Ingress with architecture_id == param.architecture_id
asked with architecture_id ArchitectureId
ingress_id IngressId, architecture_id ArchitectureId, name Name, audience_part_id optional PartId, audience_name optional Name, implied_audience optional ImpliedAudience, authenticated boolean, interface string
Partseach Partpart_id PartId, architecture_id ArchitectureId, name Name, kind PartKind, count integer, per_part_id optional PartId, acts_for_part_id optional PartId, settings list of Setting, on_border boolean, coordination Coordination, start_stagger optional duration
PatchApplicationseach PatchApplication with architecture_id == param.architecture_id
asked with architecture_id ArchitectureId
application_id PatchApplicationId, architecture_id ArchitectureId, patch_id PatchId, dry_run boolean, revision_id optional ArchitectureRevisionId, changed_rows optional integer, rule_index optional integer, error optional string, state State
Patcheseach Patchpatch_id PatchId, name optional Name, rules list of PatchRule, digest Digest
Placementseach Placement with architecture_id == param.architecture_id and (not (defined(param.part_path)) or part_path == param.part_path) and (not (defined(param.instance)) or instance == param.instance) and (not (defined(param.entity_name)) or entity_name == param.entity_name)
asked with architecture_id ArchitectureId, part_path optional Name, instance optional integer, entity_name optional EntityName
placement_id PlacementId, architecture_id ArchitectureId, revision_id ArchitectureRevisionId, part_id PartId, part_path Name, instance optional integer, entity_name EntityName, entity_id uuid
Portseach Portport_id PortId, name Name, block Name, kind PortKind, intent_event optional EventName, waiting_state optional StateName, reports list of CommandName, protocol Protocol
Reacheach Link with architecture_id == param.architecture_id
asked with architecture_id ArchitectureId
link_id LinkId, architecture_id ArchitectureId, from_part_id PartId, from_name optional Name, to_part_id PartId, to_name optional Name, carries Carries, over_part_id optional PartId, from_kind PartKind, to_kind PartKind
Revisionseach ArchitectureRevisionrevision_id ArchitectureRevisionId, architecture_id ArchitectureId, number integer, digest Digest

Types​

typeisvalues or fields
Carriesone ofPrompt, Order, Question, Answer, ModelCall, ToolCall, Claim, Message, Trigger, Review, Handoff, Call, Context, Grant, Proposal, Spec, Checkout, Result, Report, Record, Read, Run, Event
CommandName
The full name of a command of the building blocks.
an identifier or valuestring
ContractIngressa recordingress_id IngressId, audience_part_id optional PartId, implied_audience optional ImpliedAudience, authenticated boolean, protocols list of ExportProtocol, operations list of ContractOperation
ContractOperationa recordkind OperationKind, name string
ContractPorta recordport_id PortId, part_id PartId, settings list of Setting, instances integer
Coordinationone ofOrchestrator, Board, Mesh, None
Digest
Digest of the canonical form of an architecture's parts, links and border.
an identifier or valuestring
EntityName
The qualified name of an entity of a building block, such as agentic.harness.HarnessSession.
an identifier or valuestring
EventName
The full name of an event of the building blocks.
an identifier or valuestring
ExportProtocolone ofHttp, EventStream, Cli, Tool, Agent, MetricsScrape, Ui
ImpliedAudienceone ofOperator, Monitor
OperationKindone ofCommand, View, Feed, Metric
PartKindone ofPrincipal, Agent, Harness, Model, Gateway, Tool, Knowledge, Channel, Workspace, Sandbox, Runtime, Pool, Trigger, Schedule, Authority, Work, Experiment, Kpi, Question, Process, Delegation, Architecture, Store, TimeSource
PatchRulea recordverb PatchVerb, text string
PatchVerbone ofSet, Add, Remove, Connect, Replicate, Wrap, Prepend, Append, Mark, Unmark
PortKindone ofOutbound, Clock, Principal, Interface
Protocol
A regular expression over the short names of a port's commands, intent first.
an identifier or valuestring
RoutingInvarianta recordlink_id LinkId, port_id PortId, within_port_id optional PortId, predicate string
Settinga recordname string, value string
StateName
A lifecycle state of an entity of the building blocks.
an identifier or valuestring

KPIs​

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

Correctness​

KPIunitbettergatestatus
unknown_link_parts
Links whose from, to, over, as or under names no part.
How: Count of links in the architecture document that name a part that does not exist. Must be 0.
countlowergatesimulated
source: design
per_without_part
Parts whose per names no part.
How: Count of parts with a per that names a part that does not exist. Must be 0.
countlowergatesimulated
source: design
acts_for_without_part
Parts whose acts_for names no part.
How: Count of parts with an acts_for that names a part that does not exist. Must be 0.
countlowergatesimulated
source: design
egress_without_part
Parts whose egress names no part and no endpoint.
How: Count of parts with an egress that names neither a part nor an endpoint of the architecture's endpoints. Must be 0.
countlowergatesimulated
source: design
via_without_endpoint
Tool and model parts whose via names no endpoint.
How: Count of tool and model parts whose via names no key of the architecture's endpoints. Must be 0.
countlowergatesimulated
source: design
agent_without_model_path
Agent parts that reach no model part over model_call links.
How: Agent parts with no path of model_call links to a model part. Must be 0.
countlowergatesimulated
source: design
question_without_answerer
Question links that end at a part that cannot answer.
How: Links carrying questions whose target is not a principal or an agent part, or, in an architecture that has a principal part, an agent part that acts for no principal and has no link carrying questions to a principal part. Must be 0.
countlowergatesimulated
source: design
border_without_part
Border entries that name no part.
How: Count of names in the border that are not parts. Must be 0.
countlowergatesimulated
source: design
not_reached_by_principal
Border parts that no principal part reaches.
How: In an architecture that has a principal part, border parts with no link from a principal part and no link carrying grants. An architecture with no principal part is made to be nested and counts 0. Must be 0.
countlowergatesimulated
source: design
unreachable_parts
Parts that no link, per, acts_for, egress or border reaches.
How: Parts with no incoming edge of any of those kinds. No link, no reach, so an unreachable part is dead weight or a missing link. Must be 0.
countlowergatesimulated
source: design
unknown_blocks
Parts whose block is neither a part kind of the architecture block nor a block of a pack.
How: Count of parts in the architecture document whose block names no part kind and no pack block. Must be 0.
countlowergatesimulated
source: design
unknown_carries
Links that carry a kind the architecture block does not declare.
How: Count of links in the architecture document whose carries value is not one of the declared carries. Must be 0.
countlowergatesimulated
source: design
setting_unknown
Settings a part names that its block does not have.
How: Count of settings in the architecture document that are not a setting of the block of their part. Must be 0.
countlowergatesimulated
source: design
setting_invalid
Settings whose value is not of the kind or in the range its block expects.
How: Count of settings in the architecture document whose value fails the check of the block's setting table. Must be 0.
countlowergatesimulated
source: design
decision_kind_unknown
Question parts whose decision kind the architecture does not declare.
How: Count of question parts whose decision_kind names no key of the architecture's decision_kinds. Must be 0.
countlowergatesimulated
source: design
endpoint_invalid
Endpoints of the architecture that are no endpoint.
How: Count of entries of the architecture's endpoints whose name is no destination name or a part's name, with a key other than summary and ingress (an address among them), or whose ingress names no ingress in effect, and of names a nested architecture declares otherwise; one for an endpoints key that is no map. Must be 0.
countlowergatesimulated
source: design
review_without_reviewer
Review links whose target is not an agent with the role reviewer.
How: Count of links that carry a review to a part that is not an agent of role reviewer. Must be 0.
countlowergatesimulated
source: design
trigger_source_not_trigger
Trigger links that start at a part that is neither a trigger nor a schedule.
How: Count of links that carry a trigger from a part that is not a trigger or schedule. Must be 0.
countlowergatesimulated
source: design
trigger_target_not_agent
Trigger links that end at a part that is not an agent, a runtime or a process.
How: Count of links that carry a trigger to a part that is not an agent, a runtime or a process. Must be 0.
countlowergatesimulated
source: design
trigger_without_source
Trigger parts that name no source they can fire on.
How: Count of trigger parts of the architecture document that name no source to fire on. Must be 0.
countlowergatesimulated
source: design
invalid_concurrency
Triggers whose concurrency policy or parallel limit is not valid.
How: Count of triggers whose policy is not skip, queue or parallel, or whose max_parallel is below 1 or above 1 under a policy other than parallel. Must be 0.
countlowergatesimulated
source: design
invalid_schedule
Schedules without a positive interval.
How: Count of schedule parts whose every is missing or not positive. Must be 0.
countlowergatesimulated
source: design
swarm_needs_agent
Parts that set a coordination or a start stagger and are no agent.
How: Count of parts that name coordination or start_stagger and whose block is not agent. Must be 0.
countlowergatesimulated
source: design
empty_architecture
Architectures with no part.
How: 1 when the architecture document has no part, else 0. Must be 0.
countlowergatesimulated
source: design
self_reference
Links from a part to itself, and per or acts_for that name the part itself.
How: Count of links whose from and to are the same part, plus parts whose per or acts_for names themselves. Must be 0.
countlowergatesimulated
source: design
not_a_channel
Links that travel over a part that is not a channel.
How: Count of links whose over names a part whose block is not channel. Must be 0.
countlowergatesimulated
source: design
link_exists
Links that repeat the from, to and carries of an earlier link.
How: Count of links in the architecture document whose from, to and carries equal those of an earlier link. Must be 0.
countlowergatesimulated
source: design
acts_for_not_principal
Agents that act for a part that is not a principal.
How: Count of acts_for names in the architecture document that resolve to a part whose block is not principal. Must be 0.
countlowergatesimulated
source: design
as_not_principal
Links that post as a part that is not a principal.
How: Count of links in the architecture document whose as names a part whose block is not principal. Must be 0.
countlowergatesimulated
source: design
under_not_authority
Links under a part that is not an authority, or under a budget.
How: Count of links in the architecture document whose under names a part whose block is not authority, or an authority whose kind is budget. Must be 0.
countlowergatesimulated
source: design
link_grant_invalid
Links whose grant cannot stand.
How: Count of links in the architecture document with an action_class and no under, with under on a link that is not a call from an agent part to a tool part, under with no action class from the link or the tool's category, or an action_class that is no tool category or differs from the tool's category. Must be 0.
countlowergatesimulated
source: design
ungoverned_tool_call
Call links to a tool under no authority from a part whose other calls are under one.
How: Count of call links to a tool part without under, from a part that has a call link under an authority; the default deny would refuse every call on them. Must be 0.
countlowergatesimulated
source: design
gateway_without_model
Gateways with no model_call link to a model.
How: Count of gateway parts that have no link carrying model_call to a model. Must be 0.
countlowergatesimulated
source: design
store_reach_not_record_or_read
Links to a store part that carry neither record nor read.
How: Count of links whose to is a store part and whose carries is neither record (a write) nor read. Must be 0.
countlowergatesimulated
source: design
bus_reach_not_event
Links to, from or over an event channel that do not carry event.
How: Count of links whose from, to or over is a channel part of kind event and whose carries is not event. Must be 0.
countlowergatesimulated
source: design
semantic_store_without_model
Semantic stores that make their vectors and reach no model part over model_call links.
How: Count of store parts of kind semantic with vectors made and no path of model_call links to a model part. Must be 0.
countlowergatesimulated
source: design
external_store_not_in_egress
External stores a part reaches that the egress of its sandbox does not name.
How: Count of pairs of a sandbox part and an external store part (scope external) that a part the sandbox is per links to, where the sandbox's egress does not name the store. Must be 0.
countlowergatesimulated
source: design
via_not_in_egress
Endpoints a part reaches through via that the egress of its sandbox does not name.
How: Count of triples of a sandbox part, a tool or model part a part the sandbox is per links to, and the endpoint without an ingress that tool or model names as its via, where the sandbox's egress does not name the endpoint. Must be 0.
countlowergatesimulated
source: design
module_link_cycles
Cycles of links that run through the borders of two or more nested architectures, under the policy module_link_cycles refuse.
How: Under policies.module_link_cycles refuse, count of strongly connected sets of parts of the flattened document (over the links, from to to) that hold a part inside and a part outside each of at least two nested architectures. 0 without the policy. Must be 0.
countlowergatesimulated
source: design

Completeness​

KPIunitbettergatestatus
parts_with_link_share
Share of parts that have at least one link.
How: Parts that are the from or to of a link divided by all parts of the revision.
sharehigher–planned
source: design
agents_total
Agent copies: the sum of count over the agent parts.
How: The sum of count over the parts with block agent, 1 for a part without count; a marked count at its value as built. Read from the architecture document by agenticspec sim check, before any simulation.
counthigher–simulated
source: design
principals_total
Principal parts.
How: Parts with block principal in the architecture document, read by agenticspec sim check.
By work mode: autonomous: lower, pairing: higher, review: higher
countlower–simulated
source: design
model_call_paths
Distinct paths of model_call links from an agent part to a model part.
How: Paths without a repeated part over model_call links that start at an agent part and end at the first model part they reach, summed over the agent parts. More than one per agent is a fallback. Read by agenticspec sim check.
counthigher–simulated
source: design

Quality​

KPIunitbettergatestatus
parts_secret_can_reach
Parts a secret granted to some part can reach over links.
How: Parts reachable over links from any part that holds a secret grant. Fewer is a smaller blast radius.
countlower–planned
source: design
coordination_calls
Model calls agents spend coordinating rather than working, reading a board or the messages of a mesh.
How: Model calls made for a board read or for reading mesh messages. The simulator counts one per board read and mesh_read_calls per message read.
countlower–simulated
source: design
coordination_messages
Messages a copy of a mesh sends to the other started copies when it starts a task.
How: MessageSent events between copies of one mesh part. The simulator counts one per other started copy at each task start.
countlower–simulated
source: design
human_touchpoints
Links that end at a principal and carry a question or a proposal.
How: Links whose to is a principal part and whose carries is question or proposal, the two kinds the architectures use to ask a human to decide. A prompt from a principal is not counted. Read by agenticspec sim check.
By work mode: autonomous: lower, pairing: ignore, review: ignore
countlower–simulated
source: design
autonomy_depth
Links in the longest chain of order and question links from agent to agent.
How: The longest path without a repeated part over links that carry order or question and join two agent parts, counted in links; no principal is on such a chain. 0 when no agent passes work or a question to another. Read by agenticspec sim check.
By work mode: autonomous: ignore, pairing: lower, review: lower
countlower–simulated
source: design
ungated_model_calls
Paths of model_call links from an agent to a model that pass no gateway part.
How: Of the paths model_call_paths counts, those with no gateway part between the agent and the model. Such a call has no rate limit, budget or record of a gateway. Read by agenticspec sim check.
countlower–simulated
source: design
single_points
Parts whose removal leaves some agent with no model_call path to a model.
How: The cut vertices of the model_call graph between agents and models. A part counts when some other agent part that reaches a model reaches none once the part is removed; a lone gateway or a lone model counts. agenticspec sim check names them.
countlower–simulated
source: design
border_parts
Parts named in the border, the parts that take input from outside.
How: Distinct names in the border of the architecture document that are parts. Fewer is a smaller surface. Read by agenticspec sim check.
countlower–simulated
source: design
egress_targets
Distinct parts and endpoints named in the egress of the sandbox parts.
How: The union of the egress lists of every part with block sandbox, counting the names that are parts or endpoints once. Fewer is a smaller exposure. Read by agenticspec sim check.
countlower–simulated
source: design
shared_workspaces
Workspace parts whose sharing is not exclusive.
How: Parts with block workspace whose sharing is anything but exclusive, a workspace without sharing included. Read by agenticspec sim check.
countlower–simulated
source: design
capacity_ratio
Agent copies that claim a pool divided by its capacity, the largest over the pools.
How: For each pool part with a capacity, the copies of the agent parts with a claim link to it divided by the capacity; the largest of these, 0 without a pool. A marked count or capacity at its value as built, as the simulator reads it. Above 1, copies wait for the pool. Read by agenticspec sim check.
ratiolower–simulated
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 architecture:

settingtypeunitdefaultcontractwhat
refstringThe path of the nested architecture document, relative to this one.
digeststringThe digest of the nested document's bytes, sha256:<hex>.
activewindowsWhen the nested architecture works: one window of the run, {from: 0s, until: 4h}, or a list of them, [{until: 4h}, {from: 8h}]. Outside its windows it is off: its parts take no task, and what they hold or have queued, and each task sent to them, goes to handback. Without it, it works the whole run.
handbackpartWhere the tasks of the nested architecture go while it is off, beside active: a part of the architecture that nests it, outside the nested one, or a border part of another nested architecture, <part>.<border part>. A shared channel gets them as posts, an agent that takes tasks over an order link as handed tasks, any other part through the backlog.
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.