deepwork 0.1.0__py3-none-any.whl → 0.2.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 +48 -0
- deepwork/cli/sync.py +9 -0
- deepwork/core/adapters.py +17 -0
- deepwork/core/policy_parser.py +10 -0
- deepwork/hooks/evaluate_policies.py +237 -20
- deepwork/schemas/policy_schema.py +10 -0
- deepwork/standard_jobs/deepwork_jobs/AGENTS.md +60 -0
- deepwork/standard_jobs/deepwork_jobs/job.yml +30 -22
- deepwork/standard_jobs/deepwork_jobs/make_new_job.sh +134 -0
- deepwork/standard_jobs/deepwork_jobs/steps/define.md +26 -57
- deepwork/standard_jobs/deepwork_jobs/steps/implement.md +43 -242
- deepwork/standard_jobs/deepwork_jobs/steps/learn.md +288 -0
- deepwork/standard_jobs/deepwork_jobs/steps/supplemental_file_references.md +40 -0
- 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_policy/hooks/{capture_work_tree.sh → capture_prompt_work_tree.sh} +3 -2
- deepwork/standard_jobs/deepwork_policy/hooks/policy_stop_hook.sh +3 -19
- deepwork/standard_jobs/deepwork_policy/hooks/user_prompt_submit.sh +5 -6
- deepwork/standard_jobs/deepwork_policy/steps/define.md +22 -1
- deepwork/templates/default_policy.yml +53 -0
- {deepwork-0.1.0.dist-info → deepwork-0.2.0.dist-info}/METADATA +52 -128
- deepwork-0.2.0.dist-info/RECORD +49 -0
- deepwork/standard_jobs/deepwork_jobs/steps/refine.md +0 -447
- deepwork/standard_jobs/deepwork_policy/hooks/get_changed_files.sh +0 -30
- deepwork-0.1.0.dist-info/RECORD +0 -41
- {deepwork-0.1.0.dist-info → deepwork-0.2.0.dist-info}/WHEEL +0 -0
- {deepwork-0.1.0.dist-info → deepwork-0.2.0.dist-info}/entry_points.txt +0 -0
- {deepwork-0.1.0.dist-info → deepwork-0.2.0.dist-info}/licenses/LICENSE.md +0 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
# Learn from Job Execution
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
|
|
5
|
+
Think deeply about this task. Reflect on the current conversation to identify learnings from DeepWork job executions, improve job instructions with generalizable insights, and capture bespoke (run-specific) learnings in AGENTS.md files in the appropriate working folder.
|
|
6
|
+
|
|
7
|
+
## Task
|
|
8
|
+
|
|
9
|
+
Analyze the conversation history to extract learnings and improvements, then apply them appropriately:
|
|
10
|
+
- **Generalizable learnings** → Update job instruction files
|
|
11
|
+
- **Bespoke learnings** (specific to this run) → Add to AGENTS.md in working folder
|
|
12
|
+
|
|
13
|
+
### Step 1: Analyze Conversation for Job Executions
|
|
14
|
+
|
|
15
|
+
1. **Scan the conversation** for DeepWork slash commands that were run
|
|
16
|
+
- Look for patterns like `/job_name.step_id`
|
|
17
|
+
- Identify which jobs and steps were executed
|
|
18
|
+
- Note the order of execution
|
|
19
|
+
|
|
20
|
+
2. **Identify the working folder**
|
|
21
|
+
- Should be clear from conversation history where work was done
|
|
22
|
+
- If unclear, run `git diff` to see where changes were made on the branch
|
|
23
|
+
|
|
24
|
+
3. **If no job was specified**, ask the user:
|
|
25
|
+
- "Which DeepWork job would you like me to learn from?"
|
|
26
|
+
- List available jobs from `.deepwork/jobs/`
|
|
27
|
+
|
|
28
|
+
### Step 2: Identify Points of Confusion and Inefficiency
|
|
29
|
+
|
|
30
|
+
Review the conversation for:
|
|
31
|
+
|
|
32
|
+
1. **Confusion signals**
|
|
33
|
+
- Questions the agent asked that shouldn't have been necessary
|
|
34
|
+
- Misunderstandings about what a step required
|
|
35
|
+
- Incorrect outputs that needed correction
|
|
36
|
+
- Ambiguous instructions that led to wrong interpretations
|
|
37
|
+
|
|
38
|
+
2. **Inefficiency signals**
|
|
39
|
+
- Extra steps or iterations that were needed
|
|
40
|
+
- Information that had to be repeated
|
|
41
|
+
- Context that was missing from instructions
|
|
42
|
+
- Dependencies that weren't clear
|
|
43
|
+
|
|
44
|
+
3. **Error patterns**
|
|
45
|
+
- Failed validations and why they failed
|
|
46
|
+
- Quality criteria that were misunderstood
|
|
47
|
+
- Edge cases that weren't handled
|
|
48
|
+
|
|
49
|
+
4. **Success patterns**
|
|
50
|
+
- What worked particularly well
|
|
51
|
+
- Efficient approaches worth preserving
|
|
52
|
+
- Good examples that could be added to instructions
|
|
53
|
+
|
|
54
|
+
### Step 3: Classify Learnings
|
|
55
|
+
|
|
56
|
+
For each learning identified, determine if it is:
|
|
57
|
+
|
|
58
|
+
**Generalizable** (should improve instructions):
|
|
59
|
+
- Would help ANY future run of this job
|
|
60
|
+
- Addresses unclear or missing guidance
|
|
61
|
+
- Fixes incorrect assumptions in instructions
|
|
62
|
+
- Adds helpful examples or context
|
|
63
|
+
- Examples:
|
|
64
|
+
- "Step instructions should mention that X format is required"
|
|
65
|
+
- "Quality criteria should include checking for Y"
|
|
66
|
+
- "Add example of correct output format"
|
|
67
|
+
|
|
68
|
+
**Bespoke** (should go in AGENTS.md):
|
|
69
|
+
- Specific to THIS project/codebase/run
|
|
70
|
+
- Depends on local conventions or structure
|
|
71
|
+
- References specific files or paths
|
|
72
|
+
- Would not apply to other uses of this job
|
|
73
|
+
- Examples:
|
|
74
|
+
- "In this codebase, API endpoints are in `src/api/`"
|
|
75
|
+
- "This project uses camelCase for function names"
|
|
76
|
+
- "The main config file is at `config/settings.yml`"
|
|
77
|
+
|
|
78
|
+
### Step 4: Update Job Instructions (Generalizable Learnings)
|
|
79
|
+
|
|
80
|
+
For each generalizable learning:
|
|
81
|
+
|
|
82
|
+
1. **Locate the instruction file**
|
|
83
|
+
- Path: `.deepwork/jobs/[job_name]/steps/[step_id].md`
|
|
84
|
+
|
|
85
|
+
2. **Make targeted improvements**
|
|
86
|
+
- Add missing context or clarification
|
|
87
|
+
- Include helpful examples
|
|
88
|
+
- Clarify ambiguous instructions
|
|
89
|
+
- Update quality criteria if needed
|
|
90
|
+
|
|
91
|
+
3. **Keep instructions concise**
|
|
92
|
+
- Avoid redundancy - don't repeat the same guidance in multiple places
|
|
93
|
+
- Be direct - remove verbose explanations that don't add value
|
|
94
|
+
- Prefer bullet points over paragraphs where appropriate
|
|
95
|
+
|
|
96
|
+
4. **Preserve instruction structure**
|
|
97
|
+
- Keep existing sections (Objective, Task, Process, Output Format, Quality Criteria)
|
|
98
|
+
- Add to appropriate sections rather than restructuring
|
|
99
|
+
- Maintain consistency with other steps
|
|
100
|
+
|
|
101
|
+
5. **Track changes for changelog**
|
|
102
|
+
- Note what was changed and why
|
|
103
|
+
- Prepare changelog entry for job.yml
|
|
104
|
+
|
|
105
|
+
### Step 4b: Extract Shared Content into Referenced Files
|
|
106
|
+
|
|
107
|
+
Review all instruction files for the job and identify content that:
|
|
108
|
+
- Appears in multiple step instructions (duplicated)
|
|
109
|
+
- Is lengthy and could be extracted for clarity
|
|
110
|
+
- Would benefit from being maintained in one place
|
|
111
|
+
|
|
112
|
+
**Extract to shared files:**
|
|
113
|
+
|
|
114
|
+
1. **Create shared files** in `.deepwork/jobs/[job_name]/steps/shared/`
|
|
115
|
+
- `conventions.md` - Coding/formatting conventions used across steps
|
|
116
|
+
- `examples.md` - Common examples referenced by multiple steps
|
|
117
|
+
- `schemas.md` - Data structures or formats used throughout
|
|
118
|
+
|
|
119
|
+
2. **Reference from instructions** using markdown includes or explicit references:
|
|
120
|
+
```markdown
|
|
121
|
+
## Conventions
|
|
122
|
+
|
|
123
|
+
Follow the conventions defined in `shared/conventions.md`.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
3. **Benefits of extraction:**
|
|
127
|
+
- Single source of truth - update once, applies everywhere
|
|
128
|
+
- Shorter instruction files - easier to read and maintain
|
|
129
|
+
- Consistent guidance across steps
|
|
130
|
+
|
|
131
|
+
### Step 5: Create/Update AGENTS.md (Bespoke Learnings)
|
|
132
|
+
|
|
133
|
+
The AGENTS.md file captures project-specific knowledge that helps future agent runs.
|
|
134
|
+
|
|
135
|
+
1. **Determine the correct location**
|
|
136
|
+
- Place AGENTS.md in the working folder where job outputs live
|
|
137
|
+
- This ensures the knowledge is available when working in that context
|
|
138
|
+
- If uncertain, place at the project root
|
|
139
|
+
|
|
140
|
+
2. **Use file references where possible**
|
|
141
|
+
- Instead of duplicating information, reference source files
|
|
142
|
+
- This keeps AGENTS.md in sync as the codebase evolves
|
|
143
|
+
- Pattern: "See `path/to/file.ext` for [description]"
|
|
144
|
+
|
|
145
|
+
3. **AGENTS.md structure**: See `.deepwork/jobs/deepwork_jobs/templates/agents.md.template` for the standard format.
|
|
146
|
+
|
|
147
|
+
4. **Writing entries**
|
|
148
|
+
- Be concise but specific
|
|
149
|
+
- Always prefer file references over inline content
|
|
150
|
+
- Use line numbers when referencing specific code: `file.ext:42`
|
|
151
|
+
- Group related learnings together
|
|
152
|
+
|
|
153
|
+
### Step 6: Update Job Version and Changelog
|
|
154
|
+
|
|
155
|
+
If instruction files were modified:
|
|
156
|
+
|
|
157
|
+
1. **Bump version in job.yml**
|
|
158
|
+
- Patch version (0.0.x) for instruction improvements
|
|
159
|
+
- Minor version (0.x.0) if quality criteria changed
|
|
160
|
+
|
|
161
|
+
2. **Add changelog entry**
|
|
162
|
+
```yaml
|
|
163
|
+
- version: "[new_version]"
|
|
164
|
+
changes: "Improved [step] instructions based on execution learnings: [brief description]"
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
### Step 7: Sync and Relay Instructions
|
|
168
|
+
|
|
169
|
+
1. **Run deepwork sync** (if instructions were modified)
|
|
170
|
+
```bash
|
|
171
|
+
deepwork sync
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
2. **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)
|
|
175
|
+
|
|
176
|
+
## File Reference Patterns
|
|
177
|
+
|
|
178
|
+
When adding entries to AGENTS.md, prefer these patterns:
|
|
179
|
+
|
|
180
|
+
**Good (references)**:
|
|
181
|
+
```markdown
|
|
182
|
+
- API endpoints follow REST conventions. See `src/api/routes.ts` for examples.
|
|
183
|
+
- Error handling pattern: See `src/utils/errors.ts:15-30`
|
|
184
|
+
- Configuration schema: Defined in `config/schema.json`
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
**Avoid (duplicating)**:
|
|
188
|
+
```markdown
|
|
189
|
+
- API endpoints should return JSON with this format: { status: ..., data: ... }
|
|
190
|
+
- Error handling should use try/catch with custom error classes
|
|
191
|
+
- Configuration requires these fields: name, version, ...
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Quality Criteria
|
|
195
|
+
|
|
196
|
+
- Conversation has been analyzed for job executions
|
|
197
|
+
- Points of confusion and inefficiency are identified
|
|
198
|
+
- Learnings are correctly classified (generalizable vs bespoke)
|
|
199
|
+
- Job instructions updated for generalizable improvements
|
|
200
|
+
- Instructions are concise - no redundancy or unnecessary verbosity
|
|
201
|
+
- Shared/lengthy content extracted into referenced files where appropriate
|
|
202
|
+
- AGENTS.md created/updated with bespoke learnings
|
|
203
|
+
- File references used instead of duplicating content
|
|
204
|
+
- AGENTS.md is in the correct working folder
|
|
205
|
+
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>`
|
|
206
|
+
|
|
207
|
+
## Example Dialog
|
|
208
|
+
|
|
209
|
+
```
|
|
210
|
+
User: /deepwork_jobs.learn
|
|
211
|
+
|
|
212
|
+
Claude: I'll analyze this conversation for learnings from DeepWork job executions.
|
|
213
|
+
|
|
214
|
+
**Conversation Analysis**
|
|
215
|
+
|
|
216
|
+
I found the following job executions:
|
|
217
|
+
1. `/competitive_research.identify_competitors` - Completed
|
|
218
|
+
2. `/competitive_research.research_competitors` - Completed with 2 iterations
|
|
219
|
+
3. `/competitive_research.comparative_analysis` - Completed
|
|
220
|
+
|
|
221
|
+
**Identified Issues**
|
|
222
|
+
|
|
223
|
+
1. **Confusion in step 2**: The instructions didn't specify that competitor research should include pricing information. This caused an extra iteration.
|
|
224
|
+
|
|
225
|
+
2. **Missing context**: The agent had to ask about the industry focus, which should have been carried forward from step 1.
|
|
226
|
+
|
|
227
|
+
**Classification**
|
|
228
|
+
|
|
229
|
+
- Generalizable: Add pricing to research requirements in instructions
|
|
230
|
+
- Bespoke: This project focuses on B2B SaaS in the HR tech space
|
|
231
|
+
|
|
232
|
+
**Actions Taken**
|
|
233
|
+
|
|
234
|
+
1. Updated `.deepwork/jobs/competitive_research/steps/research_competitors.md`:
|
|
235
|
+
- Added "Include pricing information (tiers, models, approximate ranges)" to research requirements
|
|
236
|
+
- Added note about carrying forward industry context from previous step
|
|
237
|
+
|
|
238
|
+
2. Created `./competitive_research_output/AGENTS.md`:
|
|
239
|
+
```markdown
|
|
240
|
+
# Project Context for Competitive Research
|
|
241
|
+
|
|
242
|
+
## Job-Specific Context
|
|
243
|
+
|
|
244
|
+
### competitive_research
|
|
245
|
+
|
|
246
|
+
#### Industry Focus
|
|
247
|
+
- Domain: B2B SaaS, HR Technology sector
|
|
248
|
+
- See `identify_competitors_output.md` for market definition
|
|
249
|
+
|
|
250
|
+
#### Competitors Identified
|
|
251
|
+
- Reference: `competitor_list.md` for full details
|
|
252
|
+
|
|
253
|
+
## Last Updated
|
|
254
|
+
- Date: 2024-01-15
|
|
255
|
+
- From conversation about: Initial competitive analysis run
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
3. Updated job.yml version to 1.0.1 with changelog entry
|
|
259
|
+
|
|
260
|
+
4. Ran `deepwork sync`
|
|
261
|
+
|
|
262
|
+
**Summary**
|
|
263
|
+
|
|
264
|
+
Updated job instructions and created AGENTS.md with bespoke learnings. To get the updated commands, type 'exit' then run 'claude --resume'.
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## Handling Edge Cases
|
|
268
|
+
|
|
269
|
+
**No job executions found**:
|
|
270
|
+
- Ask user which job they'd like to analyze
|
|
271
|
+
- Or offer to review available jobs
|
|
272
|
+
|
|
273
|
+
**Multiple jobs executed**:
|
|
274
|
+
- Analyze each job separately
|
|
275
|
+
- Create separate AGENTS.md entries or files as appropriate
|
|
276
|
+
|
|
277
|
+
**AGENTS.md already exists**:
|
|
278
|
+
- Read existing content
|
|
279
|
+
- Append new learnings to appropriate sections
|
|
280
|
+
- Update "Last Updated" section
|
|
281
|
+
|
|
282
|
+
**No issues found**:
|
|
283
|
+
- Document what worked well
|
|
284
|
+
- Consider if any successful patterns should be added to instructions as examples
|
|
285
|
+
|
|
286
|
+
**Sensitive information**:
|
|
287
|
+
- Never include secrets, credentials, or PII in AGENTS.md
|
|
288
|
+
- Reference config files instead of including values
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Supplementary Reference Files
|
|
2
|
+
|
|
3
|
+
Step instructions can include additional `.md` files in the `steps/` directory. These supplementary files are useful for:
|
|
4
|
+
|
|
5
|
+
- Providing detailed examples or templates that would clutter the main instruction file
|
|
6
|
+
- Sharing common reference material across multiple steps
|
|
7
|
+
- Including technical specifications, API documentation, or style guides
|
|
8
|
+
|
|
9
|
+
## How to Use
|
|
10
|
+
|
|
11
|
+
1. Place additional `.md` files in the `steps/` directory alongside the main step instruction files
|
|
12
|
+
2. Reference them in your step instructions using the **full path from the project root**
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
If you have a job called `my_job` and want to include an API specification template:
|
|
17
|
+
|
|
18
|
+
1. Create the file at `.deepwork/jobs/my_job/steps/api_spec.md`
|
|
19
|
+
2. Reference it in your step instructions like this:
|
|
20
|
+
|
|
21
|
+
```markdown
|
|
22
|
+
Use the template in `.deepwork/jobs/my_job/steps/api_spec.md` to structure your API endpoints.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Path Format
|
|
26
|
+
|
|
27
|
+
Always use the full relative path from the project root:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
.deepwork/jobs/[job_name]/steps/[filename].md
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
For example:
|
|
34
|
+
- `.deepwork/jobs/competitive_research/steps/competitor_template.md`
|
|
35
|
+
- `.deepwork/jobs/api_design/steps/endpoint_schema.md`
|
|
36
|
+
- `.deepwork/jobs/onboarding/steps/checklist_template.md`
|
|
37
|
+
|
|
38
|
+
## Benefits
|
|
39
|
+
|
|
40
|
+
Using supplementary files keeps your main step instructions focused and readable while allowing you to provide detailed reference material when needed. The AI agent can read these files during execution to get additional context.
|
|
@@ -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
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# DeepWork Job Specification Template
|
|
2
|
+
#
|
|
3
|
+
# This template shows the structure of a job.yml file.
|
|
4
|
+
# Replace placeholders in [brackets] with actual values.
|
|
5
|
+
|
|
6
|
+
name: [job_name]
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
summary: "[Brief one-line summary of what this job accomplishes - max 200 chars]"
|
|
9
|
+
description: |
|
|
10
|
+
[Detailed multi-line description of the job's purpose, process, and goals.
|
|
11
|
+
|
|
12
|
+
This should explain:
|
|
13
|
+
- What problem this workflow solves
|
|
14
|
+
- What the overall process looks like
|
|
15
|
+
- What the end result will be
|
|
16
|
+
- Who the intended users are
|
|
17
|
+
- Any important context about the workflow]
|
|
18
|
+
|
|
19
|
+
changelog:
|
|
20
|
+
- version: "1.0.0"
|
|
21
|
+
changes: "Initial job creation"
|
|
22
|
+
|
|
23
|
+
steps:
|
|
24
|
+
- id: [step_id]
|
|
25
|
+
name: "[Step Name]"
|
|
26
|
+
description: "[What this step does]"
|
|
27
|
+
instructions_file: steps/[step_id].md
|
|
28
|
+
inputs:
|
|
29
|
+
- name: [param_name]
|
|
30
|
+
description: "[What user needs to provide]"
|
|
31
|
+
# OR for file inputs from previous steps:
|
|
32
|
+
# - file: [filename_or_path]
|
|
33
|
+
# from_step: [previous_step_id]
|
|
34
|
+
outputs:
|
|
35
|
+
- [output_filename_or_path] # e.g., "report.md" or "reports/analysis.md"
|
|
36
|
+
dependencies: [] # List of step IDs that must complete first
|
|
37
|
+
# Optional: Quality validation hooks
|
|
38
|
+
hooks:
|
|
39
|
+
after_agent:
|
|
40
|
+
- prompt: |
|
|
41
|
+
Verify this step's output meets quality criteria:
|
|
42
|
+
1. [Criterion 1]
|
|
43
|
+
2. [Criterion 2]
|
|
44
|
+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
|
|
45
|
+
|
|
46
|
+
- id: [another_step]
|
|
47
|
+
name: "[Another Step]"
|
|
48
|
+
description: "[What this step does]"
|
|
49
|
+
instructions_file: steps/[another_step].md
|
|
50
|
+
inputs:
|
|
51
|
+
- file: [output_filename_or_path]
|
|
52
|
+
from_step: [step_id]
|
|
53
|
+
outputs:
|
|
54
|
+
- [another_output_path]
|
|
55
|
+
dependencies:
|
|
56
|
+
- [step_id] # This step requires the previous step
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Example: Identify Competitors Step Instruction
|
|
2
|
+
#
|
|
3
|
+
# This is a complete example of a step instruction file for reference.
|
|
4
|
+
|
|
5
|
+
# Identify Competitors
|
|
6
|
+
|
|
7
|
+
## Objective
|
|
8
|
+
|
|
9
|
+
Identify 5-7 key competitors in the target market segment to analyze for competitive positioning.
|
|
10
|
+
|
|
11
|
+
## Task
|
|
12
|
+
|
|
13
|
+
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.
|
|
14
|
+
|
|
15
|
+
### Process
|
|
16
|
+
|
|
17
|
+
1. **Understand the market context**
|
|
18
|
+
- Review the market segment provided by the user
|
|
19
|
+
- Understand the product category boundaries
|
|
20
|
+
- Consider direct and indirect competitors
|
|
21
|
+
|
|
22
|
+
2. **Research competitors**
|
|
23
|
+
- Search for companies in this space
|
|
24
|
+
- Look for market leaders and emerging players
|
|
25
|
+
- Consider different competitive dimensions (features, price, target market)
|
|
26
|
+
|
|
27
|
+
3. **Select 5-7 key competitors**
|
|
28
|
+
- Prioritize direct competitors
|
|
29
|
+
- Include at least one market leader
|
|
30
|
+
- Include 1-2 emerging/innovative players
|
|
31
|
+
- Ensure diversity in the competitive set
|
|
32
|
+
|
|
33
|
+
4. **Document each competitor**
|
|
34
|
+
- Company name
|
|
35
|
+
- Brief description (2-3 sentences)
|
|
36
|
+
- Why they're a relevant competitor
|
|
37
|
+
- Primary competitive dimension
|
|
38
|
+
|
|
39
|
+
## Output Format
|
|
40
|
+
|
|
41
|
+
### competitors_list.md
|
|
42
|
+
|
|
43
|
+
A markdown document listing each competitor with context.
|
|
44
|
+
|
|
45
|
+
**Structure**:
|
|
46
|
+
```markdown
|
|
47
|
+
# Competitor Analysis: [Market Segment]
|
|
48
|
+
|
|
49
|
+
## Market Context
|
|
50
|
+
- **Segment**: [market segment]
|
|
51
|
+
- **Category**: [product category]
|
|
52
|
+
- **Analysis Date**: [current date]
|
|
53
|
+
|
|
54
|
+
## Identified Competitors
|
|
55
|
+
|
|
56
|
+
### 1. [Competitor Name]
|
|
57
|
+
**Description**: [2-3 sentence description of what they do]
|
|
58
|
+
|
|
59
|
+
**Why Relevant**: [Why they're a key competitor in this space]
|
|
60
|
+
|
|
61
|
+
**Competitive Dimension**: [What they compete on - e.g., price, features, market segment]
|
|
62
|
+
|
|
63
|
+
[Repeat for each competitor, 5-7 total]
|
|
64
|
+
|
|
65
|
+
## Selection Rationale
|
|
66
|
+
|
|
67
|
+
[Brief paragraph explaining why these specific competitors were chosen and what dimensions of competition they represent]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Quality Criteria
|
|
71
|
+
|
|
72
|
+
- 5-7 competitors identified (not too few, not too many)
|
|
73
|
+
- Mix of established and emerging players
|
|
74
|
+
- All competitors are genuinely relevant to the market segment
|
|
75
|
+
- Each competitor has clear, specific description
|
|
76
|
+
- Selection rationale explains the competitive landscape
|
|
77
|
+
- Output is well-formatted and ready for use by next step
|
|
78
|
+
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>` in your response
|
|
79
|
+
|
|
80
|
+
## Context
|
|
81
|
+
|
|
82
|
+
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.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# [Step Name]
|
|
2
|
+
|
|
3
|
+
## Objective
|
|
4
|
+
|
|
5
|
+
[Clear statement of what this step accomplishes, derived from the step's description]
|
|
6
|
+
|
|
7
|
+
## Task
|
|
8
|
+
|
|
9
|
+
[Detailed instructions for completing this step, based on:
|
|
10
|
+
- The step's purpose
|
|
11
|
+
- Expected inputs and outputs
|
|
12
|
+
- The job's overall context
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
### Process
|
|
16
|
+
|
|
17
|
+
[Break down the step into substeps. Use the information gathered during define about:
|
|
18
|
+
- What needs to be done
|
|
19
|
+
- What makes a good output
|
|
20
|
+
- Any quality criteria
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
1. [Substep 1]
|
|
24
|
+
2. [Substep 2]
|
|
25
|
+
3. [Substep 3]
|
|
26
|
+
|
|
27
|
+
[If this step has user inputs, explain how to gather them]
|
|
28
|
+
[If this step has file inputs, explain how to use them]
|
|
29
|
+
|
|
30
|
+
## Output Format
|
|
31
|
+
|
|
32
|
+
### [output_filename_1]
|
|
33
|
+
|
|
34
|
+
[Description of what should be in this output file]
|
|
35
|
+
|
|
36
|
+
**Structure**:
|
|
37
|
+
```[file format]
|
|
38
|
+
[Example or template of what the output should look like]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
[Repeat for each output file]
|
|
42
|
+
|
|
43
|
+
## Quality Criteria
|
|
44
|
+
|
|
45
|
+
[List what makes this step's output high quality:
|
|
46
|
+
- Completeness checks
|
|
47
|
+
- Format requirements
|
|
48
|
+
- Content requirements
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
- [Quality criterion 1]
|
|
52
|
+
- [Quality criterion 2]
|
|
53
|
+
- [Quality criterion 3]
|
|
54
|
+
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>` in your response
|
|
55
|
+
|
|
56
|
+
## Context
|
|
57
|
+
|
|
58
|
+
[Provide context from the job's overall description to help understand why this step matters and how it fits into the bigger picture]
|
deepwork/standard_jobs/deepwork_policy/hooks/{capture_work_tree.sh → capture_prompt_work_tree.sh}
RENAMED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
2
|
+
# capture_prompt_work_tree.sh - Captures the git work tree state at prompt submission
|
|
3
3
|
#
|
|
4
4
|
# This script creates a snapshot of the current git state by recording
|
|
5
5
|
# all files that have been modified, added, or deleted. This baseline
|
|
6
|
-
# is used
|
|
6
|
+
# is used for policies with compare_to: prompt to detect what changed
|
|
7
|
+
# during an agent response (between user prompts).
|
|
7
8
|
|
|
8
9
|
set -e
|
|
9
10
|
|