deepwork 0.1.1__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/standard_jobs/deepwork_jobs/AGENTS.md +60 -0
- deepwork/standard_jobs/deepwork_jobs/job.yml +8 -5
- deepwork/standard_jobs/deepwork_jobs/make_new_job.sh +134 -0
- deepwork/standard_jobs/deepwork_jobs/steps/define.md +20 -57
- deepwork/standard_jobs/deepwork_jobs/steps/implement.md +34 -237
- 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/templates/default_policy.yml +53 -0
- {deepwork-0.1.1.dist-info → deepwork-0.2.0.dist-info}/METADATA +2 -1
- {deepwork-0.1.1.dist-info → deepwork-0.2.0.dist-info}/RECORD +18 -10
- {deepwork-0.1.1.dist-info → deepwork-0.2.0.dist-info}/WHEEL +0 -0
- {deepwork-0.1.1.dist-info → deepwork-0.2.0.dist-info}/entry_points.txt +0 -0
- {deepwork-0.1.1.dist-info → deepwork-0.2.0.dist-info}/licenses/LICENSE.md +0 -0
deepwork/cli/install.py
CHANGED
|
@@ -113,6 +113,48 @@ def _create_deepwork_gitignore(deepwork_dir: Path) -> None:
|
|
|
113
113
|
gitignore_path.write_text(gitignore_content)
|
|
114
114
|
|
|
115
115
|
|
|
116
|
+
def _create_default_policy_file(project_path: Path) -> bool:
|
|
117
|
+
"""
|
|
118
|
+
Create a default policy file template in the project root.
|
|
119
|
+
|
|
120
|
+
Only creates the file if it doesn't already exist.
|
|
121
|
+
|
|
122
|
+
Args:
|
|
123
|
+
project_path: Path to the project root
|
|
124
|
+
|
|
125
|
+
Returns:
|
|
126
|
+
True if the file was created, False if it already existed
|
|
127
|
+
"""
|
|
128
|
+
policy_file = project_path / ".deepwork.policy.yml"
|
|
129
|
+
|
|
130
|
+
if policy_file.exists():
|
|
131
|
+
return False
|
|
132
|
+
|
|
133
|
+
# Copy the template from the templates directory
|
|
134
|
+
template_path = Path(__file__).parent.parent / "templates" / "default_policy.yml"
|
|
135
|
+
|
|
136
|
+
if template_path.exists():
|
|
137
|
+
shutil.copy(template_path, policy_file)
|
|
138
|
+
else:
|
|
139
|
+
# Fallback: create a minimal template inline
|
|
140
|
+
policy_file.write_text(
|
|
141
|
+
"""# DeepWork Policy Configuration
|
|
142
|
+
#
|
|
143
|
+
# Policies are automated guardrails that trigger when specific files change.
|
|
144
|
+
# Use /deepwork_policy.define to create new policies interactively.
|
|
145
|
+
#
|
|
146
|
+
# Format:
|
|
147
|
+
# - name: "Policy name"
|
|
148
|
+
# trigger: "glob/pattern/**/*"
|
|
149
|
+
# safety: "optional/pattern/**/*"
|
|
150
|
+
# instructions: |
|
|
151
|
+
# Instructions for the AI agent...
|
|
152
|
+
"""
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
return True
|
|
156
|
+
|
|
157
|
+
|
|
116
158
|
class DynamicChoice(click.Choice):
|
|
117
159
|
"""A Click Choice that gets its values dynamically from AgentAdapter."""
|
|
118
160
|
|
|
@@ -238,6 +280,12 @@ def _install_deepwork(platform_name: str | None, project_path: Path) -> None:
|
|
|
238
280
|
_create_deepwork_gitignore(deepwork_dir)
|
|
239
281
|
console.print(" [green]✓[/green] Created .deepwork/.gitignore")
|
|
240
282
|
|
|
283
|
+
# Step 3d: Create default policy file template
|
|
284
|
+
if _create_default_policy_file(project_path):
|
|
285
|
+
console.print(" [green]✓[/green] Created .deepwork.policy.yml template")
|
|
286
|
+
else:
|
|
287
|
+
console.print(" [dim]•[/dim] .deepwork.policy.yml already exists")
|
|
288
|
+
|
|
241
289
|
# Step 4: Load or create config.yml
|
|
242
290
|
console.print("[yellow]→[/yellow] Updating configuration...")
|
|
243
291
|
config_file = deepwork_dir / "config.yml"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Project Context for deepwork_jobs
|
|
2
|
+
|
|
3
|
+
This is the source of truth for the `deepwork_jobs` standard job.
|
|
4
|
+
|
|
5
|
+
## Codebase Structure
|
|
6
|
+
|
|
7
|
+
- Source location: `src/deepwork/standard_jobs/deepwork_jobs/`
|
|
8
|
+
- Working copy: `.deepwork/jobs/deepwork_jobs/`
|
|
9
|
+
- Templates: `templates/` directory within each location
|
|
10
|
+
|
|
11
|
+
## Dual Location Maintenance
|
|
12
|
+
|
|
13
|
+
**Important**: This job exists in two locations that must be kept in sync:
|
|
14
|
+
|
|
15
|
+
1. **Source of truth**: `src/deepwork/standard_jobs/deepwork_jobs/`
|
|
16
|
+
- This is where changes should be made first
|
|
17
|
+
- Tracked in version control
|
|
18
|
+
|
|
19
|
+
2. **Working copy**: `.deepwork/jobs/deepwork_jobs/`
|
|
20
|
+
- Must be updated after changes to source
|
|
21
|
+
- Used by `deepwork sync` to generate commands
|
|
22
|
+
|
|
23
|
+
After making changes to the source, copy files to the working copy:
|
|
24
|
+
```bash
|
|
25
|
+
cp src/deepwork/standard_jobs/deepwork_jobs/job.yml .deepwork/jobs/deepwork_jobs/
|
|
26
|
+
cp src/deepwork/standard_jobs/deepwork_jobs/steps/*.md .deepwork/jobs/deepwork_jobs/steps/
|
|
27
|
+
cp -r src/deepwork/standard_jobs/deepwork_jobs/templates/* .deepwork/jobs/deepwork_jobs/templates/
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## File Organization
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
deepwork_jobs/
|
|
34
|
+
├── AGENTS.md # This file
|
|
35
|
+
├── job.yml # Job definition
|
|
36
|
+
├── make_new_job.sh # Script to create new job structure
|
|
37
|
+
├── steps/
|
|
38
|
+
│ ├── define.md # Define step instructions
|
|
39
|
+
│ ├── implement.md # Implement step instructions
|
|
40
|
+
│ ├── learn.md # Learn step instructions
|
|
41
|
+
│ └── supplemental_file_references.md # Reference documentation
|
|
42
|
+
└── templates/
|
|
43
|
+
├── job.yml.template # Job spec structure
|
|
44
|
+
├── step_instruction.md.template # Step instruction structure
|
|
45
|
+
├── agents.md.template # AGENTS.md structure
|
|
46
|
+
├── job.yml.example # Complete job example
|
|
47
|
+
└── step_instruction.md.example # Complete step example
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Version Management
|
|
51
|
+
|
|
52
|
+
- Version is tracked in `job.yml`
|
|
53
|
+
- Bump patch version (0.0.x) for instruction improvements
|
|
54
|
+
- Bump minor version (0.x.0) for new features or structural changes
|
|
55
|
+
- Always update changelog when bumping version
|
|
56
|
+
|
|
57
|
+
## Last Updated
|
|
58
|
+
|
|
59
|
+
- Date: 2026-01-15
|
|
60
|
+
- From conversation about: Adding make_new_job.sh script and templates directory
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: deepwork_jobs
|
|
2
|
-
version: "0.
|
|
2
|
+
version: "0.4.0"
|
|
3
3
|
summary: "DeepWork job management commands"
|
|
4
4
|
description: |
|
|
5
5
|
Core commands for managing DeepWork jobs. These commands help you define new multi-step
|
|
@@ -18,6 +18,10 @@ changelog:
|
|
|
18
18
|
changes: "Initial version"
|
|
19
19
|
- version: "0.2.0"
|
|
20
20
|
changes: "Replaced refine command with learn command for conversation-driven improvement"
|
|
21
|
+
- version: "0.3.0"
|
|
22
|
+
changes: "Added make_new_job.sh script and templates directory; updated instructions to reference templates instead of inline examples"
|
|
23
|
+
- version: "0.4.0"
|
|
24
|
+
changes: "Removed implementation_summary and learning_summary outputs; simplified step outputs"
|
|
21
25
|
|
|
22
26
|
steps:
|
|
23
27
|
- id: define
|
|
@@ -54,7 +58,7 @@ steps:
|
|
|
54
58
|
- file: job.yml
|
|
55
59
|
from_step: define
|
|
56
60
|
outputs:
|
|
57
|
-
-
|
|
61
|
+
- steps/
|
|
58
62
|
dependencies:
|
|
59
63
|
- define
|
|
60
64
|
hooks:
|
|
@@ -69,8 +73,7 @@ steps:
|
|
|
69
73
|
5. **Quality Criteria**: Does each instruction file define quality criteria for its outputs?
|
|
70
74
|
6. **Sync Complete**: Has `deepwork sync` been run successfully?
|
|
71
75
|
7. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?
|
|
72
|
-
8. **
|
|
73
|
-
9. **Policies Considered**: Have you thought about whether policies would benefit this job?
|
|
76
|
+
8. **Policies Considered**: Have you thought about whether policies would benefit this job?
|
|
74
77
|
- If relevant policies were identified, did you explain them and offer to run `/deepwork_policy.define`?
|
|
75
78
|
- Not every job needs policies - only suggest when genuinely helpful.
|
|
76
79
|
|
|
@@ -85,7 +88,7 @@ steps:
|
|
|
85
88
|
- name: job_name
|
|
86
89
|
description: "Name of the job that was run (optional - will auto-detect from conversation)"
|
|
87
90
|
outputs:
|
|
88
|
-
-
|
|
91
|
+
- AGENTS.md
|
|
89
92
|
dependencies: []
|
|
90
93
|
hooks:
|
|
91
94
|
after_agent:
|
|
@@ -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 "$@"
|
|
@@ -135,68 +135,31 @@ stop_hooks:
|
|
|
135
135
|
|
|
136
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).
|
|
137
137
|
|
|
138
|
-
### Step 5: Create the
|
|
138
|
+
### Step 5: Create the Job Directory and Specification
|
|
139
139
|
|
|
140
|
-
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:
|
|
141
141
|
|
|
142
|
-
**
|
|
142
|
+
**First, create the directory structure** using the `make_new_job.sh` script:
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
**Format**:
|
|
147
|
-
```yaml
|
|
148
|
-
name: [job_name]
|
|
149
|
-
version: "1.0.0"
|
|
150
|
-
summary: "[Brief one-line summary of what this job accomplishes]"
|
|
151
|
-
description: |
|
|
152
|
-
[Detailed multi-line description of the job's purpose, process, and goals.
|
|
153
|
-
|
|
154
|
-
This should explain:
|
|
155
|
-
- What problem this workflow solves
|
|
156
|
-
- What the overall process looks like
|
|
157
|
-
- What the end result will be
|
|
158
|
-
- Who the intended users are
|
|
159
|
-
- Any important context about the workflow]
|
|
160
|
-
|
|
161
|
-
changelog:
|
|
162
|
-
- version: "1.0.0"
|
|
163
|
-
changes: "Initial job creation"
|
|
164
|
-
|
|
165
|
-
steps:
|
|
166
|
-
- id: [step_id]
|
|
167
|
-
name: "[Step Name]"
|
|
168
|
-
description: "[What this step does]"
|
|
169
|
-
instructions_file: steps/[step_id].md
|
|
170
|
-
inputs:
|
|
171
|
-
- name: [param_name]
|
|
172
|
-
description: "[What user needs to provide]"
|
|
173
|
-
# OR for file inputs from previous steps:
|
|
174
|
-
# - file: [filename_or_path]
|
|
175
|
-
# from_step: [previous_step_id]
|
|
176
|
-
outputs:
|
|
177
|
-
- [output_filename_or_path] # e.g., "report.md" or "reports/analysis.md"
|
|
178
|
-
dependencies: [] # List of step IDs that must complete first
|
|
179
|
-
# Optional: Quality validation hooks
|
|
180
|
-
stop_hooks:
|
|
181
|
-
- prompt: |
|
|
182
|
-
Verify this step's output meets quality criteria:
|
|
183
|
-
1. [Criterion 1]
|
|
184
|
-
2. [Criterion 2]
|
|
185
|
-
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
|
|
186
|
-
|
|
187
|
-
- id: [another_step]
|
|
188
|
-
name: "[Another Step]"
|
|
189
|
-
description: "[What this step does]"
|
|
190
|
-
instructions_file: steps/[another_step].md
|
|
191
|
-
inputs:
|
|
192
|
-
- file: [output_filename_or_path]
|
|
193
|
-
from_step: [step_id]
|
|
194
|
-
outputs:
|
|
195
|
-
- [another_output_path]
|
|
196
|
-
dependencies:
|
|
197
|
-
- [step_id] # This step requires the previous step
|
|
144
|
+
```bash
|
|
145
|
+
.deepwork/jobs/deepwork_jobs/make_new_job.sh [job_name]
|
|
198
146
|
```
|
|
199
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
|
+
|
|
200
163
|
**Important**:
|
|
201
164
|
- Use lowercase with underscores for job name and step IDs
|
|
202
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
|
|
|
@@ -233,112 +191,9 @@ Would you like me to create this policy? I can run `/deepwork_policy.define` to
|
|
|
233
191
|
|
|
234
192
|
## Example Implementation
|
|
235
193
|
|
|
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
|
-
```
|
|
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`
|
|
342
197
|
|
|
343
198
|
## Important Guidelines
|
|
344
199
|
|
|
@@ -357,63 +212,6 @@ Before running `deepwork sync`, verify:
|
|
|
357
212
|
- All step instruction files exist (one per step)
|
|
358
213
|
- No file system errors
|
|
359
214
|
|
|
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
215
|
## Completion Checklist
|
|
418
216
|
|
|
419
217
|
Before marking this step complete, ensure:
|
|
@@ -423,7 +221,6 @@ Before marking this step complete, ensure:
|
|
|
423
221
|
- [ ] `deepwork sync` executed successfully
|
|
424
222
|
- [ ] Commands generated in platform directory
|
|
425
223
|
- [ ] User informed to follow reload instructions from `deepwork sync`
|
|
426
|
-
- [ ] implementation_summary.md created
|
|
427
224
|
- [ ] Considered whether policies would benefit this job (Step 7)
|
|
428
225
|
- [ ] If policies suggested, offered to run `/deepwork_policy.define`
|
|
429
226
|
|
|
@@ -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 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)
|
|
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 commands, 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
|
|
@@ -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]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# DeepWork Policy Configuration
|
|
2
|
+
#
|
|
3
|
+
# Policies are automated guardrails that trigger when specific files change.
|
|
4
|
+
# They help ensure documentation stays current, security reviews happen, etc.
|
|
5
|
+
#
|
|
6
|
+
# Use /deepwork_policy.define to create new policies interactively.
|
|
7
|
+
#
|
|
8
|
+
# Format:
|
|
9
|
+
# - name: "Friendly name for the policy"
|
|
10
|
+
# trigger: "glob/pattern/**/*" # or array: ["pattern1", "pattern2"]
|
|
11
|
+
# safety: "pattern/**/*" # optional - if these also changed, skip the policy
|
|
12
|
+
# compare_to: "base" # optional: "base" (default), "default_tip", or "prompt"
|
|
13
|
+
# instructions: |
|
|
14
|
+
# Multi-line instructions for the AI agent...
|
|
15
|
+
#
|
|
16
|
+
# Example policies (uncomment and customize):
|
|
17
|
+
#
|
|
18
|
+
# - name: "README Documentation"
|
|
19
|
+
# trigger: "src/**/*"
|
|
20
|
+
# safety: "README.md"
|
|
21
|
+
# instructions: |
|
|
22
|
+
# Source code has been modified. Please review README.md for accuracy:
|
|
23
|
+
# 1. Verify the project overview reflects current functionality
|
|
24
|
+
# 2. Check that usage examples are still correct
|
|
25
|
+
# 3. Ensure installation/setup instructions remain valid
|
|
26
|
+
#
|
|
27
|
+
# - name: "API Documentation Sync"
|
|
28
|
+
# trigger: "src/api/**/*"
|
|
29
|
+
# safety: "docs/api/**/*.md"
|
|
30
|
+
# instructions: |
|
|
31
|
+
# API code has changed. Please verify that API documentation is up to date:
|
|
32
|
+
# - New or changed endpoints
|
|
33
|
+
# - Modified request/response schemas
|
|
34
|
+
# - Updated authentication requirements
|
|
35
|
+
#
|
|
36
|
+
# - name: "Security Review for Auth Changes"
|
|
37
|
+
# trigger:
|
|
38
|
+
# - "src/auth/**/*"
|
|
39
|
+
# - "src/security/**/*"
|
|
40
|
+
# instructions: |
|
|
41
|
+
# Authentication or security code has been changed. Please:
|
|
42
|
+
# 1. Review for hardcoded credentials or secrets
|
|
43
|
+
# 2. Check input validation on user inputs
|
|
44
|
+
# 3. Verify access control logic is correct
|
|
45
|
+
#
|
|
46
|
+
# - name: "Test Coverage for New Code"
|
|
47
|
+
# trigger: "src/**/*.py"
|
|
48
|
+
# safety: "tests/**/*.py"
|
|
49
|
+
# instructions: |
|
|
50
|
+
# New source code was added. Please ensure appropriate test coverage:
|
|
51
|
+
# 1. Add unit tests for new functions/methods
|
|
52
|
+
# 2. Update integration tests if behavior changed
|
|
53
|
+
# 3. Verify all new code paths are tested
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deepwork
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Framework for enabling AI agents to perform complex, multi-step work tasks
|
|
5
5
|
Project-URL: Homepage, https://github.com/deepwork/deepwork
|
|
6
6
|
Project-URL: Documentation, https://github.com/deepwork/deepwork#readme
|
|
@@ -97,6 +97,7 @@ This will:
|
|
|
97
97
|
- Generate core DeepWork jobs
|
|
98
98
|
- Install DeepWork jobs for your AI assistant
|
|
99
99
|
- Configure hooks for your AI assistant to enable policies
|
|
100
|
+
- Create a `.deepwork.policy.yml` template file with example policies
|
|
100
101
|
|
|
101
102
|
## Quick Start
|
|
102
103
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
deepwork/__init__.py,sha256=vcMnJioxhfoL6kGh4FM51Vk9UoLnQ76g6Ms7XDUItYA,748
|
|
2
2
|
deepwork/cli/__init__.py,sha256=3SqmfcP2xqutiCYAbajFDJTjr2pOLydqTN0NN-FTsIE,33
|
|
3
|
-
deepwork/cli/install.py,sha256=
|
|
3
|
+
deepwork/cli/install.py,sha256=EnsegIjj-ZYkXMGER0iJXHuN2vVzFhzDUbNLL0ZU5bk,11366
|
|
4
4
|
deepwork/cli/main.py,sha256=m6tVnfSy03azI9Ky6ySEMat_UdLEMzVT3SsRKQWigvA,471
|
|
5
5
|
deepwork/cli/sync.py,sha256=lGgT9Tz_vPQx4z4Bkqk5LfkcT2hTn9nPvdWJVSeKhmM,6303
|
|
6
6
|
deepwork/core/__init__.py,sha256=1g869QuwsYzNjQONneng2OMc6HKt-tlBCaxJbMMfoho,36
|
|
@@ -15,11 +15,18 @@ deepwork/hooks/evaluate_policies.py,sha256=hGi6lDcldGj7MYoUqViB9ObtTRrUHJvkjJeNJ
|
|
|
15
15
|
deepwork/schemas/__init__.py,sha256=PpydKb_oaTv8lYapN_nV-Tl_OUCoSM_okvsEJ8gNTpI,41
|
|
16
16
|
deepwork/schemas/job_schema.py,sha256=MpcUsk2pH7y-uNANFTeNlTDwyKwALAAf57VmJeK-JwE,8755
|
|
17
17
|
deepwork/schemas/policy_schema.py,sha256=Y6P3YkiEza-W8WwqjTBinNCPreCgMz2OUShmVGx4OBo,3099
|
|
18
|
-
deepwork/standard_jobs/deepwork_jobs/
|
|
19
|
-
deepwork/standard_jobs/deepwork_jobs/
|
|
20
|
-
deepwork/standard_jobs/deepwork_jobs/
|
|
21
|
-
deepwork/standard_jobs/deepwork_jobs/steps/
|
|
18
|
+
deepwork/standard_jobs/deepwork_jobs/AGENTS.md,sha256=Y6I4jZ8DfN0RFY3UF5bgQRZvL7wQD9P0lgE7EZM6CGI,2252
|
|
19
|
+
deepwork/standard_jobs/deepwork_jobs/job.yml,sha256=aY2V-ReMuZ2VxqVT14H1euX_cB9ZvWibAzO81oXI-o8,5924
|
|
20
|
+
deepwork/standard_jobs/deepwork_jobs/make_new_job.sh,sha256=JArfFU9lEaJPRsXRL3rU1IMt2p6Bq0s2C9f98aJ7Mxg,3878
|
|
21
|
+
deepwork/standard_jobs/deepwork_jobs/steps/define.md,sha256=6CYM7LB1Vx7tD76QP65s2wdTCcPk15ZVFLx6TZndbyg,12819
|
|
22
|
+
deepwork/standard_jobs/deepwork_jobs/steps/implement.md,sha256=Wh7ZJGNSyejSgICPFzhbTBaH2bF288YGWqkhKQEmyH4,10313
|
|
23
|
+
deepwork/standard_jobs/deepwork_jobs/steps/learn.md,sha256=yyB6ManHblOOxEM_Odbx0tvPVFVwqlmnwxiC7lZ7txU,10185
|
|
22
24
|
deepwork/standard_jobs/deepwork_jobs/steps/supplemental_file_references.md,sha256=uKDEwB3TxMLK-Zim3QQfkvaW5W6AVWHjWnH25aY6wCw,1478
|
|
25
|
+
deepwork/standard_jobs/deepwork_jobs/templates/agents.md.template,sha256=SUJL862C6-DnT9lK3sNIZ5T2wVgXN4YRph4FrKtFnLo,739
|
|
26
|
+
deepwork/standard_jobs/deepwork_jobs/templates/job.yml.example,sha256=roRi6sIGFGmPCkoVW26HfuTBjAO8-pPsxI5-Gfg3rc0,2361
|
|
27
|
+
deepwork/standard_jobs/deepwork_jobs/templates/job.yml.template,sha256=3I-VQvqXVJNZ_Vb5Ik28JsrEbGKbyLTZcuKxdEmV5s0,1789
|
|
28
|
+
deepwork/standard_jobs/deepwork_jobs/templates/step_instruction.md.example,sha256=HXcjVaQz2HsDiA4ClnIeLvysVOGrFJ_5Tr-pm6dhdwc,2706
|
|
29
|
+
deepwork/standard_jobs/deepwork_jobs/templates/step_instruction.md.template,sha256=6n9jFFuda4r549Oo-LBPKixFD3NvDl5MwEg5V7ItQBg,1286
|
|
23
30
|
deepwork/standard_jobs/deepwork_policy/job.yml,sha256=6pxyEiHZ7fThd4CjpkkROKXGlRqaH4odinLc-ttfork,1377
|
|
24
31
|
deepwork/standard_jobs/deepwork_policy/hooks/capture_prompt_work_tree.sh,sha256=D6Ozo9oDqsL7YBh-ebQK1S8ED9hfIi_0Z8khFjC6wZY,973
|
|
25
32
|
deepwork/standard_jobs/deepwork_policy/hooks/global_hooks.yml,sha256=AS8wzWz7Q4s7iUdhjUwjm9t91Z7QZZw3JCBH81IqKRg,166
|
|
@@ -27,6 +34,7 @@ deepwork/standard_jobs/deepwork_policy/hooks/policy_stop_hook.sh,sha256=HFLTheh3
|
|
|
27
34
|
deepwork/standard_jobs/deepwork_policy/hooks/user_prompt_submit.sh,sha256=TxwYb7kBW-cfHmcQoruJBjCTWvdWbQVQIMplNgzMuOs,498
|
|
28
35
|
deepwork/standard_jobs/deepwork_policy/steps/define.md,sha256=p16fcPSc_6g4WvBzCBJ5l32Uaasp8lew5e6LaDPjpNI,7430
|
|
29
36
|
deepwork/templates/__init__.py,sha256=APvjx_u7eRUerw9yA_fJ1ZqCzYA-FWUCV9HCz0RgjOc,50
|
|
37
|
+
deepwork/templates/default_policy.yml,sha256=nOJtFzV6SPDwNvzNcDKL-679CTXq6hgIBTaxnUKSdVs,2049
|
|
30
38
|
deepwork/templates/claude/command-job-step.md.jinja,sha256=hrOR6WqUVJ8aX_qIptVUuGd4BAe439Dx6gMv-MeCk40,5795
|
|
31
39
|
deepwork/templates/gemini/command-job-step.toml.jinja,sha256=UlhljjJlwNO9D_NrG6MNZ7IKozrdjy2DkPkj9E7hKxU,4196
|
|
32
40
|
deepwork/utils/__init__.py,sha256=AtvE49IFI8Rg36O4cNIlzB-oxvkW3apFgXExn8GSk6s,38
|
|
@@ -34,8 +42,8 @@ deepwork/utils/fs.py,sha256=94OUvUrqGebjHVtnjd5vXL6DalKNdpRu-iAPsHvAPjI,3499
|
|
|
34
42
|
deepwork/utils/git.py,sha256=J4tAB1zE6-WMAEHbarevhmSvvPLkeKBpiRv1UxUVwYk,3748
|
|
35
43
|
deepwork/utils/validation.py,sha256=SyFg9fIu1JCDMbssQgJRCTUNToDNcINccn8lje-tjts,851
|
|
36
44
|
deepwork/utils/yaml_utils.py,sha256=X8c9yEqxEgw5CdPQ23f1Wz8SSP783MMGKyGV_2SKaNU,2454
|
|
37
|
-
deepwork-0.
|
|
38
|
-
deepwork-0.
|
|
39
|
-
deepwork-0.
|
|
40
|
-
deepwork-0.
|
|
41
|
-
deepwork-0.
|
|
45
|
+
deepwork-0.2.0.dist-info/METADATA,sha256=z00l55xdxJKzjQxc0d7m293oGNaEAnfa0gzkPOi1UGk,11216
|
|
46
|
+
deepwork-0.2.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
47
|
+
deepwork-0.2.0.dist-info/entry_points.txt,sha256=RhJBySzm619kh-yIdsAyfFXInAlY8Jm-39FLIBcOj2s,51
|
|
48
|
+
deepwork-0.2.0.dist-info/licenses/LICENSE.md,sha256=W0EtJVYf0cQ_awukOCW1ETwNSpV2RKqnAGfoOjyz_K8,4126
|
|
49
|
+
deepwork-0.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|