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,134 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# make_new_job.sh - Create directory structure for a new DeepWork job
|
|
4
|
+
#
|
|
5
|
+
# Usage: ./make_new_job.sh <job_name>
|
|
6
|
+
#
|
|
7
|
+
|
|
8
|
+
set -euo pipefail
|
|
9
|
+
|
|
10
|
+
# Color output helpers
|
|
11
|
+
RED='\033[0;31m'
|
|
12
|
+
GREEN='\033[0;32m'
|
|
13
|
+
YELLOW='\033[1;33m'
|
|
14
|
+
NC='\033[0m' # No Color
|
|
15
|
+
|
|
16
|
+
info() {
|
|
17
|
+
echo -e "${GREEN}[INFO]${NC} $1"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
warn() {
|
|
21
|
+
echo -e "${YELLOW}[WARN]${NC} $1"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
error() {
|
|
25
|
+
echo -e "${RED}[ERROR]${NC} $1"
|
|
26
|
+
exit 1
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# Validate job name format
|
|
30
|
+
validate_job_name() {
|
|
31
|
+
local name="$1"
|
|
32
|
+
if [[ ! "$name" =~ ^[a-z][a-z0-9_]*$ ]]; then
|
|
33
|
+
error "Invalid job name '$name'. Must be lowercase, start with a letter, and contain only letters, numbers, and underscores."
|
|
34
|
+
fi
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
# Main script
|
|
38
|
+
main() {
|
|
39
|
+
if [[ $# -lt 1 ]]; then
|
|
40
|
+
echo "Usage: $0 <job_name>"
|
|
41
|
+
echo ""
|
|
42
|
+
echo "Creates the directory structure for a new DeepWork job."
|
|
43
|
+
echo ""
|
|
44
|
+
echo "Arguments:"
|
|
45
|
+
echo " job_name Name of the job (lowercase, underscores allowed)"
|
|
46
|
+
echo ""
|
|
47
|
+
echo "Example:"
|
|
48
|
+
echo " $0 competitive_research"
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
local job_name="$1"
|
|
53
|
+
validate_job_name "$job_name"
|
|
54
|
+
|
|
55
|
+
# Determine the base path - look for .deepwork directory
|
|
56
|
+
local base_path
|
|
57
|
+
if [[ -d ".deepwork/jobs" ]]; then
|
|
58
|
+
base_path=".deepwork/jobs"
|
|
59
|
+
elif [[ -d "../.deepwork/jobs" ]]; then
|
|
60
|
+
base_path="../.deepwork/jobs"
|
|
61
|
+
else
|
|
62
|
+
# Create from current directory
|
|
63
|
+
base_path=".deepwork/jobs"
|
|
64
|
+
mkdir -p "$base_path"
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
local job_path="${base_path}/${job_name}"
|
|
68
|
+
|
|
69
|
+
# Check if job already exists
|
|
70
|
+
if [[ -d "$job_path" ]]; then
|
|
71
|
+
error "Job '$job_name' already exists at $job_path"
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
info "Creating job directory structure for '$job_name'..."
|
|
75
|
+
|
|
76
|
+
# Create main job directory and subdirectories
|
|
77
|
+
mkdir -p "$job_path"
|
|
78
|
+
mkdir -p "$job_path/steps"
|
|
79
|
+
mkdir -p "$job_path/hooks"
|
|
80
|
+
mkdir -p "$job_path/templates"
|
|
81
|
+
|
|
82
|
+
# Add .gitkeep files to empty directories
|
|
83
|
+
touch "$job_path/hooks/.gitkeep"
|
|
84
|
+
touch "$job_path/templates/.gitkeep"
|
|
85
|
+
|
|
86
|
+
# Create AGENTS.md file
|
|
87
|
+
cat > "$job_path/AGENTS.md" << 'EOF'
|
|
88
|
+
# Job Management
|
|
89
|
+
|
|
90
|
+
This folder and its subfolders are managed using the `deepwork_jobs` slash commands.
|
|
91
|
+
|
|
92
|
+
## Recommended Commands
|
|
93
|
+
|
|
94
|
+
- `/deepwork_jobs.define` - Create or modify the job.yml specification
|
|
95
|
+
- `/deepwork_jobs.implement` - Generate step instruction files from the specification
|
|
96
|
+
- `/deepwork_jobs.learn` - Improve instructions based on execution learnings
|
|
97
|
+
|
|
98
|
+
## Directory Structure
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
.
|
|
102
|
+
├── AGENTS.md # This file - project context and guidance
|
|
103
|
+
├── job.yml # Job specification (created by /deepwork_jobs.define)
|
|
104
|
+
├── steps/ # Step instruction files (created by /deepwork_jobs.implement)
|
|
105
|
+
│ └── *.md # One file per step
|
|
106
|
+
├── hooks/ # Custom validation scripts and prompts
|
|
107
|
+
│ └── *.md|*.sh # Hook files referenced in job.yml
|
|
108
|
+
└── templates/ # Example file formats and templates
|
|
109
|
+
└── *.md|*.yml # Templates referenced in step instructions
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Editing Guidelines
|
|
113
|
+
|
|
114
|
+
1. **Use slash commands** for structural changes (adding steps, modifying job.yml)
|
|
115
|
+
2. **Direct edits** are fine for minor instruction tweaks
|
|
116
|
+
3. **Run `/deepwork_jobs.learn`** after executing job steps to capture improvements
|
|
117
|
+
4. **Run `deepwork sync`** after any changes to regenerate commands
|
|
118
|
+
EOF
|
|
119
|
+
|
|
120
|
+
info "Created directory structure:"
|
|
121
|
+
echo " $job_path/"
|
|
122
|
+
echo " ├── AGENTS.md"
|
|
123
|
+
echo " ├── steps/"
|
|
124
|
+
echo " ├── hooks/.gitkeep"
|
|
125
|
+
echo " └── templates/.gitkeep"
|
|
126
|
+
|
|
127
|
+
echo ""
|
|
128
|
+
info "Next steps:"
|
|
129
|
+
echo " 1. Run '/deepwork_jobs.define' to create the job.yml specification"
|
|
130
|
+
echo " 2. Run '/deepwork_jobs.implement' to generate step instructions"
|
|
131
|
+
echo " 3. Run 'deepwork sync' to create slash commands"
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
main "$@"
|
|
@@ -62,6 +62,12 @@ For each major phase they mentioned, ask detailed questions:
|
|
|
62
62
|
|
|
63
63
|
**Note**: You're gathering this information to understand what instructions will be needed, but you won't create the instruction files yet - that happens in the `implement` step.
|
|
64
64
|
|
|
65
|
+
### Capability Considerations
|
|
66
|
+
|
|
67
|
+
When defining steps, identify any that require specialized tools:
|
|
68
|
+
|
|
69
|
+
**Browser Automation**: If any step involves web scraping, form filling, interactive browsing, UI testing, or research requiring website visits, ask the user what browser tools they have available. For Claude Code users, **Claude in Chrome** (Anthropic's browser extension) has been tested with DeepWork and is recommended for new users. Don't assume a default—confirm the tool before designing browser-dependent steps.
|
|
70
|
+
|
|
65
71
|
### Step 3: Validate the Workflow
|
|
66
72
|
|
|
67
73
|
After gathering information about all steps:
|
|
@@ -129,68 +135,31 @@ stop_hooks:
|
|
|
129
135
|
|
|
130
136
|
**Encourage prompt-based hooks** - They leverage the AI's ability to understand context and make nuanced quality judgments. Script hooks are best for objective checks (syntax, format, tests).
|
|
131
137
|
|
|
132
|
-
### Step 5: Create the
|
|
138
|
+
### Step 5: Create the Job Directory and Specification
|
|
133
139
|
|
|
134
|
-
Only after you have complete understanding, create the `job.yml` file:
|
|
140
|
+
Only after you have complete understanding, create the job directory and `job.yml` file:
|
|
135
141
|
|
|
136
|
-
**
|
|
142
|
+
**First, create the directory structure** using the `make_new_job.sh` script:
|
|
137
143
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
**Format**:
|
|
141
|
-
```yaml
|
|
142
|
-
name: [job_name]
|
|
143
|
-
version: "1.0.0"
|
|
144
|
-
summary: "[Brief one-line summary of what this job accomplishes]"
|
|
145
|
-
description: |
|
|
146
|
-
[Detailed multi-line description of the job's purpose, process, and goals.
|
|
147
|
-
|
|
148
|
-
This should explain:
|
|
149
|
-
- What problem this workflow solves
|
|
150
|
-
- What the overall process looks like
|
|
151
|
-
- What the end result will be
|
|
152
|
-
- Who the intended users are
|
|
153
|
-
- Any important context about the workflow]
|
|
154
|
-
|
|
155
|
-
changelog:
|
|
156
|
-
- version: "1.0.0"
|
|
157
|
-
changes: "Initial job creation"
|
|
158
|
-
|
|
159
|
-
steps:
|
|
160
|
-
- id: [step_id]
|
|
161
|
-
name: "[Step Name]"
|
|
162
|
-
description: "[What this step does]"
|
|
163
|
-
instructions_file: steps/[step_id].md
|
|
164
|
-
inputs:
|
|
165
|
-
- name: [param_name]
|
|
166
|
-
description: "[What user needs to provide]"
|
|
167
|
-
# OR for file inputs from previous steps:
|
|
168
|
-
# - file: [filename_or_path]
|
|
169
|
-
# from_step: [previous_step_id]
|
|
170
|
-
outputs:
|
|
171
|
-
- [output_filename_or_path] # e.g., "report.md" or "reports/analysis.md"
|
|
172
|
-
dependencies: [] # List of step IDs that must complete first
|
|
173
|
-
# Optional: Quality validation hooks
|
|
174
|
-
stop_hooks:
|
|
175
|
-
- prompt: |
|
|
176
|
-
Verify this step's output meets quality criteria:
|
|
177
|
-
1. [Criterion 1]
|
|
178
|
-
2. [Criterion 2]
|
|
179
|
-
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
|
|
180
|
-
|
|
181
|
-
- id: [another_step]
|
|
182
|
-
name: "[Another Step]"
|
|
183
|
-
description: "[What this step does]"
|
|
184
|
-
instructions_file: steps/[another_step].md
|
|
185
|
-
inputs:
|
|
186
|
-
- file: [output_filename_or_path]
|
|
187
|
-
from_step: [step_id]
|
|
188
|
-
outputs:
|
|
189
|
-
- [another_output_path]
|
|
190
|
-
dependencies:
|
|
191
|
-
- [step_id] # This step requires the previous step
|
|
144
|
+
```bash
|
|
145
|
+
.deepwork/jobs/deepwork_jobs/make_new_job.sh [job_name]
|
|
192
146
|
```
|
|
193
147
|
|
|
148
|
+
This creates:
|
|
149
|
+
- `.deepwork/jobs/[job_name]/` - Main job directory
|
|
150
|
+
- `.deepwork/jobs/[job_name]/steps/` - For step instruction files
|
|
151
|
+
- `.deepwork/jobs/[job_name]/hooks/` - For custom validation scripts
|
|
152
|
+
- `.deepwork/jobs/[job_name]/templates/` - For example file formats
|
|
153
|
+
- `.deepwork/jobs/[job_name]/AGENTS.md` - Job management guidance
|
|
154
|
+
|
|
155
|
+
**Then create the job.yml file** at `.deepwork/jobs/[job_name]/job.yml`
|
|
156
|
+
|
|
157
|
+
(Where `[job_name]` is the name of the NEW job you're creating, e.g., `competitive_research`)
|
|
158
|
+
|
|
159
|
+
**Template reference**: See `.deepwork/jobs/deepwork_jobs/templates/job.yml.template` for the standard structure.
|
|
160
|
+
|
|
161
|
+
**Complete example**: See `.deepwork/jobs/deepwork_jobs/templates/job.yml.example` for a fully worked example.
|
|
162
|
+
|
|
194
163
|
**Important**:
|
|
195
164
|
- Use lowercase with underscores for job name and step IDs
|
|
196
165
|
- Ensure file inputs reference steps in dependencies
|
|
@@ -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
|
|
|
@@ -144,6 +102,12 @@ If a step in the job.yml has `stop_hooks` defined, the generated instruction fil
|
|
|
144
102
|
|
|
145
103
|
This alignment ensures the AI agent knows exactly what will be validated and can self-check before completing.
|
|
146
104
|
|
|
105
|
+
### Using Supplementary Reference Files
|
|
106
|
+
|
|
107
|
+
Step instructions can include additional `.md` files in the `steps/` directory for detailed examples, templates, or reference material. Reference them using the full path from the project root.
|
|
108
|
+
|
|
109
|
+
See `.deepwork/jobs/deepwork_jobs/steps/supplemental_file_references.md` for detailed documentation and examples.
|
|
110
|
+
|
|
147
111
|
### Step 4: Verify job.yml Location
|
|
148
112
|
|
|
149
113
|
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.
|
|
@@ -161,11 +125,9 @@ This will:
|
|
|
161
125
|
- Generate slash-commands for each step
|
|
162
126
|
- Make the commands available in `.claude/commands/` (or appropriate platform directory)
|
|
163
127
|
|
|
164
|
-
### Step 6: Reload
|
|
128
|
+
### Step 6: Relay Reload Instructions
|
|
165
129
|
|
|
166
|
-
|
|
167
|
-
- Run `/reload` command (if available)
|
|
168
|
-
- Or restart the Claude session
|
|
130
|
+
After running `deepwork sync`, look at the "To use the new commands" section in the output. **Relay these exact reload instructions to the user** so they know how to pick up the new commands. 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).
|
|
169
131
|
|
|
170
132
|
### Step 7: Consider Policies for the New Job
|
|
171
133
|
|
|
@@ -229,112 +191,9 @@ Would you like me to create this policy? I can run `/deepwork_policy.define` to
|
|
|
229
191
|
|
|
230
192
|
## Example Implementation
|
|
231
193
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
version: "1.0.0"
|
|
236
|
-
summary: "Systematic competitive analysis workflow"
|
|
237
|
-
description: |
|
|
238
|
-
A comprehensive workflow for analyzing competitors in your market segment.
|
|
239
|
-
Helps product teams understand the competitive landscape through systematic
|
|
240
|
-
identification, research, comparison, and positioning recommendations.
|
|
241
|
-
|
|
242
|
-
steps:
|
|
243
|
-
- id: identify_competitors
|
|
244
|
-
name: "Identify Competitors"
|
|
245
|
-
description: "Identify 5-7 key competitors in the target market"
|
|
246
|
-
instructions_file: steps/identify_competitors.md
|
|
247
|
-
inputs:
|
|
248
|
-
- name: market_segment
|
|
249
|
-
description: "The market segment to analyze"
|
|
250
|
-
- name: product_category
|
|
251
|
-
description: "The product category"
|
|
252
|
-
outputs:
|
|
253
|
-
- competitors_list.md
|
|
254
|
-
dependencies: []
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
**Generate this instruction file** (`.deepwork/jobs/competitive_research/steps/identify_competitors.md`):
|
|
258
|
-
|
|
259
|
-
```markdown
|
|
260
|
-
# Identify Competitors
|
|
261
|
-
|
|
262
|
-
## Objective
|
|
263
|
-
|
|
264
|
-
Identify 5-7 key competitors in the target market segment to analyze for competitive positioning.
|
|
265
|
-
|
|
266
|
-
## Task
|
|
267
|
-
|
|
268
|
-
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.
|
|
269
|
-
|
|
270
|
-
### Process
|
|
271
|
-
|
|
272
|
-
1. **Understand the market context**
|
|
273
|
-
- Review the market segment provided by the user
|
|
274
|
-
- Understand the product category boundaries
|
|
275
|
-
- Consider direct and indirect competitors
|
|
276
|
-
|
|
277
|
-
2. **Research competitors**
|
|
278
|
-
- Search for companies in this space
|
|
279
|
-
- Look for market leaders and emerging players
|
|
280
|
-
- Consider different competitive dimensions (features, price, target market)
|
|
281
|
-
|
|
282
|
-
3. **Select 5-7 key competitors**
|
|
283
|
-
- Prioritize direct competitors
|
|
284
|
-
- Include at least one market leader
|
|
285
|
-
- Include 1-2 emerging/innovative players
|
|
286
|
-
- Ensure diversity in the competitive set
|
|
287
|
-
|
|
288
|
-
4. **Document each competitor**
|
|
289
|
-
- Company name
|
|
290
|
-
- Brief description (2-3 sentences)
|
|
291
|
-
- Why they're a relevant competitor
|
|
292
|
-
- Primary competitive dimension
|
|
293
|
-
|
|
294
|
-
## Output Format
|
|
295
|
-
|
|
296
|
-
### competitors_list.md
|
|
297
|
-
|
|
298
|
-
A markdown document listing each competitor with context.
|
|
299
|
-
|
|
300
|
-
**Structure**:
|
|
301
|
-
```markdown
|
|
302
|
-
# Competitor Analysis: [Market Segment]
|
|
303
|
-
|
|
304
|
-
## Market Context
|
|
305
|
-
- **Segment**: [market segment]
|
|
306
|
-
- **Category**: [product category]
|
|
307
|
-
- **Analysis Date**: [current date]
|
|
308
|
-
|
|
309
|
-
## Identified Competitors
|
|
310
|
-
|
|
311
|
-
### 1. [Competitor Name]
|
|
312
|
-
**Description**: [2-3 sentence description of what they do]
|
|
313
|
-
|
|
314
|
-
**Why Relevant**: [Why they're a key competitor in this space]
|
|
315
|
-
|
|
316
|
-
**Competitive Dimension**: [What they compete on - e.g., price, features, market segment]
|
|
317
|
-
|
|
318
|
-
[Repeat for each competitor, 5-7 total]
|
|
319
|
-
|
|
320
|
-
## Selection Rationale
|
|
321
|
-
|
|
322
|
-
[Brief paragraph explaining why these specific competitors were chosen and what dimensions of competition they represent]
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
## Quality Criteria
|
|
326
|
-
|
|
327
|
-
- 5-7 competitors identified (not too few, not too many)
|
|
328
|
-
- Mix of established and emerging players
|
|
329
|
-
- All competitors are genuinely relevant to the market segment
|
|
330
|
-
- Each competitor has clear, specific description
|
|
331
|
-
- Selection rationale explains the competitive landscape
|
|
332
|
-
- Output is well-formatted and ready for use by next step
|
|
333
|
-
|
|
334
|
-
## Context
|
|
335
|
-
|
|
336
|
-
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.
|
|
337
|
-
```
|
|
194
|
+
For a complete worked example showing a job.yml and corresponding step instruction file, see:
|
|
195
|
+
- **Job specification**: `.deepwork/jobs/deepwork_jobs/templates/job.yml.example`
|
|
196
|
+
- **Step instruction**: `.deepwork/jobs/deepwork_jobs/templates/step_instruction.md.example`
|
|
338
197
|
|
|
339
198
|
## Important Guidelines
|
|
340
199
|
|
|
@@ -353,63 +212,6 @@ Before running `deepwork sync`, verify:
|
|
|
353
212
|
- All step instruction files exist (one per step)
|
|
354
213
|
- No file system errors
|
|
355
214
|
|
|
356
|
-
## Output Format
|
|
357
|
-
|
|
358
|
-
### implementation_summary.md
|
|
359
|
-
|
|
360
|
-
After successful implementation, create a summary:
|
|
361
|
-
|
|
362
|
-
```markdown
|
|
363
|
-
# Job Implementation Complete: [job_name]
|
|
364
|
-
|
|
365
|
-
## Overview
|
|
366
|
-
|
|
367
|
-
Successfully implemented the **[job_name]** workflow with [N] steps.
|
|
368
|
-
|
|
369
|
-
**Summary**: [job summary]
|
|
370
|
-
|
|
371
|
-
**Version**: [version]
|
|
372
|
-
|
|
373
|
-
## Files Created
|
|
374
|
-
|
|
375
|
-
### Job Definition
|
|
376
|
-
- `.deepwork/jobs/[job_name]/job.yml`
|
|
377
|
-
|
|
378
|
-
### Step Instructions
|
|
379
|
-
- `.deepwork/jobs/[job_name]/steps/[step1_id].md`
|
|
380
|
-
- `.deepwork/jobs/[job_name]/steps/[step2_id].md`
|
|
381
|
-
[... list all step files ...]
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
## Generated Commands
|
|
385
|
-
|
|
386
|
-
After running `deepwork sync`, the following slash-commands are now available:
|
|
387
|
-
|
|
388
|
-
- `/[job_name].[step1_id]` - [step description]
|
|
389
|
-
- `/[job_name].[step2_id]` - [step description]
|
|
390
|
-
[... list all commands ...]
|
|
391
|
-
|
|
392
|
-
## Next Steps
|
|
393
|
-
|
|
394
|
-
1. **Reload commands**: Run `/reload` or restart your Claude session
|
|
395
|
-
2. **Start the workflow**: Run `/[job_name].[first_step_id]` to begin
|
|
396
|
-
3. **Test the job**: Try executing the first step to ensure everything works
|
|
397
|
-
|
|
398
|
-
## Job Structure
|
|
399
|
-
|
|
400
|
-
[Show the workflow diagram with step names and dependencies]
|
|
401
|
-
|
|
402
|
-
Step 1: [step_name]
|
|
403
|
-
↓
|
|
404
|
-
Step 2: [step_name]
|
|
405
|
-
↓
|
|
406
|
-
Step 3: [step_name]
|
|
407
|
-
↓
|
|
408
|
-
[Final output]
|
|
409
|
-
|
|
410
|
-
The job is now ready for use!
|
|
411
|
-
```
|
|
412
|
-
|
|
413
215
|
## Completion Checklist
|
|
414
216
|
|
|
415
217
|
Before marking this step complete, ensure:
|
|
@@ -418,8 +220,7 @@ Before marking this step complete, ensure:
|
|
|
418
220
|
- [ ] Each instruction file is complete and actionable
|
|
419
221
|
- [ ] `deepwork sync` executed successfully
|
|
420
222
|
- [ ] Commands generated in platform directory
|
|
421
|
-
- [ ] User informed
|
|
422
|
-
- [ ] implementation_summary.md created
|
|
223
|
+
- [ ] User informed to follow reload instructions from `deepwork sync`
|
|
423
224
|
- [ ] Considered whether policies would benefit this job (Step 7)
|
|
424
225
|
- [ ] If policies suggested, offered to run `/deepwork_policy.define`
|
|
425
226
|
|