Skip to content

Commit 89d3dac

Browse files
nhortonclaude
andauthored
Add markdown file support to job steps (#19)
* feat: add supplementary .md file support for step instructions Step instructions can now reference additional .md files placed in the steps/ directory. When slash commands are generated, references to these files (in backticks, markdown links, or quoted strings) are automatically transformed to relative paths from the project root. Changes: - Add _find_supplementary_files() to detect extra .md files in steps dir - Add _transform_md_references() to convert filename refs to full paths - Update Claude and Gemini templates to show supplementary files section - Document the feature in implement.md for deepwork_jobs - Add comprehensive tests for the new functionality * refactor: simplify supplementary .md file support to docs-only approach Remove automatic path transformation code in favor of documenting that users should reference supplementary files using full paths from the project root (e.g., .deepwork/jobs/job_name/steps/reference.md). This is simpler and more explicit - no magic transformations needed. Changes: - Remove _find_supplementary_files() and _transform_md_references() from generator - Remove supplementary_files template section from both Claude and Gemini templates - Remove supplementary files tests - Add supplemental_file_references.md documentation file - Update implement.md to reference the new doc file with full path * fix: remove manually copied files from .deepwork/ The .deepwork/ directory should only be modified by `deepwork install`, not by manual file copies. Remove the supplementary files that were incorrectly added to the installed jobs directory. The supplementary file documentation remains in the source at src/deepwork/standard_jobs/deepwork_jobs/steps/ and will be installed when users run `deepwork install`. --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 309137d commit 89d3dac

2 files changed

Lines changed: 46 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ If a step in the job.yml has `stop_hooks` defined, the generated instruction fil
144144
145145
This alignment ensures the AI agent knows exactly what will be validated and can self-check before completing.
146146
147+
### Using Supplementary Reference Files
148+
149+
Step instructions can include additional `.md` files in the `steps/` directory for detailed examples, templates, or reference material. Reference them using the full path from the project root.
150+
151+
See `.deepwork/jobs/deepwork_jobs/steps/supplemental_file_references.md` for detailed documentation and examples.
152+
147153
### Step 4: Verify job.yml Location
148154

149155
Verify that `job.yml` is in the correct location at `.deepwork/jobs/[job_name]/job.yml`. The define step should have created it there. If for some reason it's not there, you may need to create or move it.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Supplementary Reference Files
2+
3+
Step instructions can include additional `.md` files in the `steps/` directory. These supplementary files are useful for:
4+
5+
- Providing detailed examples or templates that would clutter the main instruction file
6+
- Sharing common reference material across multiple steps
7+
- Including technical specifications, API documentation, or style guides
8+
9+
## How to Use
10+
11+
1. Place additional `.md` files in the `steps/` directory alongside the main step instruction files
12+
2. Reference them in your step instructions using the **full path from the project root**
13+
14+
## Example
15+
16+
If you have a job called `my_job` and want to include an API specification template:
17+
18+
1. Create the file at `.deepwork/jobs/my_job/steps/api_spec.md`
19+
2. Reference it in your step instructions like this:
20+
21+
```markdown
22+
Use the template in `.deepwork/jobs/my_job/steps/api_spec.md` to structure your API endpoints.
23+
```
24+
25+
## Path Format
26+
27+
Always use the full relative path from the project root:
28+
29+
```
30+
.deepwork/jobs/[job_name]/steps/[filename].md
31+
```
32+
33+
For example:
34+
- `.deepwork/jobs/competitive_research/steps/competitor_template.md`
35+
- `.deepwork/jobs/api_design/steps/endpoint_schema.md`
36+
- `.deepwork/jobs/onboarding/steps/checklist_template.md`
37+
38+
## Benefits
39+
40+
Using supplementary files keeps your main step instructions focused and readable while allowing you to provide detailed reference material when needed. The AI agent can read these files during execution to get additional context.

0 commit comments

Comments
 (0)