Skip to content

Commit e813b39

Browse files
nhortonclaude
andauthored
Add update job for maintaining standard jobs (#41)
* Add update job for maintaining standard jobs Adds a new DeepWork job for updating standard jobs in the repository. When modifying bundled jobs like deepwork_jobs or deepwork_policy, this job guides contributors to edit the source files in src/deepwork/standard_jobs/, run deepwork install, and verify the sync completed correctly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add deepwork_jobs.md reference and reduce step instruction sizes - Create deepwork_jobs.md with shared job structure, schema, templates, and validation rules - Update define.md, implement.md, and learn.md to reference the shared file - Significantly reduce step file sizes by extracting common content - Update update.job to reference deepwork_jobs.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Remove sync_verification.md output requirement from update job The update job no longer requires creating a sync_verification.md file. The verification is done through diff commands during the process. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Remove comment from AGENTS.md in job structure documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Consolidate step instructions and remove deepwork_jobs.md reference - Delete deepwork_jobs.md reference file (content moved to step files) - Reduce step instruction file sizes by consolidating content - Update generated commands for Claude and Gemini Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent ef29d3d commit e813b39

5 files changed

Lines changed: 489 additions & 64 deletions

File tree

.claude/commands/update.job.md

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
---
2+
description: Edit standard job source files and sync to installed locations
3+
hooks:
4+
Stop:
5+
- hooks:
6+
- type: prompt
7+
prompt: |
8+
You must evaluate whether Claude has met all the below quality criteria for the request.
9+
10+
## Quality Criteria
11+
12+
Verify the update process completed successfully:
13+
1. Changes were made in src/deepwork/standard_jobs/[job_name]/ (NOT in .deepwork/jobs/)
14+
2. `deepwork install --platform claude` was run
15+
3. Files in .deepwork/jobs/ match the source files
16+
4. Command files in .claude/commands/ were regenerated
17+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
18+
19+
20+
## Instructions
21+
22+
Review the conversation and determine if ALL quality criteria above have been satisfied.
23+
Look for evidence that each criterion has been addressed.
24+
25+
If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
26+
all criteria appear to be met, respond with: {"ok": true}
27+
28+
If criteria are NOT met AND the promise tag is missing, respond with:
29+
{"ok": false, "reason": "Continue working. [specific feedback on what's wrong]"}
30+
---
31+
32+
# update.job
33+
34+
**Standalone command** in the **update** job - can be run anytime
35+
36+
**Summary**: Update standard jobs in src/ and sync to installed locations
37+
38+
## Job Overview
39+
40+
A workflow for maintaining standard jobs bundled with DeepWork. Standard jobs
41+
(like `deepwork_jobs` and `deepwork_policy`) are source-controlled in
42+
`src/deepwork/standard_jobs/` and must be edited there—never in `.deepwork/jobs/`
43+
or `.claude/commands/` directly.
44+
45+
This job guides you through:
46+
1. Identifying which standard job(s) to update from conversation context
47+
2. Making changes in the correct source location (`src/deepwork/standard_jobs/[job_name]/`)
48+
3. Running `deepwork install` to propagate changes to `.deepwork/` and command directories
49+
4. Verifying the sync completed successfully
50+
51+
Use this job whenever you need to modify job.yml files, step instructions, or hooks
52+
for any standard job in the DeepWork repository.
53+
54+
55+
56+
## Instructions
57+
58+
# Update Standard Job
59+
60+
## Objective
61+
62+
Edit standard job source files in `src/deepwork/standard_jobs/` and sync changes to installed locations.
63+
64+
## Task
65+
66+
When modifying a standard job in the DeepWork repository, this step ensures changes are made in the correct location and properly propagated.
67+
68+
### Important: Source of Truth
69+
70+
Standard jobs exist in THREE locations, but only ONE is the source of truth:
71+
72+
| Location | Purpose | Editable? |
73+
|----------|---------|-----------|
74+
| `src/deepwork/standard_jobs/[job]/` | **Source of truth** | **YES** |
75+
| `.deepwork/jobs/[job]/` | Installed copy | NO - overwritten by install |
76+
| `.claude/commands/[job].[step].md` | Generated commands | NO - regenerated by sync |
77+
78+
**NEVER edit files in `.deepwork/jobs/` or `.claude/commands/` for standard jobs!**
79+
80+
### Process
81+
82+
#### 1. Identify the Standard Job to Update
83+
84+
From conversation context, determine:
85+
- Which standard job needs updating (e.g., `deepwork_jobs`, `deepwork_policy`)
86+
- What changes are needed (job.yml, step instructions, hooks, etc.)
87+
88+
Current standard jobs:
89+
```bash
90+
ls src/deepwork/standard_jobs/
91+
```
92+
93+
#### 2. Make Changes in Source Location
94+
95+
```
96+
src/deepwork/standard_jobs/[job_name]/
97+
├── job.yml # Job definition
98+
├── steps/ # Step instruction files
99+
├── hooks/ # Hook scripts
100+
└── templates/ # Templates
101+
```
102+
103+
#### 3. Run DeepWork Install
104+
105+
```bash
106+
deepwork install --platform claude
107+
```
108+
109+
For Gemini: `deepwork install --platform gemini`
110+
111+
#### 4. Verify the Sync
112+
113+
```bash
114+
# Verify job.yml
115+
diff src/deepwork/standard_jobs/[job_name]/job.yml .deepwork/jobs/[job_name]/job.yml
116+
117+
# Verify step files
118+
diff -r src/deepwork/standard_jobs/[job_name]/steps/ .deepwork/jobs/[job_name]/steps/
119+
120+
# Check commands regenerated
121+
ls -la .claude/commands/[job_name].*.md
122+
```
123+
124+
## Quality Criteria
125+
126+
- Changes made ONLY in `src/deepwork/standard_jobs/[job_name]/`
127+
- `deepwork install --platform claude` executed successfully
128+
- Files in `.deepwork/jobs/` match source
129+
- Command files regenerated
130+
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>`
131+
132+
133+
## Inputs
134+
135+
### User Parameters
136+
137+
Please gather the following information from the user:
138+
- **job_context**: Determine from conversation context which standard job(s) to update and what changes are needed
139+
140+
141+
## Work Branch Management
142+
143+
All work for this job should be done on a dedicated work branch:
144+
145+
1. **Check current branch**:
146+
- If already on a work branch for this job (format: `deepwork/update-[instance]-[date]`), continue using it
147+
- If on main/master, create a new work branch
148+
149+
2. **Create work branch** (if needed):
150+
```bash
151+
git checkout -b deepwork/update-[instance]-$(date +%Y%m%d)
152+
```
153+
Replace `[instance]` with a descriptive identifier (e.g., `acme`, `q1-launch`, etc.)
154+
155+
## Output Requirements
156+
157+
No specific files are output by this command.
158+
159+
## Quality Validation Loop
160+
161+
This step uses an iterative quality validation loop. After completing your work, stop hook(s) will evaluate whether the outputs meet quality criteria. If criteria are not met, you will be prompted to continue refining.
162+
163+
### Quality Criteria
164+
Verify the update process completed successfully:
165+
1. Changes were made in src/deepwork/standard_jobs/[job_name]/ (NOT in .deepwork/jobs/)
166+
2. `deepwork install --platform claude` was run
167+
3. Files in .deepwork/jobs/ match the source files
168+
4. Command files in .claude/commands/ were regenerated
169+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
170+
171+
172+
### Completion Promise
173+
174+
To signal that all quality criteria have been met, include this tag in your final response:
175+
176+
```
177+
<promise>✓ Quality Criteria Met</promise>
178+
```
179+
180+
**Important**: Only include this promise tag when you have verified that ALL quality criteria above are satisfied. The validation loop will continue until this promise is detected.
181+
182+
## Completion
183+
184+
After completing this step:
185+
186+
1. **Verify outputs**: Confirm all required files have been created
187+
188+
2. **Inform the user**:
189+
- The job command is complete
190+
- This command can be run again anytime to make further changes
191+
192+
## Command Complete
193+
194+
This is a standalone command that can be run anytime. The outputs are ready for use.
195+
196+
Consider:
197+
- Reviewing the outputs
198+
- Running `deepwork sync` if job definitions were changed
199+
- Re-running this command later if further changes are needed
200+
201+
---
202+
203+
## Context Files
204+
205+
- Job definition: `.deepwork/jobs/update/job.yml`
206+
- Step instructions: `.deepwork/jobs/update/steps/job.md`

.deepwork/jobs/update/job.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: update
2+
version: "1.1.0"
3+
summary: "Update standard jobs in src/ and sync to installed locations"
4+
description: |
5+
A workflow for maintaining standard jobs bundled with DeepWork. Standard jobs
6+
(like `deepwork_jobs` and `deepwork_policy`) are source-controlled in
7+
`src/deepwork/standard_jobs/` and must be edited there—never in `.deepwork/jobs/`
8+
or `.claude/commands/` directly.
9+
10+
This job guides you through:
11+
1. Identifying which standard job(s) to update from conversation context
12+
2. Making changes in the correct source location (`src/deepwork/standard_jobs/[job_name]/`)
13+
3. Running `deepwork install` to propagate changes to `.deepwork/` and command directories
14+
4. Verifying the sync completed successfully
15+
16+
Use this job whenever you need to modify job.yml files, step instructions, or hooks
17+
for any standard job in the DeepWork repository.
18+
19+
changelog:
20+
- version: "1.0.0"
21+
changes: "Initial job creation"
22+
- version: "1.1.0"
23+
changes: "Removed sync_verification.md output requirement"
24+
25+
steps:
26+
- id: job
27+
name: "Update Standard Job"
28+
description: "Edit standard job source files and sync to installed locations"
29+
instructions_file: steps/job.md
30+
inputs:
31+
- name: job_context
32+
description: "Determine from conversation context which standard job(s) to update and what changes are needed"
33+
outputs: []
34+
dependencies: []
35+
stop_hooks:
36+
- prompt: |
37+
Verify the update process completed successfully:
38+
1. Changes were made in src/deepwork/standard_jobs/[job_name]/ (NOT in .deepwork/jobs/)
39+
2. `deepwork install --platform claude` was run
40+
3. Files in .deepwork/jobs/ match the source files
41+
4. Command files in .claude/commands/ were regenerated
42+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

.deepwork/jobs/update/steps/job.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Update Standard Job
2+
3+
## Objective
4+
5+
Edit standard job source files in `src/deepwork/standard_jobs/` and sync changes to installed locations.
6+
7+
## Task
8+
9+
When modifying a standard job in the DeepWork repository, this step ensures changes are made in the correct location and properly propagated.
10+
11+
### Important: Source of Truth
12+
13+
Standard jobs exist in THREE locations, but only ONE is the source of truth:
14+
15+
| Location | Purpose | Editable? |
16+
|----------|---------|-----------|
17+
| `src/deepwork/standard_jobs/[job]/` | **Source of truth** | **YES** |
18+
| `.deepwork/jobs/[job]/` | Installed copy | NO - overwritten by install |
19+
| `.claude/commands/[job].[step].md` | Generated commands | NO - regenerated by sync |
20+
21+
**NEVER edit files in `.deepwork/jobs/` or `.claude/commands/` for standard jobs!**
22+
23+
### Process
24+
25+
#### 1. Identify the Standard Job to Update
26+
27+
From conversation context, determine:
28+
- Which standard job needs updating (e.g., `deepwork_jobs`, `deepwork_policy`)
29+
- What changes are needed (job.yml, step instructions, hooks, etc.)
30+
31+
Current standard jobs:
32+
```bash
33+
ls src/deepwork/standard_jobs/
34+
```
35+
36+
#### 2. Make Changes in Source Location
37+
38+
```
39+
src/deepwork/standard_jobs/[job_name]/
40+
├── job.yml # Job definition
41+
├── steps/ # Step instruction files
42+
├── hooks/ # Hook scripts
43+
└── templates/ # Templates
44+
```
45+
46+
#### 3. Run DeepWork Install
47+
48+
```bash
49+
deepwork install --platform claude
50+
```
51+
52+
For Gemini: `deepwork install --platform gemini`
53+
54+
#### 4. Verify the Sync
55+
56+
```bash
57+
# Verify job.yml
58+
diff src/deepwork/standard_jobs/[job_name]/job.yml .deepwork/jobs/[job_name]/job.yml
59+
60+
# Verify step files
61+
diff -r src/deepwork/standard_jobs/[job_name]/steps/ .deepwork/jobs/[job_name]/steps/
62+
63+
# Check commands regenerated
64+
ls -la .claude/commands/[job_name].*.md
65+
```
66+
67+
## Quality Criteria
68+
69+
- Changes made ONLY in `src/deepwork/standard_jobs/[job_name]/`
70+
- `deepwork install --platform claude` executed successfully
71+
- Files in `.deepwork/jobs/` match source
72+
- Command files regenerated
73+
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>`

0 commit comments

Comments
 (0)