Back to corpus
research noteexperiment writeup candidatescore 24

Clarity Agent Protocol (CAP)

``` ┌─────────────────────────┐ │ CONTRACT REGISTRY │ │ (schemas + traits) │ └───────────┬─────────────┘ │ ┌───────────────────┼───────────────────┐ ↓ ↓ ↓ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │ Task Contract │ │ Task Contract │ │ Task Contract │ │ schema: X │ │ schema: Y │ │ schema: Z │ │ traits: [a,b] │ │ traits: [b,c] │ │ traits: [a,c] │ └───────┬───────┘ └───────┬───────┘ └───────┬───────┘ │ │ │ ↓ ↓ ↓ ┌───────────────────────────────────────────────────────┐ │ AGENT DISPATCHER │ │ Matches contra

Full HTML reader

Read the full artifact

Open in new tab

Extracted abstract or opening context

## What This Is An agent-agnostic governance protocol for AI agent task execution. Inspired by Stacks/Clarity smart contracts — tasks are structured as **contracts** with **traits**, **schemas**, and **validation rules**. Any agent, any model, any system can submit work. The protocol validates conformance and rejects non-compliant output with structured feedback. ## Core Concept Just as Clarity smart contracts on Stacks enforce trait conformance at the chain level, CAP enforces task conformance at the agent orchestration level. Agents don't just "do work" — they fulfill contracts. Contracts define what success looks like. Non-conforming work gets rejected with specific feedback, not vague "try again." ### Contracts A contract defines a unit of work with: - **Schema**: Expected input/output structure - **Traits**: Capabilities required (`buildable`, `testable`, `deployable`) - **Validation rules**: How to check conformance - **Governance**: Who can approve, auto-merge thresholds ### Traits (from Clarity) Composable interfaces agents declare they can fulfill: - `impl-buildable` — output compiles/builds without errors - `impl-testable` — includes tests that pass - `impl-deployable` — ready for production deployment - `impl-reviewable` — structured for code review - `impl-documented` — includes documentation - Custom traits per project ### Governance - **Auto-accept threshold**: contracts that score above N% conformance auto-merge - **Review gate**: below threshold → human or senior agent review - **Escalation**: repeated failures bump to higher-tier agent - **Rejection feedback**: structured, actionable — not "try again" but "trait X failed because Y, fix by doing Z"

Promotion decision

What has to happen next

Attach run IDs, datasets, metrics, and reproduction commands.

Why this is not always a full paper yet

Corpus pages are public-safe readers for discovered workspace artifacts. They are not automatically final papers. A corpus item becomes a polished paper only after the editable source, evidence checkpoints, references, figures, render path, and release status are attached through the paper schema.