@@ -439,10 +439,16 @@ export function scoreUnknownsCoverage(
439439) : ScorerResult < UnknownsCoverageDetails > {
440440 const { unknownsMap } = plan ;
441441
442+ // Unknown-unknowns: having 1-3 with detection signals is excellent
443+ // Check that each has both potentialSurprise and detectionSignal
444+ const validUnknownUnknowns = unknownsMap . unknownUnknowns . filter (
445+ ( uu ) => uu . potentialSurprise . length > 10 && uu . detectionSignal . length > 10 ,
446+ ) ;
447+
442448 const details : UnknownsCoverageDetails = {
443449 knownKnownsCount : unknownsMap . knownKnowns . length ,
444450 knownUnknownsCount : unknownsMap . knownUnknowns . length ,
445- unknownUnknownsCount : unknownsMap . unknownUnknowns . length ,
451+ unknownUnknownsCount : validUnknownUnknowns . length ,
446452 hasCommunityCheck : unknownsMap . communityCheck . length > 20 ,
447453 epistemicCompleteness : 0 ,
448454 } ;
@@ -454,11 +460,6 @@ export function scoreUnknownsCoverage(
454460 // Known-unknowns: having 2-5 is good
455461 const knownUnknownsScore = Math . min ( 1 , details . knownUnknownsCount / 3 ) ;
456462
457- // Unknown-unknowns: having 1-3 with detection signals is excellent
458- // Check that each has both potentialSurprise and detectionSignal
459- const validUnknownUnknowns = unknownsMap . unknownUnknowns . filter (
460- ( uu ) => uu . potentialSurprise . length > 10 && uu . detectionSignal . length > 10 ,
461- ) ;
462463 const unknownUnknownsScore = Math . min ( 1 , validUnknownUnknowns . length / 2 ) ;
463464
464465 // Community check: should be substantive
@@ -475,7 +476,7 @@ export function scoreUnknownsCoverage(
475476 const reason =
476477 `Epistemic coverage: ${ details . knownKnownsCount } known-knowns, ` +
477478 `${ details . knownUnknownsCount } known-unknowns, ` +
478- `${ validUnknownUnknowns . length } unknown-unknowns with detection signals. ` +
479+ `${ details . unknownUnknownsCount } unknown-unknowns with detection signals. ` +
479480 `Community check: ${ details . hasCommunityCheck ? "present" : "missing/weak" } .` ;
480481
481482 return { score, reason, details } ;
@@ -530,7 +531,12 @@ export function scorePlanComposite(
530531 // Guard against division by zero (all weights are 0)
531532 const resolvedWeights =
532533 weightSum === 0
533- ? { structure : 0.25 , coverage : 0.3 , experimentRigor : 0.25 , unknownsCoverage : 0.2 }
534+ ? {
535+ structure : 0.25 ,
536+ coverage : 0.3 ,
537+ experimentRigor : 0.25 ,
538+ unknownsCoverage : 0.2 ,
539+ }
534540 : {
535541 structure : rawWeights . structure / weightSum ,
536542 coverage : rawWeights . coverage / weightSum ,
0 commit comments