Skip to content

Commit 20aa3ab

Browse files
nhortonclaude
andcommitted
fix: remove redundant anonymous schema ref from review_bridge
The matcher now inlines the file under review for all individual-strategy reviews (REVIEW-REQ-004.3.5), which covers anonymous schema governed files generically. The bridge-level addition was redundant and would have caused the governed file to appear twice in "Relevant File Contents". DW-REQ-011.11.7 marked as removed, superseded by REVIEW-REQ-004.3.5. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e6696f4 commit 20aa3ab

2 files changed

Lines changed: 5 additions & 15 deletions

File tree

specs/deepwork/DW-REQ-011-deepschema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,4 @@ The DeepSchema system provides rich, file-level schemas with automatic validatio
8686
4. The order of inlined reference files MUST be deterministic across runs for a given schema.
8787
5. When a referenced file cannot be located on disk, the bridge MUST skip it and surface an error through the `errors` return of `generate_review_rules`. A missing reference file MUST NOT prevent the rule from being generated.
8888
6. Reference entries whose `path` begins with `http://` or `https://` MUST be skipped without producing an error, since they are informational pointers rather than local files.
89-
7. For anonymous schemas, the bridge MUST include the governed target file (the sibling file derived from the schema filename) as a reference file so the reviewer has its contents available without a separate lookup.
89+
7. (OPTIONAL — REQUIREMENT REMOVED, superseded by REVIEW-REQ-004.3.5.)

src/deepwork/deepschema/review_bridge.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -189,20 +189,10 @@ def _add(raw_path: str, description: str | None, source_field: str) -> None:
189189
)
190190
)
191191

192-
# For anonymous schemas, include the governed target file so the
193-
# reviewer can validate requirements against the actual file content
194-
# without needing a separate lookup. (DW-REQ-011.11.7)
195-
if schema.schema_type == "anonymous":
196-
target_name = anonymous_target_filename(schema.source_path.name)
197-
target_path = (schema_dir / target_name).resolve()
198-
if target_path.exists():
199-
refs.append(
200-
ReferenceFile(
201-
path=target_path,
202-
relative_label=target_name,
203-
description=f"Target file governed by this schema",
204-
)
205-
)
192+
# Note: The governed target file for anonymous schemas is NOT added
193+
# here — the matcher inlines the file under review as a ReferenceFile
194+
# for all individual-strategy reviews (REVIEW-REQ-004.3.5), which
195+
# covers the same case without duplication.
206196

207197
# Note: schema.examples are intentionally NOT inlined — they are listed
208198
# in the instructions via _build_examples_section so reviewers know they

0 commit comments

Comments
 (0)