| namespace | aiwg |
| platforms | ["all"] |
| name | contract-validate |
| description | Validate that an AIWG skill chain has all requires inputs satisfied by upstream ensures outputs. Catches missing dependencies at wiring time, not runtime. |
| requires | ["skills: ordered list of AIWG skill names or file paths forming the workflow to validate","if workflow-file: path to a YAML/JSON workflow definition","external-inputs: names of inputs the calling workflow will provide (optional; unmatched requires are flagged as unresolved)"] |
| ensures | ["validation-report: pass/fail report per skill with specific missing dependency details","verdict: VALID (all requires: satisfied), INVALID (unresolved requires: found), or VALID WITH WARNINGS (semantic matches only)","if INVALID: specific list of which skill requires which input and which upstream skill should provide it"] |
| errors | ["skill-not-found: one or more skill names cannot be resolved to a SKILL.md file","no-contracts: none of the specified skills have contract fields — cannot validate"] |
| invariants | ["validation never executes skills — static analysis only","semantic matches are flagged as warnings, not counted as resolved for VALID verdict","a workflow with any unresolved requires: always returns INVALID"] |
| commandHint | {"argumentHint":"<skill1> <skill2> ... | --workflow <file.yaml> [--external input1,input2] [--strict]","allowedTools":"Read, Glob, Grep","model":"haiku","category":"planning","modelRole":"efficiency","modelTier":"economy"} |
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:
/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.
/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:
- Satisfied by external input (
--external list) → ✓ SATISFIED (external)
- Satisfied by exact match (upstream
ensures: same name) → ✓ SATISFIED
- Satisfied by semantic match (upstream
ensures: same meaning, different name) → ⚠️ WARN (semantic)
- 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 |