You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(review): review_depth: lightweight annotation to skip preamble for low-risk steps (#411)
* feat(review): add review_depth: lightweight to suppress preamble for low-risk steps
Adds a `review_depth: lightweight` annotation to review blocks in job.yml
step outputs and .deepreview rules. When set, the workflow's common_job_info
preamble (## Job Context) is omitted from review instruction files, reducing
token overhead for trivial or reversible intermediate steps. Step inputs and
review criteria are always included regardless of depth.
- Parser: ReviewBlock gains review_depth field
- Config: ReviewRule and ReviewTask carry review_depth through the pipeline
- Matcher: review_depth threaded from rule to task for all three strategies
- QualityGate: _build_preamble() conditionally omits Job Context when lightweight
- Schemas: review_depth enum ["lightweight"] added to job.schema.json and deepreview_schema.json
- Tests: 1299 passing, coverage at 98.07%
Closes#86
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: add changelog entry for review_depth: lightweight
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(review): clarify review_depth no-op in .deepreview and add string-output test
- deepreview_schema.json: note that review_depth has no effect in .deepreview
rules since they are not associated with a workflow and receive no common_job_info
- test_quality_gate.py: add test for build_string_output_review_tasks with
review_depth: lightweight to confirm common_job_info is suppressed on string outputs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* style: apply ruff formatting to quality_gate and test_quality_gate
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
### Added
11
11
12
+
-`review_depth: lightweight` annotation for review blocks in `job.yml` step outputs and `.deepreview` rules — when set, the workflow's `common_job_info` preamble is omitted from review instruction files, reducing token overhead for trivial or reversible intermediate steps (closes #86)
Copy file name to clipboardExpand all lines: src/deepwork/jobs/job.schema.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,11 @@
120
120
"description": "If true, includes matching files that were not produced as outputs but exist on disk. Useful for document freshness reviews where the reviewer needs to see the doc even when only source files changed."
121
121
}
122
122
}
123
+
},
124
+
"review_depth": {
125
+
"type": "string",
126
+
"enum": ["lightweight"],
127
+
"description": "Optional review depth hint. When set to 'lightweight', the workflow's common_job_info preamble is omitted from the review instruction file, reducing token usage for low-risk or reversible intermediate steps. Step inputs and review criteria are always included. Omit this field for standard depth (default)."
Copy file name to clipboardExpand all lines: src/deepwork/schemas/deepreview_schema.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -136,6 +136,11 @@
136
136
"description": "If true, pulls the full contents of files that match the include patterns even if they weren't modified in this diff."
137
137
}
138
138
}
139
+
},
140
+
"review_depth": {
141
+
"type": "string",
142
+
"enum": ["lightweight"],
143
+
"description": "Optional review depth hint. When set to 'lightweight' on a job.yml review block, the workflow's common_job_info preamble is omitted from the review instruction file, reducing token usage for low-risk or reversible intermediate steps. Note: this field has no effect in .deepreview rules — those rules are not associated with a workflow and do not receive common_job_info. Omit for standard depth (default)."
0 commit comments