This directory contains comprehensive JSON Schema definitions for all DESTIN protocol data structures. These schemas ensure data integrity, provide validation, and serve as authoritative documentation for the protocol's data formats.
agent-definition.json- Agent identity and metadata structuredomain-profile.json- Domain-specific configuration and trait weightsaudit-log.json- Score update and event logging formatanti-manipulation-policy.json- Manipulation prevention configurationinteroperability-export.json- Cross-system reputation export format
cadm-mode-selection.json- Context-Aware Dialogue Mode selection eventsdwip-influence-calculation.json- Domain-Weighted Influence Protocol calculationsdip-proposal.json- DESTIN Improvement Proposal format
schema-index.json- Central registry of all schemas with metadataREADME.md- This documentation file
Each schema includes comprehensive validation:
- Type checking for all fields
- Required field enforcement for critical data
- Format validation for dates, URIs, and other structured data
- Enum constraints for controlled vocabularies
- Nested object validation for complex structures
Schemas serve as living documentation:
- Field descriptions explain each property's purpose
- Examples demonstrate proper usage patterns
- Error messages provide helpful validation feedback
- Cross-references link related schema components
Schemas are designed for protocol evolution:
- Optional fields allow backward compatibility
- Version metadata tracks schema evolution
- Extension points support future protocol features
- Default values provide sensible fallbacks
Use these schemas with any JSON Schema validator:
# Validate a sample file
ajv validate -s schemas/agent-definition.json -d samples/agent-definition.sample.json
# Or use the automated validation script
npm run validate-samplesSchemas can be integrated into:
- API validation for request/response validation
- Database constraints for data integrity
- Code generation for type-safe implementations
- Documentation for developer reference
All schemas follow:
- JSON Schema 2020-12 specification
- Consistent naming conventions
- Comprehensive examples for all structures
- Clear descriptions for all fields
- Proper error messages for validation failures
When adding or modifying schemas:
- Follow the existing patterns for consistency
- Include comprehensive examples in the schema
- Add corresponding sample files for testing
- Update the schema index to include new schemas
- Run validation to ensure compatibility
- Samples: See
../samples/for example data files - Validation: See
../validate-samples.jsfor automated validation - Specification: See
../../spec/destin-v0.1.mdfor protocol details