pactify

module
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 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, actively developed. Latest release v0.11.0 (2026-08-24) — see docs/CHANGELOG.md. Protocol v1 is frozen (see docs/specs/pact-protocol.md); a bash reference implementation and the pactify Go CLI both drive it today. Site: pactify.dev · Part of the Pact-Base open core.

The hosted relay is not currently running — pactify serve (local mode) is the supported path; the dashboard's hosted mode is offline.

Install

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

curl -fsSL https://pactify.dev/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.

New to Pactify? docs/onboarding.md walks a fresh project from zero to shipped in 5 minutes (register agents → setup → plan → run → ship), with seat definitions and dashboard deployment. Running the dashboard? pactify serve needs --seat <id> for write endpoints (assign / orchestrate / ship); without it they fail closed (read-only still works).

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
acp
Package acp is a Go client for the Agent Client Protocol (ACP) — JSON-RPC 2.0 spoken to a stdio subprocess over newline-delimited JSON.
Package acp is a Go client for the Agent Client Protocol (ACP) — JSON-RPC 2.0 spoken to a stdio subprocess over newline-delimited JSON.
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.
agentcfg
Package agentcfg resolves the effective headless-launch configuration for an agent kind: it overlays per-agent overrides (model, scoped permissions) from the machine agent registry on top of the kind's built-in RunnerProfile.
Package agentcfg resolves the effective headless-launch configuration for an agent kind: it overlays per-agent overrides (model, scoped permissions) from the machine agent registry on top of the kind's built-in RunnerProfile.
agentmanifest
Package agentmanifest loads user-declared custom-agent manifests (~/.pactify/agents/*.toml) and maps them onto the agent registry (add-only).
Package agentmanifest loads user-declared custom-agent manifests (~/.pactify/agents/*.toml) and maps them onto the agent registry (add-only).
audit
Package audit is Pactify's local-first permission audit log: it records every tool call an agent makes (Bash/file/MCP) to a machine-local append-only JSONL store, attributed to the seat/task/project that produced it.
Package audit is Pactify's local-first permission audit log: it records every tool call an agent makes (Bash/file/MCP) to a machine-local append-only JSONL store, attributed to the seat/task/project that produced it.
cloudauth
Package cloudauth is the Go port of the AgentWorks account-layer cryptography specified in docs/specs/agentworks-wire.md (FROZEN v1).
Package cloudauth is the Go port of the AgentWorks account-layer cryptography specified in docs/specs/agentworks-wire.md (FROZEN v1).
cloudclient
Package cloudclient is the pactify (machine-side) HTTP client for the shared AgentWorks relay.
Package cloudclient is the pactify (machine-side) HTTP client for the shared AgentWorks relay.
diffstat
Package diffstat computes added/deleted line counts for a git range via `git diff --numstat`.
Package diffstat computes added/deleted line counts for a git range via `git diff --numstat`.
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.
ledger
Package ledger is the one place that knows where a repo's pact ledger lives and how to read it.
Package ledger is the one place that knows where a repo's pact ledger lives and how to read it.
lockx
Package lockx provides a cross-process advisory file lock (flock(2)).
Package lockx provides a cross-process advisory file lock (flock(2)).
machineid
Package machineid provides this host's stable machine identity for multi-machine orchestration (M1).
Package machineid provides this host's stable machine identity for multi-machine orchestration (M1).
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.
orchestrate
Package orchestrate drives headless agents through the pact protocol: it launches a seat as a worker or reviewer and feeds it a role-specific briefing.
Package orchestrate drives headless agents through the pact protocol: it launches a seat as a worker or reviewer and feeds it a role-specific briefing.
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.
relaysock
Package relaysock is a minimal Socket.IO v4 / Engine.IO v4 client — just the subset pactify serve needs to connect to the relay as a machine, keep the connection alive (ping/pong), authenticate, receive `rpc` events, and emit events back.
Package relaysock is a minimal Socket.IO v4 / Engine.IO v4 client — just the subset pactify serve needs to connect to the relay as a machine, keep the connection alive (ping/pong), authenticate, receive `rpc` events, and emit events back.
remoteexec
Package remoteexec is the pactify serve-side of the U3 reverse control plane: it turns a pact command received over the relay (rpc) into a local pact verb execution, account-scoped.
Package remoteexec is the pactify serve-side of the U3 reverse control plane: it turns a pact command received over the relay (rpc) into a local pact verb execution, account-scoped.
remotemachine
Package remotemachine wires the relay socket (relaysock) to the pact command executor (remoteexec): pactify serve connects to the relay AS a machine, receives pact.* rpc pushed from a remote control plane, and runs them on the local engine.
Package remotemachine wires the relay socket (relaysock) to the pact command executor (remoteexec): pactify serve connects to the relay AS a machine, receives pact.* rpc pushed from a remote control plane, and runs them on the local engine.
roles
Package roles stores role profiles — named (agent kind, model) combinations — and the seat→role bindings that let the orchestrate driver resolve a seat to a concrete (kind, model).
Package roles stores role profiles — named (agent kind, model) combinations — and the seat→role bindings that let the orchestrate driver resolve a seat to a concrete (kind, model).
runguard
Package runguard answers one question from a repo's orchestrate runtime files: is a driver live right now, and what is it driving?
Package runguard answers one question from a repo's orchestrate runtime files: is a driver live right now, and what is it driving?
sarif
Package sarif assembles SARIF 2.1.0 logs from source-agnostic findings.
Package sarif assembles SARIF 2.1.0 logs from source-agnostic findings.
schedule
Package schedule implements scheduled/recurring orchestrate triggers for pactify serve.
Package schedule implements scheduled/recurring orchestrate triggers for pactify serve.
secret
Package secret reads secrets from the macOS Keychain.
Package secret reads secrets from the macOS Keychain.
serve
Package serve is the pactify HTTP/SSE multi-project dashboard backend.
Package serve is the pactify HTTP/SSE multi-project dashboard backend.
stats
Package stats derives per-task and per-agent work statistics from the event log — WITHOUT touching the core projection (it's a read-only derived view).
Package stats derives per-task and per-agent work statistics from the event log — WITHOUT touching the core projection (it's a read-only derived view).
testenv
Package testenv isolates a test binary from pact state that belongs to whoever launched it.
Package testenv isolates a test binary from pact state that belongs to whoever launched it.
tokens
Package tokens persists per-task token tallies captured from agent runs and parses an agent's headless JSON output to extract token usage.
Package tokens persists per-task token tallies captured from agent runs and parses an agent's headless JSON output to extract token usage.
wizard
Package wizard turns a machine's registered agents into a proposed project seat roster — the bridge from "I registered my agents" to "this project can do work" (#1 project setup).
Package wizard turns a machine's registered agents into a proposed project seat roster — the bridge from "I registered my agents" to "this project can do work" (#1 project setup).

Jump to

Keyboard shortcuts

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