File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 ))
You can’t perform that action at this time.
0 commit comments