skills/verification-contracts/SKILL.md
Generate verification contracts before delegating tasks to sub-agents, defining how success will be measured. Triggers on: verification contract, delegation contract, task verification, contract-first delegation.
npx skillsauth add mdmagnuson-creator/yo-go verification-contractsInstall 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.
🎯 Contract-first decomposition: Only delegate a task if you can verify its completion.
Before delegating ANY task to a specialist, generate a verification contract that defines how success will be measured.
Load this skill when:
Before every delegation, generate a verificationContract:
Task: "Add dark mode toggle to settings page"
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ PATTERN MATCHING │
│ │
│ 1. Check for advisory patterns (no automated verification): │
│ - "investigate", "research", "explore", "discuss", "plan", │
│ "design", "audit", "review", "analyze" │
│ │
│ 2. Check for skip patterns (minimal verification): │
│ - "document", "readme", "docs", "comment", "typo", "spelling" │
│ │
│ 3. Otherwise, generate verifiable contract from task + files │
└─────────────────────────────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ CONTRACT OUTPUT │
│ │
│ { │
│ "type": "verifiable", │
│ "criteria": [ │
│ { "activity": "typecheck", "description": "No type errors" }, │
│ { "activity": "lint", "description": "No lint errors" }, │
│ { "activity": "unit-test", "pattern": "DarkModeToggle" }, │
│ { "activity": "e2e", "timing": "immediate" } │
│ ], │
│ "generatedFrom": "auto", │
│ "generatedAt": "<timestamp>" │
│ } │
└─────────────────────────────────────────────────────────────────────┘
| Type | Meaning | Verification | Examples |
|------|---------|--------------|----------|
| verifiable | Task has clear, automatable success criteria | Full test-flow runs | Add component, fix bug, implement feature |
| advisory | Task is exploratory with no clear success test | User reviews output | Investigate, research, explore, plan |
| skip | Task is trivial and doesn't need verification | Lint/typecheck only | Update docs, fix typo, add comments |
function generateContract(taskDescription, expectedFiles):
lowerDesc = taskDescription.toLowerCase()
# Check for advisory patterns (proceed automatically, log for review)
advisoryPatterns = ["investigate", "research", "explore", "discuss",
"plan", "design", "audit", "review", "analyze"]
for pattern in advisoryPatterns:
if pattern in lowerDesc:
log("ℹ️ Advisory task detected: no automated verification")
return { type: "advisory", criteria: [] }
# Check for skip patterns (minimal verification)
skipPatterns = ["document", "readme", "docs", "comment", "typo", "spelling"]
for pattern in skipPatterns:
if pattern in lowerDesc:
return {
type: "skip",
criteria: [
{ activity: "typecheck", description: "No type errors" },
{ activity: "lint", description: "No lint errors" }
]
}
# Generate verifiable contract
criteria = [
{ activity: "typecheck", description: "No type errors" },
{ activity: "lint", description: "No lint errors" }
]
# Add criteria based on expected file patterns
for file in expectedFiles:
if file matches "*.tsx" or "*.jsx":
criteria.push({ activity: "unit-test", pattern: componentName(file) })
if file matches "app/*" or "pages/*":
criteria.push({ activity: "e2e", timing: "immediate" })
if file matches "*.ts" and not test file:
criteria.push({ activity: "unit-test", pattern: moduleName(file) })
return {
type: "verifiable",
criteria: deduplicate(criteria),
generatedFrom: "auto",
generatedAt: now()
}
Write the contract to the current chunk.json → verification.contract before delegation:
{
"verification": {
"contract": {
"type": "verifiable",
"criteria": [...],
"generatedFrom": "auto",
"generatedAt": "2026-02-28T10:00:00Z"
}
}
}
When an advisory task is detected, proceed automatically with logging:
ℹ️ Advisory task detected: "Investigate why checkout API is slow"
No automated verification — output will be logged for your review.
Proceeding...
After completion, log the output to chunk.json → advisory:
{
"advisory": {
"taskId": "adhoc-003",
"description": "Investigate why checkout API is slow",
"output": "Found N+1 query in OrderService.getItems()",
"completedAt": "2026-02-28T10:30:00Z"
}
}
When to still prompt the user:
"promptForAdvisory": true in project.jsonAfter specialist reports done, verify against the contract:
chunk.json → verification.results:
{
"verification": {
"status": "pass",
"results": [
{ "activity": "typecheck", "status": "pass" },
{ "activity": "lint", "status": "pass" },
{ "activity": "unit-test", "status": "pass", "attempts": 1 },
{ "activity": "e2e", "status": "pass", "attempts": 1 }
],
"completedAt": "2026-02-28T10:15:00Z"
}
}
{
"activity": "unit-test",
"status": "fail",
"error": "Expected DarkModeToggle to handle click, but onClick was not called",
"attempts": 3
}
testing
Verify that Vercel environment variables point to the correct Supabase project for each environment to prevent staging/production cross-wiring. Triggers on: vercel supabase check, environment alignment, env var check, supabase environment.
development
Manage codebase and database vectorization for semantic search. Use when initializing, refreshing, or querying the vector index. Triggers on: vectorize init, vectorize refresh, vectorize search, semantic search, vector index, enable vectorization.
testing
Patterns for XCUITest UI tests for native Apple apps (macOS/iOS). Use when writing or reviewing XCUITest tests for Swift apps. Triggers on: XCUITest, xcuitest, native app testing, Apple UI tests, SwiftUI tests, AppKit tests, UIKit tests.
testing
Quality-beyond-correctness E2E testing patterns. Catches visual glitches, performance issues, layout shifts, and intermediate bad states. Triggers on: flicker test, visual stability, performance budget, negative assertion, CLS test, drag drop test, animation test.