Version 0.1 · Draft Open Standard · 2026-11-25

Contributor Open Source Protocol (COSP) Specification

JSON Schema: https://cosp.dev/schemas/cosp-0.1.schema.json

1. Overview & Design Goals

COSP (Contributor Open Source Protocol) defines a vendor-neutral, harness-agnostic contract between open-source repositories maintained by humans and local contributor workers running any AI coding agent harness under the contributor's own compute budget.

2. The Four Protocol Primitives

PrimitiveSideResponsibility
1. ManifestRepositoryDeclares eligibility, ownership rules, token/complexity estimates, verification commands, and human guidelines.
2. ClaimsForge + WorkerServerless work acquisition via Draft PRs (or comment leases), tie-breaking, lease expiry, and optional reputation automation.
3. HandoffsWorker → ForgeRunning verification commands, attaching structured COSP trailers, and promoting Draft PRs to Ready for Review.
4. SteeringForge → Human → WorkerFiltering post-PR review comments to authorized maintainers and requiring human approval before injecting feedback into an agent session.

3. Primitive 1: Manifest

A repository opts into COSP by providing a YAML manifest conforming to cosp-0.1.schema.json.

3.1 Discovery Precedence

  1. YAML frontmatter (--- ... ---) at the top of CONTRIBUTING.md containing the key cosp.
  2. .cosp.yaml at the repository root.
  3. .github/cosp.yaml.

When embedded in CONTRIBUTING.md, clients SHOULD pass the Markdown body following the closing --- into the coding agent session as repository contribution instructions.

3.2 Schema Sections

4. Primitive 2: Claims (Serverless Coordination)

External contributors on public GitHub repositories cannot edit labels or assign issues directly. COSP uses initial Draft PRs (from a fork, or a branch for collaborators) so any contributor can claim work without write permissions.

4.1 Claim Trailer Format

Draft PR / Claim Comment Body
Refs #142

<!-- cosp
version: "0.1"
issue: 142
worker_handle: "ArtluxDM"
capability: "coding-standard"
lease_expires_at: "2026-11-26T20:00:00Z"
-->

4.2 Optimistic Tie-Break (exclusive mode)

  1. Push an initial claim commit and open the Draft PR containing the <!-- cosp ... --> trailer.
  2. Wait a brief jitter window (5–10s) and re-query active non-stale open PRs referencing issue #N.
  3. If another active COSP PR has a lower PR number, close your own Draft PR cleanly with a brief note and select the next issue.

4.3 Optional GitHub Action (Rule of 3)

Repositories MAY install .github/workflows/cosp.yml to mirror claims onto in-progress and cosp:<handle> labels, and automatically tag/assign contributors once they reach trusted_merged_prs_threshold merged PRs.

5. Primitive 3: Handoffs & Pause/Resume

6. Primitive 4: Steering & Security Model