PactKit

What is PactKit?

PactKit is a governance framework that enforces the P.A.C.T. contract between humans and AI agents. It compiles development workflows, role definitions, and behavioral rules into executable constitutions and playbooks for Claude Code, OpenCode, Codex CLI, and more.

Name origin: Pact (契约) + Kit — the governance contract.

The core idea: CODE is the Law. Data is the Truth. Prompt is ONLY instruction. AI is ONLY creativity.

PrincipleBoundary
P — Promptis ONLY instructionTells AI how to act — defines process, never state
A — AIis ONLY creativityFormatting, summarization, language — never deterministic logic
C — Codeis the LawSole executor of deterministic operations — no bypass
T — TruthData is the TruthFactual basis for all judgment — no memory, no fabrication

At a Glance

30 CLI SubcommandsDeterministic operations as code, not prompts
9 AgentsSpecialized roles with constrained tools
12 CommandsCore-managed lifecycle entry points
19 SkillsSpecialized tools, portable methods, and command facades
8 RulesModular constitution modules (2 core + 6 on-demand)

Supported AI Tools

Claude Code support ships in the core package; OpenCode and Codex CLI are opt-in extras. A single pactkit init deploys to every IDE whose adapter is installed.

ToolFormatCommandNotes
Claude CodeClassicpactkit initIncluded by default
OpenCodeOpenCodepactkit initpip install "pactkit[opencode]"
Codex CLICodexpactkit initpip install "pactkit[codex]"
GitHub CopilotCopilotpactkit init --format copilotSeparate package, project-level
Trae—Coming soon—

Use --format <name> to target a single IDE (e.g., pactkit init --format opencode).

GitHub Copilot is different: it deploys to the project's .github/ directory (not a user-level ~/ path), so each project needs its own pactkit init --format copilot. See GitHub Copilot for details.

Quick Start

pip install "pactkit[all]"
pactkit init

Requires Python 3.10+. Deploys to Claude Code (~/.claude/), OpenCode (~/.config/opencode/), and Codex CLI (~/.codex/) in one step.

[all] pulls the OpenCode and Codex adapters plus the lint/visualize extras. Installing plain pactkit deploys Claude Code only. See Installation for external tools (gh, codegraph).

pip install "pactkit[opencode]"   # or [codex]

# Deploy to one IDE only:
pactkit init --format classic   # Claude Code only
pactkit init --format opencode  # OpenCode only
pactkit init --format codex     # Codex CLI only

Requires Python 3.10+. The --format flag targets a single IDE.

pip install pactkit pactkit-copilot
cd your-project
pactkit init --format copilot

Requires separate pactkit-copilot package. Deploys to project .github/ — must run per project. Then use /project-init in your IDE. See GitHub Copilot.

Trae integration is under development. Stay tuned.

Then start using commands:

/project-plan "Add user authentication"
/project-act STORY-001
/project-check
/project-done

Next Steps

On this page