Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.3.2] - 2026-05-26

### Added

- Receiver autonomy scope-envelope evaluator with side-effect booleans,
threshold-checkpoint instrumentation, taxonomy pinning, and default-off
continuation grants.
- `cursor` runtime support for agent profiles, agent cards, status validation, sender inference via `OACP_RUNTIME=cursor`, `oacp add-agent --runtime cursor`, and `oacp setup cursor`.
- `oacp setup cursor --project <project>` now provisions the project-side Cursor agent directory and writes a repo-local `.cursor/rules/oacp.todo.mdc` placeholder while Cursor-owned rules and memory hooks remain deferred.

### Changed

- `oacp init` now defaults to `claude,codex,cursor`; Gemini remains supported through `--agents` and `oacp setup gemini`.
- Receiver autonomy docs and templates now use the current
`agents/<receiver>/config.yaml` schema.
- Docs: added an asynchronous `claude -p` on-ramp guide and refreshed the
quickstart for the current CLI surface.

## [0.3.1] - 2026-05-12

Expand Down Expand Up @@ -142,6 +158,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Checkout step in github-release workflow job (#19)
- Pre-release audit fixes: SHA-pinned actions, dangling doc refs (#15, #16)

[0.3.2]: https://github.com/kiloloop/oacp/compare/v0.3.1...v0.3.2
[0.3.1]: https://github.com/kiloloop/oacp/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/kiloloop/oacp/compare/v0.2.3...v0.3.0
[0.2.3]: https://github.com/kiloloop/oacp/compare/v0.2.2...v0.2.3
Expand Down
70 changes: 54 additions & 16 deletions QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ pipx install oacp-cli
Every project gets its own workspace with agent inboxes, shared memory, and packet directories.

```bash
oacp init my-first-project --agents claude,codex,gemini --repo /path/to/repo
oacp init my-first-project --agents claude,codex,cursor --repo /path/to/repo
```

Or with defaults (agents: claude, codex, gemini):
Or with defaults (agents: claude, codex, cursor):

```bash
oacp init my-first-project
Expand All @@ -54,7 +54,7 @@ $OACP_HOME/projects/my-first-project/
│ ├── codex/
│ │ ├── inbox/
│ │ └── outbox/
│ └── gemini/
│ └── cursor/
│ ├── inbox/
│ └── outbox/
├── memory/
Expand All @@ -72,24 +72,37 @@ $OACP_HOME/projects/my-first-project/

## 4. Connect Your Runtime

Tell your agent runtime where the OACP workspace lives.
Run the runtime setup command from the repo you want the agent to work in:

**Claude Code** — add the OACP workspace path to your project's `CLAUDE.md`:
```bash
cd /path/to/repo
oacp setup <runtime> --project my-first-project
```

For Claude Code:

```markdown
## OACP
OACP workspace: $OACP_HOME/projects/my-first-project/
Check inbox: ls $OACP_HOME/projects/my-first-project/agents/claude/inbox/
```bash
oacp setup claude --project my-first-project
```

**Codex** — add the workspace path to your repo's `AGENTS.md`:
This creates or updates:

- `.claude/agents/my-first-project.md`
- `.claude/skills/`
- `.claude/hooks/oacp-memory-pull.sh`
- `.claude/hooks/oacp-memory-push.sh`
- `.claude/settings.json`

```markdown
## OACP
OACP workspace: $OACP_HOME/projects/my-first-project/
For other supported runtimes, use the same shape:

```bash
oacp setup codex --project my-first-project
oacp setup cursor --project my-first-project
oacp setup gemini --project my-first-project
```

**Other runtimes** — point your agent's system prompt at the workspace path and instruct it to read the standard `memory/` files at session start.
Cursor support is scaffold-only until Cursor-owned rules land. Cursor sessions
must set `OACP_RUNTIME=cursor` or pass `--from` explicitly when sending messages.

For full runtime setup (role templates, guardrails, skills), see [docs/guides/setup.md](docs/guides/setup.md).

Expand All @@ -112,6 +125,12 @@ This writes a YAML file to `agents/codex/inbox/` and a copy to `agents/claude/ou

See what's waiting for an agent:

```bash
oacp inbox my-first-project --agent codex
```

Or inspect the inbox directory directly:

```bash
ls "$OACP_HOME/projects/my-first-project/agents/codex/inbox/"
```
Expand All @@ -136,6 +155,17 @@ body: |
Add POST /login with JWT auth. See docs/api-spec.md for details.
```

To watch for new messages from a standing runtime or Monitor, use `oacp watch`.
A single `oacp watch` run scans once and exits, so keep re-running it when you
want a persistent worker:

```bash
while true; do
oacp watch --project my-first-project --agent codex || true
sleep 120
done
```

## 7. Reply

Send a response back:
Expand All @@ -146,7 +176,7 @@ oacp send my-first-project \
--type notification \
--subject "Re: Implement login endpoint" \
--body "Accepted. Starting implementation on branch codex/login-endpoint." \
--parent-message-id "msg-20260311T120000Z-claude-a1b2"
--in-reply-to "msg-20260311T120000Z-claude-a1b2"
```

## 8. Validate Messages
Expand All @@ -160,13 +190,21 @@ oacp validate \

## 9. Run Health Checks

Verify your environment and workspace are set up correctly:
Verify your environment first:

```bash
oacp doctor
```

Then check the workspace you just created:

```bash
oacp doctor --project my-first-project
```

Plain `oacp doctor` checks global environment health. The `--project` form also
checks the project workspace, inboxes, schemas, and agent status files.

## What's Next?

- **Review loop** — Set up structured code review between agents. See [docs/protocol/review_loop.md](docs/protocol/review_loop.md).
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
[![Claude Code](https://img.shields.io/badge/Runtime-Claude_Code-6B4FBB.svg)](https://claude.ai/code)
[![Codex](https://img.shields.io/badge/Runtime-Codex-74AA9C.svg)](https://openai.com/index/codex/)
[![Cursor](https://img.shields.io/badge/Runtime-Cursor-222222.svg)](https://cursor.com/)
[![PRs Welcome](https://img.shields.io/badge/PRs-Welcome-brightgreen)](https://github.com/kiloloop/oacp/pulls)

> Coordinate agents *without* the chaos.
Expand Down Expand Up @@ -102,6 +103,9 @@ oacp send my-project --from alice --to bob --type task_request \
--subject "Implement feature X" --body "Details here..."
```

By default, `oacp init my-project` creates `claude`, `codex`, and `cursor`
agents. Pass `--agents` to include Gemini or custom agent names.

When running inside a configured agent runtime, `--from` can be omitted — OACP infers the sender from `OACP_AGENT`, `AGENT_NAME`, or the agent card. See [QUICKSTART.md](QUICKSTART.md) for a full walkthrough. Or try the [5-minute quickstart →](examples/quickstart/) to send your first message to a real AI agent.

### What you get
Expand Down Expand Up @@ -223,7 +227,7 @@ uv tool install .
|---------|-------------|
| `oacp init` | Create a project workspace under `$OACP_HOME/projects/` |
| `oacp add-agent` | Add an agent to an existing project workspace |
| `oacp setup` | Generate runtime-specific config files (Claude, Codex, etc.) |
| `oacp setup` | Generate runtime-specific config files (Claude, Codex, Cursor, Gemini) |
| `oacp send` | Send a protocol-compliant inbox message (`--from` auto-inferred) |
| `oacp inbox` | List pending messages across agents (table or `--json`) |
| `oacp watch` | Emit inbox delta events for one agent across selected projects |
Expand Down
30 changes: 21 additions & 9 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
**Version**: 0.2.0
**License**: Apache-2.0

This document is the protocol specification for OACP (Open Agent Coordination Protocol) — a file-based coordination layer for multi-agent engineering workflows. It defines the message formats, state machines, review processes, and safety rules that enable agents on different runtimes (Claude, Codex, Gemini, or any future runtime) to collaborate asynchronously through a shared filesystem.
This document is the protocol specification for OACP (Open Agent Coordination Protocol) — a file-based coordination layer for multi-agent engineering workflows. It defines the message formats, state machines, review processes, and safety rules that enable agents on different runtimes (Claude, Codex, Cursor, Gemini, or any future runtime) to collaborate asynchronously through a shared filesystem.

OACP is not a framework or SDK. It is a set of conventions, YAML schemas, and shell scripts that any agent runtime can implement.

Expand Down Expand Up @@ -47,7 +47,7 @@ $OACP_HOME/
│ │ ├── inbox/
│ │ ├── outbox/
│ │ └── ...
│ └── gemini/
│ └── cursor/
│ └── ...
├── memory/ # Shared durable memory
│ ├── project_facts.md
Expand Down Expand Up @@ -86,6 +86,9 @@ remain authoritative: local autonomy config, message content, safety defaults,
and runtime/tool permissions determine whether a message can be accepted without
interactive human confirmation.

Receiver autonomy is defined by `agents/<receiver>/config.yaml` and the
scope-envelope contract in [`docs/protocol/autonomy.md`](docs/protocol/autonomy.md).

### Message Types

| Type | Purpose | Response Expected |
Expand Down Expand Up @@ -224,6 +227,12 @@ reason_codes:
- risk_threshold_passed
```

Autonomy audit results use a stable terminal-state taxonomy
(`done`, `paused`, `blocked`, `superseded`, `error`) plus
`completion_kind` for detailed outcomes. Post-acceptance scope drift is recorded
through the threshold checkpoint described in
[`docs/protocol/autonomy.md`](docs/protocol/autonomy.md).

### Brainstorm Lifecycle

Brainstorm messages follow a simpler lifecycle: `received` → `researching` → `report_delivered`. No PR, no review loop. The dispatcher sees: `Sent` → `In progress` → `Responded`.
Expand Down Expand Up @@ -422,7 +431,7 @@ Credential scoping: [`docs/protocol/credential_scoping.md`](docs/protocol/creden

### Baseline Rules

These defaults apply to all agents (Claude, Codex, Gemini) unless a project-level config explicitly overrides a specific rule. Safety defaults can only be made **stricter** by project rules, never relaxed.
These defaults apply to all agents (Claude, Codex, Cursor, Gemini) unless a project-level config explicitly overrides a specific rule. Safety defaults can only be made **stricter** by project rules, never relaxed.

Autonomy introduces a separate receiver acceptance policy layer; it does not
relax the safety floor. OACP distinguishes three layers:
Expand All @@ -438,12 +447,14 @@ relax the safety floor. OACP distinguishes three layers:
after acceptance, such as editor edit approval, shell sandboxing, or Codex
approval modes. OACP acceptance never grants runtime tool permissions.

Regardless of autonomy mode, receivers must pause on any of: destructive command
tokens (`rm -rf`, `--force`, `--no-verify`,
`--dangerously-skip-permissions`), external side effects
(push/deploy/merge/publish/rotate/install), or modifications to auth, config,
secrets, dependencies, public repos, pricing/commercial content, or memory SSOT,
unless explicitly authorized by a separate safety-default exception.
Regardless of autonomy mode, receivers must pause on destructive command tokens
(`rm -rf`, `--force`, `--no-verify`, `--dangerously-skip-permissions`) and on
actual requests for external side effects or sensitive scope: push, deploy,
merge, publish, credential rotation, dependency install, auth/config/secrets,
public repos, pricing/commercial content, or memory SSOT. Profileless message
types that are explicitly allowed for auto-review may log incidental
side-effect verb mentions as notes instead of hard stops, but destructive tokens
and real side-effect requests still pause.

#### Git Safety

Expand Down Expand Up @@ -639,6 +650,7 @@ Scripts marked **CLI** are exposed as `oacp` subcommands. Scripts marked **scrip
| `init_org_memory.py` | Scaffold org-level memory directory | CLI: `oacp org-memory` |
| `write_event.py` | Write timestamped events to org-memory | CLI: `oacp write-event` |
| `oacp_doctor.py` | Environment and workspace health check (flutter-doctor-style) | CLI: `oacp doctor` |
| `autonomy_gate.py` | Evaluates receiver autonomy scope-envelope decisions and checkpoint drift | script-only |
| `validate_message.py` | Validates inbox/outbox message YAML | CLI: `oacp validate` |
| `session_lifecycle_hooks.py` | Session init and close hooks (`init_session`, `close_session`) | CLI-wrapped |
| `codex_session_init.py` | Codex startup protocol loader | CLI-wrapped |
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/runtime_capability_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Date**: 2026-04-29

This is a capability comparison across 3 agent runtimes (Claude Code, Codex, Gemini), compiled from each runtime's self-report and current runtime changelogs. Use this as a reference when deciding which agent to assign for a given task.
This is a capability comparison across the currently profiled agent runtimes (Claude Code, Codex, Gemini), compiled from each runtime's self-report and current runtime changelogs. Cursor support is scaffold-only until Cursor-owned onboarding lands, so Cursor is intentionally excluded from this comparison table; see `docs/protocol/runtime_capabilities.md` for its conservative scaffold defaults.

Claude was last checked against Claude Code `v2.1.123`.

Expand Down
8 changes: 7 additions & 1 deletion docs/guides/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- `bash` 3.2+ (macOS default) or 4+ (recommended)
- `python3` 3.9+ (for JSON state management, quality gate scripts, and inbox messaging)
- `gh` CLI (optional, for GitHub operations — `gh auth login`)
- Agent runtime CLI: `claude`, `codex`, or `gemini` (depending on your agents)
- Agent runtime CLI: `claude`, `codex`, `cursor`, or `gemini` (depending on your agents)

## 1) Install OACP

Expand Down Expand Up @@ -38,6 +38,12 @@ pip install -e .
oacp init <project>
```

By default, `oacp init` creates `claude`, `codex`, and `cursor` agents.
Use `--agents` to include Gemini or custom agent names.

Cursor support is scaffold-only until Cursor-owned rules land. Cursor sessions
must set `OACP_RUNTIME=cursor` or pass `--from` explicitly when sending messages.

With artifact symlinks from a repo checkout:

```bash
Expand Down
10 changes: 6 additions & 4 deletions docs/protocol/agent_safety_defaults.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Agent Safety Defaults

Cross-agent baseline safety rules. All agents (Claude, Codex, Gemini) follow these defaults unless a project-level `AGENTS.md` explicitly overrides a specific rule.
Cross-agent baseline safety rules. All agents (Claude, Codex, Cursor, Gemini) follow these defaults unless a project-level `AGENTS.md` explicitly overrides a specific rule.

## Git Safety

Expand Down Expand Up @@ -36,14 +36,16 @@ Receiver autonomy controls only whether a message can move from `received` to
`accepted` without interactive human confirmation. It does not relax this safety
floor.

Regardless of autonomy mode, receivers must pause on any of:
Regardless of autonomy mode, receivers must pause on actual requests for:

- Destructive command tokens: `rm -rf`, `--force`, `--no-verify`, `--dangerously-skip-permissions`
- External side effects: push, deploy, merge, publish, credential rotation, dependency install
- Sensitive scope: auth, config, secrets, dependencies, public repos, pricing/commercial content, memory SSOT

The only exception is an explicit, separate safety-default exception. The
Phase 1 autonomy RFC does not introduce any such exception.
Profileless message types that are explicitly allowed for auto-review may log
incidental side-effect verb mentions as notes instead of hard stops, but
destructive tokens and real side-effect requests still pause. The only exception
is an explicit, separate safety-default exception.

## Scope Discipline

Expand Down
Loading