Skip to content

Fix/example schema validation - #1

Merged
oddtitoreal merged 2 commits into
mainfrom
fix/example-schema-validation
Aug 13, 2026
Merged

oddtitoreal merged 2 commits into
mainfrom
fix/example-schema-validation

Conversation

@oddtitoreal

Copy link
Copy Markdown
Owner

No description provided.

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.
@oddtitoreal
oddtitoreal merged commit 455fd76 into main Aug 13, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant