@@ -542,19 +542,6 @@ export function validateTriggerOverlapDisambiguation(
542542 return issues ;
543543}
544544
545- function validateDisambiguationRemoval ( skill : SkillRoutingContext , mergeBaseRef : string | null ) : ValidationIssue [ ] {
546- if ( mergeBaseRef === null ) return [ ] ;
547-
548- const previousDescription = getDescriptionFromGitRef ( skill . file , mergeBaseRef ) ;
549- return buildDisambiguationRemovalIssues ( previousDescription , skill . description ) ;
550- }
551-
552- export function isDisambiguationClauseRemoved ( previousDescription : string | null , currentDescription : string | null ) : boolean {
553- const previousHasDisambiguation = hasDoNotUseForClause ( previousDescription ) || hasAnyPreferOverClause ( previousDescription ) ;
554- const currentHasDisambiguation = hasDoNotUseForClause ( currentDescription ) || hasAnyPreferOverClause ( currentDescription ) ;
555- return previousHasDisambiguation && ! currentHasDisambiguation ;
556- }
557-
558545function getRemovedDisambiguationClauses ( previousDescription : string | null , currentDescription : string | null ) : string [ ] {
559546 const removed : string [ ] = [ ] ;
560547 if ( hasDoNotUseForClause ( previousDescription ) && ! hasDoNotUseForClause ( currentDescription ) ) {
@@ -566,22 +553,6 @@ function getRemovedDisambiguationClauses(previousDescription: string | null, cur
566553 return removed ;
567554}
568555
569- export function buildDisambiguationRemovalIssues (
570- previousDescription : string | null ,
571- currentDescription : string | null ,
572- ) : ValidationIssue [ ] {
573- if ( previousDescription === null ) return [ ] ;
574- if ( ! isDisambiguationClauseRemoved ( previousDescription , currentDescription ) ) return [ ] ;
575- const removedClauses = getRemovedDisambiguationClauses ( previousDescription , currentDescription ) ;
576- const clauseLabel = removedClauses . length === 1 ? removedClauses [ 0 ] : removedClauses . join ( " and " ) ;
577- const clauseWord = removedClauses . length === 1 ? "clause" : "clauses" ;
578- return [ {
579- check : "disambiguation-removal" ,
580- severity : "error" ,
581- message : `Removed disambiguation ${ clauseWord } : ${ clauseLabel } . Re-add a DO NOT USE FOR or PREFER OVER clause if trigger overlap still exists.` ,
582- } ] ;
583- }
584-
585556// ── Validate a single SKILL.md ──────────────────────────────────────────────
586557
587558export function validateSkillFile ( filePath : string ) : ValidationResult {
@@ -797,7 +768,6 @@ function main(): void {
797768 const routingContext = routingContextByName.get(result.skill);
798769 if (routingContext) {
799770 result.issues.push(...validateTriggerOverlapDisambiguation(routingContext, routingContexts));
800- result.issues.push(...validateDisambiguationRemoval(routingContext, mergeBaseRef));
801771 }
802772 results.push(result);
803773 }
0 commit comments