pactify

module
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 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://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
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.
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.
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.
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).
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