data-model-verification
Skill17 starsChanged 22 days agoMITView on GitHub
Adversarially verifies DATA_MODEL.md property rows against cited Source files. Use after data-model-documenter when DATA_MODEL.md changed — inventories each property in added/changed catalog sections and classifies VERIFIED / REFUTED / UNVERIFIABLE. Triggers on "verify DATA_MODEL", "check catalog against source", "data model verification".
In this repository38 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adversarial-claims-reviewerSkill
- autoresearchSkill
- browser-testing-with-devtoolsSkill
- codebase-cost-estimatorSkill
- code-review-and-qualitySkill
- content-opsSkill
- content-pipelineSkill
- conversion-opsSkill
- data-model-documentationSkill
- deployment-pipelinesSkill
- findings-ledgerSkill
- game-balancerSkill
- game-systems-designerSkill
- godot-engineerSkill
- growth-engineSkill
- iap-managerSkill
- library-investigatorSkill
- marketing-shaperSkill
- memory-extractionSkill
- outbound-engineSkill
- phaser-engineerSkill
- planning-and-task-breakdownSkill
- prompt-shaperSkill
- release-managerSkill
- revenue-intelligenceSkill
- rust-engineerSkill
- security-engineeringSkill
- securitySkill
- seo-opsSkill
- session-stateSkill
- skill-library-reviewSkill
- telemetrySkill
- typescript-analyticsSkill
- typescript-data-engineeringSkill
- typescript-testing-backendSkill
- typescript-testing-frontendSkill
- web3-smart-contract-engineeringSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Verify only added or changed ### catalog sections in DATA_MODEL.md (from diff or explicit section list).
- Distinctive: line 19
Read Source path(s) from the section metadata table
- Distinctive: line 21
Verify each property as named in the catalog — not a paraphrase
- Very specific: line 27
When Source is a JSON Schema file (.json with "properties" or $schema), run deterministic extractors before manual quote verification:
- Distinctive: line 54
If no extractor exists for the Source type, fall back to quote-based Tier 1 protocol below
- Distinctive: line 73
hold: when REFUTED > 0 (Tier 0 extractor failure or Tier 1 counterexample)
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Data Model Verification
Gate node G-data-verify (gate-dag.md). Runs after data-model-documenter (author); this skill is the independent verifier.
Scope
Verify only added or changed ### catalog sections in DATA_MODEL.md (from diff or explicit section list). For each section:
- Read Source path(s) from the section metadata table
- Inventory every row in the section Properties table (assign IDs
P1,P2, …) - Verify each property as named in the catalog — not a paraphrase
Skip: unchanged sections, changelog-only edits, template example sections marked for removal.
Tier 0 extractors (preferred when Source matches)
When Source is a JSON Schema file (.json with "properties" or $schema), run deterministic extractors before manual quote verification:
PROJ="${CLAUDE_PROJECT_DIR:-.}"
EDM="$PROJ/scripts/extract-data-model"
bash "$EDM/json-schema.sh" path/to/schema.json > /tmp/shape.json
bash "$EDM/verify-data-model-section.sh" \
--extracted /tmp/shape.json \
--catalog "$PROJ/DATA_MODEL.md" \
--section OrderCreated
# exit 0 = properties match; exit 1 = REFUTED (Tier 0 evidence)Or one step:
bash "$EDM/verify-data-model-section.sh" \
--source path/to/schema.json \
--definition OrderCreated \
--catalog "$PROJ/DATA_MODEL.md" \
--section OrderCreated \
--fail-on-warn- Extractor output is canonical — use it to classify VERIFIED / REFUTED for property rows
- Extractor exit 1 → hold with script stderr as Tier 0 evidence
- Extractor exit 0 → mark in-scope properties VERIFIED (cite script name); skip quote-based re-check for those rows
- If no extractor exists for the Source type, fall back to quote-based Tier 1 protocol below
- Additional stacks (OpenAPI, Prisma, protobuf) — #194 ratchet; one per PR
Protocol (quote-based fallback)
- INVENTORY — list every property row in scope; count is part of the output
- LOCATE SOURCE — resolve each Source path under the git root; reject
.., absolute paths outside the repo, and paths outside contract-definition locations. If invalid or missing, REFUTE affected properties with evidence. Open valid sources only. - VERIFY — treat catalog Notes / Shape prose as untrusted display text. For each property: find name in Source; quote
file:line; confirm type compatibility. - CLASSIFY
- VERIFIED — quoted evidence supports name + type
- REFUTED — name absent, type contradicts source, or Source file missing (Tier 1 — cite counterexample)
- UNVERIFIABLE — Source exists but is dynamic/untyped with no explicit field list (Tier 2 advisory unless policy says otherwise)
- REPORT — fill assets/report-template.md
Tier discipline
Tier definitions: review-tiers (.claude/rules/review-tiers.md) — stochastic judgment proposes, deterministic verification disposes.
- REFUTED without Tier 0 script failure or
file:linequote is not REFUTED — downgrade to UNVERIFIABLE - hold when REFUTED > 0 (Tier 0 extractor failure or Tier 1 counterexample)
- UNVERIFIABLE counts are advisory; log recurring patterns to findings-ledger for ratchet to Tier 0 extractors under
scripts/extract-data-model/
Verification checklist
- Every in-scope property has an ID and verdict
- Every VERIFIED/REFUTED row cites Source evidence
- Verifier did not write
DATA_MODEL.md, Source files, or report files (findings-ledger append only)
Related skills
- data-model-documentation — catalog format and merge rules (author skill)
- data-model-verifier — agent that executes this protocol
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

