diff --git a/.claude/skills/add_platform.add_capabilities/SKILL.md b/.claude/skills/add_platform.add_capabilities/SKILL.md index 17359135..3ca6051a 100644 --- a/.claude/skills/add_platform.add_capabilities/SKILL.md +++ b/.claude/skills/add_platform.add_capabilities/SKILL.md @@ -203,9 +203,7 @@ Use branch format: `deepwork/add_platform-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## On Completion +- Do NOT modify files outside the scope of this step's defined outputs## On Completion 1. Verify outputs are created 2. Inform user: "integrate step 2/4 complete, outputs: job_schema.py, adapters.py" diff --git a/.claude/skills/add_platform.implement/SKILL.md b/.claude/skills/add_platform.implement/SKILL.md index 5d925402..a4a5b47b 100644 --- a/.claude/skills/add_platform.implement/SKILL.md +++ b/.claude/skills/add_platform.implement/SKILL.md @@ -307,9 +307,7 @@ Use branch format: `deepwork/add_platform-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -**Validation script**: `.deepwork/jobs/add_platform/hooks/run_tests.sh` (runs automatically) +- Do NOT modify files outside the scope of this step's defined outputs**Validation script**: `.deepwork/jobs/add_platform/hooks/run_tests.sh` (runs automatically) ## On Completion 1. Verify outputs are created diff --git a/.claude/skills/add_platform.research/SKILL.md b/.claude/skills/add_platform.research/SKILL.md index d113d3e9..da766e57 100644 --- a/.claude/skills/add_platform.research/SKILL.md +++ b/.claude/skills/add_platform.research/SKILL.md @@ -252,9 +252,7 @@ Use branch format: `deepwork/add_platform-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## On Completion +- Do NOT modify files outside the scope of this step's defined outputs## On Completion 1. Verify outputs are created 2. Inform user: "integrate step 1/4 complete, outputs: cli_configuration.md, hooks_system.md" diff --git a/.claude/skills/add_platform.verify/SKILL.md b/.claude/skills/add_platform.verify/SKILL.md index 27101223..fc714401 100644 --- a/.claude/skills/add_platform.verify/SKILL.md +++ b/.claude/skills/add_platform.verify/SKILL.md @@ -178,9 +178,7 @@ Use branch format: `deepwork/add_platform-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## On Completion +- Do NOT modify files outside the scope of this step's defined outputs## On Completion 1. Verify outputs are created 2. Inform user: "integrate step 4/4 complete, outputs: verification_checklist.md" diff --git a/.claude/skills/commit.commit_and_push/SKILL.md b/.claude/skills/commit.commit_and_push/SKILL.md index 1ec4e5c9..10902df0 100644 --- a/.claude/skills/commit.commit_and_push/SKILL.md +++ b/.claude/skills/commit.commit_and_push/SKILL.md @@ -147,9 +147,7 @@ Use branch format: `deepwork/commit-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## Quality Validation +- Do NOT modify files outside the scope of this step's defined outputs## Quality Validation **Before completing this step, you MUST have your work reviewed against the quality criteria below.** diff --git a/.claude/skills/commit.lint/SKILL.md b/.claude/skills/commit.lint/SKILL.md index 0f16873e..599491c6 100644 --- a/.claude/skills/commit.lint/SKILL.md +++ b/.claude/skills/commit.lint/SKILL.md @@ -128,9 +128,7 @@ Use branch format: `deepwork/commit-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## Quality Validation +- Do NOT modify files outside the scope of this step's defined outputs## Quality Validation **Before completing this step, you MUST have your work reviewed against the quality criteria below.** diff --git a/.claude/skills/commit.review/SKILL.md b/.claude/skills/commit.review/SKILL.md index f4074077..329a2571 100644 --- a/.claude/skills/commit.review/SKILL.md +++ b/.claude/skills/commit.review/SKILL.md @@ -109,9 +109,7 @@ Use branch format: `deepwork/commit-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## Quality Validation +- Do NOT modify files outside the scope of this step's defined outputs## Quality Validation **Before completing this step, you MUST have your work reviewed against the quality criteria below.** diff --git a/.claude/skills/commit.test/SKILL.md b/.claude/skills/commit.test/SKILL.md index cddf224a..ef6bbe84 100644 --- a/.claude/skills/commit.test/SKILL.md +++ b/.claude/skills/commit.test/SKILL.md @@ -109,9 +109,7 @@ Use branch format: `deepwork/commit-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## Quality Validation +- Do NOT modify files outside the scope of this step's defined outputs## Quality Validation **Before completing this step, you MUST have your work reviewed against the quality criteria below.** diff --git a/.claude/skills/deepwork_jobs.define/SKILL.md b/.claude/skills/deepwork_jobs.define/SKILL.md index a6ec07d3..31a8a944 100644 --- a/.claude/skills/deepwork_jobs.define/SKILL.md +++ b/.claude/skills/deepwork_jobs.define/SKILL.md @@ -637,35 +637,7 @@ Use branch format: `deepwork/deepwork_jobs-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## Quality Validation - -**Before completing this step, you MUST have your work reviewed against the quality criteria below.** - -Use a sub-agent (Haiku model) to review your work against these criteria: - -**Criteria (all must be satisfied)**: -1. **User Understanding**: Did the agent fully understand the user's workflow by asking structured questions? -2. **Structured Questions Used**: Did the agent ask structured questions (using the AskUserQuestion tool) to gather user input? -3. **Document Detection**: For document-oriented workflows, did the agent detect patterns and offer doc spec creation? -4. **doc spec Created (if applicable)**: If a doc spec was needed, was it created in `.deepwork/doc_specs/[doc_spec_name].md` with proper quality criteria? -5. **doc spec References**: Are document outputs properly linked to their doc specs using `{file, doc_spec}` format? -6. **Valid Against doc spec**: Does the job.yml conform to the job.yml doc spec quality criteria (valid identifier, semantic version, concise summary, rich description, complete steps, valid dependencies)? -7. **Clear Inputs/Outputs**: Does every step have clearly defined inputs and outputs? -8. **Logical Dependencies**: Do step dependencies make sense and avoid circular references? -9. **Concise Summary**: Is the summary under 200 characters and descriptive? -10. **Rich Description**: Does the description provide enough context for future refinement? -11. **Valid Schema**: Does the job.yml follow the required schema (name, version, summary, steps)? -12. **File Created**: Has the job.yml file been created in `.deepwork/jobs/[job_name]/job.yml`? -**Review Process**: -1. Once you believe your work is complete, spawn a sub-agent using Haiku to review your work against the quality criteria above -2. The sub-agent should examine your outputs and verify each criterion is met -3. If the sub-agent identifies valid issues, fix them -4. Have the sub-agent review again until all valid feedback has been addressed -5. Only mark the step complete when the sub-agent confirms all criteria are satisfied - -## On Completion +- Do NOT modify files outside the scope of this step's defined outputs## On Completion 1. Verify outputs are created 2. Inform user: "new_job step 1/3 complete, outputs: job.yml" diff --git a/.claude/skills/deepwork_jobs.implement/SKILL.md b/.claude/skills/deepwork_jobs.implement/SKILL.md index c9510269..f86f16e4 100644 --- a/.claude/skills/deepwork_jobs.implement/SKILL.md +++ b/.claude/skills/deepwork_jobs.implement/SKILL.md @@ -299,9 +299,7 @@ Use branch format: `deepwork/deepwork_jobs-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## Quality Validation +- Do NOT modify files outside the scope of this step's defined outputs## Quality Validation **Before completing this step, you MUST have your work reviewed against the quality criteria below.** diff --git a/.claude/skills/deepwork_jobs.learn/SKILL.md b/.claude/skills/deepwork_jobs.learn/SKILL.md index f2db5a56..0cff82fb 100644 --- a/.claude/skills/deepwork_jobs.learn/SKILL.md +++ b/.claude/skills/deepwork_jobs.learn/SKILL.md @@ -411,9 +411,7 @@ Use branch format: `deepwork/deepwork_jobs-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## Quality Validation +- Do NOT modify files outside the scope of this step's defined outputs## Quality Validation **Before completing this step, you MUST have your work reviewed against the quality criteria below.** diff --git a/.claude/skills/deepwork_jobs.review_job_spec/SKILL.md b/.claude/skills/deepwork_jobs.review_job_spec/SKILL.md index 99a565ef..87905cc8 100644 --- a/.claude/skills/deepwork_jobs.review_job_spec/SKILL.md +++ b/.claude/skills/deepwork_jobs.review_job_spec/SKILL.md @@ -452,27 +452,7 @@ Use branch format: `deepwork/deepwork_jobs-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## Quality Validation - -**Before completing this step, you MUST have your work reviewed against the quality criteria below.** - -Use a sub-agent (Haiku model) to review your work against these criteria: - -**Criteria (all must be satisfied)**: -1. **Sub-Agent Used**: Was a sub-agent spawned to provide unbiased review? -2. **All doc spec Criteria Evaluated**: Did the sub-agent assess all 9 quality criteria? -3. **Findings Addressed**: Were all failed criteria addressed by the main agent? -4. **Validation Loop Complete**: Did the review-fix cycle continue until all criteria passed? -**Review Process**: -1. Once you believe your work is complete, spawn a sub-agent using Haiku to review your work against the quality criteria above -2. The sub-agent should examine your outputs and verify each criterion is met -3. If the sub-agent identifies valid issues, fix them -4. Have the sub-agent review again until all valid feedback has been addressed -5. Only mark the step complete when the sub-agent confirms all criteria are satisfied - -## On Completion +- Do NOT modify files outside the scope of this step's defined outputs## On Completion 1. Verify outputs are created 2. Inform user: "new_job step 2/3 complete, outputs: job.yml" diff --git a/.claude/skills/deepwork_rules.define/SKILL.md b/.claude/skills/deepwork_rules.define/SKILL.md index 6a33878c..27940dc5 100644 --- a/.claude/skills/deepwork_rules.define/SKILL.md +++ b/.claude/skills/deepwork_rules.define/SKILL.md @@ -317,9 +317,7 @@ Use branch format: `deepwork/deepwork_rules-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## On Completion +- Do NOT modify files outside the scope of this step's defined outputs## On Completion 1. Verify outputs are created 2. Inform user: "define complete, outputs: .deepwork/rules/{rule-name}.md" diff --git a/.claude/skills/manual_tests.infinite_block_tests/SKILL.md b/.claude/skills/manual_tests.infinite_block_tests/SKILL.md index f372511e..2907bfee 100644 --- a/.claude/skills/manual_tests.infinite_block_tests/SKILL.md +++ b/.claude/skills/manual_tests.infinite_block_tests/SKILL.md @@ -222,9 +222,7 @@ Use branch format: `deepwork/manual_tests-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## Quality Validation +- Do NOT modify files outside the scope of this step's defined outputs## Quality Validation **Before completing this step, you MUST have your work reviewed against the quality criteria below.** diff --git a/.claude/skills/manual_tests.reset/SKILL.md b/.claude/skills/manual_tests.reset/SKILL.md index c7080667..639b4b36 100644 --- a/.claude/skills/manual_tests.reset/SKILL.md +++ b/.claude/skills/manual_tests.reset/SKILL.md @@ -115,9 +115,7 @@ Use branch format: `deepwork/manual_tests-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## Quality Validation +- Do NOT modify files outside the scope of this step's defined outputs## Quality Validation **Before completing this step, you MUST have your work reviewed against the quality criteria below.** diff --git a/.claude/skills/manual_tests.run_fire_tests/SKILL.md b/.claude/skills/manual_tests.run_fire_tests/SKILL.md index 307f035c..300292d8 100644 --- a/.claude/skills/manual_tests.run_fire_tests/SKILL.md +++ b/.claude/skills/manual_tests.run_fire_tests/SKILL.md @@ -218,9 +218,7 @@ Use branch format: `deepwork/manual_tests-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## Quality Validation +- Do NOT modify files outside the scope of this step's defined outputs## Quality Validation **Before completing this step, you MUST have your work reviewed against the quality criteria below.** diff --git a/.claude/skills/manual_tests.run_not_fire_tests/SKILL.md b/.claude/skills/manual_tests.run_not_fire_tests/SKILL.md index bdcbc58f..b9a60bca 100644 --- a/.claude/skills/manual_tests.run_not_fire_tests/SKILL.md +++ b/.claude/skills/manual_tests.run_not_fire_tests/SKILL.md @@ -204,9 +204,7 @@ Use branch format: `deepwork/manual_tests-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## Quality Validation +- Do NOT modify files outside the scope of this step's defined outputs## Quality Validation **Before completing this step, you MUST have your work reviewed against the quality criteria below.** diff --git a/.claude/skills/update.job/SKILL.md b/.claude/skills/update.job/SKILL.md index 44e92fe9..1fb14ca0 100644 --- a/.claude/skills/update.job/SKILL.md +++ b/.claude/skills/update.job/SKILL.md @@ -131,9 +131,7 @@ Use branch format: `deepwork/update-[instance]-YYYYMMDD` - Do NOT skip prerequisite verification if this step has dependencies - Do NOT produce partial outputs; complete all required outputs before finishing - Do NOT proceed without required inputs; ask the user if any are missing -- Do NOT modify files outside the scope of this step's defined outputs - -## On Completion +- Do NOT modify files outside the scope of this step's defined outputs## On Completion 1. Verify outputs are created 2. Inform user: "job complete, outputs: files_synced" diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fbcd172..9e3b6c8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - SessionStart hook now skips non-initial sessions (resume, compact/clear) by checking the `source` field in stdin JSON, reducing noise and redundant checks ### Fixed +- Fixed duplicate quality criteria rendering in generated skill files + - Steps with outputs having doc_spec quality criteria no longer render a separate "Quality Validation" section + - Doc spec criteria are shown under outputs; step-level criteria are only shown when no doc_spec criteria exist + - Applies to both Claude and Gemini templates - Fixed skill template generating malformed YAML frontmatter with fields concatenated on single lines - Removed over-aggressive `{%-` whitespace stripping from Jinja template - Fields like `user-invocable` and `hooks` now render on proper separate lines diff --git a/src/deepwork/templates/claude/skill-job-step.md.jinja b/src/deepwork/templates/claude/skill-job-step.md.jinja index 4d11c849..11d68ba9 100644 --- a/src/deepwork/templates/claude/skill-job-step.md.jinja +++ b/src/deepwork/templates/claude/skill-job-step.md.jinja @@ -200,7 +200,15 @@ No specific file outputs required. - Do NOT proceed without required inputs; ask the user if any are missing - Do NOT modify files outside the scope of this step's defined outputs -{% if quality_criteria %} +{#- Check if any output has doc_spec quality criteria to avoid duplicate quality validation sections #} +{%- set has_doc_spec_quality = namespace(value=false) -%} +{%- for output in outputs -%} +{%- if output.has_doc_spec and output.doc_spec and output.doc_spec.quality_criteria -%} +{%- set has_doc_spec_quality.value = true -%} +{%- endif -%} +{%- endfor -%} +{#- Only show step-level quality_criteria if no doc_spec quality criteria exist (avoids duplication) #} +{% if quality_criteria and not has_doc_spec_quality.value %} ## Quality Validation **Before completing this step, you MUST have your work reviewed against the quality criteria below.** @@ -218,7 +226,7 @@ Use a sub-agent (Haiku model) to review your work against these criteria: 4. Have the sub-agent review again until all valid feedback has been addressed 5. Only mark the step complete when the sub-agent confirms all criteria are satisfied -{% endif %}{#- if quality_criteria #} +{% endif %}{#- if quality_criteria and not has_doc_spec_quality.value #} {% if stop_hooks -%} {% for hook in stop_hooks -%} {% if hook.type == "script" -%} diff --git a/src/deepwork/templates/gemini/skill-job-step.toml.jinja b/src/deepwork/templates/gemini/skill-job-step.toml.jinja index 946bec5c..95e190c6 100644 --- a/src/deepwork/templates/gemini/skill-job-step.toml.jinja +++ b/src/deepwork/templates/gemini/skill-job-step.toml.jinja @@ -127,7 +127,15 @@ Use branch format: `deepwork/{{ job_name }}-[instance]-YYYYMMDD` No specific file outputs required. {% endif %} -{% if quality_criteria or stop_hooks %} +{#- Check if any output has doc_spec quality criteria to avoid duplicate quality validation sections #} +{%- set has_doc_spec_quality = namespace(value=false) -%} +{%- for output in outputs -%} +{%- if output.has_doc_spec and output.doc_spec and output.doc_spec.quality_criteria -%} +{%- set has_doc_spec_quality.value = true -%} +{%- endif -%} +{%- endfor -%} +{#- Only show step-level quality_criteria if no doc_spec quality criteria exist (avoids duplication) #} +{% if (quality_criteria or stop_hooks) and not has_doc_spec_quality.value %} ## Quality Validation (Manual) **NOTE**: Gemini CLI does not support automated validation. Manually verify criteria before completing.