Codex

contract-validate

Validate that a chain of AIWG skills has all requires: inputs satisfied by upstream ensures: outputs before execution. Catches missing dependencies at wiring time rather than at runtime.

104 stars

Best use case

contract-validate is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

It is a strong fit for teams already working in Codex.

Validate that a chain of AIWG skills has all requires: inputs satisfied by upstream ensures: outputs before execution. Catches missing dependencies at wiring time rather than at runtime.

Teams using contract-validate should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/contract-validate/SKILL.md --create-dirs "https://raw.githubusercontent.com/jmagly/aiwg/main/.agents/skills/contract-validate/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/contract-validate/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How contract-validate Compares

Feature / Agentcontract-validateStandard Approach
Platform SupportCodexLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Validate that a chain of AIWG skills has all requires: inputs satisfied by upstream ensures: outputs before execution. Catches missing dependencies at wiring time rather than at runtime.

Which AI agents support this skill?

This skill is designed for Codex.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Contract Validate Skill

Validate a skill chain before running it — check that every `requires:` input is satisfied by an upstream `ensures:` output or declared as an external input.

## Triggers

- "validate the contract chain for [skill1] → [skill2]"
- "check if this workflow is wired correctly"
- "will [skill] have everything it needs?"
- "pre-flight check the skill chain"
- "validate workflow contracts"

## Parameters

### Skills list (positional)

Ordered list of skill names to validate as a chain:

```bash
/contract-validate issue-planner address-issues
/contract-validate prose-detect prose-run
```

### `--workflow <file>` (optional)

Path to a YAML workflow definition listing the skill chain.

### `--external input1,input2` (optional)

Comma-separated names of inputs that will be provided by the calling workflow or user. Any `requires:` that matches an external input is treated as satisfied.

```bash
/contract-validate issue-planner address-issues --external objective,tracker
```

### `--strict` (optional)

Treat semantic matches as failures (require exact name matches). Default: semantic matches pass with warnings.

## Behavior

### Step 1: Resolve and Extract Contracts

Same as `contract-manifest` Step 1–2: resolve each skill, extract contract fields.

### Step 2: Validate Each Requires:

For each skill's `requires:` entry:

1. **Satisfied by external input** (`--external` list) → ✓ SATISFIED (external)
2. **Satisfied by exact match** (upstream `ensures:` same name) → ✓ SATISFIED
3. **Satisfied by semantic match** (upstream `ensures:` same meaning, different name) → ⚠️ WARN (semantic)
4. **Not satisfied** (nothing provides it) → ❌ UNRESOLVED

### Step 3: Determine Verdict

| Condition | Verdict |
|-----------|---------|
| All `requires:` satisfied (exact or external) | VALID |
| All `requires:` satisfied but some are semantic matches | VALID WITH WARNINGS |
| Any `requires:` unresolved | INVALID |
| No contract fields found on any skill | NO CONTRACTS (cannot validate) |

### Step 4: Output Report

```markdown
## Contract Validation Report

**Workflow**: issue-planner → address-issues
**Verdict**: VALID WITH WARNINGS

### Skill: issue-planner
| Requires | Source | Status |
|----------|--------|--------|
| objective | external | ✓ satisfied (external) |
| tracker | external | ✓ satisfied (external) |

### Skill: address-issues
| Requires | Source | Status |
|----------|--------|--------|
| issues | issue-planner.issues-filed | ⚠️ semantic match (name differs — verify intent) |
| tracker | issue-planner.tracker | ✓ satisfied (exact match) |

### Warnings (1)
- `address-issues.requires.issues` satisfied by `issue-planner.ensures.issues-filed` via semantic match.
  If these are not equivalent, rename one to match or add an explicit mapping.

### Errors (0)
None

### Recommendation
Workflow is likely correct. Confirm that `issue-planner.issues-filed` and `address-issues.issues` refer to the same thing. If so, rename one for an exact match to eliminate the warning.
```

## Using in CI / Pre-Flight

Before running a multi-skill orchestration, validate the chain:

```bash
/contract-validate issue-planner address-issues --external objective tracker
# → VALID — safe to proceed
# → INVALID — check report before running
```

## Relationship to contract-manifest

- **`contract-manifest`** — generates a full manifest for human inspection
- **`contract-validate`** — gives a pass/fail verdict for pre-flight checks

Use `contract-manifest` to understand a workflow; use `contract-validate` to gate its execution.

## Model

Runs on **Sonnet** — contract matching is structural analysis, not complex reasoning.

## References

- @$AIWG_ROOT/agentic/code/frameworks/sdlc-complete/README.md — SDLC framework context and skill catalog
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/vague-discretion.md — Measurable validation verdicts and criteria
- @$AIWG_ROOT/agentic/code/addons/aiwg-utils/rules/research-before-decision.md — Research-first for contract dependency resolution
- @$AIWG_ROOT/docs/extensions/overview.md — Extension system and skill architecture
- @$AIWG_ROOT/docs/cli-reference.md — CLI reference

Related Skills

validate-metadata

104
from jmagly/aiwg

Validate AIWG extension definitions against the metadata schema and report errors with field names, line numbers, and remediation hints

Codex

validate-component

104
from jmagly/aiwg

Validate a single AIWG component (skill, agent, or command) for completeness and correctness

Codex

validate-addon

104
from jmagly/aiwg

Validate an entire AIWG addon package for completeness and release readiness

Codex

soul-validate

104
from jmagly/aiwg

Validate a SOUL.md file against community best practices and quality criteria

Codex

setup-validate

104
from jmagly/aiwg

Validate a `setup.aiwg.io/v1` SetupManifest file against the schema and run cons

Codex

reproducibility-validate

104
from jmagly/aiwg

Run a workflow multiple times and compare outputs to produce a similarity score and pass/fail verdict

Codex

provenance-validate

104
from jmagly/aiwg

Validate provenance records and chains for completeness and consistency

Codex

prose-validate

104
from jmagly/aiwg

Validate an OpenProse program file against Prose contract grammar without executing it — checks frontmatter, contract structure, service references, and strategy syntax

Codex

mention-validate

104
from jmagly/aiwg

Validate all @-mentions resolve to existing files

Codex

devkit-validate

104
from jmagly/aiwg

Validate addon, framework, or extension structure and manifest

Codex

contract-manifest

104
from jmagly/aiwg

Generate a human-readable manifest for a chain of AIWG skills, showing agent assignments, contract fields (requires:/ensures:), data flow between steps, and parallelization opportunities. Makes orchestration graphs debuggable and auditable.

Codex

aiwg-orchestrate

104
from jmagly/aiwg

Route structured artifact work to AIWG workflows via MCP with zero parent context cost