PactKit

This page covers the pip install deployment. If you installed via the Claude Code Plugin, all components are deployed automatically and pactkit.yaml is not used.

pactkit.yaml

The pactkit.yaml file controls which components are deployed and how they behave.

Location: PactKit auto-detects the config file based on your environment:

EnvironmentConfig Path
Claude Code.claude/pactkit.yaml
OpenCode.opencode/pactkit.yaml

Both paths are checked automatically — no manual configuration needed.

Reference

FieldTypeDefaultDescription
stackstringauto-detectedProject stack (python, node, go, java)
versionstringcurrentPactKit version that generated the config
developerstring""Developer prefix for Story IDs
agentslistall 9Agent definitions to deploy
commandslistall 11Command playbooks to deploy
skillslistall 10Skills to deploy
ruleslistall 8Constitution rule modules to deploy
ciobjectprovider: noneCI/CD pipeline generation (github, gitlab, none)
issue_trackerobjectprovider: noneExternal issue tracker (github, none)
hooksobjectdisabledOpt-in hook templates
lint_blockingboolfalseWhether lint failures block commits
auto_fixboolfalseWhether to auto-fix lint errors
e2eobjecttype: noneE2E testing strategy configuration
venvobjectauto_detect: trueVirtual environment detection
releaseobjectgithub_release: trueRelease automation behavior
regressionobjectstrategy: impactImpact-based test selection
checkobjectsee belowQA verification behavior
doneobjectsee belowCommit and lesson quality behavior
agent_modelsobject{}Per-agent model overrides
command_modelsobjectdefaultsPer-command model overrides (OpenCode)

All conditional features (CI/CD, issue tracking, hooks, lint blocking) are disabled by default and only activate when explicitly configured.

Multi-Developer Collaboration

Set developer to avoid Story ID conflicts across team members:

developer: alice

Story IDs become STORY-alice-001, STORY-alice-002, etc. Each developer has their own ID namespace.

Model Routing

Configure which model each agent or command uses:

agent_models:
  code-explorer: haiku     # Fast exploration
  system-architect: opus   # Deep analysis
  senior-developer: sonnet # Implementation

command_models:
  project-act: sonnet
  project-done: sonnet

Model shortnames (sonnet, opus, haiku) are automatically resolved to the correct provider format.

E2E Testing

Configure End-to-End testing strategy in /project-check Phase 4:

e2e:
  type: none        # none | cli | frontend | backend | fullstack
  blocking: false   # Whether E2E failures block /project-done
  test_dir: tests/e2e
  env_file: .env.test
  # api_spec: docs/api/openapi.yaml  # OpenAPI spec path for frontend/backend
  compose_file: docker-compose.test.yml  # Docker Compose for fullstack

E2E Types

TypeDescriptionTools
noneSkip E2E (default)
cliCLI tool testing via subprocesspytest + subprocess
frontendBrowser testing with API mocksPlaywright + MSW
backendAPI testing with test databasepytest + httpx
fullstackFull stack with docker-composedocker-compose + Playwright

Configuration Fields

FieldTypeDefaultDescription
e2e.typestringnoneE2E strategy to use
e2e.blockingboolfalseIf true, E2E failures block /project-done
e2e.test_dirstringtests/e2eDirectory for E2E test files
e2e.env_filestring.env.testTest credentials file (API tokens, DB strings)
e2e.api_specstring""OpenAPI/Swagger spec path (for frontend/backend types)
e2e.compose_filestringdocker-compose.test.ymlDocker Compose file (for fullstack type)

E2E is opt-in — set type: none (default) to skip. When enabled, tests are generated in /project-check Phase 4 based on the Story's Acceptance Criteria.

Example: CLI Project

For a CLI tool like PactKit itself:

e2e:
  type: cli
  test_dir: tests/e2e/cli

Tests run via pytest using subprocess to invoke CLI commands.

Example: Web Application

For a full-stack web app:

e2e:
  type: fullstack
  blocking: true
  env_file: .env.test

Spins up the stack via docker-compose, runs Playwright tests against real services.

Language Profiles

PactKit auto-detects the project stack and configures the appropriate tools:

StackTest RunnerLint Command
pythonpytest tests/ruff check src/ tests/
nodenpx jestnpx eslint .
gogo test ./...golangci-lint run
javamvn testmvn checkstyle:check

Updating

pactkit update                        # Re-deploy all IDEs
pactkit upgrade --format opencode     # Re-deploy single IDE (optional)

Safe to re-run at any time. Re-deploys all managed files while preserving your custom configuration.

Preview

Preview the deployment without modifying production directories:

pactkit init -t /tmp/preview                        # Preview all IDEs
pactkit init --format opencode -t /tmp/oc-preview   # Preview single IDE

On this page