Skip to main content

PactKit PDCA workflow framework adapted for OpenAI Codex CLI

Project description

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-codex

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:

Command Phase Purpose
/prompts:project-init Bootstrap Initialize project governance
/prompts:project-design Plan Greenfield product design
/prompts:project-plan Plan Break down requirements into specs
/prompts:project-act Act Implement code per spec (TDD)
/prompts:project-check Check QA verification
/prompts:project-done Done Finalize and document
/prompts:project-release Done Version release
/prompts:project-pr Done Create pull request
/prompts:project-hotfix Act Quick fix bypass
/prompts: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-* /prompts:* Deploy to ~/.codex/prompts/
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

  • PactKit — Original framework for Claude Code
  • Codex CLI — OpenAI's terminal-based AI coding assistant

Project details


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-0.1.2.tar.gz (468.3 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-0.1.2-py3-none-any.whl (159.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pactkit_codex-0.1.2.tar.gz
  • Upload date:
  • Size: 468.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for pactkit_codex-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f73aab18aaa3c76684633887c7e4e54796732c2d4cc118d6510189c994e735bf
MD5 27efb85815ac713e3ebf9842ee9598aa
BLAKE2b-256 2e6907cf06d17581fe748c7df4828859da9f3c0a86c9924b030d047d43dc195d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pactkit_codex-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 159.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for pactkit_codex-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 66fbbb1d07a22ff0a83143d65ba4c1f3e67040600e5ed1087b984a225c5bc988
MD5 e5c96bbd7a1751b1ac141ec3b7267067
BLAKE2b-256 06558c48d3ff32d193b9d19e7d3d8c78d191c6533ebf4c938db1e1a944d7b7d4

See more details on using hashes here.

Supported by

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