| name | props-schema-validation-guard |
| description | Enforce schema-based runtime/load validation with valid-write and invalid-fallback semantics for props data. Use when requests mention invalid property values, schema typing, or load safety. |
Skill: props-schema-validation-guard
Trigger Signals
Use this skill when requests include:
- "property validation"
- "invalid input accepted"
- "load fallback"
- "schema register"
Do Not Use When
- Request is only UI formatting/placeholder updates.
- No props/property schema changes are involved.
Required Inputs
- Target property/component definitions.
- Invalid value examples (if bugfix).
- Rules:
docs/ai/framework/design-principles/validation-and-fallback-semantics.md
Preflight
- Identify set/update/load entry points.
- Identify current property type contracts.
- Capture existing fallback/default behavior.
Deterministic Procedure
- Define/confirm type contract for each property.
- Implement runtime write guard:
- valid -> write
- invalid -> reject/fallback
- Implement load guard:
- invalid persisted value -> fallback initialized/default value
- Keep UI parser/formatter optional; system remains final validator.
- Update docs when schema rules or fallback semantics change.
Validation Matrix
- Invalid input cannot corrupt persisted runtime state.
- Loading bad data results in deterministic fallback.
- Valid input path remains unchanged.
Required Output Format
Schema/Type Changes
Runtime Validation Changes
Load Fallback Changes
Validation
Guardrails
- Do not rely only on UI validation.
- Do not silently coerce invalid values without contract note.
- Local commits may close completed, validated steps/stages; never push unless
the user explicitly requests the remote operation. Follow
docs/ai/workflows/git-commit-push-policy.md.
Failure Policy
If migration is required but out of scope:
- keep backward-compatible loader
- add explicit migration follow-up note