Skip to content

Commit c3704ea

Browse files
committed
Standardize on 'ask structured questions' phrasing
Update all job definitions and step instructions to explicitly use the phrase "ask structured questions" when referring to gathering user input. This ensures consistency across all DeepWork jobs. Changes: - deepwork_jobs v0.5.0: Updated description, define.md, implement.md, and quality criteria hooks to use "ask structured questions" - deepwork_policy v0.2.0: Updated define.md to use phrase - Added quality criteria hooks to verify phrase usage - implement.md now instructs agents to use phrase in generated instructions
1 parent 29df4d9 commit c3704ea

14 files changed

Lines changed: 104 additions & 128 deletions

File tree

.claude/commands/deepwork_jobs.define.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ hooks:
1111
1212
Verify the job.yml output meets ALL quality criteria before completing:
1313
14-
1. **User Understanding**: Did you fully understand the user's workflow through interactive Q&A?
15-
2. **Clear Inputs/Outputs**: Does every step have clearly defined inputs and outputs?
16-
3. **Logical Dependencies**: Do step dependencies make sense and avoid circular references?
17-
4. **Concise Summary**: Is the summary under 200 characters and descriptive?
18-
5. **Rich Description**: Does the description provide enough context for future refinement?
19-
6. **Valid Schema**: Does the job.yml follow the required schema (name, version, summary, steps)?
20-
7. **File Created**: Has the job.yml file been created in `.deepwork/jobs/[job_name]/job.yml`?
14+
1. **User Understanding**: Did you fully understand the user's workflow by asking structured questions?
15+
2. **Structured Questions Used**: Did you ask structured questions (using the AskUserQuestion tool) to gather user input?
16+
3. **Clear Inputs/Outputs**: Does every step have clearly defined inputs and outputs?
17+
4. **Logical Dependencies**: Do step dependencies make sense and avoid circular references?
18+
5. **Concise Summary**: Is the summary under 200 characters and descriptive?
19+
6. **Rich Description**: Does the description provide enough context for future refinement?
20+
7. **Valid Schema**: Does the job.yml follow the required schema (name, version, summary, steps)?
21+
8. **File Created**: Has the job.yml file been created in `.deepwork/jobs/[job_name]/job.yml`?
2122
2223
If ANY criterion is not met, continue working to address it.
2324
If ALL criteria are satisfied, include `<promise>✓ Quality Criteria Met</promise>` in your response.
@@ -47,7 +48,7 @@ Core commands for managing DeepWork jobs. These commands help you define new mul
4748
workflows and learn from running them.
4849

4950
The `define` command guides you through an interactive process to create a new job by
50-
asking detailed questions about your workflow, understanding each step's inputs and outputs,
51+
asking structured questions about your workflow, understanding each step's inputs and outputs,
5152
and generating all necessary files.
5253

5354
The `learn` command reflects on conversations where DeepWork jobs were run, identifies
@@ -66,13 +67,15 @@ Create a `job.yml` specification file that defines the structure of a new DeepWo
6667

6768
## Task
6869

69-
Guide the user through defining a job specification by asking clarifying questions. **Do not attempt to create the specification without first fully understanding the user's needs.**
70+
Guide the user through defining a job specification by asking structured questions. **Do not attempt to create the specification without first fully understanding the user's needs.**
71+
72+
**Important**: Use the AskUserQuestion tool to ask structured questions when gathering information from the user. This provides a better user experience with clear options and guided choices.
7073

7174
The output of this step is **only** the `job.yml` file - a complete specification of the workflow. The actual step instruction files will be created in the next step (`implement`).
7275

7376
### Step 1: Understand the Job Purpose
7477

75-
Start by asking questions to understand what the user wants to accomplish:
78+
Start by asking structured questions to understand what the user wants to accomplish:
7679

7780
1. **What is the overall goal of this workflow?**
7881
- What complex task are they trying to accomplish?
@@ -91,7 +94,7 @@ Start by asking questions to understand what the user wants to accomplish:
9194

9295
### Step 2: Define Each Step
9396

94-
For each major phase they mentioned, ask detailed questions:
97+
For each major phase they mentioned, ask structured questions to gather details:
9598

9699
1. **Step Purpose**
97100
- What exactly does this step accomplish?
@@ -152,7 +155,7 @@ After gathering information about all steps:
152155

153156
For each step, consider whether it would benefit from **quality validation loops**. Stop hooks allow the AI agent to iteratively refine its work until quality criteria are met.
154157

155-
**Ask the user about quality validation:**
158+
**Ask structured questions about quality validation:**
156159
- "Are there specific quality criteria that must be met for this step?"
157160
- "Would you like the agent to validate its work before completing?"
158161
- "What would make you send the work back for revision?"
@@ -341,11 +344,11 @@ Run `/deepwork_jobs.implement` to generate the instruction files for each step b
341344
## Important Guidelines
342345
343346
1. **Focus on specification only** - Don't create instruction files yet
344-
2. **Ask clarifying questions** - Never skip the discovery phase
347+
2. **Ask structured questions** - Never skip the discovery phase; use the AskUserQuestion tool
345348
3. **Rich context in description** - This helps with future refinement
346349
4. **Validate understanding** - Summarize and confirm before creating
347350
5. **Use examples** - Help users understand what good specifications look like
348-
6. **Understand file organization** - Always ask where outputs should be saved and if subdirectories are needed
351+
6. **Understand file organization** - Always ask structured questions about where outputs should be saved and if subdirectories are needed
349352
350353
## Validation Rules
351354
@@ -379,6 +382,7 @@ After creating the file:
379382
380383
## Quality Criteria
381384
385+
- Asked structured questions to fully understand user requirements
382386
- User fully understands what job they're creating
383387
- All steps have clear inputs and outputs
384388
- Dependencies make logical sense
@@ -425,13 +429,14 @@ This step uses an iterative quality validation loop. After completing your work,
425429
### Quality Criteria
426430
Verify the job.yml output meets ALL quality criteria before completing:
427431

428-
1. **User Understanding**: Did you fully understand the user's workflow through interactive Q&A?
429-
2. **Clear Inputs/Outputs**: Does every step have clearly defined inputs and outputs?
430-
3. **Logical Dependencies**: Do step dependencies make sense and avoid circular references?
431-
4. **Concise Summary**: Is the summary under 200 characters and descriptive?
432-
5. **Rich Description**: Does the description provide enough context for future refinement?
433-
6. **Valid Schema**: Does the job.yml follow the required schema (name, version, summary, steps)?
434-
7. **File Created**: Has the job.yml file been created in `.deepwork/jobs/[job_name]/job.yml`?
432+
1. **User Understanding**: Did you fully understand the user's workflow by asking structured questions?
433+
2. **Structured Questions Used**: Did you ask structured questions (using the AskUserQuestion tool) to gather user input?
434+
3. **Clear Inputs/Outputs**: Does every step have clearly defined inputs and outputs?
435+
4. **Logical Dependencies**: Do step dependencies make sense and avoid circular references?
436+
5. **Concise Summary**: Is the summary under 200 characters and descriptive?
437+
6. **Rich Description**: Does the description provide enough context for future refinement?
438+
7. **Valid Schema**: Does the job.yml follow the required schema (name, version, summary, steps)?
439+
8. **File Created**: Has the job.yml file been created in `.deepwork/jobs/[job_name]/job.yml`?
435440

436441
If ANY criterion is not met, continue working to address it.
437442
If ALL criteria are satisfied, include `<promise>✓ Quality Criteria Met</promise>` in your response.

.claude/commands/deepwork_jobs.implement.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ hooks:
1616
3. **Specific & Actionable**: Are instructions tailored to each step's purpose, not generic?
1717
4. **Output Examples**: Does each instruction file show what good output looks like?
1818
5. **Quality Criteria**: Does each instruction file define quality criteria for its outputs?
19-
6. **Sync Complete**: Has `deepwork sync` been run successfully?
20-
7. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?
21-
8. **Policies Considered**: Have you thought about whether policies would benefit this job?
19+
6. **Ask Structured Questions**: Do step instructions that gather user input explicitly use the phrase "ask structured questions"?
20+
7. **Sync Complete**: Has `deepwork sync` been run successfully?
21+
8. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?
22+
9. **Policies Considered**: Have you thought about whether policies would benefit this job?
2223
- If relevant policies were identified, did you explain them and offer to run `/deepwork_policy.define`?
2324
- Not every job needs policies - only suggest when genuinely helpful.
2425
@@ -50,7 +51,7 @@ Core commands for managing DeepWork jobs. These commands help you define new mul
5051
workflows and learn from running them.
5152

5253
The `define` command guides you through an interactive process to create a new job by
53-
asking detailed questions about your workflow, understanding each step's inputs and outputs,
54+
asking structured questions about your workflow, understanding each step's inputs and outputs,
5455
and generating all necessary files.
5556

5657
The `learn` command reflects on conversations where DeepWork jobs were run, identifies
@@ -138,6 +139,7 @@ For each step in the job.yml, create a comprehensive instruction file at `.deepw
138139
4. **Explain the "why"** - Help the user understand the step's role in the workflow
139140
5. **Quality over quantity** - Detailed, actionable instructions are better than vague ones
140141
6. **Align with stop hooks** - If the step has `stop_hooks` defined, ensure the quality criteria in the instruction file match the validation criteria in the hooks
142+
7. **Ask structured questions** - When a step has user inputs, the instructions MUST explicitly tell the agent to "ask structured questions" using the AskUserQuestion tool to gather that information. Never use generic phrasing like "ask the user" - always use "ask structured questions"
141143

142144
### Handling Stop Hooks
143145

@@ -300,6 +302,7 @@ Before marking this step complete, ensure:
300302
- Instructions are specific and actionable
301303
- Output examples are provided in each instruction file
302304
- Quality criteria defined for each step
305+
- Steps with user inputs explicitly use "ask structured questions" phrasing
303306
- Sync completed successfully
304307
- Commands available for use
305308
- Thoughtfully considered relevant policies for the job domain
@@ -349,9 +352,10 @@ Verify the implementation meets ALL quality criteria before completing:
349352
3. **Specific & Actionable**: Are instructions tailored to each step's purpose, not generic?
350353
4. **Output Examples**: Does each instruction file show what good output looks like?
351354
5. **Quality Criteria**: Does each instruction file define quality criteria for its outputs?
352-
6. **Sync Complete**: Has `deepwork sync` been run successfully?
353-
7. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?
354-
8. **Policies Considered**: Have you thought about whether policies would benefit this job?
355+
6. **Ask Structured Questions**: Do step instructions that gather user input explicitly use the phrase "ask structured questions"?
356+
7. **Sync Complete**: Has `deepwork sync` been run successfully?
357+
8. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?
358+
9. **Policies Considered**: Have you thought about whether policies would benefit this job?
355359
- If relevant policies were identified, did you explain them and offer to run `/deepwork_policy.define`?
356360
- Not every job needs policies - only suggest when genuinely helpful.
357361

.claude/commands/deepwork_jobs.learn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Core commands for managing DeepWork jobs. These commands help you define new mul
5050
workflows and learn from running them.
5151

5252
The `define` command guides you through an interactive process to create a new job by
53-
asking detailed questions about your workflow, understanding each step's inputs and outputs,
53+
asking structured questions about your workflow, understanding each step's inputs and outputs,
5454
and generating all necessary files.
5555

5656
The `learn` command reflects on conversations where DeepWork jobs were run, identifies

.claude/commands/deepwork_policy.define.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ Create or update policy entries in the `.deepwork.policy.yml` file to enforce te
3838

3939
## Task
4040

41-
Guide the user through defining a new policy by asking clarifying questions. **Do not create the policy without first understanding what they want to enforce.**
41+
Guide the user through defining a new policy by asking structured questions. **Do not create the policy without first understanding what they want to enforce.**
42+
43+
**Important**: Use the AskUserQuestion tool to ask structured questions when gathering information from the user. This provides a better user experience with clear options and guided choices.
4244

4345
### Step 1: Understand the Policy Purpose
4446

45-
Start by asking questions to understand what the user wants to enforce:
47+
Start by asking structured questions to understand what the user wants to enforce:
4648

4749
1. **What guideline or constraint should this policy enforce?**
4850
- What situation triggers the need for action?
@@ -207,6 +209,7 @@ Create or update this file at the project root with the new policy entry.
207209
208210
## Quality Criteria
209211
212+
- Asked structured questions to understand user requirements
210213
- Policy name is clear and descriptive
211214
- Trigger patterns accurately match the intended files
212215
- Safety patterns prevent unnecessary triggering

.deepwork/jobs/deepwork_jobs/job.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: deepwork_jobs
2-
version: "0.4.0"
2+
version: "0.5.0"
33
summary: "DeepWork job management commands"
44
description: |
55
Core commands for managing DeepWork jobs. These commands help you define new multi-step
66
workflows and learn from running them.
77
88
The `define` command guides you through an interactive process to create a new job by
9-
asking detailed questions about your workflow, understanding each step's inputs and outputs,
9+
asking structured questions about your workflow, understanding each step's inputs and outputs,
1010
and generating all necessary files.
1111
1212
The `learn` command reflects on conversations where DeepWork jobs were run, identifies
@@ -22,6 +22,8 @@ changelog:
2222
changes: "Added make_new_job.sh script and templates directory; updated instructions to reference templates instead of inline examples"
2323
- version: "0.4.0"
2424
changes: "Removed implementation_summary and learning_summary outputs; simplified step outputs"
25+
- version: "0.5.0"
26+
changes: "Standardized on 'ask structured questions' phrasing for user input; Updated quality criteria hooks to verify phrase usage; Added guidance in implement.md to use phrase in generated instructions"
2527

2628
steps:
2729
- id: define
@@ -39,13 +41,14 @@ steps:
3941
- prompt: |
4042
Verify the job.yml output meets ALL quality criteria before completing:
4143
42-
1. **User Understanding**: Did you fully understand the user's workflow through interactive Q&A?
43-
2. **Clear Inputs/Outputs**: Does every step have clearly defined inputs and outputs?
44-
3. **Logical Dependencies**: Do step dependencies make sense and avoid circular references?
45-
4. **Concise Summary**: Is the summary under 200 characters and descriptive?
46-
5. **Rich Description**: Does the description provide enough context for future refinement?
47-
6. **Valid Schema**: Does the job.yml follow the required schema (name, version, summary, steps)?
48-
7. **File Created**: Has the job.yml file been created in `.deepwork/jobs/[job_name]/job.yml`?
44+
1. **User Understanding**: Did you fully understand the user's workflow by asking structured questions?
45+
2. **Structured Questions Used**: Did you ask structured questions (using the AskUserQuestion tool) to gather user input?
46+
3. **Clear Inputs/Outputs**: Does every step have clearly defined inputs and outputs?
47+
4. **Logical Dependencies**: Do step dependencies make sense and avoid circular references?
48+
5. **Concise Summary**: Is the summary under 200 characters and descriptive?
49+
6. **Rich Description**: Does the description provide enough context for future refinement?
50+
7. **Valid Schema**: Does the job.yml follow the required schema (name, version, summary, steps)?
51+
8. **File Created**: Has the job.yml file been created in `.deepwork/jobs/[job_name]/job.yml`?
4952
5053
If ANY criterion is not met, continue working to address it.
5154
If ALL criteria are satisfied, include `<promise>✓ Quality Criteria Met</promise>` in your response.
@@ -71,9 +74,10 @@ steps:
7174
3. **Specific & Actionable**: Are instructions tailored to each step's purpose, not generic?
7275
4. **Output Examples**: Does each instruction file show what good output looks like?
7376
5. **Quality Criteria**: Does each instruction file define quality criteria for its outputs?
74-
6. **Sync Complete**: Has `deepwork sync` been run successfully?
75-
7. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?
76-
8. **Policies Considered**: Have you thought about whether policies would benefit this job?
77+
6. **Ask Structured Questions**: Do step instructions that gather user input explicitly use the phrase "ask structured questions"?
78+
7. **Sync Complete**: Has `deepwork sync` been run successfully?
79+
8. **Commands Available**: Are the slash-commands generated in `.claude/commands/`?
80+
9. **Policies Considered**: Have you thought about whether policies would benefit this job?
7781
- If relevant policies were identified, did you explain them and offer to run `/deepwork_policy.define`?
7882
- Not every job needs policies - only suggest when genuinely helpful.
7983

0 commit comments

Comments
 (0)