Commit b872dc9
fix: remove redundant review rules and fix strategy/criteria mismatch (#348)
* fix: remove redundant review rules and fix strategy/criteria mismatch
Several review cleanups driven by the observation that the `add_documentation_rules` step review was taking forever:
- job.yml: change `add_documentation_rules` review from `strategy: individual` to `strategy: matches_together`. Two of its three criteria (Documentation Covered, Efficient Rule Count) are project-wide and cross-cutting, so running them per-file forced each reviewer to redo the full project scan N times.
- job.yml: drop the `apply_rule` "Valid Configuration" criterion — the `deepreview` DeepSchema already enforces structural/schema validation via `json_schema_path`.
- job.yml: collapse the duplicated rule-YAML blocks in `add_deepwork_native_reviews`. The step previously showed the same two rules twice (once as a file-ref reference example, once as the inline version to emit) and told the agent to consult both, creating a contradiction about which form to use.
- Delete `src/deepwork/standard_jobs/deepwork_reviews/.deepreview` (`job_definition_review` rule): fully redundant with the `job_yml` DeepSchema which covers the same files and criteria.
- Delete `job_schema_instruction_compatibility` from the top-level `.deepreview`: its whole purpose was verifying job.yml files conform to `job.schema.json`, which is exactly what the `job_yml` DeepSchema's `json_schema_path` already enforces.
- Add `review-strategy-matches-criteria-scope` requirement to the `job_yml` DeepSchema so this class of bug is caught going forward: review `strategy: individual` must only be used when every criterion can be evaluated from a single file in isolation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add no-sentinel-files SHOULD requirement to job_yml DeepSchema
Discourages the sentinel-placeholder-file workaround (e.g., writing a NONE.md
file when the real result is "nothing to report") used to satisfy required
file_path outputs that would otherwise be empty. The fix is to use type: string
for outputs whose list can legitimately be empty, since string outputs can
naturally carry a narrative "no items found" message.
Kept as SHOULD so genuine filesystem-artifact needs (manifests, etc.) can still
opt into a sentinel, but the common "required output can't be empty" workaround
is explicitly not a sufficient reason.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: replace migrate_existing_skills sentinel file with empty list
The step previously directed the agent to write a .deepwork/tmp/migrated_skills/NONE.md
sentinel file as a workaround for "required file_path output can't be empty" — exactly
the anti-pattern the new no-sentinel-files DeepSchema requirement added in a4dc74c
prohibits. Verified the MCP validation accepts empty lists for required file_path
outputs (no minimum-length check in src/deepwork/jobs/mcp/tools.py), so the sentinel
workaround was never necessary.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: restore reference to example review prompt files
The previous consolidation commit (1994f94) removed the duplicated rule-YAML
blocks but also removed the pointers to plugins/claude/example_reviews/*.md,
which contain the full detailed prompts that the inline YAML condenses. Those
pointers are legitimately useful — they tell an agent writing condensed inline
versions where to read for tone, intent, and checklist context.
Restored as a "Reference material" section that clearly resolves the original
inline-vs-file-based contradiction: always emit the inline form (target
projects don't have the example files), and use the example files only as
reference when deciding what the condensed inline text should say.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: soften review-strategy-matches-criteria-scope wording
The previous wording forbade any cross-file reasoning from `strategy:
individual`, which would disqualify legitimate cases like a Python code review
rule where the reviewer may need to consult other project files (imports,
references, related code, conventions) while evaluating a single changed file.
Reworded so the distinction is about whether the reviewer needs to look at the
OTHER CHANGED FILES in the same review set, not whether they need to look at
any other file at all. Individual is appropriate when focus is heavily on each
file and the reviewer is unlikely to need to see the other changed files;
matches_together is for criteria that reason about the set as a whole
(coverage, deduplication, consistency across the set).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: use RFC 2119 keywords in review-strategy-matches-criteria-scope
Restructured the requirement to use SHOULD/MAY/MUST NOT explicitly, matching
the RFC 2119 style of the other requirements in this schema. The substantive
guidance is unchanged: individual is preferred when focus is on each file and
the reviewer is unlikely to need to see the other changed files (consulting
unchanged project files is explicitly allowed as MAY); matches_together is
preferred when changed files need to be looked at alongside each other; and
individual is a hard MUST NOT when any criterion is a property of the set of
changed files as a whole.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: broaden deepschema matchers to **/deepschema.yml
The meta-DeepSchema governing deepschema files previously only matched
.deepwork/schemas/*/deepschema.yml and **/.deepschema.*.yml, which missed
the project's own standard schemas in src/deepwork/standard_schemas/ —
they were exempt from the rules they define for users.
Consolidated both hard-coded directory matchers into a single generic
**/deepschema.yml pattern that:
- Covers .deepwork/schemas/*/deepschema.yml (user-created named schemas)
- Covers src/deepwork/standard_schemas/*/deepschema.yml (built-in schemas)
- Covers any other location a user might put a deepschema.yml
- Self-matches the meta-schema itself, which is fine — it conforms to
its own requirements
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 c6fa066 commit b872dc9
5 files changed
Lines changed: 45 additions & 95 deletions
File tree
- src/deepwork
- standard_jobs/deepwork_reviews
- standard_schemas
- deepschema
- job_yml
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | 372 | | |
413 | 373 | | |
414 | 374 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
| 52 | + | |
55 | 53 | | |
56 | | - | |
| 54 | + | |
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 58 | + | |
93 | 59 | | |
94 | | - | |
| 60 | + | |
95 | 61 | | |
96 | | - | |
| 62 | + | |
97 | 63 | | |
98 | 64 | | |
99 | 65 | | |
100 | 66 | | |
101 | 67 | | |
102 | 68 | | |
103 | 69 | | |
104 | | - | |
| 70 | + | |
105 | 71 | | |
106 | 72 | | |
107 | 73 | | |
| |||
144 | 110 | | |
145 | 111 | | |
146 | 112 | | |
147 | | - | |
| 113 | + | |
148 | 114 | | |
149 | 115 | | |
150 | 116 | | |
| |||
175 | 141 | | |
176 | 142 | | |
177 | 143 | | |
178 | | - | |
| 144 | + | |
179 | 145 | | |
180 | 146 | | |
181 | 147 | | |
| |||
267 | 233 | | |
268 | 234 | | |
269 | 235 | | |
270 | | - | |
| 236 | + | |
271 | 237 | | |
272 | 238 | | |
273 | 239 | | |
| |||
347 | 313 | | |
348 | 314 | | |
349 | 315 | | |
350 | | - | |
| 316 | + | |
351 | 317 | | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
358 | 322 | | |
359 | 323 | | |
360 | 324 | | |
| |||
905 | 869 | | |
906 | 870 | | |
907 | 871 | | |
908 | | - | |
909 | | - | |
| 872 | + | |
910 | 873 | | |
911 | 874 | | |
912 | 875 | | |
913 | | - | |
914 | 876 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
79 | 94 | | |
80 | 95 | | |
81 | 96 | | |
| |||
129 | 144 | | |
130 | 145 | | |
131 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
132 | 161 | | |
133 | 162 | | |
134 | 163 | | |
| |||
0 commit comments