omt/skills/contract-validation/SKILL.md
This skill should be used when the user asks to "validate agent contracts", "check contract compliance", "verify agent input/output", "pre-flight check", "debug agent failure", "why did the agent fail", or "check workflow state". Also triggered during OMT workflow when an agent starts or finishes execution. Validates input/output contracts for OMT agents using the Contract-First pattern.
npx skillsauth add musingfox/cc-plugins contract-validationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Validates agent input and output contracts using the Contract-First design pattern. Every OMT agent has a contract in contracts/<agent-name>.json that defines required inputs, outputs, and validation rules.
Every agent must define:
references/validation-rules.md)1. Read agent contract: contracts/<agent-name>.json
2. Gather input data from contract's source locations
3. Validate input contract
4. Execute agent logic
5. Validate output contract
6. Update workflow-state.json with results
Use the Read tool to load the agent's contract definition:
Read contracts/dev.json
The contract specifies input_contract.source — a list of file paths to gather input from.
Before starting agent work:
Gather input data — For each source in input_contract.source, use the Read tool to check the file exists and has content:
outputs/pm.md (requirements from @pm)outputs/arch.md (architecture from @arch)tests/**/*.test.ts)Check required fields — For each field in input_contract.required:
fileExists, minLength:N)Record validation — Read lib/contract-validator.ts for validation logic, then perform equivalent checks using Read/Glob tools. Log the result.
After completing agent work:
Collect output data — Gather all outputs specified in output_contract.required:
tests/**/*.test.ts, src/**/*.ts)Check output requirements — For each field in output_contract.required:
minItems:N)pattern:REGEX)Update state — Read lib/state-manager.ts for the state structure, then use Write tool to update .agents/.state/workflow-state.json with execution results.
The contracts/dev.json contract defines:
Input (from @pm and @arch):
requirements — Requirements document (outputs/pm.md, validation: fileExists)architecture — Architecture design (outputs/arch.md, validation: fileExists)existing_tests — Optional existing test filesOutput (to tests/, src/, outputs/dev.md):
test_files — Created test files (validation: minItems:1)implementation_files — Modified source files (validation: minItems:1)tests_status — Test execution status (validation: pattern:^\d+/\d+ passed$)references/validation-rules.mdreferences/patterns-and-examples.mdcontracts/pm.json, contracts/arch.json, contracts/dev.jsonlib/contract-validator.ts, lib/state-manager.tsdata-ai
Unified entry point for Obsidian daily-note captures and long-form notes. Triggers on "記一下 / log / 紀錄 / capture this / 寫到 journal" (→ cap mode) and "建立筆記 / new note / 寫一份筆記 / create a note on" (→ note mode). Also via `/obw:cap` and `/obw:note`. Requires `.obsidian.yaml`.
tools
Use the `gog` CLI to operate Google Workspace — Gmail (read/search/send/labels/drafts), Calendar (events/RSVP/freebusy/focus-time/out-of-office), and Drive (list/search/upload/ download/share/move). Triggers on any Gmail, inbox, email, calendar, agenda, meeting, schedule, RSVP, Drive, Google Doc/Sheet/Slides, file share, or upload/download request.
documentation
Interactively create .obsidian.yaml for a project and install starter templates (task / doc / adr) into the vault's Templates folder. Skips templates that already exist; never overwrites.
tools
Manage project hook-guard installation — set up, diagnose, or update Claude Code hooks, git pre-commit, and commit-msg scripts with security checks, code-quality gates, and CLAUDECODE skip logic. Triggers on "set up hooks", "configure pre-commit", "add linting hooks", "initialize hook-guard", "check hooks", "hook doctor", "verify hook setup", "troubleshoot hooks", "update hooks", "regenerate hooks", "sync hooks with current tools", or similar requests.