Fix duplicate quality criteria rendering in skill templates#184
Closed
Fix duplicate quality criteria rendering in skill templates#184
Conversation
When a step has an output with a doc_spec that includes quality criteria, the template was also rendering a separate "Quality Validation" section with the step-level quality_criteria. This caused agents to see quality criteria twice - once under the output's doc_spec section and again in a separate validation section. The fix checks if any output has doc_spec quality criteria and skips the step-level Quality Validation section when they exist, since the doc_spec criteria are more specific to the output format. Applied to both Claude and Gemini templates. https://claude.ai/code/session_01F5MXLigSjs6jiQU3rsFfHC
Contributor
Author
|
Helpful to know the source, but I want to fix another way |
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
Fixed an issue where skill files were rendering duplicate "Quality Validation" sections when outputs had associated doc_spec quality criteria. The step-level quality criteria section now only appears when no doc_spec quality criteria exist, preventing redundant validation instructions.
Changes Made
Template Logic: Updated both Claude and Gemini skill templates to detect when outputs have doc_spec quality criteria
doc_spec.quality_criteriaskill-job-step.md.jinja(Claude) andskill-job-step.toml.jinja(Gemini)Skill Files: Fixed formatting issues in 24 skill definition files
add_platform.*,commit.*,deepwork_jobs.*,deepwork_rules.*,manual_tests.*, andupdate.jobskillsDocumentation: Updated CHANGELOG.md to document the fix with clear explanation of the behavior change
Implementation Details
The fix uses Jinja2 template logic to:
This ensures that when doc specs define quality criteria (shown under outputs), the step doesn't also render a separate quality validation section, eliminating confusion and redundancy.
https://claude.ai/code/session_01F5MXLigSjs6jiQU3rsFfHC