pactify

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2026 License: MIT

README

Pactify

A portable, vendor-neutral protocol for multiple AI agents to collaborate in one git repo.

Any agent that can read files and run git — Claude, opencode, Gemini, Cursor, … — can play a role (orchestrator, worker, reviewer) and coordinate through plain files in .pact/. No SDK, no server, no external dependency. The repo is the single source of truth.

Status: early. Protocol v1 is frozen (see docs/specs/pact-protocol.md). A bash reference implementation and the pactify Go CLI both drive the protocol today. Site: pactify.dev · Part of the Pact-Base open core (see ROADMAP).

Install

curl | sh (macOS / Linux, amd64 / arm64):

curl -fsSL https://raw.githubusercontent.com/agentjoey/pactify/main/install.sh | sh

go install:

go install github.com/agentjoey/pactify/cmd/pactify@latest

Then get started:

pactify setup    # guided setup in your repo

Verify your install anytime with pactify doctor.

Quickstart

In your repo, run:

pactify setup

setup scaffolds .pact/, wires your agent (opencode / Claude / Gemini / Codex), and sets your seat. Then launch your agent — it joins via the pact MCP tools. Run pactify doctor anytime to verify install + wiring.

Claude Code (one-click)

Inside Claude Code:

/plugin marketplace add agentjoey/pactify
/plugin install pact@pactify

This adds the pact skill and MCP server. If the pactify binary isn't installed yet, the plugin reminds you on session start — run the curl|sh installer above, then pactify setup.

The idea in 30 seconds

  • .pact/log.jsonl is an append-only event log — the authoritative source of truth and the communication bus between agents.
  • .pact/STATE.yml is a regenerable projection of the log (for reading; the log is authoritative).
  • Two rules (the pact): a worker cannot self-accept its own work (only the assigned reviewer can, and only after a checkpoint); a feature cannot merge until all its tasks are accepted.
  • Seats: each agent is a self-declared, stable seat (orchestrator / worker / reviewer), enforcing separation of duties by name.
  • Pull-based: a worker boots from its entry file (AGENTS.md / CLAUDE.md), reads the log, and knows what to do — the human is a start button, not a context courier.

Try the reference implementation

source .pact/bin/pact.sh
pact_help          # the verb reference + the two rules

The verbs (pact_<verb> in bash today, pactify <verb> in the Go CLI) are one contract: init · join · assign · checkpoint · accept · changes · merge · status · log · validate.

Docs

License

MIT © 2026 Joey (agentjoey).

Directories

Path Synopsis
cmd
pactify command
internal
agent
Package agent wires the pact MCP server into each supported agent (CLI and desktop-app surfaces) and renders their onboarding blocks.
Package agent wires the pact MCP server into each supported agent (CLI and desktop-app surfaces) and renders their onboarding blocks.
doctor
Package doctor runs adoption health checks reused by `pactify doctor` and `pactify setup`.
Package doctor runs adoption health checks reused by `pactify doctor` and `pactify setup`.
event
Package event defines the pact log event envelope and the append-only log.
Package event defines the pact log event envelope and the append-only log.
gitx
Package gitx wraps the git CLI for the side-effects pact verbs perform.
Package gitx wraps the git CLI for the side-effects pact verbs perform.
mcp
Package mcp exposes the pact protocol over the Model Context Protocol: every verb as a tool, STATE/log as resources, log changes as notifications.
Package mcp exposes the pact protocol over the Model Context Protocol: every verb as a tool, STATE/log as resources, log changes as notifications.
paths
Package paths resolves the .pact/ locations and protocol constants.
Package paths resolves the .pact/ locations and protocol constants.
projection
Package projection folds the event log into a read-model State and renders it.
Package projection folds the event log into a read-model State and renders it.
registry
Package registry persists the set of .pact/ projects pactify serve watches.
Package registry persists the set of .pact/ projects pactify serve watches.
serve
Package serve is the pactify HTTP/SSE multi-project dashboard backend.
Package serve is the pactify HTTP/SSE multi-project dashboard backend.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL