一键导入
deepwork-jobsreview-job-spec
Reviews job.yml against quality criteria using a sub-agent for unbiased validation. Use after defining a job specification.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Reviews job.yml against quality criteria using a sub-agent for unbiased validation. Use after defining a job specification.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | deepwork_jobs.review_job_spec |
| description | Reviews job.yml against quality criteria using a sub-agent for unbiased validation. Use after defining a job specification. |
| user-invocable | false |
| hooks | {"Stop":[{"hooks":[{"type":"prompt","prompt":"You must evaluate whether Claude has met all the below quality criteria for the request.\n\n## Quality Criteria\n\n1. **Sub-Agent Used**: Was a sub-agent spawned to provide unbiased review?\n2. **All doc spec Criteria Evaluated**: Did the sub-agent assess all 9 quality criteria?\n3. **Findings Addressed**: Were all failed criteria addressed by the main agent?\n4. **Validation Loop Complete**: Did the review-fix cycle continue until all criteria passed?\n\n## Instructions\n\nReview the conversation and determine if ALL quality criteria above have been satisfied.\nLook for evidence that each criterion has been addressed.\n\nIf the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response OR\nall criteria appear to be met, respond with: {\"ok\": true}\n\nIf criteria are NOT met AND the promise tag is missing, respond with:\n{\"ok\": false, \"reason\": \"**AGENT: TAKE ACTION** - [which criteria failed and why]\"}\n"}]}],"SubagentStop":[{"hooks":[{"type":"prompt","prompt":"You must evaluate whether Claude has met all the below quality criteria for the request.\n\n## Quality Criteria\n\n1. **Sub-Agent Used**: Was a sub-agent spawned to provide unbiased review?\n2. **All doc spec Criteria Evaluated**: Did the sub-agent assess all 9 quality criteria?\n3. **Findings Addressed**: Were all failed criteria addressed by the main agent?\n4. **Validation Loop Complete**: Did the review-fix cycle continue until all criteria passed?\n\n## Instructions\n\nReview the conversation and determine if ALL quality criteria above have been satisfied.\nLook for evidence that each criterion has been addressed.\n\nIf the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response OR\nall criteria appear to be met, respond with: {\"ok\": true}\n\nIf criteria are NOT met AND the promise tag is missing, respond with:\n{\"ok\": false, \"reason\": \"**AGENT: TAKE ACTION** - [which criteria failed and why]\"}\n"}]}]} |
Step 2/4 in deepwork_jobs workflow
Creates and manages multi-step AI workflows. Use when defining, implementing, or improving DeepWork jobs.
Before proceeding, confirm these steps are complete:
/deepwork_jobs.defineGoal: Reviews job.yml against quality criteria using a sub-agent for unbiased validation. Use after defining a job specification.
Review the job.yml created in the define step against the doc spec quality criteria using a sub-agent for unbiased evaluation, then iterate on fixes until all criteria pass.
The define step focuses on understanding user requirements and creating a job specification. This review step ensures the specification meets quality standards before implementation. Using a sub-agent provides an unbiased "fresh eyes" review that catches issues the main agent might miss after being deeply involved in the definition process.
Use a sub-agent to review the job.yml against all 9 doc spec quality criteria, then fix any failed criteria. Repeat until all criteria pass.
Read the job.yml file created in the define step:
.deepwork/jobs/[job_name]/job.yml
Also read the doc spec for reference:
.deepwork/doc_specs/job_spec.md
Use the Task tool to spawn a sub-agent that will provide an unbiased review:
Task tool parameters:
- subagent_type: "general-purpose"
- model: "haiku"
- description: "Review job.yml against doc spec"
- prompt: [see below]
Sub-agent prompt template:
Review this job.yml against the following 9 quality criteria from the doc spec.
For each criterion, respond with:
- PASS or FAIL
- If FAIL: specific issue and suggested fix
## job.yml Content
[paste the full job.yml content here]
## Quality Criteria
1. **Valid Identifier**: Job name must be lowercase with underscores, no spaces or special characters (e.g., `competitive_research`, `monthly_report`)
2. **Semantic Version**: Version must follow semantic versioning format X.Y.Z (e.g., `1.0.0`, `2.1.3`)
3. **Concise Summary**: Summary must be under 200 characters and clearly describe what the job accomplishes
4. **Rich Description**: Description must be multi-line and explain: the problem solved, the process, expected outcomes, and target users
5. **Changelog Present**: Must include a changelog array with at least the initial version entry
6. **Complete Steps**: Each step must have: id (lowercase_underscores), name, description, instructions_file, outputs (at least one), and dependencies array
7. **Valid Dependencies**: Dependencies must reference existing step IDs with no circular references
8. **Input Consistency**: File inputs with `from_step` must reference a step that is in the dependencies array
9. **Output Paths**: Outputs must be valid filenames or paths (e.g., `report.md` or `reports/analysis.md`)
## Response Format
Respond with a structured evaluation:
### Overall: [X/9 PASS]
### Criterion Results
1. Valid Identifier: [PASS/FAIL]
[If FAIL: Issue and fix]
2. Semantic Version: [PASS/FAIL]
[If FAIL: Issue and fix]
[... continue for all 9 criteria ...]
### Summary of Required Fixes
[List any fixes needed, or "No fixes required - all criteria pass"]
Parse the sub-agent's response:
For each failed criterion, edit the job.yml to address the issue:
Common fixes by criterion:
| Criterion | Common Issue | Fix |
|---|---|---|
| Valid Identifier | Spaces or uppercase | Convert to lowercase_underscores |
| Semantic Version | Missing or invalid format | Set to "1.0.0" or fix format |
| Concise Summary | Too long or vague | Shorten to <200 chars, be specific |
| Rich Description | Single line or missing context | Add multi-line explanation with problem/process/outcome/users |
| Changelog Present | Missing changelog | Add changelog: with initial version entry |
| Complete Steps | Missing required fields | Add id, name, description, instructions_file, outputs, dependencies |
| Valid Dependencies | Non-existent step or circular | Fix step ID reference or reorder dependencies |
| Input Consistency | from_step not in dependencies | Add the referenced step to dependencies array |
| Output Paths | Invalid characters or format | Use valid filename/path format |
If any criteria failed:
When all 9 criteria pass:
<promise>Quality Criteria Met</promise>/deepwork_jobs.implement to generate the step instruction files."Claude: Let me review the job.yml against the doc spec quality criteria.
[Spawns sub-agent with haiku model]
Sub-agent response:
### Overall: 7/9 PASS
### Criterion Results
1. Valid Identifier: PASS
2. Semantic Version: PASS
3. Concise Summary: FAIL
Issue: Summary is 245 characters, exceeds 200 char limit
Fix: Shorten to "Competitive analysis workflow for product positioning"
4. Rich Description: PASS
5. Changelog Present: FAIL
Issue: No changelog array present
Fix: Add changelog with initial version entry
6. Complete Steps: PASS
7. Valid Dependencies: PASS
8. Input Consistency: PASS
9. Output Paths: PASS
### Summary of Required Fixes
1. Shorten summary to under 200 characters
2. Add changelog array with initial version
Claude: I found 2 issues. Let me fix them.
[Edits job.yml to shorten summary and add changelog]
Claude: Let me verify the fixes with another review.
[Spawns new sub-agent]
Sub-agent response:
### Overall: 9/9 PASS
### Summary of Required Fixes
No fixes required - all criteria pass
Claude: All 9 doc spec quality criteria pass.
<promise>Quality Criteria Met</promise>
**Next step:** Run `/deepwork_jobs.implement` to generate the step instruction files.
<promise>Quality Criteria Met</promise> when completeThe validated job.yml file at .deepwork/jobs/[job_name]/job.yml that passes all 9 doc spec quality criteria.
Core commands for managing DeepWork jobs. These commands help you define new multi-step workflows and learn from running them.
The define command guides you through an interactive process to create a new job by
asking structured questions about your workflow, understanding each step's inputs and outputs,
and generating all necessary files.
The learn command reflects on conversations where DeepWork jobs were run, identifies
confusion or inefficiencies, and improves job instructions. It also captures bespoke
learnings specific to the current run into AGENTS.md files in the working folder.
Files from Previous Steps - Read these first:
job.yml (from define)Use branch format: deepwork/deepwork_jobs-[instance]-YYYYMMDD
git checkout -b deepwork/deepwork_jobs-[instance]-$(date +%Y%m%d)Required outputs:
job.yml
Doc Spec: DeepWork Job Specification
YAML specification file that defines a multi-step workflow job for AI agents Definition:
.deepwork/doc_specs/job_spec.mdTarget Audience: AI agents executing jobs and developers defining workflows Quality Criteria:
competitive_research, monthly_report)1.0.0, 2.1.3)from_step must reference a step that is in the dependencies arraycompetitive_research/competitors_list.md or competitive_research/[competitor_name]/research.md. Avoid generic names like output.md.# DeepWork Job Specification: [job_name]
A `job.yml` file defines a complete multi-step workflow that AI agents can execute. Each job breaks down a complex task into reviewable steps with clear inputs and outputs.
## Required Fields
### Top-Level Metadata
```yaml
name: job_name # lowercase, underscores only
version: "1.0.0" # semantic versioning
summary: "Brief description" # max 200 characters
description: | # detailed multi-line explanation
[Explain what this workflow does, why it exists,
what outputs it produces, and who should use it]
changelog:
- version: "1.0.0"
changes: "Initial job creation"
- version: "1.1.0"
changes: "Added quality validation hooks"
steps:
- id: step_id # unique, lowercase_underscores
name: "Human Readable Name"
description: "What this step accomplishes"
instructions_file: steps/step_id.md
inputs:
# User-provided inputs:
- name: param_name
description: "What the user provides"
# File inputs from previous steps:
- file: output.md
from_step: previous_step_id
outputs:
- competitive_research/competitors_list.md # descriptive path
- competitive_research/[competitor_name]/research.md # parameterized path
# With doc spec reference:
- file: competitive_research/final_report.md
doc_spec: .deepwork/doc_specs/report_type.md
dependencies:
- previous_step_id # steps that must complete first
steps:
- id: learn
exposed: true # Makes step available without running dependencies
steps:
- id: step_id
hooks:
after_agent:
# Inline prompt for quality validation:
- prompt: |
Verify the output meets criteria:
1. [Criterion 1]
2. [Criterion 2]
If ALL criteria are met, include `<promise>...</promise>`.
# External prompt file:
- prompt_file: hooks/quality_check.md
# Script for programmatic validation:
- script: hooks/run_tests.sh
steps:
- id: step_id
stop_hooks:
- prompt: "Validation prompt..."
- prompt_file: hooks/check.md
- script: hooks/validate.sh
from_step: X, then X must be in its dependenciesinstructions_file path should have a corresponding file createdname: competitive_research
version: "1.0.0"
summary: "Systematic competitive analysis workflow"
description: |
A comprehensive workflow for analyzing competitors in your market segment.
Helps product teams understand the competitive landscape through systematic
identification, research, comparison, and positioning recommendations.
Produces:
- Vetted competitor list
- Research notes per competitor
- Comparison matrix
- Strategic positioning report
changelog:
- version: "1.0.0"
changes: "Initial job creation"
steps:
- id: identify_competitors
name: "Identify Competitors"
description: "Identify 5-7 key competitors in the target market"
instructions_file: steps/identify_competitors.md
inputs:
- name: market_segment
description: "The market segment to analyze"
- name: product_category
description: "The product category"
outputs:
- competitive_research/competitors_list.md
dependencies: []
- id: research_competitors
name: "Research Competitors"
description: "Deep dive research on each identified competitor"
instructions_file: steps/research_competitors.md
inputs:
- file: competitive_research/competitors_list.md
from_step: identify_competitors
outputs:
- competitive_research/[competitor_name]/research.md
dependencies:
- identify_competitors
- id: positioning_report
name: "Positioning Report"
description: "Strategic positioning recommendations"
instructions_file: steps/positioning_report.md
inputs:
- file: competitive_research/[competitor_name]/research.md
from_step: research_competitors
outputs:
- file: competitive_research/positioning_report.md
doc_spec: .deepwork/doc_specs/positioning_report.md
dependencies:
- research_competitors
</details>
Stop hooks will automatically validate your work. The loop continues until all criteria pass.
Criteria (all must be satisfied):
To complete: Include <promise>✓ Quality Criteria Met</promise> in your final response only after verifying ALL criteria are satisfied.
/deepwork_jobs.implementReference files: .deepwork/jobs/deepwork_jobs/job.yml, .deepwork/jobs/deepwork_jobs/steps/review_job_spec.md
Calculate current allocation percentages, identify drift from targets, analyze margin efficiency
Gather current portfolio positions, values, and prices from Robinhood using bin/robinhood CLI
Create specific rebalancing recommendations based on drift analysis
Compile comprehensive human-readable daily report with all analysis and recommendations
Daily Permanent Portfolio analysis with allocation drift and rebalancing recommendations
Creates a job.yml specification by gathering workflow requirements through structured questions. Use when starting a new multi-step workflow.