Skip to content

Commit 7b5d732

Browse files
committed
ci: strengthen repository verifier
1 parent 87755b3 commit 7b5d732

1 file changed

Lines changed: 41 additions & 7 deletions

File tree

scripts/verify_repo.py

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,61 @@
1111
'VERSIONING.md',
1212
'CHANGELOG.md',
1313
'CODEOWNERS',
14+
'.github/PULL_REQUEST_TEMPLATE.md',
15+
'.github/workflows/ci-docs.yml',
16+
'.github/workflows/sync-wiki.yml',
1417
'docs/methodology/continuous-improvement-loop.md',
18+
'docs/methodology/definition-of-done.md',
1519
'docs/diagrams/README.md',
1620
'docs/loops/feature.md',
21+
'docs/loops/bugfix-loop.md',
22+
'docs/loops/release.md',
23+
'docs/verifiers/README.md',
1724
'prompts/master-system-prompt.md',
1825
'prompts/chatgpt-web.md',
26+
'prompts/continuous-improvement.md',
1927
'wiki/Home.md',
28+
'wiki/Loops.md',
29+
'wiki/Prompts.md',
30+
'wiki/Releases.md',
31+
'wiki/Verifiers.md',
2032
]
2133

34+
REQUIRED_MERMAID = [
35+
'docs/methodology/continuous-improvement-loop.md',
36+
'docs/methodology/definition-of-done.md',
37+
'docs/diagrams/README.md',
38+
'docs/loops/feature.md',
39+
'docs/loops/release.md',
40+
'wiki/Home.md',
41+
]
42+
43+
44+
def fail(title, items):
45+
if items:
46+
print(title)
47+
for item in items:
48+
print('-', item)
49+
raise SystemExit(1)
50+
51+
2252
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)
53+
fail('Missing required files:', missing)
2854

2955
markdown = list(ROOT.rglob('*.md'))
56+
without_title = []
3057
for path in markdown:
3158
text = path.read_text(encoding='utf-8')
3259
if not text.lstrip().startswith('#'):
33-
print('Markdown file without title:', path.relative_to(ROOT))
34-
raise SystemExit(1)
60+
without_title.append(str(path.relative_to(ROOT)))
61+
fail('Markdown files without title:', without_title)
62+
63+
without_mermaid = []
64+
for p in REQUIRED_MERMAID:
65+
if '```mermaid' not in (ROOT / p).read_text(encoding='utf-8'):
66+
without_mermaid.append(p)
67+
fail('Required diagram docs without Mermaid:', without_mermaid)
3568

3669
print('Repository structure OK')
70+
print('Required files checked:', len(REQUIRED))
3771
print('Markdown files checked:', len(markdown))

0 commit comments

Comments
 (0)