deepwork 0.1.1__py3-none-any.whl → 0.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- deepwork/cli/install.py +121 -32
- deepwork/cli/sync.py +20 -20
- deepwork/core/adapters.py +88 -51
- deepwork/core/command_executor.py +173 -0
- deepwork/core/generator.py +148 -31
- deepwork/core/hooks_syncer.py +51 -25
- deepwork/core/parser.py +8 -0
- deepwork/core/pattern_matcher.py +271 -0
- deepwork/core/rules_parser.py +511 -0
- deepwork/core/rules_queue.py +321 -0
- deepwork/hooks/README.md +181 -0
- deepwork/hooks/__init__.py +77 -1
- deepwork/hooks/claude_hook.sh +55 -0
- deepwork/hooks/gemini_hook.sh +55 -0
- deepwork/hooks/rules_check.py +514 -0
- deepwork/hooks/wrapper.py +363 -0
- deepwork/schemas/job_schema.py +14 -1
- deepwork/schemas/rules_schema.py +103 -0
- deepwork/standard_jobs/deepwork_jobs/AGENTS.md +60 -0
- deepwork/standard_jobs/deepwork_jobs/job.yml +41 -56
- deepwork/standard_jobs/deepwork_jobs/make_new_job.sh +134 -0
- deepwork/standard_jobs/deepwork_jobs/steps/define.md +29 -63
- deepwork/standard_jobs/deepwork_jobs/steps/implement.md +62 -263
- deepwork/standard_jobs/deepwork_jobs/steps/learn.md +4 -62
- deepwork/standard_jobs/deepwork_jobs/templates/agents.md.template +32 -0
- deepwork/standard_jobs/deepwork_jobs/templates/job.yml.example +73 -0
- deepwork/standard_jobs/deepwork_jobs/templates/job.yml.template +56 -0
- deepwork/standard_jobs/deepwork_jobs/templates/step_instruction.md.example +82 -0
- deepwork/standard_jobs/deepwork_jobs/templates/step_instruction.md.template +58 -0
- deepwork/standard_jobs/deepwork_rules/hooks/global_hooks.yml +8 -0
- deepwork/standard_jobs/deepwork_rules/job.yml +39 -0
- deepwork/standard_jobs/deepwork_rules/rules/.gitkeep +13 -0
- deepwork/standard_jobs/deepwork_rules/rules/api-documentation-sync.md.example +10 -0
- deepwork/standard_jobs/deepwork_rules/rules/readme-documentation.md.example +10 -0
- deepwork/standard_jobs/deepwork_rules/rules/security-review.md.example +11 -0
- deepwork/standard_jobs/deepwork_rules/rules/skill-md-validation.md +45 -0
- deepwork/standard_jobs/deepwork_rules/rules/source-test-pairing.md.example +13 -0
- deepwork/standard_jobs/deepwork_rules/steps/define.md +249 -0
- deepwork/templates/claude/skill-job-meta.md.jinja +70 -0
- deepwork/templates/claude/skill-job-step.md.jinja +198 -0
- deepwork/templates/gemini/skill-job-meta.toml.jinja +76 -0
- deepwork/templates/gemini/skill-job-step.toml.jinja +147 -0
- {deepwork-0.1.1.dist-info → deepwork-0.3.0.dist-info}/METADATA +54 -24
- deepwork-0.3.0.dist-info/RECORD +62 -0
- deepwork/core/policy_parser.py +0 -295
- deepwork/hooks/evaluate_policies.py +0 -376
- deepwork/schemas/policy_schema.py +0 -78
- deepwork/standard_jobs/deepwork_policy/hooks/global_hooks.yml +0 -8
- deepwork/standard_jobs/deepwork_policy/hooks/policy_stop_hook.sh +0 -56
- deepwork/standard_jobs/deepwork_policy/job.yml +0 -35
- deepwork/standard_jobs/deepwork_policy/steps/define.md +0 -195
- deepwork/templates/claude/command-job-step.md.jinja +0 -210
- deepwork/templates/gemini/command-job-step.toml.jinja +0 -169
- deepwork-0.1.1.dist-info/RECORD +0 -41
- /deepwork/standard_jobs/{deepwork_policy → deepwork_rules}/hooks/capture_prompt_work_tree.sh +0 -0
- /deepwork/standard_jobs/{deepwork_policy → deepwork_rules}/hooks/user_prompt_submit.sh +0 -0
- {deepwork-0.1.1.dist-info → deepwork-0.3.0.dist-info}/WHEEL +0 -0
- {deepwork-0.1.1.dist-info → deepwork-0.3.0.dist-info}/entry_points.txt +0 -0
- {deepwork-0.1.1.dist-info → deepwork-0.3.0.dist-info}/licenses/LICENSE.md +0 -0
|
@@ -8,10 +8,31 @@ Generate the DeepWork job directory structure and instruction files for each ste
|
|
|
8
8
|
|
|
9
9
|
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.
|
|
10
10
|
|
|
11
|
-
### Step 1:
|
|
11
|
+
### Step 1: Create Directory Structure Using Script
|
|
12
|
+
|
|
13
|
+
Run the `make_new_job.sh` script to create the standard directory structure:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
.deepwork/jobs/deepwork_jobs/make_new_job.sh [job_name]
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This creates:
|
|
20
|
+
- `.deepwork/jobs/[job_name]/` - Main job directory
|
|
21
|
+
- `.deepwork/jobs/[job_name]/steps/` - Step instruction files
|
|
22
|
+
- `.deepwork/jobs/[job_name]/hooks/` - Custom validation scripts (with .gitkeep)
|
|
23
|
+
- `.deepwork/jobs/[job_name]/templates/` - Example file formats (with .gitkeep)
|
|
24
|
+
- `.deepwork/jobs/[job_name]/AGENTS.md` - Job management guidance
|
|
25
|
+
|
|
26
|
+
**Note**: 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:
|
|
27
|
+
```bash
|
|
28
|
+
mkdir -p .deepwork/jobs/[job_name]/hooks .deepwork/jobs/[job_name]/templates
|
|
29
|
+
touch .deepwork/jobs/[job_name]/hooks/.gitkeep .deepwork/jobs/[job_name]/templates/.gitkeep
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Step 2: Read and Validate the Specification
|
|
12
33
|
|
|
13
34
|
1. **Locate the job.yml file**
|
|
14
|
-
- Read `.deepwork/jobs/[job_name]/job.yml` from the define step
|
|
35
|
+
- Read `.deepwork/jobs/[job_name]/job.yml` from the define step
|
|
15
36
|
- Parse the YAML content
|
|
16
37
|
|
|
17
38
|
2. **Validate the specification**
|
|
@@ -25,83 +46,20 @@ Read the `job.yml` specification file and create all the necessary files to make
|
|
|
25
46
|
- List of all steps with their details
|
|
26
47
|
- Understand the workflow structure
|
|
27
48
|
|
|
28
|
-
### Step 2: Create Directory Structure
|
|
29
|
-
|
|
30
|
-
Create the job directory in `.deepwork/jobs/[job_name]/`:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
mkdir -p .deepwork/jobs/[job_name]/steps
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Files to create:
|
|
37
|
-
- `.deepwork/jobs/[job_name]/job.yml`
|
|
38
|
-
- `.deepwork/jobs/[job_name]/steps/[step_id].md` - One for each step
|
|
39
|
-
|
|
40
49
|
### Step 3: Generate Step Instruction Files
|
|
41
50
|
|
|
42
51
|
For each step in the job.yml, create a comprehensive instruction file at `.deepwork/jobs/[job_name]/steps/[step_id].md`.
|
|
43
52
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
```markdown
|
|
47
|
-
# [Step Name]
|
|
48
|
-
|
|
49
|
-
## Objective
|
|
50
|
-
|
|
51
|
-
[Clear statement of what this step accomplishes, derived from the step's description]
|
|
52
|
-
|
|
53
|
-
## Task
|
|
54
|
-
|
|
55
|
-
[Detailed instructions for completing this step, based on:
|
|
56
|
-
- The step's purpose
|
|
57
|
-
- Expected inputs and outputs
|
|
58
|
-
- The job's overall context
|
|
59
|
-
]
|
|
60
|
-
|
|
61
|
-
### Process
|
|
62
|
-
|
|
63
|
-
[Break down the step into substeps. Use the information gathered during define about:
|
|
64
|
-
- What needs to be done
|
|
65
|
-
- What makes a good output
|
|
66
|
-
- Any quality criteria
|
|
67
|
-
]
|
|
53
|
+
**Template reference**: See `.deepwork/jobs/deepwork_jobs/templates/step_instruction.md.template` for the standard structure.
|
|
68
54
|
|
|
69
|
-
|
|
70
|
-
2. [Substep 2]
|
|
71
|
-
3. [Substep 3]
|
|
55
|
+
**Complete example**: See `.deepwork/jobs/deepwork_jobs/templates/step_instruction.md.example` for a fully worked example.
|
|
72
56
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
[Description of what should be in this output file]
|
|
81
|
-
|
|
82
|
-
**Structure**:
|
|
83
|
-
```[file format]
|
|
84
|
-
[Example or template of what the output should look like]
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
[Repeat for each output file]
|
|
88
|
-
|
|
89
|
-
## Quality Criteria
|
|
90
|
-
|
|
91
|
-
[List what makes this step's output high quality:
|
|
92
|
-
- Completeness checks
|
|
93
|
-
- Format requirements
|
|
94
|
-
- Content requirements
|
|
95
|
-
]
|
|
96
|
-
|
|
97
|
-
- [Quality criterion 1]
|
|
98
|
-
- [Quality criterion 2]
|
|
99
|
-
- [Quality criterion 3]
|
|
100
|
-
|
|
101
|
-
## Context
|
|
102
|
-
|
|
103
|
-
[Provide context from the job's overall description to help understand why this step matters and how it fits into the bigger picture]
|
|
104
|
-
```
|
|
57
|
+
**Available templates in `.deepwork/jobs/deepwork_jobs/templates/`:**
|
|
58
|
+
- `job.yml.template` - Job specification structure
|
|
59
|
+
- `step_instruction.md.template` - Step instruction file structure
|
|
60
|
+
- `agents.md.template` - AGENTS.md file structure
|
|
61
|
+
- `job.yml.example` - Complete job specification example
|
|
62
|
+
- `step_instruction.md.example` - Complete step instruction example
|
|
105
63
|
|
|
106
64
|
**Guidelines for generating instructions:**
|
|
107
65
|
|
|
@@ -111,6 +69,7 @@ Each instruction file should follow this structure:
|
|
|
111
69
|
4. **Explain the "why"** - Help the user understand the step's role in the workflow
|
|
112
70
|
5. **Quality over quantity** - Detailed, actionable instructions are better than vague ones
|
|
113
71
|
6. **Align with stop hooks** - If the step has `stop_hooks` defined, ensure the quality criteria in the instruction file match the validation criteria in the hooks
|
|
72
|
+
7. **Ask structured questions** - When a step has user inputs, the instructions MUST explicitly tell the agent to "ask structured questions" using the AskUserQuestion tool to gather that information. Never use generic phrasing like "ask the user" - always use "ask structured questions"
|
|
114
73
|
|
|
115
74
|
### Handling Stop Hooks
|
|
116
75
|
|
|
@@ -154,9 +113,9 @@ See `.deepwork/jobs/deepwork_jobs/steps/supplemental_file_references.md` for det
|
|
|
154
113
|
|
|
155
114
|
Verify that `job.yml` is in the correct location at `.deepwork/jobs/[job_name]/job.yml`. The define step should have created it there. If for some reason it's not there, you may need to create or move it.
|
|
156
115
|
|
|
157
|
-
### Step 5: Sync
|
|
116
|
+
### Step 5: Sync Skills
|
|
158
117
|
|
|
159
|
-
Run `deepwork sync` to generate the
|
|
118
|
+
Run `deepwork sync` to generate the skills for this job:
|
|
160
119
|
|
|
161
120
|
```bash
|
|
162
121
|
deepwork sync
|
|
@@ -164,26 +123,26 @@ deepwork sync
|
|
|
164
123
|
|
|
165
124
|
This will:
|
|
166
125
|
- Parse the job definition
|
|
167
|
-
- Generate
|
|
168
|
-
- Make the
|
|
126
|
+
- Generate skills for each step
|
|
127
|
+
- Make the skills available in `.claude/skills/` (or appropriate platform directory)
|
|
169
128
|
|
|
170
129
|
### Step 6: Relay Reload Instructions
|
|
171
130
|
|
|
172
|
-
After running `deepwork sync`, look at the "To use the new
|
|
131
|
+
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).
|
|
173
132
|
|
|
174
|
-
### Step 7: Consider
|
|
133
|
+
### Step 7: Consider Rules for the New Job
|
|
175
134
|
|
|
176
|
-
After implementing the job, consider whether there are **
|
|
135
|
+
After implementing the job, consider whether there are **rules** that would help enforce quality or consistency when working with this job's domain.
|
|
177
136
|
|
|
178
|
-
**What are
|
|
137
|
+
**What are rules?**
|
|
179
138
|
|
|
180
|
-
|
|
139
|
+
Rules are automated guardrails stored as markdown files in `.deepwork/rules/` that trigger when certain files change during an AI session. They help ensure:
|
|
181
140
|
- Documentation stays in sync with code
|
|
182
141
|
- Team guidelines are followed
|
|
183
142
|
- Architectural decisions are respected
|
|
184
143
|
- Quality standards are maintained
|
|
185
144
|
|
|
186
|
-
**When to suggest
|
|
145
|
+
**When to suggest rules:**
|
|
187
146
|
|
|
188
147
|
Think about the job you just implemented and ask:
|
|
189
148
|
- Does this job produce outputs that other files depend on?
|
|
@@ -191,28 +150,28 @@ Think about the job you just implemented and ask:
|
|
|
191
150
|
- Are there quality checks or reviews that should happen when certain files in this domain change?
|
|
192
151
|
- Could changes to the job's output files impact other parts of the project?
|
|
193
152
|
|
|
194
|
-
**Examples of
|
|
153
|
+
**Examples of rules that might make sense:**
|
|
195
154
|
|
|
196
|
-
| Job Type | Potential
|
|
197
|
-
|
|
155
|
+
| Job Type | Potential Rule |
|
|
156
|
+
|----------|----------------|
|
|
198
157
|
| API Design | "Update API docs when endpoint definitions change" |
|
|
199
158
|
| Database Schema | "Review migrations when schema files change" |
|
|
200
159
|
| Competitive Research | "Update strategy docs when competitor analysis changes" |
|
|
201
160
|
| Feature Development | "Update changelog when feature files change" |
|
|
202
161
|
| Configuration Management | "Update install guide when config files change" |
|
|
203
162
|
|
|
204
|
-
**How to offer
|
|
163
|
+
**How to offer rule creation:**
|
|
205
164
|
|
|
206
|
-
If you identify one or more
|
|
207
|
-
1. **What the
|
|
165
|
+
If you identify one or more rules that would benefit the user, explain:
|
|
166
|
+
1. **What the rule would do** - What triggers it and what action it prompts
|
|
208
167
|
2. **Why it would help** - How it prevents common mistakes or keeps things in sync
|
|
209
168
|
3. **What files it would watch** - The trigger patterns
|
|
210
169
|
|
|
211
170
|
Then ask the user:
|
|
212
171
|
|
|
213
|
-
> "Would you like me to create this
|
|
172
|
+
> "Would you like me to create this rule for you? I can run `/deepwork_rules.define` to set it up."
|
|
214
173
|
|
|
215
|
-
If the user agrees, invoke the `/
|
|
174
|
+
If the user agrees, invoke the `/deepwork_rules.define` command to guide them through creating the rule.
|
|
216
175
|
|
|
217
176
|
**Example dialogue:**
|
|
218
177
|
|
|
@@ -221,124 +180,21 @@ Based on the competitive_research job you just created, I noticed that when
|
|
|
221
180
|
competitor analysis files change, it would be helpful to remind you to update
|
|
222
181
|
your strategy documentation.
|
|
223
182
|
|
|
224
|
-
I'd suggest a
|
|
183
|
+
I'd suggest a rule like:
|
|
225
184
|
- **Name**: "Update strategy when competitor analysis changes"
|
|
226
185
|
- **Trigger**: `**/positioning_report.md`
|
|
227
186
|
- **Action**: Prompt to review and update `docs/strategy.md`
|
|
228
187
|
|
|
229
|
-
Would you like me to create this
|
|
188
|
+
Would you like me to create this rule? I can run `/deepwork_rules.define` to set it up.
|
|
230
189
|
```
|
|
231
190
|
|
|
232
|
-
**Note:** Not every job needs
|
|
191
|
+
**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.
|
|
233
192
|
|
|
234
193
|
## Example Implementation
|
|
235
194
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
version: "1.0.0"
|
|
240
|
-
summary: "Systematic competitive analysis workflow"
|
|
241
|
-
description: |
|
|
242
|
-
A comprehensive workflow for analyzing competitors in your market segment.
|
|
243
|
-
Helps product teams understand the competitive landscape through systematic
|
|
244
|
-
identification, research, comparison, and positioning recommendations.
|
|
245
|
-
|
|
246
|
-
steps:
|
|
247
|
-
- id: identify_competitors
|
|
248
|
-
name: "Identify Competitors"
|
|
249
|
-
description: "Identify 5-7 key competitors in the target market"
|
|
250
|
-
instructions_file: steps/identify_competitors.md
|
|
251
|
-
inputs:
|
|
252
|
-
- name: market_segment
|
|
253
|
-
description: "The market segment to analyze"
|
|
254
|
-
- name: product_category
|
|
255
|
-
description: "The product category"
|
|
256
|
-
outputs:
|
|
257
|
-
- competitors_list.md
|
|
258
|
-
dependencies: []
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
**Generate this instruction file** (`.deepwork/jobs/competitive_research/steps/identify_competitors.md`):
|
|
262
|
-
|
|
263
|
-
```markdown
|
|
264
|
-
# Identify Competitors
|
|
265
|
-
|
|
266
|
-
## Objective
|
|
267
|
-
|
|
268
|
-
Identify 5-7 key competitors in the target market segment to analyze for competitive positioning.
|
|
269
|
-
|
|
270
|
-
## Task
|
|
271
|
-
|
|
272
|
-
Research and identify the most relevant competitors in the specified market segment and product category. Focus on companies that directly compete for the same customer base and solve similar problems.
|
|
273
|
-
|
|
274
|
-
### Process
|
|
275
|
-
|
|
276
|
-
1. **Understand the market context**
|
|
277
|
-
- Review the market segment provided by the user
|
|
278
|
-
- Understand the product category boundaries
|
|
279
|
-
- Consider direct and indirect competitors
|
|
280
|
-
|
|
281
|
-
2. **Research competitors**
|
|
282
|
-
- Search for companies in this space
|
|
283
|
-
- Look for market leaders and emerging players
|
|
284
|
-
- Consider different competitive dimensions (features, price, target market)
|
|
285
|
-
|
|
286
|
-
3. **Select 5-7 key competitors**
|
|
287
|
-
- Prioritize direct competitors
|
|
288
|
-
- Include at least one market leader
|
|
289
|
-
- Include 1-2 emerging/innovative players
|
|
290
|
-
- Ensure diversity in the competitive set
|
|
291
|
-
|
|
292
|
-
4. **Document each competitor**
|
|
293
|
-
- Company name
|
|
294
|
-
- Brief description (2-3 sentences)
|
|
295
|
-
- Why they're a relevant competitor
|
|
296
|
-
- Primary competitive dimension
|
|
297
|
-
|
|
298
|
-
## Output Format
|
|
299
|
-
|
|
300
|
-
### competitors_list.md
|
|
301
|
-
|
|
302
|
-
A markdown document listing each competitor with context.
|
|
303
|
-
|
|
304
|
-
**Structure**:
|
|
305
|
-
```markdown
|
|
306
|
-
# Competitor Analysis: [Market Segment]
|
|
307
|
-
|
|
308
|
-
## Market Context
|
|
309
|
-
- **Segment**: [market segment]
|
|
310
|
-
- **Category**: [product category]
|
|
311
|
-
- **Analysis Date**: [current date]
|
|
312
|
-
|
|
313
|
-
## Identified Competitors
|
|
314
|
-
|
|
315
|
-
### 1. [Competitor Name]
|
|
316
|
-
**Description**: [2-3 sentence description of what they do]
|
|
317
|
-
|
|
318
|
-
**Why Relevant**: [Why they're a key competitor in this space]
|
|
319
|
-
|
|
320
|
-
**Competitive Dimension**: [What they compete on - e.g., price, features, market segment]
|
|
321
|
-
|
|
322
|
-
[Repeat for each competitor, 5-7 total]
|
|
323
|
-
|
|
324
|
-
## Selection Rationale
|
|
325
|
-
|
|
326
|
-
[Brief paragraph explaining why these specific competitors were chosen and what dimensions of competition they represent]
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
## Quality Criteria
|
|
330
|
-
|
|
331
|
-
- 5-7 competitors identified (not too few, not too many)
|
|
332
|
-
- Mix of established and emerging players
|
|
333
|
-
- All competitors are genuinely relevant to the market segment
|
|
334
|
-
- Each competitor has clear, specific description
|
|
335
|
-
- Selection rationale explains the competitive landscape
|
|
336
|
-
- Output is well-formatted and ready for use by next step
|
|
337
|
-
|
|
338
|
-
## Context
|
|
339
|
-
|
|
340
|
-
This is the foundation step for competitive analysis. The competitors identified here will be deeply researched in subsequent steps, so it's important to choose the right set. Focus on competitors that will provide strategic insights for positioning decisions.
|
|
341
|
-
```
|
|
195
|
+
For a complete worked example showing a job.yml and corresponding step instruction file, see:
|
|
196
|
+
- **Job specification**: `.deepwork/jobs/deepwork_jobs/templates/job.yml.example`
|
|
197
|
+
- **Step instruction**: `.deepwork/jobs/deepwork_jobs/templates/step_instruction.md.example`
|
|
342
198
|
|
|
343
199
|
## Important Guidelines
|
|
344
200
|
|
|
@@ -357,63 +213,6 @@ Before running `deepwork sync`, verify:
|
|
|
357
213
|
- All step instruction files exist (one per step)
|
|
358
214
|
- No file system errors
|
|
359
215
|
|
|
360
|
-
## Output Format
|
|
361
|
-
|
|
362
|
-
### implementation_summary.md
|
|
363
|
-
|
|
364
|
-
After successful implementation, create a summary:
|
|
365
|
-
|
|
366
|
-
```markdown
|
|
367
|
-
# Job Implementation Complete: [job_name]
|
|
368
|
-
|
|
369
|
-
## Overview
|
|
370
|
-
|
|
371
|
-
Successfully implemented the **[job_name]** workflow with [N] steps.
|
|
372
|
-
|
|
373
|
-
**Summary**: [job summary]
|
|
374
|
-
|
|
375
|
-
**Version**: [version]
|
|
376
|
-
|
|
377
|
-
## Files Created
|
|
378
|
-
|
|
379
|
-
### Job Definition
|
|
380
|
-
- `.deepwork/jobs/[job_name]/job.yml`
|
|
381
|
-
|
|
382
|
-
### Step Instructions
|
|
383
|
-
- `.deepwork/jobs/[job_name]/steps/[step1_id].md`
|
|
384
|
-
- `.deepwork/jobs/[job_name]/steps/[step2_id].md`
|
|
385
|
-
[... list all step files ...]
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
## Generated Commands
|
|
389
|
-
|
|
390
|
-
After running `deepwork sync`, the following slash-commands are now available:
|
|
391
|
-
|
|
392
|
-
- `/[job_name].[step1_id]` - [step description]
|
|
393
|
-
- `/[job_name].[step2_id]` - [step description]
|
|
394
|
-
[... list all commands ...]
|
|
395
|
-
|
|
396
|
-
## Next Steps
|
|
397
|
-
|
|
398
|
-
1. **Reload commands**: [Include the specific reload instructions from the `deepwork sync` output here]
|
|
399
|
-
2. **Start the workflow**: Run `/[job_name].[first_step_id]` to begin
|
|
400
|
-
3. **Test the job**: Try executing the first step to ensure everything works
|
|
401
|
-
|
|
402
|
-
## Job Structure
|
|
403
|
-
|
|
404
|
-
[Show the workflow diagram with step names and dependencies]
|
|
405
|
-
|
|
406
|
-
Step 1: [step_name]
|
|
407
|
-
↓
|
|
408
|
-
Step 2: [step_name]
|
|
409
|
-
↓
|
|
410
|
-
Step 3: [step_name]
|
|
411
|
-
↓
|
|
412
|
-
[Final output]
|
|
413
|
-
|
|
414
|
-
The job is now ready for use!
|
|
415
|
-
```
|
|
416
|
-
|
|
417
216
|
## Completion Checklist
|
|
418
217
|
|
|
419
218
|
Before marking this step complete, ensure:
|
|
@@ -421,11 +220,10 @@ Before marking this step complete, ensure:
|
|
|
421
220
|
- [ ] All step instruction files created
|
|
422
221
|
- [ ] Each instruction file is complete and actionable
|
|
423
222
|
- [ ] `deepwork sync` executed successfully
|
|
424
|
-
- [ ]
|
|
223
|
+
- [ ] Skills generated in platform directory
|
|
425
224
|
- [ ] User informed to follow reload instructions from `deepwork sync`
|
|
426
|
-
- [ ]
|
|
427
|
-
- [ ]
|
|
428
|
-
- [ ] If policies suggested, offered to run `/deepwork_policy.define`
|
|
225
|
+
- [ ] Considered whether rules would benefit this job (Step 7)
|
|
226
|
+
- [ ] If rules suggested, offered to run `/deepwork_rules.define`
|
|
429
227
|
|
|
430
228
|
## Quality Criteria
|
|
431
229
|
|
|
@@ -434,6 +232,7 @@ Before marking this step complete, ensure:
|
|
|
434
232
|
- Instructions are specific and actionable
|
|
435
233
|
- Output examples are provided in each instruction file
|
|
436
234
|
- Quality criteria defined for each step
|
|
235
|
+
- Steps with user inputs explicitly use "ask structured questions" phrasing
|
|
437
236
|
- Sync completed successfully
|
|
438
|
-
-
|
|
439
|
-
- Thoughtfully considered relevant
|
|
237
|
+
- Skills available for use
|
|
238
|
+
- Thoughtfully considered relevant rules for the job domain
|
|
@@ -142,42 +142,7 @@ The AGENTS.md file captures project-specific knowledge that helps future agent r
|
|
|
142
142
|
- This keeps AGENTS.md in sync as the codebase evolves
|
|
143
143
|
- Pattern: "See `path/to/file.ext` for [description]"
|
|
144
144
|
|
|
145
|
-
3. **AGENTS.md structure**:
|
|
146
|
-
|
|
147
|
-
```markdown
|
|
148
|
-
# Project Context for [Job Name]
|
|
149
|
-
|
|
150
|
-
## Codebase Structure
|
|
151
|
-
|
|
152
|
-
<!-- Reference files rather than duplicating content -->
|
|
153
|
-
- Project structure: See `README.md` for overview
|
|
154
|
-
- API documentation: See `docs/api.md`
|
|
155
|
-
- Configuration: See `config/README.md`
|
|
156
|
-
|
|
157
|
-
## Conventions
|
|
158
|
-
|
|
159
|
-
### Naming Conventions
|
|
160
|
-
- [Convention]: See example in `path/to/example.ext:LINE`
|
|
161
|
-
|
|
162
|
-
### File Organization
|
|
163
|
-
- [Pattern]: Reference `path/to/pattern/`
|
|
164
|
-
|
|
165
|
-
## Job-Specific Context
|
|
166
|
-
|
|
167
|
-
### [Job Name]
|
|
168
|
-
|
|
169
|
-
#### [Step Name]
|
|
170
|
-
- [Learning]: Reference `relevant/file.ext`
|
|
171
|
-
- [Context]: [Brief explanation with file reference]
|
|
172
|
-
|
|
173
|
-
## Known Issues and Workarounds
|
|
174
|
-
|
|
175
|
-
- [Issue]: [Workaround with file reference if applicable]
|
|
176
|
-
|
|
177
|
-
## Last Updated
|
|
178
|
-
- Date: [YYYY-MM-DD]
|
|
179
|
-
- From conversation about: [Brief description]
|
|
180
|
-
```
|
|
145
|
+
3. **AGENTS.md structure**: See `.deepwork/jobs/deepwork_jobs/templates/agents.md.template` for the standard format.
|
|
181
146
|
|
|
182
147
|
4. **Writing entries**
|
|
183
148
|
- Be concise but specific
|
|
@@ -199,36 +164,14 @@ If instruction files were modified:
|
|
|
199
164
|
changes: "Improved [step] instructions based on execution learnings: [brief description]"
|
|
200
165
|
```
|
|
201
166
|
|
|
202
|
-
### Step 7: Sync and
|
|
167
|
+
### Step 7: Sync and Relay Instructions
|
|
203
168
|
|
|
204
169
|
1. **Run deepwork sync** (if instructions were modified)
|
|
205
170
|
```bash
|
|
206
171
|
deepwork sync
|
|
207
172
|
```
|
|
208
173
|
|
|
209
|
-
2. **
|
|
210
|
-
```markdown
|
|
211
|
-
# Learning Summary
|
|
212
|
-
|
|
213
|
-
## Job Analyzed
|
|
214
|
-
- Job: [job_name]
|
|
215
|
-
- Steps executed: [list of steps]
|
|
216
|
-
|
|
217
|
-
## Generalizable Improvements Made
|
|
218
|
-
- [Step]: [What was improved]
|
|
219
|
-
|
|
220
|
-
## Bespoke Learnings Captured
|
|
221
|
-
- Location: [path to AGENTS.md]
|
|
222
|
-
- Entries added: [list of entries]
|
|
223
|
-
|
|
224
|
-
## Files Modified
|
|
225
|
-
- [List of files changed]
|
|
226
|
-
|
|
227
|
-
## Recommendations
|
|
228
|
-
- [Any additional suggestions]
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
3. **If commands were regenerated**, look at the "To use the new commands" section in the `deepwork sync` output and **relay these exact reload instructions to the user** (e.g., "Type 'exit' then run 'claude --resume'" for Claude Code)
|
|
174
|
+
2. **If skills were regenerated**, look at the "To use the new skills" section in the `deepwork sync` output and **relay these exact reload instructions to the user** (e.g., "Type 'exit' then run 'claude --resume'" for Claude Code)
|
|
232
175
|
|
|
233
176
|
## File Reference Patterns
|
|
234
177
|
|
|
@@ -259,7 +202,6 @@ When adding entries to AGENTS.md, prefer these patterns:
|
|
|
259
202
|
- AGENTS.md created/updated with bespoke learnings
|
|
260
203
|
- File references used instead of duplicating content
|
|
261
204
|
- AGENTS.md is in the correct working folder
|
|
262
|
-
- learning_summary.md documents all changes
|
|
263
205
|
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>`
|
|
264
206
|
|
|
265
207
|
## Example Dialog
|
|
@@ -319,7 +261,7 @@ I found the following job executions:
|
|
|
319
261
|
|
|
320
262
|
**Summary**
|
|
321
263
|
|
|
322
|
-
|
|
264
|
+
Updated job instructions and created AGENTS.md with bespoke learnings. To get the updated skills, type 'exit' then run 'claude --resume'.
|
|
323
265
|
```
|
|
324
266
|
|
|
325
267
|
## Handling Edge Cases
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Project Context for [Job Name]
|
|
2
|
+
|
|
3
|
+
## Codebase Structure
|
|
4
|
+
|
|
5
|
+
<!-- Reference files rather than duplicating content -->
|
|
6
|
+
- Project structure: See `README.md` for overview
|
|
7
|
+
- API documentation: See `docs/api.md`
|
|
8
|
+
- Configuration: See `config/README.md`
|
|
9
|
+
|
|
10
|
+
## Conventions
|
|
11
|
+
|
|
12
|
+
### Naming Conventions
|
|
13
|
+
- [Convention]: See example in `path/to/example.ext:LINE`
|
|
14
|
+
|
|
15
|
+
### File Organization
|
|
16
|
+
- [Pattern]: Reference `path/to/pattern/`
|
|
17
|
+
|
|
18
|
+
## Job-Specific Context
|
|
19
|
+
|
|
20
|
+
### [Job Name]
|
|
21
|
+
|
|
22
|
+
#### [Step Name]
|
|
23
|
+
- [Learning]: Reference `relevant/file.ext`
|
|
24
|
+
- [Context]: [Brief explanation with file reference]
|
|
25
|
+
|
|
26
|
+
## Known Issues and Workarounds
|
|
27
|
+
|
|
28
|
+
- [Issue]: [Workaround with file reference if applicable]
|
|
29
|
+
|
|
30
|
+
## Last Updated
|
|
31
|
+
- Date: [YYYY-MM-DD]
|
|
32
|
+
- From conversation about: [Brief description]
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Example: Competitive Research Job
|
|
2
|
+
#
|
|
3
|
+
# This is a complete example of a job.yml file for reference.
|
|
4
|
+
|
|
5
|
+
name: competitive_research
|
|
6
|
+
version: "1.0.0"
|
|
7
|
+
summary: "Systematic competitive analysis workflow"
|
|
8
|
+
description: |
|
|
9
|
+
A comprehensive workflow for analyzing competitors in your market segment.
|
|
10
|
+
Helps product teams understand the competitive landscape through systematic
|
|
11
|
+
identification, research, comparison, and positioning recommendations.
|
|
12
|
+
|
|
13
|
+
changelog:
|
|
14
|
+
- version: "1.0.0"
|
|
15
|
+
changes: "Initial job creation"
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- id: identify_competitors
|
|
19
|
+
name: "Identify Competitors"
|
|
20
|
+
description: "Identify 5-7 key competitors in the target market"
|
|
21
|
+
instructions_file: steps/identify_competitors.md
|
|
22
|
+
inputs:
|
|
23
|
+
- name: market_segment
|
|
24
|
+
description: "The market segment to analyze"
|
|
25
|
+
- name: product_category
|
|
26
|
+
description: "The product category"
|
|
27
|
+
outputs:
|
|
28
|
+
- competitors_list.md
|
|
29
|
+
dependencies: []
|
|
30
|
+
|
|
31
|
+
- id: research_competitors
|
|
32
|
+
name: "Research Competitors"
|
|
33
|
+
description: "Deep dive research on each identified competitor"
|
|
34
|
+
instructions_file: steps/research_competitors.md
|
|
35
|
+
inputs:
|
|
36
|
+
- file: competitors_list.md
|
|
37
|
+
from_step: identify_competitors
|
|
38
|
+
outputs:
|
|
39
|
+
- research_notes.md
|
|
40
|
+
dependencies:
|
|
41
|
+
- identify_competitors
|
|
42
|
+
hooks:
|
|
43
|
+
after_agent:
|
|
44
|
+
- prompt: |
|
|
45
|
+
Verify the research meets criteria:
|
|
46
|
+
1. Each competitor has at least 3 data points
|
|
47
|
+
2. Sources are cited
|
|
48
|
+
3. Information is current (within last year)
|
|
49
|
+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
|
|
50
|
+
|
|
51
|
+
- id: comparative_analysis
|
|
52
|
+
name: "Comparative Analysis"
|
|
53
|
+
description: "Create side-by-side comparison matrix"
|
|
54
|
+
instructions_file: steps/comparative_analysis.md
|
|
55
|
+
inputs:
|
|
56
|
+
- file: research_notes.md
|
|
57
|
+
from_step: research_competitors
|
|
58
|
+
outputs:
|
|
59
|
+
- comparison_matrix.md
|
|
60
|
+
dependencies:
|
|
61
|
+
- research_competitors
|
|
62
|
+
|
|
63
|
+
- id: positioning_recommendations
|
|
64
|
+
name: "Positioning Recommendations"
|
|
65
|
+
description: "Strategic positioning recommendations based on analysis"
|
|
66
|
+
instructions_file: steps/positioning_recommendations.md
|
|
67
|
+
inputs:
|
|
68
|
+
- file: comparison_matrix.md
|
|
69
|
+
from_step: comparative_analysis
|
|
70
|
+
outputs:
|
|
71
|
+
- positioning_report.md
|
|
72
|
+
dependencies:
|
|
73
|
+
- comparative_analysis
|