@valentia-ai-skills/framework 2.0.7 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +150 -6
- package/bin/cli.js +772 -56
- package/bin/code-audit-config.mjs +323 -0
- package/package.json +1 -1
- package/skills/global/aisupportapp-project-architecture/SKILL.md +1 -1
- package/skills/global/aisupportapp-project-conventions/SKILL.md +1 -1
- package/skills/global/aisupportapp-project-workflows/SKILL.md +1 -1
- package/skills/global/api-design/SKILL.md +1 -1
- package/skills/global/appointment-oas-app/SKILL.md +1 -1
- package/skills/global/code-quality-auditor/SKILL.md +704 -0
- package/skills/global/code-standards/SKILL.md +1 -1
- package/skills/global/codebase-legacy-intelligence/SKILL.md +1 -1
- package/skills/global/legacy-api-converter/SKILL.md +979 -0
- package/skills/global/legacy-redevelopment-planner/SKILL.md +622 -0
- package/skills/global/observability-integrations/SKILL.md +835 -0
- package/skills/global/project-scanner/SKILL.md +1 -1
- package/skills/global/ui-replication-engine/SKILL.md +591 -0
- package/skills/global/aisupportapp-test-installation/SKILL.md +0 -32
- package/skills/global/viteapp-core-workflows/SKILL.md +0 -32
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
const DOCUMENT_DEFINITIONS = [
|
|
2
|
+
{
|
|
3
|
+
documentType: 'overview',
|
|
4
|
+
label: 'Overview',
|
|
5
|
+
category: 'overview',
|
|
6
|
+
tabLabel: 'Overview',
|
|
7
|
+
fileNames: ['CODE_AUDIT_OVERVIEW.md', 'OVERVIEW.md'],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
documentType: 'security',
|
|
11
|
+
label: 'Security',
|
|
12
|
+
category: 'audit-report',
|
|
13
|
+
tabLabel: 'Security',
|
|
14
|
+
fileNames: ['SECURITY_AUDIT.md'],
|
|
15
|
+
scoreKey: 'security',
|
|
16
|
+
weight: 20,
|
|
17
|
+
includeInDashboard: true,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
documentType: 'error_handling',
|
|
21
|
+
label: 'Error Handling',
|
|
22
|
+
category: 'audit-report',
|
|
23
|
+
tabLabel: 'Error Handling',
|
|
24
|
+
fileNames: ['ERROR_HANDLING.md'],
|
|
25
|
+
scoreKey: 'error_handling',
|
|
26
|
+
weight: 12,
|
|
27
|
+
includeInDashboard: true,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
documentType: 'correctness',
|
|
31
|
+
label: 'Correctness',
|
|
32
|
+
category: 'audit-report',
|
|
33
|
+
tabLabel: 'Correctness',
|
|
34
|
+
fileNames: ['CORRECTNESS.md'],
|
|
35
|
+
scoreKey: 'correctness',
|
|
36
|
+
weight: 12,
|
|
37
|
+
includeInDashboard: true,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
documentType: 'crash_risk',
|
|
41
|
+
label: 'Crash Risk',
|
|
42
|
+
category: 'audit-report',
|
|
43
|
+
tabLabel: 'Crash Risk',
|
|
44
|
+
fileNames: ['CRASH_RISK.md'],
|
|
45
|
+
scoreKey: 'crash_risk',
|
|
46
|
+
weight: 10,
|
|
47
|
+
includeInDashboard: true,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
documentType: 'code_quality',
|
|
51
|
+
label: 'Code Quality',
|
|
52
|
+
category: 'audit-report',
|
|
53
|
+
tabLabel: 'Code Quality',
|
|
54
|
+
fileNames: ['CODE_QUALITY.md'],
|
|
55
|
+
scoreKey: 'code_quality',
|
|
56
|
+
weight: 8,
|
|
57
|
+
includeInDashboard: true,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
documentType: 'standards',
|
|
61
|
+
label: 'Standards',
|
|
62
|
+
category: 'audit-report',
|
|
63
|
+
tabLabel: 'Standards',
|
|
64
|
+
fileNames: ['STANDARDS.md'],
|
|
65
|
+
scoreKey: 'standards',
|
|
66
|
+
weight: 8,
|
|
67
|
+
includeInDashboard: true,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
documentType: 'performance',
|
|
71
|
+
label: 'Performance',
|
|
72
|
+
category: 'audit-report',
|
|
73
|
+
tabLabel: 'Performance',
|
|
74
|
+
fileNames: ['PERFORMANCE.md'],
|
|
75
|
+
scoreKey: 'performance',
|
|
76
|
+
weight: 7,
|
|
77
|
+
includeInDashboard: true,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
documentType: 'maintainability',
|
|
81
|
+
label: 'Maintainability',
|
|
82
|
+
category: 'audit-report',
|
|
83
|
+
tabLabel: 'Maintainability',
|
|
84
|
+
fileNames: ['MAINTAINABILITY.md'],
|
|
85
|
+
scoreKey: 'maintainability',
|
|
86
|
+
weight: 7,
|
|
87
|
+
includeInDashboard: true,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
documentType: 'dependency_health',
|
|
91
|
+
label: 'Dependencies',
|
|
92
|
+
category: 'audit-report',
|
|
93
|
+
tabLabel: 'Dependencies',
|
|
94
|
+
fileNames: ['DEPENDENCY_HEALTH.md'],
|
|
95
|
+
scoreKey: 'dependency_health',
|
|
96
|
+
weight: 5,
|
|
97
|
+
includeInDashboard: true,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
documentType: 'accessibility',
|
|
101
|
+
label: 'Accessibility',
|
|
102
|
+
category: 'audit-report',
|
|
103
|
+
tabLabel: 'Accessibility',
|
|
104
|
+
fileNames: ['ACCESSIBILITY.md'],
|
|
105
|
+
scoreKey: 'accessibility',
|
|
106
|
+
weight: 4,
|
|
107
|
+
includeInDashboard: true,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
documentType: 'test_coverage',
|
|
111
|
+
label: 'Tests',
|
|
112
|
+
category: 'audit-report',
|
|
113
|
+
tabLabel: 'Tests',
|
|
114
|
+
fileNames: ['TEST_COVERAGE.md'],
|
|
115
|
+
scoreKey: 'test_coverage',
|
|
116
|
+
weight: 4,
|
|
117
|
+
includeInDashboard: true,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
documentType: 'architecture',
|
|
121
|
+
label: 'Architecture',
|
|
122
|
+
category: 'audit-report',
|
|
123
|
+
tabLabel: 'Architecture',
|
|
124
|
+
fileNames: ['ARCHITECTURE.md'],
|
|
125
|
+
scoreKey: 'architecture',
|
|
126
|
+
weight: 3,
|
|
127
|
+
includeInDashboard: true,
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
documentType: 'framework_review',
|
|
131
|
+
label: 'Framework',
|
|
132
|
+
category: 'audit-report',
|
|
133
|
+
tabLabel: 'Framework',
|
|
134
|
+
fileNames: ['FRAMEWORK_REVIEW.md'],
|
|
135
|
+
scoreKey: 'framework_review',
|
|
136
|
+
weight: 0,
|
|
137
|
+
includeInDashboard: false,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
documentType: 'remediation_plan',
|
|
141
|
+
label: 'Remediation',
|
|
142
|
+
category: 'plan',
|
|
143
|
+
tabLabel: 'Remediation',
|
|
144
|
+
fileNames: ['REMEDIATION_PLAN.md'],
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
documentType: 'manifest',
|
|
148
|
+
label: 'Manifest',
|
|
149
|
+
category: 'meta',
|
|
150
|
+
tabLabel: 'Manifest',
|
|
151
|
+
fileNames: ['manifest.json'],
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
documentType: 'diagram',
|
|
155
|
+
label: 'Diagram',
|
|
156
|
+
category: 'diagram',
|
|
157
|
+
tabLabel: 'Diagrams',
|
|
158
|
+
fileNames: [],
|
|
159
|
+
},
|
|
160
|
+
]
|
|
161
|
+
|
|
162
|
+
export const CODE_AUDIT_DOCUMENTS = DOCUMENT_DEFINITIONS
|
|
163
|
+
|
|
164
|
+
export const CODE_AUDIT_SEVERITIES = ['critical', 'high', 'medium', 'low']
|
|
165
|
+
|
|
166
|
+
export const CODE_AUDIT_STATUS_OPTIONS = [
|
|
167
|
+
'uploaded',
|
|
168
|
+
'reviewed',
|
|
169
|
+
'action_required',
|
|
170
|
+
'resolved',
|
|
171
|
+
]
|
|
172
|
+
|
|
173
|
+
export const CODE_AUDIT_SCORE_BANDS = [
|
|
174
|
+
{
|
|
175
|
+
grade: 'A',
|
|
176
|
+
min: 90,
|
|
177
|
+
label: 'Excellent',
|
|
178
|
+
chartColor: '#22c55e',
|
|
179
|
+
barClass: 'bg-success',
|
|
180
|
+
textClass: 'text-success',
|
|
181
|
+
borderClass: 'border-success/30',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
grade: 'B',
|
|
185
|
+
min: 75,
|
|
186
|
+
label: 'Strong',
|
|
187
|
+
chartColor: '#3b82f6',
|
|
188
|
+
barClass: 'bg-blue-500',
|
|
189
|
+
textClass: 'text-blue-400',
|
|
190
|
+
borderClass: 'border-blue-500/30',
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
grade: 'C',
|
|
194
|
+
min: 60,
|
|
195
|
+
label: 'Needs Work',
|
|
196
|
+
chartColor: '#eab308',
|
|
197
|
+
barClass: 'bg-warning',
|
|
198
|
+
textClass: 'text-warning',
|
|
199
|
+
borderClass: 'border-warning/30',
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
grade: 'D',
|
|
203
|
+
min: 40,
|
|
204
|
+
label: 'Action Required',
|
|
205
|
+
chartColor: '#f97316',
|
|
206
|
+
barClass: 'bg-orange-500',
|
|
207
|
+
textClass: 'text-orange-400',
|
|
208
|
+
borderClass: 'border-orange-500/30',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
grade: 'F',
|
|
212
|
+
min: 0,
|
|
213
|
+
label: 'Critical',
|
|
214
|
+
chartColor: '#ef4444',
|
|
215
|
+
barClass: 'bg-danger',
|
|
216
|
+
textClass: 'text-danger',
|
|
217
|
+
borderClass: 'border-danger/30',
|
|
218
|
+
},
|
|
219
|
+
]
|
|
220
|
+
|
|
221
|
+
export const CODE_AUDIT_SEVERITY_STYLES = {
|
|
222
|
+
critical: {
|
|
223
|
+
badgeClass: 'bg-danger/15 text-danger border border-danger/30',
|
|
224
|
+
cardClass: 'bg-danger/5 border-danger/30',
|
|
225
|
+
label: 'Critical',
|
|
226
|
+
},
|
|
227
|
+
high: {
|
|
228
|
+
badgeClass: 'bg-orange-500/15 text-orange-300 border border-orange-500/30',
|
|
229
|
+
cardClass: 'bg-orange-500/5 border-orange-500/30',
|
|
230
|
+
label: 'High',
|
|
231
|
+
},
|
|
232
|
+
medium: {
|
|
233
|
+
badgeClass: 'bg-warning/15 text-warning border border-warning/30',
|
|
234
|
+
cardClass: 'bg-warning/5 border-warning/30',
|
|
235
|
+
label: 'Medium',
|
|
236
|
+
},
|
|
237
|
+
low: {
|
|
238
|
+
badgeClass: 'bg-surface-elevated text-text-secondary border border-border',
|
|
239
|
+
cardClass: 'bg-surface-elevated border-border',
|
|
240
|
+
label: 'Low',
|
|
241
|
+
},
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export const CODE_AUDIT_DOCUMENT_MAP = Object.fromEntries(
|
|
245
|
+
CODE_AUDIT_DOCUMENTS.map((definition, index) => [
|
|
246
|
+
definition.documentType,
|
|
247
|
+
{ ...definition, order: index },
|
|
248
|
+
]),
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
const FILE_NAME_MAP = {}
|
|
252
|
+
for (const definition of CODE_AUDIT_DOCUMENTS) {
|
|
253
|
+
for (const fileName of definition.fileNames) {
|
|
254
|
+
FILE_NAME_MAP[fileName.toLowerCase()] = definition.documentType
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export function slugifyCodeAuditValue(value) {
|
|
259
|
+
return String(value || '')
|
|
260
|
+
.trim()
|
|
261
|
+
.toLowerCase()
|
|
262
|
+
.replace(/\.[^.]+$/, '')
|
|
263
|
+
.replace(/[^a-z0-9]+/g, '_')
|
|
264
|
+
.replace(/^_+|_+$/g, '')
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export function titleizeCodeAuditValue(value) {
|
|
268
|
+
return String(value || '')
|
|
269
|
+
.replace(/\.[^.]+$/, '')
|
|
270
|
+
.replace(/[_-]+/g, ' ')
|
|
271
|
+
.replace(/\s+/g, ' ')
|
|
272
|
+
.trim()
|
|
273
|
+
.replace(/\b\w/g, (char) => char.toUpperCase())
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export function normalizeCodeAuditDocumentType(value) {
|
|
277
|
+
const normalized = slugifyCodeAuditValue(value)
|
|
278
|
+
return normalized || 'document'
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export function inferCodeAuditDocumentType(fileName) {
|
|
282
|
+
const normalizedFileName = String(fileName || '').trim().toLowerCase()
|
|
283
|
+
if (!normalizedFileName) return 'document'
|
|
284
|
+
|
|
285
|
+
if (FILE_NAME_MAP[normalizedFileName]) {
|
|
286
|
+
return FILE_NAME_MAP[normalizedFileName]
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
if (/\.(mmd|mermaid)$/i.test(normalizedFileName)) {
|
|
290
|
+
return 'diagram'
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return normalizeCodeAuditDocumentType(normalizedFileName)
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export function getCodeAuditDocumentConfig(documentType) {
|
|
297
|
+
return CODE_AUDIT_DOCUMENT_MAP[normalizeCodeAuditDocumentType(documentType)] || null
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
export function inferCodeAuditDocumentCategory(documentType) {
|
|
301
|
+
return getCodeAuditDocumentConfig(documentType)?.category || 'meta'
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export function getCodeAuditScoreBand(score) {
|
|
305
|
+
const numericScore = Number(score ?? 0)
|
|
306
|
+
return CODE_AUDIT_SCORE_BANDS.find((band) => numericScore >= band.min) || CODE_AUDIT_SCORE_BANDS[CODE_AUDIT_SCORE_BANDS.length - 1]
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export function gradeFromCodeAuditScore(score) {
|
|
310
|
+
return getCodeAuditScoreBand(score).grade
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export function statusFromCodeAuditGrade(grade) {
|
|
314
|
+
return grade === 'D' || grade === 'F' ? 'action_required' : 'uploaded'
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export function getCodeAuditDashboardDefinitions() {
|
|
318
|
+
return CODE_AUDIT_DOCUMENTS.filter((definition) => definition.includeInDashboard)
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export function getCodeAuditTabDefinitions() {
|
|
322
|
+
return CODE_AUDIT_DOCUMENTS.filter((definition) => definition.documentType !== 'manifest' && definition.documentType !== 'diagram')
|
|
323
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valentia-ai-skills/framework",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "AI development skills framework centralized coding standards, security patterns, and SOPs for AI-assisted development. Works with Claude Code, Cursor, Copilot, Windsurf, and any AI coding tool.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-skills",
|