Pre-merge seam validation — reads a ModelTicketContract, diffs the branch against origin/main, and returns PASS / WARN / BLOCK with emergency_bypass support
Resources
1Install
npx skillscat add omninode-ai/omniclaude/contract-compliance-check Install via the SkillsCat registry.
contract-compliance-check skill
Dispatch Requirement
When invoked, dispatch to a polymorphic-agent:
Agent(
subagent_type="onex:polymorphic-agent",
description="Contract compliance check <ticket_id>",
prompt="Run the contract-compliance-check skill for <ticket_id>. <full context>"
)CRITICAL: subagent_type MUST be "onex:polymorphic-agent" (with the onex: prefix).
Skill ID: onex:contract-compliance-check
Version: 1.0.0
Owner: omniclaude
Ticket: OMN-2978
Depends on: OMN-2975 (generate-ticket-contract)
Purpose
Pre-merge seam validation. Reads a ModelTicketContract, diffs the branch againstorigin/main to find changed files, runs targeted probes for each declared surface
in interfaces_touched, and returns PASS / WARN / BLOCK.
Respects emergency_bypass to downgrade BLOCK verdicts when a justification and
follow-up ticket are provided.
Usage
/contract-compliance-check OMN-1234Or with an explicit contract path:
/contract-compliance-check OMN-1234 --contract-path /path/to/OMN-1234.yamlProbe Surfaces
| Surface | What is compared | BLOCK condition | WARN condition |
|---|---|---|---|
topics |
Producer constant vs consumer subscribe string | Producer != consumer (exact bytes) | New topic with no known consumer |
events |
Event model field set | Required field removed | New optional field added |
protocols |
Method signatures on changed Protocol classes |
Method removed or signature changed | New method added |
public_api |
SHA-256 of openapi.json | (never BLOCK) | Hash changed without public_api in interfaces_touched |
envelopes |
Envelope model field set | Required field removed | New optional field added |
Baseline Strategy
All probes compare branch state against git diff origin/main — not the PR diff:
git diff origin/main --name-only # list of changed files relative to main
git show origin/main:{file} # baseline version of a fileemergency_bypass Semantics
If emergency_bypass.enabled=true:
- require justification non-empty AND follow_up_ticket_id non-empty
- if both present: downgrade all BLOCK -> WARN
- if either missing: BLOCK with "emergency_bypass enabled but incomplete"Output Format
CONTRACT COMPLIANCE CHECK — OMN-XXXX
is_seam_ticket: true
interfaces_touched: [topics, events]
TOPICS probe ──────────
✅ PASS onex.evt.omniclaude.prompt-submitted.v1
EVENTS probe ──────────
⚠️ WARN ModelHookPromptSubmittedPayload: field added: intent_class: str | None = None
Overall: PASS (2 warnings, not blocking)Architecture
prompt.md → orchestrates probe dispatch, contract loading, output formatting
SKILL.md → descriptive documentation (this file)The skill is invoked as a pre-merge gate, typically from the ticket-pipelinelocal_review phase or manually by a developer before creating a PR.
See Also
generate-ticket-contractskill (OMN-2975) — produces theModelTicketContractconsumed hereModelTicketContractinonex_change_controlrepo- ticket-pipeline Phase 2 (
local_review) — primary trigger surface