-
Notifications
You must be signed in to change notification settings - Fork 787
Add PRD validation script to fail fast on common mistakes #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add PRD validation script to fail fast on common mistakes #10
Conversation
|
Thanks @RickyVishwakarma. You need to integrate it into the rest of the repo though. How does the agent know to run this check? |
manishin2050
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job
Have you tested..?
That’s a fair point, thanks for calling it out. I intentionally left it unhooked at first to avoid changing the agent’s execution flow without alignment. My assumption was that validation could either be a lightweight pre-flight step or remain manual depending on preference. I’m happy to wire it in, but before doing that — do you prefer this to run automatically at the start of ralph.sh, or should it stay as an explicit/optional step? |
Thanks! Yes — I tested the script locally against prd.json.example and also tried a few failure cases (duplicate IDs and missing required fields) to confirm it fails fast with clear errors. Happy to add or adjust tests if you’d like this covered differently. |
|
@RickyVishwakarma if you can please add a screencast of you running this and demonstrating it, then I'll have a look. |
yes I can provide you screencast here 10-33-05.mp4 |
|
Screencast looks good, thanks! Please wire it into ralph.sh to run automatically at the start. If validation fails, exit before the loop begins. That's the whole point of fail-fast. Once that's in, I'll merge. |
Done — wired PRD validation into ralph.sh so it runs automatically at startup and exits before the loop on failure. Thanks! |
|
@RickyVishwakarma There's a potential issue. The current implementation does not support
|
|
@RickyVishwakarma @tianyili-roller raised a valid point about the boolean handling bug. Can you fix that before I merge? Using |
Good catch — you’re right. Using // empty conflates falsy values with missing fields. I’ve updated the validator to use has() so boolean fields like passes: false are handled correctly while still catching missing fields. Thanks for pointing that out. |
I’ve updated the validator to use jq has() so existence checks don’t conflate falsy values with missing fields. |
I’ve updated the validator to use jq has() for field existence checks so boolean or falsy values are no longer treated as missing. This correctly handles cases like passes: false while still catching genuinely missing fields. The fix is pushed now. Thanks! |
Problem:
Several users (including me) hit avoidable failures when running Ralph
due to small PRD mistakes (duplicate IDs, missing fields, invalid status).
Change:
This PR adds a lightweight PRD validation script that fails fast before
the agent loop starts, saving time and API usage. I also clarified the
PRD format in the README so expectations are explicit.
Why small + separate:
I intentionally kept this out of the main loop to avoid changing Ralph’s
runtime behavior and keep it optional.