|
| 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` |
0 commit comments