Skip to content

Commit c9be69f

Browse files
authored
Cleanup (#6)
* Looks great * fix gitignore
1 parent 5a29f66 commit c9be69f

19 files changed

Lines changed: 1960 additions & 16 deletions

File tree

.claude/commands/deepwork_jobs.implement.md

Lines changed: 75 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ hooks:
1616
3. **Specific & Actionable**: Are instructions tailored to each step's purpose, not generic?
1717
4. **Output Examples**: Does each instruction file show what good output looks like?
1818
5. **Quality Criteria**: Does each instruction file define quality criteria for its outputs?
19-
6. **Registry Updated**: Is `.deepwork/registry.yml` updated with the new job?
20-
7. **Sync Complete**: Has `deepwork sync` been run successfully?
21-
8. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?
22-
9. **Summary Created**: Has `implementation_summary.md` been created?
19+
6. **Sync Complete**: Has `deepwork sync` been run successfully?
20+
7. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?
21+
8. **Summary Created**: Has `implementation_summary.md` been created?
22+
9. **Policies Considered**: Have you thought about whether policies would benefit this job?
23+
- If relevant policies were identified, did you explain them and offer to run `/deepwork_policy.define`?
24+
- Not every job needs policies - only suggest when genuinely helpful.
2325
2426
If ANY criterion is not met, continue working to address it.
2527
If ALL criteria are satisfied, include `<promise>QUALITY_COMPLETE</promise>` in your response.
@@ -238,6 +240,66 @@ Instruct the user to reload commands in their current session:
238240
- Run `/reload` command (if available)
239241
- Or restart the Claude session
240242

243+
### Step 7: Consider Policies for the New Job
244+
245+
After implementing the job, consider whether there are **policies** that would help enforce quality or consistency when working with this job's domain.
246+
247+
**What are policies?**
248+
249+
Policies are automated guardrails defined in `.deepwork.policy.yml` that trigger when certain files change during an AI session. They help ensure:
250+
- Documentation stays in sync with code
251+
- Team guidelines are followed
252+
- Architectural decisions are respected
253+
- Quality standards are maintained
254+
255+
**When to suggest policies:**
256+
257+
Think about the job you just implemented and ask:
258+
- Does this job produce outputs that other files depend on?
259+
- Are there documentation files that should be updated when this job's outputs change?
260+
- Are there quality checks or reviews that should happen when certain files in this domain change?
261+
- Could changes to the job's output files impact other parts of the project?
262+
263+
**Examples of policies that might make sense:**
264+
265+
| Job Type | Potential Policy |
266+
|----------|------------------|
267+
| API Design | "Update API docs when endpoint definitions change" |
268+
| Database Schema | "Review migrations when schema files change" |
269+
| Competitive Research | "Update strategy docs when competitor analysis changes" |
270+
| Feature Development | "Update changelog when feature files change" |
271+
| Configuration Management | "Update install guide when config files change" |
272+
273+
**How to offer policy creation:**
274+
275+
If you identify one or more policies that would benefit the user, explain:
276+
1. **What the policy would do** - What triggers it and what action it prompts
277+
2. **Why it would help** - How it prevents common mistakes or keeps things in sync
278+
3. **What files it would watch** - The trigger patterns
279+
280+
Then ask the user:
281+
282+
> "Would you like me to create this policy for you? I can run `/deepwork_policy.define` to set it up."
283+
284+
If the user agrees, invoke the `/deepwork_policy.define` command to guide them through creating the policy.
285+
286+
**Example dialogue:**
287+
288+
```
289+
Based on the competitive_research job you just created, I noticed that when
290+
competitor analysis files change, it would be helpful to remind you to update
291+
your strategy documentation.
292+
293+
I'd suggest a policy like:
294+
- **Name**: "Update strategy when competitor analysis changes"
295+
- **Trigger**: `deepwork/competitive_research-*/report.md`
296+
- **Action**: Prompt to review and update `docs/strategy.md`
297+
298+
Would you like me to create this policy? I can run `/deepwork_policy.define` to set it up.
299+
```
300+
301+
**Note:** Not every job needs policies. Only suggest them when they would genuinely help maintain consistency or quality. Don't force policies where they don't make sense.
302+
241303
## Example Implementation
242304
243305
**Given this job.yml:**
@@ -431,6 +493,8 @@ Before marking this step complete, ensure:
431493
- [ ] Commands generated in platform directory
432494
- [ ] User informed of next steps (reload commands)
433495
- [ ] implementation_summary.md created
496+
- [ ] Considered whether policies would benefit this job (Step 7)
497+
- [ ] If policies suggested, offered to run `/deepwork_policy.define`
434498

435499
## Quality Criteria
436500

@@ -441,6 +505,7 @@ Before marking this step complete, ensure:
441505
- Quality criteria defined for each step
442506
- Sync completed successfully
443507
- Commands available for use
508+
- Thoughtfully considered relevant policies for the job domain
444509

445510

446511
## Inputs
@@ -493,10 +558,12 @@ Verify the implementation meets ALL quality criteria before completing:
493558
3. **Specific & Actionable**: Are instructions tailored to each step's purpose, not generic?
494559
4. **Output Examples**: Does each instruction file show what good output looks like?
495560
5. **Quality Criteria**: Does each instruction file define quality criteria for its outputs?
496-
6. **Registry Updated**: Is `.deepwork/registry.yml` updated with the new job?
497-
7. **Sync Complete**: Has `deepwork sync` been run successfully?
498-
8. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?
499-
9. **Summary Created**: Has `implementation_summary.md` been created?
561+
6. **Sync Complete**: Has `deepwork sync` been run successfully?
562+
7. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?
563+
8. **Summary Created**: Has `implementation_summary.md` been created?
564+
9. **Policies Considered**: Have you thought about whether policies would benefit this job?
565+
- If relevant policies were identified, did you explain them and offer to run `/deepwork_policy.define`?
566+
- Not every job needs policies - only suggest when genuinely helpful.
500567

501568
If ANY criterion is not met, continue working to address it.
502569
If ALL criteria are satisfied, include `<promise>QUALITY_COMPLETE</promise>` in your response.

.deepwork/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# DeepWork temporary files
2+
# These files are used for policy evaluation during sessions
3+
.last_work_tree

.deepwork/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version: 1.0.0
2+
platforms:
3+
- claude
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: deepwork_jobs
2+
version: "1.3.0"
3+
summary: "DeepWork job management commands"
4+
description: |
5+
Core commands for managing DeepWork jobs. These commands help you define new multi-step
6+
workflows and refine existing ones.
7+
8+
The `define` command guides you through an interactive process to create a new job by
9+
asking detailed questions about your workflow, understanding each step's inputs and outputs,
10+
and generating all necessary files.
11+
12+
The `refine` command helps you modify existing jobs safely by understanding what you want
13+
to change, validating the impact, and ensuring consistency across your workflow.
14+
15+
changelog:
16+
- version: "1.0.0"
17+
changes: "Initial job creation"
18+
- version: "1.1.0"
19+
changes: "Added stop hooks for quality validation loops on all steps"
20+
- version: "1.2.0"
21+
changes: "Updated to support array of stop hooks"
22+
- version: "1.3.0"
23+
changes: "Added policy awareness to implement step - suggests relevant policies after job implementation"
24+
25+
steps:
26+
- id: define
27+
name: "Define Job Specification"
28+
description: "Create the job.yml specification file by understanding workflow requirements"
29+
instructions_file: steps/define.md
30+
inputs:
31+
- name: job_purpose
32+
description: "What complex task or workflow are you trying to accomplish?"
33+
outputs:
34+
- job.yml
35+
dependencies: []
36+
stop_hooks:
37+
- prompt: |
38+
Verify the job.yml output meets ALL quality criteria before completing:
39+
40+
1. **User Understanding**: Did you fully understand the user's workflow through interactive Q&A?
41+
2. **Clear Inputs/Outputs**: Does every step have clearly defined inputs and outputs?
42+
3. **Logical Dependencies**: Do step dependencies make sense and avoid circular references?
43+
4. **Concise Summary**: Is the summary under 200 characters and descriptive?
44+
5. **Rich Description**: Does the description provide enough context for future refinement?
45+
6. **Valid Schema**: Does the job.yml follow the required schema (name, version, summary, steps)?
46+
7. **File Created**: Has the job.yml file been created in `deepwork/[job_name]/job.yml`?
47+
48+
If ANY criterion is not met, continue working to address it.
49+
If ALL criteria are satisfied, include `<promise>QUALITY_COMPLETE</promise>` in your response.
50+
51+
- id: implement
52+
name: "Implement Job Steps"
53+
description: "Generate instruction files for each step based on the job.yml specification"
54+
instructions_file: steps/implement.md
55+
inputs:
56+
- file: job.yml
57+
from_step: define
58+
outputs:
59+
- implementation_summary.md
60+
dependencies:
61+
- define
62+
stop_hooks:
63+
- prompt: |
64+
Verify the implementation meets ALL quality criteria before completing:
65+
66+
1. **Directory Structure**: Is `.deepwork/jobs/[job_name]/` created correctly?
67+
2. **Complete Instructions**: Are ALL step instruction files complete (not stubs or placeholders)?
68+
3. **Specific & Actionable**: Are instructions tailored to each step's purpose, not generic?
69+
4. **Output Examples**: Does each instruction file show what good output looks like?
70+
5. **Quality Criteria**: Does each instruction file define quality criteria for its outputs?
71+
6. **Sync Complete**: Has `deepwork sync` been run successfully?
72+
7. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?
73+
8. **Summary Created**: Has `implementation_summary.md` been created?
74+
9. **Policies Considered**: Have you thought about whether policies would benefit this job?
75+
- If relevant policies were identified, did you explain them and offer to run `/deepwork_policy.define`?
76+
- Not every job needs policies - only suggest when genuinely helpful.
77+
78+
If ANY criterion is not met, continue working to address it.
79+
If ALL criteria are satisfied, include `<promise>QUALITY_COMPLETE</promise>` in your response.
80+
81+
- id: refine
82+
name: "Refine Existing Job"
83+
description: "Modify an existing job definition"
84+
instructions_file: steps/refine.md
85+
inputs:
86+
- name: job_name
87+
description: "Name of the job to refine"
88+
outputs:
89+
- job.yml
90+
dependencies: []
91+
stop_hooks:
92+
- prompt: |
93+
Verify the refinement meets ALL quality criteria before completing:
94+
95+
1. **Job Consistency**: Do the changes maintain overall job consistency?
96+
2. **Valid Dependencies**: Are all step dependencies logically valid (no circular refs)?
97+
3. **Semantic Versioning**: Was the version bumped appropriately (major/minor/patch)?
98+
4. **Changelog Updated**: Is the changelog updated with a description of changes?
99+
5. **User Understanding**: Does the user understand the impact of the changes?
100+
6. **Breaking Changes**: Were any breaking changes clearly communicated?
101+
7. **Files Updated**: Are all affected files (job.yml, step files) updated?
102+
8. **Sync Complete**: Has `deepwork sync` been run to regenerate commands?
103+
104+
If ANY criterion is not met, continue working to address it.
105+
If ALL criteria are satisfied, include `<promise>QUALITY_COMPLETE</promise>` in your response.

0 commit comments

Comments
 (0)