EIP.tools

EIP.tools

⚠️ DraftStandards Track: ERC

ERC-8523: AI Cell Completeness Framework

A verifiable, expiring state of AI units across infrastructure, protocol and economic conditions, with rules for how it survives change

Authors
Created2026-11-28
Discussion Linkhttps://ethereum-magicians.org/t/erc-8523-ai-cell-completeness-framework-accf/30539
Requires

Markdown

https://raw.githubusercontent.com/ethereum/ERCs/re...
Pull Request#2237PR open

EIP-GPT summary

Contents
AbstractMotivationSpecification1. Terms and scope2. Conformance2.1 Objects2.2 Parts of an implementation2.3 Four things that are reported apart2.4 Dependencies3. Cell completeness3.1 Definition3.2 Properties3.3 Independence and dependencies3.4 Registration is not completeness4. Documents and commitments4.1 Canonical form4.2 Unit Descriptor4.3 Cell Manifest4.4 Manifest root4.5 Dependency masks and digests5. Baseline Requirements5.1 Structure5.2 Class table5.3 Infrastructure axis5.4 Protocol axis5.5 Economic axis5.6 Lifecycle capabilities6. Profiles6.1 Rules6.2 Versions6.3 Interface7. Units and transitions7.1 Cell Record7.2 Control relation and authorization7.3 Exclusive claims7.4 Transitions7.5 Interface8. Statements8.1 Content8.2 Issuance8.3 Applicability8.4 Evidence references and adapters8.5 Interface9. Evaluation9.1 Policy9.2 Derived view9.3 What the view reports9.4 Flags10. Types11. InvariantsRationalePublished proposals that fill the functionsRelated workBackwards CompatibilityTest CasesCase A: assessment, upgrade, reassessmentCase B: derivation and successionCase C: composition, group registration and interactionThings that must not happenVectorsExample documentsReference ImplementationSecurity ConsiderationsCopyright

Abstract

This proposal defines the AI Cell Completeness Framework (ACCF). An AI unit, which may be an agent, a robot or another independently acting AI system, is cell-complete when, under a declared boundary, declared duties, a committed configuration, a named profile and at a stated time, it meets three sets of requirements together: infrastructure requirements (it can keep running and be maintained), protocol requirements (it can be identified, dealt with under rules and held to its commitments) and economic requirements (its own activity pays for its existence with a surplus). The same requirements cover four lifecycle capabilities: derivation, migration and succession; interaction; repair and upgrade; composition into groups. A unit in that state is called an AI Cell.

The framework fixes five objects (Unit Descriptor, Cell Manifest, Completeness Profile, Completeness Statement, Transition Record), a set of Baseline Requirements that no profile claiming them may weaken, and the rule by which a consumer derives the state from attributable statements under its own stated policy. Completeness is never stored as a flag. It is computed from statements that expire, that can be revoked, and that stop applying when the part of the unit they depend on changes. The framework also fixes what does and does not pass through a transition: a derived unit, a successor, an upgraded unit and a group each have to establish the state on their own record.

Motivation

AI units increasingly act as parties in their own right: they hold accounts, take on tasks, pay for inference, call each other and form groups. Existing proposals each standardize one mechanism such a unit uses: an identity record, a task market, a safety binding, a dispute path, a maintenance log. None of them answers the question a counterparty, a group or an operator actually has before relying on a unit: is this a whole participant?

A person who can work and be relied on in a society is usually in good health, has a recognized legal standing, and can pay their own way. Any one of the three alone is not enough. The same holds for an AI unit, in three corresponding sets of conditions:

  • it can keep running, with the compute, the model, the state, the tools and the upkeep its work needs;
  • it stands in a complete and consistent set of rule relations, so that others can identify it, check its authority, rely on its commitments and resolve conflicts with it;
  • what it earns from its own activity exceeds everything it costs, and it can turn that income into the next period's resources.

Without a common definition, several things go wrong in practice:

  • Completeness is claimed by label. A registered identity, an installed protocol stack or a positive balance is presented as if it settled the matter.
  • Evidence is assembled from unrelated parts: the parent's income, the child's identity and the stability of a configuration that is no longer running.
  • Conclusions outlive what they were about. A unit changes its model, its controller or its accounts, and assessments made before the change keep being cited.
  • Copies multiply what cannot be copied. A derived unit is presented with its parent's balance, capacity or track record.
  • A group is taken to be the sum of its members, although nobody can commit the group, or the same shared capacity is counted once per member.
  • A definition is hollowed out. The hard conditions are declared not applicable and the name is kept.

This proposal gives the joint determination a precise form and makes its continuity through change a matter of rules. It reuses what exists. Assertions, safety bindings, maintenance records, task settlements and other records defined elsewhere serve as evidence; the framework adds the conjunction over the three axes, the rule for when evidence still applies, and the invariants of derivation, migration, succession, repair, upgrade and composition.

The word "cell" names the unit of a larger system. A set of AI Cells together with the rules of their interaction and of their state transitions is an AI cellular automaton in the sense used here: an open, asynchronous system of heterogeneous cells, without a lattice, a common clock or a fixed neighborhood. The idea that a unit which is to reproduce carries a description of itself, a means of construction from that description and a means of copying the description goes back to von Neumann's work on self-reproducing automata. That lineage explains the role of the manifest in this proposal. It is not offered as a proof of anything the specification requires.

Specification

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.

1. Terms and scope

  • AI unit (unit): an AI system that is described and assessed as one subject. An agent, an embodied system such as a robot, a service and a group of units are units.
  • Cell-complete: the state defined in section 3.
  • AI Cell: a unit that is cell-complete.
  • AI cellular automaton: a system formed by AI Cells and the rules of their interaction and state transitions. The term is descriptive; this specification defines no object of that name.
  • Boundary: what the unit answers for and what answers for it: the accounts, resources, duties and obligations stated in its Unit Descriptor.
  • Duties: the work the unit declares it does. Requirements are read against the declared duties.
  • Control mechanism: the arrangement through which the unit is controlled. It may be one account, several parties, a contract or another declared mechanism. The controller is the account or contract through which that mechanism acts on a registry.
  • Axis: one of the three sets of requirements: infrastructure, protocol, economic.
  • Baseline class: one of the twenty-seven classes of requirement of section 5.
  • Profile: a versioned set of requirements on the three axes (section 6).
  • Manifest: the committed description of the unit's configuration (section 4.3). An entry is one separately committed part of it.
  • Scheme: the manifest entry that describes one lifecycle capability end to end (section 5.6).
  • Statement: an attributable conclusion of an assessor about requirements of one axis of one unit (section 8).
  • Transition: a recorded change of a unit (section 7.4).
  • Consumer: a party that relies on the state of a unit. A consumer states what it accepts in a policy (section 9.1).
  • Derived view: what a consumer's policy gives for a unit at a timepoint (section 9).

The framework defines when the state holds, what supports it and how it continues through change. It defines no threshold of quality, no ranking of units and no score. It does not say which units a consumer should deal with: cell completeness is a condition units can aim for and consumers can ask for, and a consumer decides whether to make it a condition of admission.

2. Conformance

2.1 Objects

The framework has five objects.

ObjectWhat it isWhere it lives
Unit DescriptorWho the unit is, what it answers for, how it is controlledA document; the Cell Record commits to it and holds the facts a registry enforces
Cell ManifestThe configuration, state materials, dependencies and authorizations needed to deploy, restore, maintain and derive the unitA document; the Cell Record holds one commitment per entry and their root
Completeness ProfileThe requirementsA document; a profile registry commits to it and holds the dependency rules of each requirement
Completeness StatementA conclusion about requirements, with its coverage, dependencies, method, window and evidenceA document; a statement registry commits to it and holds what the derived view needs
Transition RecordWhat changed, on whose authorization, with which effect on obligationsA document; the Cell Record's registry commits to it and applies the change

The Cell Record is the on-chain form of the Unit Descriptor together with the manifest commitments.

2.2 Parts of an implementation

A conforming implementation provides the three interfaces of sections 6.3, 7.5 and 8.5, in one contract or in several, and supports ERC-165 detection of each. The unit registry and the statement registry implement the clock functions of ERC-6372; all timepoints of this specification are uint48 values in that clock domain, and a deployment has one clock domain that never changes.

Evidence adapters (section 8.4) are OPTIONAL. An implementation MAY add functions, events, entries, transition kinds and requirements; it MUST NOT change the meaning of what this specification defines.

2.3 Four things that are reported apart

  • Conformance of an implementation: a contract implements the interfaces and rules of this specification. This says nothing about any unit.
  • Result: what a statement or a derived view says about requirements: satisfied, not satisfied, undetermined, and for a statement about conditional requirements only, not applicable.
  • Validity of a record: whether a statement is expired, revoked or replaced by a later statement of the same assessor, and whether it still applies to the unit as it is now.
  • Operating state: whether the unit is active, degraded, suspended, in maintenance or retired.

An implementation MUST NOT merge these into one value. Missing evidence, a failed verification and an unknown extension are never read as satisfied, and are not reported as a finding against the unit either: they are undetermined, with the reason reported (section 9.4).

2.4 Dependencies

This specification requires ERC-165 and ERC-6372. It requires no other proposal: the Baseline Requirements are stated in terms of functions, and any mechanism that meets a requirement can serve. The Rationale lists a set of published proposals that fill those functions, as an informative mapping.

3. Cell completeness

3.1 Definition

An AI unit is cell-complete when, under its declared boundary and duties, its committed configuration, a named profile that claims the Baseline Requirements, and at an evaluation timepoint, the requirements of the infrastructure axis, of the protocol axis and of the economic axis are all satisfied, including the conditions of the four lifecycle capabilities that those requirements cover. A unit in that state is an AI Cell.

Writing I, P and E for the three axes, for a unit u with boundary b and configuration v, under profile p at time t:

C(u, b, v, p, t) = I(u, b, v, p, t) AND P(u, b, v, p, t) AND E(u, b, v, p, t)

The three axes are the coordinates of the assessment. The four lifecycle capabilities are requirements that run across the coordinates: each capability has one part on each axis, and the three parts refer to one scheme (section 5.6). They are not a fourth axis.

3.2 Properties

  1. Conjunctive. The state holds only when all three axes hold. No strength on one axis offsets a gap on another, and no implementation derives the state from a combined score. Measured quantities, such as availability, surplus or months of cover, MAY support individual requirements.
  2. Relative. The state is always relative to a profile and to the boundary, duties and configuration that were assessed. A conclusion under one version of a profile does not carry over to another version, and a new version does not rewrite conclusions made under an earlier one.
  3. Bounded below. A profile that claims the Baseline Requirements cannot remove or weaken any of them (section 6.1). A profile that does not claim them can be useful and cannot yield the state.
  4. Perishable. Every statement has a validity period and a set of dependencies. It stops supporting the state when it expires, when it is revoked, when something it depends on changes, or when a record it refers to no longer supports it.
  5. Derived. The state is computed from statements, the unit's current record and a consumer's policy each time it is asked for. No registry stores it.

The different requirements MAY rest on different observation windows: infrastructure health on recent operation, economic performance on an accounting period. All evidence that supports the state at one time MUST be about the same unit in a compatible configuration and boundary. A conclusion cannot be assembled from one unit's income, another unit's identity and the stability of a configuration that is no longer the committed one.

3.3 Independence and dependencies

A unit MAY lease compute, buy inference, share infrastructure and have equipment maintained by others. Independence in this specification means that the unit can arrange, bear and keep up its necessary dependencies under an explicit authorization, and that its conduct and obligations are attributable within its boundary. It does not mean that the unit owns its hardware or trains its model. Each dependency that matters to a requirement is disclosed with how it is recovered, substituted, degraded or exited in good order.

3.4 Registration is not completeness

A Cell Record can be created for any unit, including one that is a candidate, funded by its controller, degraded or not yet assessed. Creating a record, holding an identifier, publishing a manifest or holding any label gives no result on any requirement and no authority to act.

4. Documents and commitments

4.1 Canonical form

The five objects are JSON documents. The canonical form of a document is the form of RFC 8785 (JSON Canonicalization Scheme). Documents carry no floating-point numbers; quantities are integers or decimal strings. The commitment to a document, or to one manifest entry, is the keccak256 hash of the UTF-8 bytes of its canonical form.

JSON Schemas for the documents are in the assets: unit-descriptor, manifest, profile, statement, transition and policy. The schemas fix the members this specification relies on and leave the rest open.

4.2 Unit Descriptor

A Unit Descriptor states:

  • the subject: a type and type-specific data. The subject key is keccak256(abi.encode(subjectType, subjectData)), where subjectType is the keccak256 hash of the type string;
  • the kind of unit, as an open label;
  • the duties the unit declares and the environment it works in;
  • the boundary: the accounts and resources that are the unit's, the obligations it carries, and for a group its members;
  • the control mechanism: how control is exercised, and the arrangement for intervention, which states who can restrict which operations, how the unit stops taking on new obligations, and how it resumes or exits;
  • the lineage: the unit it was derived from, if any, and how that relation is disclosed.

Subject, duties, boundary and control mechanism are the coordinate every conclusion about the unit is reached for. The descriptor commitment is the commitment to the document without its metadata member, which holds display names and notes that no requirement is judged on. Every change of the descriptor advances the unit's boundary version.

4.3 Cell Manifest

Under a declared recovery objective, declared failure assumptions and declared preconditions, a manifest describes completely what is needed to rebuild, restore or derive the unit, the configuration, the state materials, the dependencies and the authorizations, in a way that lets each of these be checked. A manifest distinguishes three kinds of content:

  • configuration and deployment recipe: packages, versions, dependencies, initial conditions;
  • references to recovery materials: checkpoints, memory state, integrity commitments, conditions of access;
  • external conditions that have to be obtained or confirmed: licenses, supply capacity, authorization credentials, ability to pay.

A manifest is a description. A commitment to it provides no backup, no license and no funds, and whether the unit can in fact be rebuilt is established by evidence that the materials are available and that the procedure was carried out (classes 7 to 10 of section 5.2). Rebuilding means, depending on the operation, restoring the configuration, restoring state from a checkpoint, moving the unit while keeping it the same subject, or deriving a new subject; it never means reproducing a stochastic inference process bit by bit. A manifest MUST NOT contain private keys or other secrets.

A manifest consists of entries. Each entry has an index and is committed separately.

IndexEntryContent
0executionCompute, storage, network, energy; for an embodied unit also sensors, actuators and working environment; how each is supplied
1intelligenceThe model or other inference mechanism, its capacity, its supply conditions and its path for substitution or degradation
2stateThe state mode, references to state and memory materials, and how continuity is kept
3capabilityRuntime, harness, skills and tools with versions, permissions and dependencies
4maintenanceMonitoring, diagnosis, checkpoints, repair, upgrade, rollback, degradation and termination
5protocolThe rule sets the unit is bound to: function, version, role, scope, where each is enforced, how exceptions are handled
6economicAccounts, denomination, measurement method, observation window, classes of income and cost, replenishment arrangement
7controlHow authorization credentials are used, protected, changed, revoked and recovered
8scheme:lineageThe scheme for derivation, migration and succession
9scheme:interactionThe scheme for communication, exchange and transaction
10scheme:maintenanceThe scheme for repair and upgrade
11scheme:compositionThe scheme for joining and leaving groups
12 to 239extensionDefined by a manifest schema or a profile

Information that no requirement is judged on, such as a display name, belongs in the metadata member of the manifest document, which is not committed.

An entry MAY declare what else it depends on, in its dependsOn member: for example, a lineage scheme that copies memory only where the model's license allows it depends on the intelligence entry. The member is part of the entry, so declaring or changing it changes the entry. The Cell Record holds each declared relation as a dependency mask for its entry (section 4.5). A unit declares the relations its configuration has; the Baseline minimum of section 5 is the least every unit depends on and not the dependency graph of any particular unit.

4.4 Manifest root

The manifest root is computed over the committed entries in ascending order of index:

root = keccak256(abi.encode(MANIFEST_DOMAIN, uint8[] indices, bytes32[] commitments))
MANIFEST_DOMAIN = keccak256("ACCF manifest root v1")
                = 0x35228bc22275a8e8e02ad568a05cbf5fc782f9e223479251d15fb8e1cf050909

An entry whose commitment is zero is absent and is not part of the root. Every change of an entry advances the unit's manifest version.

Each entry also has a revision. Every transition that names an entry, for its commitment, for its declared relation or for both, advances that entry's revision by one, whether or not the commitment changes. A repair that reconfirms an entry, and an upgrade that sets an entry back to an earlier commitment, therefore produce a new revision. Revisions are not part of the root: two configurations with the same entries have the same root, and the registry still tells them apart.

4.5 Dependency masks and digests

A dependency mask is a 256-bit value. Bit i, for i from 0 to 239, names manifest entry i. Bit 253 names the authorization configuration (section 7.2). Bit 254 names the control relation (the controller and the control version). Bit 255 names the boundary (the descriptor commitment and the boundary version). Bits 240 to 252 are reserved and zero.

The closure of a mask adds, for every entry the mask names, the relation that entry declares, and repeats this until nothing is added. The dependencies of a statement are the closure of its mask: the minimum masks of the classes it covers, what its assessor adds, and what the unit's entries declare they rely on.

The dependency digest of a unit for a mask is:

closure       = the closure of the mask under the unit's declared relations
values        = the commitments of the entries the closure names, in ascending order of index (zero for an absent entry)
revisions     = the revisions of those entries, as uint32, in the same order
boundary      = bit 255 of closure set ? keccak256(abi.encode(descriptorHash, boundaryVersion)) : 0
control       = bit 254 of closure set ? keccak256(abi.encode(controller, controlVersion)) : 0
authorization = bit 253 of closure set ? keccak256(abi.encode(controller, controlVersion, authorizationRevision)) : 0
digest        = keccak256(abi.encode(closure, values, revisions, boundary, control, authorization))

A digest changes whenever something its closure names changes, and never takes an earlier value again: entries are compared by commitment and revision, the boundary, the control relation and the authorization configuration by version. Setting a configuration back to an earlier state is a new state. It revives no conclusion made about the earlier state (section 7.4).

5. Baseline Requirements

5.1 Structure

The Baseline Requirements are twenty-seven classes of requirement: ten on the infrastructure axis, nine on the protocol axis and eight on the economic axis. On each axis the first classes state the conditions of the axis itself and the last four state that axis's part of the four lifecycle capabilities.

Each class has a minimum dependency mask. A statement that covers a requirement of the class depends at least on what that mask names (section 8.2). Every class depends on the boundary, because every conclusion holds for the subject, duties and boundary it was reached for. Classes about who may do what depend on the authorization configuration as well, and so does class 22: the resources that can meet an obligation are those the parties authorized to dispose of them can use. A minimum is the least every deployment depends on. The dependencies of a particular unit are larger: its declared relations (section 4.3) extend them, and a statement depends on the closure. The table of section 5.2 is version 1 of the class table, with the semantics and numbering it fixes.

5.2 Class table

ClassAxisRequirementMinimum dependencies
1IExecution and resource supply. The unit holds or can keep obtaining the compute, storage, network, energy and, if embodied, the sensors, actuators and working environment its declared duties needexecution, boundary
2IIntelligence supply. The model or other inference mechanism is available in the capacity and capability the duties need, under stated supply conditionsintelligence, boundary
3IState and memory continuity. Identity-related state, working state and memory are intact, accessible, persisted as the declared state mode says, restorable and migratablestate, boundary
4ICapability execution environment. Runtime, harness, skills and tools are present in the committed versions, usable under the current permissions and environment, and executablecapability, intelligence, boundary
5IMaintenance and recovery. Monitoring, diagnosis, checkpoints, repair, upgrade, rollback, degradation and termination mechanisms exist and workmaintenance, state, boundary
6IControl relation and authorization credentials. The technical means to use, protect, change, revoke and recover the control relation and the credentials exist, work and can be restoredcontrol, control relation, authorization configuration, boundary
7ILineage capability, mechanism. Configuration rebuild, checkpoint restore, continuity-preserving migration and derivation of a new subject are feasible end to end, with their materials availablescheme:lineage, execution, state, capability, maintenance, boundary
8IInteraction capability, mechanism. The unit can reach, be reached, sign, deliver and recordscheme:interaction, execution, capability, boundary
9IMaintenance capability, mechanism. The unit can be suspended or degraded, changed, checked and resumedscheme:maintenance, maintenance, boundary
10IComposition capability, mechanism. The unit can take a role in a group and leave itscheme:composition, capability, boundary
11PSubject identification and attribution. The unit can be identified by others and its conduct attributed to it within its boundaryprotocol, boundary, control relation
12PPermissions and authorization relations. For every kind of action the unit takes, the source of authorization, the authorized party, the resources and actions covered, the scope, limits, validity and revocation conditions, and the place of the check on the execution path are identifiableprotocol, control, control relation, authorization configuration, boundary
13PBinding, compatibility and enforcement of rules. Every rule set the declared activities call for is bound in a stated version; the bound rule sets are compatible in subject, version, time, authorization and result semantics; they are enforced on the execution paths they governprotocol, capability, boundary
14PSafety constraints. Safety constraints applicable to the duties are adopted, in force and bound to the states they apply inprotocol, intelligence, capability, boundary
15PContinuity of commitments. Commitments and obligations stay identifiable through refusal, breach, dispute, suspension, exit and succession, and each of these has a stated handlingprotocol, boundary
16PLineage capability, rules. An applicable authorization for derivation, migration and succession, the identity rules of the result, and the fate of open obligations are statedscheme:lineage, protocol, control relation, authorization configuration, boundary
17PInteraction capability, rules. The rules of each stage of interaction the unit uses are stated, including refusal and disputescheme:interaction, protocol, authorization configuration, boundary
18PMaintenance capability, rules. Who authorizes a change, how it is recorded and which obligations hold while it lasts are statedscheme:maintenance, protocol, control relation, authorization configuration, boundary
19PComposition capability, rules. How the unit joins, which role and representation it accepts and how it exits are statedscheme:composition, protocol, authorization configuration, boundary
20EAccounting boundary, method and window. The accounts, resources and obligations inside the boundary, the measurement method and the observation window are stated and can be checkedeconomic, boundary
21EFull cost and positive surplus. Over the window, income from attributable activity exceeds the full cost of existing, working and meeting obligationseconomic, execution, intelligence, boundary
22EAbility to meet obligations. Disposable resources cover the obligations falling due in the stated period and the minimum replenishmenteconomic, boundary, control relation, authorization configuration
23EExecutable replenishment path. Income can be turned into the next period's resources through a settlement, retention, payment and procurement path that is authorized and can be carried outeconomic, execution, intelligence, control, control relation, authorization configuration, boundary
24ELineage capability, resources. Which resources a derived or succeeding unit receives, who bears the cost and who answers for what are statedscheme:lineage, economic, boundary
25EInteraction capability, resources. The unit can settle what its interactions commit it toscheme:interaction, economic, boundary
26EMaintenance capability, resources. The cost of maintenance is fundedscheme:maintenance, economic, boundary
27EComposition capability, resources. Contributions, allocations of shared resources and internal transfers are stated, and shared resources are not counted twicescheme:composition, economic, boundary

The table as data, with the masks, is in baseline.json.

5.3 Infrastructure axis

Classes 1 to 5 are five functional domains. No profile and no assessment skips a domain: a unit that keeps no working memory still declares its state mode, and class 3 is then assessed on the continuity of identity, permissions, task state and what recovery needs. Class 6 is a requirement that cuts across the five: on this axis it asks whether the technical means of control exist, work and can be recovered; where authority comes from and how far it reaches is asked on the protocol axis (class 12). Holding a key is not having the authority to act.

For every domain an assessment considers availability, integrity, the ability to be maintained and to evolve, and how the dependencies that matter are managed. Being replaceable is a property an assessment describes, and a profile MAY require it; the Baseline does not require every dependency to be replaceable.

Health is relative to duties. A unit that translates documents does not need to control a machine; an embodied unit has to handle its perception and physical execution. A profile for embodied units MAY add substantive requirements for sensing, actuation and physical recovery, with their own rules for when a conclusion stops applying. For memory, skills and tools, existence is not enough: an assessment establishes which state version they belong to, that they are usable, and that they are compatible with the current permissions and environment. Having a skill package and being able to invoke it correctly are two facts.

5.4 Protocol axis

The protocol axis asks whether, within its declared activities, the unit stands in rule relations that cover identification, authority, information, commitments, exchange of value, governance, safety, disputes and continuity, and whether those relations have stated versions, bindings, places of enforcement and conflict handling. Four checks apply to classes 11 to 19:

  1. Coverage. Every rule the current activities call for has a mechanism.
  2. Compatibility. The mechanisms agree in subject, version, time, authorization and result semantics.
  3. Enforcement. The rules are in the execution paths of tasks, payments and information flows. A unit can register a safety specification, a dispute policy and a task mechanism while its payment path checks none of them; that configuration has a gap.
  4. Closure of exceptions. Refusal, breach, dispute, suspension, exit and succession each have a handling.

Authorization is a requirement of its own (class 12). It is met by account, delegation or execution-gating mechanisms. A record of identity, a safety binding, a statement, a membership or any label MUST NOT be taken as an authorization. A collective decision has effect only through an authorization and an execution path bound to it.

Interaction between two units. That two units are bound to the same rule set does not establish that they can interact. A given interaction can take place when the semantics and versions of both sides are compatible, directly or through a declared adaptation, and when the role, authorization, scope, transport, resource and settlement conditions of that interaction are met on both sides. The same rule set can be bound in incompatible versions or configurations, and different rule sets can be made to work together. A unit that refuses an interaction for a stated ground is interacting correctly.

A unit need not perform every activity for which a rule set exists. A unit that has had no dispute can still have a bound dispute path; a unit that has joined no group can still be able to join one. Whether a requirement applies is decided by a rule the profile states in advance and never by the unit declaring a hard requirement not applicable.

5.5 Economic axis

Surplus. Over an observation window W:

S(W) = R_activity(W) - C_full(W)        class 21 is satisfied only if S(W) > 0

R_activity is the income attributable to the unit's activity, measured by the stated method. C_full is the full cost of keeping up the declared operation, doing the work and meeting obligations. A statement reports which of three situations it found: cost coverage not achieved (S < 0), break-even (S = 0), positive surplus (S > 0). Only the third satisfies class 21. Where a ratio is reported instead, the condition is a ratio above one, and where the cost is zero the difference is used.

Income. Income from service to others counts. A reward for work counts when it corresponds to attributable work and its metering, receipt, use or redemption has a stated basis. Top-ups from the controller, loan principal, gifts and start-up subsidies are reported separately and do not count merely because they reached an account of the unit. A token the unit issues and prices itself is not evidence of income. A transaction with a related party counts according to the evidence of delivery and the boundary rules, not according to who paid.

Cost. Full cost includes every class of cost the declared operation has: inference, compute and hosting, network fees, maintenance, necessary human labor, wear of owned equipment, and obligations such as refunds and fees. A cost class with no cost in the window is stated with the reason, and a free service is disclosed as the dependency it is. The cash paid for equipment and the cost of using it over a period are kept apart. A statement that addresses only part of the cost classes does not establish a surplus.

Missing figures are never zero. A figure that is not available makes the requirement undetermined.

Ability to meet obligations (class 22) and replenishment (class 23) are separate from surplus and both are required. A unit with a profit on paper that cannot pay what falls due tomorrow does not have a complete economic cycle. Replenishment MAY be carried out by the unit itself or through an explicitly authorized service or fiduciary that uses the unit's own income; the way it is carried out and the dependencies it has are disclosed. An expectation that the controller will help when the time comes is not a replenishment path.

Three descriptions that are not levels. A statement describes, and keeps apart: economic self-sustenance (the coverage and surplus situation); payment autonomy (who budgets, procures and pays, under which authorization: by hand on the unit's behalf, on approval, under a standing authorization, or autonomously); supply control (whether supply is bought, leased or operated by the unit, and how it can be substituted). A unit that spends a sponsor's money without human involvement has payment autonomy and not self-sustenance. Stages of development of a deployment are descriptions on these three dimensions; they are not grades of cell completeness. A profile for sponsored or early-stage units MAY exist and cannot yield the state.

Groups. The accounts of a group eliminate transactions between parts of the assessed boundary, allocate shared resources so that the allocations do not exceed the capacity, and do not count a commitment twice.

The rules of this section, applied to figures, are in economic.json.

5.6 Lifecycle capabilities

The three axes holding does not by itself give a unit any lifecycle capability: a unit that runs well, is fully bound and earns a surplus may hold no license to copy its software. Each capability is therefore required explicitly, through three classes, one per axis, that depend on one scheme:

CapabilityScheme entryInfrastructureProtocolEconomic
Derivation, migration, successionscheme:lineageclass 7class 16class 24
Communication, exchange, transactionscheme:interactionclass 8class 17class 25
Repair, upgradescheme:maintenanceclass 9class 18class 26
Compositionscheme:compositionclass 10class 19class 27

A scheme states, for its capability: the preconditions, the authorization and resource conditions, the mechanism, the target state, the checks afterwards, and the evidence that it works end to end. Because the three classes of a capability all depend on the scheme entry, the three statements that cover them are about one scheme in one version; a copy script, an unrelated authorization and a balance in some other account do not add up to a capability.

The four scheme entries add no fourth completeness. A scheme is the common object the three parts of a capability are assessed on. Its commitment shows what was declared, not that the capability is feasible: feasibility is established by the statements on classes 7 to 10 and their evidence. What a scheme actually relies on, such as the model, permissions, resources or recovery materials, is declared as the scheme's relation (section 4.3) or added to the statement's mask, so that a change of it reaches the scheme's conclusions.

For each capability three questions are distinct:

QuestionMeaningWhere it is answered
Is the capability supported?There is a defined mechanism, with conditions of use, evidence of feasibility and a lawfully reachable path to authorizationThe three classes of the capability
Is this operation permitted now?The authorization and policy in force allow this operationThe authorization source, at the time of the operation
Is the unit ready now?Resources, capacity and other conditions of execution are metAt the time of the operation; a policy that accepts a degraded, suspended or maintenance state reports the state and does not establish readiness

A capability is supported when the mechanism is present and an authorization for it can be obtained under the rules in force; it need not be permitted at every moment. A derivation allowance of zero does not make a unit unable to derive. A capability is not supported when the license in force forbids the operation and no compatible alternative exists, when the mechanism is untested, when it depends on a supplier changing its terms in the future, or when it assumes funds or resources without a basis. If the declared duties include providing an operation on demand, the current permission and readiness for it are part of the requirement.

Every operation needs a valid authorization. The authorization MAY come from a policy, a quota or a delegation set in advance, or from an approval of the single operation.

6. Profiles

6.1 Rules

A profile is an immutable, versioned document. Each requirement of a profile has an index, an axis, a dependency mask, and optionally the Baseline class it implements and a condition of applicability.

A profile claims the Baseline Requirements when it says so and:

  1. every Baseline class is implemented by at least one requirement;
  2. a requirement that implements a class is on the axis of the class;
  3. the dependency mask of such a requirement includes the minimum mask of the class;
  4. such a requirement is not conditional.

A profile MAY refine a requirement, add requirements, lengthen dependency masks (section 8.2 says how a statement meets them), shorten validity periods and admit other implementations and evidence that meet the same requirement. It MUST NOT weaken the core semantics of this specification or the Baseline Requirements as they apply to the declared duties. Rule 3 applies to every requirement that names a class, whether or not the profile claims the Baseline. Profiles for different settings need not contain each other.

A requirement that implements no Baseline class MAY be conditional. The profile then states, in advance, the rule that decides when it applies. Only a conditional requirement can be answered "not applicable".

A profile registry checks rules 1 to 4 when a profile is published with the claim and refuses a profile that fails them.

6.2 Versions

A new version of a profile is a new profile that names the one it supersedes. Publication of a new version changes nothing recorded under an earlier one. A publisher MAY mark a profile as deprecated; the mark is reported in the derived view and changes no result.

6.3 Interface

/// @title IACCFProfiles
/// @notice Completeness Profiles and the Baseline class table they are checked against.
interface IACCFProfiles {
    event ProfilePublished(
        bytes32 indexed profileId,
        address indexed publisher,
        bytes32 contentHash,
        bool baseline,
        bytes32 supersedes,
        uint16 count,
        string uri
    );
    event ProfileDeprecated(bytes32 indexed profileId, bytes32 reasonHash);

    /// @notice Publishes an immutable profile. With `baseline` set, the call reverts unless every Baseline
    ///         class is implemented by an unconditional requirement on the class's axis whose dependency mask
    ///         includes the class's minimum.
    function publish(
        bytes32 contentHash,
        string calldata uri,
        bool baseline,
        bytes32 supersedes,
        ACCFTypes.Requirement[] calldata requirements
    ) external returns (bytes32 profileId);

    /// @notice Marks a profile as deprecated. Publisher only. Nothing recorded under the profile changes.
    function deprecate(bytes32 profileId, bytes32 reasonHash) external;

    function profileExists(bytes32 profileId) external view returns (bool);
    function profileOf(bytes32 profileId) external view returns (ACCFTypes.Profile memory);
    function requirementOf(bytes32 profileId, uint256 index) external view returns (ACCFTypes.Requirement memory);
    function requirementsOf(bytes32 profileId) external view returns (ACCFTypes.Requirement[] memory);

    /// @notice Checks that every requirement in `coverage` is on `axis` and returns the union of their
    ///         minimum dependency masks and whether all of them are conditional.
    function resolveCoverage(bytes32 profileId, uint8 axis, uint256 coverage)
        external
        view
        returns (uint256 dependencies, bool allConditional);

    function computeProfileId(address publisher, bytes32 contentHash) external view returns (bytes32);

    /// @notice Version of the Baseline class table this registry checks profiles against.
    function baselineVersion() external pure returns (uint32);
    function baselineClassCount() external pure returns (uint8);

    /// @notice Axis and minimum dependency mask of Baseline class `classId` (1..baselineClassCount()).
    function baselineClass(uint8 classId) external pure returns (uint8 axis, uint256 dependencies);
}

profileId is keccak256(abi.encode(block.chainid, registry, publisher, contentHash)).

7. Units and transitions

7.1 Cell Record

A Cell Record holds the subject key, the controller, the authority of a recovery rule if there is one, the kind, the composition rank, the operating state, the descriptor commitment with the boundary version, the control version, the authorization revision and expiry, the manifest entries with root and version, the revision and declared relation of each entry, the lineage, and counts of members, memberships and claims. The registrant of a unit is its first controller.

Registration does not prove that the registrant controls the subject it names. Establishing that is the purpose of class 11.

7.2 Control relation and authorization

Every operation on a Cell Record is carried out by the controller or, for the operations a scope names, by an operator the controller granted that scope until a stated time. A grant ends at its expiry, when the controller revokes it, and when the control relation changes. Scopes with bit 128 and above are application scopes: a consumer contract MAY define one and check it on its own execution path with isAuthorized.

The authorization configuration is everything that decides who may act for the unit apart from the controller itself: the operators and their scopes, the accounts approved to join the boundary, the recovery rule and the derivation allowance. It is versioned apart from the controller's identity. Every change of it, and every acceptance of a control change, advances the authorization revision. The authorization expiry is the earliest expiry among the grants in force, recomputed at every grant, renewal and revocation: a renewal or a revocation removes the expiry of the grant it replaces or ends, and leaves the earlier expiry of any other grant in force. With no grant in force there is no authorization expiry. A grant whose expiry has already passed cannot be made. A statement whose dependencies include the authorization configuration stops applying when the revision advances, and stops applying when the authorization expiry passes, since the authorization it was assessed with no longer holds in full. A statement made after a renewal or a revocation is assessed against the grants then in force, and the expiry it is checked against is theirs. An implementation MAY bound the number of grants in force.

An approval for an account to join the boundary is bound to the control version under which it was given. An approval that was not used before a control change lapses with it and has to be given again. A key is unique within one registry: an exclusive claim prevents a second claim on the same key in that registry, and says nothing about other registries.

A control change has two steps: a proposal by the controller, or by the authority of a recovery rule the unit named beforehand, and an acceptance by the proposed controller. On acceptance the control version and the authorization revision advance, every grant ends, the authorization expiry is cleared, and every statement that depends on the control relation or the authorization configuration stops applying until it is made again. If the change also moves resources, duties or accounting from one party to another, the new descriptor is supplied with the acceptance and the boundary version advances as well. Facts about past income remain facts; who can now dispose of the funds, whether licenses continue and which authorizations hold has to be looked at again.

The control mechanism MAY be a single account, several parties, a contract or another declared mechanism. This specification does not require an external controller to exist at all times, and it does not promise that every effect of a unit can be stopped or undone. It requires that the mechanism is declared, that the arrangement for restricting operations, stopping new obligations, resuming and exiting is stated in the descriptor, that this arrangement can be carried out and that whoever carries it out is accountable for it (section 11, invariant 7). Who holds that arrangement is left open. A profile MAY require human intervention and an emergency stop.

7.3 Exclusive claims

Resources that cannot be in two places are placed inside a boundary by an exclusive claim. A claim has a key; a key is held by at most one unit at a time. An account is claimed by its own call, after the unit's side allowed it, so that an account is inside one boundary at most and no unit can claim an account that did not consent. Other resources, such as a capacity entitlement or a device, are claimed by a declaration of the unit's side under a key that identifies the resource.

A claim is a declaration that conflicts are detected against. It does not prove control of the resource; class 20 asks for that. Claiming and releasing a claim advance the unit's boundary version. A claim moves from one unit to another only inside a derivation or a succession, as part of the boundary change that transition records.

7.4 Transitions

A transition is recorded with its kind, the unit, a counterpart unit where there is one, the actor, what it changed (as a dependency mask), the versions and operating state after it, and the commitment to its Transition Record document. That document states the authorization, the reason, the source and target state, what stays valid and what does not, how obligations continue, the recovery, rollback or termination path, and the conditions that have to hold afterwards.

General rule. A conclusion of completeness does not pass through a derivation, a succession, an upgrade or a composition. The conditions a change affects are assessed again. Evidence and statements that the change does not affect, and whose applicability is confirmed, MAY be kept or referred to. A registry implements this through dependency digests: a statement stops applying when something in the closure of its dependency mask changes.

Authorization of a transition. A transition is carried out by the controller or by an operator that holds the scope of its kind and the scope of every change it makes: the manifest scope for entries and relations, the state scope for a change of operating state, the boundary scope for a new descriptor. An operator with the state scope alone cannot change an entry by calling it a suspension. Retirement and extension kinds are the controller's only.

A transition MAY leave a unit in a state that is not complete: a new child is a candidate, a unit under repair is degraded or suspended, a retired unit has ended. A transition states its target state and its conditions afterwards. A transition that claims to keep or restore completeness is believed when the statements support it.

KindMeaningRules
Registration (0)A Cell Record is createdSection 7.1
Derivation (1)A new subject is produced from an existing unitBelow
Migration (2)The same subject changes its execution environmentChanges the execution entry; identity, control and open obligations continue
Succession (3)Rights, duties or state that can be transferred are taken over by another unitBelow
Repair (4)The unit is brought back to its committed configurationChanges no entry commitment and no descriptor; MAY reconfirm entries, which advances their revisions
Upgrade (5)The committed configuration changesChanges at least one entry commitment or declared relation
Composition (6)A unit becomes a member of a groupBelow
Decomposition (7)A membership endsBelow
Control change (8)The control relation changesSection 7.2
Retirement (9)The unit endsTerminal; refused while the unit has members, memberships or claims
Suspension (10)The unit stops or reduces operationTarget state degraded, suspended or maintenance; names no entry
Resumption (11)The unit returns to operationTarget state active or degraded; names no entry
Boundary change (12)The descriptor changesSupplies a new descriptor; names no entry
128 to 255Extension kindsRecorded as given; controller only

Derivation. A derivation creates a new unit with its own identifier, its own keys and its own record, and records the parent. The derived unit MAY receive copies of configuration, skills and memory that may be copied, and resources that are lawfully granted to it. It does not receive, by the derivation: any statement or conclusion about the parent; the parent's history presented as its own; any authority that was not granted; any resource that cannot be in two places unless that resource is moved to it. In particular:

  • the derived unit starts without statements, and no statement about it has an observation window that begins before its derivation;
  • the parent's private keys and full permissions are not copied to it;
  • an exclusive claim is moved, never duplicated;
  • limits on derivation that the authorization in force declares, on the number of children, on generations or on a budget, MUST be enforced, and a budget limit applies to the sum of what all children were granted, not to each grant;
  • a derived unit cannot widen what it received from its parent; it MAY obtain new, independent authority from another authorizer under that authorizer's rules;
  • what the parent grants leaves the parent's boundary, and the parent's conclusions that depend on its boundary are assessed again.

Limits on count, generation and budget are examples of what an authorization can declare. This specification does not require an implementation to have all three; it requires that a declared limit is checked and enforced. For an embodied unit, deriving means starting and organizing the derivation under its license, budget and resources; it does not mean building the machine itself. Redundant instances of one subject are not derivation; they need a stated set of instances that are in control, so that nothing is executed twice without authorization.

Succession. A succession is offered by the predecessor's side under stated terms and takes effect when the successor's side accepts those terms. The terms name what is transferred, including the exclusive claims that move, what is not, and who answers for every obligation that was open. The successor supplies its new descriptor. The registry checks the structure: the terms, the acceptance, the claims that move. Obligations held off chain are taken over only as far as the succession record and the successor's statements give evidence that they are. The predecessor either is retired, which is refused while it still has members, memberships or claims, or supplies its own new descriptor. A succession transfers duties together with rights; it cannot transfer the right to income alone.

Repair and upgrade. During a change the unit MAY be suspended or degraded; maintenance downtime is not a violation. The Transition Record states who authorized the change and why, the source and target state, which statements remain applicable and which do not, how the unit recovers, rolls back or ends in good order, and what has to hold before the affected service resumes. Only what the change affects is assessed again: replacing the model affects capability, cost and safety and whatever declares that it relies on the model; changing a display name affects nothing.

Rollback. A rollback is an upgrade to an earlier configuration. It advances the revisions of the entries it names, so no conclusion about the earlier configuration applies again by itself. An assessor MAY reconfirm evidence that does not depend on time, such as a build commitment or an audit of fixed code, by issuing a new statement on the current state that names the one it replaces; it decides what still holds and answers for it.

Composition. A group is a unit. It is assessed on its own boundary: its own resources and accounts, who can commit, decide and pay for it, how shared resources are allocated, how members join, leave, fail and are replaced, and its own income, cost and replenishment. Therefore:

  • that every member is complete does not make the group complete. A group's statements MAY cite statements about members or components as evidence; such a citation supports the group's requirement only through the group assessor's own judgment;
  • that the group is complete does not require every member to sustain itself;
  • a membership needs the agreement of both sides and can be ended by either;
  • every change of membership changes the group's boundary;
  • when joining changes a member's resources, permissions, duties or key dependencies, the member's side declares it and the member's boundary version advances, so that the member's affected conclusions are assessed again. The registry keeps the declaration with the membership. When either side ends the membership, the kept declaration applies and the member's boundary version advances, whether or not the member reports anything. The member's side MAY change its declaration while the membership lasts, which advances the member's boundary version as well;
  • a group can be a member of another group. Membership MUST stay acyclic. This specification sets no limit on the depth of composition and no fixed form of organization. The reference implementation keeps membership acyclic with an immutable rank that is higher for a group than for each of its members; with a uint8 rank that allows at most 255 levels of nesting, which is a limit of that method and not of this specification.

What a group can do beyond what its members can do is established by its tasks and their assessment, not by its composition.

7.5 Interface

/// @title IACCFUnits
/// @notice Cell Records, manifest commitments, control relations, exclusive claims and Transition Records.
/// @dev    Timepoints are `uint48` values in the clock domain reported by `clock()` and `CLOCK_MODE()`.
interface IACCFUnits {
    // ---------------------------------------------------------------------
    // Events
    // ---------------------------------------------------------------------

    event UnitRegistered(
        bytes32 indexed unitId,
        bytes32 indexed subjectKey,
        address indexed controller,
        bytes32 subjectType,
        bytes subjectData,
        bytes32 kind,
        uint8 rank,
        bytes32 parent,
        bytes32 lineageCommitment
    );
    event DescriptorSet(bytes32 indexed unitId, uint32 boundaryVersion, bytes32 descriptorHash, string descriptorURI);
    event EntrySet(bytes32 indexed unitId, uint8 indexed entry, bytes32 entryHash, uint32 revision);
    event RelationSet(bytes32 indexed unitId, uint8 indexed entry, uint256 dependencies);
    event ManifestSet(bytes32 indexed unitId, uint32 manifestVersion, bytes32 manifestRoot, string manifestURI);
    event Transitioned(
        bytes32 indexed transitionId,
        bytes32 indexed unitId,
        uint8 indexed kind,
        bytes32 counterpart,
        address actor,
        uint256 changed,
        ACCFTypes.OperatingState state,
        bytes32 detailsHash,
        string detailsURI
    );
    event RecoverySet(bytes32 indexed unitId, address recovery);
    event AuthorizationRevised(bytes32 indexed unitId, uint32 authorizationRevision, uint48 authorizationExpiry);
    event OperatorSet(bytes32 indexed unitId, address indexed operator, uint256 scopes, uint48 validUntil);
    event ControlProposed(
        bytes32 indexed unitId, address indexed newController, address proposer, bytes32 detailsHash, string detailsURI, uint48 expiry
    );
    event ControlProposalCancelled(bytes32 indexed unitId);
    event DerivationAllowanceSet(bytes32 indexed unitId, ACCFTypes.DerivationAllowance allowance);
    event DerivationGranted(bytes32 indexed parentId, bytes32 indexed childId, uint256 budget, bytes32[] claims);
    event SuccessionProposed(
        bytes32 indexed proposalId, bytes32 indexed predecessorId, bytes32 indexed successorId, ACCFTypes.SuccessionTerms terms
    );
    event MembershipProposed(
        bytes32 indexed proposalId,
        bytes32 indexed groupId,
        bytes32 indexed memberId,
        bool byGroup,
        bytes32 termsHash,
        string termsURI,
        uint48 expiry
    );
    event ProposalCancelled(bytes32 indexed proposalId);
    event MembershipChanged(bytes32 indexed groupId, bytes32 indexed memberId, bool member, bool memberAffected);
    event AccountApproved(bytes32 indexed unitId, address indexed account, bool approved);
    event Claimed(bytes32 indexed unitId, bytes32 indexed key);
    event Released(bytes32 indexed unitId, bytes32 indexed key);
    event ClaimMoved(bytes32 indexed fromUnitId, bytes32 indexed toUnitId, bytes32 indexed key);

    // ---------------------------------------------------------------------
    // Registration and single-unit transitions
    // ---------------------------------------------------------------------

    /// @notice Registers a unit controlled by the caller. Registration states nothing about completeness.
    function register(ACCFTypes.UnitInput calldata input) external returns (bytes32 unitId);

    /// @notice Records a migration, repair, upgrade, suspension, resumption, boundary change, retirement or
    ///         extension transition of `unitId` and applies its changes. The caller needs the scope of the kind
    ///         and the scope of every change: entries or relations, descriptor, operating state. Retirement and
    ///         extension kinds are for the controller only. Every entry listed advances its revision, also when
    ///         its commitment is unchanged or restored to an earlier value.
    function transition(bytes32 unitId, ACCFTypes.TransitionInput calldata input) external returns (bytes32 transitionId);

    // ---------------------------------------------------------------------
    // Control relation
    // ---------------------------------------------------------------------

    /// @notice Names the authority of the pre-agreed recovery rule. Controller only. Advances the authorization
    ///         revision.
    function setRecovery(bytes32 unitId, address recovery) external;

    /// @notice Grants `operator` the given scopes until `validUntil`, a time still to come, replacing any grant to
    ///         `operator`; zero scopes revoke. Controller only. Advances the authorization revision and sets the
    ///         authorization expiry to the earliest expiry among the grants then in force. Every grant ends when
    ///         the control relation changes.
    function setOperator(bytes32 unitId, address operator, uint256 scopes, uint48 validUntil) external;

    /// @notice Proposes a new controller. Controller or recovery authority.
    function proposeControl(
        bytes32 unitId,
        address newController,
        bytes32 detailsHash,
        string calldata detailsURI,
        uint48 expiry
    ) external;

    /// @notice Withdraws the open control proposal. Controller or recovery authority.
    function cancelControl(bytes32 unitId) external;

    /// @notice Accepts control. Proposed controller only. A non-zero `descriptorHash` also changes the boundary.
    function acceptControl(bytes32 unitId, bytes32 descriptorHash, string calldata descriptorURI)
        external
        returns (bytes32 transitionId);

    // ---------------------------------------------------------------------
    // Derivation
    // ---------------------------------------------------------------------

    /// @notice Declares whether and within which limits `unitId` may be derived from. Controller only.
    ///         Limits inherited from the lineage cannot be widened. Advances the authorization revision.
    function setDerivationAllowance(bytes32 unitId, ACCFTypes.DerivationAllowance calldata allowance) external;

    /// @notice Derives a new unit from `parentId`. The caller is authorized for the parent and becomes the
    ///         controller of the child. The child receives no statement, no history and no claim it is not granted.
    function derive(bytes32 parentId, ACCFTypes.UnitInput calldata child, ACCFTypes.DerivationTerms calldata terms)
        external
        returns (bytes32 childId, bytes32 transitionId);

    // ---------------------------------------------------------------------
    // Succession
    // ---------------------------------------------------------------------

    /// @notice Offers the succession of `predecessorId` by `successorId` under `terms`. Predecessor side.
    function proposeSuccession(bytes32 predecessorId, bytes32 successorId, ACCFTypes.SuccessionTerms calldata terms)
        external
        returns (bytes32 proposalId);

    /// @notice Accepts a succession with the terms it was offered under. Successor side.
    function acceptSuccession(
        bytes32 proposalId,
        ACCFTypes.SuccessionTerms calldata terms,
        bytes32 successorDescriptorHash,
        string calldata successorDescriptorURI
    ) external returns (bytes32 transitionId);

    // ---------------------------------------------------------------------
    // Composition
    // ---------------------------------------------------------------------

    /// @notice Proposes that `memberId` joins `groupId`. `byGroup` tells which side the caller acts for.
    ///         `memberAffected` is read from the member side only: it declares that the membership changes the
    ///         member's resources, permissions, duties or key dependencies.
    function proposeMembership(
        bytes32 groupId,
        bytes32 memberId,
        bool byGroup,
        bool memberAffected,
        bytes32 termsHash,
        string calldata termsURI,
        uint48 expiry
    ) external returns (bytes32 proposalId);

    /// @notice Accepts a membership proposal for the other side. The group's boundary version advances; the
    ///         member's advances when the member side declared itself affected. The declaration is kept with
    ///         the membership.
    function acceptMembership(bytes32 proposalId, bool memberAffected) external returns (bytes32 transitionId);

    /// @notice Changes the member's declaration that the membership affects it. Member side. The member's
    ///         boundary version advances, so its conclusions that depend on the boundary are assessed again.
    function setMembershipDependency(
        bytes32 groupId,
        bytes32 memberId,
        bool memberAffected,
        bytes32 detailsHash,
        string calldata detailsURI
    ) external returns (bytes32 transitionId);

    /// @notice Ends a membership. Either side. The member's boundary version advances when the kept declaration
    ///         or the member side's call says the membership affects it.
    function endMembership(
        bytes32 groupId,
        bytes32 memberId,
        bool byGroup,
        bool memberAffected,
        bytes32 detailsHash,
        string calldata detailsURI
    ) external returns (bytes32 transitionId);

    /// @notice Withdraws an open succession or membership proposal. Proposing side.
    function cancelProposal(bytes32 proposalId) external;

    // ---------------------------------------------------------------------
    // Exclusive claims
    // ---------------------------------------------------------------------

    /// @notice Allows or disallows `account` to place itself inside the boundary of `unitId`. An approval holds
    ///         under the control version it was given in. Advances the authorization revision.
    function approveAccount(bytes32 unitId, address account, bool approved) external;

    /// @notice The caller places itself inside the boundary of `unitId`. An account is inside one boundary at most.
    function claimAccount(bytes32 unitId) external;

    /// @notice Declares that the resource identified by `key` is inside the boundary of `unitId`.
    function claimResource(bytes32 unitId, bytes32 key) external;

    /// @notice Releases a claim of `unitId`.
    function release(bytes32 unitId, bytes32 key) external;

    // ---------------------------------------------------------------------
    // Views
    // ---------------------------------------------------------------------

    function exists(bytes32 unitId) external view returns (bool);
    function unitOf(bytes32 unitId) external view returns (ACCFTypes.Unit memory);
    function entryOf(bytes32 unitId, uint8 entry) external view returns (bytes32);

    /// @notice Revision of an entry: it advances whenever a transition sets or reconfirms the entry.
    function revisionOf(bytes32 unitId, uint8 entry) external view returns (uint32);

    /// @notice Dependency mask that `entry` was declared to depend on.
    function relationOf(bytes32 unitId, uint8 entry) external view returns (uint256);

    /// @notice `mask` closed under the declared relations of `unitId`'s entries.
    function dependencyClosure(bytes32 unitId, uint256 mask) external view returns (uint256);

    /// @notice Digest of the current values of everything the closure of `mask` names for `unitId`.
    function dependencyDigest(bytes32 unitId, uint256 mask) external view returns (bytes32);

    /// @notice Whether `account` may act for `unitId` within `scope` now.
    function isAuthorized(bytes32 unitId, address account, uint256 scope) external view returns (bool);
    function operatorOf(bytes32 unitId, address operator) external view returns (uint256 scopes, uint48 validUntil);
    function pendingControlOf(bytes32 unitId) external view returns (address newController, uint48 expiry);
    function derivationOf(bytes32 unitId) external view returns (ACCFTypes.Derivation memory);

    /// @notice Whether a derivation from `unitId` granting `budget` is permitted by the recorded authorization now.
    function derivationPermitted(bytes32 unitId, uint256 budget) external view returns (bool);
    function isMember(bytes32 groupId, bytes32 memberId) external view returns (bool);
    function membershipOf(bytes32 groupId, bytes32 memberId) external view returns (bool member, bool memberAffected);
    function claimantOf(bytes32 key) external view returns (bytes32 unitId);
    function isAccountOf(bytes32 unitId, address account) external view returns (bool);
    function accountKey(address account) external pure returns (bytes32);
    function transitionOf(bytes32 transitionId) external view returns (ACCFTypes.Transition memory);
    function transitionCount(bytes32 unitId) external view returns (uint256);
    function transitionAt(bytes32 unitId, uint256 index) external view returns (bytes32 transitionId);

}

unitId, transitionId and proposalId are assigned by the registry and are unique within it. The reference implementation derives each from the chain identifier, the registry address and a counter.

8. Statements

8.1 Content

A statement is made by one assessor about one axis of one unit under one profile. It carries:

  • the result: satisfied, not satisfied, undetermined, or, for conditional requirements only, not applicable;
  • the coverage: the requirements of the profile it speaks about, all on its axis. One statement MAY cover a whole axis; what it checked MUST be identifiable from its document;
  • the dependency mask and the expected digest: the dependency digest of the state the assessor assessed. The registry records the digest, the manifest root and the manifest, boundary and control versions at issuance;
  • the method and its version;
  • the observation window and the time until which the statement is valid;
  • the commitment to the statement document, which holds the findings per requirement, the evidence with what each piece of evidence was and was not checked for, the premises, and for economic statements the figures;
  • optionally the earlier statement of the same assessor that it replaces, and evidence references (section 8.4).

Anyone can be an assessor, including the unit's own controller. A statement is as good as its assessor, method and evidence; which assessors count is for each consumer's policy.

8.2 Issuance

A statement registry MUST refuse a statement:

  1. whose coverage is empty or includes a requirement that is not on its axis;
  2. whose dependencies, the closure of its dependency mask, do not include the mask of every requirement it covers, whether that mask is a Baseline minimum or one a profile lengthened. A requirement is met directly, by the mask, or through the closure, by an entry that declares a relation on what the requirement names. An assessor MAY depend on more, never on less;
  3. whose result is "not applicable" unless every requirement it covers is conditional;
  4. whose result is "satisfied" while a manifest entry in the closure of its dependency mask is absent;
  5. whose observation window ends after the current timepoint or begins after it ends, or whose validity ends at or before the current timepoint;
  6. about a derived unit, whose observation window begins before the derivation;
  7. about a retired unit;
  8. whose expected digest differs from the unit's current dependency digest for its mask. A change between the assessment and the issuance of the statement makes the issuance fail; it does not make the statement apply to a state its assessor did not assess. Only the statement's own dependencies are compared, so a change elsewhere in the unit does not block it.

A statement becomes its assessor's latest word on every requirement it covers. Earlier statements are kept unchanged. An assessor MAY revoke its statement; the record is kept and marked. A statement is never the latest word on behalf of another assessor: no statement of one assessor overrides a statement of another.

8.3 Applicability

A statement applies at a timepoint when all of the following hold:

  1. it is not revoked;
  2. the timepoint is before the end of its validity;
  3. the unit's current dependency digest for the statement's mask equals the digest recorded at issuance;
  4. if its dependencies include the authorization configuration, directly or through the closure of its mask, the unit's authorization expiry, if any, has not passed;
  5. every dynamic evidence reference of the statement, one to a record that can change, is read and supported at the timepoint (section 8.4).

Condition 5 is met only under a policy that reads evidence references. Under a policy that does not, a statement with a dynamic reference gives a snapshot: its result is reported, marked as not verified at the timepoint, and the unit is not reported cell-complete on it (section 9.2). A snapshot keeps from completeness only what rests on it: one the policy's conflict rule passes over, or one beside verified support that gives the same result, decides nothing. A static reference, to a record that cannot change, needs no reading.

A statement that does not apply is unchanged as a record: it keeps its result, its window and the configuration it was issued on, and it is not a current fact about the unit. A change outside the manifest can end applicability while every commitment is unchanged: a subscription is cancelled, a license runs out, a budget is spent, a permission is withdrawn. Conditions 1, 2, 4 and 5 exist for those cases, and an assessor that learns of such a change revokes its statement. Applicability is computed when it is asked for; no transaction is needed for a statement to stop applying.

8.4 Evidence references and adapters

An evidence reference points at a record in another registry and names the adapter that reads it. A reference identifies the kind of source through its adapter, the registry and the record, and carries a commitment whose meaning the adapter defines, for example the expected subject, scheme or state root. The statement document adds, for each reference, the namespace of the source, the interpretation method and version, the time of reading, the scope it supports and the premises that were not verified. A pointer alone verifies nothing.

/// @title IACCFEvidenceAdapter
/// @notice Reads one record of another registry and reports whether it still supports the proposition the
///         adapter is defined for. An adapter supports that proposition only and never a whole axis.
interface IACCFEvidenceAdapter {
    /// @notice Identifier of the interpretation method and its version.
    function methodId() external view returns (bytes32);

    /// @notice Checks the record `recordId` of `source` for the unit `unitId` of the registry `units`.
    /// @param  commitment Adapter-defined expectation, for example a subject key, a scheme or a state root.
    /// @return status     Supported, NotSupported or Undetermined.
    /// @return validUntil Timepoint after which the record stops supporting the proposition; 0 if none is known.
    function probe(address units, bytes32 unitId, address source, bytes32 recordId, bytes32 commitment)
        external
        view
        returns (ACCFTypes.ProbeStatus status, uint48 validUntil);
}

An adapter supports one stated proposition about one kind of record, and nothing wider. That a maintenance record exists does not establish that maintenance took place; that a safety binding is active does not establish that the unit's execution paths enforce it. A statement that relies on a reference still needs its assessor's own judgment on the requirement, and no reference makes a requirement hold without a statement.

An adapter call that reverts, runs out of gas, returns malformed data or returns a status or a time outside the defined range is an adapter error. An adapter error is reported as such. It is neither support nor a finding against the unit.

An evaluation isolates each adapter call:

  • the call is a static call with a fixed gas allowance (200,000 in the reference implementation), so that an adapter cannot spend the evaluation's gas;
  • the answer is exactly two words, copied into a buffer of that size, so that an adapter cannot make the evaluation copy unbounded data;
  • the status has to be one of the defined values and the time a valid uint48 timepoint;
  • an evaluation that cannot give an adapter its whole allowance stops (reverts) instead of reporting an adapter error. The result therefore does not depend on how much gas the caller sent: an adapter error comes from the adapter, never from the caller.

A statement about whether rules are enforced on execution paths (class 13) states its method: for on-chain paths, which entry points, configuration and implementation version were examined and which ways around the check were considered, since the existence of a checker or one observed call to it does not show that every path is constrained; for off-chain paths, which signed traces, logs, execution proofs or other material were used and under which assumptions. An assessor's signature establishes who made a statement, not that its content is true.

8.5 Interface

/// @title IACCFStatements
/// @notice Completeness Statements, evaluation policies and the derived view of cell completeness.
/// @dev    Timepoints are `uint48` values in the clock domain reported by `clock()` and `CLOCK_MODE()`.
interface IACCFStatements {
    event StatementIssued(
        bytes32 indexed statementId,
        bytes32 indexed unitId,
        bytes32 indexed profileId,
        address assessor,
        uint8 axis,
        ACCFTypes.Result result,
        uint256 coverage,
        uint256 dependencies,
        bytes32 dependencyDigest,
        bytes32 methodId,
        uint48 observedFrom,
        uint48 observedTo,
        uint48 validUntil,
        bytes32 evidenceHash,
        string evidenceURI,
        bytes32 supersedes
    );
    event EvidenceReferenced(
        bytes32 indexed statementId,
        address indexed adapter,
        address source,
        bytes32 recordId,
        bytes32 commitment,
        bool dynamic
    );
    event StatementRevoked(bytes32 indexed statementId, address indexed assessor, bytes32 reasonHash);
    event PolicyRegistered(bytes32 indexed policyId, address indexed owner, bytes32 indexed profileId, ACCFTypes.PolicyInput policy);

    /// @notice Records a statement of the caller about one axis of one unit under one profile. Fails unless the
    ///         dependency digest the assessor expects is the current one: a statement is about the state it was
    ///         prepared for and is never reattached to a later one.
    function issue(ACCFTypes.StatementInput calldata input) external returns (bytes32 statementId);

    /// @notice Records several statements of the caller.
    function issueBatch(ACCFTypes.StatementInput[] calldata inputs) external returns (bytes32[] memory statementIds);

    /// @notice Revokes a statement. Its assessor only. The record is kept.
    function revoke(bytes32 statementId, bytes32 reasonHash) external;

    /// @notice Registers an immutable evaluation policy owned by the caller.
    function registerPolicy(ACCFTypes.PolicyInput calldata input) external returns (bytes32 policyId);

    function statementOf(bytes32 statementId) external view returns (ACCFTypes.Statement memory);
    function evidenceOf(bytes32 statementId) external view returns (ACCFTypes.EvidenceRef[] memory);

    /// @notice The latest statement of `assessor` that covers requirement `index`, or zero.
    function latestOf(bytes32 unitId, bytes32 profileId, address assessor, uint256 index) external view returns (bytes32);
    function policyOf(bytes32 policyId) external view returns (ACCFTypes.Policy memory);

    /// @notice Whether a statement can support a current judgment: not revoked, within its validity, with
    ///         unchanged dependencies, with no lapsed grant in an authorization configuration it depends on and,
    ///         when `liveEvidence` is set, with every referenced record still supporting it. `flags` tells why not.
    ///         Without `liveEvidence`, a statement with a dynamic reference is reported with
    ///         `FLAG_EVIDENCE_UNVERIFIED` and is applicable as a snapshot only.
    function applicability(bytes32 statementId, bool liveEvidence) external view returns (bool applicable, uint32 flags);

    /// @notice The derived view of `unitId` under `policyId` at the current timepoint. A relying party binds
    ///         the policy it relies on before it reads the view.
    function evaluate(bytes32 unitId, bytes32 policyId) external view returns (ACCFTypes.Evaluation memory);

    /// @notice `evaluate(unitId, policyId).cellComplete`.
    function isCellComplete(bytes32 unitId, bytes32 policyId) external view returns (bool);

    function units() external view returns (address);
    function profiles() external view returns (address);
}

9. Evaluation

9.1 Policy

A consumer registers a policy. A policy is immutable and states:

  • the profile;
  • the assessors it accepts, in order of priority, each for one or more axes;
  • the methods it accepts, or that it accepts any;
  • a maximum age of statements, if it wants one besides their own validity;
  • how assessors may be combined (mixing);
  • how contradictions between accepted assessors are resolved (conflict rule);
  • the operating states in which it accepts a unit;
  • whether evidence references are read at evaluation.

A derived view is bound to the unit in its current versions, the profile, the policy and the timepoint. Two consumers with different policies can get different views of the same records, and each view can be reproduced. A consumer does not pick, after the fact, three favorable statements; it states beforehand what it accepts. A relying party fixes the identifier of its policy before it reads a view, for example in its own contract or in the terms it agreed with the unit; a view under a policy chosen afterwards shows what that policy gives and nothing more.

Accepting an operating state other than active is a choice about what to report. A policy that accepts a degraded, suspended or maintenance state does not thereby establish that the unit is ready to work. A retired unit is never accepted.

9.2 Derived view

For a unit and a policy at the current timepoint:

  1. For each accepted assessor and each requirement on an axis the assessor is accepted for, take the assessor's latest statement that covers the requirement. If there is none, or it does not apply (section 8.3, with the policy's maximum age and methods), the assessor's result for the requirement is undetermined and the reason is recorded in the flags. Otherwise it is the statement's result.
  2. Combine according to the mixing mode:
    • per requirement: for each requirement, combine the results of the assessors accepted for its axis under the conflict rule; an axis is not satisfied if any of its requirements is not satisfied, satisfied if all are satisfied or not applicable, and undetermined otherwise;
    • per axis: for each assessor, fold its results over the requirements of an axis in the same way; then, for each axis, combine the assessors' results under the conflict rule;
    • single assessor: for each assessor accepted for all three axes, fold its results into one result for the whole; then combine those under the conflict rule. The per-axis results are still reported, for information.
  3. Except under single assessor, the overall result is not satisfied if any axis is not satisfied, satisfied if all three are satisfied, and undetermined otherwise.
  4. An axis for which the profile has no requirement is undetermined.

The conflict rule combines the results of several assessors about the same thing:

  • undetermined on conflict: if results for and against are both present, the result is undetermined and a conflict is flagged; otherwise the result is the one present;
  • priority: the first assessor in the policy's order with a determinate result decides;
  • unanimous: satisfied only if every accepted assessor is for; not satisfied if any is against; undetermined otherwise.

The unit is reported cell-complete under the policy when the overall result is satisfied, the profile claims the Baseline Requirements, the unit's operating state is one the policy accepts, and the result does not rest on a snapshot (section 8.3): the overall result is satisfied both with every snapshot counted at its reported result and with every snapshot counted as undetermined. A snapshot that is the only support of a requirement, or that the conflict rule weighs against verified support, therefore leaves the unit not cell-complete; a snapshot the conflict rule passes over, or that verified support makes redundant, does not. A retired unit is never accepted.

9.3 What the view reports

The view reports the overall result, the result per axis, whether the profile claims the Baseline, the operating state and whether it is accepted, the set of open requirements (those for which no accepted assessor has an applicable statement that is for), the timepoint, a receipt and flags.

The receipt is a hash over the policy's configuration, the unit's versions including the authorization revision, every statement the evaluation consulted with its flags and result, and the results. Two views with the same receipt evaluated the same records in the same way; a new statement or a revocation at the same timepoint changes it.

9.4 Flags

FlagMeaning
CONFLICTAccepted assessors contradict each other
ADAPTER_ERRORAn adapter call failed
STALEA statement expired or is older than the policy accepts
REVOKEDA statement was revoked
INAPPLICABLESomething a statement depends on changed
EVIDENCE_LAPSEDA referenced record no longer supports its statement
METHODA statement's method is not accepted by the policy
PROBE_UNDETERMINEDAn adapter could not determine a reference
STATEThe operating state is not accepted by the policy
NOT_BASELINEThe profile does not claim the Baseline Requirements
PROFILE_DEPRECATEDThe profile was deprecated by its publisher
AUTHORIZATION_LAPSEDA statement depends on the authorization configuration, directly or through the closure of its mask, and the authorization expiry passed
EVIDENCE_UNVERIFIEDA statement has a dynamic reference the policy did not read; its result is a snapshot

Flags distinguish a failed verification, a fact that does not hold and evidence that is missing. They are diagnostic: they report what the evaluation found in every statement it consulted, whether or not that statement decided the result. Only a statement whose result is "not satisfied" is a finding against the unit.

10. Types

/// @title ACCFTypes
/// @notice Shared types and constants of the AI Cell Completeness Framework (ACCF).
library ACCFTypes {
    // ---------------------------------------------------------------------
    // Axes
    // ---------------------------------------------------------------------

    uint8 internal constant AXIS_INFRASTRUCTURE = 0;
    uint8 internal constant AXIS_PROTOCOL = 1;
    uint8 internal constant AXIS_ECONOMIC = 2;

    // ---------------------------------------------------------------------
    // Manifest entries and dependency masks
    // ---------------------------------------------------------------------

    /// @dev Entries 0..7 are the configuration sections of the manifest.
    uint8 internal constant SEC_EXECUTION = 0;
    uint8 internal constant SEC_INTELLIGENCE = 1;
    uint8 internal constant SEC_STATE = 2;
    uint8 internal constant SEC_CAPABILITY = 3;
    uint8 internal constant SEC_MAINTENANCE = 4;
    uint8 internal constant SEC_PROTOCOL = 5;
    uint8 internal constant SEC_ECONOMIC = 6;
    uint8 internal constant SEC_CONTROL = 7;

    /// @dev Entries 8..11 are the schemes of the four lifecycle capabilities.
    uint8 internal constant SCH_LINEAGE = 8;
    uint8 internal constant SCH_INTERACTION = 9;
    uint8 internal constant SCH_MAINTENANCE = 10;
    uint8 internal constant SCH_COMPOSITION = 11;

    /// @dev Entries 12..239 are extension entries defined by a manifest schema or a profile.
    uint8 internal constant FIRST_EXTENSION_ENTRY = 12;
    uint8 internal constant LAST_ENTRY = 239;

    /// @dev A dependency mask has bit `i` set for manifest entry `i`, bit 253 for the authorization
    ///      configuration, bit 254 for the controller and bit 255 for the boundary (subject, duties and
    ///      boundary). Bits 240..252 are reserved and zero.
    uint256 internal constant ENTRY_MASK = (uint256(1) << 240) - 1;
    uint256 internal constant DEP_AUTHORIZATION = uint256(1) << 253;
    uint256 internal constant DEP_CONTROL = uint256(1) << 254;
    uint256 internal constant DEP_BOUNDARY = uint256(1) << 255;
    uint256 internal constant DEPENDENCY_MASK = ENTRY_MASK | DEP_AUTHORIZATION | DEP_CONTROL | DEP_BOUNDARY;

    /// @dev Domain tag of the manifest root.
    bytes32 internal constant MANIFEST_DOMAIN = keccak256("ACCF manifest root v1");

    // ---------------------------------------------------------------------
    // Results and states
    // ---------------------------------------------------------------------

    /// @notice Result of a statement or of a derived view. `Undetermined` never counts as satisfied.
    ///         `NotApplicable` is a statement result only and only for conditional requirements.
    enum Result {
        Undetermined,
        Satisfied,
        NotSatisfied,
        NotApplicable
    }

    /// @notice Operating state of a unit. It is reported next to results and is never folded into them.
    enum OperatingState {
        None,
        Active,
        Degraded,
        Suspended,
        Maintenance,
        Retired
    }

    /// @notice What an evidence adapter reports for one reference. A call that reverts or returns
    ///         malformed data is an adapter error and is reported separately.
    enum ProbeStatus {
        Undetermined,
        Supported,
        NotSupported
    }

    // ---------------------------------------------------------------------
    // Transition kinds
    // ---------------------------------------------------------------------

    uint8 internal constant KIND_REGISTRATION = 0;
    uint8 internal constant KIND_DERIVATION = 1;
    uint8 internal constant KIND_MIGRATION = 2;
    uint8 internal constant KIND_SUCCESSION = 3;
    uint8 internal constant KIND_REPAIR = 4;
    uint8 internal constant KIND_UPGRADE = 5;
    uint8 internal constant KIND_COMPOSITION = 6;
    uint8 internal constant KIND_DECOMPOSITION = 7;
    uint8 internal constant KIND_CONTROL_CHANGE = 8;
    uint8 internal constant KIND_RETIREMENT = 9;
    uint8 internal constant KIND_SUSPENSION = 10;
    uint8 internal constant KIND_RESUMPTION = 11;
    uint8 internal constant KIND_BOUNDARY_CHANGE = 12;
    /// @dev Kinds 128..255 are extension kinds.
    uint8 internal constant FIRST_EXTENSION_KIND = 128;

    // ---------------------------------------------------------------------
    // Operator scopes
    // ---------------------------------------------------------------------

    /// @dev A transition needs the scope of its kind and the scope of every change it makes: entries
    ///      need SCOPE_MANIFEST, a new descriptor SCOPE_BOUNDARY, a target operating state SCOPE_STATE.
    uint256 internal constant SCOPE_MANIFEST = 1 << 0; // migration, repair, upgrade; any entry or relation
    uint256 internal constant SCOPE_STATE = 1 << 1; // suspension, resumption; any target operating state
    uint256 internal constant SCOPE_BOUNDARY = 1 << 2; // boundary change; any new descriptor
    uint256 internal constant SCOPE_DERIVE = 1 << 3; // derivation
    uint256 internal constant SCOPE_SUCCEED = 1 << 4; // succession, either side
    uint256 internal constant SCOPE_COMPOSE = 1 << 5; // composition, decomposition
    uint256 internal constant SCOPE_CLAIM = 1 << 6; // exclusive claims
    /// @dev Bits 128..255 are application scopes, defined by the contracts that check them.
    uint256 internal constant FIRST_APPLICATION_SCOPE = uint256(1) << 128;

    // ---------------------------------------------------------------------
    // Derivation limits
    // ---------------------------------------------------------------------

    uint8 internal constant LIMIT_COUNT = 1;
    uint8 internal constant LIMIT_GENERATION = 2;
    uint8 internal constant LIMIT_BUDGET = 4;

    // ---------------------------------------------------------------------
    // Units
    // ---------------------------------------------------------------------

    /// @notice Cell Record: the on-chain form of a Unit Descriptor with the manifest commitment.
    struct Unit {
        bytes32 subjectKey; // keccak256(abi.encode(subjectType, subjectData))
        address controller; // account or contract through which the control mechanism acts
        address recovery; // authority of the pre-agreed recovery rule for control changes; zero if none
        bytes32 kind; // open label, for example keccak256("agent") or keccak256("composite")
        uint8 rank; // reference ordering that keeps membership acyclic: a member's rank is below its group's
        OperatingState state;
        uint32 boundaryVersion;
        uint32 controlVersion; // advances when the controller changes
        uint32 authorizationRevision; // advances when recovery, grants, approvals or allowances change
        uint48 authorizationExpiry; // earliest expiry among the grants in force; 0 if none
        uint32 manifestVersion;
        uint32 generation; // 0 for a registered unit, parent's generation + 1 for a derived unit
        uint48 registeredAt;
        uint48 bornAt; // time of derivation for a derived unit, 0 otherwise
        bytes32 descriptorHash; // commitment to the Unit Descriptor document
        bytes32 manifestRoot;
        uint256 entries; // bitmap of committed manifest entries
        bytes32 parent; // unit this unit was derived from; zero if none
        bytes32 lineageCommitment; // commitment to a lineage disclosed elsewhere; zero if none
        uint32 memberCount; // members this unit has as a group
        uint32 groupCount; // groups this unit is a member of
        uint32 claimCount; // exclusive claims held
    }

    struct UnitInput {
        bytes32 subjectType;
        bytes subjectData;
        bytes32 kind;
        uint8 rank;
        OperatingState state;
        address recovery;
        bytes32 descriptorHash;
        string descriptorURI;
        uint8[] entries; // strictly ascending
        bytes32[] entryHashes;
        uint8[] relationEntries; // entries whose declared dependencies are set, strictly ascending
        uint256[] relationMasks; // dependency mask each of those entries depends on
        string manifestURI;
        bytes32 lineageCommitment;
        bytes32 detailsHash; // commitment to the Transition Record document of the registration
        string detailsURI;
    }

    /// @notice Input of a transition that concerns one unit.
    struct TransitionInput {
        uint8 kind;
        uint8[] entries; // manifest entries to set or reconfirm, strictly ascending; each advances its revision
        bytes32[] entryHashes; // new commitments; zero removes the entry; an unchanged value reconfirms it
        uint8[] relationEntries; // entries whose declared dependencies change, strictly ascending
        uint256[] relationMasks;
        string manifestURI;
        bytes32 descriptorHash; // zero leaves the boundary unchanged
        string descriptorURI;
        OperatingState state; // target operating state; None leaves it unchanged
        bytes32 detailsHash; // commitment to the Transition Record document
        string detailsURI;
    }

    /// @notice Stored Transition Record.
    struct Transition {
        bytes32 unitId;
        bytes32 counterpart; // other unit of a derivation, succession or (de)composition; zero otherwise
        address actor;
        uint8 kind;
        OperatingState state; // operating state after the transition
        uint48 at;
        uint32 boundaryVersion; // versions after the transition
        uint32 controlVersion;
        uint32 manifestVersion;
        uint256 changed; // dependency mask of what the transition changed or reconfirmed
        bytes32 manifestRoot; // root after the transition
        bytes32 detailsHash;
    }

    struct DerivationAllowance {
        bool enabled;
        uint8 limits; // bit set of LIMIT_*
        uint32 maxChildren;
        uint32 maxGeneration; // highest generation a descendant may have
        uint256 budget; // total allocation that may be granted to children
    }

    /// @notice Stored derivation state of a unit.
    struct Derivation {
        DerivationAllowance allowance;
        uint32 children;
        uint256 granted;
        uint8 inherited; // limits inherited from the lineage
        uint32 inheritedMaxGeneration;
        uint256 inheritedBudget; // allocation received from the parent
    }

    struct DerivationTerms {
        uint256 budget; // allocation granted to the child out of the parent's budget
        bytes32[] claims; // exclusive claims moved from the parent to the child
    }

    struct SuccessionTerms {
        bytes32[] claims; // exclusive claims moved from the predecessor to the successor
        bool retirePredecessor;
        bytes32 predecessorDescriptorHash; // required when the predecessor continues
        string predecessorDescriptorURI;
        bytes32 detailsHash;
        string detailsURI;
        uint48 expiry;
    }

    // ---------------------------------------------------------------------
    // Profiles
    // ---------------------------------------------------------------------

    struct Requirement {
        uint8 axis;
        uint8 baselineClass; // 0: none; otherwise the Baseline class this requirement implements
        bool conditional; // may be answered NotApplicable under the profile's applicability rule
        uint256 dependencies; // minimum dependency mask of statements that cover it
    }

    struct Profile {
        address publisher;
        bytes32 contentHash;
        bytes32 supersedes;
        bool baseline; // claims the Baseline Requirements and was checked against them
        bool deprecated;
        uint16 count; // number of requirements
        uint48 publishedAt;
        uint256[3] axisMasks; // requirement indices of each axis
        uint256 conditionalMask;
    }

    // ---------------------------------------------------------------------
    // Statements
    // ---------------------------------------------------------------------

    /// @notice A reference to a record of another registry, read through an adapter.
    struct EvidenceRef {
        address adapter;
        address source; // registry holding the record
        bytes32 recordId;
        bytes32 commitment; // adapter-defined: expected subject, version or content commitment
        bool dynamic; // the record has to remain valid for the statement to support a current judgment
    }

    struct StatementInput {
        bytes32 unitId;
        bytes32 profileId;
        uint8 axis;
        Result result;
        uint256 coverage; // bitmap of requirement indices of the profile, all on `axis`
        uint256 dependencies; // dependency mask; includes the minimum of every covered requirement
        bytes32 expectedDigest; // dependency digest of the state the assessor assessed; issuance fails otherwise
        bytes32 methodId; // method and method version
        uint48 observedFrom; // observation window
        uint48 observedTo;
        uint48 validUntil;
        bytes32 evidenceHash; // commitment to the Completeness Statement document
        string evidenceURI;
        bytes32 supersedes; // earlier statement of the same assessor that this one replaces; zero if none
        EvidenceRef[] refs;
    }

    struct Statement {
        bytes32 unitId;
        bytes32 profileId;
        address assessor;
        uint8 axis;
        Result result;
        uint48 issuedAt;
        uint32 manifestVersion; // versions at issuance
        uint32 boundaryVersion;
        uint32 controlVersion;
        uint48 observedFrom;
        uint48 observedTo;
        uint48 validUntil;
        uint48 revokedAt; // 0: not revoked
        uint256 coverage;
        uint256 dependencies;
        bytes32 dependencyDigest; // digest of the dependencies at issuance, equal to the expected digest
        bytes32 manifestRoot; // root at issuance
        bytes32 methodId;
        bytes32 evidenceHash;
        bytes32 supersedes;
        bytes32 revocationReason;
    }

    // ---------------------------------------------------------------------
    // Evaluation policies
    // ---------------------------------------------------------------------

    uint8 internal constant MIX_SINGLE_ASSESSOR = 0; // one assessor supports all three axes
    uint8 internal constant MIX_PER_AXIS = 1; // each axis is supported by one assessor
    uint8 internal constant MIX_PER_REQUIREMENT = 2; // any accepted assessor per requirement

    uint8 internal constant CONFLICT_UNDETERMINED = 0; // contradicting accepted results give Undetermined
    uint8 internal constant CONFLICT_PRIORITY = 1; // the first accepted assessor with a determinate result governs
    uint8 internal constant CONFLICT_UNANIMOUS = 2; // every accepted assessor has to support the result

    struct AssessorRule {
        address assessor;
        uint8 axes; // bit set over axes (1 << axis) the assessor is accepted for
    }

    struct PolicyInput {
        bytes32 profileId;
        AssessorRule[] assessors; // in priority order
        bytes32[] methods; // accepted methods; empty accepts any
        uint48 maxAge; // 0: no bound besides the statement's own validity
        uint8 mixing; // MIX_*
        uint8 conflictRule; // CONFLICT_*
        uint8 acceptedStates; // bit set over OperatingState values (1 << state)
        bool liveEvidence; // probe evidence references at evaluation
        bytes32 contentHash; // commitment to the policy document
        string uri;
    }

    struct Policy {
        address owner;
        bytes32 profileId;
        uint48 maxAge;
        uint8 mixing;
        uint8 conflictRule;
        uint8 acceptedStates;
        bool liveEvidence;
        bytes32 contentHash;
        AssessorRule[] assessors;
        bytes32[] methods;
    }

    uint32 internal constant FLAG_CONFLICT = 1 << 0; // accepted assessors contradict each other
    uint32 internal constant FLAG_ADAPTER_ERROR = 1 << 1; // an adapter call failed
    uint32 internal constant FLAG_STALE = 1 << 2; // a statement expired or is older than the policy accepts
    uint32 internal constant FLAG_REVOKED = 1 << 3; // a statement was revoked
    uint32 internal constant FLAG_INAPPLICABLE = 1 << 4; // a statement's dependencies changed
    uint32 internal constant FLAG_EVIDENCE_LAPSED = 1 << 5; // a referenced record no longer supports its statement
    uint32 internal constant FLAG_METHOD = 1 << 6; // a statement's method is not accepted
    uint32 internal constant FLAG_PROBE_UNDETERMINED = 1 << 7; // an adapter could not determine a reference
    uint32 internal constant FLAG_STATE = 1 << 8; // the operating state is not accepted by the policy
    uint32 internal constant FLAG_NOT_BASELINE = 1 << 9; // the profile does not claim the Baseline Requirements
    uint32 internal constant FLAG_PROFILE_DEPRECATED = 1 << 10; // the profile was deprecated by its publisher
    uint32 internal constant FLAG_AUTHORIZATION_LAPSED = 1 << 11; // a grant in force expired, and the statement depends on it
    uint32 internal constant FLAG_EVIDENCE_UNVERIFIED = 1 << 12; // a dynamic reference was not verified by this evaluation

    /// @notice Derived view of one unit under one policy at one timepoint. Nothing in it is stored.
    struct Evaluation {
        Result overall;
        Result[3] axes;
        bool cellComplete; // overall Satisfied, Baseline profile, operating state accepted, dynamic evidence verified
        bool baseline;
        bool stateAccepted;
        OperatingState state;
        uint32 flags; // bit set of FLAG_*
        uint48 timepoint;
        uint256 open; // requirements without an applicable supporting statement of an accepted assessor
        bytes32 receipt; // commitment to the unit's versions, the policy, the timepoint and every statement read
    }
}

11. Invariants

  1. One subject. A determination is bound to one unit, one boundary and compatible versions of its configuration.
  2. No offsetting. No axis is offset by another.
  3. No authority from records. A declaration, a statement, an identity or a label gives no authority to act.
  4. No creation by copying. A derivation and a composition do not create rights, funds or committed capacity that cannot be copied.
  5. Change ends applicability. When state, control, authorization or boundary change, the conclusions that depend on them stop applying until they are made again. Setting something back to an earlier state revives nothing.
  6. History stays history. A record keeps its attribution and its time. It is not a current fact about a new subject or a new version. Keeping a record does not make it true: a statement found to rest on wrong evidence is revoked.
  7. Accountability and continuity. Key operations have a verifiable basis of authorization and are attributable. The rules for handling exceptions and for the continuation of obligations are stated, and no transition leaves an existing commitment or responsibility without an identifiable bearer.

Rationale

Three axes, joined by "and". The three axes are the three ways a participant can fail: it stops running, it cannot be dealt with, it cannot pay. Each can fail while the others look healthy, and the failures do not trade off. A score would let them.

Capabilities inside the axes, tied by a scheme. Derivation, interaction, maintenance and composition each need something from every axis: a mechanism, rules and resources. Making them a fourth axis would repeat the three; leaving them as consequences would be wrong, since no axis implies, for example, a license to copy. Three classes per capability keep the conjunction over three axes, and the common scheme entry in their dependency masks makes the three parts be about one plan.

Relative to a profile, with a floor. Requirements will grow as the field does, and settings differ. Fixing one profile would freeze the definition; allowing any profile would empty it. The class table fixes what cannot be removed, by function and not by mechanism, and the registry checks it when a profile claims it.

A derived view. A stored "complete" flag is true at one moment and is then read for months. Deriving the state from statements at the time of the question makes expiry, revocation and change take effect without anybody having to remember to clear a flag.

Dependency digests per entry. Invalidation by any change of the manifest would discard evidence a change does not touch and would make units avoid recording small changes. Invalidation left to the assessor would let a dependency be forgotten when it is inconvenient. The class table fixes the least an assessment of each class depends on, declared relations carry what a particular unit relies on, and the digest makes the rest mechanical. Entries are compared by commitment and revision. A configuration that was rolled back is not the configuration that was assessed: it was left and re-entered, and what happened in between is not known to the earlier statement. Reviving its conclusions would let a unit move away from an assessed state and back without anyone looking again; the assessor reconfirms instead.

Expected digest. A statement is a judgment about a state. Without the expected digest, a transition mined between the assessor's reading and its statement would leave the statement recorded against a state it never saw. Comparing only the statement's own dependencies keeps unrelated changes from blocking it.

Authorization configuration. Who may act for a unit changes far more often than who controls it. Tying it to the control version alone would let a new operator grant leave every conclusion about permissions standing; tying every statement to it would discard conclusions it does not touch. It has its own revision and its own dependency bit, and the classes that are about permissions name it.

Snapshots and live evidence. A statement that rests on a record that can change says something current only if the record is read when the statement is relied on. A view that does not read it can still be useful as a record of what was concluded, and it is labelled so; it does not yield the state.

Policies stated in advance. Whom to believe is the consumer's decision and cannot be the standard's. What the standard can require is that the decision is stated before the evidence is read and that nobody's later statement silently replaces another assessor's.

Reference, not reconstruction. Assertions, bindings and maintenance records already have registries with their own semantics. Statements refer to them through adapters with a narrow, stated proposition. A statement stays an object of its own so that an implementation of this specification needs none of those registries.

Exclusive claims. Most of what a boundary holds is described in documents. The registry enforces the one property that documents cannot: that the same account or resource is not inside two boundaries at once. This is what makes "a copy does not multiply funds" a rule a contract checks.

No mandatory single controller, no mandatory limits. Units will be controlled by individuals, by several parties, by contracts and by groups. Requiring one external controller, or one particular set of derivation limits, would exclude sound arrangements. What is required is that the arrangement is declared, that declared limits are enforced, and that operations are attributable.

Rank. An acyclic membership relation is needed for group accounts to make sense, and the specification requires that invariant. Checking for cycles in a general graph on chain is costly; an immutable rank that members must be below gives the same guarantee with one comparison, at the price of a bound on nesting. That bound belongs to the method, so an implementation can choose another.

Published proposals that fill the functions

The Baseline is stated in functions. The following published proposals are one set of mechanisms for them. The mapping is informative: a deployment MAY use others, and a record under one of these proposals supports what the right-hand column says and no more. The mapping as data is in reference-mapping.json.

FunctionProposalWhat a record under it supportsWhat it does not
Identity, authorization and verifiable claimsERC-8419Scheme-based assertions about a subject, with evidence, validity, revocation and binding to the current controllerWhether the asserted claim is true; an assertion grants no permission
Supply and demandERC-8338Which skill package, in which version and with which integrity commitment, a unit uses or offersWhether the skill can be executed in the unit's current environment
Supply and demandERC-8414Tasks, acceptance rules, escrowed reward, delivery and settlement: the link between demand, work and incomeA surplus over a period
Supply and demandERC-8506Specification, metering, authorized consumption and settlement of entitlements to inference supplyA price; an entitlement held is not a cost covered
Discovery and informationERC-8444Discovery, anchoring and publication control of agents, skills, tasks and other resourcesAvailability or authority
Discovery and informationERC-8489Rules of an information channel: roles, observation, provision, redistributionWhat was disclosed off chain
Discovery and informationERC-8501Declarations, observations and profiles of how generative engines represent an objectApplies to units whose duties include being found that way
OrderERC-8436Collective decisions under explicit authorization, with procedure, finality and resultEffect without an authorization and an execution path bound to it
OrderERC-8468Adoption of a pinned safety specification for a subject and scope, with enforcement locations and intervenersThat the arrangement is enforced on every path; a source of authorization
OrderERC-8471Admission, evidence method, bounded ruling and procedure for disputes about existing obligationsThat obligations are met
CompositionERC-8447Group boundary, charter, members, collaboration structure and life cycleThat the group is complete
Self-maintenanceERC-8490Attributable, versioned self-maintenance records with timelinessThat the described maintenance took place

Authorization (class 12) is carried in this mapping by the account, delegation or execution-gating mechanisms of a deployment. None of the proposals above is by itself a source of authorization.

The reference implementation includes adapters for three of them: ERC-8419, ERC-8468 and ERC-8490.

ERC-8004 defines identity, reputation and validation registries for agents; a subject of that kind is one of the subject types a Unit Descriptor can name. ERC-8350 commits transitions of private agent memory and can serve as evidence for class 3. ERC-8428 records parentage between tokens of one contract; its model differs from the lineage of this proposal, which is between units that may be of different kinds and under different controllers, so it is related work and not an alternative binding.

Backwards Compatibility

No backward compatibility issues found. The framework introduces new registries and changes no existing interface. Units, accounts and records that exist under other proposals can be described and assessed without modification.

Test Cases

Case A: assessment, upgrade, reassessment

A unit is registered with twelve manifest entries. Its lineage scheme declares that it relies on the intelligence entry, since it copies memory only where the model's license allows. Registration gives no result: all twenty-seven requirements are open. An assessor issues six statements, on each axis one for the requirements whose dependencies, closed under the declared relation, reach the intelligence entry, and one for the rest. Each statement carries the digest of the state the assessor assessed. The unit is cell-complete under a policy that accepts that assessor.

The unit replaces its model. One entry changes, and its revision advances from 1 to 2:

manifest root, version 1   0x117731331f7ac376b0f14f2f34deacec5bb07a7f5b4155361f7af8d633862cb2
manifest root, version 2   0x5dfd2d7bf46ed84d681b29c17f558d88644881ba472172485ca3f873fd5611f5

digest for a mask that names the economic entry only (bit 6)
  version 1                0x53c9b09ed05261a0b037b9dfb1b8f964e72ebdc1cbc51a01f674d7743edd19e3
  version 2                the same
digest for the minimum mask of class 4 (intelligence and capability, bits 1 and 3)
  version 1                0xcdeba0ce0b6f427075151331c32e3aedf48d2646ca00e68652994bb2b71fad35
  version 2                different
digest for a mask that names the lineage scheme, the protocol entry and the control relation
  version 1                0x12b27524e687aa7ed02667847787a47e55bae726713063008d16a271b139a842
  version 2                different: the scheme declares that it relies on the model

Exactly eight requirements are open again: classes 2, 4, 14, 21 and 23 through their minimum masks, and classes 7, 16 and 24 through the lineage scheme's declared relation. The three statements that do not depend on the model still apply. The three that do are kept as issued, with the root of version 1, and no longer apply. After three new statements the unit is cell-complete again.

If the unit then rolls the model back, the root is that of version 1 again and the digests over the intelligence entry are not: the entry is at revision 3. No earlier statement applies again by itself.

A suspension for maintenance leaves the results as they are and reports the operating state next to them; the unit is not reported cell-complete under a policy that accepts active units only, and is again after resumption. A repair that reconfirms an entry changes no commitment and still reopens the requirements that depend on that entry.

Case B: derivation and succession

A complete unit declares a derivation allowance: at most two children, one generation, a total budget of 100. The allowance is part of its authorization configuration. It derives a child with a grant of 60. The child has its own record and no statement; all its requirements are open. Every requirement of the parent is open again, since every class depends on the boundary and the grant left it. A statement about the child whose window begins before the derivation is refused. A second child cannot be granted 50, since 60 and 50 exceed 100; it can be granted 40. A third child is refused by the count. The child cannot declare a budget above 60 or a generation limit above 1.

Later, the child is succeeded by another unit: the predecessor's side offers terms that name a capacity claim, the successor's side accepts with its new descriptor, the claim moves, the predecessor is retired. Every requirement of the successor is open until assessed again.

Case C: composition, group registration and interaction

Two units and a group of rank 1 exist. The first member's agent holds an operator grant for interactions; the grant is part of what the first member is assessed with. Both members are complete; before any assessment of the group, the group is not. The first member joins and declares itself affected: its requirements are open until assessed again. The second joins unaffected and stays complete. The group cannot claim an account a member holds. The group is assessed on its own boundary and is complete, while the first member is not yet.

The two members interact through an example consumer contract that requires both sides to be cell-complete. Both declare the same rule set for the function. The first member's agent offers terms. An account without authorization for the second member tries to accept: the acceptance is refused with the ground "not authorized" and the refusal is recorded. The second member grants that account the scope. The grant changes the second member's authorization configuration, so its acceptance is refused again, now with the ground "not complete", until the second member is assessed with the grant in place. Then the account accepts and delivers, and the first member acknowledges with a receipt.

The second member then declares that the membership affects it after all: its requirements are open until assessed again. The group removes the first member. The first member reports nothing, and the declaration it made when joining applies: its requirements are open again, as are the group's.

Things that must not happen

  1. A statement that expired, was revoked, or comes from an assessor the policy does not accept supports the state.
  2. Statements about different units, or about incompatible configurations of one unit, combine into the state.
  3. Contradicting accepted statements, or an adapter error, are read as satisfied.
  4. A derived unit is assessed on its parent's period, holds its parent's account, or receives a budget that was already granted.
  5. A statement supports the state after an upgrade that changed something it depends on, directly or through a declared relation.
  6. A group holds a resource a member holds, or counts an internal transfer as income.
  7. A unit acts on a shared rule set without an authorization, or a record is taken as an authorization.
  8. A Baseline requirement is answered "not applicable", or a profile that claims the Baseline leaves a class out or makes it conditional.
  9. A statement keeps supporting the state after a record it refers to was revoked, suspended or became overdue, or after the control relation changed, because the manifest is unchanged.
  10. A statement leaves an entry out of its dependencies, whether a Baseline minimum or its profile's requirement names it, and so survives a change of that entry.
  11. A statement is recorded against a state other than the one its assessor assessed.
  12. An operator changes an entry, the operating state or the descriptor without the scope for that change.
  13. A member that declared itself affected keeps its conclusions when the other side ends the membership.
  14. A statement that depends on the authorization configuration survives a change of operators, approvals, recovery rule or derivation allowance, or the expiry of a grant; or an approval given under an earlier control relation is used after a control change.
  15. Rolling a configuration back revives a conclusion made before.
  16. A unit is reported cell-complete on a statement whose dynamic reference was not read; or an adapter's gas use, answer or failure changes anything beyond its own reference; or the result depends on the gas the caller sent.
  17. A grant renewed before its expiry keeps the old expiry, so that a unit assessed again with the renewed grant cannot be cell-complete after the old expiry.
  18. The authorization expiry stays at the expiry of a grant that was revoked, or passes over the earlier expiry of another grant in force; or a grant is made that has already ended.
  19. A statement survives the expiry of a grant because it reaches the authorization configuration only through a declared relation.
  20. A snapshot that the policy's conflict rule passes over keeps a unit from being cell-complete; or a snapshot that is the only support of a requirement makes a unit cell-complete.

Vectors

  • constants.json: the manifest domain, entry indices, dependency bits, enumerations, transition kinds, scopes, flags and the limits of an adapter call.
  • baseline.json: the class table with masks.
  • commitments.json: the canonical form of a sample, the commitment of every example document and the descriptor commitment of every descriptor.
  • manifest.json: entry commitments, the declared relation, revisions, roots, closures and dependency digests of Case A before and after the upgrade and after a rollback.
  • economic.json: sixteen sets of figures with the result the rules of section 5.5 give for each.
  • interfaces.json: function selectors and ERC-165 identifiers of the four interfaces.

The ERC-165 identifiers are 0x1cb642c7 for IACCFUnits, 0x0a1ba6c9 for IACCFProfiles, 0xaa9326b9 for IACCFStatements and 0x9acebfb5 for IACCFEvidenceAdapter.

Example documents

Reference Implementation

The reference implementation has no owner, no upgrade path and no privileged account.

The unit registry bounds a unit at sixteen grants in force. The statement registry bounds a statement at eight evidence references and a policy at sixteen assessors and sixteen methods, gives each adapter call 200,000 gas and a 64-byte answer, and the profile registry bounds a profile at 256 requirements, so that the derived view has a bounded cost.

The reference registries track, for derivation, the authority that flows down a lineage: a declared allowance, the sum of grants against a budget, and the limits a derived unit inherits. Authority that a unit obtains independently from another authorizer is a separate source of authorization and is outside these registries.

Security Considerations

A label is not a state and not an authorization. The most likely misuse of this framework is to treat a Cell Record, a published manifest or a past statement as proof. Consumers MUST read the derived view under their own policy at the time they rely on it, and MUST check authorization separately on their own execution path.

Assessors. Anyone can issue statements, including a unit's controller about its own unit. A policy that accepts an assessor accepts its judgment, its method and its incentives. Assessors can be wrong, careless or colluding with the unit. Accepting several assessors under the unanimous rule, restricting methods and bounding the age of statements reduce the exposure and do not remove it. Self-assessment is visible, since the assessor is recorded; it is the consumer's choice whether to accept it.

What the registry checks and what it cannot. The registries check structure: coverage, dependencies, windows, validity, conflicts of exclusive claims, declared derivation limits. They cannot check that a model is available, that a figure is right or that a rule is enforced off chain. Those are the assessor's findings, supported by the evidence its statement commits to.

Evidence that goes stale without a trace. A subscription can end, a license run out and a key be compromised while every commitment on chain is unchanged. Validity periods, revocation and evidence references that are read at evaluation limit how long a stale conclusion can be relied on. A view under a policy that does not read references is a snapshot and is labelled as one; it never reports the state current. Consumers with more at stake should use shorter maximum ages.

Issuance against a moving state. A statement is recorded only against the state its assessor assessed. A controller that keeps changing what a statement depends on can keep the statement from being recorded; that is visible in the transition history and leaves the unit without the state, never with a state nobody assessed.

Adapters. An adapter is code a policy relies on. A faulty or malicious adapter can report support that is not there; a consumer accepts adapters implicitly by accepting the assessors that use them and should know which adapters those are. An adapter error is reported apart from a finding so that an attacker who can make an adapter fail cannot make a unit appear to have failed a requirement, and cannot make it appear to have passed one. The gas allowance, the fixed size of the answer and the range checks of section 8.4 keep a hostile adapter from exhausting or flooding an evaluation, and the rule that an evaluation without enough gas stops keeps a caller from producing an adapter error by sending too little gas.

Squatting and impersonation. A unit can be registered for a subject the registrant does not control, and a subject key can be registered more than once. Records about the subject in other registries, read through an adapter, then appear to support the impostor's unit as far as the adapter's proposition goes. Class 11 exists for this reason; a statement on it should rest on evidence that the unit's controller controls the subject, for example an assertion bound to the controller.

Claims. An exclusive claim on a resource other than an account is a declaration. A party can claim a key that names a resource it does not control, which blocks the same key for others in that registry. Keys should be derived from an identifier the rightful holder controls, and a consumer should not read a claim as proof of control.

Self-replication and control. A unit that can derive copies of itself, pay for them and upgrade itself is the kind of system for which loss of oversight is a recognized risk. This framework records and constrains derivation; it does not make it safe by itself. It requires an authorization for every derivation, enforcement of the limits that authorization declares, including limits on totals, a verifiable relation between parent and child, a declared arrangement for restricting, stopping and ending a unit, and attribution of key operations. It deliberately does not mandate one form of control. Limits on count, generations and budget are dimensions an authorization can declare; a deployer SHOULD choose the ones that are proportionate to the unit's profile, duties and the consequences of uncontrolled copies, and a declared limit is enforced. The intervention path SHOULD be one that can actually be carried out, including when the unit does not cooperate, and whoever carries it out SHOULD be accountable for it; this specification leaves open who that is. Human approval of derivation is one mechanism a profile for high-consequence units MAY require. A registry constrains the identities, authorizations, resources and operations it records; it cannot prevent code from being copied outside it, and nothing in this specification should be read as a claim that it can.

Disclosure. Manifests and statements describe configurations, suppliers and finances. The registries hold commitments, not content; documents can be disclosed selectively, and lineage can be recorded as a commitment where a public relation would reveal too much. When a consumer needs something that was not disclosed in a verifiable way, the result is undetermined. Something that was not disclosed is not thereby false, and something that was only committed is not thereby shown.

Economic figures. Test and demonstration deployments use fixed or simulated figures. Such figures exercise the rules and show nothing about real self-sustenance, and a statement that rests on them should say so in its premises.

Clock. Validity, windows and expiry use the registry's clock. Statements with validity periods close to the granularity of block time, or policies with very small maximum ages, are sensitive to the usual tolerance of block timestamps.

Cost of evaluation. The derived view reads every accepted assessor's latest statement for every requirement and, when asked, calls adapters. The bounds stated under Reference Implementation keep this finite; a contract that evaluates on chain inside a transaction should use policies with few assessors and should send enough gas for every adapter allowance, since an evaluation without it reverts.

Copyright and related rights waived via CC0.

EIP.tools

EIP.tools

Search, read, and map Ethereum improvement proposals, ERCs, RIPs, and CAIPs from one focused interface.

Farcaster
by @apoorveth