Skip to content

Commit aa278dd

Browse files
nhortonclaude
andcommitted
Add 'ask structured questions' phrasing to source files
Updates the source of truth files in src/deepwork/standard_jobs/ to match the 'ask structured questions' phrasing that was previously only in the installed copies. This ensures future `deepwork install` runs will maintain consistency between source and installed files. Changes: - deepwork_jobs v0.5.0: Added structured questions phrasing to define.md, implement.md, job.yml and quality criteria hooks - deepwork_policy v0.2.0: Added structured questions phrasing to define.md and job.yml Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 38d7e62 commit aa278dd

5 files changed

Lines changed: 35 additions & 21 deletions

File tree

src/deepwork/standard_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

src/deepwork/standard_jobs/deepwork_jobs/steps/define.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ Create a `job.yml` specification file that defines the structure of a new DeepWo
66

77
## Task
88

9-
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.**
9+
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.**
10+
11+
**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.
1012

1113
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`).
1214

1315
### Step 1: Understand the Job Purpose
1416

15-
Start by asking questions to understand what the user wants to accomplish:
17+
Start by asking structured questions to understand what the user wants to accomplish:
1618

1719
1. **What is the overall goal of this workflow?**
1820
- What complex task are they trying to accomplish?
@@ -31,7 +33,7 @@ Start by asking questions to understand what the user wants to accomplish:
3133

3234
### Step 2: Define Each Step
3335

34-
For each major phase they mentioned, ask detailed questions:
36+
For each major phase they mentioned, ask structured questions to gather details:
3537

3638
1. **Step Purpose**
3739
- What exactly does this step accomplish?
@@ -92,7 +94,7 @@ After gathering information about all steps:
9294

9395
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.
9496

95-
**Ask the user about quality validation:**
97+
**Ask structured questions about quality validation:**
9698
- "Are there specific quality criteria that must be met for this step?"
9799
- "Would you like the agent to validate its work before completing?"
98100
- "What would make you send the work back for revision?"
@@ -281,11 +283,11 @@ Run `/deepwork_jobs.implement` to generate the instruction files for each step b
281283
## Important Guidelines
282284
283285
1. **Focus on specification only** - Don't create instruction files yet
284-
2. **Ask clarifying questions** - Never skip the discovery phase
286+
2. **Ask structured questions** - Never skip the discovery phase; use the AskUserQuestion tool
285287
3. **Rich context in description** - This helps with future refinement
286288
4. **Validate understanding** - Summarize and confirm before creating
287289
5. **Use examples** - Help users understand what good specifications look like
288-
6. **Understand file organization** - Always ask where outputs should be saved and if subdirectories are needed
290+
6. **Understand file organization** - Always ask structured questions about where outputs should be saved and if subdirectories are needed
289291
290292
## Validation Rules
291293
@@ -319,6 +321,7 @@ After creating the file:
319321
320322
## Quality Criteria
321323
324+
- Asked structured questions to fully understand user requirements
322325
- User fully understands what job they're creating
323326
- All steps have clear inputs and outputs
324327
- Dependencies make logical sense

src/deepwork/standard_jobs/deepwork_jobs/steps/implement.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ For each step in the job.yml, create a comprehensive instruction file at `.deepw
6969
4. **Explain the "why"** - Help the user understand the step's role in the workflow
7070
5. **Quality over quantity** - Detailed, actionable instructions are better than vague ones
7171
6. **Align with stop hooks** - If the step has `stop_hooks` defined, ensure the quality criteria in the instruction file match the validation criteria in the hooks
72+
7. **Ask structured questions** - When a step has user inputs, the instructions MUST explicitly tell the agent to "ask structured questions" using the AskUserQuestion tool to gather that information. Never use generic phrasing like "ask the user" - always use "ask structured questions"
7273

7374
### Handling Stop Hooks
7475

@@ -231,6 +232,7 @@ Before marking this step complete, ensure:
231232
- Instructions are specific and actionable
232233
- Output examples are provided in each instruction file
233234
- Quality criteria defined for each step
235+
- Steps with user inputs explicitly use "ask structured questions" phrasing
234236
- Sync completed successfully
235237
- Commands available for use
236238
- Thoughtfully considered relevant policies for the job domain

src/deepwork/standard_jobs/deepwork_policy/job.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: deepwork_policy
2-
version: "0.1.0"
2+
version: "0.2.0"
33
summary: "Policy enforcement for AI agent sessions"
44
description: |
55
Manages policies that automatically trigger when certain files change during an AI agent session.
@@ -21,6 +21,8 @@ description: |
2121
changelog:
2222
- version: "0.1.0"
2323
changes: "Initial version"
24+
- version: "0.2.0"
25+
changes: "Standardized on 'ask structured questions' phrasing for user input"
2426

2527
steps:
2628
- id: define

src/deepwork/standard_jobs/deepwork_policy/steps/define.md

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

77
## Task
88

9-
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.**
9+
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.**
10+
11+
**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.
1012

1113
### Step 1: Understand the Policy Purpose
1214

13-
Start by asking questions to understand what the user wants to enforce:
15+
Start by asking structured questions to understand what the user wants to enforce:
1416

1517
1. **What guideline or constraint should this policy enforce?**
1618
- What situation triggers the need for action?
@@ -175,6 +177,7 @@ Create or update this file at the project root with the new policy entry.
175177
176178
## Quality Criteria
177179
180+
- Asked structured questions to understand user requirements
178181
- Policy name is clear and descriptive
179182
- Trigger patterns accurately match the intended files
180183
- Safety patterns prevent unnecessary triggering

0 commit comments

Comments
 (0)