Repository navigation
Expand file tree
/
Copy pathgovernance-rules.json
More file actions
194 lines (194 loc) · 5.73 KB
/
Copy pathgovernance-rules.json
File metadata and controls
194 lines (194 loc) · 5.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
{
"version": "1.0.0",
"description": "Governance audit rules configuration for LightSpeed .github",
"auditRules": [
{
"id": "label-prefix-validation",
"name": "Label Prefix Validation",
"description": "Ensures all labels in .github/labels.yml include required prefix (type:, status:, priority:, area:, meta:)",
"enabled": true,
"severity": "HIGH",
"file": ".github/labels.yml",
"validation": {
"type": "label-prefix",
"requiredPrefixes": ["ai-ops:", "area:", "comp:", "compat:", "contrib:", "cpt:", "discussion:", "env:", "lang:", "meta:", "openspec:", "priority:", "release:", "status:", "type:"],
"pattern": "^[a-z-]+:[a-z0-9-]+$"
}
},
{
"id": "label-documented-purpose",
"name": "Label Documented Purpose",
"description": "Verifies each label has a documented purpose in YAML comment above definition",
"enabled": true,
"severity": "MEDIUM",
"file": ".github/labels.yml",
"validation": {
"type": "documented-purpose",
"requireComment": true,
"maxCommentLength": 100
}
},
{
"id": "label-active-usage",
"name": "Label Active Usage Detection",
"description": "Detects if label is used in templates, workflows, or specifications",
"enabled": true,
"severity": "MEDIUM",
"file": ".github/labels.yml",
"validation": {
"type": "active-usage",
"checkTemplates": true,
"checkWorkflows": true,
"checkSpecifications": true,
"templatePaths": [
".github/ISSUE_TEMPLATE/",
".github/PULL_REQUEST_TEMPLATE/"
],
"workflowPaths": [".github/workflows/"],
"specPaths": [".github/specs/"]
}
},
{
"id": "label-duplicate-detection",
"name": "Duplicate Label Detection",
"description": "Identifies labels with similar meanings or near-duplicate names",
"enabled": true,
"severity": "HIGH",
"file": ".github/labels.yml",
"validation": {
"type": "duplicate-detection",
"algorithm": "semantic-similarity",
"thresholdPercent": 75
}
},
{
"id": "issue-type-usage",
"name": "Issue Type Usage Validation",
"description": "Verifies all issue types in .github/issue-types.yml are used in at least one template",
"enabled": true,
"severity": "MEDIUM",
"file": ".github/issue-types.yml",
"validation": {
"type": "usage-check",
"templatePaths": [".github/ISSUE_TEMPLATE/"]
}
},
{
"id": "template-content-validation",
"name": "Template Content Validation",
"description": "Checks template content for UK English spelling, WCAG 2.2 AA guidance, and no implementation details",
"enabled": true,
"severity": "MEDIUM",
"file": ".github/ISSUE_TEMPLATE/",
"validation": {
"type": "template-content",
"checkSpelling": "uk-english",
"checkAccessibility": "wcag2.2-aa",
"forbiddenPatterns": ["TODO", "FIXME", "HACK", "XXX"]
}
},
{
"id": "pr-template-routing",
"name": "PR Template Routing Validation",
"description": "Verifies each branch prefix maps to exactly one PR template and mapping is documented",
"enabled": true,
"severity": "HIGH",
"file": ".github/PULL_REQUEST_TEMPLATE/",
"validation": {
"type": "routing-validation",
"configPath": ".github/PULL_REQUEST_TEMPLATE/config.yml",
"branchTypes": [
"feat",
"fix",
"hotfix",
"release",
"refactor",
"chore",
"task",
"doc",
"docs",
"test",
"perf",
"ci",
"build",
"deps",
"security",
"design",
"a11y",
"ux",
"i18n",
"ops",
"proto",
"ds",
"api",
"schema",
"telemetry",
"content",
"seo",
"config",
"migrate",
"qa",
"uat",
"audit",
"codex",
"revert",
"research",
"automation",
"epic",
"aiops"
]
}
},
{
"id": "yaml-syntax-validation",
"name": "YAML Syntax Validation",
"description": "Validates YAML syntax and required field presence in governance files",
"enabled": true,
"severity": "CRITICAL",
"file": ".github/labels.yml",
"validation": {
"type": "yaml-syntax",
"requiredFields": ["name", "color", "description"],
"reportLineNumbers": true
}
}
],
"compliance": {
"compliancePercentageFormula": "(rulesPassedCount / totalRulesCount) * 100",
"thresholdPercent": 95,
"severityWeights": {
"CRITICAL": 10,
"HIGH": 5,
"MEDIUM": 2,
"LOW": 1
}
},
"reporting": {
"outputFormats": ["json", "markdown"],
"outputDirectory": ".github/reports",
"reportFilePattern": "audit-{YYYYMMDD}-{HHMMSS}",
"retentionDays": 90,
"summarizeAfterDays": 30
},
"performance": {
"targetAuditDurationSeconds": 30,
"targetValidationDurationSeconds": 2,
"targetReportGenerationSeconds": 5
},
"constitution": {
"source": ".specify/memory/constitution.md",
"alignmentCheckEnabled": true,
"principles": [
"organisation-wide-governance-authority",
"curated-assets-locked-governance",
"clear-asset-boundaries",
"technology-agnostic-guidance",
"branch-naming-strategy",
"uk-english-accessibility-security",
"specification-quality-standards",
"branch-strategy-compliance",
"requirements-driven-quality",
"automated-validation-metrics"
]
}
}