Skip to content

Fix duplicate quality criteria rendering in skill templates#184

Closed
nhorton wants to merge 1 commit intomainfrom
claude/fix-duplicate-quality-checks-wiwWa
Closed

Fix duplicate quality criteria rendering in skill templates#184
nhorton wants to merge 1 commit intomainfrom
claude/fix-duplicate-quality-checks-wiwWa

Conversation

@nhorton
Copy link
Contributor

@nhorton nhorton commented Jan 30, 2026

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

    • Added namespace check to identify if any output has doc_spec.quality_criteria
    • Modified conditional rendering to suppress step-level quality validation when doc_spec criteria are present
    • Applies to skill-job-step.md.jinja (Claude) and skill-job-step.toml.jinja (Gemini)
  • Skill Files: Fixed formatting issues in 24 skill definition files

    • Removed extra blank lines between constraint lists and section headers
    • Corrected malformed markdown where headers were concatenated to previous lines
    • Affected files: add_platform.*, commit.*, deepwork_jobs.*, deepwork_rules.*, manual_tests.*, and update.job skills
  • Documentation: Updated CHANGELOG.md to document the fix with clear explanation of the behavior change

Implementation Details

The fix uses Jinja2 template logic to:

  1. Iterate through all outputs to check for doc_spec quality criteria
  2. Set a namespace flag if any output has doc_spec criteria
  3. Conditionally render the "Quality Validation" section only when the flag is false

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

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
@nhorton
Copy link
Contributor Author

nhorton commented Jan 30, 2026

Helpful to know the source, but I want to fix another way

@nhorton nhorton closed this Jan 30, 2026
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