Skip to content

Commit f608fa1

Browse files
authored
Merge branch 'main' into copilot/fix-ci-action-failure
2 parents d12b23d + 8ad17fe commit f608fa1

File tree

22 files changed

+395
-123
lines changed

22 files changed

+395
-123
lines changed

.claude/skills/deepwork_jobs.define/SKILL.md

Lines changed: 82 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,63 @@ For each major phase they mentioned, ask structured questions to gather details:
126126
- Where should each output be saved? (filename/path)
127127
- Should outputs be organized in subdirectories? (e.g., `reports/`, `data/`, `drafts/`)
128128
- Will other steps need this output?
129-
130-
**Important**: Output paths should always be within the main repository directory structure, not in dot-directories like `.deepwork/`. Dot-directories are for configuration and job definitions, not for job outputs. Use paths like `research/competitors/report.md` rather than `.deepwork/outputs/report.md`.
131129
- **Does this output have a doc spec?** If a doc spec was created in Step 1.6/1.7, reference it for the appropriate output
132130

131+
#### Work Product Storage Guidelines
132+
133+
**Key principle**: Job outputs belong in the main repository directory structure, not in dot-directories. The `.deepwork/` directory is for job definitions and configuration only.
134+
135+
**Why this matters**:
136+
- **Version control**: Work products in the main repo are tracked by git and visible in PRs
137+
- **Discoverability**: Team members can find outputs without knowing about DeepWork internals
138+
- **Tooling compatibility**: IDEs, search tools, and CI/CD work naturally with standard paths
139+
- **Glob patterns**: Well-structured paths enable powerful file matching (e.g., `competitive_research/**/*.md`)
140+
141+
**Good output path patterns**:
142+
```
143+
competitive_research/competitors_list.md
144+
competitive_research/acme_corp/research.md
145+
operations/reports/2026-01/spending_analysis.md
146+
docs/api/endpoints.md
147+
```
148+
149+
**Avoid these patterns**:
150+
```
151+
.deepwork/outputs/report.md # Hidden in dot-directory
152+
output.md # Too generic, no context
153+
research.md # Unclear which research
154+
temp/draft.md # Transient-sounding paths
155+
```
156+
157+
**Organizing multi-file outputs**:
158+
- Use the job name as a top-level folder when outputs are job-specific
159+
- Use parameterized paths for per-entity outputs: `competitive_research/[competitor_name]/`
160+
- Match existing project conventions when extending a codebase
161+
162+
**When to include dates in paths**:
163+
- **Include date** for periodic outputs where each version is retained (e.g., monthly reports, quarterly reviews, weekly summaries). These accumulate over time and historical versions remain useful.
164+
```
165+
operations/reports/2026-01/spending_analysis.md # Monthly report - keep history
166+
hr/employees/[employee_name]/quarterly_reviews/2026-Q1.pdf # Per-employee quarterly review
167+
```
168+
- **Omit date** for current-state outputs that represent the latest understanding and get updated in place. Previous versions live in git history, not separate files.
169+
```
170+
competitive_research/acme_corp/swot.md # Current SWOT - updated over time
171+
docs/architecture/overview.md # Living document
172+
```
173+
174+
**Supporting materials and intermediate outputs**:
175+
- Content generated in earlier steps to support the final output (research notes, data extracts, drafts) should be placed in a `_dataroom` folder that is a peer to the final output
176+
- Name the dataroom folder by replacing the file extension with `_dataroom`
177+
```
178+
operations/reports/2026-01/spending_analysis.md # Final output
179+
operations/reports/2026-01/spending_analysis_dataroom/ # Supporting materials
180+
raw_data.csv
181+
vendor_breakdown.md
182+
notes.md
183+
```
184+
- This keeps supporting materials organized and discoverable without cluttering the main output location
185+
133186
4. **Step Dependencies**
134187
- Which previous steps must complete before this one?
135188
- Are there any ordering constraints?
@@ -139,6 +192,19 @@ For each major phase they mentioned, ask structured questions to gather details:
139192
- Are there any quality checks or validation needed?
140193
- What makes a good vs. bad output for this step?
141194
195+
6. **Agent Delegation** (optional)
196+
- Should this step be executed by a specific agent type?
197+
- Use the `agent` field when the step should run in a forked context with a specific agent
198+
- When `agent` is set, the generated skill automatically includes `context: fork`
199+
- Available agent types:
200+
- `general-purpose` - Standard agent for multi-step tasks
201+
202+
```yaml
203+
steps:
204+
- id: research_step
205+
agent: general-purpose # Delegates to the general-purpose agent
206+
```
207+
142208
**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.
143209

144210
#### Doc Spec-Aware Output Format
@@ -410,16 +476,6 @@ After creating the file:
410476
2. Recommend that they review the job.yml file
411477
3. Tell them to run `/deepwork_jobs.review_job_spec` next
412478
413-
## Quality Criteria
414-
415-
- Asked structured questions to fully understand user requirements
416-
- User fully understands what job they're creating
417-
- All steps have clear inputs and outputs
418-
- Dependencies make logical sense
419-
- Summary is concise and descriptive
420-
- Description provides rich context for future refinement
421-
- Specification is valid YAML and follows the schema
422-
- Ready for implementation step
423479
424480
425481
### Job Context
@@ -466,7 +522,7 @@ Use branch format: `deepwork/deepwork_jobs-[instance]-YYYYMMDD`
466522
6. **Complete Steps**: Each step must have: id (lowercase_underscores), name, description, instructions_file, outputs (at least one), and dependencies array
467523
7. **Valid Dependencies**: Dependencies must reference existing step IDs with no circular references
468524
8. **Input Consistency**: File inputs with `from_step` must reference a step that is in the dependencies array
469-
9. **Output Paths**: Outputs must be valid filenames or paths within the main repo (not in dot-directories). Use specific, descriptive paths that lend themselves to glob patterns, e.g., `competitive_research/competitors_list.md` or `competitive_research/[competitor_name]/research.md`. Avoid generic names like `output.md`.
525+
9. **Output Paths**: Outputs must be valid filenames or paths within the main repo directory structure, never in dot-directories like `.deepwork/`. Use specific, descriptive paths that lend themselves to glob patterns (e.g., `competitive_research/acme_corp/swot.md` or `operations/reports/2026-01/spending_analysis.md`). Parameterized paths like `[competitor_name]/` are encouraged for per-entity outputs. Avoid generic names (`output.md`, `analysis.md`) and transient-sounding paths (`temp/`, `draft.md`). Supporting materials for a final output should go in a peer `_dataroom` folder (e.g., `spending_analysis_dataroom/`).
470526
10. **Concise Instructions**: The content of the file, particularly the description, must not have excessively redundant information. It should be concise and to the point given that extra tokens will confuse the AI.
471527
472528
<details>
@@ -535,6 +591,19 @@ Use branch format: `deepwork/deepwork_jobs-[instance]-YYYYMMDD`
535591
exposed: true # Makes step available without running dependencies
536592
```
537593
594+
### Agent Delegation
595+
596+
When a step should be executed by a specific agent type, use the `agent` field. This automatically sets `context: fork` in the generated skill.
597+
598+
```yaml
599+
steps:
600+
- id: research_step
601+
agent: general-purpose # Delegates to the general-purpose agent
602+
```
603+
604+
Available agent types:
605+
- `general-purpose` - Standard agent for multi-step tasks
606+
538607
### Quality Hooks
539608

540609
```yaml
@@ -644,32 +713,6 @@ Use branch format: `deepwork/deepwork_jobs-[instance]-YYYYMMDD`
644713
- Do NOT proceed without required inputs; ask the user if any are missing
645714
- Do NOT modify files outside the scope of this step's defined outputs
646715

647-
## Quality Validation
648-
649-
**Before completing this step, you MUST have your work reviewed against the quality criteria below.**
650-
651-
Use a sub-agent (Haiku model) to review your work against these criteria:
652-
653-
**Criteria (all must be satisfied)**:
654-
1. **User Understanding**: Did the agent fully understand the user's workflow by asking structured questions?
655-
2. **Structured Questions Used**: Did the agent ask structured questions (using the AskUserQuestion tool) to gather user input?
656-
3. **Document Detection**: For document-oriented workflows, did the agent detect patterns and offer doc spec creation?
657-
4. **doc spec Created (if applicable)**: If a doc spec was needed, was it created in `.deepwork/doc_specs/[doc_spec_name].md` with proper quality criteria?
658-
5. **doc spec References**: Are document outputs properly linked to their doc specs using `{file, doc_spec}` format?
659-
6. **Valid Against doc spec**: Does the job.yml conform to the job.yml doc spec quality criteria (valid identifier, semantic version, concise summary, rich description, complete steps, valid dependencies)?
660-
7. **Clear Inputs/Outputs**: Does every step have clearly defined inputs and outputs?
661-
8. **Logical Dependencies**: Do step dependencies make sense and avoid circular references?
662-
9. **Concise Summary**: Is the summary under 200 characters and descriptive?
663-
10. **Rich Description**: Does the description provide enough context for future refinement?
664-
11. **Valid Schema**: Does the job.yml follow the required schema (name, version, summary, steps)?
665-
12. **File Created**: Has the job.yml file been created in `.deepwork/jobs/[job_name]/job.yml`?
666-
**Review Process**:
667-
1. Once you believe your work is complete, spawn a sub-agent using Haiku to review your work against the quality criteria above
668-
2. The sub-agent should examine your outputs and verify each criterion is met
669-
3. If the sub-agent identifies valid issues, fix them
670-
4. Have the sub-agent review again until all valid feedback has been addressed
671-
5. Only mark the step complete when the sub-agent confirms all criteria are satisfied
672-
673716
## On Completion
674717

675718
1. Verify outputs are created

.claude/skills/deepwork_jobs.implement/SKILL.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,7 @@ This will:
150150
- Generate skills for each step
151151
- Make the skills available in `.claude/skills/` (or appropriate platform directory)
152152

153-
### Step 6: Relay Reload Instructions
154-
155-
After running `deepwork sync`, look at the "To use the new skills" section in the output. **Relay these exact reload instructions to the user** so they know how to pick up the new skills. 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).
156-
157-
### Step 7: Consider Rules for the New Job
153+
### Step 6: Consider Rules for the New Job
158154

159155
After implementing the job, consider whether there are **rules** that would help enforce quality or consistency when working with this job's domain.
160156

@@ -245,8 +241,7 @@ Before marking this step complete, ensure:
245241
- [ ] Each instruction file is complete and actionable
246242
- [ ] `deepwork sync` executed successfully
247243
- [ ] Skills generated in platform directory
248-
- [ ] User informed to follow reload instructions from `deepwork sync`
249-
- [ ] Considered whether rules would benefit this job (Step 7)
244+
- [ ] Considered whether rules would benefit this job (Step 6)
250245
- [ ] If rules suggested, offered to run `/deepwork_rules.define`
251246
252247
## Quality Criteria

.claude/skills/deepwork_jobs.learn/SKILL.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,12 @@ If instruction files were modified:
250250
changes: "Improved [step] instructions based on execution learnings: [brief description]"
251251
```
252252

253-
### Step 7: Sync and Relay Instructions
253+
### Step 7: Sync Skills
254254

255-
1. **Run deepwork sync** (if instructions were modified)
256-
```bash
257-
deepwork sync
258-
```
259-
260-
2. **If skills were regenerated**, look at the "To use the new skills" 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)
255+
**Run deepwork sync** (if instructions were modified)
256+
```bash
257+
deepwork sync
258+
```
261259

262260
## File Reference Patterns
263261

@@ -347,7 +345,7 @@ I found the following job executions:
347345

348346
**Summary**
349347

350-
Updated job instructions and created AGENTS.md with bespoke learnings. To get the updated skills, type 'exit' then run 'claude --resume'.
348+
Updated job instructions and created AGENTS.md with bespoke learnings.
351349
```
352350
353351
## Handling Edge Cases

.claude/skills/deepwork_jobs.review_job_spec/SKILL.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ Use branch format: `deepwork/deepwork_jobs-[instance]-YYYYMMDD`
276276
6. **Complete Steps**: Each step must have: id (lowercase_underscores), name, description, instructions_file, outputs (at least one), and dependencies array
277277
7. **Valid Dependencies**: Dependencies must reference existing step IDs with no circular references
278278
8. **Input Consistency**: File inputs with `from_step` must reference a step that is in the dependencies array
279-
9. **Output Paths**: Outputs must be valid filenames or paths within the main repo (not in dot-directories). Use specific, descriptive paths that lend themselves to glob patterns, e.g., `competitive_research/competitors_list.md` or `competitive_research/[competitor_name]/research.md`. Avoid generic names like `output.md`.
279+
9. **Output Paths**: Outputs must be valid filenames or paths within the main repo directory structure, never in dot-directories like `.deepwork/`. Use specific, descriptive paths that lend themselves to glob patterns (e.g., `competitive_research/acme_corp/swot.md` or `operations/reports/2026-01/spending_analysis.md`). Parameterized paths like `[competitor_name]/` are encouraged for per-entity outputs. Avoid generic names (`output.md`, `analysis.md`) and transient-sounding paths (`temp/`, `draft.md`). Supporting materials for a final output should go in a peer `_dataroom` folder (e.g., `spending_analysis_dataroom/`).
280280
10. **Concise Instructions**: The content of the file, particularly the description, must not have excessively redundant information. It should be concise and to the point given that extra tokens will confuse the AI.
281281

282282
<details>
@@ -345,6 +345,19 @@ Use branch format: `deepwork/deepwork_jobs-[instance]-YYYYMMDD`
345345
exposed: true # Makes step available without running dependencies
346346
```
347347
348+
### Agent Delegation
349+
350+
When a step should be executed by a specific agent type, use the `agent` field. This automatically sets `context: fork` in the generated skill.
351+
352+
```yaml
353+
steps:
354+
- id: research_step
355+
agent: general-purpose # Delegates to the general-purpose agent
356+
```
357+
358+
Available agent types:
359+
- `general-purpose` - Standard agent for multi-step tasks
360+
348361
### Quality Hooks
349362

350363
```yaml

.deepwork/doc_specs/job_spec.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ quality_criteria:
2323
- name: Input Consistency
2424
description: "File inputs with `from_step` must reference a step that is in the dependencies array"
2525
- name: Output Paths
26-
description: "Outputs must be valid filenames or paths within the main repo (not in dot-directories). Use specific, descriptive paths that lend themselves to glob patterns, e.g., `competitive_research/competitors_list.md` or `competitive_research/[competitor_name]/research.md`. Avoid generic names like `output.md`."
26+
description: "Outputs must be valid filenames or paths within the main repo directory structure, never in dot-directories like `.deepwork/`. Use specific, descriptive paths that lend themselves to glob patterns (e.g., `competitive_research/acme_corp/swot.md` or `operations/reports/2026-01/spending_analysis.md`). Parameterized paths like `[competitor_name]/` are encouraged for per-entity outputs. Avoid generic names (`output.md`, `analysis.md`) and transient-sounding paths (`temp/`, `draft.md`). Supporting materials for a final output should go in a peer `_dataroom` folder (e.g., `spending_analysis_dataroom/`)."
2727
- name: Concise Instructions
2828
description: "The content of the file, particularly the description, must not have excessively redundant information. It should be concise and to the point given that extra tokens will confuse the AI."
2929
---
@@ -90,6 +90,19 @@ steps:
9090
exposed: true # Makes step available without running dependencies
9191
```
9292
93+
### Agent Delegation
94+
95+
When a step should be executed by a specific agent type, use the `agent` field. This automatically sets `context: fork` in the generated skill.
96+
97+
```yaml
98+
steps:
99+
- id: research_step
100+
agent: general-purpose # Delegates to the general-purpose agent
101+
```
102+
103+
Available agent types:
104+
- `general-purpose` - Standard agent for multi-step tasks
105+
93106
### Quality Hooks
94107

95108
```yaml

.deepwork/jobs/deepwork_jobs/doc_specs/job_spec.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ quality_criteria:
2323
- name: Input Consistency
2424
description: "File inputs with `from_step` must reference a step that is in the dependencies array"
2525
- name: Output Paths
26-
description: "Outputs must be valid filenames or paths within the main repo (not in dot-directories). Use specific, descriptive paths that lend themselves to glob patterns, e.g., `competitive_research/competitors_list.md` or `competitive_research/[competitor_name]/research.md`. Avoid generic names like `output.md`."
26+
description: "Outputs must be valid filenames or paths within the main repo directory structure, never in dot-directories like `.deepwork/`. Use specific, descriptive paths that lend themselves to glob patterns (e.g., `competitive_research/acme_corp/swot.md` or `operations/reports/2026-01/spending_analysis.md`). Parameterized paths like `[competitor_name]/` are encouraged for per-entity outputs. Avoid generic names (`output.md`, `analysis.md`) and transient-sounding paths (`temp/`, `draft.md`). Supporting materials for a final output should go in a peer `_dataroom` folder (e.g., `spending_analysis_dataroom/`)."
2727
- name: Concise Instructions
2828
description: "The content of the file, particularly the description, must not have excessively redundant information. It should be concise and to the point given that extra tokens will confuse the AI."
2929
---
@@ -90,6 +90,19 @@ steps:
9090
exposed: true # Makes step available without running dependencies
9191
```
9292
93+
### Agent Delegation
94+
95+
When a step should be executed by a specific agent type, use the `agent` field. This automatically sets `context: fork` in the generated skill.
96+
97+
```yaml
98+
steps:
99+
- id: research_step
100+
agent: general-purpose # Delegates to the general-purpose agent
101+
```
102+
103+
Available agent types:
104+
- `general-purpose` - Standard agent for multi-step tasks
105+
93106
### Quality Hooks
94107

95108
```yaml

0 commit comments

Comments
 (0)