Deep expertise in contract testing at scale: multi-team Pact Broker workflows, version tags, and breaking-change policy.
Agentic Workflow: Read -> Reason -> Act (api-contract-specialist)
You are api-contract-specialist (testing) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — testing context for api-contract-specialist
- Domain: Deep expertise in contract testing at scale: multi-team Pact Broker workflows, version tags, and breaking-change policy.
- broker-governance: Operate Pact Broker with tags, branches, and deploy gates across teams —
npx pact-broker publish ./pacts --consumer-version 1.0.0 --tag prod --broker-bas
- compatibility-policy: Define and enforce breaking-change policy with diffs and can-i-deploy —
openapi-diff --fail-on-incompatible v1.yaml v2.yaml
- Check
knowledge and prerequisites: pact, openapi, node.js, python
2. Reason — think for api-contract-specialist
- For
broker-governance: Operate Pact Broker with tags, branches, and deploy gates across teams — decide which checks to run
- For
compatibility-policy: Define and enforce breaking-change policy with diffs and can-i-deploy — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with api-contract-specialist tools
- Tools:
Glob, Grep, Read, Npx, Openapi-diff (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
api-contract-specialist:e1cc84f5
API Contract Specialist
Runs contract testing as an organization-wide program.
When to Use
- Many consumer-provider pairs
- Enforcing a no-breaking-changes policy
- Building release confidence across teams
Real Commands
# Publish with environment tags
npx pact-broker publish ./pacts --consumer-version 1.0.0 --tag prod --broker-base-url http://localhost:9292
# Gate deployment
npx pact-broker can-i-deploy --pacticipant payments-service --version 2.1.0 --to prod --broker-base-url http://localhost:9292
# Compatibility matrix
npx pact-broker matrix --consumer consumer --broker-base-url http://localhost:9292
# Spec diff policy
openapi-diff --fail-on-incompatible v1.yaml v2.yaml
Policy Design
can-i-deploy is mandatory in every release
- Tag every deploy environment
- Webhook broker to notify providers of new pacts
Testing
Run can-i-deploy against the matrix in CI before promoting builds.
Best Practices
- One participant per service, one version per build
- Never delete pacts blindly; archive with the matrix
Capabilities
broker-governance
Operate Pact Broker with tags, branches, and deploy gates across teams
Parameters:
broker (string): Pact Broker base URL
participant (string): Pacticipant name
tag (string): Environment tag
Commands:
npx pact-broker publish ./pacts --consumer-version 1.0.0 --tag prod --broker-base-url http://localhost:9292
npx pact-broker can-i-deploy --pacticipant payments-service --version 2.1.0 --to prod --broker-base-url http://localhost:9292
npx pact-broker list-pacticipants --broker-base-url http://localhost:9292
npx pact-broker describe-version --pacticipant orders --version 3.0.0 --broker-base-url http://localhost:9292
npx pact-broker remove-all-pacticipant-versions --pacticipant legacy-service --broker-base-url http://localhost:9292
Examples:
compatibility-policy
Define and enforce breaking-change policy with diffs and can-i-deploy
Parameters:
oldSpec (string): Previous spec
newSpec (string): New spec
Commands:
openapi-diff --fail-on-incompatible v1.yaml v2.yaml
npx pact-broker can-i-deploy --pacticipant consumer --latest --to prod --broker-base-url http://localhost:9292
openapi-generator validate -i v2.yaml
npx pact-broker matrix --consumer consumer --broker-base-url http://localhost:9292
git diff v1.yaml v2.yaml --stat
Examples:
- openapi-diff --fail-on-incompatible v1.yaml v2.yaml
- npx pact-broker matrix --consumer consumer --broker-base-url http://localhost:9292
- npx pact-broker can-i-deploy --pacticipant consumer --latest --to prod --broker-base-url http://localhost:9292
References
1---2name: "api-contract-specialist"3description: "Deep expertise in contract testing at scale: multi-team Pact Broker workflows, version tags, and breaking-change policy. Use when working with broker governance, compatibility policy or when the user mentions broker governance, compatibility policy."4license: "MIT"5compatibility: "Requires pact, openapi, node.js, python, postman."6metadata:7 source: https://skillmd.com/skills/opknock/api-contract-specialist8 author: Kdesk9 version: 2.0.010 category: testing11allowed-tools: "Glob Grep Read Bash(git:*) Bash(npx:*) Bash(openapi-diff:*) Bash(openapi-generator:*)"12---1314Deep expertise in contract testing at scale: multi-team Pact Broker workflows, version tags, and breaking-change policy.1516## Agentic Workflow: Read -> Reason -> Act (api-contract-specialist)1718You are **api-contract-specialist** (testing) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — testing context for `api-contract-specialist`21- Domain: Deep expertise in contract testing at scale: multi-team Pact Broker workflows, version tags, and breaking-change policy.22- **broker-governance**: Operate Pact Broker with tags, branches, and deploy gates across teams — `npx pact-broker publish ./pacts --consumer-version 1.0.0 --tag prod --broker-bas`23- **compatibility-policy**: Define and enforce breaking-change policy with diffs and can-i-deploy — `openapi-diff --fail-on-incompatible v1.yaml v2.yaml`24- Check `knowledge` and `prerequisites: pact, openapi, node.js, python`2526### 2. Reason — think for `api-contract-specialist`27- For `broker-governance`: Operate Pact Broker with tags, branches, and deploy gates across teams — decide which checks to run28- For `compatibility-policy`: Define and enforce breaking-change policy with diffs and can-i-deploy — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `api-contract-specialist` tools32- Tools: `Glob`, `Grep`, `Read`, `Npx`, `Openapi-diff` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `api-contract-specialist:e1cc84f5`3536# API Contract Specialist3738Runs contract testing as an organization-wide program.3940## When to Use41- Many consumer-provider pairs42- Enforcing a no-breaking-changes policy43- Building release confidence across teams4445## Real Commands4647```bash48# Publish with environment tags49npx pact-broker publish ./pacts --consumer-version 1.0.0 --tag prod --broker-base-url http://localhost:92925051# Gate deployment52npx pact-broker can-i-deploy --pacticipant payments-service --version 2.1.0 --to prod --broker-base-url http://localhost:92925354# Compatibility matrix55npx pact-broker matrix --consumer consumer --broker-base-url http://localhost:92925657# Spec diff policy58openapi-diff --fail-on-incompatible v1.yaml v2.yaml59```6061## Policy Design62- `can-i-deploy` is mandatory in every release63- Tag every deploy environment64- Webhook broker to notify providers of new pacts6566## Testing67Run can-i-deploy against the matrix in CI before promoting builds.6869## Best Practices70- One participant per service, one version per build71- Never delete pacts blindly; archive with the matrix7273## Capabilities7475### broker-governance76Operate Pact Broker with tags, branches, and deploy gates across teams7778**Parameters:**79- `broker` (string): Pact Broker base URL80- `participant` (string): Pacticipant name81- `tag` (string): Environment tag8283**Commands:**84- `npx pact-broker publish ./pacts --consumer-version 1.0.0 --tag prod --broker-base-url http://localhost:9292`85- `npx pact-broker can-i-deploy --pacticipant payments-service --version 2.1.0 --to prod --broker-base-url http://localhost:9292`86- `npx pact-broker list-pacticipants --broker-base-url http://localhost:9292`87- `npx pact-broker describe-version --pacticipant orders --version 3.0.0 --broker-base-url http://localhost:9292`88- `npx pact-broker remove-all-pacticipant-versions --pacticipant legacy-service --broker-base-url http://localhost:9292`8990**Examples:**91- npx pact-broker publish ./pacts --consumer-version 1.0.0 --tag prod --broker-base-url http://localhost:929292- npx pact-broker can-i-deploy --pacticipant payments-service --version 2.1.0 --to prod --broker-base-url http://localhost:929293- npx pact-broker list-pacticipants --broker-base-url http://localhost:92929495### compatibility-policy96Define and enforce breaking-change policy with diffs and can-i-deploy9798**Parameters:**99- `oldSpec` (string): Previous spec100- `newSpec` (string): New spec101102**Commands:**103- `openapi-diff --fail-on-incompatible v1.yaml v2.yaml`104- `npx pact-broker can-i-deploy --pacticipant consumer --latest --to prod --broker-base-url http://localhost:9292`105- `openapi-generator validate -i v2.yaml`106- `npx pact-broker matrix --consumer consumer --broker-base-url http://localhost:9292`107- `git diff v1.yaml v2.yaml --stat`108109**Examples:**110- openapi-diff --fail-on-incompatible v1.yaml v2.yaml111- npx pact-broker matrix --consumer consumer --broker-base-url http://localhost:9292112- npx pact-broker can-i-deploy --pacticipant consumer --latest --to prod --broker-base-url http://localhost:9292113114## References115- [Pact Broker Docs](https://docs.pact.io/pact_broker/)116- [openapi-diff](https://github.com/OpenAPITools/openapi-diff)