---
title: "verify"
description: "Check that conditions are met"
canonical: "https://acs.synapti.ai/capabilities/verify/"
last_updated: "2026-11-16T01:14:10Z"
---

# verify

Check that conditions are met

Generated from [schemas/capability_ontology.yaml](https://github.com/synaptiai/agent-capability-standard/blob/main/schemas/capability_ontology.yaml), [skills/verify/SKILL.md](https://github.com/synaptiai/agent-capability-standard/blob/main/skills/verify/SKILL.md) at commit 18c38b74ac21. Ontology version 2.2.0.

Layer: [VERIFY](https://acs.synapti.ai/layers/verify/index.md)

## Safety

| Property | Value |
| --- | --- |
| Risk | Low |
| Changes state | No |
| Needs checkpoint | No |
| Needs approval | No |
| Overridable | No |
| Blocked from autonomy | No |

**Figure: Ordering rules for verify in a workflow.** In a workflow, execute, mutate and send, where the workflow has them, must come first (V102); and where the workflow has audit, verify must come before it (V102).

| Where | Capability | Rule | Enforcement | Diagnostic |
| --- | --- | --- | --- | --- |
| Before verify | [`execute`](https://acs.synapti.ai/capabilities/execute/index.md) | `precedes` | MUST | V102 |
| Before verify | [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md) | `precedes` | MUST | V102 |
| Before verify | [`send`](https://acs.synapti.ai/capabilities/send/index.md) | `precedes` | MUST | V102 |
| After verify | [`audit`](https://acs.synapti.ai/capabilities/audit/index.md) | `precedes` | MUST | V102 |

## Relationships

**Figure: Relationships of verify: 9 relationships with 9 capabilities.** verify has 9 relationships with 9 capabilities: 6 with edges into it, 2 with edges out of it, and 1 joined to it only by edges that run both ways.

| Capability | Row | Relationships |
| --- | --- | --- |
| [`critique`](https://acs.synapti.ai/capabilities/critique/index.md) | Edges into verify | `specializes` (into) |
| [`ground`](https://acs.synapti.ai/capabilities/ground/index.md) | Edges into verify | `enables` (into) |
| [`generate`](https://acs.synapti.ai/capabilities/generate/index.md) | Edges into verify | `enables` (into) |
| [`execute`](https://acs.synapti.ai/capabilities/execute/index.md) | Edges into verify | `precedes` (into) |
| [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md) | Edges into verify | `precedes` (into) |
| [`send`](https://acs.synapti.ai/capabilities/send/index.md) | Edges into verify | `precedes` (into) |
| [`rollback`](https://acs.synapti.ai/capabilities/rollback/index.md) | Edges out of verify | `enables` (out of) |
| [`constrain`](https://acs.synapti.ai/capabilities/constrain/index.md) | Either way | `alternative_to` (both ways) |
| [`audit`](https://acs.synapti.ai/capabilities/audit/index.md) | Edges out of verify | `precedes` (out of) |

- `enables`: Unlocks [`rollback`](https://acs.synapti.ai/capabilities/rollback/index.md)
- `enables`: Unlocked by [`ground`](https://acs.synapti.ai/capabilities/ground/index.md), [`generate`](https://acs.synapti.ai/capabilities/generate/index.md)
- `precedes`: Comes before, when both are present [`audit`](https://acs.synapti.ai/capabilities/audit/index.md)
- `precedes`: Comes after, when both are present [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md), [`execute`](https://acs.synapti.ai/capabilities/execute/index.md), [`send`](https://acs.synapti.ai/capabilities/send/index.md)
- `alternative_to`: Can substitute for [`constrain`](https://acs.synapti.ai/capabilities/constrain/index.md)
- `specializes`: Specialized by [`critique`](https://acs.synapti.ai/capabilities/critique/index.md)

## Contract

**Figure: Contract of verify: 3 inputs (1 required), 7 outputs.** verify takes 3 inputs, 1 required (filled pin) and 2 optional (hollow pin), and returns 7 outputs. The tables below list every field.

### Inputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `target` | any | No | What to verify |
| `conditions` | array | Yes | Conditions to check |
| `strict` | boolean | No | Fail on first violation |

### Outputs

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `passed` | boolean | Yes |  |
| `results` | array | No | Per-condition results |
| `violations` | array | No | Failed conditions |
| `evidence_anchors` | array of Anchor (or deprecated string or object) | Yes | What the output is based on, as evidence anchors (Standard v1.2 §6.5). An empty list grounds nothing, and the output is then marked inferred (§3.1). |
| `confidence` | number | Yes | The producer's probability that the output's claim is correct, self-reported unless the host documents a calibration (Standard v1.2 §4.1.1) From 0 to 1 |
| `inference_method` | string | No | How the output was reached when it is not grounded in evidence; with confidence it marks the output inferred (Standard v1.2 §3.1, §4.1.1). A producer should use model_knowledge, deduction, induction, abduction, analogy, statistical, simulation, assumption or an x- vendor value; a grounding policy (§5.20) requires one of them. |
| `uncertainty` | Uncertainty | No | The uncertainty of the output's principal value; its confidence equals the output's confidence (Standard v1.2 §4.1.1) |

The skill returns 9 fields: 5 are in verify's output contract (3 required) and 4 are the skill's own, outside the contract; it leaves out 2 contract fields (inference_method, uncertainty).

| Field of the skill's output | In the output contract |
| --- | --- |
| `passed` | Yes, required |
| `inconclusive` | No, the skill's own |
| `results` | Yes, optional |
| `violations` | Yes, optional |
| `fix_suggestions` | No, the skill's own |
| `coverage` | No, the skill's own |
| `confidence` | Yes, required |
| `evidence_anchors` | Yes, required |
| `assumptions` | No, the skill's own |
| `inference_method` | Yes, but the skill leaves it out |
| `uncertainty` | Yes, but the skill leaves it out |

## Used in workflows

**Figure: verify in workflows.** 6 workflows use verify, in 6 steps in all; its steps are the squares in an ink ring, and the key under the strips names the other squares.

- [`debug_code_change`](https://acs.synapti.ai/workflows/debug-code-change/index.md): step 9
- [`digital_twin_sync_loop`](https://acs.synapti.ai/workflows/digital-twin-sync-loop/index.md): step 18
- [`multi_agent_orchestration`](https://acs.synapti.ai/workflows/multi-agent-orchestration/index.md): step 5
- [`data_quality_pipeline`](https://acs.synapti.ai/workflows/data-quality-pipeline/index.md): step 6
- [`model_deployment`](https://acs.synapti.ai/workflows/model-deployment/index.md): step 5
- [`data_pipeline_validation`](https://acs.synapti.ai/workflows/data-pipeline-validation/index.md): step 8

## Claude Code skill

**Figure: What the verify skill's tools can do, against the ontology.** The skill may use 3 tools: 2 only read and 1 run commands; the ontology marks verify as read-only, so Bash is more than the capability needs.

| What they can do | Tools |
| --- | --- |
| Only read | `Read`, `Grep` |
| Run commands, which can change state | `Bash` |
| Change files | none |

**Figure: The field names each step of the verify procedure uses.** 6 of the procedure's 6 steps use the name of an input or output field of the verify skill as a word; 2 output fields of 9 are used by no step (confidence, assumptions).

| Step | Inputs it uses by name | Output fields it uses by name |
| --- | --- | --- |
| 1. Load conditions | `conditions` |  |
| 2. Examine target | `target` |  |
| 3. Execute checks | `conditions` | `results` |
| 4. Analyze results |  | `passed`, `inconclusive`, `results`, `violations` |
| 5. Ground claims |  | `evidence_anchors` |
| 6. Format output |  | `results`, `fix_suggestions`, `coverage` |

Both examples of the skill write out every one of its 9 output fields.

**Figure: The field names each verification check of the verify skill uses.** 3 of the 4 checks use the name of an input or output field as a word; 6 output fields of 9 are named by no check (inconclusive, violations, fix_suggestions, confidence, evidence_anchors and assumptions).

| Check | Inputs it uses by name | Output fields it uses by name |
| --- | --- | --- |
| 1. Evidence Grounding: All results anchored to test output or file content |  | `results` |
| 2. Contract Validation: Output matches schema with required fields |  |  |
| 3. Idempotency Check: Re-running verify produces the same passed result (given unchanged inputs) |  | `passed` |
| 4. Coverage Tracking: results.length == coverage.total |  | `results`, `coverage` |

**Figure: The neighbours the skill lists for verify, checked against the ontology and the catalogs.** The skill lists 7 capabilities as common neighbours of verify; 6 of them have an edge with it in the ontology, and 3 run next to it, in that order, in a catalog workflow (execute most often, 3 times). Under each tile, an edge reads from its source to its target, with verify's symbol in its place: "requires Vr" is a requires edge from the tile's capability to verify, so the tile's capability must run before verify; "Vr precedes" is a precedes edge from verify to the tile's capability.

| Listed as | Capability | Ontology edge | Next to it in a workflow |
| --- | --- | --- | --- |
| commonly follows | [`constrain`](https://acs.synapti.ai/capabilities/constrain/index.md) | `alternative_to` (into it), `alternative_to` | never |
| commonly follows | [`execute`](https://acs.synapti.ai/capabilities/execute/index.md) | `precedes` | 3 times |
| commonly follows | [`mutate`](https://acs.synapti.ai/capabilities/mutate/index.md) | `precedes` | never |
| commonly follows | [`plan`](https://acs.synapti.ai/capabilities/plan/index.md) | none | never |
| commonly precedes | [`audit`](https://acs.synapti.ai/capabilities/audit/index.md) | `precedes` (into it) | 1 times |
| commonly precedes | [`rollback`](https://acs.synapti.ai/capabilities/rollback/index.md) | `enables` (into it) | 2 times |
| commonly precedes | [`critique`](https://acs.synapti.ai/capabilities/critique/index.md) | `specializes` | never |

### Live Context

Before verification, gather current state:

- Working directory: !`pwd`
- Git status: !`git status --short 2>/dev/null || echo "Not a git repo"`
- Recent commits: !`git log --oneline -5 2>/dev/null || echo "No git history"`
- Last modified files: !`find . -type f -mmin -30 -not -path './.git/*' 2>/dev/null | head -10 || echo "None"`

### Intent

Execute **verify** to determine whether an artifact (code, configuration, state, output) conforms to a specification, passes tests, or satisfies declared invariants.

**Success criteria:**
- Clear pass/fail result (`passed`) with supporting evidence
- Every check is grounded to observable output or file content
- Failures include actionable fix suggestions
- All assumptions about expected behavior are explicit

**Compatible schemas:**
- `schemas/output_schema.yaml`

### Inputs

| Parameter | Required | Type | Description |
|-----------|----------|------|-------------|
| `target` | No | any | What to verify |
| `conditions` | Yes | array | Conditions to check |
| `strict` | No | boolean | Fail on first violation |

Inputs not listed here are outside the capability's contract: a workflow step that binds them gets W604 (STANDARD v1.1 §5.5).

### Procedure

1) **Load conditions**: Read the test/invariant definitions in `conditions`
   - Identify testable assertions from the conditions
   - Parse test commands or invariant expressions
   - Note any preconditions required for verification

2) **Examine target**: Inspect the target being verified
   - Read relevant code, config, or state
   - Identify the specific behavior/properties to check
   - Check preconditions are met before running tests

3) **Execute checks**: Run each verification check systematically
   - For test suites: execute via Bash, capture stdout/stderr
   - For invariants: evaluate conditions, record boolean results
   - For schema validation: compare structure against schema
   - Record timing and resource usage if relevant

4) **Analyze results**: Determine `passed` from check outcomes
   - `passed: true`: All checks succeed
   - `passed: false`: One or more checks fail (each listed in `violations`)
   - Inconclusive (errors or missing data): `passed: false` with `inconclusive: true`

5) **Ground claims**: Attach evidence anchors to all findings
   - Format: `file:line`, `tool:bash:<command>`, or `test:<test_name>`
   - Include exact error messages and stack traces for failures

6) **Format output**: Structure results per output contract
   - Include fix suggestions for each failure
   - Calculate coverage metrics if applicable

### Output Contract

Return a structured object:

```yaml
passed: boolean  # true only when every check passed
inconclusive: boolean  # true when checks could not run (passed is then false)
results:  # Per-condition results
  - name: string  # Check identifier
    type: assertion | invariant | regression | schema
    target: string  # What was checked
    passed: boolean
    evidence: string  # Output or file reference
violations:  # Failed conditions
  - check: string  # Which check failed
    expected: string  # What was expected
    actual: string  # What was observed
    severity: low | medium | high | critical
fix_suggestions:
  - violation_ref: string  # Which violation (by check name)
    suggestion: string  # How to fix
    confidence: number  # 0.0-1.0 for suggestion quality
coverage:
  checked: integer  # Number of checks run
  total: integer  # Total checks possible
  percentage: number  # Coverage percentage
confidence: number  # probability that the verdict is right (§4.1.1)
evidence_anchors: [{ref: "file:line", kind: file}, {ref: "tool:bash:...", kind: tool}, {ref: "test:...", kind: record}]
assumptions: []  # Explicit assumptions made
```

#### Field Definitions

| Field | Type | Description |
|-------|------|-------------|
| `passed` | boolean | Overall result: true only when every check passed |
| `inconclusive` | boolean | True when checks could not be run; `passed` is then false |
| `results` | array | Per-condition results for every check executed |
| `violations` | array | Failed conditions with expected vs. actual |
| `fix_suggestions` | array | Actionable suggestions to fix violations |
| `coverage` | object | Metrics about verification coverage |
| `confidence` | number | Probability, 0.0-1.0, that the verdict is right (§4.1.1) |
| `evidence_anchors` | array of evidence anchors (§6.5) | File:line, URLs, or tool output references |
| `assumptions` | array | Explicit assumptions about expected behavior |

### Examples

#### Example 1: Unit Test Verification

**Input:**
```yaml
target: "src/calculator.py"
conditions:
  - "pytest tests/test_calculator.py -v passes"
```

**Output:**
```yaml
passed: false
inconclusive: false
results:
  - name: test_add_positive
    type: assertion
    target: Calculator.add
    passed: true
    evidence: "tool:bash:pytest - PASSED"
  - name: test_divide_by_zero
    type: assertion
    target: Calculator.divide
    passed: false
    evidence: "tool:bash:pytest - AssertionError: Expected ZeroDivisionError"
violations:
  - check: test_divide_by_zero
    expected: "ZeroDivisionError raised"
    actual: "Returns infinity"
    severity: high
fix_suggestions:
  - violation_ref: test_divide_by_zero
    suggestion: "Add check for divisor == 0 before division in Calculator.divide()"
    confidence: 0.9
coverage:
  checked: 5
  total: 5
  percentage: 100.0
confidence: 0.95
evidence_anchors:
  - {ref: "tool:bash:pytest tests/test_calculator.py -v", kind: tool}
  - {ref: "file:src/calculator.py:42", kind: file}
assumptions:
  - "Test environment has pytest installed"
  - "Tests are deterministic"
```

**Evidence pattern:** Test output captured from pytest execution, line numbers from stack traces.

---

#### Example 2: Schema Validation

**Input:**
```yaml
target: "config/production.yaml"
conditions:
  - type: schema
    schema_path: "schemas/config.json"
```

**Output:**
```yaml
passed: true
inconclusive: false
results:
  - name: schema_validation
    type: schema
    target: config/production.yaml
    passed: true
    evidence: "All 12 required fields present, types valid"
violations: []
fix_suggestions: []
coverage:
  checked: 1
  total: 1
  percentage: 100.0
confidence: 1.0
evidence_anchors:
  - {ref: "file:config/production.yaml:1-45", kind: file}
  - {ref: "file:schemas/config.json:1", kind: file}
assumptions:
  - "JSON Schema draft-07 validation semantics"
```

### Verification

Apply the following verification patterns:

- [ ] **Evidence Grounding**: All results anchored to test output or file content
- [ ] **Contract Validation**: Output matches schema with required fields
- [ ] **Idempotency Check**: Re-running verify produces the same `passed` result (given unchanged inputs)
- [ ] **Coverage Tracking**: results.length == coverage.total

**Verification tools:** Bash (for test execution), Read (for evidence files)

### Safety Constraints

- `mutation`: false
- `requires_checkpoint`: false
- `requires_approval`: false
- `risk`: low

**Capability-specific rules:**
- Do not modify the artifact being verified
- Do not skip failing tests or mask errors
- Stop and clarify if conditions are ambiguous or missing
- Timeout all external test execution (default 5 minutes)
- Do not access paths outside the workspace for verification

### Bundled Scripts

This skill includes utility scripts for automated verification:

#### verify-state.sh

Located at: `scripts/verify-state.sh`

**Usage:**
```bash
./scripts/verify-state.sh [--git] [--files] [--tests] [--all]
```

**Options:**
- `--git` - Verify git state (uncommitted changes, branch status)
- `--files` - Verify file integrity (broken symlinks, empty files)
- `--tests` - Execute project tests (auto-detects npm/pytest/rspec)
- `--all` - Run all verification checks (default)

**Output:**
- Console output with color-coded PASS/FAIL results
- JSON report saved to `.verification-report.json`

**Example:**
```bash
# Run all checks
./scripts/verify-state.sh --all

# Check only git and file integrity
./scripts/verify-state.sh --git --files
```

### Composition Patterns

**Commonly follows:**
- `constrain` - Provides the invariants/spec to verify against
- `execute` / `mutate` - Verify the outcome of executed changes (they must precede verify)
- `plan` - Provides expected postconditions to verify

**Commonly precedes:**
- `audit` - Record verification results for compliance
- `rollback` - If `passed` is false, trigger rollback (CAVR pattern)
- `critique` - Analyze root cause of failures

**Anti-patterns:**
- Never verify without a spec (`constrain` invariants or explicit `conditions`)
- Never modify artifact during verification (breaks idempotency)
- Never ignore `passed: false` and proceed with mutations

**Workflow references:**
- See `reference/composition_patterns.md#debug-code-change` for CAVR pattern
- See `reference/composition_patterns.md#digital-twin-sync-loop` for verify-after-act usage
