---
title: "Grounded Agency: Building Agent Systems That Survive Production"
description: "A Framework for Reliable AI Agent Architecture"
canonical: "https://acs.synapti.ai/background/whitepaper/"
last_updated: "2026-11-25T19:18:24+01:00"
---

# Grounded Agency: Building Agent Systems That Survive Production

Source: [spec/WHITEPAPER.md](https://github.com/synaptiai/agent-capability-standard/blob/main/spec/WHITEPAPER.md), commit 18c38b74ac21.

**A Framework for Reliable AI Agent Architecture**

---

## Executive Summary

**For decision-makers evaluating this framework:**

### The Problem

AI agents fail in production—not because the AI can't do the task, but because the *architecture* can't support reliable execution. Specifically:

- **No contracts**: Capabilities compose through natural language, not typed interfaces. Type mismatches surface at runtime.
- **No provenance**: When agents make mistakes, there's no trail to debug or explain.
- **No recovery**: Failed mutations leave systems in inconsistent states requiring manual cleanup.
- **No trust model**: Conflicting data sources are resolved arbitrarily or not at all.

### The Solution

The Agent Capability Standard provides structural reliability:

| Problem | Solution |
|---------|----------|
| Implicit composition | 36 capabilities with typed I/O schemas |
| Ungrounded claims | Evidence anchors and provenance tracking |
| Undefined conflict resolution | Trust-weighted, time-decayed source ranking |
| Retrofitted safety | Checkpoints required before mutations |

### Business Impact

| Metric | Expected Improvement |
|--------|---------------------|
| Debug time for agent issues | 50-80% reduction |
| Data corruption from failed workflows | Near elimination |
| Compliance audit preparation | Automatic decision lineage |
| Integration bugs caught pre-production | 90%+ with L3 conformance |

### Adoption Recommendation

- **Start small**: Run the validator on existing workflows (1 day)
- **Add safety**: Implement checkpoints for high-risk mutations (1 week)
- **Expand**: Progress to full conformance as value is demonstrated (1 quarter)

```mermaid
---
title: The recommended adoption path
---
flowchart LR
  accDescr: Start by running the validator on existing workflows in about a day, add checkpoints for high-risk mutations in about a week, and progress to full conformance over a quarter as the value shows.
  s1["Start small: validate existing workflows, 1 day"] --> s2["Add safety: checkpoints for high-risk mutations, 1 week"] --> s3["Expand: full conformance, 1 quarter"]
```

**Figure: The recommended adoption path.** Start by running the validator on existing workflows in about a day, add checkpoints for high-risk mutations in about a week, and progress to full conformance over a quarter as the value shows.

- Start small: validate existing workflows, 1 day → Add safety: checkpoints for high-risk mutations, 1 week
- Add safety: checkpoints for high-risk mutations, 1 week → Expand: full conformance, 1 quarter

The standard is framework-agnostic and modular. Adopt what you need; expand as complexity grows.

---

## Abstract

Most AI agent systems fail in production because they lack three essential properties: compositional contracts between capabilities, grounded state representations with provenance, and safety semantics that make dangerous actions structurally difficult. We present the Agent Capability Standard—a specification for atomic agent capabilities and a workflow DSL with typed bindings, recovery semantics, and world-model schemas that integrate provenance, uncertainty, trust, and identity resolution. We also provide a compiler-grade validator that can automatically propose deterministic transform patches. This paper describes the motivation, design rationale, architecture, and evaluation approach for the standard.

---

## 1. Introduction

### 1.1 The Promise and Peril of AI Agents

AI agents—systems that can perceive, reason, and act autonomously—represent one of the most exciting frontiers in artificial intelligence. From debugging code to managing infrastructure to orchestrating complex business processes, agents promise to automate tasks that previously required human judgment.

But there's a problem: most agent systems fail in production.

The failures are not in the AI's raw capabilities. Modern language models can write code, analyze documents, and generate plans. The failures are *architectural*—in how agent capabilities compose, how state is represented, and how safety is enforced.

### 1.2 Why Agent Systems Fail

Through analysis of agent system deployments, we've identified four recurring failure patterns:

**1. Implicit Composition**
Agent capabilities are typically composed through natural language prompting. There are no formal contracts between capabilities. When one capability produces output that another cannot handle, the system fails silently or produces incorrect results.

**2. Ungrounded State**
Agent systems often maintain internal state without explicit provenance. When asked "why did you do that?", the system cannot trace its reasoning to source evidence. This makes debugging impossible and trust erosion inevitable.

**3. Undefined Conflict Resolution**
When information from multiple sources conflicts, most agent systems have no principled way to resolve it. They may use whichever source was queried last, or attempt to merge inconsistent data, or simply hallucinate a resolution.

**4. Retrofitted Safety**
Safety in agent systems is typically added as an afterthought—a list of things the agent "shouldn't do." But without structural enforcement, safety properties are easily violated through prompt engineering, edge cases, or system bugs.

### 1.3 The Grounded Agency Approach

This paper introduces **Grounded Agency**—an approach to agent architecture that makes reliability a structural property rather than a behavioral aspiration.

The core insight is that reliable agent systems require:
- **Explicit contracts** between capabilities (what each produces and consumes)
- **Grounded claims** with provenance (where information came from)
- **Trust-aware fusion** for conflict resolution (which sources to believe)
- **Safety by construction** (dangerous actions are structurally difficult)

We implement this approach through the Agent Capability Standard, which provides:
1. A capability ontology with typed I/O schemas
2. A workflow DSL with bindings, gates, and recovery semantics
3. World state schemas with uncertainty and provenance
4. A trust model with authority ranking and time decay
5. A validator that enforces contracts at definition time

```mermaid
---
title: Each failure pattern and what answers it
---
flowchart LR
  accDescr: Implicit composition is answered by explicit contracts, ungrounded state by grounded claims, undefined conflict resolution by trust-aware fusion, and retrofitted safety by safety by construction.
  f1[Implicit composition] --> a1[Explicit contracts between capabilities]
  f2[Ungrounded state] --> a2[Grounded claims with provenance]
  f3[Undefined conflict resolution] --> a3[Trust-aware fusion]
  f4[Retrofitted safety] --> a4[Safety by construction]
```

**Figure: Each failure pattern and what answers it.** Implicit composition is answered by explicit contracts, ungrounded state by grounded claims, undefined conflict resolution by trust-aware fusion, and retrofitted safety by safety by construction.

- Implicit composition → Explicit contracts between capabilities
- Ungrounded state → Grounded claims with provenance
- Undefined conflict resolution → Trust-aware fusion
- Retrofitted safety → Safety by construction

---

## 2. Background and Related Work

### 2.1 Agent Architectures

The field of AI agents has evolved through several architectural paradigms:

**Reactive Agents** (Brooks, 1986) respond directly to stimuli without internal state. While robust, they cannot handle tasks requiring memory or planning.

**BDI Agents** (Bratman, 1987; Rao & Georgeff, 1995) maintain beliefs, desires, and intentions. They provide a framework for goal-directed behavior but leave composition and safety to the implementer.

**Cognitive Architectures** (Soar, ACT-R) provide unified theories of cognition but are complex to implement and not designed for modern LLM-based systems.

**LLM-based Agents** (AutoGPT, LangChain, etc.) leverage language models for planning and execution. They are flexible but typically lack formal contracts and safety guarantees.

### 2.2 Workflow Languages

Our workflow DSL draws on prior work in:

**Business Process Languages** (BPEL, BPMN) provide formal semantics for process composition but are designed for human-readable documentation rather than machine validation.

**Dataflow Languages** (TensorFlow, Apache Beam) provide typed dataflow graphs but lack the conditional execution and recovery semantics needed for agent workflows.

**Orchestration Systems** (Temporal, Airflow) provide workflow execution with recovery but don't address the semantic contracts between steps.

### 2.3 Knowledge Representation

Our world state model builds on:

**Provenance** (PROV-O, W3C) provides vocabulary for describing provenance but leaves interpretation to the application.

**Uncertainty Representation** (Bayesian networks, Dempster-Shafer) provides formal frameworks for reasoning under uncertainty but requires domain-specific modeling.

**Entity Resolution** (record linkage, deduplication) addresses identity matching but typically assumes batch processing rather than streaming updates.

### 2.4 Our Contribution

The Agent Capability Standard synthesizes these approaches into a cohesive framework specifically designed for LLM-based agent systems. Our key contributions are:

1. **Capability ontology with layered classification** organizing 36 atomic capabilities by function
2. **Typed workflow DSL** with static validation of bindings and contracts
3. **World state schema** with integrated provenance, uncertainty, and trust
4. **Safety invariants** enforced at validation time, not just runtime
5. **Compiler-grade validator** that produces actionable error messages and patch suggestions

---

## 3. The Capability Ontology

### 3.1 Design Principles

We designed the capability ontology around four principles:

**Atomicity**: Each capability does exactly one thing. Complex behaviors emerge from composition, not from monolithic capabilities.

**Layer Classification**: Capabilities are organized by their relationship to the world (observe vs. modify) and their cognitive function (perceive vs. reason vs. act).

**Explicit Contracts**: Every capability has typed input and output schemas. The types are not just documentation—they are enforced by the validator.

**Dependency Semantics**: Some capabilities require others. These dependencies are first-class and enforced structurally.

### 3.2 Layer Organization

We organize capabilities into 9 cognitive layers:

| Layer | Purpose | Mutation | Count |
|-------|---------|----------|-------|
| PERCEIVE | Acquire information | No | 4 |
| UNDERSTAND | Make sense of information | No | 6 |
| REASON | Plan and analyze | No | 4 |
| MODEL | Represent the world | No | 5 |
| SYNTHESIZE | Create content | No | 3 |
| EXECUTE | Change the world | Yes | 3 |
| VERIFY | Ensure correctness | Varies | 5 |
| REMEMBER | Persist state | Varies | 2 |
| COORDINATE | Multi-agent | Varies | 4 |

This organization provides several benefits:
- **Risk assessment**: the EXECUTE layer holds the only high-risk capabilities, `mutate` and `send`
- **Dependency ordering**: PERCEIVE typically precedes UNDERSTAND and MODEL, which precede REASON, which precedes EXECUTE
- **Safety integration**: VERIFY capabilities such as `checkpoint` can be required before EXECUTE capabilities

```mermaid
---
title: The usual order of the layers
---
flowchart TB
  accDescr: PERCEIVE typically comes before UNDERSTAND and MODEL, which come before REASON, which comes before EXECUTE; a VERIFY capability such as checkpoint can be required before EXECUTE.
  p[PERCEIVE] --> u[UNDERSTAND]
  p --> m[MODEL]
  u --> r[REASON]
  m --> r
  r --> e[EXECUTE]
  v["VERIFY, such as checkpoint"] ==>|can be required before| e
```

**Figure: The usual order of the layers.** PERCEIVE typically comes before UNDERSTAND and MODEL, which come before REASON, which comes before EXECUTE; a VERIFY capability such as checkpoint can be required before EXECUTE.

- PERCEIVE → UNDERSTAND
- PERCEIVE → MODEL
- UNDERSTAND → REASON
- MODEL → REASON
- REASON → EXECUTE
- VERIFY, such as checkpoint → EXECUTE: can be required before (thick line)

### 3.3 Key Capability Families

**Detection and Classification** (UNDERSTAND layer)
Capabilities like `detect`, `classify`, `measure`, and `predict` build understanding from observations. They use domain parameters (e.g., `detect` with `domain: anomaly`) rather than separate capabilities for each domain.

**Planning and Analysis** (REASON layer)
Capabilities like `plan`, `decompose`, `critique`, and `explain` produce structured decisions and rationale. `plan` produces a plan object that `execute` or `mutate` can implement.

**State Changes** (EXECUTE layer)
The `mutate` capability is the primary state-change point. It requires:
- A `checkpoint` from the VERIFY layer
- Optionally, `verify` to confirm the outcome

```mermaid
---
title: How a state change is guarded
---
flowchart TB
  accDescr: plan produces a plan object that execute or mutate can implement; mutate requires a checkpoint and can be followed by verify to confirm the outcome.
  plan -->|plan object| execute
  plan -->|plan object| mutate
  checkpoint ==>|required| mutate
  mutate -.->|optional| verify
```

**Figure: How a state change is guarded.** plan produces a plan object that execute or mutate can implement; mutate requires a checkpoint and can be followed by verify to confirm the outcome.

- plan → execute: plan object
- plan → mutate: plan object
- checkpoint → mutate: required (thick line)
- mutate → verify: optional (dotted line)

**Safety Primitives** (VERIFY layer)
- `checkpoint`: Save state for potential rollback
- `rollback`: Restore to a checkpoint
- `verify`: Check outcomes against invariants
- `audit`: Record what happened and why
- `constrain`: Enforce policy limits

### 3.4 Dependency Semantics

We distinguish hard and soft dependencies:

**Hard dependencies** are encoded as `requires` edges in the ontology: `checkpoint` is required before `mutate`, `send` and `rollback`. The high-risk capabilities also carry `requires_checkpoint: true`.

**Soft dependencies** are `soft_requires` edges (for example, `constrain` before `execute`, `mutate` and `send`); an unmet one is a warning (W601), not an error.

```json
{
  "id": "mutate",
  "requires_checkpoint": true,
  "requires_approval": true,
  "risk": "high"
}
```

**Safety constraints** are enforced structurally. The validator rejects a `mutate`, `send` or `rollback` step without an earlier `checkpoint` step (V102), and a step cannot weaken its safety flags below the ontology's: a weaker declaration is ignored with a warning (W602). The checkpoint requirement follows `requires_checkpoint` and the `requires` edges, not `mutation`: `checkpoint`, `audit` and `persist` are `mutation: true` without needing a checkpoint.

This distinction allows flexibility while ensuring critical safety properties.

```mermaid
---
title: Hard and soft dependencies
---
flowchart LR
  accDescr: checkpoint is a hard prerequisite of mutate, send and rollback, an error V102 when missing; constrain is a soft prerequisite of execute, mutate and send, a warning W601 when missing.
  checkpoint ==>|"requires, V102"| hard["mutate, send, rollback"]
  constrain -.->|"soft_requires, W601"| soft["execute, mutate, send"]
```

**Figure: Hard and soft dependencies.** checkpoint is a hard prerequisite of mutate, send and rollback, an error V102 when missing; constrain is a soft prerequisite of execute, mutate and send, a warning W601 when missing.

- checkpoint → mutate, send, rollback: requires, V102 (thick line)
- constrain → execute, mutate, send: soft_requires, W601 (dotted line)

### 3.5 Derivation Methodology

The 36 capabilities were derived through first-principles analysis of cognitive architectures. This section summarizes the methodology; full documentation is available in [docs/methodology/FIRST_PRINCIPLES_REASSESSMENT.md](https://acs.synapti.ai/background/methodology/first-principles-reassessment/index.md).

#### Foundation: Cognitive Architectures

We analyzed established cognitive frameworks (BDI, ReAct, SOAR) to identify the fundamental operations agents must perform. This yielded 9 cognitive layers representing distinct phases of agent reasoning and action.

#### Domain Parameterization

Rather than creating separate capabilities for each domain (detect-anomaly, detect-entity, detect-drift), we use atomic verbs with domain parameters:

```yaml
# Old approach (99 capabilities)
- capability: detect-anomaly
  input_bindings:
    data: ${observe_out.observation}
    pattern: error_rate_spike

# New approach (36 capabilities)
- capability: detect
  domain: anomaly
  input_bindings:
    data: ${observe_out.observation}
    pattern: error_rate_spike
```

This preserves expressiveness while maintaining a minimal, learnable ontology.


```mermaid
---
title: From domain variants to a domain parameter
---
flowchart LR
  accDescr: The domain-specific variants detect-anomaly, detect-entity and detect-drift of the 99-capability model become one atomic verb, detect, with a domain parameter.
  a[detect-anomaly] --> d["detect, with domain: anomaly, entity or drift"]
  e[detect-entity] --> d
  r[detect-drift] --> d
```

**Figure: From domain variants to a domain parameter.** The domain-specific variants detect-anomaly, detect-entity and detect-drift of the 99-capability model become one atomic verb, detect, with a domain parameter.

- detect-anomaly → detect, with domain: anomaly, entity or drift
- detect-entity → detect, with domain: anomaly, entity or drift
- detect-drift → detect, with domain: anomaly, entity or drift

#### Atomicity Validation

Each capability was validated against atomicity criteria:
- **Irreducibility**: Cannot be expressed as a composition of other capabilities
- **Single purpose**: Does one thing well
- **Typed contract**: Has well-defined input and output schemas
- **Domain-general**: Not specific to one tool or framework

#### The Number 36

The derivation yielded 36 atomic capabilities across 9 cognitive layers:
- 4 PERCEIVE (information acquisition)
- 6 UNDERSTAND (sense-making)
- 4 REASON (planning and analysis)
- 5 MODEL (world representation)
- 3 SYNTHESIZE (content creation)
- 3 EXECUTE (state changes)
- 5 VERIFY (correctness assurance)
- 2 REMEMBER (persistence)
- 4 COORDINATE (multi-agent, user interaction)

We do not claim 36 is a magic number. It emerges from principled derivation and may change through the extension governance process.

---

## 4. The Workflow DSL

### 4.1 Design Goals

We designed the workflow DSL to support:

**Static Validation**: Catch errors at definition time, not runtime
**Typed Composition**: Ensure outputs match expected inputs
**Safety by Default**: Make dangerous patterns require explicit opt-in
**Recovery Semantics**: Define what happens when things go wrong

### 4.2 Workflow Structure

A workflow consists of:

```yaml
workflow_name:
  goal: What this workflow achieves              # required
  risk: low | medium | high                      # required
  steps: Ordered list of capability invocations  # required
  inputs: External input schema                  # optional
  success: Criteria for successful completion    # optional
  spec_version: "1.1"                            # optional; standard version targeted
```

A catalog file can instead declare the version for all its workflows with a `# Standard version: 1.2.0` header. A workflow with neither draws a warning (W605); an unsupported version is an error (V109).

Each step invokes a capability and stores its output:

```yaml
- capability: detect
  domain: anomaly
  purpose: Find unusual patterns
  store_as: anomaly_out
  input_bindings:
    data: ${observe_out.observation}
    pattern: anomaly
```

### 4.3 The Binding System

Bindings connect steps by referencing prior outputs:

**Basic binding**: `${step_out.field.path}`
**Typed binding**: `${step_out.field.path: array<object>}`

The validator checks:
1. The referenced `store_as` exists in a prior step
2. The field path is valid in the producer's output schema
3. The type is compatible with the consumer's input schema

```mermaid
---
title: What the validator checks for each binding
---
flowchart TB
  accDescr: For a binding the validator checks that the referenced store_as exists in a prior step, that the field path is valid in the producer's output schema, and that the type fits the consumer's input schema.
  ref["A binding ${step_out.field.path}"] --> c1[The store_as exists in a prior step]
  ref --> c2["The field path is valid in the producer's output schema"]
  ref --> c3["The type is compatible with the consumer's input schema"]
```

**Figure: What the validator checks for each binding.** For a binding the validator checks that the referenced store_as exists in a prior step, that the field path is valid in the producer's output schema, and that the type fits the consumer's input schema.

- A binding ${step_out.field.path} → The store_as exists in a prior step
- A binding ${step_out.field.path} → The field path is valid in the producer's output schema
- A binding ${step_out.field.path} → The type is compatible with the consumer's input schema

Typed annotations are required when type inference is ambiguous (union types, missing metadata, open schemas).

### 4.4 Gates and Conditions

Gates provide conditional control flow:

```yaml
gates:
  - when: ${checkpoint_out.checkpoint_id} == null
    action: stop
    message: "Cannot proceed without checkpoint"
```

A gate's `action` is `stop`, `rollback`, `skip` or `warn`, and `message` is optional. A gate runs before its step by default; `phase: after` runs it after the step, which a gate that reads its own step's output needs. Gate `when` clauses, step `condition`s and failure-mode `when` clauses share one expression grammar ([STANDARD v1.1.0 §5.8](https://acs.synapti.ai/spec/1.1.0/index.md#58-condition-expressions)): references, JSON literals, comparisons (`==`, `!=`, `<`, `<=`, `>`, `>=`), membership (`in`) and boolean `&&`, `||`, `!`, checked statically for syntax and types.

```mermaid
---
title: When a gate runs
---
flowchart LR
  accDescr: A gate runs before its step by default; with phase after it runs after the step, which a gate that reads its own step's output needs; its action is stop, rollback, skip or warn.
  before["Gate, by default"] --> step[Step]
  step --> after["Gate with phase: after"]
  before -.->|when true| act["stop, rollback, skip or warn"]
  after -.->|when true| act
```

**Figure: When a gate runs.** A gate runs before its step by default; with phase after it runs after the step, which a gate that reads its own step's output needs; its action is stop, rollback, skip or warn.

- Gate, by default → Step
- Step → Gate with phase: after
- Gate, by default → stop, rollback, skip or warn: when true (dotted line)
- Gate with phase: after → stop, rollback, skip or warn: when true (dotted line)

Conditions enable step-level branching:

```yaml
- capability: mutate
  condition: ${approval_out.approved} == true
  skip_if_false: true
  input_bindings:
    target: ${user_input.target}
    operation:
      apply: "${plan_out.steps: array<object>}"
```

### 4.5 Failure Modes and Recovery

Steps can declare expected failure scenarios:

```yaml
failure_modes:
  - condition: Verification failed      # prose description
    when: ${verify_out.passed} == false  # trigger expression
    action: rollback
    recovery:
      goto_step: plan_out
      inject_context:
        failure_evidence: ${verify_out.violations}
      max_loops: 3
```

This creates a recovery loop: if verification fails, roll back and try re-planning with the failure evidence, up to 3 times.

```mermaid
---
title: The recovery loop
---
flowchart LR
  accDescr: When verification fails the step rolls back and goes back to the plan step with the failure evidence, at most 3 times.
  plan[Plan step] --> verify[Verify step]
  verify -->|"passed == false"| rollback[Roll back]
  rollback -->|"failure evidence, at most 3 loops"| plan
```

**Figure: The recovery loop.** When verification fails the step rolls back and goes back to the plan step with the failure evidence, at most 3 times.

- Plan step → Verify step
- Verify step → Roll back: passed == false
- Roll back → Plan step: failure evidence, at most 3 loops

### 4.6 Parallel Execution

Steps can execute concurrently:

```yaml
- capability: search
  parallel_group: gather
  store_as: search_out
  input_bindings:
    query: checkpoint timeout errors

- capability: retrieve
  parallel_group: gather
  join: all_complete
  store_as: retrieve_out
  input_bindings:
    target: docs/runbooks/checkpoints.md

- capability: integrate
  input_bindings:
    sources: ["${search_out}", "${retrieve_out}"]
```

```mermaid
---
title: The parallel group in the example
---
flowchart LR
  accDescr: search and retrieve run together in the gather group, which joins when all are complete, and integrate takes both outputs.
  subgraph gather ["parallel_group gather, join: all_complete"]
    search
    retrieve
  end
  search -->|search_out| integrate
  retrieve -->|retrieve_out| integrate
```

**Figure: The parallel group in the example.** search and retrieve run together in the gather group, which joins when all are complete, and integrate takes both outputs.

- Group "parallel_group gather, join: all_complete": search, retrieve
- search → integrate: search_out
- retrieve → integrate: retrieve_out

---

## 5. World State and Trust

### 5.1 The World State Model

Agent systems maintain a model of the world. Our schema makes this model explicit:

**Observations**: Append-only events from sources
**Entities**: Current state of things in the world
**Relationships**: Connections between entities
**Lineage**: How the current state was derived

Every observation records:
- `timestamp`: When observed
- `source`: Where it came from
- `raw_payload`: Original data
- `canonical_payload`: Normalized form
- `evidence_anchors`: Links to source
- `provenance`: Traceability chain

### 5.2 Uncertainty Representation

We distinguish three types of uncertainty:

**Epistemic** (reducible): Uncertainty from incomplete knowledge
**Aleatoric** (irreducible): Uncertainty from inherent randomness
**Mixed**: Both types present

Each claim can carry:
- `confidence`: How certain are we (0.0-1.0)
- `uncertainty_type`: Which type
- `evidence_strength`: How strong is the evidence

### 5.3 The Trust Model

When sources disagree, we need principled conflict resolution:

**Source Authority**: Static ranking of source trustworthiness
**Time Decay**: Older information is less trusted (configurable half-life)
**Field Authority**: Sources may be authoritative for specific fields
**Confidence Weighting**: Self-reported confidence affects trust

Resolution strategies:
- `prefer_authoritative_sources`: Highest authority wins
- `prefer_recent`: Most recent wins
- `prefer_high_confidence`: Highest confidence wins
- `merge_with_uncertainty`: Keep both with explicit uncertainty
- `escalate_to_human`: Require human decision

### 5.4 Identity Resolution

Entity matching across sources requires:

**Hierarchical Namespaces**: `<class>:<namespace>/<local_id>` (Standard 1.2.0 §7.1)
**Alias Scoring**: Weighted confidence for potential matches
**Merge/Split Rules**: When to combine or divide records
**Hard Constraints**: Never merge incompatible types

---

## 6. Safety by Construction

### 6.1 The Safety Philosophy

Traditional safety approaches focus on what agents *shouldn't do*. We focus on making *unsafe actions structurally difficult*.

Instead of: "Don't modify files without permission"
We enforce: "Modification requires checkpoint, which requires file access"

### 6.2 Safety Invariants

**Invariant 1: Mutation requires checkpoint**
Any `mutate`, `send` or `rollback` step must be preceded by a `checkpoint` step. The validator rejects workflows that violate this (V102), and step flags cannot weaken the requirement (W602).

**Invariant 2: Actions follow plans and checks**
When a workflow plans, the `plan` step must come before `execute` and `mutate` (`precedes`), and a `constrain` policy check should come before `execute`, `mutate` and `send` (`soft_requires`, W601 when missing). This ensures deliberate rather than impulsive action.

**Invariant 3: Claims require grounding**
Outputs should include evidence anchors. Ungrounded claims must explicitly state their inference method.

**Invariant 4: Merges are constrained**
Entity merges cannot violate hard constraints (conflicting IDs, incompatible types). Merges are recorded in lineage.

### 6.3 Enforcement Mechanism

Safety is enforced through:

**Static Validation**: The validator checks prerequisites before execution
**Gates**: Runtime checks that can halt unsafe execution
**Hooks**: Shell scripts that intercept and potentially block actions
**Audit**: All actions are recorded for accountability

```mermaid
---
title: Where each safety mechanism acts
---
flowchart TB
  accDescr: Static validation checks prerequisites before execution, gates can halt unsafe execution at runtime, hooks can block an action, and audit records every action.
  wf[Workflow] -->|"static validation: prerequisites checked"| run[Execution]
  run --> action[Each action]
  gates[Gates] -.->|can halt| run
  hooks[Hooks] -.->|can block| action
  action -->|recorded| audit[Audit]
```

**Figure: Where each safety mechanism acts.** Static validation checks prerequisites before execution, gates can halt unsafe execution at runtime, hooks can block an action, and audit records every action.

- Workflow → Execution: static validation: prerequisites checked
- Execution → Each action
- Gates → Execution: can halt (dotted line)
- Hooks → Each action: can block (dotted line)
- Each action → Audit: recorded

---

## 7. The Validator

### 7.1 Validation Levels

The validator operates at four conformance levels:

**L1 (Basic)**: Capability existence and prerequisites
**L2 (Schema)**: $ref resolution and type inference
**L3 (Contracts)**: Binding types vs. consumer schemas
**L4 (Patches)**: Coercion registry and patch suggestions


```mermaid
---
title: The four validation levels
---
flowchart LR
  accDescr: Validation rises from L1, capability existence and prerequisites, through L2 reference resolution and type inference and L3 binding types against consumer schemas, to L4 coercions and patch suggestions.
  l1["L1 Basic: existence, prerequisites"] --> l2["L2 Schema: refs, type inference"] --> l3["L3 Contracts: binding types"] --> l4["L4 Patches: coercions, patches"]
```

**Figure: The four validation levels.** Validation rises from L1, capability existence and prerequisites, through L2 reference resolution and type inference and L3 binding types against consumer schemas, to L4 coercions and patch suggestions.

- L1 Basic: existence, prerequisites → L2 Schema: refs, type inference
- L2 Schema: refs, type inference → L3 Contracts: binding types
- L3 Contracts: binding types → L4 Patches: coercions, patches

### 7.2 Error Model

Diagnostics are categorized:

| Category | Code Range | Severity | Description |
|----------|------------|----------|-------------|
| Validation | V1xx | error | Static validation failures |
| Binding | B2xx | error | Binding and expression-reference failures |
| Schema | S3xx | error | Schema validation failures |
| Runtime | R4xx | error | Runtime execution failures |
| Safety | F5xx | error | Safety constraint violations |
| Warning | W6xx | warning | Valid but suspect; the workflow is accepted |

A workflow is valid when it has no errors. Warnings include unmet soft prerequisites (W601), safety-flag downgrades (W602), deprecated forms (W603), unknown fields (W604) and a missing version declaration (W605); a strict mode can treat warnings as errors.

Each diagnostic includes:
- Code, name and severity for programmatic handling
- Human-readable message
- Location (workflow, step, field)
- Suggestion for fixing

### 7.3 Patch Generation

For fixable errors, the validator can generate patches:

```json
{
  "operation": "add",
  "path": "/steps/5",
  "value": {
    "capability": "checkpoint",
    "purpose": "Save state before mutation",
    "store_as": "checkpoint_out"
  }
}
```

This enables semi-automated workflow repair.

---

## 8. Evaluation Approach

### 8.1 Validation Coverage

We evaluate the validator by:
- **Positive fixtures**: Valid workflows that must pass
- **Negative fixtures**: Invalid workflows that must fail with specific error codes
- **Patch fixtures**: Invalid workflows with expected patch suggestions


```mermaid
---
title: The three kinds of fixture
---
flowchart LR
  accDescr: Positive fixtures are valid workflows that must pass, negative fixtures are invalid workflows that must fail with specific error codes, and patch fixtures are invalid workflows with expected patch suggestions.
  pos[Positive fixture: valid] -->|must| pass[Pass]
  neg[Negative fixture: invalid] -->|must| fail[Fail with a specific code]
  pat[Patch fixture: invalid] -->|must| patch[Yield the expected patch]
```

**Figure: The three kinds of fixture.** Positive fixtures are valid workflows that must pass, negative fixtures are invalid workflows that must fail with specific error codes, and patch fixtures are invalid workflows with expected patch suggestions.

- Positive fixture: valid → Pass: must
- Negative fixture: invalid → Fail with a specific code: must
- Patch fixture: invalid → Yield the expected patch: must

### 8.2 Trust Model Evaluation

To evaluate conflict resolution:
- Inject conflicting observations from sources with known authority
- Verify resolution matches expected outcome
- Measure time decay accuracy

### 8.3 Reproducibility

To evaluate determinism:
- Run replay against recorded observation streams
- Diff world state snapshots
- Verify identical inputs produce identical outputs

### 8.4 Safety Validation

To evaluate safety properties:
- Attempt to create workflows that violate invariants
- Verify validator rejects them
- Test gate blocking at runtime

---

## 9. Use Cases

### 9.1 Digital Twin Synchronization

A digital twin maintains a model of a real-world system. The `digital_twin_sync_loop` workflow:

1. Receives signals from sensors/APIs
2. Transforms to canonical format
3. Integrates with existing world state
4. Detects drift and anomalies
5. Plans corrective actions
6. Checkpoints before mutation
7. Executes and verifies
8. Records audit trail

```mermaid
---
title: The digital_twin_sync_loop workflow in brief
---
flowchart TB
  accDescr: The workflow receives signals, normalizes and integrates them, detects drift, plans, checkpoints, executes and verifies, and records an audit trail.
  a["Receive signals"] --> b[Transform to canonical format]
  b --> c[Integrate with the world state]
  c --> d[Detect drift and anomalies]
  d --> e[Plan corrective actions]
  e --> f[Checkpoint before mutation]
  f --> g[Execute and verify]
  g --> h[Record the audit trail]
```

**Figure: The digital_twin_sync_loop workflow in brief.** The workflow receives signals, normalizes and integrates them, detects drift, plans, checkpoints, executes and verifies, and records an audit trail.

- Receive signals → Transform to canonical format
- Transform to canonical format → Integrate with the world state
- Integrate with the world state → Detect drift and anomalies
- Detect drift and anomalies → Plan corrective actions
- Plan corrective actions → Checkpoint before mutation
- Checkpoint before mutation → Execute and verify
- Execute and verify → Record the audit trail

### 9.2 Production Incident Triage

The `debug_code_change` workflow:

1. Inspects failing behavior
2. Searches for related patterns
3. Maps component dependencies
4. Models expected behavior
5. Critiques potential causes
6. Plans minimal fix
7. Checkpoints
8. Applies and verifies
9. Rolls back if needed


```mermaid
---
title: The incident triage workflow
---
flowchart TB
  accDescr: The debug_code_change workflow inspects the failing behavior, searches for related patterns, maps dependencies, models expected behavior, critiques causes, plans a minimal fix, checkpoints, applies and verifies the fix, and rolls back if needed.
  i[Inspect failing behavior] --> s[Search related patterns] --> m[Map dependencies] --> e[Model expected behavior]
  e --> c[Critique causes] --> p[Plan a minimal fix] --> k[Checkpoint] --> a[Apply and verify]
  a -.->|if needed| r[Roll back]
```

**Figure: The incident triage workflow.** The debug_code_change workflow inspects the failing behavior, searches for related patterns, maps dependencies, models expected behavior, critiques causes, plans a minimal fix, checkpoints, applies and verifies the fix, and rolls back if needed.

- Inspect failing behavior → Search related patterns
- Search related patterns → Map dependencies
- Map dependencies → Model expected behavior
- Model expected behavior → Critique causes
- Critique causes → Plan a minimal fix
- Plan a minimal fix → Checkpoint
- Checkpoint → Apply and verify
- Apply and verify → Roll back: if needed (dotted line)

### 9.3 Capability Gap Analysis

The `capability_gap_analysis` workflow:

1. Inspects current skill coverage
2. Maps existing workflows to capabilities
3. Discovers hidden dependencies
4. Compares alternative architectures
5. Prioritizes missing capabilities
6. Generates implementation plan

---

## 10. Limitations and Future Work

### 10.1 Current Limitations

**Runtime Execution**: The standard focuses on validation and specification. Runtime execution is implementation-dependent.

**Semantic Validation**: We validate structural correctness, not semantic correctness. A syntactically valid workflow can still do the wrong thing.

**Prompt Injection**: The standard provides structure but not content filtering. Prompt injection defense requires additional runtime measures.

### 10.2 Future Directions

**Cryptographic Checkpoints**: Sign checkpoints for tamper detection
**Role-Based Authorization**: Restrict capability access by role
**Automated Anomaly Detection**: Learn normal patterns and flag deviations
**Multi-Party Approval**: Require multiple approvals for high-risk actions
**Cross-Agent Coordination**: Protocols for agent-to-agent workflows

---

## 11. Conclusion

AI agents are powerful but fragile. Most failures are not capability failures—the AI can do the task—but architectural failures in composition, state representation, and safety enforcement.

The Agent Capability Standard addresses these failures through:
- Explicit contracts between capabilities (typed I/O schemas)
- Grounded state with provenance (observations, not hallucinations)
- Trust-aware conflict resolution (principled, not arbitrary)
- Safety by construction (prerequisites, not prohibitions)

The result is a framework where reliability is structural. Workflows are validated before execution. Dependencies are explicit. Recovery is built in. Audit trails are automatic.

Production agents require architecture, not vibes. This standard provides that architecture.

---

## References

1. Brooks, R. A. (1986). A robust layered control system for a mobile robot. IEEE Journal on Robotics and Automation.

2. Bratman, M. (1987). Intention, Plans, and Practical Reason. Harvard University Press.

3. Rao, A. S., & Georgeff, M. P. (1995). BDI agents: From theory to practice. ICMAS.

4. PROV-O: The PROV Ontology. W3C Recommendation.

5. Semantic Versioning 2.0.0. https://semver.org/

6. JSON Schema. https://json-schema.org/

---

## Appendix A: Capability Count by Layer

| Layer | Count | Capabilities |
|-------|-------|--------------|
| PERCEIVE | 4 | retrieve, search, observe, receive |
| UNDERSTAND | 6 | detect, classify, measure, predict, compare, discover |
| REASON | 4 | plan, decompose, critique, explain |
| MODEL | 5 | state, transition, attribute, ground, simulate |
| SYNTHESIZE | 3 | generate, transform, integrate |
| EXECUTE | 3 | execute, mutate, send |
| VERIFY | 5 | verify, checkpoint, rollback, constrain, audit |
| REMEMBER | 2 | persist, recall |
| COORDINATE | 4 | delegate, synchronize, invoke, inquire |
| **Total** | **36** | |

## Appendix B: Workflow Catalog

| Workflow | Goal | Risk | Steps |
|----------|------|------|-------|
| `monitor_and_replan` | Replan when the world changes | Medium | 7 |
| `clarify_intent` | Resolve ambiguous requests | Low | 5 |
| `debug_code_change` | Fix bugs safely | Medium | 11 |
| `world_model_build` | Construct world model | Low | 13 |
| `capability_gap_analysis` | Find missing capabilities | Low | 7 |
| `digital_twin_sync_loop` | Sync digital twin | High | 21 |
| `digital_twin_bootstrap` | Initialize twin | High | 2 (nested) |
| `rag_pipeline` | Grounded, cited answers | Low | 7 |
| `security_assessment` | Assess vulnerabilities | Low | 7 |
| `multi_agent_orchestration` | Coordinate agents | Medium | 7 |
| `data_quality_pipeline` | Clean and validate data | Medium | 9 |
| `model_deployment` | Deploy a model safely | High | 8 |

---

*Agent Capability Standard v1.2.0 (Candidate Standard; v1.1.0 the released Standard; v1.0.0 Supported)*
*Copyright 2026 Synapti.ai*
*Licensed under Apache 2.0*
