Skip to main content

pactkit-codex

PactKit PDCA workflow framework adapted for OpenAI Codex CLI.

PyPI version Python 3.10+ License: MIT

What is this?

pactkit-codex brings the PactKit spec-driven development workflow to OpenAI's Codex CLI. It deploys:

  • AGENTS.md — Global constitution with agent roles and PDCA routing
  • Command prompts — 10 PDCA workflow commands (/project-plan, /project-act, etc.)
  • Skills — Standalone Python scripts (visualize, board, scaffold)
  • Rules — Modular governance rules loaded on-demand per command

Installation

pip install pactkit

pactkit-codex is automatically installed as a dependency of pactkit.

Quick Start

# Deploy PactKit configuration to ~/.codex/
pactkit-codex init

# Update when pactkit-codex is upgraded
pactkit-codex update

# Check version
pactkit-codex version

What Gets Deployed

After running pactkit-codex init:

~/.codex/
├── AGENTS.md              # Global constitution (~6KB)
├── config.toml            # Model, sandbox, MCP config
├── .pactkit-version       # Version marker for updates
├── rules/                 # 9 rule files (on-demand loading)
│   ├── 01-core-protocol.md
│   ├── 02-hierarchy-of-truth.md
│   └── ...
├── prompts/               # 10 PDCA command prompts
│   ├── project-plan.md
│   ├── project-act.md
│   └── ...
└── skills/                # 10 skill directories
    ├── pactkit-visualize/
    ├── pactkit-board/
    └── ...

./                         # Project root
├── AGENTS.md              # Project instructions (PactKit-managed)
└── .codex/
    ├── pactkit.yaml       # Project config
    └── AGENTS.local.md    # Your custom instructions (never overwritten)

Commands

Initialization

pactkit-codex init                    # Full deployment
pactkit-codex init -t /tmp/preview    # Deploy to custom directory

Update

pactkit-codex update                  # Incremental update (if version changed)
pactkit-codex update --if-needed      # Silent no-op if current (for hooks)
pactkit-codex update --force          # Force redeploy even if current
pactkit-codex update --dry-run        # Show what would change

Utilities

pactkit-codex version                 # Show version
pactkit-codex spec-lint <file>        # Validate spec structure
pactkit-codex doctor                  # Check project health
pactkit-codex visualize --lazy        # Generate code dependency graphs

PDCA Workflow Commands

Once deployed, use these commands in Codex CLI (prefix $):

Command Phase Purpose
$project-init Bootstrap Initialize project governance
$project-design Plan Greenfield product design
$project-plan Plan Break down requirements into specs
$project-act Act Implement code per spec (TDD)
$project-check Check QA verification
$project-done Done Finalize and document
$project-release Done Version release
$project-pr Done Create pull request
$project-hotfix Act Quick fix bypass
$project-clarify Plan Clarify requirements

Project Structure

Your project should have:

your-project/
├── AGENTS.md                    # PactKit-managed (auto-generated)
├── .codex/
│   ├── pactkit.yaml             # Project config
│   └── AGENTS.local.md          # Your custom instructions
├── docs/
│   ├── specs/                   # Requirement specifications
│   │   ├── STORY-001.md
│   │   └── ...
│   └── product/
│       ├── sprint_board.md      # Current sprint tasks
│       └── context.md           # Project context (auto-generated)
└── tests/
    ├── unit/
    └── e2e/

Codex CLI vs Claude Code

This project adapts PactKit for Codex CLI, which has different capabilities:

Feature Claude Code Codex CLI pactkit-codex Solution
Multi-agent Native Single agent Prompt-level role conventions
Custom commands /project-* $project-* Deploy to ~/.codex/skills/project-*/SKILL.md
Rule loading @import None Agentic routing (Prerequisites header)
Config settings.json config.toml Generate with defaults

Configuration

pactkit.yaml

stack: python          # Detected automatically
version: 0.0.1         # Your project version
root: .
developer: ""          # Optional: your name prefix for Story IDs

Custom Instructions

Add your project-specific instructions to .codex/AGENTS.local.md:

# Project Local Instructions

## Build Commands
- Run tests: `pytest tests/ -v`
- Lint: `ruff check src/`

## Project Conventions
- Use snake_case for Python
- All APIs must have OpenAPI docs

This file is never overwritten by pactkit-codex updates.

Development

# Clone
git clone https://github.com/anthropics/pactkit-codex.git
cd pactkit-codex

# Install dev dependencies
pip install -e ".[multilang]"

# Run tests
pytest tests/ -v

# Lint
ruff check src/ tests/

License

MIT License - see LICENSE for details.

Related Projects

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pactkit_codex-2.20.0.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pactkit_codex-2.20.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file pactkit_codex-2.20.0.tar.gz.

File metadata

  • Download URL: pactkit_codex-2.20.0.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pactkit_codex-2.20.0.tar.gz
Algorithm Hash digest
SHA256 045376118cc29e439c1230fdece2a70aada37d2bc54b5335bb9a8d80450f858f
MD5 4e57701c10b7e6afad521af4302fa2c0
BLAKE2b-256 385f741ae24ab81e6fcec4a34710401c4d9cfab2aff9e4ea99cb4e20c146f109

See more details on using hashes here.

Provenance

The following attestation bundles were made for pactkit_codex-2.20.0.tar.gz:

Publisher: publish.yml on pactkit/pactkit-codex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pactkit_codex-2.20.0-py3-none-any.whl.

File metadata

  • Download URL: pactkit_codex-2.20.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pactkit_codex-2.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 045d1a0da50148d577b44d153200daf407b4d198f10586f0a5cc46b61b01cc1f
MD5 afca48e63941d26601247d35897d0e5e
BLAKE2b-256 7b65887d4af48fdf46e2fb8bf9a98af588e36cc164e2baade5453f2afaed9e7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pactkit_codex-2.20.0-py3-none-any.whl:

Publisher: publish.yml on pactkit/pactkit-codex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.20.0 This release

2 files

2.17.0

2 files

2.11.0

2 files

2.10.2

2 files

2.9.12

2 files

2.9.1

2 files

2.9.0

2 files

2.8.0

2 files

2.7.0

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page