Stop vibe coding. Start orchestrating. PACT turns a single Claude Code session into a managed team of specialist AI agents that prepare, design, build, and test your code systematically.
You ask Claude Code to build a feature. It starts coding immediately — no research, no design, no plan. Halfway through, it loses context and starts guessing. You end up with code that sort of works but wasn't thought through.
This is vibe coding: one AI trying to do everything at once, with no structure and no memory.
PACT turns one AI into a coordinated dev team. Instead of a single Claude guessing at everything, 11 specialist agents each handle what they're best at — research, architecture, implementation, testing — through a systematic Prepare, Architect, Code, Test cycle.
| Without PACT | With PACT |
|---|---|
| AI starts coding immediately | Research and planning happen first |
| Context lost mid-task | Each specialist gets a fresh context window |
| One agent guesses at everything | Dedicated researchers, architects, coders, testers |
| No memory between sessions | Persistent memory system across sessions |
| Same mistakes repeated | Lessons learned are captured and reused |
Prerequisite: PACT requires Agent Teams, which is experimental and disabled by default. Add
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"to the"env"section of your~/.claude/settings.jsonbefore installing.
1. Install the plugin
/plugin marketplace add ProfSynapse/PACT-prompt /plugin install PACT@pact-marketplace 2. Set up the orchestrator (detailed options below)
cp ~/.claude/plugins/cache/pact-marketplace/PACT/*/CLAUDE.md ~/.claude/CLAUDE.md3. Restart Claude Code and go
/PACT:orchestrate Build user authentication with JWT See full installation for all options including auto-updates.
Simplified for illustration. Actual output varies by task and project.
You: "I need user authentication with JWT tokens" PACT: [PREPARE] Researching JWT best practices, library options, security patterns... [ARCHITECT] Designing auth flow, token structure, middleware, refresh strategy... [CODE] Backend coder implementing AuthService, JWT middleware, token rotation... [TEST] Test engineer verifying login, refresh, expiration, edge cases... Result: Production-ready auth system — researched, designed, built, and tested. You: /PACT:comPACT backend Fix the null check in validateToken PACT: [Backend Coder] Analyzed the issue, fixed null check, added guard clause, verified build passes. Done. You: /PACT:plan-mode Design a caching strategy for our API PACT: [Preparer] Researching Redis vs Memcached vs in-memory options... [Architect] Designing cache invalidation strategy, TTL policies... [Database] Analyzing query patterns for optimal cache keys... Plan saved to docs/plans/api-caching-plan.md — ready for your approval. Every task flows through four phases, each handled by the right specialist:
┌─────────────────────────────────────────────────────────────┐ │ /PACT:orchestrate │ ├─────────────────────────────────────────────────────────────┤ │ │ │ PREPARE ──► ARCHITECT ──► CODE ──► TEST │ │ │ │ │ │ │ │ ▼ ▼ ▼ ▼ │ │ Research Design Implement Verify │ │ Docs Blueprint Backend Unit tests │ │ APIs Contracts Frontend Integration │ │ Context Schema Database E2E tests │ │ │ └─────────────────────────────────────────────────────────────┘ The orchestrator manages the cycle, delegating each phase to the appropriate specialist. Simple tasks get light process (/PACT:comPACT); complex tasks get the full ceremony (/PACT:orchestrate). PACT scales its rigor to match the complexity of the work.
| Agent | What They Do |
|---|---|
| Preparer | Research, gather requirements, read docs |
| Architect | Design systems, create blueprints, define contracts |
| Backend Coder | Implement server-side logic, APIs, middleware |
| Frontend Coder | Build user interfaces, client-side logic |
| Database Engineer | Design schemas, optimize queries, migrations |
| DevOps Engineer | CI/CD, Docker, infrastructure, build systems |
| n8n Specialist | Build workflow automations |
| Test Engineer | Write and run comprehensive tests |
| Security Engineer | Adversarial security code review |
| QA Engineer | Runtime verification, exploratory testing |
| Secretary | Research assistant, knowledge distiller, context preservation |
| Command | Purpose | When to Use |
|---|---|---|
/PACT:orchestrate | Full multi-agent workflow | New features, complex tasks |
/PACT:comPACT | Single specialist, light process | Quick fixes, focused tasks |
/PACT:plan-mode | Planning consultation (no code) | Before complex implementations |
/PACT:rePACT | Nested PACT cycle for sub-tasks | Complex sub-problems during CODE |
/PACT:imPACT | Triage when blocked | Hit a blocker, need help deciding |
/PACT:peer-review | Commit, PR, multi-agent review | Ready to merge |
/PACT:pin-memory | Pin critical context permanently | Gotchas, key decisions to preserve |
/PACT:wrap-up | End-of-session cleanup | Ending a work session |
/PACT:telegram-setup | Set up Telegram notifications | Interact with sessions from mobile |
Target a specific specialist directly:
/PACT:comPACT backend Fix the authentication bug /PACT:comPACT frontend Add loading spinner to submit button /PACT:comPACT database Add index to users.email column /PACT:comPACT test Add unit tests for payment module /PACT:comPACT architect Should we use microservices here? /PACT:comPACT prepare Research OAuth2 best practicesEleven agents with distinct expertise — from research to security review. Each gets a fresh context window, so no single agent is overloaded.
A local SQLite database with vector embeddings and graph-linked memories. Decisions, lessons, and context persist across sessions — PACT remembers what worked and what didn't.
Tasks are scored on novelty, scope, uncertainty, and risk. Simple tasks get light process; complex tasks get full ceremony with planning, architecture, and multi-agent review.
Specialists persist after their phase, available as consultants for follow-up questions. Reviewers become fixers. No wasted context.
Stay connected to your Claude Code sessions from your phone. Get notifications, answer blocking questions, and send voice replies — all from Telegram. Run /PACT:telegram-setup to enable.
PACT is built on the Viable System Model (VSM), a cybernetics framework for designing organizations that can adapt and survive. Here's why this design works — each layer handles a distinct concern, so the system stays coherent as complexity grows:
- S1 (Operations): Specialist agents doing the actual work — each autonomous within their domain
- S2 (Coordination): Protocols preventing agents from stepping on each other's work
- S3 (Control): The orchestrator managing current execution — tracking progress, clearing blockers
- S4 (Intelligence): Strategic assessment — is the plan still valid? Should we adapt?
- S5 (Policy): Non-negotiable rules — security, quality, ethics — that no operational pressure overrides
| Hook | Trigger | Purpose |
|---|---|---|
session_init.py | Session start | Initialize PACT environment, generate team |
phase_completion.py | Session stop | Remind about decision logs |
validate_handoff.py | Agent handoff | Verify output quality |
track_files.py | File edit/write | Track files for memory graph |
(Selected hooks shown — see hooks/ for full list)
Coordination protocols handle agent communication, phase transitions, scope detection, algedonic signals (emergency escalation), and variety management. See the protocol reference for details.
PACT uses Gordon Pask's Conversation Theory to ensure shared understanding between agents. Teachback protocols verify that downstream agents correctly understood upstream decisions before proceeding.
- Claude Code (the CLI tool):
npm install -g @anthropic-ai/claude-code - Agent Teams enabled (see Enabling Agent Teams below)
- Python 3.9+ (for memory system and hooks)
- macOS or Linux (Windows support coming soon)
Required since PACT v3.0. PACT's specialist agents run as an Agent Team — a coordinated group of Claude Code instances with shared tasks and inter-agent messaging. Agent Teams are experimental in Claude Code and disabled by default.
Add the following to your settings.json (global ~/.claude/settings.json or project-level .claude/settings.json):
{ "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" } }Without this setting, PACT commands like /PACT:orchestrate and /PACT:comPACT will fail to spawn specialist agents.
Note: Agent Teams have known limitations around session resumption, task coordination, and shutdown behavior. See the Claude Code docs for details.
# For memory system with embeddings pip install sqlite-vec # For n8n workflows # Requires n8n-mcp MCP serverQuick version — give Claude this prompt:
Read the PACT setup instructions at https://github.com/ProfSynapse/PACT-prompt/blob/main/README.md and help me install the PACT plugin with auto-updates enabled. Step-by-step version — if you prefer more control, give Claude this instead:
Help me install the PACT plugin for Claude Code: 1. Add the marketplace: /plugin marketplace add ProfSynapse/PACT-prompt 2. Install the plugin: /plugin install PACT@pact-marketplace 3. Enable auto-updates via /plugin → Marketplaces → pact-marketplace → Enable auto-update 4. Set up the orchestrator by appending PACT's CLAUDE.md to my existing ~/.claude/CLAUDE.md (or create it if I don't have one) 5. Tell me to restart Claude Code Step 1: Add the marketplace
/plugin marketplace add ProfSynapse/PACT-promptStep 2: Install the plugin
/plugin install PACT@pact-marketplaceStep 3: Enable auto-updates
- Run
/plugin - Select Marketplaces
- Select pact-marketplace
- Enable Auto-update
Step 4: Set up the Orchestrator
The PACT Orchestrator needs to be in your global CLAUDE.md:
# If you DON'T have an existing ~/.claude/CLAUDE.md: cp ~/.claude/plugins/cache/pact-marketplace/PACT/*/CLAUDE.md ~/.claude/CLAUDE.md # If you DO have an existing ~/.claude/CLAUDE.md, append PACT to it: cat ~/.claude/plugins/cache/pact-marketplace/PACT/*/CLAUDE.md >> ~/.claude/CLAUDE.mdStep 5: Restart Claude Code
exit claudeIf you want to contribute or customize PACT:
git clone https://github.com/ProfSynapse/PACT-prompt.git cd PACT-prompt claudeAfter installing, you must restart Claude Code:
- Type
exitor close the terminal - Run
claudeagain
This loads all agents, hooks, and skills properly.
After restart, test with:
/PACT:orchestrate Hello, confirm PACT is working You should see the PACT Orchestrator respond.
PACT includes 16 skills — 13 domain knowledge modules that load on-demand, plus 3 operational skills (pact-agent-teams, worktree-setup, worktree-cleanup) used internally by the orchestrator.
| Skill | Triggers On |
|---|---|
pact-prepare-research | Research, requirements, API exploration |
pact-architecture-patterns | System design, C4 diagrams, patterns |
pact-coding-standards | Clean code, error handling, conventions |
pact-testing-strategies | Test pyramid, coverage, mocking |
pact-security-patterns | Auth, OWASP, credential handling |
| Skill | Triggers On |
|---|---|
n8n-workflow-patterns | Workflow architecture, webhooks |
n8n-node-configuration | Node setup, field dependencies |
n8n-expression-syntax | Expressions, $json, $node |
n8n-code-javascript | JavaScript in Code nodes |
n8n-code-python | Python in Code nodes |
n8n-validation-expert | Validation errors, debugging |
n8n-mcp-tools-expert | MCP tool usage |
| Skill | Triggers On |
|---|---|
pact-memory | Save/search memories, lessons learned |
PACT includes a persistent memory system for cross-session learning:
# Save context, decisions, lessons learned memory.save({ "context": "Building authentication system", "goal": "Add JWT refresh tokens", "lessons_learned": ["Always hash passwords with bcrypt"], "decisions": [{"decision": "Use Redis", "rationale": "Fast TTL"}], "entities": [{"name": "AuthService", "type": "component"}] }) # Semantic search across all memories memory.search("rate limiting")Features:
- Local SQLite database with vector embeddings
- Graph network linking memories to files
- Semantic search across sessions
- Auto-prompts to save after significant work
Storage: ~/.claude/pact-memory/ (persists across projects)
Stay connected to your Claude Code sessions from Telegram. The bridge runs as an opt-in MCP server and provides four tools:
telegram_notify-- Send one-way notifications (HTML/Markdown)telegram_ask-- Ask a blocking question with inline keyboard buttons; accepts text or voice repliestelegram_check_replies-- Poll for queued replies to notifications (non-blocking)telegram_status-- Health check (connection, uptime, voice availability)
Messages are prefixed with [ProjectName] so you can track multiple sessions. Voice replies are transcribed via OpenAI Whisper (optional).
Setup: Run /PACT:telegram-setup and follow the interactive prompts. See telegram-setup.md for details.
When installed as a plugin, PACT lives in your plugin cache:
~/.claude/ ├── CLAUDE.md # Orchestrator (copy from plugin) ├── plugins/ │ └── cache/ │ └── pact-marketplace/ │ └── PACT/ │ └── 3.12.3/ # Plugin version │ ├── agents/ │ ├── commands/ │ ├── skills/ │ ├── hooks/ │ └── protocols/ ├── protocols/ │ └── pact-plugin/ # Symlink to plugin protocols └── pact-memory/ # Memory database (shared) ├── memory.db └── models/ └── all-MiniLM-L6-v2.gguf your-project/ ├── CLAUDE.md # Project-specific config (optional) └── docs/ ├── plans/ # Implementation plans ├── architecture/ # Design documents ├── decision-logs/ # Implementation decisions └── preparation/ # Research outputs If you cloned this repo for development/contribution:
PACT-prompt/ ├── .claude-plugin/ │ └── marketplace.json # Self-hosted marketplace definition ├── pact-plugin/ # Plugin source (canonical) │ ├── .claude-plugin/ │ │ └── plugin.json # Plugin definition │ ├── agents/ # 11 specialist agents │ ├── commands/ # 9 PACT workflow commands │ ├── skills/ # 16 skills (13 domain + 3 operational) │ ├── hooks/ # Automation hooks │ ├── protocols/ # Coordination protocols │ └── CLAUDE.md # Orchestrator configuration └── docs/ The CLAUDE.md file configures the orchestrator. Key sections:
# MISSION Act as PACT Orchestrator... ## S5 POLICY (Non-Negotiables) - Security: Never expose credentials - Quality: Tests must pass before merge - Ethics: No deceptive content - Delegation: Always delegate to specialists ## PACT AGENT ORCHESTRATION - When to use each command - How to delegate effectively- Add project-specific context to your project's
CLAUDE.md - Create project-local skills in your project's
.claude/skills/(Claude Code feature) - Create global skills in
~/.claude/skills/for use across all projects - Fork the plugin if you need to modify agents or hooks for your domain
PACT v3.0 is a breaking change. The agent execution model migrated from subagents to Agent Teams — a flat team of coordinated Claude Code instances with shared task lists and direct inter-agent messaging.
| Aspect | v2.x (Subagents) | v3.0 (Agent Teams) |
|---|---|---|
| Execution model | Subagents within a single session | Independent Claude Code instances per specialist |
| Communication | Results returned to orchestrator only | Teammates message each other directly |
| Task tracking | Orchestrator-managed | Shared task list with self-coordination |
| Lifecycle | Ephemeral (one task, then gone) | Persistent (remain as consultants after their phase) |
- Enable Agent Teams in your
settings.json(see Enabling Agent Teams) - Update CLAUDE.md: Re-copy the orchestrator config from the plugin — the orchestration instructions changed significantly If you have custom content in
# Back up your existing CLAUDE.md first cp ~/.claude/CLAUDE.md ~/.claude/CLAUDE.md.bak # Then re-copy from the updated plugin cp ~/.claude/plugins/cache/pact-marketplace/PACT/*/CLAUDE.md ~/.claude/CLAUDE.md
~/.claude/CLAUDE.md, manually merge the updated PACT section (between<!-- PACT_START -->and<!-- PACT_END -->markers) instead of overwriting. - Restart Claude Code
- Fork the repository
- Create a feature branch
- Make changes following PACT principles
- Run
/PACT:peer-reviewfor multi-agent code review - Submit PR
MIT License - See LICENSE for details.