Skip to content

Commit 74614e9

Browse files
nhortonclaude
andauthored
refactor: deprecate steps/ folder pattern in job definitions (#367)
* refactor: deprecate steps/ folder pattern in job definitions Step instructions are now inlined in job.yml. This removes all references to the steps/ folder pattern across documentation, AGENTS.md files, .deepreview rules, CI tests, and job instructions. Supplemental reference files are moved from steps/ to the job root directory. The repair workflow retains steps/ references for migrating legacy jobs, and now instructs agents to `git rm` step instruction files after inlining. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: address review findings — remove duplicate pattern, update .deepreview instructions - Remove duplicate `**/conventions.md` in library/jobs/.deepreview include list - Update engineer/.deepreview and template.deepreview to reference inline step instructions instead of deprecated step instruction files - Add changelog entry for steps/ deprecation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: update engineer .deepreview description to reflect inline instructions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6ef1bdc commit 74614e9

19 files changed

Lines changed: 66 additions & 134 deletions

File tree

.deepwork/jobs/test_job_flow/AGENTS.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ This folder and its subfolders are managed using `deepwork_jobs` workflows.
1313
```
1414
.
1515
├── AGENTS.md # This file - project context and guidance
16-
├── job.yml # Job specification (created by define step)
17-
├── steps/ # Step instruction files (created by implement step)
18-
│ └── *.md # One file per step
16+
├── job.yml # Job specification with inline step instructions
1917
├── hooks/ # Custom validation scripts and prompts
2018
│ └── *.md|*.sh # Hook files referenced in job.yml
2119
├── scripts/ # Reusable scripts and utilities created during job execution

.deepwork/jobs/test_job_flow/job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ workflows:
9090
completed on first try or required retries.
9191
9292
2. **Verify completion**: Confirm `.deepwork/jobs/detailed_test_review/job.yml`
93-
exists with expected structure (2 steps, correct outputs, reviews). Check
94-
step instruction files exist in `steps/`.
93+
exists with expected structure (2 steps, correct outputs, reviews, and
94+
inline step instructions).
9595
9696
3. **Identify friction points**: Look for errors, workarounds, retries, confusion,
9797
unnecessary steps, slow paths, and missing guidance in the transcript.

.deepwork/learning-agents/consistency-reviewer/core-knowledge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ There are exactly three types of jobs. Confusing them is one of the most common
3434
### Key File Patterns
3535

3636
- `job.yml` — Job definitions with steps, workflows, outputs, reviews, quality criteria
37-
- `steps/*.md` — Step instruction files (markdown with structured guidance)
37+
- Step instructions are inlined in `job.yml` (the `steps/` folder pattern is deprecated)
3838
- `hooks/` — Lifecycle hooks (after_agent, before_tool, etc.)
3939
- `.claude/agents/*.md` — Agent definitions with YAML frontmatter (name, description)
4040
- `AGENTS.md` — Bespoke learnings and context for a working directory

.github/workflows/claude-code-test.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -310,18 +310,12 @@ jobs:
310310
exit 1
311311
fi
312312
313-
# Verify step files were created
314-
echo "=== Checking step files were created ==="
315-
if [ -f ".deepwork/jobs/fruits/steps/identify.md" ] && [ -f ".deepwork/jobs/fruits/steps/classify.md" ]; then
316-
echo "SUCCESS: Step instruction files created"
317-
echo "--- identify.md ---"
318-
cat .deepwork/jobs/fruits/steps/identify.md
319-
echo ""
320-
echo "--- classify.md ---"
321-
cat .deepwork/jobs/fruits/steps/classify.md
313+
# Verify step instructions are inlined in job.yml
314+
echo "=== Checking step instructions are inlined ==="
315+
if grep -q 'instructions:' .deepwork/jobs/fruits/job.yml; then
316+
echo "SUCCESS: Step instructions are inlined in job.yml"
322317
else
323-
echo "ERROR: Step files were not created"
324-
ls -la .deepwork/jobs/fruits/steps/ || echo "No steps directory"
318+
echo "ERROR: No inline step instructions found in job.yml"
325319
exit 1
326320
fi
327321

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
- Deprecated the `steps/` folder pattern for job definitions — step instructions are now inlined in `job.yml`; moved supplemental reference files from `steps/` to job root directories
15+
- Repair workflow now instructs agents to `git rm` step instruction files after inlining
16+
1417
### Fixed
1518

1619
### Removed

doc/doc-specs.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ steps:
9393
- id: generate_report
9494
name: "Generate Monthly Report"
9595
description: "Create the monthly AWS spending report"
96-
instructions_file: steps/generate_report.md
96+
instructions: |
97+
Generate the monthly AWS spending report...
9798
outputs:
9899
- file: reports/aws_spending.md
99100
doc_spec: .deepwork/doc_specs/monthly_aws_report.md

library/jobs/.deepreview

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ library_job_portability:
3030
match:
3131
include:
3232
- "**/job.yml"
33-
- "**/steps/*.md"
34-
- "**/readme.md"
3533
- "**/conventions.md"
34+
- "**/readme.md"
3635
- "**/templates/*.template"
3736
exclude:
3837
- ".deepreview"
@@ -51,7 +50,7 @@ library_job_portability:
5150
- Workspace-relative paths that assume a specific repo layout
5251
(e.g., `.repos/acme/api/` or `/code/myproject/`)
5352

54-
Acceptable: relative paths within the job directory (e.g., `steps/foo.md`,
53+
Acceptable: relative paths within the job directory (e.g., `templates/bar.yml`,
5554
`templates/bar.yml`) and generic placeholders like `<project_root>`.
5655

5756
## Personal and Private Information

library/jobs/README.md

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -74,49 +74,22 @@ library/jobs/
7474
│ ├── job.yml
7575
│ ├── AGENTS.md # Agent context and learnings
7676
│ ├── CLAUDE.md -> AGENTS.md
77-
│ ├── requirements.md # RFC 2119 requirements specification
78-
│ └── steps/ # Step instruction files (also inlined in job.yml)
77+
│ └── requirements.md # RFC 2119 requirements specification
7978
├── platform_engineer/ # Platform engineering workflows
8079
│ ├── job.yml
8180
│ ├── AGENTS.md # Agent context and learnings
8281
│ ├── CLAUDE.md -> AGENTS.md
8382
│ ├── conventions.md # RFC 2119 platform engineering standards
8483
│ ├── readme.md
85-
│ ├── steps/ # Step instruction files (also inlined in job.yml)
8684
│ └── templates/ # Output templates
8785
├── repo/
88-
│ ├── job.yml # Job definition (name, steps, workflows)
89-
│ ├── readme.md # Job-specific documentation
90-
│ └── steps/
91-
│ ├── detect_platform.md
92-
│ ├── ensure_labels.md
93-
│ ├── check_branch_protection.md
94-
│ ├── check_milestones.md
95-
│ ├── check_boards.md
96-
│ ├── setup_report.md
97-
│ ├── audit_labels.md
98-
│ ├── audit_branch_protection.md
99-
│ ├── audit_milestones.md
100-
│ ├── audit_boards.md
101-
│ └── doctor_report.md
86+
│ ├── job.yml # Job definition (self-contained with inline instructions)
87+
│ └── readme.md # Job-specific documentation
10288
├── research/
103-
│ ├── job.yml # Job definition (name, steps, workflows)
89+
│ ├── job.yml # Job definition (self-contained with inline instructions)
10490
│ ├── readme.md # Job-specific documentation
10591
│ ├── AGENTS.md # Agent context and learnings
106-
│ ├── CLAUDE.md -> AGENTS.md
107-
│ └── steps/
108-
│ ├── scope.md
109-
│ ├── choose_platforms.md
110-
│ ├── gather.md
111-
│ ├── gather_quick.md
112-
│ ├── synthesize.md
113-
│ ├── summarize.md
114-
│ ├── report.md
115-
│ ├── parse.md
116-
│ ├── file.md
117-
│ ├── ingest_material.md
118-
│ ├── analyze.md
119-
│ └── plan.md
92+
│ └── CLAUDE.md -> AGENTS.md
12093
└── spec_driven_development/
12194
├── job.yml # Job definition (self-contained with inline instructions)
12295
└── readme.md # Job-specific documentation
@@ -147,7 +120,7 @@ The job definition file contains:
147120
- `process_requirements`: Optional quality criteria for the work process
148121
- `post_workflow_instructions`: Optional instructions shown after workflow completes
149122

150-
Step instructions are inlined in `job.yml`. Some jobs also retain separate `steps/*.md` files from earlier versions; the inline `instructions` in `job.yml` are the canonical source.
123+
Step instructions are inlined in `job.yml` using YAML block scalars (`instructions: |`).
151124

152125
## Using a Job from the Library
153126

library/jobs/engineer/.deepreview

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
job_definition_review:
2-
description: "Review job.yml, requirements.md, and step instructions for correctness, completeness, and coherence as a holistic workflow."
2+
description: "Review job.yml (with inline step instructions) and requirements.md for correctness, completeness, and coherence as a holistic workflow."
33
match:
44
include:
55
- "job.yml"
6-
- "steps/*.md"
76
- "requirements.md"
87
review:
98
strategy: matches_together
109
instructions: |
11-
Review this DeepWork job definition (job.yml), its requirements (requirements.md),
12-
and its step instruction files (steps/*.md) holistically. Check that they form a
13-
coherent, well-structured workflow that an AI agent can execute reliably.
10+
Review this DeepWork job definition (job.yml) and its requirements (requirements.md)
11+
holistically. Check that they form a coherent, well-structured workflow that an AI
12+
agent can execute reliably.
1413

1514
## Reference Material
1615

@@ -42,13 +41,13 @@ job_definition_review:
4241
- Intermediate outputs that are not meant to be persisted should be in .deepwork/tmp (and the name should indicate that)
4342
- Final outputs follow project conventions (not hidden in dot-directories, descriptive names, appropriate use of subdirectories)
4443

45-
### 4. Step Instructions Match job.yml
46-
- Every step defined in job.yml has a corresponding instruction file
44+
### 4. Inline Step Instructions
45+
- Every step defined in job.yml has inline `instructions:` content
4746
- Step instruction content aligns with the step's described purpose
4847
- Instructions reference the correct input and output filenames from job.yml
4948
- Instructions do not duplicate content already in `common_job_info_provided_to_all_steps_at_runtime`
50-
- If there is duplicated content amongst the instruction files, it should be moved to `common_job_info_provided_to_all_steps_at_runtime` and removed from the instruction files
51-
- If there is content that is needed in multiple steps but not all, it should be moved to its own file and referenced in the steps
49+
- If there is duplicated content amongst step instructions, it should be moved to `common_job_info_provided_to_all_steps_at_runtime`
50+
- If there is content that is needed in multiple steps but not all, it should be moved to a shared file in the job directory and referenced in the steps
5251

5352
### 5. Quality Reviews
5453
- Steps with complex or final outputs have reviews defined
@@ -58,8 +57,8 @@ job_definition_review:
5857
- Steps with no meaningful quality checks use `reviews: []`
5958

6059
### 6. Step Instruction Quality
61-
- Each instruction file follows the structure and section headings defined in
62-
`step_instruction.md.template` for this job type.
60+
- Each step's inline instructions follow the structure and section headings
61+
defined in `step_instruction.md.template` for this job type.
6362
- The sections clearly communicate: what the step is trying to achieve,
6463
what the agent should do, what to produce (including format/examples),
6564
and how quality will be evaluated.

library/jobs/engineer/AGENTS.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,8 @@ It is a library job — available for users to adopt but not auto-installed by t
1111
engineer/
1212
├── AGENTS.md # This file
1313
├── CLAUDE.md -> AGENTS.md # Symlink for Claude Code
14-
├── job.yml # Job definition
15-
├── requirements.md # RFC 2119 requirements specification
16-
└── steps/
17-
├── translate_issue.md
18-
├── initialize_branch.md
19-
├── red_tests.md
20-
├── green_implementation.md
21-
├── finalize_pr.md
22-
├── product_sync.md
23-
├── check_agent_md.md
24-
├── check_context.md
25-
└── doctor_report.md
14+
├── job.yml # Job definition (all step instructions inlined)
15+
└── requirements.md # RFC 2119 requirements specification
2616
```
2717

2818
## Workflows

0 commit comments

Comments
 (0)