API Reference

Deterministic chains, councils, and verifiable workflows

Units

Atomic workflow components with semantic versioning and blake3 fingerprints.

Types

  • role: Agent definition with capabilities
  • rule: Governance constraint or policy
  • task: Executable workflow step
  • chain: Multi-step deterministic workflow
  • supply: Resource or data specification

URI Scheme

stratt://{domain}/{type}/{slug}@{version}

Example: stratt://pathfinder/chain/auth@0.2.0

Councils

Agent rosters with gate authority delegation and failure mode protection.

Key Concepts

  • protectedAgents: Agents required in chain composition (FM-04)
  • gateAuthorityAgents: Agents authorized to approve gate resolutions
  • failureThreshold: Max allowed blast radius before auto-block

Active Council

Pathfinder (dev domain): 6 agents, full test coverage

Config: councils/pathfinder/council.yaml

Blake3 Fingerprints

Canonical serialization and cryptographic hashing for tamper detection.

Pipeline (5 stages)

  1. YAML parse → remove fingerprint field + nulls
  2. NFC-normalize strings
  3. Recursive key-sort JSON (UTF-16 code unit order)
  4. UTF-8 encode
  5. Blake3 hash → blake3:64hexchars

Validation

Use bun packages/cli/src/index.ts fingerprint <path> --verify

Resolution Gates

Multi-agent approval gates with full ledger audit trail.

Gate Lifecycle

  • Pending: Awaiting approvals from gateAuthorityAgents
  • Approved: All required approvals granted; ledger written
  • Rejected: Consensus reached to block
  • Overridden: Manual override with justification (min 20 chars)

CLI Usage

stratt chain apply --gates council=pathfinder

Ledger & Audit

Immutable event log with Ed25519 signatures and public verification.

Events Tracked

  • adjudicate: Ledger entry for gate resolution
  • resolveGate: Gate state transition
  • overrideStage: Pipeline override with justification

Public Verification

Audit tokens (signed, immutable) can be verified by third parties via GET /audit/[token] without STRATT access.

Collaborative Editing (CRDT)

Yjs-based real-time sync with field-level merge strategies.

Merge Strategies

  • last_write_wins: Timestamp-based conflict resolution
  • manual_resolution: Requires explicit human decision
  • union_merge: Combine conflicting sets
  • append_wins: Later writes append to history
  • highest_restriction_wins: Use most restrictive value
  • immutable: Reject writes after first commit
  • recompute_post_merge: Recalculate derived fields

Failure Modes (FM-01 to FM-09)

CI pipeline checks enforcing reliability and preventing breaking changes.

Protected Modes

  • FM-01: Fingerprint tamper detection
  • FM-02: Broken unit imports
  • FM-03: DAG cycles
  • FM-04: Protected agent missing from chain
  • FM-05: Gate removal (breakage)
  • FM-06: Contract breaking changes
  • FM-07: Stable unit importing draft
  • FM-08: R2 infrastructure failure
  • FM-09: Unknown agent in composition

CLI Commands

16 commands for validation, workflow execution, and audit.

Key Commands

  • validate <path>: Schema validation + fingerprint check
  • fingerprint <path> --verify: Compute or verify blake3
  • ci <paths...>: Run full CI pipeline (FM-01 to FM-09)
  • chain apply --gates council=<name>: Apply chain with gates

Output Formats

All commands support --json and --verbose flags for structured output and debug logging.

Integrations & Cross-Links

stratt.works

User-facing outcome cards powered by @stratt/orchestrator and @stratt/surface-data (whitelist enforced, no protocol tokens).

Visit stratt.works

Meridian (Choco HQ)

Enterprise team collaboration with full STRATT stack: units, fingerprints, stratt:// protocol, and resolution gates.

Open Meridian

Rocky

Protocol builder access via externally signed audit tokens. Full internals linkage with public verification bridge.

Rocky (external)

Example Workflows

Example 1: Chain with Gates

stratt ci utils/auth:0.2.0

$ stratt ci utils/auth:0.2.0
Validating: chain imports, fingerprints, DAG...
✓ All checks pass. Blast radius: 4 units.

$ stratt chain apply --gates council=pathfinder
Awaiting approval: [agent_alpha] [agent_beta]
✓ Gate resolved: approved. Ledger: blake3:abc123def456...
$ _

Example 2: Fingerprint Verification

stratt fingerprint <path> --verify

$ stratt fingerprint chains/auth.yaml --verify
Expected: blake3:a1b2c3d4e5f6...0123456789abcdef
Computed: blake3:a1b2c3d4e5f6...0123456789abcdef
✓ Match verified

Reference Doctrines

Detailed doctrine files (9 total) covering units, councils, fingerprinting, graph, CLI, CI, failure modes, CRDT, and scaffolding:

  • .opencode/doctrines/units.md
  • .opencode/doctrines/councils.md
  • .opencode/doctrines/fingerprinting.md
  • .opencode/doctrines/graph.md
  • .opencode/doctrines/cli.md
  • .opencode/doctrines/ci.md
  • .opencode/doctrines/failure-modes.md
  • .opencode/doctrines/crdt.md
  • .opencode/doctrines/scaffolding.md