vigiles 28.0.0 → 29.0.0
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 +1 -1
- package/dist/adapter-registry.d.ts +39 -0
- package/dist/adapter-registry.js +45 -0
- package/dist/adapter.d.ts +8 -0
- package/dist/adapter.js +10 -1
- package/dist/adapters/claude-code/adapter.js +6 -0
- package/dist/adapters/claude-code/layout.d.ts +5 -0
- package/dist/adapters/claude-code/plugin-loader.d.ts +10 -1
- package/dist/adapters/claude-code/plugin-loader.js +10 -1
- package/dist/adapters/codex/adapter.js +6 -0
- package/dist/adapters/codex/layout.d.ts +51 -5
- package/dist/adapters/codex/layout.js +13 -4
- package/dist/adapters/opencode/adapter.js +6 -0
- package/dist/audit-report.template.html +1 -1
- package/dist/audit-score.d.ts +7 -0
- package/dist/audit-score.js +49 -2
- package/dist/cli-main.js +82 -20
- package/dist/core/adapter.d.ts +23 -0
- package/dist/core/compile.js +11 -1
- package/dist/core/config-schema.d.ts +244 -0
- package/dist/core/config-schema.js +452 -0
- package/dist/core/refs.js +10 -1
- package/dist/core/surface-discovery.d.ts +270 -0
- package/dist/core/surface-discovery.js +425 -0
- package/dist/core/surface-scopes.d.ts +38 -1
- package/dist/core/surface-scopes.js +73 -1
- package/dist/core/symbols.d.ts +24 -2
- package/dist/core/symbols.js +66 -18
- package/dist/core/types.d.ts +36 -107
- package/dist/core/validate.d.ts +36 -22
- package/dist/core/validate.js +88 -176
- package/dist/exclude.d.ts +20 -0
- package/dist/exclude.js +11 -1
- package/dist/layout-registry.d.ts +14 -0
- package/dist/layout-registry.js +40 -0
- package/dist/plugin-loader.d.ts +49 -1
- package/dist/plugin-loader.js +120 -14
- package/dist/scan-core.d.ts +19 -0
- package/dist/scan-core.js +30 -0
- package/dist/scan-files.js +15 -5
- package/dist/scan.d.ts +63 -0
- package/dist/scan.js +68 -12
- package/dist/score-core.js +8 -0
- package/dist/setup-plan.d.ts +2 -1
- package/dist/setup-plan.js +7 -2
- package/dist/surface-discovery-fs.d.ts +12 -0
- package/dist/surface-discovery-fs.js +108 -0
- package/dist/vigilesrc.schema.json +1689 -0
- package/package.json +10 -6
|
@@ -152,7 +152,7 @@ Error generating stack: `+a.message+`
|
|
|
152
152
|
*
|
|
153
153
|
* This source code is licensed under the ISC license.
|
|
154
154
|
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const vy=We("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function py(c){return c.score!==null?String(c.score):c.notMeasured?"not measured":"n/a"}function gm(c){var m,g,o="";if(typeof c=="string"||typeof c=="number")o+=c;else if(typeof c=="object")if(Array.isArray(c)){var x=c.length;for(m=0;m<x;m++)c[m]&&(g=gm(c[m]))&&(o&&(o+=" "),o+=g)}else for(g in c)c[g]&&(o&&(o+=" "),o+=g);return o}function ym(){for(var c,m,g=0,o="",x=arguments.length;g<x;g++)(c=arguments[g])&&(m=gm(c))&&(o&&(o+=" "),o+=m);return o}const Ys="-",by=c=>{const m=Sy(c),{conflictingClassGroups:g,conflictingClassGroupModifiers:o}=c;return{getClassGroupId:C=>{const O=C.split(Ys);return O[0]===""&&O.length!==1&&O.shift(),vm(O,m)||xy(C)},getConflictingClassGroupIds:(C,O)=>{const A=g[C]||[];return O&&o[C]?[...A,...o[C]]:A}}},vm=(c,m)=>{var C;if(c.length===0)return m.classGroupId;const g=c[0],o=m.nextPart.get(g),x=o?vm(c.slice(1),o):void 0;if(x)return x;if(m.validators.length===0)return;const N=c.join(Ys);return(C=m.validators.find(({validator:O})=>O(N)))==null?void 0:C.classGroupId},em=/^\[(.+)\]$/,xy=c=>{if(em.test(c)){const m=em.exec(c)[1],g=m==null?void 0:m.substring(0,m.indexOf(":"));if(g)return"arbitrary.."+g}},Sy=c=>{const{theme:m,prefix:g}=c,o={nextPart:new Map,validators:[]};return jy(Object.entries(c.classGroups),g).forEach(([N,C])=>{qs(C,o,N,m)}),o},qs=(c,m,g,o)=>{c.forEach(x=>{if(typeof x=="string"){const N=x===""?m:tm(m,x);N.classGroupId=g;return}if(typeof x=="function"){if(zy(x)){qs(x(o),m,g,o);return}m.validators.push({validator:x,classGroupId:g});return}Object.entries(x).forEach(([N,C])=>{qs(C,tm(m,N),g,o)})})},tm=(c,m)=>{let g=c;return m.split(Ys).forEach(o=>{g.nextPart.has(o)||g.nextPart.set(o,{nextPart:new Map,validators:[]}),g=g.nextPart.get(o)}),g},zy=c=>c.isThemeGetter,jy=(c,m)=>m?c.map(([g,o])=>{const x=o.map(N=>typeof N=="string"?m+N:typeof N=="object"?Object.fromEntries(Object.entries(N).map(([C,O])=>[m+C,O])):N);return[g,x]}):c,Ny=c=>{if(c<1)return{get:()=>{},set:()=>{}};let m=0,g=new Map,o=new Map;const x=(N,C)=>{g.set(N,C),m++,m>c&&(m=0,o=g,g=new Map)};return{get(N){let C=g.get(N);if(C!==void 0)return C;if((C=o.get(N))!==void 0)return x(N,C),C},set(N,C){g.has(N)?g.set(N,C):x(N,C)}}},pm="!",Ty=c=>{const{separator:m,experimentalParseClassName:g}=c,o=m.length===1,x=m[0],N=m.length,C=O=>{const A=[];let S=0,U=0,H;for(let I=0;I<O.length;I++){let ue=O[I];if(S===0){if(ue===x&&(o||O.slice(I,I+N)===m)){A.push(O.slice(U,I)),U=I+N;continue}if(ue==="/"){H=I;continue}}ue==="["?S++:ue==="]"&&S--}const w=A.length===0?O:O.substring(U),de=w.startsWith(pm),ye=de?w.substring(1):w,Z=H&&H>U?H-U:void 0;return{modifiers:A,hasImportantModifier:de,baseClassName:ye,maybePostfixModifierPosition:Z}};return g?O=>g({className:O,parseClassName:C}):C},Ey=c=>{if(c.length<=1)return c;const m=[];let g=[];return c.forEach(o=>{o[0]==="["?(m.push(...g.sort(),o),g=[]):g.push(o)}),m.push(...g.sort()),m},Ay=c=>({cache:Ny(c.cacheSize),parseClassName:Ty(c),...by(c)}),My=/\s+/,_y=(c,m)=>{const{parseClassName:g,getClassGroupId:o,getConflictingClassGroupIds:x}=m,N=[],C=c.trim().split(My);let O="";for(let A=C.length-1;A>=0;A-=1){const S=C[A],{modifiers:U,hasImportantModifier:H,baseClassName:w,maybePostfixModifierPosition:de}=g(S);let ye=!!de,Z=o(ye?w.substring(0,de):w);if(!Z){if(!ye){O=S+(O.length>0?" "+O:O);continue}if(Z=o(w),!Z){O=S+(O.length>0?" "+O:O);continue}ye=!1}const I=Ey(U).join(":"),ue=H?I+pm:I,_e=ue+Z;if(N.includes(_e))continue;N.push(_e);const Ne=x(Z,ye);for(let W=0;W<Ne.length;++W){const be=Ne[W];N.push(ue+be)}O=S+(O.length>0?" "+O:O)}return O};function Oy(){let c=0,m,g,o="";for(;c<arguments.length;)(m=arguments[c++])&&(g=bm(m))&&(o&&(o+=" "),o+=g);return o}const bm=c=>{if(typeof c=="string")return c;let m,g="";for(let o=0;o<c.length;o++)c[o]&&(m=bm(c[o]))&&(g&&(g+=" "),g+=m);return g};function Cy(c,...m){let g,o,x,N=C;function C(A){const S=m.reduce((U,H)=>H(U),c());return g=Ay(S),o=g.cache.get,x=g.cache.set,N=O,O(A)}function O(A){const S=o(A);if(S)return S;const U=_y(A,g);return x(A,U),U}return function(){return N(Oy.apply(null,arguments))}}const Me=c=>{const m=g=>g[c]||[];return m.isThemeGetter=!0,m},xm=/^\[(?:([a-z-]+):)?(.+)\]$/i,Dy=/^\d+\/\d+$/,Uy=new Set(["px","full","screen"]),Ry=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,By=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,al=c=>qa(c)||Uy.has(c)||Dy.test(c),Ol=c=>Ga(c,"length",Ky),qa=c=>!!c&&!Number.isNaN(Number(c)),Cs=c=>Ga(c,"number",qa),Hn=c=>!!c&&Number.isInteger(Number(c)),Yy=c=>c.endsWith("%")&&qa(c.slice(0,-1)),$=c=>xm.test(c),Cl=c=>Ry.test(c),Xy=new Set(["length","size","percentage"]),Qy=c=>Ga(c,Xy,Sm),wy=c=>Ga(c,"position",Sm),Ly=new Set(["image","url"]),Zy=c=>Ga(c,Ly,ky),Vy=c=>Ga(c,"",Jy),qn=()=>!0,Ga=(c,m,g)=>{const o=xm.exec(c);return o?o[1]?typeof m=="string"?o[1]===m:m.has(o[1]):g(o[2]):!1},Ky=c=>Hy.test(c)&&!qy.test(c),Sm=()=>!1,Jy=c=>By.test(c),ky=c=>Gy.test(c),$y=()=>{const c=Me("colors"),m=Me("spacing"),g=Me("blur"),o=Me("brightness"),x=Me("borderColor"),N=Me("borderRadius"),C=Me("borderSpacing"),O=Me("borderWidth"),A=Me("contrast"),S=Me("grayscale"),U=Me("hueRotate"),H=Me("invert"),w=Me("gap"),de=Me("gradientColorStops"),ye=Me("gradientColorStopPositions"),Z=Me("inset"),I=Me("margin"),ue=Me("opacity"),_e=Me("padding"),Ne=Me("saturate"),W=Me("scale"),be=Me("sepia"),Te=Me("skew"),J=Me("space"),fe=Me("translate"),qe=()=>["auto","contain","none"],Pe=()=>["auto","hidden","clip","visible","scroll"],et=()=>["auto",$,m],F=()=>[$,m],Rt=()=>["",al,Ol],tt=()=>["auto",qa,$],lt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["start","end","center","between","around","evenly","stretch"],ce=()=>["","0",$],he=()=>["auto","avoid","all","avoid-page","page","left","right","column"],d=()=>[qa,$];return{cacheSize:500,separator:":",theme:{colors:[qn],spacing:[al,Ol],blur:["none","",Cl,$],brightness:d(),borderColor:[c],borderRadius:["none","","full",Cl,$],borderSpacing:F(),borderWidth:Rt(),contrast:d(),grayscale:ce(),hueRotate:d(),invert:ce(),gap:F(),gradientColorStops:[c],gradientColorStopPositions:[Yy,Ol],inset:et(),margin:et(),opacity:d(),padding:F(),saturate:d(),scale:d(),sepia:ce(),skew:d(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",$]}],container:["container"],columns:[{columns:[Cl]}],"break-after":[{"break-after":he()}],"break-before":[{"break-before":he()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...lt(),$]}],overflow:[{overflow:Pe()}],"overflow-x":[{"overflow-x":Pe()}],"overflow-y":[{"overflow-y":Pe()}],overscroll:[{overscroll:qe()}],"overscroll-x":[{"overscroll-x":qe()}],"overscroll-y":[{"overscroll-y":qe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[Z]}],"inset-x":[{"inset-x":[Z]}],"inset-y":[{"inset-y":[Z]}],start:[{start:[Z]}],end:[{end:[Z]}],top:[{top:[Z]}],right:[{right:[Z]}],bottom:[{bottom:[Z]}],left:[{left:[Z]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Hn,$]}],basis:[{basis:et()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$]}],grow:[{grow:ce()}],shrink:[{shrink:ce()}],order:[{order:["first","last","none",Hn,$]}],"grid-cols":[{"grid-cols":[qn]}],"col-start-end":[{col:["auto",{span:["full",Hn,$]},$]}],"col-start":[{"col-start":tt()}],"col-end":[{"col-end":tt()}],"grid-rows":[{"grid-rows":[qn]}],"row-start-end":[{row:["auto",{span:[Hn,$]},$]}],"row-start":[{"row-start":tt()}],"row-end":[{"row-end":tt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_e]}],px:[{px:[_e]}],py:[{py:[_e]}],ps:[{ps:[_e]}],pe:[{pe:[_e]}],pt:[{pt:[_e]}],pr:[{pr:[_e]}],pb:[{pb:[_e]}],pl:[{pl:[_e]}],m:[{m:[I]}],mx:[{mx:[I]}],my:[{my:[I]}],ms:[{ms:[I]}],me:[{me:[I]}],mt:[{mt:[I]}],mr:[{mr:[I]}],mb:[{mb:[I]}],ml:[{ml:[I]}],"space-x":[{"space-x":[J]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[J]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$,m]}],"min-w":[{"min-w":[$,m,"min","max","fit"]}],"max-w":[{"max-w":[$,m,"none","full","min","max","fit","prose",{screen:[Cl]},Cl]}],h:[{h:[$,m,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$,m,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$,m,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$,m,"auto","min","max","fit"]}],"font-size":[{text:["base",Cl,Ol]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Cs]}],"font-family":[{font:[qn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$]}],"line-clamp":[{"line-clamp":["none",qa,Cs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",al,$]}],"list-image":[{"list-image":["none",$]}],"list-style-type":[{list:["none","disc","decimal",$]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[c]}],"placeholder-opacity":[{"placeholder-opacity":[ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[c]}],"text-opacity":[{"text-opacity":[ue]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",al,Ol]}],"underline-offset":[{"underline-offset":["auto",al,$]}],"text-decoration-color":[{decoration:[c]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[ue]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...lt(),wy]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Qy]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Zy]}],"bg-color":[{bg:[c]}],"gradient-from-pos":[{from:[ye]}],"gradient-via-pos":[{via:[ye]}],"gradient-to-pos":[{to:[ye]}],"gradient-from":[{from:[de]}],"gradient-via":[{via:[de]}],"gradient-to":[{to:[de]}],rounded:[{rounded:[N]}],"rounded-s":[{"rounded-s":[N]}],"rounded-e":[{"rounded-e":[N]}],"rounded-t":[{"rounded-t":[N]}],"rounded-r":[{"rounded-r":[N]}],"rounded-b":[{"rounded-b":[N]}],"rounded-l":[{"rounded-l":[N]}],"rounded-ss":[{"rounded-ss":[N]}],"rounded-se":[{"rounded-se":[N]}],"rounded-ee":[{"rounded-ee":[N]}],"rounded-es":[{"rounded-es":[N]}],"rounded-tl":[{"rounded-tl":[N]}],"rounded-tr":[{"rounded-tr":[N]}],"rounded-br":[{"rounded-br":[N]}],"rounded-bl":[{"rounded-bl":[N]}],"border-w":[{border:[O]}],"border-w-x":[{"border-x":[O]}],"border-w-y":[{"border-y":[O]}],"border-w-s":[{"border-s":[O]}],"border-w-e":[{"border-e":[O]}],"border-w-t":[{"border-t":[O]}],"border-w-r":[{"border-r":[O]}],"border-w-b":[{"border-b":[O]}],"border-w-l":[{"border-l":[O]}],"border-opacity":[{"border-opacity":[ue]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[O]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[O]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[ue]}],"divide-style":[{divide:j()}],"border-color":[{border:[x]}],"border-color-x":[{"border-x":[x]}],"border-color-y":[{"border-y":[x]}],"border-color-s":[{"border-s":[x]}],"border-color-e":[{"border-e":[x]}],"border-color-t":[{"border-t":[x]}],"border-color-r":[{"border-r":[x]}],"border-color-b":[{"border-b":[x]}],"border-color-l":[{"border-l":[x]}],"divide-color":[{divide:[x]}],"outline-style":[{outline:["",...j()]}],"outline-offset":[{"outline-offset":[al,$]}],"outline-w":[{outline:[al,Ol]}],"outline-color":[{outline:[c]}],"ring-w":[{ring:Rt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[c]}],"ring-opacity":[{"ring-opacity":[ue]}],"ring-offset-w":[{"ring-offset":[al,Ol]}],"ring-offset-color":[{"ring-offset":[c]}],shadow:[{shadow:["","inner","none",Cl,Vy]}],"shadow-color":[{shadow:[qn]}],opacity:[{opacity:[ue]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[g]}],brightness:[{brightness:[o]}],contrast:[{contrast:[A]}],"drop-shadow":[{"drop-shadow":["","none",Cl,$]}],grayscale:[{grayscale:[S]}],"hue-rotate":[{"hue-rotate":[U]}],invert:[{invert:[H]}],saturate:[{saturate:[Ne]}],sepia:[{sepia:[be]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[g]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[A]}],"backdrop-grayscale":[{"backdrop-grayscale":[S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[U]}],"backdrop-invert":[{"backdrop-invert":[H]}],"backdrop-opacity":[{"backdrop-opacity":[ue]}],"backdrop-saturate":[{"backdrop-saturate":[Ne]}],"backdrop-sepia":[{"backdrop-sepia":[be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[C]}],"border-spacing-x":[{"border-spacing-x":[C]}],"border-spacing-y":[{"border-spacing-y":[C]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$]}],duration:[{duration:d()}],ease:[{ease:["linear","in","out","in-out",$]}],delay:[{delay:d()}],animate:[{animate:["none","spin","ping","pulse","bounce",$]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[W]}],"scale-x":[{"scale-x":[W]}],"scale-y":[{"scale-y":[W]}],rotate:[{rotate:[Hn,$]}],"translate-x":[{"translate-x":[fe]}],"translate-y":[{"translate-y":[fe]}],"skew-x":[{"skew-x":[Te]}],"skew-y":[{"skew-y":[Te]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$]}],accent:[{accent:["auto",c]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$]}],"caret-color":[{caret:[c]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$]}],fill:[{fill:[c,"none"]}],"stroke-w":[{stroke:[al,Ol,Cs]}],stroke:[{stroke:[c,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Wy=Cy($y);function se(...c){return Wy(ym(c))}function nl({className:c,...m}){return f.jsx("div",{className:se("rounded-lg border border-border bg-card text-foreground shadow-sm",c),...m})}const lm=c=>typeof c=="boolean"?`${c}`:c===0?"0":c,am=ym,Fy=(c,m)=>g=>{var o;if((m==null?void 0:m.variants)==null)return am(c,g==null?void 0:g.class,g==null?void 0:g.className);const{variants:x,defaultVariants:N}=m,C=Object.keys(x).map(S=>{const U=g==null?void 0:g[S],H=N==null?void 0:N[S];if(U===null)return null;const w=lm(U)||lm(H);return x[S][w]}),O=g&&Object.entries(g).reduce((S,U)=>{let[H,w]=U;return w===void 0||(S[H]=w),S},{}),A=m==null||(o=m.compoundVariants)===null||o===void 0?void 0:o.reduce((S,U)=>{let{class:H,className:w,...de}=U;return Object.entries(de).every(ye=>{let[Z,I]=ye;return Array.isArray(I)?I.includes({...N,...O}[Z]):{...N,...O}[Z]===I})?[...S,H,w]:S},[]);return am(c,C,A,g==null?void 0:g.class,g==null?void 0:g.className)},Iy=Fy("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-semibold uppercase tracking-wide",{variants:{variant:{default:"border-border bg-background text-muted-foreground",outline:"border-border text-muted-foreground"}},defaultVariants:{variant:"default"}});function Bn({className:c,variant:m,...g}){return f.jsx("span",{className:se(Iy({variant:m}),c),...g})}function Xs(c){return c===null?"na":c>=90?"good":c>=70?"warn":"bad"}const le={good:"text-good",warn:"text-warn",bad:"text-bad",na:"text-na"},Ha={good:"bg-good",warn:"bg-warn",bad:"bg-bad",na:"bg-na"},ii={good:"border-l-good",warn:"border-l-warn",bad:"border-l-bad",na:"border-l-na"},Py={good:"border-good",warn:"border-warn",bad:"border-bad",na:"border-na"},e0={enforce:"rule",file:"file",cmd:"cmd",dir:"dir"};function t0({r:c}){return f.jsxs("div",{className:se("border-l-4 p-3",ii.bad),children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[f.jsx(Bn,{children:e0[c.kind]}),f.jsx("code",{className:"font-mono text-xs text-foreground",children:c.ref})]}),f.jsx("div",{className:"mt-0.5 text-xs text-muted-foreground",children:c.issue})]})}function l0({data:c}){if(c.total===0)return f.jsxs(nl,{className:"p-4 text-sm text-muted-foreground",children:["No machine-verifiable references found — add"," ",f.jsx("code",{className:"font-mono text-xs",children:"enforce()"})," calls to a"," ",f.jsx("code",{className:"font-mono text-xs",children:".spec.ts"})," to unlock cross-referencing."]});const m=c.broken===0;return f.jsxs(nl,{className:"p-5",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[f.jsxs("div",{className:"flex items-baseline gap-1.5",children:[f.jsx("span",{className:se("text-3xl font-bold tabular-nums",m?le.good:le.bad),children:c.broken}),f.jsxs("span",{className:"text-sm text-muted-foreground",children:["/ ",c.total," broken"]})]}),m?f.jsxs("span",{className:se("flex items-center gap-1 text-sm",le.good),children:[f.jsx(ni,{size:14})," all ",c.total," reference",c.total===1?"":"s"," resolve"]}):f.jsxs("span",{className:se("flex items-center gap-1 text-sm",le.bad),children:[f.jsx(ry,{size:14})," ",c.broken," broken reference",c.broken===1?"":"s"," found"]})]}),c.brokenRefs.length>0&&f.jsx("div",{className:"mt-4 flex flex-col gap-2",children:c.brokenRefs.map((g,o)=>f.jsx(t0,{r:g},o))})]})}function zm(){const c=window.__VIGILES_SERVE__;return c&&typeof c.token=="string"?c:null}async function a0(c,m,g){try{const o=await fetch(c,{method:"POST",headers:{"content-type":"application/json","x-vigiles-token":g},body:JSON.stringify(m)}),x=await o.json();return{ok:x.ok??o.ok,message:x.message??""}}catch(o){return{ok:!1,message:o instanceof Error?o.message:String(o)}}}const jm="inline-flex items-center gap-2 rounded-md border border-border bg-card px-3 py-1.5 text-left text-xs font-medium hover:border-foreground disabled:opacity-60";function Nm({command:c,label:m}){const[g,o]=xt.useState(!1),x=()=>{var N;(N=navigator.clipboard)==null||N.writeText(c).then(()=>{o(!0),setTimeout(()=>o(!1),1500)},()=>{})};return f.jsxs("button",{type:"button",onClick:x,title:`Copy: ${c}`,className:jm,children:[g?f.jsx(Ba,{size:14,className:le.good}):f.jsx(ui,{size:14,className:"text-muted-foreground"}),f.jsx("span",{className:se(g&&le.good),children:g?"copied!":m})]})}function Tm({endpoint:c,body:m,token:g,label:o}){const[x,N]=xt.useState("idle"),[C,O]=xt.useState(""),A=()=>{N("running"),a0(c,m,g).then(S=>{N(S.ok?"done":"error"),O(S.message)})};return f.jsxs("button",{type:"button",onClick:A,disabled:x==="running"||x==="done",title:x==="error"?C:o,className:jm,children:[x==="running"&&f.jsx(dy,{size:14,className:"animate-spin text-muted-foreground"}),x==="done"&&f.jsx(Ba,{size:14,className:le.good}),x==="error"&&f.jsx(yy,{size:14,className:le.bad}),x==="idle"&&f.jsx(dm,{size:14,className:"text-muted-foreground"}),f.jsx("span",{className:se(x==="done"&&le.good,x==="error"&&le.bad),children:x==="done"?"created":x==="error"?"failed":x==="running"?"creating…":o})]})}function n0({path:c,command:m}){const g=zm();return f.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-l-4 border-l-warn p-3",children:[f.jsx("code",{className:"font-mono text-xs text-foreground",children:c}),f.jsx("div",{className:"ml-auto",children:g?f.jsx(Tm,{endpoint:"/adopt",body:{target:c},token:g.token,label:"Create spec"}):f.jsx(Nm,{command:m,label:"Create spec"})})]})}function u0({data:c}){const m=zm();return f.jsxs(nl,{className:"p-5",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(dm,{size:16,className:"text-muted-foreground"}),c.surfaces.length," surface",c.surfaces.length===1?"":"s"," not yet spec-managed"]}),f.jsx("div",{className:"ml-auto",children:m?f.jsx(Tm,{endpoint:"/adopt-all",body:{},token:m.token,label:"Create all specs"}):f.jsx(Nm,{command:c.createAllCommand,label:"Create all specs"})})]}),f.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:m?"Click to create the typed spec — this report is live, so the CLI writes it for you (re-run audit to see it spec-managed).":"Copy the command and run it in your terminal — the CLI writes the typed spec (the browser can’t write files)."}),c.surfaces.length>0&&f.jsx("div",{className:"mt-4 flex flex-col gap-2",children:c.surfaces.map(g=>f.jsx(n0,{path:g.path,command:g.command},g.path))})]})}const i0="inline-flex items-center gap-2 rounded-md border border-border bg-card px-3 py-1.5 text-left text-xs font-medium hover:border-foreground disabled:opacity-60";function c0({item:c}){const[m,g]=xt.useState(!1),o=c.configState==="contradiction"?`In this repo, the ${c.linter} rule \`${c.rule}\` is set to "off" in the lint config, but the instructions document "${c.intent}" as a rule. Resolve the contradiction: either remove the override so \`${c.rule}\` is enforced (${c.configFix}), or drop the documented rule if it's intentionally off.`:`In this repo, enable the ${c.linter} rule \`${c.rule}\` (set it to "error") in the lint config, so the documented rule "${c.intent}" is actually enforced. Config to add: ${c.configFix}`,x=()=>{var N;(N=navigator.clipboard)==null||N.writeText(o).then(()=>{g(!0),setTimeout(()=>g(!1),1500)},()=>{})};return f.jsxs("button",{type:"button",onClick:x,title:o,className:i0,children:[m?f.jsx(Ba,{size:14,className:le.good}):f.jsx(ui,{size:14,className:"text-muted-foreground"}),f.jsx("span",{className:se(m&&le.good),children:m?"copied!":"copy agent prompt"})]})}function li({item:c,tone:m,label:g,action:o}){return f.jsxs(nl,{className:"flex flex-wrap items-center gap-x-3 gap-y-2 p-3 text-sm",children:[m==="good"?f.jsx(Ba,{size:16,className:le.good}):f.jsx("span",{className:se("text-lg leading-none",m==="warn"?le.warn:m==="bad"?le.bad:"text-muted-foreground"),children:"●"}),f.jsx("span",{className:"min-w-[12rem] flex-1",children:c.intent}),f.jsx("code",{className:"font-mono text-xs text-muted-foreground",children:c.rule}),f.jsx("span",{className:se("text-xs",m==="good"?le.good:m==="warn"?le.warn:m==="bad"?le.bad:"text-muted-foreground"),children:g}),o&&f.jsx(c0,{item:c})]})}function nm({title:c,tone:m,children:g}){return f.jsxs("details",{className:"group",children:[f.jsxs("summary",{className:se("flex cursor-pointer list-none items-center gap-1.5 py-1 text-xs font-medium",m==="good"?le.good:"text-muted-foreground"),children:[f.jsx(ai,{size:13,className:"transition-transform group-open:rotate-90"}),c]}),f.jsx("div",{className:"mt-2 space-y-2",children:g})]})}const Ds={reuse:{glyph:"✓",label:"enforceable now",blurb:"an off-the-shelf rule already exists → one config line"},hook:{glyph:"⛓",label:"hook",blurb:"an action rule a linter can't see (git push, rm -rf) → a hook gates it"},meta:{glyph:"☰",label:"agent note",blurb:"an instruction to the agent, not a code rule → stays prose"},semantic:{glyph:"✎",label:"judgment call",blurb:"no checker can decide it (“readable”, “idiomatic”) → honestly stays prose"},unrouted:{glyph:"⚙",label:"custom rule",blurb:"no off-the-shelf rule fits, but a custom one CAN — the opt-in synthesis skill writes + gates it (abstains if it can't prove it sound)"}},s0=["reuse","hook","meta","semantic","unrouted"];function f0({routing:c}){const m=o=>{var x;return(x=c==null?void 0:c.rules.find(N=>N.category===o))==null?void 0:x.text},g=((c==null?void 0:c.rules)??[]).filter(o=>o.category==="reuse"&&o.enabled===!1);return f.jsxs("div",{className:"rounded-lg border border-dashed border-border p-4",children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(hy,{size:15,className:"text-muted-foreground"}),"Your rules, mapped",f.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:"deterministic · no model"})]}),c&&c.segmented>0?f.jsxs(f.Fragment,{children:[f.jsxs("p",{className:"mt-1.5 text-xs text-muted-foreground",children:["We segmented"," ",f.jsx("span",{className:"font-semibold text-foreground",children:c.segmented})," ","atomic ",c.segmented===1?"rule":"rules"," from your instructions and routed each one — deterministically, no model:"]}),f.jsx("ul",{className:"mt-2 space-y-1.5 text-xs text-muted-foreground",children:s0.filter(o=>c.counts[o]>0).map(o=>{const x=m(o);return f.jsxs("li",{children:[f.jsxs("span",{className:"font-mono text-foreground",children:[Ds[o].glyph," ",c.counts[o]," ",Ds[o].label]})," ","— ",Ds[o].blurb,o==="reuse"&&g.length>0&&f.jsxs("span",{className:se("ml-1 font-semibold",le.bad),children:["(",g.length," documented but OFF)"]}),x&&f.jsxs("span",{className:"mt-0.5 block truncate pl-4 italic opacity-80",children:["e.g. “",x,"”"]})]},o)})}),g.length>0&&f.jsxs("div",{className:se("mt-2.5 rounded-md border p-2.5","border-l-4"),children:[f.jsxs("p",{className:se("text-xs font-semibold",le.bad),children:["⛔ ",g.length," documented but OFF"]}),f.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["Your instructions name"," ",g.length===1?"this rule":"these rules"," as enforced, but your linter config has ",g.length===1?"it":"them"," ","disabled:"]}),f.jsxs("ul",{className:"mt-1 space-y-0.5",children:[g.slice(0,6).map(o=>f.jsxs("li",{className:"font-mono text-xs text-muted-foreground",children:[f.jsx("code",{className:le.bad,children:o.rule})," ",f.jsxs("span",{className:"opacity-70",children:["— ",o.text]})]},o.rule)),g.length>6&&f.jsxs("li",{className:"text-xs text-muted-foreground",children:["+",g.length-6," more"]})]})]}),f.jsx(um,{routing:c}),f.jsx(im,{})]}):f.jsxs(f.Fragment,{children:[f.jsx(um,{routing:c}),f.jsx("p",{className:"mt-1.5 text-xs text-muted-foreground",children:"Segments your instruction file into atomic rules and routes each one — deterministically, no model:"}),f.jsxs("ul",{className:"mt-2 space-y-1 text-xs text-muted-foreground",children:[f.jsxs("li",{children:[f.jsx("span",{className:"font-mono text-foreground",children:"✓ enforceable now"})," ","— an off-the-shelf rule already exists → enable it"]}),f.jsxs("li",{children:[f.jsx("span",{className:"font-mono text-foreground",children:"⛓ hook"})," — action rules a linter can't see (git push, rm -rf)"]}),f.jsxs("li",{children:[f.jsx("span",{className:"font-mono text-foreground",children:"⚙ custom rule"})," — no off-the-shelf rule fits, but a custom one CAN (“wrap API calls in retry”) → the opt-in synthesis skill, gated"]}),f.jsxs("li",{children:[f.jsx("span",{className:"font-mono text-foreground",children:"✎ judgment call"})," ","— genuinely undecidable (“readable”), honestly left as prose"]})]}),f.jsx(im,{})]})]})}function um({routing:c}){const m=(c==null?void 0:c.possible)??[],g=(c==null?void 0:c.skipped)??[];if(m.length===0&&g.length===0)return null;const o={};for(const x of g)o[x.reason]=(o[x.reason]??0)+1;return f.jsxs("div",{className:"mt-2.5 space-y-2",children:[m.length>0&&f.jsxs("div",{className:"rounded-md border border-dashed border-border p-2.5",children:[f.jsxs("p",{className:"text-xs font-semibold text-foreground",children:["? ",m.length," possible — rule-ish, below the confidence bar (review)"]}),f.jsxs("ul",{className:"mt-1 space-y-0.5",children:[m.slice(0,6).map((x,N)=>f.jsxs("li",{className:"truncate text-xs italic text-muted-foreground opacity-80",children:["“",x.text,"”"]},`${x.lineStart}-${N}`)),m.length>6&&f.jsxs("li",{className:"text-xs text-muted-foreground",children:["+",m.length-6," more"]})]})]}),g.length>0&&f.jsxs("p",{className:"text-xs text-muted-foreground",children:["⊘ ",g.length," skipped — not treated as rules (",Object.entries(o).map(([x,N])=>`${N} ${x}`).join(" · "),")"]}),f.jsx("p",{className:"text-xs text-muted-foreground opacity-70",children:"Detection is a best-effort, precision-first filter — it won’t catch every rule. Full per-bullet lists are in the JSON report."})]})}function im(){return f.jsxs("div",{className:"mt-2.5 space-y-1 text-xs text-muted-foreground",children:[f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"Enforceable now"})," — enable each in your lint config (one line), or ask your agent to run the"," ",f.jsx("code",{className:"rounded bg-border px-1 font-mono",children:"strengthen"})," ","skill."]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"Hooks"})," — author a compiled hook in"," ",f.jsx("code",{className:"rounded bg-border px-1 font-mono",children:".vigiles/hooks/"}),", then"," ",f.jsx("code",{className:"rounded bg-border px-1 font-mono",children:"npx vigiles compile"})," ","wires it into your settings."]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"Custom rule (⚙)"})," — no off-the-shelf rule fits, but a custom one CAN enforce it (e.g. “wrap API calls in a retry”). Doable, not a dead end — the opt-in synthesis skill writes and gates it (with a bit of codebase context); it abstains rather than ship a checker it can’t prove sound. Nothing is generated for you automatically."]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"Judgment call (✎)"})," — genuinely undecidable (“keep it readable”); no checker can decide it, so it honestly stays prose."]})]})}function o0({data:c,routing:m}){const g=c.filter(A=>A.configState==="in-config"),o=c.filter(A=>A.configState==="preset-maybe"),x=c.filter(A=>A.configState==="not-in-config"),N=c.filter(A=>A.configState==="contradiction"),C=c.length,O=(A,S)=>A>0?f.jsx("div",{className:se(S),style:{flexGrow:A},"aria-hidden":!0}):null;return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[f.jsxs("p",{className:"text-sm text-muted-foreground",children:[f.jsx("span",{className:se("font-semibold",le.good),children:g.length})," ","of ",C," enforced",o.length>0&&f.jsxs(f.Fragment,{children:[" · ",f.jsx("span",{className:"font-semibold text-foreground",children:o.length})," ","likely via a preset"]}),x.length>0&&f.jsxs(f.Fragment,{children:[" · ",f.jsx("span",{className:se("font-semibold",le.warn),children:x.length})," ",x.length===1?"is":"are"," one config line away"]}),N.length>0&&f.jsxs(f.Fragment,{children:[" · ",f.jsx("span",{className:se("font-semibold",le.bad),children:N.length})," ","contradicted by config"]}),"."]}),f.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[f.jsx(vy,{size:12})," deterministic · no model"]})]}),f.jsxs("div",{className:"flex h-2 overflow-hidden rounded-full bg-border",children:[O(g.length,Ha.good),O(o.length,Ha.na),O(x.length,Ha.warn),O(N.length,Ha.bad)]}),N.length>0&&f.jsx("div",{className:"space-y-2",children:N.map(A=>f.jsx(li,{item:A,tone:"bad",label:"⛔ set to off in your config — your call",action:!0},A.rule))}),x.length>0&&f.jsx("div",{className:"space-y-2",children:x.map(A=>f.jsx(li,{item:A,tone:"warn",label:"enable in 1 line",action:!0},A.rule))}),g.length>0&&f.jsx(nm,{title:`✓ ${g.length} already enforced`,tone:"good",children:g.map(A=>f.jsx(li,{item:A,tone:"good",label:"enforced"},A.rule))}),o.length>0&&f.jsx(nm,{title:`◦ ${o.length} likely enforced via a preset`,tone:"muted",children:o.map(A=>f.jsx(li,{item:A,tone:"muted",label:"preset?"},A.rule))}),f.jsx(f0,{routing:m})]})}function r0({data:c}){return f.jsxs(nl,{className:"p-5",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(my,{size:16,className:"text-muted-foreground"}),c.total," record",c.total===1?"":"s"," recorded"]}),f.jsx("div",{className:"ml-auto flex flex-wrap gap-1.5",children:c.counts.map(m=>f.jsxs(Bn,{variant:"outline",children:[m.count," ",m.kind]},m.kind))})]}),c.recentDenials.length>0&&f.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[f.jsxs("div",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:["Recent denials (",c.denials,")"]}),c.recentDenials.map((m,g)=>f.jsxs("div",{className:se("flex flex-wrap items-center gap-2 border-l-4 p-3 text-sm",ii.bad),children:[f.jsx(fy,{size:14,className:le.bad}),f.jsx("code",{className:"font-mono text-xs",children:m.label}),f.jsx("span",{className:"text-muted-foreground",children:m.reason})]},g))]})]})}const cm="Measure whether my skills actually fire (recall + precision). This is the test/eval tier, not the read-only audit — so if vigiles isn't set up in this repo yet, run `npx vigiles init` first (that installs the test-harness skill), then use that skill to run measureTriggerRate. Report each skill's recall (does it fire when it should?) and precision (does it stay quiet on unrelated prompts?). It runs on my Claude subscription — no API key.",d0=new Set(["lethal-trifecta","subagent-tool-contract","mcp-tool-resolves","hook-events","hook-script-exists","description-overlap","skill-frontmatter","subagent-frontmatter"]);function m0(c){return`https://vigiles.sh/checks/${c}/`}function Em({slug:c,children:m,className:g}){return d0.has(c)?f.jsx("a",{href:m0(c),target:"_blank",rel:"noreferrer",className:se("underline decoration-dotted underline-offset-2",g),children:m}):f.jsx("span",{className:g,children:m})}function sm({text:c,advisory:m}){const g=c.replace(/\s*\(advisory\)\s*$/,"");return f.jsxs("span",{children:[f.jsx("span",{children:g}),m&&f.jsx("span",{className:"text-na",children:" · advisory, not graded"})]})}function Bs(c){const m=c.replace(/[/\\]+$/,"").split(/[/\\]/);return m[m.length-1]||c}function h0(c){const m=c.find(g=>g.key==="Safety");return!m||m.advisory||m.score===null?[]:m.findings.filter(g=>!g.endsWith("(advisory)"))}function fm({clean:c}){return c?f.jsxs(nl,{className:"flex items-center gap-2 p-4 text-sm text-good",children:[f.jsx(ni,{size:16})," No deterministic fixes — the structure is clean."]}):f.jsx(nl,{className:"p-4 text-sm text-muted-foreground",children:"No deterministic auto-fixes — review the flagged findings above."})}function g0(c){return c>=8?"bad":c>=3?"warn":"na"}function y0({r:c}){const[m,g]=xt.useState(!1),o=`In this repo, ${c.fix}. Context: ${c.rationale} (detector: ${c.detector}).`,x=()=>{var N;(N=navigator.clipboard)==null||N.writeText(o).then(()=>{g(!0),setTimeout(()=>g(!1),1500)},()=>{})};return f.jsxs("button",{type:"button",onClick:x,title:o,className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-card px-2.5 py-1 text-xs font-medium hover:border-foreground",children:[m?f.jsx(Ba,{size:13,className:le.good}):f.jsx(ui,{size:13,className:"text-muted-foreground"}),f.jsx("span",{className:se(m&&le.good),children:m?"copied!":"copy agent prompt"})]})}function Us({r:c,points:m}){const g=c.action==="fix"?gy:oy,o=g0(m);return f.jsxs("div",{className:se("rounded-xl border border-l-4 border-border/40 bg-card/30 p-5",ii[o]),children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[f.jsxs(Bn,{children:[f.jsx(g,{size:12,className:"mr-1"}),c.action]}),f.jsx("strong",{children:c.surface}),m>0&&f.jsxs("span",{className:se("rounded-full px-2 py-0.5 text-xs font-semibold",le[o]),children:["+",m," pts"]}),f.jsx(Em,{slug:c.detector,className:"ml-auto hidden font-mono text-xs text-muted-foreground hover:text-foreground sm:inline",children:c.detector})]}),f.jsx("div",{className:"mt-2.5 text-sm leading-relaxed text-muted-foreground",children:c.rationale}),f.jsxs("div",{className:"mt-3.5 flex flex-wrap items-center justify-between gap-2",children:[f.jsxs("span",{className:"text-sm leading-relaxed text-good",children:["→ ",c.fix]}),f.jsx(y0,{r:c})]})]})}function v0({finding:c}){return f.jsx("div",{className:se("rounded-xl border border-l-4 border-border/40 bg-card/30 p-5",ii.bad),children:f.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[f.jsxs(Bn,{children:[f.jsx(hm,{size:12,className:"mr-1"}),"safety"]}),f.jsxs("span",{className:"leading-relaxed text-muted-foreground",children:[c," ",f.jsx(Em,{slug:"lethal-trifecta",className:"text-muted-foreground hover:text-foreground",children:"what's this?"})]}),f.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:"your call — no deterministic fix"})]})})}function p0({c}){const m=c.advisory?"na":Xs(c.score),g=c.score===null?0:Math.max(0,Math.min(100,c.score));return f.jsxs(nl,{className:"flex flex-col gap-2 p-3",children:[f.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[f.jsx("span",{className:"text-xs font-semibold",children:c.key}),f.jsx("span",{className:se(c.notMeasured?"text-[11px] font-semibold":"text-sm font-bold",le[m]),children:c.notMeasured?"not measured":c.advisory?"—":c.score===null?"n/a":c.score})]}),f.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-border",children:f.jsx("div",{className:se("h-full rounded-full",Ha[m]),style:{width:`${g}%`}})}),f.jsx("div",{className:"h-8 overflow-hidden text-[11px] leading-tight text-muted-foreground",children:c.notMeasured?f.jsx("span",{className:"line-clamp-2 text-na",children:c.findings[c.findings.length-1]??"never measured"}):c.advisory?f.jsx("span",{className:"text-na",children:"advisory — not graded"}):c.findings.length>0?f.jsxs("span",{className:"line-clamp-2",children:[c.findings[0],c.findings.length>1&&f.jsxs("span",{className:"text-foreground",children:[" ","· +",c.findings.length-1," more"]})]}):f.jsxs("span",{className:"inline-flex items-center gap-1 text-good",children:[f.jsx(ni,{size:11})," clean"]})})]})}function b0({c,refs:m}){const g=c.advisory?"na":Xs(c.score),o=c.score===null?0:Math.max(0,Math.min(100,c.score)),x=c.findings.map(U=>({text:U,advisory:!!c.advisory||U.endsWith("(advisory)")})),N=[...x.filter(U=>!U.advisory),...x.filter(U=>U.advisory)],[C,...O]=N,A=c.key==="Safety"&&C&&!C.advisory,S=py(c);return f.jsxs("div",{className:"py-3",children:[f.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[f.jsx("span",{className:"text-sm font-medium",children:c.key}),f.jsx("span",{className:se("font-mono text-sm font-bold",le[g]),children:S})]}),f.jsx("div",{className:"mt-1.5 h-1 overflow-hidden rounded-full bg-border",children:f.jsx("div",{className:se("h-full rounded-full",Ha[g]),style:{width:`${o}%`}})}),f.jsx("div",{className:"mt-2 text-[13px] leading-snug text-muted-foreground",children:C?f.jsxs(f.Fragment,{children:[A&&f.jsx(hm,{size:12,className:se("mr-1 inline align-[-2px]",le.bad),"aria-hidden":!0}),f.jsx(sm,{text:C.text,advisory:C.advisory}),m&&m.length>0&&f.jsx("ul",{className:"mt-1 space-y-0.5",children:m.map(U=>f.jsxs("li",{className:"font-mono text-[11px] text-na",children:["↳ ",U," ",f.jsx("span",{className:"text-muted-foreground",children:"— missing"})]},U))}),O.length>0&&f.jsxs("details",{className:"group mt-1",children:[f.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1 text-[11px] font-medium text-muted-foreground/80 hover:text-foreground",children:[f.jsx(ai,{size:11,className:"transition-transform group-open:rotate-90"}),"+ ",O.length," more"]}),f.jsx("ul",{className:"mt-1 space-y-1 border-l border-border/50 pl-3",children:O.map((U,H)=>f.jsx("li",{children:f.jsx(sm,{text:U.text,advisory:U.advisory})},H))})]})]}):f.jsxs("span",{className:"inline-flex items-center gap-1 text-good",children:[f.jsx(ni,{size:12})," clean"]})})]})}function x0({onUnlock:c}){const[m,g]=xt.useState(!1),o=()=>{var x;c==null||c(),(x=navigator.clipboard)==null||x.writeText(cm).then(()=>{g(!0),setTimeout(()=>g(!1),2200)},()=>{})};return f.jsxs("div",{className:"rounded-xl border border-dashed border-border/70 bg-card/20 p-4",children:[f.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-4",children:[f.jsxs("div",{className:"min-w-0 sm:flex-1",children:[f.jsxs("div",{className:"flex items-center gap-1.5 text-sm font-medium",children:[f.jsx(mm,{size:13,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),"Do your skills actually fire?"]}),f.jsx("p",{className:"mt-1 text-[13px] leading-snug text-muted-foreground",children:"Needs a real model, not a browser — recall (fires when it should) + precision (stays quiet otherwise)."}),f.jsxs("div",{className:"mt-2 flex items-center gap-2 font-mono text-xs text-muted-foreground",children:[f.jsxs("span",{"aria-hidden":!0,children:["recall ",f.jsx("span",{className:"font-bold text-foreground",children:"—"})," · precision ",f.jsx("span",{className:"font-bold text-foreground",children:"—"})]}),f.jsx("span",{className:"rounded bg-muted/60 px-1.5 py-0.5 text-[10px] font-medium uppercase not-italic tracking-wide text-muted-foreground/80",children:"run to fill"}),f.jsx("span",{className:"sr-only",children:"Recall and precision are unmeasured here — run vigiles locally to measure your skills' real numbers."})]})]}),f.jsx("div",{className:"flex flex-col items-start gap-1 sm:shrink-0 sm:items-end",children:f.jsx("button",{type:"button",onClick:o,title:cm,className:"inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-border bg-card px-3 py-1.5 text-xs font-semibold transition-colors hover:border-foreground",children:m?f.jsxs(f.Fragment,{children:[f.jsx(Ba,{size:13,"aria-hidden":!0,className:se("shrink-0",le.good)}),f.jsx("span",{className:le.good,children:"Copied — paste into Claude Code"})]}):f.jsxs(f.Fragment,{children:[f.jsx(ui,{size:13,"aria-hidden":!0,className:"shrink-0 text-muted-foreground"}),"Copy prompt →"]})})})]}),f.jsx("p",{className:"mt-2 text-[11px] text-muted-foreground",children:"Runs on your Claude subscription — no API key."})]})}function S0(){return f.jsxs("div",{className:"mt-2.5 rounded-xl border border-dashed border-border/70 bg-card/20 p-4",children:[f.jsxs("div",{className:"flex items-center gap-1.5 text-sm font-medium",children:[f.jsx(mm,{size:13,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),"Your rules → enforced",f.jsx("span",{className:"rounded bg-muted/60 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:"CLI only"})]}),f.jsx("p",{className:"mt-1 text-[13px] leading-snug text-muted-foreground",children:"Locally, vigiles maps each prose rule to the linter rule that enforces it — and flags a rule you told the agent to follow that's silently off in your config."}),f.jsx("pre",{className:"mt-2 whitespace-pre-wrap break-words rounded-md border border-border bg-card/40 px-3 py-2 font-mono text-xs leading-relaxed text-foreground",children:'"always use ===" → eqeqeq is "off" in your ESLint config'}),f.jsx("p",{className:"mt-2 text-[11px] leading-snug text-muted-foreground/70",children:"Covers JS, Python, Rust, Ruby, JVM & Go linters. On an unknown stack, references, structure & safety are still verified."})]})}function om({verdict:c,overall:m,dir:g,harness:o,compact:x=!1,subline:N}){const C=Xs(m),O=x?"h-20 w-20 rounded-xl text-4xl":"h-28 w-28 rounded-2xl text-5xl",A=f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:se("flex shrink-0 flex-col items-center justify-center border-2",O,Py[C]),children:[f.jsx("span",{className:se("font-black leading-none",le[C]),children:c.grade}),f.jsx("span",{className:"mt-1 text-xs font-medium text-muted-foreground",children:m===null?"—":`${m}/100`})]}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("h1",{className:se("font-bold leading-snug tracking-tight",x?"text-lg sm:text-xl":"text-xl sm:text-2xl"),children:c.sentence}),f.jsxs("div",{className:"mt-2 text-sm text-muted-foreground",children:[f.jsx("span",{className:"font-medium text-foreground",children:Bs(g)})," ·"," ",o,N]}),!x&&f.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:"deterministic · no model · nothing leaves your machine"})]})]});return x?f.jsx("div",{className:"flex flex-col gap-6 sm:flex-row sm:items-center",children:A}):f.jsx(nl,{className:"flex flex-col gap-5 p-7 sm:flex-row sm:items-center",children:A})}function z0({n:c,children:m}){return c<=0?null:f.jsxs("details",{className:"group mt-2.5",children:[f.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-xs font-semibold uppercase tracking-widest text-muted-foreground hover:text-foreground",children:[f.jsx(ai,{size:13,className:"transition-transform group-open:rotate-90"}),"+ ",c," more"]}),f.jsx("div",{className:"mt-2.5 flex flex-col gap-2.5",children:m})]})}const Rs="mb-4 mt-12 text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground/70";function j0({data:c,showFooter:m=!0,variant:g="full",onUnlock:o}){var _e,Ne;const{score:x,verdict:N,recommendations:C,inventory:O,meta:A,adoptability:S,adoptable:U,observations:H,rulesInventory:w,ruleRouting:de,brokenReferences:ye}=c,Z=x.empty?null:x.overall;xt.useEffect(()=>{g==="full"&&(document.title=Z===null?`vigiles — ${Bs(A.dir)}`:`vigiles — ${x.grade} (${Z}) · ${Bs(A.dir)}`)},[g,Z,x.grade,A.dir]);const I=W=>{var be;return((be=N.perRecommendation.find(Te=>Te.index===W))==null?void 0:be.pointsIfFixed)??0},ue=C.map((W,be)=>({r:W,points:I(be)})).sort((W,be)=>be.points-W.points);if(g==="summary"){const W=(fe,qe)=>fe&&`${fe} ${qe}${fe===1?"":"s"}`,be=[W(O.skills,"skill"),W(O.agents,"agent"),W(O.hooks,"hook"),W(O.commands,"command")].filter(Boolean),Te=ue.slice(0,3),J=ue.slice(3);return f.jsxs("div",{children:[f.jsx(om,{compact:!0,verdict:N,overall:Z,dir:A.dir,harness:A.harness,subline:f.jsxs(f.Fragment,{children:[be.map(fe=>f.jsxs("span",{children:[" · ",fe]},fe)),O.untested>0&&f.jsxs("span",{className:le.warn,children:[" ","· ",O.untested," untested"]})]})}),f.jsx("h2",{className:Rs,children:"Categories — and what's flagged"}),f.jsx("div",{className:"divide-y divide-border/40",children:x.categories.map(fe=>f.jsx(b0,{c:fe,refs:fe.key==="Truthfulness"?ye:void 0},fe.key))}),f.jsx("p",{className:"mb-2.5 mt-6 text-[11px] font-medium uppercase tracking-[0.14em] text-muted-foreground/60",children:"What the browser can't do here"}),f.jsx(x0,{onUnlock:o}),f.jsx(S0,{}),C.length>0?f.jsxs(f.Fragment,{children:[f.jsx("h2",{className:Rs,children:"Do these first"}),f.jsx("div",{className:"flex flex-col gap-2.5",children:Te.map(({r:fe,points:qe},Pe)=>f.jsx(Us,{r:fe,points:qe},Pe))}),f.jsx(z0,{n:J.length,children:J.map(({r:fe,points:qe},Pe)=>f.jsx(Us,{r:fe,points:qe},Pe))})]}):x.overall===100&&f.jsxs(f.Fragment,{children:[f.jsx("h2",{className:Rs,children:"Fixes"}),f.jsx(fm,{clean:!0})]})]})}return f.jsxs("div",{className:"mx-auto max-w-5xl px-6 pb-16 pt-10",children:[f.jsx(om,{verdict:N,overall:Z,dir:A.dir,harness:A.harness}),f.jsx("h2",{className:"mb-3 mt-9 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Categories"}),f.jsx("div",{className:"grid grid-cols-2 gap-2.5 sm:grid-cols-3 lg:grid-cols-6",children:x.categories.map(W=>f.jsx(p0,{c:W},W.key))}),f.jsx("h2",{className:"mb-3 mt-9 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:C.length>0?"Do these first":"Fixes"}),ue.length>0?f.jsx("div",{className:"flex flex-col gap-2.5",children:ue.map(({r:W,points:be},Te)=>f.jsx(Us,{r:W,points:be},Te))}):f.jsx(fm,{clean:x.overall===100}),(()=>{const W=h0(x.categories);return W.length===0?null:f.jsxs(f.Fragment,{children:[f.jsx("h2",{className:"mb-3 mt-9 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Review — no auto-fix"}),f.jsx("div",{className:"flex flex-col gap-2.5",children:W.map((be,Te)=>f.jsx(v0,{finding:be},Te))})]})})(),S&&f.jsxs(f.Fragment,{children:[f.jsx("h2",{className:"mb-3 mt-9 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Broken references"}),f.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Machine-verifiable references in your instruction file — files, scripts, symbols — checked against your actual repo and config. These don't resolve."}),f.jsx(l0,{data:S})]}),H&&H.total>0&&f.jsxs(f.Fragment,{children:[f.jsx("h2",{className:"mb-3 mt-9 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Flight recorder"}),f.jsxs("p",{className:"mb-3 text-xs text-muted-foreground",children:["What your harness actually did in real sessions — read off the local",f.jsx("code",{className:"mx-1 font-mono",children:".vigiles/runs.jsonl"})," ledger."]}),f.jsx(r0,{data:H})]}),(w&&w.length>0||de&&(de.segmented>0||(((_e=de.possible)==null?void 0:_e.length)??0)>0||(((Ne=de.skipped)==null?void 0:Ne.length)??0)>0))&&f.jsxs(f.Fragment,{children:[f.jsxs("h2",{className:"mb-3 mt-9 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:["Your rules → enforced",f.jsx(Bn,{className:"border-warn text-warn",children:"experimental"})]}),((w==null?void 0:w.length)??0)===0?f.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"No supported linter resolved here. Rule cross-referencing covers ESLint, Ruff, Pylint, Clippy & RuboCop — on other stacks your references, structure & safety are still verified; enforcing a documented rule just needs one of those linters."}):f.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Prose rules in your instruction file that map to an off-the-shelf lint rule — and whether it's actually enforced. Detection is a heuristic, precision-first preview: it won't catch every rule."}),f.jsx(o0,{data:w??[],routing:de})]}),f.jsxs("div",{className:"mt-9 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[f.jsx("span",{className:"font-semibold uppercase tracking-widest",children:"Ships"}),f.jsxs("span",{children:[O.skills," skills"]}),f.jsxs("span",{children:[O.agents," agents"]}),f.jsxs("span",{children:[O.hooks," hooks"]}),f.jsxs("span",{children:[O.commands," commands"]}),f.jsxs("span",{children:["MCP ",O.mcp?"yes":"no"]}),O.untested>0&&f.jsxs("span",{className:le.warn,children:[O.untested," untested"]})]}),U&&U.surfaces.length>0&&f.jsxs("details",{className:"group mt-6",children:[f.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-xs font-semibold uppercase tracking-widest text-muted-foreground hover:text-foreground",children:[f.jsx(ai,{size:13,className:"transition-transform group-open:rotate-90"}),"Optional — turn ",U.surfaces.length," surface",U.surfaces.length>1?"s":""," into typed specs"]}),f.jsx("p",{className:"mb-3 mt-3 text-xs text-muted-foreground",children:"Hardening, not a fix: make vigiles verify these surfaces' references — fully, or one at a time. Skip it until you want CI to gate them."}),f.jsx(u0,{data:U})]}),m&&f.jsx("footer",{className:"mt-12 text-center text-xs text-muted-foreground",children:"Generated by vigiles — we run your harness, not just read it."})]})}const N0={meta:{schemaVersion:2,tool:"vigiles",kind:"audit",vigilesVersion:"0.0.0",harness:"claude-code",dir:"my-plugin"},score:{overall:77,grade:"C",empty:!1,categories:[{key:"Truthfulness",score:100,weight:1,findings:[]},{key:"Triggering",score:92,weight:1,findings:["1 near-identical skill description (wrong one fires)"]},{key:"Structure",score:92,weight:1,findings:["1 agent tool that doesn't exist (typo / never-available)"]},{key:"Safety",score:80,weight:1,findings:["1 subagent holding all three lethal-trifecta legs (prompt-injection exfil path)"]},{key:"Tested",score:88,weight:1,advisory:!0,findings:["4 surfaces with no vigiles harness (deterministic, free)"]},{key:"Evaluated",score:null,weight:1,advisory:!0,notMeasured:!0,findings:["4 surfaces whose firing was never measured","not measured — run `npx vigiles audit` interactively to measure, or add a `*.eval.mjs` (`paid_measureTriggerRate`, vigiles/eval)"]}]},verdict:{sentence:"Two one-line fixes away from a B.",grade:"C",pointsToNextGrade:3,fixesToNextGrade:2,perRecommendation:[{index:0,pointsIfFixed:4},{index:1,pointsIfFixed:2}]},recommendations:[{surface:"reviewer",action:"fix",rationale:`Unknown tool "Reed" — silently dropped, the agent can't use it.`,fix:'change the tool "Reed" to "Read"',detector:"subagent-tool-contract",confidence:"likely"},{surface:"deploy ↔ ship",action:"differentiate",rationale:"Near-identical descriptions (0.92 similar) — the selector can't tell them apart.",fix:"differentiate the descriptions of deploy and ship",detector:"description-overlap",confidence:"possible"}],inventory:{skills:2,agents:1,hooks:1,commands:0,mcp:!1,untested:4,untestedHarness:4,unevaluated:4},adoptable:{createAllCommand:"npx vigiles init",surfaces:[{path:"skills/deploy/SKILL.md",command:"npx vigiles init --target=skills/deploy/SKILL.md"},{path:"agents/reviewer.md",command:"npx vigiles init --target=agents/reviewer.md"}]},adoptability:{total:7,broken:2,brokenRefs:[{kind:"file",ref:"src/auth/login.ts",issue:"file does not exist"},{kind:"dir",ref:"packages/legacy/",issue:"directory does not exist"}]},ruleRouting:{segmented:8,counts:{reuse:3,hook:2,meta:0,semantic:1,unrouted:2},rules:[{text:"Never use `console.log` in shipped code.",quote:"- Never use `console.log` in shipped code.",file:"CLAUDE.md",lineStart:12,lineEnd:12,confidence:"high",category:"reuse",mechanism:"config-line",rule:"no-console",linter:"eslint",enabled:!1,source:"marker"},{text:"Never push directly to `main` — open a PR.",quote:"- Never push directly to `main` — open a PR.",file:"CLAUDE.md",lineStart:18,lineEnd:18,confidence:"high",category:"hook",mechanism:"hook"},{text:"Run `npm test` before every commit.",quote:"- Run `npm test` before every commit.",file:"CLAUDE.md",lineStart:19,lineEnd:19,confidence:"high",category:"hook",mechanism:"hook"},{text:"Write clear, self-documenting code.",quote:"- Write clear, self-documenting code.",file:"CLAUDE.md",lineStart:21,lineEnd:21,confidence:"high",category:"semantic",mechanism:"prose"},{text:"Prefer named exports over default exports.",quote:"- Prefer named exports over default exports.",file:"CLAUDE.md",lineStart:22,lineEnd:22,confidence:"high",category:"unrouted",mechanism:"synthesize"}]},rulesInventory:[{intent:"strict equality ===",linter:"eslint",matched:"eqeqeq",rule:"eqeqeq",configState:"contradiction",configFix:'"eqeqeq": "error"'},{intent:"no console.log / use the logger",linter:"eslint",matched:"console.log",rule:"no-console",configState:"not-in-config",configFix:'"no-console": "error"'},{intent:"no debugger",linter:"eslint",matched:"no-debugger",rule:"no-debugger",configState:"not-in-config",configFix:'"no-debugger": "error"'},{intent:"no `any` type",linter:"eslint",matched:"no-explicit-any",rule:"@typescript-eslint/no-explicit-any",configState:"in-config",configFix:'"@typescript-eslint/no-explicit-any": "error"'},{intent:"no floating promises",linter:"eslint",matched:"no-floating-promises",rule:"@typescript-eslint/no-floating-promises",configState:"preset-maybe",configFix:'"@typescript-eslint/no-floating-promises": "error"'}]},Hs=window.__VIGILES_DATA__,T0=Hs&&typeof Hs=="object"?Hs:N0;uy.createRoot(document.getElementById("root")).render(f.jsx(xt.StrictMode,{children:f.jsx(j0,{data:T0})}));</script>
|
|
155
|
+
*/const vy=We("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function py(c){return c.score!==null?String(c.score):c.notMeasured?"not measured":"n/a"}function gm(c){var m,g,o="";if(typeof c=="string"||typeof c=="number")o+=c;else if(typeof c=="object")if(Array.isArray(c)){var x=c.length;for(m=0;m<x;m++)c[m]&&(g=gm(c[m]))&&(o&&(o+=" "),o+=g)}else for(g in c)c[g]&&(o&&(o+=" "),o+=g);return o}function ym(){for(var c,m,g=0,o="",x=arguments.length;g<x;g++)(c=arguments[g])&&(m=gm(c))&&(o&&(o+=" "),o+=m);return o}const Ys="-",by=c=>{const m=Sy(c),{conflictingClassGroups:g,conflictingClassGroupModifiers:o}=c;return{getClassGroupId:C=>{const O=C.split(Ys);return O[0]===""&&O.length!==1&&O.shift(),vm(O,m)||xy(C)},getConflictingClassGroupIds:(C,O)=>{const A=g[C]||[];return O&&o[C]?[...A,...o[C]]:A}}},vm=(c,m)=>{var C;if(c.length===0)return m.classGroupId;const g=c[0],o=m.nextPart.get(g),x=o?vm(c.slice(1),o):void 0;if(x)return x;if(m.validators.length===0)return;const N=c.join(Ys);return(C=m.validators.find(({validator:O})=>O(N)))==null?void 0:C.classGroupId},em=/^\[(.+)\]$/,xy=c=>{if(em.test(c)){const m=em.exec(c)[1],g=m==null?void 0:m.substring(0,m.indexOf(":"));if(g)return"arbitrary.."+g}},Sy=c=>{const{theme:m,prefix:g}=c,o={nextPart:new Map,validators:[]};return jy(Object.entries(c.classGroups),g).forEach(([N,C])=>{qs(C,o,N,m)}),o},qs=(c,m,g,o)=>{c.forEach(x=>{if(typeof x=="string"){const N=x===""?m:tm(m,x);N.classGroupId=g;return}if(typeof x=="function"){if(zy(x)){qs(x(o),m,g,o);return}m.validators.push({validator:x,classGroupId:g});return}Object.entries(x).forEach(([N,C])=>{qs(C,tm(m,N),g,o)})})},tm=(c,m)=>{let g=c;return m.split(Ys).forEach(o=>{g.nextPart.has(o)||g.nextPart.set(o,{nextPart:new Map,validators:[]}),g=g.nextPart.get(o)}),g},zy=c=>c.isThemeGetter,jy=(c,m)=>m?c.map(([g,o])=>{const x=o.map(N=>typeof N=="string"?m+N:typeof N=="object"?Object.fromEntries(Object.entries(N).map(([C,O])=>[m+C,O])):N);return[g,x]}):c,Ny=c=>{if(c<1)return{get:()=>{},set:()=>{}};let m=0,g=new Map,o=new Map;const x=(N,C)=>{g.set(N,C),m++,m>c&&(m=0,o=g,g=new Map)};return{get(N){let C=g.get(N);if(C!==void 0)return C;if((C=o.get(N))!==void 0)return x(N,C),C},set(N,C){g.has(N)?g.set(N,C):x(N,C)}}},pm="!",Ty=c=>{const{separator:m,experimentalParseClassName:g}=c,o=m.length===1,x=m[0],N=m.length,C=O=>{const A=[];let S=0,U=0,H;for(let I=0;I<O.length;I++){let ue=O[I];if(S===0){if(ue===x&&(o||O.slice(I,I+N)===m)){A.push(O.slice(U,I)),U=I+N;continue}if(ue==="/"){H=I;continue}}ue==="["?S++:ue==="]"&&S--}const w=A.length===0?O:O.substring(U),de=w.startsWith(pm),ye=de?w.substring(1):w,Z=H&&H>U?H-U:void 0;return{modifiers:A,hasImportantModifier:de,baseClassName:ye,maybePostfixModifierPosition:Z}};return g?O=>g({className:O,parseClassName:C}):C},Ey=c=>{if(c.length<=1)return c;const m=[];let g=[];return c.forEach(o=>{o[0]==="["?(m.push(...g.sort(),o),g=[]):g.push(o)}),m.push(...g.sort()),m},Ay=c=>({cache:Ny(c.cacheSize),parseClassName:Ty(c),...by(c)}),My=/\s+/,_y=(c,m)=>{const{parseClassName:g,getClassGroupId:o,getConflictingClassGroupIds:x}=m,N=[],C=c.trim().split(My);let O="";for(let A=C.length-1;A>=0;A-=1){const S=C[A],{modifiers:U,hasImportantModifier:H,baseClassName:w,maybePostfixModifierPosition:de}=g(S);let ye=!!de,Z=o(ye?w.substring(0,de):w);if(!Z){if(!ye){O=S+(O.length>0?" "+O:O);continue}if(Z=o(w),!Z){O=S+(O.length>0?" "+O:O);continue}ye=!1}const I=Ey(U).join(":"),ue=H?I+pm:I,_e=ue+Z;if(N.includes(_e))continue;N.push(_e);const Ne=x(Z,ye);for(let W=0;W<Ne.length;++W){const be=Ne[W];N.push(ue+be)}O=S+(O.length>0?" "+O:O)}return O};function Oy(){let c=0,m,g,o="";for(;c<arguments.length;)(m=arguments[c++])&&(g=bm(m))&&(o&&(o+=" "),o+=g);return o}const bm=c=>{if(typeof c=="string")return c;let m,g="";for(let o=0;o<c.length;o++)c[o]&&(m=bm(c[o]))&&(g&&(g+=" "),g+=m);return g};function Cy(c,...m){let g,o,x,N=C;function C(A){const S=m.reduce((U,H)=>H(U),c());return g=Ay(S),o=g.cache.get,x=g.cache.set,N=O,O(A)}function O(A){const S=o(A);if(S)return S;const U=_y(A,g);return x(A,U),U}return function(){return N(Oy.apply(null,arguments))}}const Me=c=>{const m=g=>g[c]||[];return m.isThemeGetter=!0,m},xm=/^\[(?:([a-z-]+):)?(.+)\]$/i,Dy=/^\d+\/\d+$/,Uy=new Set(["px","full","screen"]),Ry=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Hy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qy=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,By=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Gy=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,al=c=>qa(c)||Uy.has(c)||Dy.test(c),Ol=c=>Ga(c,"length",Ky),qa=c=>!!c&&!Number.isNaN(Number(c)),Cs=c=>Ga(c,"number",qa),Hn=c=>!!c&&Number.isInteger(Number(c)),Yy=c=>c.endsWith("%")&&qa(c.slice(0,-1)),$=c=>xm.test(c),Cl=c=>Ry.test(c),Xy=new Set(["length","size","percentage"]),Qy=c=>Ga(c,Xy,Sm),wy=c=>Ga(c,"position",Sm),Ly=new Set(["image","url"]),Zy=c=>Ga(c,Ly,ky),Vy=c=>Ga(c,"",Jy),qn=()=>!0,Ga=(c,m,g)=>{const o=xm.exec(c);return o?o[1]?typeof m=="string"?o[1]===m:m.has(o[1]):g(o[2]):!1},Ky=c=>Hy.test(c)&&!qy.test(c),Sm=()=>!1,Jy=c=>By.test(c),ky=c=>Gy.test(c),$y=()=>{const c=Me("colors"),m=Me("spacing"),g=Me("blur"),o=Me("brightness"),x=Me("borderColor"),N=Me("borderRadius"),C=Me("borderSpacing"),O=Me("borderWidth"),A=Me("contrast"),S=Me("grayscale"),U=Me("hueRotate"),H=Me("invert"),w=Me("gap"),de=Me("gradientColorStops"),ye=Me("gradientColorStopPositions"),Z=Me("inset"),I=Me("margin"),ue=Me("opacity"),_e=Me("padding"),Ne=Me("saturate"),W=Me("scale"),be=Me("sepia"),Te=Me("skew"),J=Me("space"),fe=Me("translate"),qe=()=>["auto","contain","none"],Pe=()=>["auto","hidden","clip","visible","scroll"],et=()=>["auto",$,m],F=()=>[$,m],Rt=()=>["",al,Ol],tt=()=>["auto",qa,$],lt=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],D=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>["start","end","center","between","around","evenly","stretch"],ce=()=>["","0",$],he=()=>["auto","avoid","all","avoid-page","page","left","right","column"],d=()=>[qa,$];return{cacheSize:500,separator:":",theme:{colors:[qn],spacing:[al,Ol],blur:["none","",Cl,$],brightness:d(),borderColor:[c],borderRadius:["none","","full",Cl,$],borderSpacing:F(),borderWidth:Rt(),contrast:d(),grayscale:ce(),hueRotate:d(),invert:ce(),gap:F(),gradientColorStops:[c],gradientColorStopPositions:[Yy,Ol],inset:et(),margin:et(),opacity:d(),padding:F(),saturate:d(),scale:d(),sepia:ce(),skew:d(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",$]}],container:["container"],columns:[{columns:[Cl]}],"break-after":[{"break-after":he()}],"break-before":[{"break-before":he()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...lt(),$]}],overflow:[{overflow:Pe()}],"overflow-x":[{"overflow-x":Pe()}],"overflow-y":[{"overflow-y":Pe()}],overscroll:[{overscroll:qe()}],"overscroll-x":[{"overscroll-x":qe()}],"overscroll-y":[{"overscroll-y":qe()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[Z]}],"inset-x":[{"inset-x":[Z]}],"inset-y":[{"inset-y":[Z]}],start:[{start:[Z]}],end:[{end:[Z]}],top:[{top:[Z]}],right:[{right:[Z]}],bottom:[{bottom:[Z]}],left:[{left:[Z]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Hn,$]}],basis:[{basis:et()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$]}],grow:[{grow:ce()}],shrink:[{shrink:ce()}],order:[{order:["first","last","none",Hn,$]}],"grid-cols":[{"grid-cols":[qn]}],"col-start-end":[{col:["auto",{span:["full",Hn,$]},$]}],"col-start":[{"col-start":tt()}],"col-end":[{"col-end":tt()}],"grid-rows":[{"grid-rows":[qn]}],"row-start-end":[{row:["auto",{span:[Hn,$]},$]}],"row-start":[{"row-start":tt()}],"row-end":[{"row-end":tt()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$]}],gap:[{gap:[w]}],"gap-x":[{"gap-x":[w]}],"gap-y":[{"gap-y":[w]}],"justify-content":[{justify:["normal",...X()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...X(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...X(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_e]}],px:[{px:[_e]}],py:[{py:[_e]}],ps:[{ps:[_e]}],pe:[{pe:[_e]}],pt:[{pt:[_e]}],pr:[{pr:[_e]}],pb:[{pb:[_e]}],pl:[{pl:[_e]}],m:[{m:[I]}],mx:[{mx:[I]}],my:[{my:[I]}],ms:[{ms:[I]}],me:[{me:[I]}],mt:[{mt:[I]}],mr:[{mr:[I]}],mb:[{mb:[I]}],ml:[{ml:[I]}],"space-x":[{"space-x":[J]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[J]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$,m]}],"min-w":[{"min-w":[$,m,"min","max","fit"]}],"max-w":[{"max-w":[$,m,"none","full","min","max","fit","prose",{screen:[Cl]},Cl]}],h:[{h:[$,m,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$,m,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$,m,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$,m,"auto","min","max","fit"]}],"font-size":[{text:["base",Cl,Ol]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Cs]}],"font-family":[{font:[qn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",$]}],"line-clamp":[{"line-clamp":["none",qa,Cs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",al,$]}],"list-image":[{"list-image":["none",$]}],"list-style-type":[{list:["none","disc","decimal",$]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[c]}],"placeholder-opacity":[{"placeholder-opacity":[ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[c]}],"text-opacity":[{"text-opacity":[ue]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",al,Ol]}],"underline-offset":[{"underline-offset":["auto",al,$]}],"text-decoration-color":[{decoration:[c]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[ue]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...lt(),wy]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Qy]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Zy]}],"bg-color":[{bg:[c]}],"gradient-from-pos":[{from:[ye]}],"gradient-via-pos":[{via:[ye]}],"gradient-to-pos":[{to:[ye]}],"gradient-from":[{from:[de]}],"gradient-via":[{via:[de]}],"gradient-to":[{to:[de]}],rounded:[{rounded:[N]}],"rounded-s":[{"rounded-s":[N]}],"rounded-e":[{"rounded-e":[N]}],"rounded-t":[{"rounded-t":[N]}],"rounded-r":[{"rounded-r":[N]}],"rounded-b":[{"rounded-b":[N]}],"rounded-l":[{"rounded-l":[N]}],"rounded-ss":[{"rounded-ss":[N]}],"rounded-se":[{"rounded-se":[N]}],"rounded-ee":[{"rounded-ee":[N]}],"rounded-es":[{"rounded-es":[N]}],"rounded-tl":[{"rounded-tl":[N]}],"rounded-tr":[{"rounded-tr":[N]}],"rounded-br":[{"rounded-br":[N]}],"rounded-bl":[{"rounded-bl":[N]}],"border-w":[{border:[O]}],"border-w-x":[{"border-x":[O]}],"border-w-y":[{"border-y":[O]}],"border-w-s":[{"border-s":[O]}],"border-w-e":[{"border-e":[O]}],"border-w-t":[{"border-t":[O]}],"border-w-r":[{"border-r":[O]}],"border-w-b":[{"border-b":[O]}],"border-w-l":[{"border-l":[O]}],"border-opacity":[{"border-opacity":[ue]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[O]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[O]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[ue]}],"divide-style":[{divide:j()}],"border-color":[{border:[x]}],"border-color-x":[{"border-x":[x]}],"border-color-y":[{"border-y":[x]}],"border-color-s":[{"border-s":[x]}],"border-color-e":[{"border-e":[x]}],"border-color-t":[{"border-t":[x]}],"border-color-r":[{"border-r":[x]}],"border-color-b":[{"border-b":[x]}],"border-color-l":[{"border-l":[x]}],"divide-color":[{divide:[x]}],"outline-style":[{outline:["",...j()]}],"outline-offset":[{"outline-offset":[al,$]}],"outline-w":[{outline:[al,Ol]}],"outline-color":[{outline:[c]}],"ring-w":[{ring:Rt()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[c]}],"ring-opacity":[{"ring-opacity":[ue]}],"ring-offset-w":[{"ring-offset":[al,Ol]}],"ring-offset-color":[{"ring-offset":[c]}],shadow:[{shadow:["","inner","none",Cl,Vy]}],"shadow-color":[{shadow:[qn]}],opacity:[{opacity:[ue]}],"mix-blend":[{"mix-blend":[...D(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":D()}],filter:[{filter:["","none"]}],blur:[{blur:[g]}],brightness:[{brightness:[o]}],contrast:[{contrast:[A]}],"drop-shadow":[{"drop-shadow":["","none",Cl,$]}],grayscale:[{grayscale:[S]}],"hue-rotate":[{"hue-rotate":[U]}],invert:[{invert:[H]}],saturate:[{saturate:[Ne]}],sepia:[{sepia:[be]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[g]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[A]}],"backdrop-grayscale":[{"backdrop-grayscale":[S]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[U]}],"backdrop-invert":[{"backdrop-invert":[H]}],"backdrop-opacity":[{"backdrop-opacity":[ue]}],"backdrop-saturate":[{"backdrop-saturate":[Ne]}],"backdrop-sepia":[{"backdrop-sepia":[be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[C]}],"border-spacing-x":[{"border-spacing-x":[C]}],"border-spacing-y":[{"border-spacing-y":[C]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$]}],duration:[{duration:d()}],ease:[{ease:["linear","in","out","in-out",$]}],delay:[{delay:d()}],animate:[{animate:["none","spin","ping","pulse","bounce",$]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[W]}],"scale-x":[{"scale-x":[W]}],"scale-y":[{"scale-y":[W]}],rotate:[{rotate:[Hn,$]}],"translate-x":[{"translate-x":[fe]}],"translate-y":[{"translate-y":[fe]}],"skew-x":[{"skew-x":[Te]}],"skew-y":[{"skew-y":[Te]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$]}],accent:[{accent:["auto",c]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",$]}],"caret-color":[{caret:[c]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",$]}],fill:[{fill:[c,"none"]}],"stroke-w":[{stroke:[al,Ol,Cs]}],stroke:[{stroke:[c,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Wy=Cy($y);function se(...c){return Wy(ym(c))}function nl({className:c,...m}){return f.jsx("div",{className:se("rounded-lg border border-border bg-card text-foreground shadow-sm",c),...m})}const lm=c=>typeof c=="boolean"?`${c}`:c===0?"0":c,am=ym,Fy=(c,m)=>g=>{var o;if((m==null?void 0:m.variants)==null)return am(c,g==null?void 0:g.class,g==null?void 0:g.className);const{variants:x,defaultVariants:N}=m,C=Object.keys(x).map(S=>{const U=g==null?void 0:g[S],H=N==null?void 0:N[S];if(U===null)return null;const w=lm(U)||lm(H);return x[S][w]}),O=g&&Object.entries(g).reduce((S,U)=>{let[H,w]=U;return w===void 0||(S[H]=w),S},{}),A=m==null||(o=m.compoundVariants)===null||o===void 0?void 0:o.reduce((S,U)=>{let{class:H,className:w,...de}=U;return Object.entries(de).every(ye=>{let[Z,I]=ye;return Array.isArray(I)?I.includes({...N,...O}[Z]):{...N,...O}[Z]===I})?[...S,H,w]:S},[]);return am(c,C,A,g==null?void 0:g.class,g==null?void 0:g.className)},Iy=Fy("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-semibold uppercase tracking-wide",{variants:{variant:{default:"border-border bg-background text-muted-foreground",outline:"border-border text-muted-foreground"}},defaultVariants:{variant:"default"}});function Bn({className:c,variant:m,...g}){return f.jsx("span",{className:se(Iy({variant:m}),c),...g})}function Xs(c){return c===null?"na":c>=90?"good":c>=70?"warn":"bad"}const le={good:"text-good",warn:"text-warn",bad:"text-bad",na:"text-na"},Ha={good:"bg-good",warn:"bg-warn",bad:"bg-bad",na:"bg-na"},ii={good:"border-l-good",warn:"border-l-warn",bad:"border-l-bad",na:"border-l-na"},Py={good:"border-good",warn:"border-warn",bad:"border-bad",na:"border-na"},e0={enforce:"rule",file:"file",cmd:"cmd",dir:"dir"};function t0({r:c}){return f.jsxs("div",{className:se("border-l-4 p-3",ii.bad),children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[f.jsx(Bn,{children:e0[c.kind]}),f.jsx("code",{className:"font-mono text-xs text-foreground",children:c.ref})]}),f.jsx("div",{className:"mt-0.5 text-xs text-muted-foreground",children:c.issue})]})}function l0({data:c}){if(c.total===0)return f.jsxs(nl,{className:"p-4 text-sm text-muted-foreground",children:["No machine-verifiable references found — add"," ",f.jsx("code",{className:"font-mono text-xs",children:"enforce()"})," calls to a"," ",f.jsx("code",{className:"font-mono text-xs",children:".spec.ts"})," to unlock cross-referencing."]});const m=c.broken===0;return f.jsxs(nl,{className:"p-5",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[f.jsxs("div",{className:"flex items-baseline gap-1.5",children:[f.jsx("span",{className:se("text-3xl font-bold tabular-nums",m?le.good:le.bad),children:c.broken}),f.jsxs("span",{className:"text-sm text-muted-foreground",children:["/ ",c.total," broken"]})]}),m?f.jsxs("span",{className:se("flex items-center gap-1 text-sm",le.good),children:[f.jsx(ni,{size:14})," all ",c.total," reference",c.total===1?"":"s"," resolve"]}):f.jsxs("span",{className:se("flex items-center gap-1 text-sm",le.bad),children:[f.jsx(ry,{size:14})," ",c.broken," broken reference",c.broken===1?"":"s"," found"]})]}),c.brokenRefs.length>0&&f.jsx("div",{className:"mt-4 flex flex-col gap-2",children:c.brokenRefs.map((g,o)=>f.jsx(t0,{r:g},o))})]})}function zm(){const c=window.__VIGILES_SERVE__;return c&&typeof c.token=="string"?c:null}async function a0(c,m,g){try{const o=await fetch(c,{method:"POST",headers:{"content-type":"application/json","x-vigiles-token":g},body:JSON.stringify(m)}),x=await o.json();return{ok:x.ok??o.ok,message:x.message??""}}catch(o){return{ok:!1,message:o instanceof Error?o.message:String(o)}}}const jm="inline-flex items-center gap-2 rounded-md border border-border bg-card px-3 py-1.5 text-left text-xs font-medium hover:border-foreground disabled:opacity-60";function Nm({command:c,label:m}){const[g,o]=xt.useState(!1),x=()=>{var N;(N=navigator.clipboard)==null||N.writeText(c).then(()=>{o(!0),setTimeout(()=>o(!1),1500)},()=>{})};return f.jsxs("button",{type:"button",onClick:x,title:`Copy: ${c}`,className:jm,children:[g?f.jsx(Ba,{size:14,className:le.good}):f.jsx(ui,{size:14,className:"text-muted-foreground"}),f.jsx("span",{className:se(g&&le.good),children:g?"copied!":m})]})}function Tm({endpoint:c,body:m,token:g,label:o}){const[x,N]=xt.useState("idle"),[C,O]=xt.useState(""),A=()=>{N("running"),a0(c,m,g).then(S=>{N(S.ok?"done":"error"),O(S.message)})};return f.jsxs("button",{type:"button",onClick:A,disabled:x==="running"||x==="done",title:x==="error"?C:o,className:jm,children:[x==="running"&&f.jsx(dy,{size:14,className:"animate-spin text-muted-foreground"}),x==="done"&&f.jsx(Ba,{size:14,className:le.good}),x==="error"&&f.jsx(yy,{size:14,className:le.bad}),x==="idle"&&f.jsx(dm,{size:14,className:"text-muted-foreground"}),f.jsx("span",{className:se(x==="done"&&le.good,x==="error"&&le.bad),children:x==="done"?"created":x==="error"?"failed":x==="running"?"creating…":o})]})}function n0({path:c,command:m}){const g=zm();return f.jsxs("div",{className:"flex flex-wrap items-center gap-3 border-l-4 border-l-warn p-3",children:[f.jsx("code",{className:"font-mono text-xs text-foreground",children:c}),f.jsx("div",{className:"ml-auto",children:g?f.jsx(Tm,{endpoint:"/adopt",body:{target:c},token:g.token,label:"Create spec"}):f.jsx(Nm,{command:m,label:"Create spec"})})]})}function u0({data:c}){const m=zm();return f.jsxs(nl,{className:"p-5",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(dm,{size:16,className:"text-muted-foreground"}),c.surfaces.length," surface",c.surfaces.length===1?"":"s"," not yet spec-managed"]}),f.jsx("div",{className:"ml-auto",children:m?f.jsx(Tm,{endpoint:"/adopt-all",body:{},token:m.token,label:"Create all specs"}):f.jsx(Nm,{command:c.createAllCommand,label:"Create all specs"})})]}),f.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:m?"Click to create the typed spec — this report is live, so the CLI writes it for you (re-run audit to see it spec-managed).":"Copy the command and run it in your terminal — the CLI writes the typed spec (the browser can’t write files)."}),c.surfaces.length>0&&f.jsx("div",{className:"mt-4 flex flex-col gap-2",children:c.surfaces.map(g=>f.jsx(n0,{path:g.path,command:g.command},g.path))})]})}const i0="inline-flex items-center gap-2 rounded-md border border-border bg-card px-3 py-1.5 text-left text-xs font-medium hover:border-foreground disabled:opacity-60";function c0({item:c}){const[m,g]=xt.useState(!1),o=c.configState==="contradiction"?`In this repo, the ${c.linter} rule \`${c.rule}\` is set to "off" in the lint config, but the instructions document "${c.intent}" as a rule. Resolve the contradiction: either remove the override so \`${c.rule}\` is enforced (${c.configFix}), or drop the documented rule if it's intentionally off.`:`In this repo, enable the ${c.linter} rule \`${c.rule}\` (set it to "error") in the lint config, so the documented rule "${c.intent}" is actually enforced. Config to add: ${c.configFix}`,x=()=>{var N;(N=navigator.clipboard)==null||N.writeText(o).then(()=>{g(!0),setTimeout(()=>g(!1),1500)},()=>{})};return f.jsxs("button",{type:"button",onClick:x,title:o,className:i0,children:[m?f.jsx(Ba,{size:14,className:le.good}):f.jsx(ui,{size:14,className:"text-muted-foreground"}),f.jsx("span",{className:se(m&&le.good),children:m?"copied!":"copy agent prompt"})]})}function li({item:c,tone:m,label:g,action:o}){return f.jsxs(nl,{className:"flex flex-wrap items-center gap-x-3 gap-y-2 p-3 text-sm",children:[m==="good"?f.jsx(Ba,{size:16,className:le.good}):f.jsx("span",{className:se("text-lg leading-none",m==="warn"?le.warn:m==="bad"?le.bad:"text-muted-foreground"),children:"●"}),f.jsx("span",{className:"min-w-[12rem] flex-1",children:c.intent}),f.jsx("code",{className:"font-mono text-xs text-muted-foreground",children:c.rule}),f.jsx("span",{className:se("text-xs",m==="good"?le.good:m==="warn"?le.warn:m==="bad"?le.bad:"text-muted-foreground"),children:g}),o&&f.jsx(c0,{item:c})]})}function nm({title:c,tone:m,children:g}){return f.jsxs("details",{className:"group",children:[f.jsxs("summary",{className:se("flex cursor-pointer list-none items-center gap-1.5 py-1 text-xs font-medium",m==="good"?le.good:"text-muted-foreground"),children:[f.jsx(ai,{size:13,className:"transition-transform group-open:rotate-90"}),c]}),f.jsx("div",{className:"mt-2 space-y-2",children:g})]})}const Ds={reuse:{glyph:"✓",label:"enforceable now",blurb:"an off-the-shelf rule already exists → one config line"},hook:{glyph:"⛓",label:"hook",blurb:"an action rule a linter can't see (git push, rm -rf) → a hook gates it"},meta:{glyph:"☰",label:"agent note",blurb:"an instruction to the agent, not a code rule → stays prose"},semantic:{glyph:"✎",label:"judgment call",blurb:"no checker can decide it (“readable”, “idiomatic”) → honestly stays prose"},unrouted:{glyph:"⚙",label:"custom rule",blurb:"no off-the-shelf rule fits, but a custom one CAN — the opt-in synthesis skill writes + gates it (abstains if it can't prove it sound)"}},s0=["reuse","hook","meta","semantic","unrouted"];function f0({routing:c}){const m=o=>{var x;return(x=c==null?void 0:c.rules.find(N=>N.category===o))==null?void 0:x.text},g=((c==null?void 0:c.rules)??[]).filter(o=>o.category==="reuse"&&o.enabled===!1);return f.jsxs("div",{className:"rounded-lg border border-dashed border-border p-4",children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(hy,{size:15,className:"text-muted-foreground"}),"Your rules, mapped",f.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:"deterministic · no model"})]}),c&&c.segmented>0?f.jsxs(f.Fragment,{children:[f.jsxs("p",{className:"mt-1.5 text-xs text-muted-foreground",children:["We segmented"," ",f.jsx("span",{className:"font-semibold text-foreground",children:c.segmented})," ","atomic ",c.segmented===1?"rule":"rules"," from your instructions and routed each one — deterministically, no model:"]}),f.jsx("ul",{className:"mt-2 space-y-1.5 text-xs text-muted-foreground",children:s0.filter(o=>c.counts[o]>0).map(o=>{const x=m(o);return f.jsxs("li",{children:[f.jsxs("span",{className:"font-mono text-foreground",children:[Ds[o].glyph," ",c.counts[o]," ",Ds[o].label]})," ","— ",Ds[o].blurb,o==="reuse"&&g.length>0&&f.jsxs("span",{className:se("ml-1 font-semibold",le.bad),children:["(",g.length," documented but OFF)"]}),x&&f.jsxs("span",{className:"mt-0.5 block truncate pl-4 italic opacity-80",children:["e.g. “",x,"”"]})]},o)})}),g.length>0&&f.jsxs("div",{className:se("mt-2.5 rounded-md border p-2.5","border-l-4"),children:[f.jsxs("p",{className:se("text-xs font-semibold",le.bad),children:["⛔ ",g.length," documented but OFF"]}),f.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:["Your instructions name"," ",g.length===1?"this rule":"these rules"," as enforced, but your linter config has ",g.length===1?"it":"them"," ","disabled:"]}),f.jsxs("ul",{className:"mt-1 space-y-0.5",children:[g.slice(0,6).map(o=>f.jsxs("li",{className:"font-mono text-xs text-muted-foreground",children:[f.jsx("code",{className:le.bad,children:o.rule})," ",f.jsxs("span",{className:"opacity-70",children:["— ",o.text]})]},o.rule)),g.length>6&&f.jsxs("li",{className:"text-xs text-muted-foreground",children:["+",g.length-6," more"]})]})]}),f.jsx(um,{routing:c}),f.jsx(im,{})]}):f.jsxs(f.Fragment,{children:[f.jsx(um,{routing:c}),f.jsx("p",{className:"mt-1.5 text-xs text-muted-foreground",children:"Segments your instruction file into atomic rules and routes each one — deterministically, no model:"}),f.jsxs("ul",{className:"mt-2 space-y-1 text-xs text-muted-foreground",children:[f.jsxs("li",{children:[f.jsx("span",{className:"font-mono text-foreground",children:"✓ enforceable now"})," ","— an off-the-shelf rule already exists → enable it"]}),f.jsxs("li",{children:[f.jsx("span",{className:"font-mono text-foreground",children:"⛓ hook"})," — action rules a linter can't see (git push, rm -rf)"]}),f.jsxs("li",{children:[f.jsx("span",{className:"font-mono text-foreground",children:"⚙ custom rule"})," — no off-the-shelf rule fits, but a custom one CAN (“wrap API calls in retry”) → the opt-in synthesis skill, gated"]}),f.jsxs("li",{children:[f.jsx("span",{className:"font-mono text-foreground",children:"✎ judgment call"})," ","— genuinely undecidable (“readable”), honestly left as prose"]})]}),f.jsx(im,{})]})]})}function um({routing:c}){const m=(c==null?void 0:c.possible)??[],g=(c==null?void 0:c.skipped)??[];if(m.length===0&&g.length===0)return null;const o={};for(const x of g)o[x.reason]=(o[x.reason]??0)+1;return f.jsxs("div",{className:"mt-2.5 space-y-2",children:[m.length>0&&f.jsxs("div",{className:"rounded-md border border-dashed border-border p-2.5",children:[f.jsxs("p",{className:"text-xs font-semibold text-foreground",children:["? ",m.length," possible — rule-ish, below the confidence bar (review)"]}),f.jsxs("ul",{className:"mt-1 space-y-0.5",children:[m.slice(0,6).map((x,N)=>f.jsxs("li",{className:"truncate text-xs italic text-muted-foreground opacity-80",children:["“",x.text,"”"]},`${x.lineStart}-${N}`)),m.length>6&&f.jsxs("li",{className:"text-xs text-muted-foreground",children:["+",m.length-6," more"]})]})]}),g.length>0&&f.jsxs("p",{className:"text-xs text-muted-foreground",children:["⊘ ",g.length," skipped — not treated as rules (",Object.entries(o).map(([x,N])=>`${N} ${x}`).join(" · "),")"]}),f.jsx("p",{className:"text-xs text-muted-foreground opacity-70",children:"Detection is a best-effort, precision-first filter — it won’t catch every rule. Full per-bullet lists are in the JSON report."})]})}function im(){return f.jsxs("div",{className:"mt-2.5 space-y-1 text-xs text-muted-foreground",children:[f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"Enforceable now"})," — enable each in your lint config (one line), or ask your agent to run the"," ",f.jsx("code",{className:"rounded bg-border px-1 font-mono",children:"strengthen"})," ","skill."]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"Hooks"})," — author a compiled hook in"," ",f.jsx("code",{className:"rounded bg-border px-1 font-mono",children:".vigiles/hooks/"}),", then"," ",f.jsx("code",{className:"rounded bg-border px-1 font-mono",children:"npx vigiles compile"})," ","wires it into your settings."]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"Custom rule (⚙)"})," — no off-the-shelf rule fits, but a custom one CAN enforce it (e.g. “wrap API calls in a retry”). Doable, not a dead end — the opt-in synthesis skill writes and gates it (with a bit of codebase context); it abstains rather than ship a checker it can’t prove sound. Nothing is generated for you automatically."]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"Judgment call (✎)"})," — genuinely undecidable (“keep it readable”); no checker can decide it, so it honestly stays prose."]})]})}function o0({data:c,routing:m}){const g=c.filter(A=>A.configState==="in-config"),o=c.filter(A=>A.configState==="preset-maybe"),x=c.filter(A=>A.configState==="not-in-config"),N=c.filter(A=>A.configState==="contradiction"),C=c.length,O=(A,S)=>A>0?f.jsx("div",{className:se(S),style:{flexGrow:A},"aria-hidden":!0}):null;return f.jsxs("div",{className:"space-y-4",children:[f.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[f.jsxs("p",{className:"text-sm text-muted-foreground",children:[f.jsx("span",{className:se("font-semibold",le.good),children:g.length})," ","of ",C," enforced",o.length>0&&f.jsxs(f.Fragment,{children:[" · ",f.jsx("span",{className:"font-semibold text-foreground",children:o.length})," ","likely via a preset"]}),x.length>0&&f.jsxs(f.Fragment,{children:[" · ",f.jsx("span",{className:se("font-semibold",le.warn),children:x.length})," ",x.length===1?"is":"are"," one config line away"]}),N.length>0&&f.jsxs(f.Fragment,{children:[" · ",f.jsx("span",{className:se("font-semibold",le.bad),children:N.length})," ","contradicted by config"]}),"."]}),f.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-muted-foreground",children:[f.jsx(vy,{size:12})," deterministic · no model"]})]}),f.jsxs("div",{className:"flex h-2 overflow-hidden rounded-full bg-border",children:[O(g.length,Ha.good),O(o.length,Ha.na),O(x.length,Ha.warn),O(N.length,Ha.bad)]}),N.length>0&&f.jsx("div",{className:"space-y-2",children:N.map(A=>f.jsx(li,{item:A,tone:"bad",label:"⛔ set to off in your config — your call",action:!0},A.rule))}),x.length>0&&f.jsx("div",{className:"space-y-2",children:x.map(A=>f.jsx(li,{item:A,tone:"warn",label:"enable in 1 line",action:!0},A.rule))}),g.length>0&&f.jsx(nm,{title:`✓ ${g.length} already enforced`,tone:"good",children:g.map(A=>f.jsx(li,{item:A,tone:"good",label:"enforced"},A.rule))}),o.length>0&&f.jsx(nm,{title:`◦ ${o.length} likely enforced via a preset`,tone:"muted",children:o.map(A=>f.jsx(li,{item:A,tone:"muted",label:"preset?"},A.rule))}),f.jsx(f0,{routing:m})]})}function r0({data:c}){return f.jsxs(nl,{className:"p-5",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[f.jsx(my,{size:16,className:"text-muted-foreground"}),c.total," record",c.total===1?"":"s"," recorded"]}),f.jsx("div",{className:"ml-auto flex flex-wrap gap-1.5",children:c.counts.map(m=>f.jsxs(Bn,{variant:"outline",children:[m.count," ",m.kind]},m.kind))})]}),c.recentDenials.length>0&&f.jsxs("div",{className:"mt-4 flex flex-col gap-2",children:[f.jsxs("div",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:["Recent denials (",c.denials,")"]}),c.recentDenials.map((m,g)=>f.jsxs("div",{className:se("flex flex-wrap items-center gap-2 border-l-4 p-3 text-sm",ii.bad),children:[f.jsx(fy,{size:14,className:le.bad}),f.jsx("code",{className:"font-mono text-xs",children:m.label}),f.jsx("span",{className:"text-muted-foreground",children:m.reason})]},g))]})]})}const cm="Measure whether my skills actually fire (recall + precision). This is the test/eval tier, not the read-only audit — so if vigiles isn't set up in this repo yet, run `npx vigiles init` first (that installs the test-harness skill), then use that skill to run measureTriggerRate. Report each skill's recall (does it fire when it should?) and precision (does it stay quiet on unrelated prompts?). It runs on my Claude subscription — no API key.",d0=new Set(["lethal-trifecta","subagent-tool-contract","mcp-tool-resolves","hook-events","hook-script-exists","description-overlap","skill-frontmatter","subagent-frontmatter"]);function m0(c){return`https://vigiles.sh/checks/${c}/`}function Em({slug:c,children:m,className:g}){return d0.has(c)?f.jsx("a",{href:m0(c),target:"_blank",rel:"noreferrer",className:se("underline decoration-dotted underline-offset-2",g),children:m}):f.jsx("span",{className:g,children:m})}function sm({text:c,advisory:m}){const g=c.replace(/\s*\(advisory\)\s*$/,"");return f.jsxs("span",{children:[f.jsx("span",{children:g}),m&&f.jsx("span",{className:"text-na",children:" · advisory, not graded"})]})}function Bs(c){const m=c.replace(/[/\\]+$/,"").split(/[/\\]/);return m[m.length-1]||c}function h0(c){const m=c.find(g=>g.key==="Safety");return!m||m.advisory||m.score===null?[]:m.findings.filter(g=>!g.endsWith("(advisory)"))}function fm({clean:c}){return c?f.jsxs(nl,{className:"flex items-center gap-2 p-4 text-sm text-good",children:[f.jsx(ni,{size:16})," No deterministic fixes — the structure is clean."]}):f.jsx(nl,{className:"p-4 text-sm text-muted-foreground",children:"No deterministic auto-fixes — review the flagged findings above."})}function g0(c){return c>=8?"bad":c>=3?"warn":"na"}function y0({r:c}){const[m,g]=xt.useState(!1),o=`In this repo, ${c.fix}. Context: ${c.rationale} (detector: ${c.detector}).`,x=()=>{var N;(N=navigator.clipboard)==null||N.writeText(o).then(()=>{g(!0),setTimeout(()=>g(!1),1500)},()=>{})};return f.jsxs("button",{type:"button",onClick:x,title:o,className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-card px-2.5 py-1 text-xs font-medium hover:border-foreground",children:[m?f.jsx(Ba,{size:13,className:le.good}):f.jsx(ui,{size:13,className:"text-muted-foreground"}),f.jsx("span",{className:se(m&&le.good),children:m?"copied!":"copy agent prompt"})]})}function Us({r:c,points:m}){const g=c.action==="fix"?gy:oy,o=g0(m);return f.jsxs("div",{className:se("rounded-xl border border-l-4 border-border/40 bg-card/30 p-5",ii[o]),children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[f.jsxs(Bn,{children:[f.jsx(g,{size:12,className:"mr-1"}),c.action]}),f.jsx("strong",{children:c.surface}),m>0&&f.jsxs("span",{className:se("rounded-full px-2 py-0.5 text-xs font-semibold",le[o]),children:["+",m," pts"]}),f.jsx(Em,{slug:c.detector,className:"ml-auto hidden font-mono text-xs text-muted-foreground hover:text-foreground sm:inline",children:c.detector})]}),f.jsx("div",{className:"mt-2.5 text-sm leading-relaxed text-muted-foreground",children:c.rationale}),f.jsxs("div",{className:"mt-3.5 flex flex-wrap items-center justify-between gap-2",children:[f.jsxs("span",{className:"text-sm leading-relaxed text-good",children:["→ ",c.fix]}),f.jsx(y0,{r:c})]})]})}function v0({finding:c}){return f.jsx("div",{className:se("rounded-xl border border-l-4 border-border/40 bg-card/30 p-5",ii.bad),children:f.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[f.jsxs(Bn,{children:[f.jsx(hm,{size:12,className:"mr-1"}),"safety"]}),f.jsxs("span",{className:"leading-relaxed text-muted-foreground",children:[c," ",f.jsx(Em,{slug:"lethal-trifecta",className:"text-muted-foreground hover:text-foreground",children:"what's this?"})]}),f.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:"your call — no deterministic fix"})]})})}function p0({c}){const m=c.advisory?"na":Xs(c.score),g=c.score===null?0:Math.max(0,Math.min(100,c.score));return f.jsxs(nl,{className:"flex flex-col gap-2 p-3",children:[f.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[f.jsx("span",{className:"text-xs font-semibold",children:c.key}),f.jsx("span",{className:se(c.notMeasured?"text-[11px] font-semibold":"text-sm font-bold",le[m]),children:c.notMeasured?"not measured":c.advisory?"—":c.score===null?"n/a":c.score})]}),f.jsx("div",{className:"h-1.5 overflow-hidden rounded-full bg-border",children:f.jsx("div",{className:se("h-full rounded-full",Ha[m]),style:{width:`${g}%`}})}),f.jsx("div",{className:"h-8 overflow-hidden text-[11px] leading-tight text-muted-foreground",children:c.notMeasured?f.jsx("span",{className:"line-clamp-2 text-na",children:c.findings[c.findings.length-1]??"never measured"}):c.advisory?f.jsx("span",{className:"text-na",children:"advisory — not graded"}):c.findings.length>0?f.jsxs("span",{className:"line-clamp-2",children:[c.findings[0],c.findings.length>1&&f.jsxs("span",{className:"text-foreground",children:[" ","· +",c.findings.length-1," more"]})]}):f.jsxs("span",{className:"inline-flex items-center gap-1 text-good",children:[f.jsx(ni,{size:11})," clean"]})})]})}function b0({c,refs:m}){const g=c.advisory?"na":Xs(c.score),o=c.score===null?0:Math.max(0,Math.min(100,c.score)),x=c.findings.map(U=>({text:U,advisory:!!c.advisory||U.endsWith("(advisory)")})),N=[...x.filter(U=>!U.advisory),...x.filter(U=>U.advisory)],[C,...O]=N,A=c.key==="Safety"&&C&&!C.advisory,S=py(c);return f.jsxs("div",{className:"py-3",children:[f.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[f.jsx("span",{className:"text-sm font-medium",children:c.key}),f.jsx("span",{className:se("font-mono text-sm font-bold",le[g]),children:S})]}),f.jsx("div",{className:"mt-1.5 h-1 overflow-hidden rounded-full bg-border",children:f.jsx("div",{className:se("h-full rounded-full",Ha[g]),style:{width:`${o}%`}})}),f.jsx("div",{className:"mt-2 text-[13px] leading-snug text-muted-foreground",children:C?f.jsxs(f.Fragment,{children:[A&&f.jsx(hm,{size:12,className:se("mr-1 inline align-[-2px]",le.bad),"aria-hidden":!0}),f.jsx(sm,{text:C.text,advisory:C.advisory}),m&&m.length>0&&f.jsx("ul",{className:"mt-1 space-y-0.5",children:m.map(U=>f.jsxs("li",{className:"font-mono text-[11px] text-na",children:["↳ ",U," ",f.jsx("span",{className:"text-muted-foreground",children:"— missing"})]},U))}),O.length>0&&f.jsxs("details",{className:"group mt-1",children:[f.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1 text-[11px] font-medium text-muted-foreground/80 hover:text-foreground",children:[f.jsx(ai,{size:11,className:"transition-transform group-open:rotate-90"}),"+ ",O.length," more"]}),f.jsx("ul",{className:"mt-1 space-y-1 border-l border-border/50 pl-3",children:O.map((U,H)=>f.jsx("li",{children:f.jsx(sm,{text:U.text,advisory:U.advisory})},H))})]})]}):f.jsxs("span",{className:"inline-flex items-center gap-1 text-good",children:[f.jsx(ni,{size:12})," clean"]})})]})}function x0({onUnlock:c}){const[m,g]=xt.useState(!1),o=()=>{var x;c==null||c(),(x=navigator.clipboard)==null||x.writeText(cm).then(()=>{g(!0),setTimeout(()=>g(!1),2200)},()=>{})};return f.jsxs("div",{className:"rounded-xl border border-dashed border-border/70 bg-card/20 p-4",children:[f.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-4",children:[f.jsxs("div",{className:"min-w-0 sm:flex-1",children:[f.jsxs("div",{className:"flex items-center gap-1.5 text-sm font-medium",children:[f.jsx(mm,{size:13,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),"Do your skills actually fire?"]}),f.jsx("p",{className:"mt-1 text-[13px] leading-snug text-muted-foreground",children:"Needs a real model, not a browser — recall (fires when it should) + precision (stays quiet otherwise)."}),f.jsxs("div",{className:"mt-2 flex items-center gap-2 font-mono text-xs text-muted-foreground",children:[f.jsxs("span",{"aria-hidden":!0,children:["recall ",f.jsx("span",{className:"font-bold text-foreground",children:"—"})," · precision ",f.jsx("span",{className:"font-bold text-foreground",children:"—"})]}),f.jsx("span",{className:"rounded bg-muted/60 px-1.5 py-0.5 text-[10px] font-medium uppercase not-italic tracking-wide text-muted-foreground/80",children:"run to fill"}),f.jsx("span",{className:"sr-only",children:"Recall and precision are unmeasured here — run vigiles locally to measure your skills' real numbers."})]})]}),f.jsx("div",{className:"flex flex-col items-start gap-1 sm:shrink-0 sm:items-end",children:f.jsx("button",{type:"button",onClick:o,title:cm,className:"inline-flex items-center gap-1.5 whitespace-nowrap rounded-md border border-border bg-card px-3 py-1.5 text-xs font-semibold transition-colors hover:border-foreground",children:m?f.jsxs(f.Fragment,{children:[f.jsx(Ba,{size:13,"aria-hidden":!0,className:se("shrink-0",le.good)}),f.jsx("span",{className:le.good,children:"Copied — paste into Claude Code"})]}):f.jsxs(f.Fragment,{children:[f.jsx(ui,{size:13,"aria-hidden":!0,className:"shrink-0 text-muted-foreground"}),"Copy prompt →"]})})})]}),f.jsx("p",{className:"mt-2 text-[11px] text-muted-foreground",children:"Runs on your Claude subscription — no API key."})]})}function S0(){return f.jsxs("div",{className:"mt-2.5 rounded-xl border border-dashed border-border/70 bg-card/20 p-4",children:[f.jsxs("div",{className:"flex items-center gap-1.5 text-sm font-medium",children:[f.jsx(mm,{size:13,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),"Your rules → enforced",f.jsx("span",{className:"rounded bg-muted/60 px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:"CLI only"})]}),f.jsx("p",{className:"mt-1 text-[13px] leading-snug text-muted-foreground",children:"Locally, vigiles maps each prose rule to the linter rule that enforces it — and flags a rule you told the agent to follow that's silently off in your config."}),f.jsx("pre",{className:"mt-2 whitespace-pre-wrap break-words rounded-md border border-border bg-card/40 px-3 py-2 font-mono text-xs leading-relaxed text-foreground",children:'"always use ===" → eqeqeq is "off" in your ESLint config'}),f.jsx("p",{className:"mt-2 text-[11px] leading-snug text-muted-foreground/70",children:"Covers JS, Python, Rust, Ruby, JVM & Go linters. On an unknown stack, references, structure & safety are still verified."})]})}function om({verdict:c,overall:m,dir:g,harness:o,compact:x=!1,subline:N}){const C=Xs(m),O=x?"h-20 w-20 rounded-xl text-4xl":"h-28 w-28 rounded-2xl text-5xl",A=f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:se("flex shrink-0 flex-col items-center justify-center border-2",O,Py[C]),children:[f.jsx("span",{className:se("font-black leading-none",le[C]),children:c.grade}),f.jsx("span",{className:"mt-1 text-xs font-medium text-muted-foreground",children:m===null?"—":`${m}/100`})]}),f.jsxs("div",{className:"min-w-0",children:[f.jsx("h1",{className:se("font-bold leading-snug tracking-tight",x?"text-lg sm:text-xl":"text-xl sm:text-2xl"),children:c.sentence}),f.jsxs("div",{className:"mt-2 text-sm text-muted-foreground",children:[f.jsx("span",{className:"font-medium text-foreground",children:Bs(g)})," ·"," ",o,N]}),!x&&f.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:"deterministic · no model · nothing leaves your machine"})]})]});return x?f.jsx("div",{className:"flex flex-col gap-6 sm:flex-row sm:items-center",children:A}):f.jsx(nl,{className:"flex flex-col gap-5 p-7 sm:flex-row sm:items-center",children:A})}function z0({n:c,children:m}){return c<=0?null:f.jsxs("details",{className:"group mt-2.5",children:[f.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-xs font-semibold uppercase tracking-widest text-muted-foreground hover:text-foreground",children:[f.jsx(ai,{size:13,className:"transition-transform group-open:rotate-90"}),"+ ",c," more"]}),f.jsx("div",{className:"mt-2.5 flex flex-col gap-2.5",children:m})]})}const Rs="mb-4 mt-12 text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground/70";function j0({data:c,showFooter:m=!0,variant:g="full",onUnlock:o}){var _e,Ne;const{score:x,verdict:N,recommendations:C,inventory:O,meta:A,adoptability:S,adoptable:U,observations:H,rulesInventory:w,ruleRouting:de,brokenReferences:ye}=c,Z=x.empty?null:x.overall;xt.useEffect(()=>{g==="full"&&(document.title=Z===null?`vigiles — ${Bs(A.dir)}`:`vigiles — ${x.grade} (${Z}) · ${Bs(A.dir)}`)},[g,Z,x.grade,A.dir]);const I=W=>{var be;return((be=N.perRecommendation.find(Te=>Te.index===W))==null?void 0:be.pointsIfFixed)??0},ue=C.map((W,be)=>({r:W,points:I(be)})).sort((W,be)=>be.points-W.points);if(g==="summary"){const W=(fe,qe)=>fe&&`${fe} ${qe}${fe===1?"":"s"}`,be=[W(O.skills,"skill"),W(O.agents,"agent"),W(O.hooks,"hook"),W(O.commands,"command")].filter(Boolean),Te=ue.slice(0,3),J=ue.slice(3);return f.jsxs("div",{children:[f.jsx(om,{compact:!0,verdict:N,overall:Z,dir:A.dir,harness:A.harness,subline:f.jsxs(f.Fragment,{children:[be.map(fe=>f.jsxs("span",{children:[" · ",fe]},fe)),O.untested>0&&f.jsxs("span",{className:le.warn,children:[" ","· ",O.untested," untested"]})]})}),f.jsx("h2",{className:Rs,children:"Categories — and what's flagged"}),f.jsx("div",{className:"divide-y divide-border/40",children:x.categories.map(fe=>f.jsx(b0,{c:fe,refs:fe.key==="Truthfulness"?ye:void 0},fe.key))}),f.jsx("p",{className:"mb-2.5 mt-6 text-[11px] font-medium uppercase tracking-[0.14em] text-muted-foreground/60",children:"What the browser can't do here"}),f.jsx(x0,{onUnlock:o}),f.jsx(S0,{}),C.length>0?f.jsxs(f.Fragment,{children:[f.jsx("h2",{className:Rs,children:"Do these first"}),f.jsx("div",{className:"flex flex-col gap-2.5",children:Te.map(({r:fe,points:qe},Pe)=>f.jsx(Us,{r:fe,points:qe},Pe))}),f.jsx(z0,{n:J.length,children:J.map(({r:fe,points:qe},Pe)=>f.jsx(Us,{r:fe,points:qe},Pe))})]}):x.overall===100&&f.jsxs(f.Fragment,{children:[f.jsx("h2",{className:Rs,children:"Fixes"}),f.jsx(fm,{clean:!0})]})]})}return f.jsxs("div",{className:"mx-auto max-w-5xl px-6 pb-16 pt-10",children:[f.jsx(om,{verdict:N,overall:Z,dir:A.dir,harness:A.harness}),f.jsx("h2",{className:"mb-3 mt-9 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Categories"}),f.jsx("div",{className:"grid grid-cols-2 gap-2.5 sm:grid-cols-3 lg:grid-cols-6",children:x.categories.map(W=>f.jsx(p0,{c:W},W.key))}),f.jsx("h2",{className:"mb-3 mt-9 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:C.length>0?"Do these first":"Fixes"}),ue.length>0?f.jsx("div",{className:"flex flex-col gap-2.5",children:ue.map(({r:W,points:be},Te)=>f.jsx(Us,{r:W,points:be},Te))}):f.jsx(fm,{clean:x.overall===100}),(()=>{const W=h0(x.categories);return W.length===0?null:f.jsxs(f.Fragment,{children:[f.jsx("h2",{className:"mb-3 mt-9 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Review — no auto-fix"}),f.jsx("div",{className:"flex flex-col gap-2.5",children:W.map((be,Te)=>f.jsx(v0,{finding:be},Te))})]})})(),S&&f.jsxs(f.Fragment,{children:[f.jsx("h2",{className:"mb-3 mt-9 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Broken references"}),f.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Machine-verifiable references in your instruction file — files, scripts, symbols — checked against your actual repo and config. These don't resolve."}),f.jsx(l0,{data:S})]}),H&&H.total>0&&f.jsxs(f.Fragment,{children:[f.jsx("h2",{className:"mb-3 mt-9 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:"Flight recorder"}),f.jsxs("p",{className:"mb-3 text-xs text-muted-foreground",children:["What your harness actually did in real sessions — read off the local",f.jsx("code",{className:"mx-1 font-mono",children:".vigiles/runs.jsonl"})," ledger."]}),f.jsx(r0,{data:H})]}),(w&&w.length>0||de&&(de.segmented>0||(((_e=de.possible)==null?void 0:_e.length)??0)>0||(((Ne=de.skipped)==null?void 0:Ne.length)??0)>0))&&f.jsxs(f.Fragment,{children:[f.jsxs("h2",{className:"mb-3 mt-9 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:["Your rules → enforced",f.jsx(Bn,{className:"border-warn text-warn",children:"experimental"})]}),((w==null?void 0:w.length)??0)===0?f.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"No supported linter resolved here. Rule cross-referencing covers ESLint, Ruff, Pylint, Clippy & RuboCop — on other stacks your references, structure & safety are still verified; enforcing a documented rule just needs one of those linters."}):f.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"Prose rules in your instruction file that map to an off-the-shelf lint rule — and whether it's actually enforced. Detection is a heuristic, precision-first preview: it won't catch every rule."}),f.jsx(o0,{data:w??[],routing:de})]}),f.jsxs("div",{className:"mt-9 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[f.jsx("span",{className:"font-semibold uppercase tracking-widest",children:"Ships"}),f.jsxs("span",{children:[O.skills," skills"]}),f.jsxs("span",{children:[O.agents," agents"]}),f.jsxs("span",{children:[O.hooks," hooks"]}),f.jsxs("span",{children:[O.commands," commands"]}),f.jsxs("span",{children:["MCP ",O.mcp?"yes":"no"]}),O.untested>0&&f.jsxs("span",{className:le.warn,children:[O.untested," untested"]})]}),U&&U.surfaces.length>0&&f.jsxs("details",{className:"group mt-6",children:[f.jsxs("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-xs font-semibold uppercase tracking-widest text-muted-foreground hover:text-foreground",children:[f.jsx(ai,{size:13,className:"transition-transform group-open:rotate-90"}),"Optional — turn ",U.surfaces.length," surface",U.surfaces.length>1?"s":""," into typed specs"]}),f.jsx("p",{className:"mb-3 mt-3 text-xs text-muted-foreground",children:"Hardening, not a fix: make vigiles verify these surfaces' references — fully, or one at a time. Skip it until you want CI to gate them."}),f.jsx(u0,{data:U})]}),m&&f.jsx("footer",{className:"mt-12 text-center text-xs text-muted-foreground",children:"Generated by vigiles — we run your harness, not just read it."})]})}const N0={meta:{schemaVersion:2,tool:"vigiles",kind:"audit",vigilesVersion:"0.0.0",harness:"claude-code",dir:"my-plugin"},score:{overall:77,grade:"C",empty:!1,instructionsOnly:!1,categories:[{key:"Truthfulness",score:100,weight:1,findings:[]},{key:"Triggering",score:92,weight:1,findings:["1 near-identical skill description (wrong one fires)"]},{key:"Structure",score:92,weight:1,findings:["1 agent tool that doesn't exist (typo / never-available)"]},{key:"Safety",score:80,weight:1,findings:["1 subagent holding all three lethal-trifecta legs (prompt-injection exfil path)"]},{key:"Tested",score:88,weight:1,advisory:!0,findings:["4 surfaces with no vigiles harness (deterministic, free)"]},{key:"Evaluated",score:null,weight:1,advisory:!0,notMeasured:!0,findings:["4 surfaces whose firing was never measured","not measured — run `npx vigiles audit` interactively to measure, or add a `*.eval.mjs` (`paid_measureTriggerRate`, vigiles/eval)"]}]},verdict:{sentence:"Two one-line fixes away from a B.",grade:"C",pointsToNextGrade:3,fixesToNextGrade:2,perRecommendation:[{index:0,pointsIfFixed:4},{index:1,pointsIfFixed:2}]},recommendations:[{surface:"reviewer",action:"fix",rationale:`Unknown tool "Reed" — silently dropped, the agent can't use it.`,fix:'change the tool "Reed" to "Read"',detector:"subagent-tool-contract",confidence:"likely"},{surface:"deploy ↔ ship",action:"differentiate",rationale:"Near-identical descriptions (0.92 similar) — the selector can't tell them apart.",fix:"differentiate the descriptions of deploy and ship",detector:"description-overlap",confidence:"possible"}],inventory:{skills:2,agents:1,hooks:1,commands:0,mcp:!1,untested:4,untestedHarness:4,unevaluated:4},adoptable:{createAllCommand:"npx vigiles init",surfaces:[{path:"skills/deploy/SKILL.md",command:"npx vigiles init --target=skills/deploy/SKILL.md"},{path:"agents/reviewer.md",command:"npx vigiles init --target=agents/reviewer.md"}]},adoptability:{total:7,broken:2,brokenRefs:[{kind:"file",ref:"src/auth/login.ts",issue:"file does not exist"},{kind:"dir",ref:"packages/legacy/",issue:"directory does not exist"}]},ruleRouting:{segmented:8,counts:{reuse:3,hook:2,meta:0,semantic:1,unrouted:2},rules:[{text:"Never use `console.log` in shipped code.",quote:"- Never use `console.log` in shipped code.",file:"CLAUDE.md",lineStart:12,lineEnd:12,confidence:"high",category:"reuse",mechanism:"config-line",rule:"no-console",linter:"eslint",enabled:!1,source:"marker"},{text:"Never push directly to `main` — open a PR.",quote:"- Never push directly to `main` — open a PR.",file:"CLAUDE.md",lineStart:18,lineEnd:18,confidence:"high",category:"hook",mechanism:"hook"},{text:"Run `npm test` before every commit.",quote:"- Run `npm test` before every commit.",file:"CLAUDE.md",lineStart:19,lineEnd:19,confidence:"high",category:"hook",mechanism:"hook"},{text:"Write clear, self-documenting code.",quote:"- Write clear, self-documenting code.",file:"CLAUDE.md",lineStart:21,lineEnd:21,confidence:"high",category:"semantic",mechanism:"prose"},{text:"Prefer named exports over default exports.",quote:"- Prefer named exports over default exports.",file:"CLAUDE.md",lineStart:22,lineEnd:22,confidence:"high",category:"unrouted",mechanism:"synthesize"}]},rulesInventory:[{intent:"strict equality ===",linter:"eslint",matched:"eqeqeq",rule:"eqeqeq",configState:"contradiction",configFix:'"eqeqeq": "error"'},{intent:"no console.log / use the logger",linter:"eslint",matched:"console.log",rule:"no-console",configState:"not-in-config",configFix:'"no-console": "error"'},{intent:"no debugger",linter:"eslint",matched:"no-debugger",rule:"no-debugger",configState:"not-in-config",configFix:'"no-debugger": "error"'},{intent:"no `any` type",linter:"eslint",matched:"no-explicit-any",rule:"@typescript-eslint/no-explicit-any",configState:"in-config",configFix:'"@typescript-eslint/no-explicit-any": "error"'},{intent:"no floating promises",linter:"eslint",matched:"no-floating-promises",rule:"@typescript-eslint/no-floating-promises",configState:"preset-maybe",configFix:'"@typescript-eslint/no-floating-promises": "error"'}]},Hs=window.__VIGILES_DATA__,T0=Hs&&typeof Hs=="object"?Hs:N0;uy.createRoot(document.getElementById("root")).render(f.jsx(xt.StrictMode,{children:f.jsx(j0,{data:T0})}));</script>
|
|
156
156
|
<style rel="stylesheet" crossorigin>/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--spacing:.25rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-good:var(--good)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}button:not(:disabled),[role=button]:not(:disabled),summary,label[for],select:not(:disabled){cursor:pointer}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components;@layer utilities{.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.top-3{top:calc(var(--spacing) * 3)}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-9{margin-top:calc(var(--spacing) * 9)}.mt-12{margin-top:calc(var(--spacing) * 12)}.mr-1{margin-right:var(--spacing)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-8{height:calc(var(--spacing) * 8)}.h-20{height:calc(var(--spacing) * 20)}.h-28{height:calc(var(--spacing) * 28)}.h-full{height:100%}.w-20{width:calc(var(--spacing) * 20)}.w-28{width:calc(var(--spacing) * 28)}.max-w-5xl{max-width:var(--container-5xl)}.min-w-0{min-width:0}.min-w-\[12rem\]{min-width:12rem}.flex-1{flex:1}.shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-pointer{cursor:pointer}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-1{row-gap:var(--spacing)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border\/40>:not(:last-child)){border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){:where(.divide-border\/40>:not(:last-child)){border-color:color-mix(in oklab,var(--border) 40%,transparent)}}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-bad{border-color:var(--bad)}.border-border,.border-border\/40{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/40{border-color:color-mix(in oklab,var(--border) 40%,transparent)}}.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.border-border\/70{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/70{border-color:color-mix(in oklab,var(--border) 70%,transparent)}}.border-good{border-color:var(--good)}.border-na{border-color:var(--na)}.border-warn{border-color:var(--warn)}.border-l-bad{border-left-color:var(--bad)}.border-l-good{border-left-color:var(--good)}.border-l-na{border-left-color:var(--na)}.border-l-warn{border-left-color:var(--warn)}.bg-background{background-color:var(--background)}.bg-bad{background-color:var(--bad)}.bg-border{background-color:var(--border)}.bg-card,.bg-card\/20{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/20{background-color:color-mix(in oklab,var(--card) 20%,transparent)}}.bg-card\/30{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/30{background-color:color-mix(in oklab,var(--card) 30%,transparent)}}.bg-card\/40{background-color:var(--card)}@supports (color:color-mix(in lab,red,red)){.bg-card\/40{background-color:color-mix(in oklab,var(--card) 40%,transparent)}}.bg-good{background-color:var(--good)}.bg-na{background-color:var(--na)}.bg-warn{background-color:var(--warn)}.fill-bad{fill:var(--bad)}.fill-good{fill:var(--good)}.fill-na{fill:var(--na)}.fill-warn{fill:var(--warn)}.stroke-bad{stroke:var(--bad)}.stroke-border{stroke:var(--border)}.stroke-good{stroke:var(--good)}.stroke-na{stroke:var(--na)}.stroke-warn{stroke:var(--warn)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-7{padding:calc(var(--spacing) * 7)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-left{text-align:left}.align-\[-2px\]{vertical-align:-2px}.font-mono{font-family:var(--font-mono)}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.14em\]{--tw-tracking:.14em;letter-spacing:.14em}.tracking-\[0\.18em\]{--tw-tracking:.18em;letter-spacing:.18em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-bad{color:var(--bad)}.text-foreground{color:var(--foreground)}.text-good{color:var(--good)}.text-muted-foreground,.text-muted-foreground\/60{color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/60{color:color-mix(in oklab,var(--muted) 60%,transparent)}}.text-muted-foreground\/70{color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/70{color:color-mix(in oklab,var(--muted) 70%,transparent)}}.text-muted-foreground\/80{color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.text-muted-foreground\/80{color:color-mix(in oklab,var(--muted) 80%,transparent)}}.text-na{color:var(--na)}.text-warn{color:var(--warn)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline{text-decoration-line:underline}.decoration-dotted{text-decoration-style:dotted}.underline-offset-2{text-underline-offset:2px}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.group-open\:rotate-90:is(:where(.group):is([open],:popover-open,:open) *){rotate:90deg}@media(hover:hover){.hover\:border-foreground:hover{border-color:var(--foreground)}.hover\:text-foreground:hover{color:var(--foreground)}}.disabled\:opacity-60:disabled{opacity:.6}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:flex-1{flex:1}.sm\:shrink-0{flex-shrink:0}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:items-end{align-items:flex-end}.sm\:items-start{align-items:flex-start}.sm\:justify-between{justify-content:space-between}.sm\:gap-4{gap:calc(var(--spacing) * 4)}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}}@media(min-width:64rem){.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}}}:root{--background:#fafafa;--card:#fff;--border:#e4e4e7;--foreground:#09090b;--muted:#71717a;--good:#16a34a;--warn:#f59e0b;--bad:#ef4444;--na:#a1a1aa;--radius:.75rem}@media(prefers-color-scheme:dark){:root{--background:#10151e;--card:#171d28;--border:#232c3a;--foreground:#dbe1ea;--muted:#8b96a7;--good:#35c98a;--warn:#f2b34d;--bad:#f0726c;--na:#6b7688}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}</style>
|
|
157
157
|
</head>
|
|
158
158
|
<body>
|
package/dist/audit-score.d.ts
CHANGED
|
@@ -79,6 +79,13 @@ export interface AuditScore {
|
|
|
79
79
|
readonly categories: readonly CategoryScore[];
|
|
80
80
|
/** No loadable surface at all — overall 0, every category n/a. */
|
|
81
81
|
readonly empty: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* An instruction file was read and NOT ONE surface was — the state #240 was
|
|
84
|
+
* filed about. It is not `empty` (there is something to grade: refs, layout),
|
|
85
|
+
* so it carries a real score; but a score over zero skills, zero agents and
|
|
86
|
+
* zero commands must not be printed as if the machine had been inspected.
|
|
87
|
+
*/
|
|
88
|
+
readonly instructionsOnly: boolean;
|
|
82
89
|
}
|
|
83
90
|
export interface AuditScoreOptions {
|
|
84
91
|
/**
|
package/dist/audit-score.js
CHANGED
|
@@ -100,6 +100,20 @@ function truthfulness(r) {
|
|
|
100
100
|
return { key: "Truthfulness", score, weight: 1, findings };
|
|
101
101
|
}
|
|
102
102
|
function triggering(r) {
|
|
103
|
+
// 🔴 NO SKILL READ IS NOT A PERFECT SCORE. Every input below is drawn from
|
|
104
|
+
// `r.skills`, so with an empty list `scoreFrom` sums zero penalties and returns
|
|
105
|
+
// 100 — a number about nothing. That is how a repo whose skills live in a
|
|
106
|
+
// directory this tool does not know by name (#240) audits as A: the zero guard
|
|
107
|
+
// `isEmptyAudit` is switched off by the presence of an instruction file, and the
|
|
108
|
+
// graders then run over empty arrays. `evaluated()` below already answers this
|
|
109
|
+
// shape with `null`; this is the same answer for the same reason.
|
|
110
|
+
if (r.skills.length === 0)
|
|
111
|
+
return {
|
|
112
|
+
key: "Triggering",
|
|
113
|
+
score: null,
|
|
114
|
+
weight: 1,
|
|
115
|
+
findings: ["no skill read — nothing whose triggering could be scored"],
|
|
116
|
+
};
|
|
103
117
|
const noDesc = r.skills.filter((s) => !s.hasDescription).length;
|
|
104
118
|
const { score, findings } = scoreFrom([
|
|
105
119
|
{
|
|
@@ -172,6 +186,16 @@ function structure(r) {
|
|
|
172
186
|
weight: score_core_js_1.W_NO_DESCRIPTION,
|
|
173
187
|
label: "functional dir(s) misplaced inside `.claude-plugin/` (invisible)",
|
|
174
188
|
},
|
|
189
|
+
// A surface directory NO registered harness reads (#240). Same class as the
|
|
190
|
+
// row above — a real surface the harness cannot see — so the same weight and
|
|
191
|
+
// the same ring. It is graded rather than advisory for the reason the
|
|
192
|
+
// reporter gave: an empty scan that stays silent is indistinguishable from a
|
|
193
|
+
// clean one, and the A (100) it produced is the expensive half of the bug.
|
|
194
|
+
{
|
|
195
|
+
n: r.unclaimedSurfaces.length,
|
|
196
|
+
weight: score_core_js_1.W_NO_DESCRIPTION,
|
|
197
|
+
label: "surface dir(s) no harness reads (not in this grade)",
|
|
198
|
+
},
|
|
175
199
|
{
|
|
176
200
|
n: r.skillFenceIssues.length,
|
|
177
201
|
weight: score_core_js_1.W_NO_DESCRIPTION,
|
|
@@ -210,6 +234,7 @@ function structure(r) {
|
|
|
210
234
|
r.mcpHookIssues.length +
|
|
211
235
|
r.frontmatterIssues.length +
|
|
212
236
|
r.pluginLayoutIssues.length +
|
|
237
|
+
r.unclaimedSurfaces.length +
|
|
213
238
|
r.skillFenceIssues.length +
|
|
214
239
|
r.hookBlockFindings.length +
|
|
215
240
|
r.hookMatcherFindings.length;
|
|
@@ -320,6 +345,17 @@ function safety(r) {
|
|
|
320
345
|
* ring never silently reports 0 for a report that simply doesn't carry the field.
|
|
321
346
|
*/
|
|
322
347
|
function tested(r) {
|
|
348
|
+
// Same guard as `triggering()` above and `evaluated()` below: with no surface on
|
|
349
|
+
// disk the gap count is zero for want of anything to count, and printing 100 for
|
|
350
|
+
// that reads as "tested" rather than "nothing was read".
|
|
351
|
+
if ((0, score_core_js_1.isEmptyMachine)(r))
|
|
352
|
+
return {
|
|
353
|
+
key: "Tested",
|
|
354
|
+
score: null,
|
|
355
|
+
weight: 1,
|
|
356
|
+
advisory: true,
|
|
357
|
+
findings: ["no surface to test"],
|
|
358
|
+
};
|
|
323
359
|
const untestedHarness = r.untestedHarness ?? r.untested;
|
|
324
360
|
const { score, findings } = scoreFrom([
|
|
325
361
|
{
|
|
@@ -481,6 +517,7 @@ function auditScore(report, opts = {}) {
|
|
|
481
517
|
findings: ["no loadable plugin surface"],
|
|
482
518
|
})),
|
|
483
519
|
empty: true,
|
|
520
|
+
instructionsOnly: false,
|
|
484
521
|
};
|
|
485
522
|
}
|
|
486
523
|
const categories = [
|
|
@@ -499,7 +536,13 @@ function auditScore(report, opts = {}) {
|
|
|
499
536
|
// A confident breakage caps the headline too, so it can never read `A` while a
|
|
500
537
|
// surface is definitively dead (score-core.ts::applyBreakageCap).
|
|
501
538
|
const overall = (0, score_core_js_1.applyBreakageCap)(summed, report);
|
|
502
|
-
return {
|
|
539
|
+
return {
|
|
540
|
+
overall,
|
|
541
|
+
grade: (0, score_core_js_1.gradeFor)(overall),
|
|
542
|
+
categories,
|
|
543
|
+
empty: false,
|
|
544
|
+
instructionsOnly: (0, score_core_js_1.isEmptyMachine)(report),
|
|
545
|
+
};
|
|
503
546
|
}
|
|
504
547
|
/**
|
|
505
548
|
* How many INEFFECTIVE `disallowed-tools:` fences are named one at a time before
|
|
@@ -552,7 +595,11 @@ function formatAuditScore(s) {
|
|
|
552
595
|
}
|
|
553
596
|
}
|
|
554
597
|
lines.push("");
|
|
555
|
-
lines.push(
|
|
598
|
+
lines.push(s.instructionsOnly
|
|
599
|
+
? `Harness health: ${s.grade} (${String(s.overall)}/100) — instructions only: ` +
|
|
600
|
+
`no skill, agent or command was read. If this repo ships them somewhere ` +
|
|
601
|
+
`this tool did not look, the grade is about the instruction file alone.`
|
|
602
|
+
: `Harness health: ${s.grade} (${String(s.overall)}/100)`);
|
|
556
603
|
return lines.join("\n");
|
|
557
604
|
}
|
|
558
605
|
//# sourceMappingURL=audit-score.js.map
|