一键导入
deepwork-jobsimplement
Generates step instruction files and syncs slash commands from the job.yml specification. Use after job spec review passes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generates step instruction files and syncs slash commands from the job.yml specification. Use after job spec review passes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
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.
| name | deepwork_jobs.implement |
| description | Generates step instruction files and syncs slash commands from the job.yml specification. Use after job spec review passes. |
| 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. **Directory Structure**: Is `.deepwork/jobs/[job_name]/` created correctly?\n2. **Complete Instructions**: Are ALL step instruction files complete (not stubs or placeholders)?\n3. **Specific & Actionable**: Are instructions tailored to each step's purpose, not generic?\n4. **Output Examples**: Does each instruction file show what good output looks like?\n5. **Quality Criteria**: Does each instruction file define quality criteria for its outputs?\n6. **Ask Structured Questions**: Do step instructions that gather user input explicitly use the phrase \"ask structured questions\"?\n7. **Sync Complete**: Has `deepwork sync` been run successfully?\n8. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?\n9. **Rules Considered**: Has the agent thought about whether rules would benefit this job? If relevant rules were identified, did they explain them and offer to run `/deepwork_rules.define`? Not every job needs rules - only suggest when genuinely helpful.\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. **Directory Structure**: Is `.deepwork/jobs/[job_name]/` created correctly?\n2. **Complete Instructions**: Are ALL step instruction files complete (not stubs or placeholders)?\n3. **Specific & Actionable**: Are instructions tailored to each step's purpose, not generic?\n4. **Output Examples**: Does each instruction file show what good output looks like?\n5. **Quality Criteria**: Does each instruction file define quality criteria for its outputs?\n6. **Ask Structured Questions**: Do step instructions that gather user input explicitly use the phrase \"ask structured questions\"?\n7. **Sync Complete**: Has `deepwork sync` been run successfully?\n8. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?\n9. **Rules Considered**: Has the agent thought about whether rules would benefit this job? If relevant rules were identified, did they explain them and offer to run `/deepwork_rules.define`? Not every job needs rules - only suggest when genuinely helpful.\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 3/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.review_job_specGoal: Generates step instruction files and syncs slash commands from the job.yml specification. Use after job spec review passes.
Generate the DeepWork job directory structure and instruction files for each step based on the validated job.yml specification from the review_job_spec step.
Read the job.yml specification file and create all the necessary files to make the job functional, including directory structure and step instruction files. Then sync the commands to make them available.
Run the make_new_job.sh script to create the standard directory structure:
.deepwork/jobs/deepwork_jobs/make_new_job.sh [job_name]
This creates:
.deepwork/jobs/[job_name]/ - Main job directory.deepwork/jobs/[job_name]/steps/ - Step instruction files.deepwork/jobs/[job_name]/hooks/ - Custom validation scripts (with .gitkeep).deepwork/jobs/[job_name]/templates/ - Example file formats (with .gitkeep).deepwork/jobs/[job_name]/AGENTS.md - Job management guidanceNote: If the directory already exists (e.g., job.yml was created by define step), you can skip this step or manually create the additional directories:
mkdir -p .deepwork/jobs/[job_name]/hooks .deepwork/jobs/[job_name]/templates
touch .deepwork/jobs/[job_name]/hooks/.gitkeep .deepwork/jobs/[job_name]/templates/.gitkeep
Locate the job.yml file
.deepwork/jobs/[job_name]/job.yml from the review_job_spec stepValidate the specification
Extract key information
For each step in the job.yml, create a comprehensive instruction file at .deepwork/jobs/[job_name]/steps/[step_id].md.
Template reference: See .deepwork/jobs/deepwork_jobs/templates/step_instruction.md.template for the standard structure.
Complete example: See .deepwork/jobs/deepwork_jobs/templates/step_instruction.md.example for a fully worked example.
Available templates in .deepwork/jobs/deepwork_jobs/templates/:
job.yml.template - Job specification structurestep_instruction.md.template - Step instruction file structureagents.md.template - AGENTS.md file structurejob.yml.example - Complete job specification examplestep_instruction.md.example - Complete step instruction exampleGuidelines for generating instructions:
stop_hooks defined, ensure the quality criteria in the instruction file match the validation criteria in the hooksIf a step in the job.yml has stop_hooks defined, the generated instruction file should:
<promise>✓ Quality Criteria Met</promise> should be included when criteria are metExample: If the job.yml has:
- id: research_competitors
name: "Research Competitors"
stop_hooks:
- prompt: |
Verify the research meets criteria:
1. Each competitor has at least 3 data points
2. Sources are cited
3. Information is current (within last year)
The instruction file should include:
## Quality Criteria
- Each competitor has at least 3 distinct data points
- All information is sourced with citations
- Data is current (from within the last year)
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>` in your response
This alignment ensures the AI agent knows exactly what will be validated and can self-check before completing.
Step instructions can include additional .md files in the steps/ directory for detailed examples, templates, or reference material. Reference them using the full path from the project root.
See .deepwork/jobs/deepwork_jobs/steps/supplemental_file_references.md for detailed documentation and examples.
Verify that job.yml is in the correct location at .deepwork/jobs/[job_name]/job.yml. The define and review_job_spec steps should have created and validated it. If for some reason it's not there, you may need to create or move it.
Run deepwork sync to generate the skills for this job:
deepwork sync
This will:
.claude/skills/ (or appropriate platform directory)After running deepwork sync, look at the "To use the new skills" section in the output. Relay these exact reload instructions to the user so they know how to pick up the new skills. Don't just reference the sync output - tell them directly what they need to do (e.g., "Type 'exit' then run 'claude --resume'" for Claude Code, or "Run '/memory refresh'" for Gemini CLI).
After implementing the job, consider whether there are rules that would help enforce quality or consistency when working with this job's domain.
What are rules?
Rules are automated guardrails stored as markdown files in .deepwork/rules/ that trigger when certain files change during an AI session. They help ensure:
When to suggest rules:
Think about the job you just implemented and ask:
Examples of rules that might make sense:
| Job Type | Potential Rule |
|---|---|
| API Design | "Update API docs when endpoint definitions change" |
| Database Schema | "Review migrations when schema files change" |
| Competitive Research | "Update strategy docs when competitor analysis changes" |
| Feature Development | "Update changelog when feature files change" |
| Configuration Management | "Update install guide when config files change" |
How to offer rule creation:
If you identify one or more rules that would benefit the user, explain:
Then ask the user:
"Would you like me to create this rule for you? I can run
/deepwork_rules.defineto set it up."
If the user agrees, invoke the /deepwork_rules.define command to guide them through creating the rule.
Example dialogue:
Based on the competitive_research job you just created, I noticed that when
competitor analysis files change, it would be helpful to remind you to update
your strategy documentation.
I'd suggest a rule like:
- **Name**: "Update strategy when competitor analysis changes"
- **Trigger**: `**/positioning_report.md`
- **Action**: Prompt to review and update `docs/strategy.md`
Would you like me to create this rule? I can run `/deepwork_rules.define` to set it up.
Note: Not every job needs rules. Only suggest them when they would genuinely help maintain consistency or quality. Don't force rules where they don't make sense.
For a complete worked example showing a job.yml and corresponding step instruction file, see:
.deepwork/jobs/deepwork_jobs/templates/job.yml.example.deepwork/jobs/deepwork_jobs/templates/step_instruction.md.exampleBefore running deepwork sync, verify:
job.yml is in placeBefore marking this step complete, ensure:
deepwork sync executed successfullydeepwork sync/deepwork_rules.defineCore 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 review_job_spec)Use branch format: deepwork/deepwork_jobs-[instance]-YYYYMMDD
git checkout -b deepwork/deepwork_jobs-[instance]-$(date +%Y%m%d)Required outputs:
steps/ (directory)Stop hooks will automatically validate your work. The loop continues until all criteria pass.
Criteria (all must be satisfied):
.deepwork/jobs/[job_name]/ created correctly?deepwork sync been run successfully?.claude/commands/?/deepwork_rules.define? Not every job needs rules - only suggest when genuinely helpful.To complete: Include <promise>✓ Quality Criteria Met</promise> in your final response only after verifying ALL criteria are satisfied.
/deepwork_jobs.learnReference files: .deepwork/jobs/deepwork_jobs/job.yml, .deepwork/jobs/deepwork_jobs/steps/implement.md