Skip to content
Merged
206 changes: 206 additions & 0 deletions .claude/commands/update.job.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
---
description: Edit standard job source files and sync to installed locations
hooks:
Stop:
- hooks:
- type: prompt
prompt: |
You must evaluate whether Claude has met all the below quality criteria for the request.

## Quality Criteria

Verify the update process completed successfully:
1. Changes were made in src/deepwork/standard_jobs/[job_name]/ (NOT in .deepwork/jobs/)
2. `deepwork install --platform claude` was run
3. Files in .deepwork/jobs/ match the source files
4. Command files in .claude/commands/ were regenerated
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.


## Instructions

Review the conversation and determine if ALL quality criteria above have been satisfied.
Look for evidence that each criterion has been addressed.

If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
all criteria appear to be met, respond with: {"ok": true}

If criteria are NOT met AND the promise tag is missing, respond with:
{"ok": false, "reason": "Continue working. [specific feedback on what's wrong]"}
---

# update.job

**Standalone command** in the **update** job - can be run anytime

**Summary**: Update standard jobs in src/ and sync to installed locations

## Job Overview

A workflow for maintaining standard jobs bundled with DeepWork. Standard jobs
(like `deepwork_jobs` and `deepwork_policy`) are source-controlled in
`src/deepwork/standard_jobs/` and must be edited there—never in `.deepwork/jobs/`
or `.claude/commands/` directly.

This job guides you through:
1. Identifying which standard job(s) to update from conversation context
2. Making changes in the correct source location (`src/deepwork/standard_jobs/[job_name]/`)
3. Running `deepwork install` to propagate changes to `.deepwork/` and command directories
4. Verifying the sync completed successfully

Use this job whenever you need to modify job.yml files, step instructions, or hooks
for any standard job in the DeepWork repository.



## Instructions

# Update Standard Job

## Objective

Edit standard job source files in `src/deepwork/standard_jobs/` and sync changes to installed locations.

## Task

When modifying a standard job in the DeepWork repository, this step ensures changes are made in the correct location and properly propagated.

### Important: Source of Truth

Standard jobs exist in THREE locations, but only ONE is the source of truth:

| Location | Purpose | Editable? |
|----------|---------|-----------|
| `src/deepwork/standard_jobs/[job]/` | **Source of truth** | **YES** |
| `.deepwork/jobs/[job]/` | Installed copy | NO - overwritten by install |
| `.claude/commands/[job].[step].md` | Generated commands | NO - regenerated by sync |

**NEVER edit files in `.deepwork/jobs/` or `.claude/commands/` for standard jobs!**

### Process

#### 1. Identify the Standard Job to Update

From conversation context, determine:
- Which standard job needs updating (e.g., `deepwork_jobs`, `deepwork_policy`)
- What changes are needed (job.yml, step instructions, hooks, etc.)

Current standard jobs:
```bash
ls src/deepwork/standard_jobs/
```

#### 2. Make Changes in Source Location

```
src/deepwork/standard_jobs/[job_name]/
├── job.yml # Job definition
├── steps/ # Step instruction files
├── hooks/ # Hook scripts
└── templates/ # Templates
```

#### 3. Run DeepWork Install

```bash
deepwork install --platform claude
```

For Gemini: `deepwork install --platform gemini`

#### 4. Verify the Sync

```bash
# Verify job.yml
diff src/deepwork/standard_jobs/[job_name]/job.yml .deepwork/jobs/[job_name]/job.yml

# Verify step files
diff -r src/deepwork/standard_jobs/[job_name]/steps/ .deepwork/jobs/[job_name]/steps/

# Check commands regenerated
ls -la .claude/commands/[job_name].*.md
```

## Quality Criteria

- Changes made ONLY in `src/deepwork/standard_jobs/[job_name]/`
- `deepwork install --platform claude` executed successfully
- Files in `.deepwork/jobs/` match source
- Command files regenerated
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>`


## Inputs

### User Parameters

Please gather the following information from the user:
- **job_context**: Determine from conversation context which standard job(s) to update and what changes are needed


## Work Branch Management

All work for this job should be done on a dedicated work branch:

1. **Check current branch**:
- If already on a work branch for this job (format: `deepwork/update-[instance]-[date]`), continue using it
- If on main/master, create a new work branch

2. **Create work branch** (if needed):
```bash
git checkout -b deepwork/update-[instance]-$(date +%Y%m%d)
```
Replace `[instance]` with a descriptive identifier (e.g., `acme`, `q1-launch`, etc.)

## Output Requirements

No specific files are output by this command.

## Quality Validation Loop

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.

### Quality Criteria
Verify the update process completed successfully:
1. Changes were made in src/deepwork/standard_jobs/[job_name]/ (NOT in .deepwork/jobs/)
2. `deepwork install --platform claude` was run
3. Files in .deepwork/jobs/ match the source files
4. Command files in .claude/commands/ were regenerated
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.


### Completion Promise

To signal that all quality criteria have been met, include this tag in your final response:

```
<promise>✓ Quality Criteria Met</promise>
```

**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.

## Completion

After completing this step:

1. **Verify outputs**: Confirm all required files have been created

2. **Inform the user**:
- The job command is complete
- This command can be run again anytime to make further changes

## Command Complete

This is a standalone command that can be run anytime. The outputs are ready for use.

Consider:
- Reviewing the outputs
- Running `deepwork sync` if job definitions were changed
- Re-running this command later if further changes are needed

---

## Context Files

- Job definition: `.deepwork/jobs/update/job.yml`
- Step instructions: `.deepwork/jobs/update/steps/job.md`
42 changes: 42 additions & 0 deletions .deepwork/jobs/update/job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: update
version: "1.1.0"
summary: "Update standard jobs in src/ and sync to installed locations"
description: |
A workflow for maintaining standard jobs bundled with DeepWork. Standard jobs
(like `deepwork_jobs` and `deepwork_policy`) are source-controlled in
`src/deepwork/standard_jobs/` and must be edited there—never in `.deepwork/jobs/`
or `.claude/commands/` directly.

This job guides you through:
1. Identifying which standard job(s) to update from conversation context
2. Making changes in the correct source location (`src/deepwork/standard_jobs/[job_name]/`)
3. Running `deepwork install` to propagate changes to `.deepwork/` and command directories
4. Verifying the sync completed successfully

Use this job whenever you need to modify job.yml files, step instructions, or hooks
for any standard job in the DeepWork repository.

changelog:
- version: "1.0.0"
changes: "Initial job creation"
- version: "1.1.0"
changes: "Removed sync_verification.md output requirement"

steps:
- id: job
name: "Update Standard Job"
description: "Edit standard job source files and sync to installed locations"
instructions_file: steps/job.md
inputs:
- name: job_context
description: "Determine from conversation context which standard job(s) to update and what changes are needed"
outputs: []
dependencies: []
stop_hooks:
- prompt: |
Verify the update process completed successfully:
1. Changes were made in src/deepwork/standard_jobs/[job_name]/ (NOT in .deepwork/jobs/)
2. `deepwork install --platform claude` was run
3. Files in .deepwork/jobs/ match the source files
4. Command files in .claude/commands/ were regenerated
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
73 changes: 73 additions & 0 deletions .deepwork/jobs/update/steps/job.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Update Standard Job

## Objective

Edit standard job source files in `src/deepwork/standard_jobs/` and sync changes to installed locations.

## Task

When modifying a standard job in the DeepWork repository, this step ensures changes are made in the correct location and properly propagated.

### Important: Source of Truth

Standard jobs exist in THREE locations, but only ONE is the source of truth:

| Location | Purpose | Editable? |
|----------|---------|-----------|
| `src/deepwork/standard_jobs/[job]/` | **Source of truth** | **YES** |
| `.deepwork/jobs/[job]/` | Installed copy | NO - overwritten by install |
| `.claude/commands/[job].[step].md` | Generated commands | NO - regenerated by sync |

**NEVER edit files in `.deepwork/jobs/` or `.claude/commands/` for standard jobs!**

### Process

#### 1. Identify the Standard Job to Update

From conversation context, determine:
- Which standard job needs updating (e.g., `deepwork_jobs`, `deepwork_policy`)
- What changes are needed (job.yml, step instructions, hooks, etc.)

Current standard jobs:
```bash
ls src/deepwork/standard_jobs/
```

#### 2. Make Changes in Source Location

```
src/deepwork/standard_jobs/[job_name]/
├── job.yml # Job definition
├── steps/ # Step instruction files
├── hooks/ # Hook scripts
└── templates/ # Templates
```

#### 3. Run DeepWork Install

```bash
deepwork install --platform claude
```

For Gemini: `deepwork install --platform gemini`

#### 4. Verify the Sync

```bash
# Verify job.yml
diff src/deepwork/standard_jobs/[job_name]/job.yml .deepwork/jobs/[job_name]/job.yml

# Verify step files
diff -r src/deepwork/standard_jobs/[job_name]/steps/ .deepwork/jobs/[job_name]/steps/

# Check commands regenerated
ls -la .claude/commands/[job_name].*.md
```

## Quality Criteria

- Changes made ONLY in `src/deepwork/standard_jobs/[job_name]/`
- `deepwork install --platform claude` executed successfully
- Files in `.deepwork/jobs/` match source
- Command files regenerated
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>`
Loading