Skip to content

Releases: jmcentire/pact

v0.7.2

Choose a tag to compare

@jmcentire jmcentire released this 15 Mar 23:59

Changes

  • Add .kin metadata for Kindex integration
  • Add Constrain artifacts (constraints.yaml, component_map.yaml, trust_policy.yaml, schema_hints.yaml, prompt.md)

v0.7.1

Choose a tag to compare

@jmcentire jmcentire released this 15 Mar 23:37

Changes

  • Wire orphaned generate_emission_compliance_test() into decomposition pipeline — emission tests now auto-generated alongside contract and Goodhart tests
  • Add save_emission_test() and emission_test_path() to ProjectManager
  • Create PACT_KEY_STANDARD.md as canonical format specification for the stack
  • Fix README phase count (was "Eleven phases", now accurate "Nine phases")

1766 tests passing.

v0.7.0 — Stack Evolution

Choose a tag to compare

@jmcentire jmcentire released this 15 Mar 19:32

What's New

Sentinel Extraction

The monitoring subsystem (Sentinel, signals, incidents, remediator, triage) has been extracted to a standalone package. PACT log key generation is retained in Pact for production traceability.

Audit Repo Separation

Two-repo separation-of-privilege model. The coding agent and auditing agent operate in different repositories — the agent being evaluated cannot modify the tests that judge its work.

  • pact audit-init — initialize audit repo
  • pact sync — sync visible tests (never Goodhart) to code repo
  • pact certify — tamper-evident certification with SHA-256 artifact hashes

Contract Schema Evolution

ComponentContract gains two new required sections:

  • data_access: reads/writes classification tiers, rationale, side_effects with field-level detail
  • authority: data domain ownership declarations

Anti-cliche enforcement rejects vague rationale strings. Emission compliance tests are auto-generated from the contract interface (no LLM needed).

Stack Integration

Pact is now the contract-first build system in a larger stack:

  • Constrain (--constrain-dir): seed decomposition with policies, component maps, trust policies
  • Arbiter (phase 8.5): POST access_graph.json for blast radius analysis and trust scoring
  • Ledger (--ledger-dir): load field-level audit assertions into contract test suites
  • Sentinel (pact sentinel status|push-contract|list-keys): accept tightened contracts from production monitoring

Structured Event Emission

All generated implementations accept optional event_handler and log_handler. Every public method emits structured events with PACT keys, classification metadata, and side effects.

New Pipeline Phase: 8.5 Arbiter Gate

After Integrate, before Polish. Generates access_graph.json, registers with Arbiter if configured, handles HUMAN_GATE responses. Skippable with --skip-arbiter.

Breaking Changes

  • Sentinel CLI commands (pact watch, pact report, pact incidents, pact incident) removed — use the standalone Sentinel package
  • Monitoring config fields (monitoring_enabled, monitoring_auto_remediate, monitoring_budget) removed from GlobalConfig
  • Per-project monitoring fields (monitoring_log_files, monitoring_process_patterns, etc.) removed from ProjectConfig
  • Phase order now includes arbiter between integrate and polish

Stats

  • 1,766 tests passing
  • 46 files changed, 1,728 insertions, 4,039 deletions

v0.6.2

Choose a tag to compare

@jmcentire jmcentire released this 09 Mar 22:05

Changes

Interview: acceptance criteria -- The interview phase now asks "what does done look like?" Extracts specific, testable acceptance criteria before decomposition. Criteria flow into decomposition context and north-star validation warns when contracts don't cover them.

Resume state fix -- pact resume no longer loses component task progress. Previously, re-entering the decompose phase overwrote all component_tasks with fresh empty objects. Now preserves existing completed/failed status. State also flushes to disk immediately after task setup, surviving crashes and validation failures.

v0.6.1 — MCP Server

Choose a tag to compare

@jmcentire jmcentire released this 09 Mar 20:21

What's new

Complete MCP server for Claude Code and other MCP clients.

  • 7 tools: pact_status, pact_contracts, pact_contract, pact_budget, pact_retrospective, pact_validate, pact_resume
  • 5 resources: pact://status, pact://contracts, pact://contract/{id}, pact://budget, pact://retrospective
  • Stdio transport via FastMCP
  • Auto-detects project from PACT_PROJECT_DIR env var or walks up from CWD

Install

pip install pact-agents[mcp]

Run

pact-mcp                              # standalone entry point
pact mcp-server --project-dir ./proj   # via CLI

Claude Code config

{
  "mcpServers": {
    "pact": {
      "command": "pact-mcp",
      "env": { "PACT_PROJECT_DIR": "/path/to/project" }
    }
  }
}

v0.5.1: Smoke Test Generation

Choose a tag to compare

@jmcentire jmcentire released this 06 Mar 03:40

What's New

Mechanical Smoke Tests (pact adopt)

pact adopt now generates smoke tests from AST-extracted function signatures — no LLM required, zero cost. Each public module-level function gets:

  • An import verification test (module loads without error)
  • A callable check test (function exists and is callable at module level)

Filters out class methods, private functions (_-prefixed), and nested closures (detected via source line indentation).

Output: tests/smoke/ — conventional location, committable, runnable with standard pytest.

Self-Adoption Results

Codebase Components Functions Smoke Tests
Pact 57 682 248 (57 files)
Baton 35 401 103 (35 files)

Test Suite

1,886 total tests (1,638 hand-written + 248 smoke) — all passing.

Full Changelog

  • generate_smoke_tests() in adopt.py — mechanical test generation
  • _is_module_level() — source line indentation check for nested function filtering
  • Smoke test output moved from .pact/test-gen/smoke/ to tests/smoke/
  • 8 new adopt unit tests covering smoke generation
  • Updated docs, README, and landing page

v0.5.0: Goodhart Tests — Hidden Acceptance Criteria

Choose a tag to compare

@jmcentire jmcentire released this 04 Mar 22:55

What's New

Goodhart Tests — hidden adversarial acceptance criteria that implementation agents never see. Counters Goodhart's Law: when agents can see all tests, they optimize for those specific inputs rather than truly satisfying the contract.

Features

  • Goodhart test author: Single-LLM-call adversarial test generation during the Test phase. Probes for hardcoded returns, boundary-adjacent inputs, invariant generalization, and postcondition universality.
  • Isolated storage: Hidden tests live in .pact/contracts/<cid>/goodhart/, completely isolated from visible test loading and handoff briefs.
  • Polish-phase evaluation: After all visible tests pass, Goodhart tests run as a final acceptance gate.
  • Graduated-disclosure remediation: Failing components get behavioral hints (never actual test code):
    • Level 1: Vague behavioral hint from test description
    • Level 2: Specific contract invariant/postcondition
    • Max 2 attempts (configurable via max_goodhart_attempts)
  • Wizard: New pact wizard command for guided project setup
  • Lifecycle improvements: Polish phase integration, integrator enhancements

Cost Impact

~$0.07/component for Goodhart test generation (1 LLM call, no research/plan). For a 5-component project: ~$0.35 total overhead.

Stats

  • 1,573 tests, all passing
  • 23 files changed, +2,131 lines

Full changelog: v0.4.0...v0.5.0

v0.4.0: Reliability & Performance

Choose a tag to compare

@jmcentire jmcentire released this 04 Mar 03:01

What's New

Reliability (R2)

  • Contract quality gates: audit_contract_specificity() now runs during contract authoring and validation, flagging vague language patterns
  • Structured side effects: Contracts declare structured_side_effects (reads_file, writes_file, network_call, etc.) — wired into prompts and test rendering
  • Performance budgets: Functions can declare performance_budget (p95 latency, max memory, Big-O complexity) — wired into prompts and test rendering
  • Answer provenance: AuditedAnswer tracks source, confidence, and timestamp for every interview answer
  • Dependency normalization: Case-insensitive + underscore-transposition matching in the main validation gate
  • MCP resume tool: pact_resume added to MCP server for resuming failed/paused runs

Performance (R3)

  • Optimized handoff briefs: include_test_code=False in implementer — agents read test files directly from disk
  • Fixed Opus 4.6 pricing: Corrected from $15/$75 to $5/$25 per million tokens

New Features

  • pact pricing: View current model pricing table, --export to override at ~/.config/pact/model_pricing.json
  • Dynamic pricing: External pricing file loaded at config init, overridable per-project
  • BudgetTracker.summary(): Structured dict with all budget metrics including cache stats

Documentation

  • README: updated pricing, test count (1501), added 6 missing CLI commands
  • Landing page: updated test count

Stats

  • 20 files changed, +491/-35 lines
  • 1501 tests passing

v0.3.1: Documentation & Landing Page Updates

Choose a tag to compare

@jmcentire jmcentire released this 28 Feb 17:33

What's Changed

Landing Page

  • Added feature cards for wavefront scheduling, prompt caching, drift detection, retrospective learning, contract quality gates, and resume/error classification
  • Updated test count from 1,260 to 1,482 across all copy

Documentation

  • Updated CLAUDE.md test count (1,260 -> 1,482) and fixed working directory path
  • Updated README.md test count (1,458 -> 1,482)

Stats

  • 1,482 tests passing
  • 22,488 lines of production code
  • 18,816 lines of test code

Install

pip install pact-agents

v0.3.0: Health Monitoring, Test Generation, Codebase Adoption

Choose a tag to compare

@jmcentire jmcentire released this 26 Feb 11:33

What's New

Health Monitoring (Dysmemic Pressure Detection)

  • Pipeline monitors its own coordination health across phases
  • Tracks output-to-planning token ratio, cascade failures, budget velocity
  • Automated remedies for informational findings; user-controlled remedies via FIFO for structural changes
  • pact health <project> CLI command with detailed metrics, per-phase token table, and remedy suggestions
  • Configurable thresholds via health_thresholds in pact.yaml
  • skip_cascaded is proposed (not auto-applied) — respects C5 Brittleness Trap

Test Generation

  • pact test-gen <dir> — generate tests and security audit for any codebase
  • Static analysis identifies untested functions, complexity hotspots, and security-sensitive patterns

Codebase Adoption

  • pact adopt <dir> — bring existing codebases under pact governance
  • Analyzes structure, generates contracts and decomposition tree

Spec-Compliance Audit

  • pact audit <project> — verify every requirement in task.md is covered
  • Gap report showing covered, partial, and missing requirements

Other

  • Python, TypeScript, and JavaScript support
  • 1482 tests passing
  • Multi-provider support (Anthropic, OpenAI, Gemini)

Install

pip install pact-agents