var l=Object.defineProperty;var r=(t)=>t;function s(t,i){this[t]=r.bind(null,i)}var n=(t,i)=>{for(var o in i)l(t,o,{get:i[o],enumerable:!0,configurable:!0,set:s.bind(i,o)})};var p=(t,i)=>()=>(t&&(i=t(t=0)),i);import{jsx as e,jsxs as a}from"react/jsx-runtime";function d(){return a("div",{className:"space-y-8",children:[a("div",{className:"space-y-4",children:[e("h1",{className:"font-bold text-4xl",children:"Auto-Evolution Runbook"}),e("p",{className:"text-lg text-muted-foreground",children:"Configure sampling, approvals, experiments, and golden tests so your app keeps improving without regressions."})]}),a("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Pipeline overview"}),a("ol",{className:"list-decimal space-y-2 pl-6 text-muted-foreground text-sm",children:[e("li",{children:"Tracing middleware emits telemetry samples with tenant/user context."}),e("li",{children:"IntentAggregator batches samples (15m window, configurable)."}),e("li",{children:"IntentDetector raises error/latency/throughput signals."}),e("li",{children:"SpecGenerator produces proposals with confidence scores."}),e("li",{children:"ApprovalWorkflow routes low-confidence suggestions to humans."}),e("li",{children:"SpecExperimentRegistry rolls out approved variants using guardrails."}),e("li",{children:"TrafficRecorder captures new traffic and GoldenTestGenerator outputs suites."})]})]}),a("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Key environment variables"}),e("pre",{className:"rounded-lg border bg-muted p-4 text-sm",children:`# Telemetry sampling
AUTO_EVOLUTION_SAMPLE_RATE=0.02
AUTO_EVOLUTION_WINDOW_MS=900000

# Suggestion thresholds
AUTO_EVOLUTION_MIN_CONFIDENCE=0.55
AUTO_EVOLUTION_AUTO_APPROVE=0.2

# Guardrails (fallback defaults)
AUTO_EVOLUTION_MAX_ERROR_RATE=0.02
AUTO_EVOLUTION_MAX_P99_MS=500`})]}),a("div",{className:"space-y-3",children:[e("h2",{className:"font-bold text-2xl",children:"Operations checklist"}),a("ul",{className:"list-disc space-y-2 pl-6 text-muted-foreground text-sm",children:[e("li",{children:"Review new `SpecSuggestion` records every morning (UI coming soon; Prisma view today)."}),e("li",{children:"Keep at least one reviewer per domain on-call for approvals."}),e("li",{children:"Attach `SpecExperimentAdapter.trackOutcome` to every runtime adapter."}),e("li",{children:"Schedule `contractspec test generate` nightly (or on deploy) to refresh golden suites."}),e("li",{children:"Feed `runGoldenTests` into CI to gate merges touching evolved specs."})]})]}),e("div",{className:"grid gap-4 md:grid-cols-3",children:[{title:"Sampling",description:"Start at 1–2% of traffic. Increase only after sanitization is verified."},{title:"Approvals",description:"High-risk ops (money, compliance) should never auto-approve. Use ApprovalWorkflow notes for audit."},{title:"On-call alerts",description:"Tie SpecExperimentController rollbacks into PagerDuty/Slack so engineers see guardrail trips immediately."}].map((t)=>a("div",{className:"card-subtle space-y-2 p-4",children:[e("h3",{className:"font-semibold text-lg",children:t.title}),e("p",{className:"text-muted-foreground text-sm",children:t.description})]},t.title))})]})}export{d as OpsAutoEvolutionPage};
