pumuki 6.3.375 → 6.3.376
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.
|
@@ -235,6 +235,109 @@ const STUDY_BEFORE_DETECTOR_RULE_IDS = new Set<string>([
|
|
|
235
235
|
const requiresStudyBeforeDetector = (rule: SkillsCompiledRule): boolean =>
|
|
236
236
|
STUDY_BEFORE_DETECTOR_RULE_IDS.has(rule.id);
|
|
237
237
|
|
|
238
|
+
const IOS_POSITIVE_CODE_GUIDANCE_PATTERNS: ReadonlyArray<RegExp> = [
|
|
239
|
+
/\basyncsequence\b/,
|
|
240
|
+
/\basyncstream\b/,
|
|
241
|
+
/\bcopy[-\s]on[-\s]write\b/,
|
|
242
|
+
/\bequatable[-\s]hashable\b/,
|
|
243
|
+
/\bnil[-\s]coalescing\b/,
|
|
244
|
+
/\bnumberformatter\b/,
|
|
245
|
+
/\boperators[-\s]map[-\s]filter[-\s]flatmap\b/,
|
|
246
|
+
/\boptional[-\s]chaining\b/,
|
|
247
|
+
/\bresult[-\s]builders?\b/,
|
|
248
|
+
/\bcustom[-\s]view[-\s]modifiers?\b.*\breutilizar\b/,
|
|
249
|
+
/\bdeclarativo\b.*\bui\b/,
|
|
250
|
+
/\bequatable[-\s]views?\b/,
|
|
251
|
+
/\bextensions?\b.*\bagrupar\b.*\bfuncionalidad\b/,
|
|
252
|
+
/\bfactory[-\s]pattern\b/,
|
|
253
|
+
/\bif[-\s]let\b.*\bunwrap\b/,
|
|
254
|
+
/\binmutabilidad\b.*\blet\b.*\bvar\b/,
|
|
255
|
+
/\bmark\b.*\borganizar\b.*\bco[-\s]?digo\b/,
|
|
256
|
+
/\bmemoization\b/,
|
|
257
|
+
/\bmvvm\b.*\b(viewmodel|swiftui|combine)\b/,
|
|
258
|
+
/\bpage[-\s]object[-\s]pattern\b/,
|
|
259
|
+
/\bpreferencekeys?\b/,
|
|
260
|
+
/\bpreferences\b.*\bchild[-\s]parent\b/,
|
|
261
|
+
/\bprotocol[-\s]extensions?\b/,
|
|
262
|
+
/\bprotocols[-\s]over[-\s]inheritance\b/,
|
|
263
|
+
/\bpublished\b.*\bviewmodels?\b.*\bbinding\b/,
|
|
264
|
+
/\bstruct\b.*\bclass\b.*\bidentity\b/,
|
|
265
|
+
/\buse[-\s]cases?\b.*\b[A-Za-z0-9_]*usecase\b/,
|
|
266
|
+
/\bviewmodels?[-\s]por[-\s]pantalla\b/,
|
|
267
|
+
/\bviewmodifiers?[-\s]nativos?\b/,
|
|
268
|
+
/\bviewthatfits\b/,
|
|
269
|
+
/\bviper\b.*\boverkill\b/,
|
|
270
|
+
];
|
|
271
|
+
|
|
272
|
+
const IOS_AUDITED_POSITIVE_LANGUAGE_GUIDANCE_PATTERNS: ReadonlyArray<RegExp> = [
|
|
273
|
+
/\basyncsequence\b/,
|
|
274
|
+
/\basyncstream\b/,
|
|
275
|
+
/\bcopy[-\s]on[-\s]write\b/,
|
|
276
|
+
/\bequatable[-\s]hashable\b/,
|
|
277
|
+
/\bnil[-\s]coalescing\b/,
|
|
278
|
+
/\bnumberformatter\b/,
|
|
279
|
+
/\boperators[-\s]map[-\s]filter[-\s]flatmap\b/,
|
|
280
|
+
/\boptional[-\s]chaining\b/,
|
|
281
|
+
/\bpublishers[-\s]asyncsequence\b/,
|
|
282
|
+
/\bresult[-\s]builders?\b/,
|
|
283
|
+
];
|
|
284
|
+
|
|
285
|
+
const IOS_AUDITED_POSITIVE_ARCHITECTURE_STYLE_GUIDANCE_PATTERNS: ReadonlyArray<RegExp> = [
|
|
286
|
+
/\bcustom[-\s]view[-\s]modifiers?\b.*\breutilizar\b/,
|
|
287
|
+
/\bdeclarativo\b.*\bui\b/,
|
|
288
|
+
/\bequatable[-\s]views?\b/,
|
|
289
|
+
/\bextensions?\b.*\bagrupar\b.*\bfuncionalidad\b/,
|
|
290
|
+
/\bfactory[-\s]pattern\b/,
|
|
291
|
+
/\bif[-\s]let\b.*\bunwrap\b/,
|
|
292
|
+
/\binmutabilidad\b.*\blet\b.*\bvar\b/,
|
|
293
|
+
/\bmark\b.*\borganizar\b.*\bco[-\s]?digo\b/,
|
|
294
|
+
/\bmemoization\b/,
|
|
295
|
+
/\bmvvm\b.*\b(viewmodel|swiftui|combine)\b/,
|
|
296
|
+
/\bpage[-\s]object[-\s]pattern\b/,
|
|
297
|
+
/\bpreferencekeys?\b/,
|
|
298
|
+
/\bpreferences\b.*\bchild[-\s]parent\b/,
|
|
299
|
+
/\bprotocol[-\s]extensions?\b/,
|
|
300
|
+
/\bprotocols[-\s]over[-\s]inheritance\b/,
|
|
301
|
+
/\bpublished\b.*\bviewmodels?\b.*\bbinding\b/,
|
|
302
|
+
/\bstruct\b.*\bclass\b.*\bidentity\b/,
|
|
303
|
+
/\buse[-\s]cases?\b.*\b[A-Za-z0-9_]*usecase\b/,
|
|
304
|
+
/\bviewmodels?[-\s]por[-\s]pantalla\b/,
|
|
305
|
+
/\bviewmodifiers?[-\s]nativos?\b/,
|
|
306
|
+
/\bviewthatfits\b/,
|
|
307
|
+
/\bviper\b.*\boverkill\b/,
|
|
308
|
+
];
|
|
309
|
+
|
|
310
|
+
const isAuditedIosPositiveLanguageGuidance = (rule: SkillsCompiledRule): boolean => {
|
|
311
|
+
if (rule.platform !== 'ios') {
|
|
312
|
+
return false;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const haystack = normalizeText(`${rule.id} ${rule.description} ${rule.sourceSkill}`);
|
|
316
|
+
return IOS_AUDITED_POSITIVE_LANGUAGE_GUIDANCE_PATTERNS.some((pattern) => pattern.test(haystack));
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
const isAuditedIosPositiveArchitectureStyleGuidance = (rule: SkillsCompiledRule): boolean => {
|
|
320
|
+
if (rule.platform !== 'ios') {
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
const haystack = normalizeText(`${rule.id} ${rule.description} ${rule.sourceSkill}`);
|
|
325
|
+
return IOS_AUDITED_POSITIVE_ARCHITECTURE_STYLE_GUIDANCE_PATTERNS.some((pattern) => pattern.test(haystack));
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
const requiresIosPositiveCodeGuidanceAudit = (rule: SkillsCompiledRule): boolean => {
|
|
329
|
+
if (rule.platform !== 'ios') {
|
|
330
|
+
return false;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
if (normalizeText(rule.id).includes('-md-')) {
|
|
334
|
+
return false;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
const haystack = normalizeText(`${rule.id} ${rule.description} ${rule.sourceSkill}`);
|
|
338
|
+
return IOS_POSITIVE_CODE_GUIDANCE_PATTERNS.some((pattern) => pattern.test(haystack));
|
|
339
|
+
};
|
|
340
|
+
|
|
238
341
|
const isNonCodeRule = (rule: SkillsCompiledRule): boolean => {
|
|
239
342
|
const haystack = normalizeText(`${rule.id} ${rule.description} ${rule.sourceSkill}`);
|
|
240
343
|
return NON_CODE_RULE_PATTERNS.some((pattern) => pattern.test(haystack));
|
|
@@ -317,6 +420,36 @@ const classifyRule = (rule: SkillsCompiledRule): ClassifiedSkillsRule => {
|
|
|
317
420
|
};
|
|
318
421
|
}
|
|
319
422
|
|
|
423
|
+
if (isAuditedIosPositiveLanguageGuidance(rule) || isAuditedIosPositiveArchitectureStyleGuidance(rule)) {
|
|
424
|
+
return {
|
|
425
|
+
ruleId: rule.id,
|
|
426
|
+
platform: rule.platform,
|
|
427
|
+
sourceSkill: rule.sourceSkill,
|
|
428
|
+
sourcePath: rule.sourcePath,
|
|
429
|
+
evaluationMode,
|
|
430
|
+
severity: rule.severity,
|
|
431
|
+
status: 'NO_ES_REGLA_DE_CODIGO',
|
|
432
|
+
reason:
|
|
433
|
+
'Audited iOS positive guidance; absence is not a safe runtime violation and related negative patterns must be enforced by specific detectors.',
|
|
434
|
+
astNodeIds,
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
if (requiresIosPositiveCodeGuidanceAudit(rule)) {
|
|
439
|
+
return {
|
|
440
|
+
ruleId: rule.id,
|
|
441
|
+
platform: rule.platform,
|
|
442
|
+
sourceSkill: rule.sourceSkill,
|
|
443
|
+
sourcePath: rule.sourcePath,
|
|
444
|
+
evaluationMode,
|
|
445
|
+
severity: rule.severity,
|
|
446
|
+
status: 'REQUIERE_ESTUDIO',
|
|
447
|
+
reason:
|
|
448
|
+
'iOS positive code guidance needs explicit audit before classifying it as non-runtime or implementing a detector.',
|
|
449
|
+
astNodeIds,
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
|
|
320
453
|
if (isNonCodeRule(rule)) {
|
|
321
454
|
return {
|
|
322
455
|
ruleId: rule.id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.376",
|
|
4
4
|
"description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|