Fix/example schema validation - #1
Conversation
Rename transition ids t_* -> transition_* to match the schema pattern ^transition_[a-z0-9_]+$, and change guard action_on_violation 'revise' -> 'retry' (allowed enum value). Fixes 11 schema violations; the example previously failed references/schemas-statemachine.json validation while the validation harness (validation-results.txt) only covered the other example.
Adds .github/workflows/validate-examples.yml running scripts/validate_specula.py over every examples/*/ (constitution + state machine + integration). Existing CI only checked SKILL.md front matter, so example<->schema drift went uncaught.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ff2ce74395
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for dir in examples/*/; do | ||
| const="${dir}constitution.json" | ||
| sm="${dir}state-machine.json" | ||
| if [[ -f "$const" && -f "$sm" ]]; then |
There was a problem hiding this comment.
Fail when an example is missing a required artifact
When a PR deletes, renames, or forgets either constitution.json or state-machine.json, this condition skips the directory entirely and the workflow reports that all examples passed. Since examples/README.md defines both artifacts as required for every example, handle missing files as a validation failure rather than silently bypassing the example.
Useful? React with 👍 / 👎.
No description provided.