Skip to content

Fix conservative openai.yaml regeneration and validate agents config#346

Open
wsk-builds wants to merge 1 commit intoopenai:mainfrom
wsk-builds:fix/generate-openai-yaml-quick-validate
Open

Fix conservative openai.yaml regeneration and validate agents config#346
wsk-builds wants to merge 1 commit intoopenai:mainfrom
wsk-builds:fix/generate-openai-yaml-quick-validate

Conversation

@wsk-builds
Copy link
Copy Markdown

Summary

  • make generate_openai_yaml.py update agents/openai.yaml conservatively instead of overwriting non-interface sections
  • make quick_validate.py validate agents/openai.yaml syntax and core structure in addition to SKILL.md
  • add targeted regression tests covering metadata preservation and invalid YAML detection

Problem

generate_openai_yaml.py currently rewrites the entire agents/openai.yaml file from scratch. Re-running it can silently drop existing fields such as dependencies, icons, and default_prompt, even though those are documented as supported structure in references/openai_yaml.md.

quick_validate.py also only validates SKILL.md frontmatter today. A skill can contain an invalid or structurally broken agents/openai.yaml and still pass validation.

Changes

Conservative regeneration

  • load any existing agents/openai.yaml before regenerating
  • reject regeneration when the existing file is invalid YAML or has a non-mapping top-level/interface shape
  • update the required interface.display_name and interface.short_description fields
  • apply any explicit interface overrides passed on the command line
  • preserve existing non-interface sections, including dependencies
  • preserve existing interface keys that were not explicitly overridden

Validation coverage

  • add agents/openai.yaml validation to quick_validate.py
  • fail on invalid YAML, empty files, non-mapping top-level documents, non-mapping interface/dependencies, and malformed dependencies.tools
  • check that the core documented string fields under interface and dependencies.tools[] have string values

Regression tests

  • add a focused unittest module for the skill-creator scripts
  • cover preservation of existing dependencies and interface metadata during regeneration
  • cover rejection of invalid existing agents/openai.yaml
  • cover validator success on a valid agents/openai.yaml and failure on invalid YAML

Validation

  • python3 skills/.system/skill-creator/scripts/skill_creator_scripts_test.py
  • python3 skills/.system/skill-creator/scripts/quick_validate.py skills/.system/skill-creator
  • python3 skills/.system/skill-creator/scripts/quick_validate.py skills/.system/openai-docs

@wsk-builds wsk-builds requested a review from a team April 13, 2026 15:17
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