Skip to content

Feature: Implement PromptValidator for system prompt integrity#332

Merged
vicsanity623 merged 1 commit into
mainfrom
pyob-evolution-v15-1779965474
May 28, 2026
Merged

Feature: Implement PromptValidator for system prompt integrity#332
vicsanity623 merged 1 commit into
mainfrom
pyob-evolution-v15-1779965474

Conversation

@pyob-bot
Copy link
Copy Markdown
Collaborator

Summary of Changes

Introduced a PromptValidator class in src/pyob/prompts.py to ensure the integrity and completeness of the SYSTEM_PROMPTS dictionary. This utility enforces that all required prompt keys are present and contain non-empty content before the system attempts to utilize them.

Technical Impact

  • Validation Logic: Added a static method validate_prompts that checks for a predefined list of mandatory keys (UM.md, RM.md, PP.md, ALF.md, FRE.md, PF.md, IF.md, PCF.md, PIR.md).
  • Error Handling: The validator raises a ValueError if any required key is missing or if the associated prompt content is empty or whitespace-only.
  • System Stability: This change prevents runtime errors caused by missing or malformed prompt templates, ensuring the PyOB engine operates with a complete set of instructions.

Base automatically changed from pyob-evolution-v14-1779965254 to main May 28, 2026 11:22
@vicsanity623 vicsanity623 merged commit e4f555e into main May 28, 2026
1 check passed
@vicsanity623 vicsanity623 deleted the pyob-evolution-v15-1779965474 branch May 28, 2026 11:22
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.

2 participants