Skip to content

Commit 5cb7ca4

Browse files
committed
ci: add repository structure verifier
1 parent 560df29 commit 5cb7ca4

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

scripts/verify_repo.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
from pathlib import Path
2+
3+
ROOT = Path(__file__).resolve().parents[1]
4+
5+
REQUIRED = [
6+
'README.md',
7+
'CONTRIBUTING.md',
8+
'CODE_OF_CONDUCT.md',
9+
'SECURITY.md',
10+
'GOVERNANCE.md',
11+
'VERSIONING.md',
12+
'CHANGELOG.md',
13+
'CODEOWNERS',
14+
'docs/methodology/continuous-improvement-loop.md',
15+
'docs/diagrams/README.md',
16+
'docs/loops/feature.md',
17+
'prompts/master-system-prompt.md',
18+
'prompts/chatgpt-web.md',
19+
'wiki/Home.md',
20+
]
21+
22+
missing = [p for p in REQUIRED if not (ROOT / p).exists()]
23+
if missing:
24+
print('Missing required files:')
25+
for item in missing:
26+
print(item)
27+
raise SystemExit(1)
28+
29+
markdown = list(ROOT.rglob('*.md'))
30+
for path in markdown:
31+
text = path.read_text(encoding='utf-8')
32+
if not text.lstrip().startswith('#'):
33+
print('Markdown file without title:', path.relative_to(ROOT))
34+
raise SystemExit(1)
35+
36+
print('Repository structure OK')
37+
print('Markdown files checked:', len(markdown))

0 commit comments

Comments
 (0)