Skip to main content

Spec-driven agentic DevOps toolkit for AI coding assistants

Project description

PactKit

Spec-driven agentic DevOps toolkit for AI coding assistants.

"Code by Contract" — Agree on specs before writing code. Let agents execute.

PactKit is an enterprise-grade agentic DevOps scaffold that compiles development workflows, role definitions, and behavioral rules into executable "constitutions" and "playbooks" for AI coding assistants.

Why PactKit?

AI coding assistants are powerful but unpredictable without structure. PactKit adds a spec-driven governance layer:

  • Spec is the Law — Specifications are the single source of truth (Spec > Tests > Code)
  • Multi-Agent Ensemble — 9 specialized agents collaborate, each with defined roles
  • Full PDCA Lifecycle — Plan → Act → Check → Done, with quality gates at every stage
  • Safe by Design — TDD-first development, safe regression testing, pre-existing test protection

Quick Start

# Install
pip install pactkit

# Deploy Expert mode (full 13 commands + 9 agents + 3 skills)
pactkit init

# Or deploy lightweight Common mode (4 basic PDCA commands)
pactkit init --mode common

Then in any project with Claude Code:

# Plan — Analyze requirements, create Spec
/project-plan "Add user authentication"

# Act — Implement with strict TDD
/project-act STORY-001

# Check — Security scan + quality audit (P0-P3 severity)
/project-check

# Done — Safe regression gate + conventional commit
/project-done

Or run the full cycle in one command:

/project-sprint "Add user authentication"

PDCA+ Workflow

Phase Command Agent What Happens
Plan /project-plan System Architect Codebase scan → Spec generation → Board entry
Act /project-act Senior Developer Visual scan → TDD loop → Regression check
Check /project-check QA + Security 6-phase deep audit (Security/Quality/Spec alignment)
Done /project-done Repo Maintainer Safe regression gate → Archive → Conventional commit
Trace /project-trace Code Explorer Call graph tracing → Sequence diagram
Draw /project-draw Visual Architect Generate Draw.io XML architecture diagrams
Doctor /project-doctor System Medic Configuration drift detection → Health report
Review /project-review QA Engineer PR review with SOLID/Security/Quality checklists
Sprint /project-sprint Team Lead One-command automated PDCA orchestration
Hotfix /project-hotfix Senior Developer Fast-track fix bypassing PDCA (with traceability)
Release /project-release Repo Maintainer Version bump → Archive → Git tag → Changelog
Design /project-design Product Designer PRD generation → Story decomposition → Board setup

Agent Ensemble

PactKit deploys 9 specialized agents, each with constrained tools and focused responsibilities:

Agent Role Core Capability
System Architect Architecture design Maintain Intent Graph, write Specs
Senior Developer Full-stack development TDD loop, call chain analysis, hotfix
QA Engineer Quality gates Deep check (P0-P3), PR review
Security Auditor Security audit OWASP scanning, threat modeling
Repo Maintainer Repository ops Cleanup, archiving, Git conventions, releases
System Medic System diagnostics Configuration drift repair
Visual Architect Architecture visualization Draw.io XML generation
Code Explorer Code tracing Call graph + sequence diagram
Product Designer Product design PRD, story decomposition, board init

Skills

Three atomic skills are deployed as standalone scripts:

  • pactkit-visualize — Code dependency graph (Mermaid): file-level, class-level, call-level
  • pactkit-board — Sprint board operations: add story, update task, archive
  • pactkit-scaffold — File scaffolding: create spec, test files, git branches, skills

Safe Regression

PactKit's safe regression system prevents agents from blindly modifying pre-existing tests:

  • TDD Loop — Only iterates on tests created in the current story
  • Regression Check — Read-only gate; pre-existing test failure = STOP and report
  • Done Gate — Full regression by default; incremental only when ALL safety conditions are met

Hierarchy of Truth

Tier 1: Specs (docs/specs/*.md)     — The Law
Tier 2: Tests                        — The Verification
Tier 3: Implementation               — The Mutable Reality

When conflicts arise: Spec wins. Always.

Configuration

PactKit deploys to ~/.claude/:

~/.claude/
├── CLAUDE.md                 ← Modular constitution (entry point)
├── rules/                    ← 6 rule modules
├── commands/                 ← 13 command playbooks
├── agents/                   ← 9 agent definitions
└── skills/                   ← 3 skill packages
    ├── pactkit-visualize/
    ├── pactkit-board/
    └── pactkit-scaffold/

MCP Integration

PactKit conditionally integrates with MCP servers when available:

MCP Server Purpose PDCA Phase
Context7 Library documentation lookup Act
shadcn UI component search/install Design
Playwright Browser automation testing Check
Chrome DevTools Performance/console/network Check
Memory Cross-session knowledge graph Plan/Act/Done

All MCP instructions are conditional — gracefully skipped when unavailable.

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT

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-1.0.0.tar.gz (104.7 kB view details)

Uploaded Source

Built Distribution

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

pactkit-1.0.0-py3-none-any.whl (69.2 kB view details)

Uploaded Python 3

File details

Details for the file pactkit-1.0.0.tar.gz.

File metadata

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

File hashes

Hashes for pactkit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c950ad3ca3d02be4fdb2bc256409cb6b425daa4dc20762b0e34782e3d3ac9301
MD5 bda3c226766ac7b1d3f91d23d115243d
BLAKE2b-256 feccc2d1e5d3892e886ca5aa6ee719433e530036f2c8efd90acf733d5f740750

See more details on using hashes here.

File details

Details for the file pactkit-1.0.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pactkit-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c67002901104aa421c0b3cddd85992433b35fe7b619a7560ae8d85b697fc7d71
MD5 d3beb6089cda70956eb2f69c80d1fd55
BLAKE2b-256 f469ce72077c0cf6c2b6018b1a19052af973b86b646f20d2730c87050de4bd08

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