ワンクリックで
dv-validate
Validate a Pragmatic Data Vault model definition against Pragmatic DV doctrine rules. Subcommands: model | manifest | naming
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Validate a Pragmatic Data Vault model definition against Pragmatic DV doctrine rules. Subcommands: model | manifest | naming
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Design and deploy an Activity Schema 2.0 pipeline as a Business Vault satellite. Covers BV staging transformation view, SAT_BV_NH_{ENTITY}_STREAM DDL, stream-on-view, triggered tasks, and per-activity IM Dynamic Tables.
Design and deploy Business Vault constructs — BV links and BV satellites. Covers delivery modes, rule views, staging, and doctrine rules.
Generate deployment artifacts for a Data Vault — schema DDL, dependency-ordered execution scripts, role/grant setup, and environment promotion.
Analyze source tables or schema descriptions and propose a Pragmatic Data Vault model (hubs, links, satellites)
Explain any Pragmatic Data Vault concept, pattern, rule, or modeling decision in plain language
Generate SQL DDL and load patterns for a validated Pragmatic Data Vault construct
| name | dv-validate |
| description | Validate a Pragmatic Data Vault model definition against Pragmatic DV doctrine rules. Subcommands: model | manifest | naming |
Check a vault construct or full model against Pragmatic Data Vault doctrine rules. Always runs before generation.
/dv-validate model (default)Validate a single construct definition pasted or described by the user.
Spawn the Doctrine Enforcer subagent (see agents/doctrine-enforcer.md) and pass the model definition. The Enforcer returns a structured list of violations.
Present results as:
DOCTRINE VALIDATION
===================
Construct: <name>
Status: ✅ CLEAN / ❌ VIOLATIONS FOUND
Violations:
[DV-MAN-001] Hub HUB_ORDER has no business key defined
[DV-SAT-001] SAT_CUSTOMER_CONTACT is missing dv_hashdiff column
...
Warnings (not blockers):
[WARN-02] SAT_CUSTOMER_DEMO — consider splitting PII columns into a PII satellite
Never auto-fix violations. Explain each one and ask what the user wants to do.
/dv-validate manifestValidate an entire vault design (multiple hubs, links, satellites).
Ask the user to paste or point to a file containing their full model.
Run the Doctrine Enforcer subagent once per construct, then aggregate results:
MANIFEST VALIDATION SUMMARY
============================
HUB_CUSTOMER ✅ clean
HUB_PRODUCT ✅ clean
LNK_ORDER ❌ 2 violations
SAT_CUSTOMER_DEMO ⚠️ 1 warning
SAT_ORDER_DETAIL ✅ clean
Total: 4 clean, 1 with violations, 1 with warnings
Drill into each violation with plain-language explanation.
/dv-validate namingCheck naming conventions only — no structural doctrine.
Spawn the Naming Advisor subagent (see agents/naming-advisor.md) and pass all construct names and column names.
Check:
HUB_ prefix, singular noun, UPPER_SNAKE_CASELNK_ prefixSAT_ prefix, SAT_<PARENT>_<CONTEXT> formatPIT_ prefixBDG_ prefix (NOT BRDG_ or BRIDGE_)dv_hashkey_hub_<name> (hubs) / dv_hashkey_<link_full_name> (links)dv_hashdiff (not HDIFF, HASH_DIFF, HD)dv_load_timestamp (not LDTS, LOAD_DATE, LOAD_DTS)dv_applied_timestamp (batch/file timestamp)dv_recordsource (not RSRC, RECORD_SOURCE, SRC)QUALIFY ROW_NUMBER().ef only): dv_start_date, dv_end_date (not ACTIVE_FLAG, not dv_startts)The following warnings are raised during model and manifest validation in addition to structural doctrine:
| Code | Severity | Description |
|---|---|---|
WARN-BK-001 | WARNING | Hub business key column has a numeric data type (INT, NUMBER, BIGINT, DECIMAL). Business keys must be VARCHAR. Cast to string in staging and define the column as VARCHAR in the hub DDL. |
WARN-BK-002 | WARNING | dv_collisioncode value appears to be a source-system name (e.g. 'SALESFORCE', 'SAP', 'CRM'). BKCC is a business key namespace discriminator, not a source-system label. This pattern is known as SSDV (Source System Data Vault) and creates hub bloat, unnecessary joins, and downstream BV integration debt. Default to 'default' unless two sources genuinely share overlapping key values for different entities. |
WARN-HUB-SMART | WARNING | Hub business key appears to be a smart key (contains embedded type codes, year, country, or sequence patterns) AND additional hub columns have been derived from components of that key. Smart key components are attributes — store the full BK as an opaque string and derive components in a satellite or BV satellite. |
WARN-HUB-CONCAT | WARNING | Hub business key appears to be a concatenation of multiple component keys (e.g. branch_code || account_number). Concatenated composite keys push integration debt to the IM layer where every query must de-concatenate. Model the composite key correctly as a multi-column BK in a properly named hub. |
WARN-HUB-WEAK | WARNING | Hub construct has no clearly identifiable business owner or does not correspond to a business object the organisation refers to by this key. Confirm with a business stakeholder before generating — weak hubs create technical debt. |
ERR-HUB-KIH | ERROR (blocks generation) | Hub business key includes a date, timestamp, or sequence number. Keyed-instance-hub anti-pattern — keys must identify entities, not snapshots. Move temporal values to a satellite. |
WARN-HUB-REF | WARNING | Hub business key appears to be a reference/lookup code (short categorical value, status code, type code). Reference codes are attributes, not entity identifiers. Consider dependent-child key or reference enrichment instead. |
A 10-category rubric for assessing the quality of a proposed or existing Data Vault model. Score each category out of its maximum and sum for an overall model quality percentage.
| # | Category | Max | What to assess |
|---|---|---|---|
| 1 | Correctness | 15 | Model captures business requirements; stakeholder sign-off exists; evidence of interviews or report analysis |
| 2 | Completeness | 15 | Only models what is needed (no over-modelling); all metadata definitions complete (business purpose, model version, source names, expected rate of change) |
| 3 | Schema | 10 | Model matches the appropriate level (conceptual, logical, physical); relationship cardinality correctly depicted; RV diagrams are source-specific |
| 4 | Structure | 15 | Objects modelled in the correct place (attributes on correct hub/link); PII split out; correct stencils used; definitions consistent across models |
| 5 | Abstraction | 10 | How well the model fits an enterprise/industry ontology; extensibility vs. readability balance |
| 6 | Standards | 5 | Naming standards followed (table prefixes, column names, singular nouns, approved abbreviations); column names include prime + modifier + class word |
| 7 | Readability | 5 | Correct stencil artefacts; large models broken into smaller diagrams; minimal line crossings; easy-to-spot "heart" of the model |
| 8 | Definitions | 10 | No ambiguity; correct business terms from glossary; links to explanation pages or examples where appropriate |
| 9 | Consistency | 5 | Model is comparable to enterprise model; consistent naming (no synonyms for same concept) |
| 10 | Data | 10 | Metadata matches actual data; profiled data validates the model design |
| TOTAL | 100 |
Use this scorecard during model reviews and mob modelling sessions. A model scoring below 70% should be revised before generating DDL.
A "Fake Vault" is an implementation that superficially resembles Data Vault (has hubs, links, satellites) but violates core principles, producing a system with none of DV's benefits (auditability, scalability, agility). Check for these 13 anti-patterns during validation:
| # | Anti-pattern | What it looks like | Why it fails |
|---|---|---|---|
| 1 | Weak hubs | Keys with no business concept loaded as hubs; "multi-master hub" | Hub has no business meaning; queries cannot navigate it without type-code disambiguation |
| 2 | Staggered loads | Sequence-key dependencies forcing serial loading (overnight batch) | Eliminates hash-key parallelism advantage; reverts to pre-DV era |
| 3 | Source-system BKCC | Using run-stream/source-system codes as collision codes | Creates a "source-system data vault" (SSDV) / "legacy data vault" \u2014 separate hubs per source |
| 4 | Loading satellites as-is | Not splitting by what attributes describe | Pushes integration to downstream; every IM query must compensate |
| 5 | No link-satellites | Compensated by weak hubs with extra columns | Adds unnecessary joins; loses relationship-level attributes |
| 6 | Non-unique hubs/links | Adding FKs to hubs, making hubs temporal, evolving link schema | Violates grain immutability; hub/link becomes a satellite |
| 7 | Loading DV from PITs/Bridges | Query-assistance tables used as operational dependencies | Circular dependency; PIT/Bridge are disposable, not authoritative |
| 8 | Deleting data in DV | Removing rows from vault tables | Violates audit-trail requirement; archive to cold storage instead |
| 9 | Sub-typing on ingestion | Conforming raw data before it reaches raw vault | BV rule applied too early; raw vault no longer represents source faithfully |
| 10 | Skimming source columns | Cherry-picking columns instead of loading all | Breaks auditability: cannot recreate source record |
| 11 | Missing mandatory metadata | No record source, no load date, no natural/hash key | Cannot trace data lineage or determine record provenance |
| 12 | Vendor lock-in | Vault tied to proprietary tool features; non-ANSI SQL | Vault must be tool-agnostic; ANSI SQL 2003 minimum |
| 13 | Multiple vaults in same ontology | Departmental silos each with their own vault | Defeats integration purpose of DV; creates data islands |
During /dv-validate model, check for signals of these anti-patterns and flag with ERR-FAKE-<number>.
If validation is called from within /dv-generate, a CLEAN result is required before any code is produced. The gate is enforced by the generate skill \u2014 not by the user saying "ignore errors."
agents/doctrine-enforcer.mdagents/naming-advisor.md