بنقرة واحدة
layer-07-data-model
Expert knowledge for Data Model Layer modeling in Documentation Robotics
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Expert knowledge for Data Model Layer modeling in Documentation Robotics
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Expert knowledge for Data Store Layer modeling in Documentation Robotics
Graph-based code intelligence for using dr analyzer subcommands to understand codebase structure, discover elements, and verify model alignment
Expert knowledge for Application Layer modeling in Documentation Robotics
Expert knowledge for Motivation Layer modeling in Documentation Robotics
Expert knowledge for Business Layer modeling in Documentation Robotics
Expert knowledge for Security Layer modeling in Documentation Robotics
| name | LAYER_07_DATA_MODEL |
| description | Expert knowledge for Data Model Layer modeling in Documentation Robotics |
| triggers | ["JSON Schema","data model","schema","object schema","data structure","properties","validation","data type"] |
| version | 0.8.1 |
Layer Number: 07 Specification: Metadata Model Spec v0.8.1 Purpose: Defines logical data structures using JSON Schema Draft 7, specifying entities, properties, validation rules, and data governance.
The Data Model Layer captures logical data structures:
This layer uses JSON Schema Draft 7 (industry standard) with custom extensions for cross-layer traceability.
Central Entity: The ObjectSchema (defining an object structure) is the core modeling unit.
CLI Introspection: Run
dr schema types data-modelfor the authoritative, always-current list of node types. Rundr schema node <type-id>for full attribute details on any type.
| Entity Type | Description |
|---|---|
| JSONSchema | Root schema document |
| ObjectSchema | Defines object structure with properties |
| ArraySchema | Defines array with items and constraints |
| StringSchema | String validation (length, pattern, format) |
| NumericSchema | Number/integer validation (min, max, multipleOf) |
| SchemaComposition | Combines schemas (allOf, anyOf, oneOf, not) |
| SchemaProperty | Individual property definition |
| Reference | $ref to other schemas |
| DataGovernance | Governance annotations (classification, retention) |
| DatabaseMapping | Maps to physical database (x-database extension) |
Activate when the user:
Outgoing (Data Model → Other Layers):
x-business-object-ref → Business Layer (what business concept does this represent?)x-database → Data Store Layer (how is this stored physically?)x-data-governance → Security Layer (classification, PII, retention)x-apm-data-quality-metrics → APM Layer (data quality monitoring)Incoming (Other Layers → Data Model):
required array for mandatory propertiestype (object, array, string, number, etc.)format for email, uuid, date-time, uri, etc.pattern for regex validation (e.g., phone numbers)x-data-governance for sensitive data$ref to reference shared schemas# Add object schema
dr add data_model object-schema --name "User" --property type=object
# List data models
dr list data_model object-schema
# Validate data model layer
dr validate --layer data_model
# Export as JSON Schema
dr export --layer data_model --format json-schema
id: data_model.object-schema.user
name: "User Schema"
type: object-schema
properties:
type: object
required: [id, email, username]
properties:
id:
type: string
format: uuid
description: "Unique user identifier"
email:
type: string
format: email
description: "User email address"
x-data-governance:
classification: confidential
pii: true
username:
type: string
minLength: 3
maxLength: 50
pattern: "^[a-zA-Z0-9_-]+$"
created_at:
type: string
format: date-time
roles:
type: array
items:
type: string
description: "User role assignments"
x-business-object-ref: business.actor.user
x-database:
table: users
schema: public
type field (validation will fail)$ref for shared definitions