1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[21232],{6132:(e,t,s)=>{s.d(t,{A:()=>n});let n=(0,s(71847).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},47956:(e,t,s)=>{s.r(t),s.d(t,{default:()=>b});var n=s(95155),r=s(47262),a=s(12115),i=s(6132),l=s(96891),o=s(76907);let d=(0,s(71847).A)("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var c=s(76314);let h=["v0_naive","v1_contract","v2_fewshot","v3_schema","v4_packed","v5_grounded"],u=["gpt-5.4-mini","gemini-3.5-flash"],p=h.slice(0,-1).map((e,t)=>[e,h[t+1]]),m=[{id:"all4",label:"ALL-4",n:48},{id:"escalation",label:"escalation",n:48},{id:"category",label:"category",n:48},{id:"injection",label:"inj. resist (9)",n:9}],x=[{title:"The edit nobody should argue about",why:"Someone proposes the contract change in the card below. It reads well. It might help ramblers and it might wreck escalation - and no amount of meeting settles that, because prose arguments about prompts are unfalsifiable. The regression discipline replaces the argument: freeze the 48, run them on the current design, run them on the proposed one, diff. The card is an illustration written for this page and never sent to a model; every number after this step is a real measured promotion treated exactly that way.",insight:"The gate does not care how plausible the edit sounds. It cares what the same 48 tickets say twice.",model:"gpt-5.4-mini",trans:1,lens:"all4"},{title:"What a regression run returns: names, not a number",why:'Here is a real promotion - gpt from v1_contract to v2_fewshot. The aggregate says ALL-4 went 9 to 11 of 48: a win, ship it. The flip lists say five tickets got fixed AND three broke - HW-9012, HW-9035, HW-9037 worked yesterday and fail today. A customer on a broken ticket does not experience your net improvement. The flip list is what turns "quality moved" into "these people are affected", which is the difference between a metric and a decision.',insight:"Aggregates report the net. Regression sets report the casualties - and the casualties have ticket ids.",model:"gpt-5.4-mini",trans:1,lens:"all4"},{title:"The promotion the aggregate confesses to",why:"gpt, v0 to v1: the contract rung. The aggregate DROPS - 13 to 9 of 48 - and the flips say why: 4 helped, 8 broke. Switch the lens to escalation and watch where the wreckage concentrates: the contract that fixed eligibility made gpt escalate clean tickets a human never needed (the canon rates: clean-slice escalation 1.0 at v0, 0.4167 at v1). Module 2 taught this as a story; here it is as a list of ids you could apologize to.",insight:"One rung, two truths: eligibility up, escalation judgment down. A single headline number must hide one of them.",model:"gpt-5.4-mini",trans:0,lens:"escalation"},{title:"The safety promotion, part one: the win is real",why:"gemini, v4 to v5, injection lens: 8 of 9 hostile tickets resisted before, 9 of 9 after - the only 1.0 on the whole board. This is the rung the grounding addendum exists for, and a regression run confirms the claim instead of trusting the intention. If the gate only ever blocked, teams would route around it. It also certifies.",insight:"Regression discipline is symmetric: it proves wins with the same instrument it uses to catch breaks.",model:"gemini-3.5-flash",trans:4,lens:"injection"},{title:"The safety promotion, part two: what it broke",why:"Same promotion, ALL-4 lens: 5 helped, 7 broke - and the seventh broken ticket is HW-9042 itself. The grounding rules that finally beat injection also made gemini escalate the running ticket (a policy_exception hunch), and category slipped 41 to 38 across the board. Nothing was wrong with the v5 idea; this is just its full price, itemized. Whether to pay it is the next step.",insight:"The same change is a win under one lens and a regression under another. Ship decisions need both lenses open.",model:"gemini-3.5-flash",trans:4,lens:"all4"},{title:"Your verdict - with the evidence stapled to it",why:"Approve or block the v4-to-v5 promotion below. There is a defensible case each way: approve because injection 9/9 is the point of the rung and the floors hold (24/48 ALL-4, category 38/48); block because seven regressions including the running ticket deserve fixes first. What is NOT defensible is deciding without the lists. Either button records your verdict with the win, the cost, and every broken ticket named - the waiver is the point, not the approval.",insight:"A gate's output is not yes or no. It is yes-or-no PLUS the evidence someone can audit in six months.",model:"gemini-3.5-flash",trans:4,lens:"all4"},{title:"What the gate cannot see - and how this set earned trust",why:"Two honest footnotes. First: these flips compare one stored run per rung, and Module 7's variance panel showed gemini flipping HW-9042 run-to-run (14 of 24 passes) under identical prompts - so watch judgment fields across repeats, not single sweeps. Second: the frozen set itself was audited before it froze - the dry run caught three gold defects (HW-9013 and HW-9031 reworded; HW-9022's gold FLIPPED to escalate per KB chunk 1126) and fixed them BEFORE any baseline was recorded. After the freeze, a gold edit means a new version and re-run baselines. Gold sets are code.",insight:"A regression set you never audited will happily automate your mistakes. This one ate its own dogfood first.",model:"gemini-3.5-flash",trans:4,lens:"escalation"}],g=x.length;function b(){let[e,t]=(0,a.useState)("guided"),[s,h]=(0,a.useState)(0),[b,f]=(0,a.useState)(!1),[v,w]=(0,a.useState)(null),[y,k]=(0,a.useState)(null),[j,N]=(0,a.useState)("gpt-5.4-mini"),[A,T]=(0,a.useState)(1),[_,z]=(0,a.useState)("all4"),[S,H]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e=!1;return fetch("/learn/context-engineering/matrix_cells.json").then(e=>e.json()).then(t=>{e||w(t.cells.filter(e=>null===e.seed))}).catch(t=>!e&&k(String(t))),()=>{e=!0}},[]),(0,a.useEffect)(()=>{var t,n,r,a,i,l,o,d,c;if("guided"!==e)return;let h=x[s];N(null!=(i=null!=(a=h.model)?a:null==(t=[...x.slice(0,s)].reverse().find(e=>void 0!==e.model))?void 0:t.model)?i:"gpt-5.4-mini"),T(null!=(o=null!=(l=h.trans)?l:null==(n=[...x.slice(0,s)].reverse().find(e=>void 0!==e.trans))?void 0:n.trans)?o:1),z(null!=(c=null!=(d=h.lens)?d:null==(r=[...x.slice(0,s)].reverse().find(e=>void 0!==e.lens))?void 0:r.lens)?c:"all4"),H(null)},[s,e]);let W=(0,a.useCallback)(()=>{"guided"===e&&t("explore")},[e]),M=(0,a.useCallback)(()=>{h(0),f(!1),t("guided"),N("gpt-5.4-mini"),T(1),z("all4"),H(null)},[]),C=(0,a.useCallback)(e=>{let t=e.grades;return"all4"===_?t.category_ok&&t.priority_ok&&t.eligibility_ok&&t.escalation_ok:"escalation"===_?t.escalation_ok:"category"===_?t.category_ok:"injection"===_&&"injection"===e.slice?!0===t.injection_resist:null},[_]),E=(0,a.useMemo)(()=>
1{if(!v)return null;let[e,t]=p[A],s=new Map,n=new Map;for(let r of v)r.model===j&&(r.design===e&&s.set(r.ticket_id,r),r.design===t&&n.set(r.ticket_id,r));let r=[],a=[],i=0,l=0,o=0;return s.forEach((e,t)=>{let s=n.get(t);if(!s)return;let d=C(e),c=C(s);null!==d&&null!==c&&(o+=1,d&&(i+=1),c&&(l+=1),!d&&c&&r.push(t),d&&!c&&a.push(t))}),r.sort(),a.sort(),{dFrom:e,dTo:t,helped:r,broke:a,nB:i,nA:l,n:o,unchanged:o-r.length-a.length}},[v,j,A,C]);return y?(0,n.jsxs)("div",{className:"bg-white rounded-2xl border border-neutral-200 p-6 flex items-start gap-3",children:[(0,n.jsx)(i.A,{size:18,className:"text-rose-600 flex-shrink-0 mt-0.5"}),(0,n.jsxs)("div",{className:"text-sm text-neutral-700",children:["This component needs the shipped artifact (matrix_cells.json) and it failed to load (",y,"). Refresh to retry - every flip list is recomputed from the stored per-ticket grades, so there is no hardcoded fallback."]})]}):(0,n.jsx)(c.A,{mode:e,onMode:t,stepTitle:x[s].title,explanation:x[s].why,icon:l.A,title:"The Regression Gate",subtitle:"Freeze the 48, run every change against them, and read the flips - helped AND broke - before anyone ships",currentStep:s,totalSteps:g,isPlaying:b,onReset:M,onTogglePlay:()=>f(e=>!e),onPrev:()=>h(e=>Math.max(0,e-1)),onNext:()=>h(e=>Math.min(g-1,e+1)),onJumpTo:e=>h(e),keyInsight:"guided"===e?x[s].insight:"Every promotion here is real: pick a model, a rung transition, and a lens - the flip lists are recomputed from the stored grades of the frozen 48.",children:(0,n.jsxs)("div",{className:"mx-auto",children:["guided"===e&&0===s&&(0,n.jsxs)("div",{className:"rounded-xl border border-neutral-300 overflow-hidden mb-2",children:[(0,n.jsxs)("div",{className:"px-3 py-1.5 bg-neutral-900 text-white text-xs font-bold flex items-center justify-between flex-wrap gap-1",children:[(0,n.jsx)("span",{children:"PROPOSED CONTRACT EDIT"}),(0,n.jsx)("span",{className:"px-1.5 py-0.5 rounded-full bg-sky-500/20 text-sky-300 font-bold uppercase tracking-normal",children:"illustration - never sent to a model"})]}),(0,n.jsxs)("div",{className:"bg-white p-2.5 font-mono text-xs leading-relaxed",children:[(0,n.jsx)("div",{className:"text-neutral-500",children:" ...escalate when required information is missing."}),(0,n.jsx)("div",{className:"bg-emerald-50 text-emerald-800 rounded px-1",children:"+ If the customer sounds frustrated, prioritize retention:"}),(0,n.jsx)("div",{className:"bg-emerald-50 text-emerald-800 rounded px-1",children:"+ lean toward granting refunds and avoid escalating."}),(0,n.jsx)("div",{className:"text-neutral-500",children:" Output exactly one JSON object with the fields..."}),(0,n.jsx)("div",{className:"mt-2 text-xs text-neutral-500 font-sans",children:"Plausible, well-meant, and unmeasured. The rungs below show what measuring a change like this actually looks like - each one is a real promotion from the ladder, diffed on the frozen 48."})]})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 mb-1.5",children:[(0,n.jsx)("span",{className:"text-xs font-bold uppercase tracking-normal text-neutral-500",children:"model:"}),u.map(e=>(0,n.jsx)("button",{onClick:()=>{W(),N(e),H(null)},"aria-pressed":j===e,className:"px-2 py-0.5 rounded-lg text-xs font-mono border transition-colors ".concat(j===e?"bg-neutral-900 text-white border-neutral-900":"bg-white text-neutral-600 border-neutral-300 hover:border-neutral-500"),children:e.startsWith("gemini")?"gemini":"gpt"},e)),(0,n.jsx)("span",{className:"text-xs font-bold uppercase tracking-normal text-neutral-500 ml-2",children:"promotion:"}),p.map((e,t)=>{let[s,r]=e;return(0,n.jsxs)("button",{onClick:()=>{W(),T(t),H(null)},"aria-pressed":A===t,className:"px-2 py-0.5 rounded-lg text-xs font-mono border transition-colors ".concat(A===t?"bg-neutral-900 text-white border-neutral-900":"bg-white text-neutral-600 border-neutral-300 hover:border-neutral-500"),children:[s.split("_")[0],">",r.split("_")[0]]},s)})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 mb-2",children:[(0,n.jsx)("span",{className:"text-xs font-bold uppercase tracking-normal text-neutral-500",children:"lens:"}),m.map(e=>(0,n.jsx)("button",{onClick:()=>{W(),z(e.id),H(null)},"aria-pressed":_===e.id,className:"px-2 py-0.5 rounded-lg text-xs font-mono border transition-colors ".concat(_===e.id?"bg-neutral-900 text-white border-neutral-900":"bg-white text-neutral-600 border-neutral-300 hover:border-neutral-500"),
1children:e.label},e.id))]}),E&&(0,n.jsxs)("div",{"aria-live":"polite",className:"rounded-xl border border-neutral-300 overflow-hidden mb-2",children:[(0,n.jsxs)("div",{className:"px-3 py-1.5 bg-neutral-900 text-white text-xs font-bold flex items-center justify-between flex-wrap gap-1",children:[(0,n.jsxs)("span",{children:[j," : ",E.dFrom," ",(0,n.jsx)("span",{className:"text-neutral-400",children:"before"})," vs ",E.dTo," ",(0,n.jsx)("span",{className:"text-neutral-400",children:"after"})]}),(0,n.jsx)("span",{className:"px-1.5 py-0.5 rounded-full bg-amber-500/20 text-amber-300 font-bold uppercase tracking-normal",children:"real grades, recomputed from the cells"})]}),(0,n.jsxs)("div",{className:"bg-white p-2.5",children:[(0,n.jsxs)("div",{className:"grid grid-cols-3 gap-2 mb-2",children:[(0,n.jsxs)("div",{className:"rounded-lg border border-neutral-200 p-2",children:[(0,n.jsxs)("div",{className:"text-xs font-bold uppercase tracking-normal text-neutral-500",children:["aggregate (",m.find(e=>e.id===_).label,")"]}),(0,n.jsxs)("div",{className:"text-lg font-mono font-bold text-neutral-900",children:[E.nB,"/",E.n," ",(0,n.jsx)("span",{className:"text-neutral-400",children:"->"})," ",E.nA,"/",E.n]}),(0,n.jsxs)("div",{className:"text-xs font-semibold ".concat(E.nA>E.nB?"text-emerald-700":E.nA<E.nB?"text-rose-700":"text-neutral-500"),children:["net ",E.nA-E.nB>=0?"+":"",E.nA-E.nB]})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-emerald-200 bg-emerald-50/50 p-2",children:[(0,n.jsx)("div",{className:"text-xs font-bold uppercase tracking-normal text-emerald-700",children:"helped"}),(0,n.jsx)("div",{className:"text-lg font-mono font-bold text-emerald-800",children:E.helped.length}),(0,n.jsx)("div",{className:"text-xs text-emerald-700",children:"failed before, passes after"})]}),(0,n.jsxs)("div",{className:"rounded-lg border border-rose-200 bg-rose-50/50 p-2",children:[(0,n.jsx)("div",{className:"text-xs font-bold uppercase tracking-normal text-rose-700",children:"broke"}),(0,n.jsx)("div",{className:"text-lg font-mono font-bold text-rose-800",children:E.broke.length}),(0,n.jsx)("div",{className:"text-xs text-rose-700",children:"passed before, fails after"})]})]}),(0,n.jsx)(r.A,{title:"Inspect the helped and broken ticket IDs",children:(0,n.jsxs)("div",{className:"space-y-1 mb-2",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,n.jsx)("span",{className:"text-xs font-bold text-emerald-700 uppercase tracking-normal w-14",children:"helped:"}),0===E.helped.length&&(0,n.jsx)("span",{className:"text-xs text-neutral-400",children:"none"}),E.helped.map(e=>(0,n.jsx)("span",{className:"px-1.5 py-0.5 rounded text-xs font-mono bg-emerald-50 border border-emerald-300 text-emerald-800",children:e},e))]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,n.jsx)("span",{className:"text-xs font-bold text-rose-700 uppercase tracking-normal w-14",children:"broke:"}),0===E.broke.length&&(0,n.jsx)("span",{className:"text-xs text-neutral-400",children:"none"}),E.broke.map(e=>(0,n.jsxs)("span",{className:"px-1.5 py-0.5 rounded text-xs font-mono border ".concat("HW-9042"===e?"bg-rose-100 border-rose-500 text-rose-900 font-bold":"bg-rose-50 border-rose-300 text-rose-800"),children:[e,"HW-9042"===e?" (the running ticket)":""]},e))]}),(0,n.jsxs)("div",{className:"text-xs text-neutral-500",children:["unchanged: ",E.unchanged," of ",E.n]})]})}),(0,n.jsxs)("div",{className:"rounded-lg border border-neutral-200 bg-neutral-50 p-2",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 mb-1.5",children:[(0,n.jsx)("span",{className:"text-xs font-bold uppercase tracking-normal text-neutral-600",children:"the gate wants a verdict with evidence:"}),(0,n.jsxs)("button",{onClick:()=>{W(),H("approved")},"aria-pressed":"approved"===S,className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-lg text-xs font-bold border transition-colors ".concat("approved"===S?"bg-emerald-600 text-white border-emerald-600":"bg-white text-emerald-700 border-emerald-300 hover:border-emerald-500"),children:[(0,n.jsx)(o.A,{size:11})," request regression review"]}),(0,n.jsxs)("button",{onClick:()=>{W(),H("blocked")},"aria-pressed":"blocked"===S,className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-lg text-xs font-bold border transition-colors ".concat("blocked"===S?"bg-rose-600 text-white border-rose-600":"bg-white text-rose-700 border-rose-300 hover:border-rose-500"),
1children:[(0,n.jsx)(d,{size:11})," block"]})]}),S&&(0,n.jsxs)("div",{className:"rounded-md border p-2 text-xs leading-relaxed ".concat("approved"===S?"border-emerald-300 bg-emerald-50 text-emerald-900":"border-rose-300 bg-rose-50 text-rose-900"),children:[(0,n.jsx)("span",{className:"font-bold uppercase",children:"approved"===S?"review requested":"blocked"})," - ","recorded with the evidence: ",m.find(e=>e.id===_).label," ",E.nB,"/",E.n," to ",E.nA,"/",E.n,","," ",E.helped.length," helped, ",E.broke.length," broke",E.broke.length>0?" (waiver names: ".concat(E.broke.join(", "),")"):"",".","approved"===S?" This records a review request, not release approval. An authorized reviewer must assess mitigation and residual risk.":" The regressions go back to engineering with names attached; the promotion re-applies when the list shrinks."]})]})]})]}),(0,n.jsx)(r.A,{title:"How the measured comparison was constructed",children:(0,n.jsxs)("div",{className:"rounded-xl border border-amber-200 bg-amber-50 p-2.5 text-xs text-amber-900 leading-relaxed",children:[(0,n.jsx)("span",{className:"font-bold",children:"Gate honesty: "}),"the opening contract edit is an illustration and was never sent to a model. Every flip list above is a real, measured rung promotion diffed on the frozen 48 - one stored run per rung, so pair it with the variance panel before trusting judgment fields (gemini flips HW-9042 run-to-run, 14/24). And the set itself was audited before freezing: three gold defects fixed in the dry run, then versioned."]})})]})})}},48314:(e,t,s)=>{s.d(t,{A:()=>n});let n=(0,s(71847).A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},50906:(e,t,s)=>{s.d(t,{A:()=>n});let n=(0,s(71847).A)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},53511:(e,t,s)=>{s.d(t,{A:()=>n});let n=(0,s(71847).A)("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]])},76314:(e,t,s)=>{s.d(t,{A:()=>n.A});var n=s(92864)},76907:(e,t,s)=>{s.d(t,{A:()=>n});let n=(0,s(71847).A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},96891:(e,t,s)=>{s.d(t,{A:()=>n});let n=(0,s(71847).A)("git-compare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]])}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.