Skip to content

Commit 1b1e7ae

Browse files
tbitcsoz-agent
andcommitted
fix: audit finds architecture docs in subdirectories
The auditor only checked for docs/architecture.md exactly. Projects like cpsc-engine-rtl have architecture at docs/architecture/DESIGN.md or similar paths. Now globs docs/**/architecture* and ARCHITECTURE*. Filed #49 for interactive architecture generation (specsmith architect). Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent bbfbc68 commit 1b1e7ae

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

src/specsmith/auditor.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,18 @@ def check_governance_files(root: Path) -> list[AuditResult]:
120120

121121
for f in RECOMMENDED_FILES:
122122
path = root / f
123+
found = path.exists()
124+
# For architecture.md, also search subdirectories (e.g. docs/architecture/*.md)
125+
if not found and "architecture" in f:
126+
found = bool(
127+
list((root / "docs").glob("**/architecture*"))
128+
+ list((root / "docs").glob("**/ARCHITECTURE*"))
129+
) if (root / "docs").is_dir() else False
123130
results.append(
124131
AuditResult(
125132
name=f"recommended:{f}",
126-
passed=path.exists(),
127-
message=f"Recommended file {f} {'exists' if path.exists() else 'missing'}",
133+
passed=found,
134+
message=f"Recommended file {f} {'exists' if found else 'missing'}",
128135
)
129136
)
130137

0 commit comments

Comments
 (0)