-
Notifications
You must be signed in to change notification settings - Fork 298
Closed
Labels
Description
Objective
Migrate field relationship descriptions from prose in description fields to JSON Schema's standard dependencies and dependentRequired keywords.
Context
Currently, all field relationships are described only in prose within description fields. This means schema validators can't automatically check relationships, and users relying on schema-driven tooling don't get validation errors for relationship violations.
Relationships to Migrate
Audit the schema for relationship prose in description fields and convert to JSON Schema standard keywords:
dependencies- When field X requires field YdependentRequired- When field X requires fields Y and ZdependentSchemas- When field X changes schema requirements
Example Migration
Before:
{
"safe-outputs": {
"description": "Configure safe outputs. Note: write permissions in strict mode require safe-outputs to be configured."
}
}After:
{
"description": "Configure safe outputs.",
"if": {
"properties": { "strict": { "const": true } }
},
"then": {
"if": {
"properties": {
"permissions": {
"patternProperties": {
".*": { "enum": ["write"] }
}
}
}
},
"then": {
"required": ["safe-outputs"]
}
}
}Approach
- Audit all
descriptionfields for relationship prose - Create mapping of relationships to JSON Schema keywords
- Implement using
dependencies,dependentRequired, ordependentSchemas - Update
descriptionfields to remove redundant prose - Add
$commentfor complex relationships needing explanation
Files to Modify
pkg/parser/schemas/frontmatter.json- Refactor all relationship prose- After changes, run
make buildto rebuild with embedded schema
Acceptance Criteria
- All field relationships use JSON Schema standard keywords
- No relationship information only in prose descriptions
- Complex relationships have
$commentexplanations - Schema validators catch relationship violations
- Existing valid configurations still pass validation
- Documentation updated to reference relationship keywords
Testing
Test with JSON Schema validators that support dependencies to verify automatic relationship checking.
Related to #7575
AI generated by Plan Command for discussion #7569
Reactions are currently unavailable
Metadata
Metadata
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.