feat: Classify prose/empty LLM output as ProseOutputError before architecture gate (#1649)#1665
Open
prompt-driven-github[bot] wants to merge 4 commits into
Open
feat: Classify prose/empty LLM output as ProseOutputError before architecture gate (#1649)#1665prompt-driven-github[bot] wants to merge 4 commits into
prompt-driven-github[bot] wants to merge 4 commits into
Conversation
…1649) - prompts/code_generator_main_python.prompt: add ProseOutputError to pdd-interface CLI block; add Requirement 5a for prose/empty-output classification gate (raises before architecture conformance gate when extractor returns no code); add Deliverable 8 for the new exception class - prompts/agentic_sync_runner_python.prompt: add build_prose_output_hard_failure_from_error to pdd-interface; update Requirement 9b to check prose failures first with 1-attempt cap; update 9c short-circuit with ("prose",) sentinel; update 9d with === generation output extraction failure === block; add _parse_prose_output_failure and build_prose_output_hard_failure_from_error helper specs - README.md: add Prose/empty-output classification gate bullet before Empty-generation guard; update On-failure sentence with ProseOutputError and new structured failure block name - CHANGELOG.md: add feat bullet for sync ProseOutputError classification Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add build_prose_output_hard_failure_from_error to agentic_sync_runner interface; update description to reflect four repairable failure types including prose-output detection, 1-attempt cap, and the new hard-failure block name. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Convert literal em-dash and multiplication sign characters to their JSON Unicode escape sequences (\u2014, \u00d7) for consistent encoding. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add issue-derived user story and machine-checkable contract for agentic_sync_runner and code_generator_main prompt changes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
ProseOutputErrorclassification gate that fires before the architecture conformance check when an LLM returns prose or an empty/whitespace-only response instead of source code. This prevents prose/planning responses from being misreported as architecture-conformance failures.Closes #1649
Changes Made
Prompts Modified
pdd/prompts/code_generator_main_python.prompt— AddedProseOutputError(click.UsageError)typed exception and Requirement 5a: prose/empty-output classification gate that fires before architecture/public-surface checks whengenerated_code_contentis blank; includesrepair_directiveproperty returning the output-shape instruction; escape hatch viaPDD_ALLOW_EMPTY_GENERATION=1pdd/prompts/agentic_sync_runner_python.prompt— Added_parse_prose_output_failurehelper (checked first, before conformance/surface/churn), limited to 1 prose retry (2 total attempts); addedbuild_prose_output_hard_failure_from_errorexport; added=== generation output extraction failure ===hard-failure blockDocumentation Updated
README.md— Added "Prose/empty-output classification gate" bullet; updated "On failure" sentence to mentionProseOutputErrorprose retry and the new hard-failure block nameCHANGELOG.md— Added feat bullet forProseOutputErrorclassification gate, prose retry limit, hard-failure block, and escape hatchArchitecture Metadata
architecture.json— Synced withProseOutputErroradditions (normalized special character encoding)User Stories
warnuser_stories/story__agentic_sync_runner_code_generator_main.md— issue-derived story linked to:agentic_sync_runner_python.prompt,code_generator_main_python.promptuser_stories/contracts/agentic_sync_runner_code_generator_main.contract.md— generated machine-checkable contractuser_stories/story__agentic_sync_runner_code_generator_main.mdReview Checklist
Next Steps After Merge
Created by pdd change workflow