a11oy / console /assets /ConstitutionDSL-BPCk6HJW.js
betterwithage's picture
deploy(hf): sync szl-holdings/a11oy@main derived COPY set
da2854c verified
Raw
History Blame
5.83 kB
import{o as e}from"./chunk-CMxvf4Kt.js";import{t}from"./react-DrNXigiH.js";import{C as n}from"./index-Caa1r77e.js";import{t as r}from"./layout-BtJ5ShnN.js";import{c as i,i as a,o,p as s,r as c,s as l,t as u,u as d}from"./ui-Ddu9t0Or.js";import{_ as f,g as p,t as m}from"./hatunDoctrine-aBQYhBQF.js";var h=e(t(),1),g=n();function _(){let[e,t]=(0,h.useState)(p[0].id),[n,_]=(0,h.useState)(f[0].id),[v,y]=(0,h.useState)(!1),b=p.find(t=>t.id===e)??p[0],x=f.find(e=>e.id===n)??f[0];return(0,g.jsxs)(r,{children:[(0,g.jsx)(i,{label:`DOCTRINE · DSL`,title:`Constitution-as-Code`,subtitle:`Author surface for Constitutions. Linter is suggest-only; simulator shows structured diff against existing audit findings. Pre-Deployment Alignment Review Gate is unchanged.`,status:`LIVE`}),(0,g.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-3 mb-6`,children:[(0,g.jsx)(l,{label:`EXAMPLES`,value:p.length,accent:`#c9b787`}),(0,g.jsx)(l,{label:`SIM CASES`,value:f.length,accent:`#c9b787`}),(0,g.jsx)(l,{label:`LINTER`,value:`SUGGEST`,sub:`never blocks`,accent:`#c9b787`}),(0,g.jsx)(l,{label:`REVIEW GATE`,value:`REQUIRED`,sub:`not bypassable`,accent:`#c9b787`})]}),(0,g.jsxs)(c,{className:`mb-4`,children:[(0,g.jsx)(d,{children:`Examples`}),(0,g.jsx)(`div`,{className:`flex gap-2 flex-wrap`,children:p.map(n=>(0,g.jsx)(`button`,{onClick:()=>t(n.id),className:`px-3 py-1.5 rounded text-xs font-mono`,style:{backgroundColor:e===n.id?`rgba(201,183,135,0.12)`:`transparent`,color:e===n.id?`#c9b787`:`var(--color-a11oy-text-sub)`,border:`1px solid ${e===n.id?`rgba(201,183,135,0.3)`:`var(--color-a11oy-border)`}`,cursor:`pointer`},children:m[n.agentId]},n.id))})]}),(0,g.jsxs)(`div`,{className:`grid lg:grid-cols-2 gap-4 mb-4`,children:[(0,g.jsxs)(c,{children:[(0,g.jsx)(d,{children:b.title}),(0,g.jsx)(`p`,{className:`text-xs mb-3`,style:{color:`var(--color-a11oy-text-sub)`},children:b.description}),(0,g.jsx)(a,{language:`constitution`,children:b.source}),(0,g.jsxs)(`div`,{className:`mt-3 flex gap-2`,children:[(0,g.jsx)(u,{variant:`ghost`,size:`sm`,onClick:()=>y(!0),children:`Run linter`}),(0,g.jsx)(u,{variant:`primary`,size:`sm`,children:`Submit to Review Gate`})]}),v&&(0,g.jsxs)(`div`,{className:`mt-3 p-3 rounded text-xs`,style:{backgroundColor:`rgba(201,183,135,0.06)`,border:`1px solid rgba(201,183,135,0.2)`},children:[(0,g.jsx)(`div`,{className:`font-mono mb-1`,style:{color:`#c9b787`},children:`LINTER · 2 SUGGESTIONS · 0 BLOCKING`}),(0,g.jsxs)(`ul`,{className:`list-disc list-inside`,style:{color:`var(--color-a11oy-text-sub)`},children:[(0,g.jsxs)(`li`,{children:[`Consider adding a `,(0,g.jsx)(`span`,{className:`font-mono`,children:`test`}),` reference for clause C3.SCOPE.`]}),(0,g.jsxs)(`li`,{children:[(0,g.jsx)(`span`,{className:`font-mono`,children:`scope.tools`}),` includes a connector with no recent welfare telemetry.`]})]})]})]}),(0,g.jsxs)(c,{children:[(0,g.jsx)(d,{children:`"What would change if…" simulator`}),(0,g.jsx)(`div`,{className:`flex gap-2 flex-wrap mb-3`,children:f.map(e=>(0,g.jsx)(`button`,{onClick:()=>_(e.id),className:`px-3 py-1.5 rounded text-xs font-mono`,style:{backgroundColor:n===e.id?`rgba(201,183,135,0.12)`:`transparent`,color:n===e.id?`#c9b787`:`var(--color-a11oy-text-sub)`,border:`1px solid ${n===e.id?`rgba(201,183,135,0.3)`:`var(--color-a11oy-border)`}`,cursor:`pointer`},children:e.baselineClauseId},e.id))}),(0,g.jsx)(o,{label:`baseline`,value:(0,g.jsx)(`span`,{className:`font-mono`,children:x.baselineClauseId})}),(0,g.jsx)(o,{label:`proposed`,value:x.proposedChange}),(0,g.jsx)(o,{label:`diff`,value:(0,g.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`font-mono`,style:{color:`var(--color-a11oy-text)`},children:x.affectedFindingsBefore}),(0,g.jsx)(`span`,{style:{color:`var(--color-a11oy-text-ghost)`},children:`→`}),(0,g.jsx)(`span`,{className:`font-mono`,style:{color:x.affectedFindingsAfter>x.affectedFindingsBefore?`#f5f5f5`:`#c9b787`},children:x.affectedFindingsAfter}),(0,g.jsx)(s,{status:x.affectedFindingsAfter>x.affectedFindingsBefore?`warn`:`ok`,label:`${x.affectedFindingsAfter>x.affectedFindingsBefore?`+`:``}${x.affectedFindingsAfter-x.affectedFindingsBefore} findings`})]})}),(0,g.jsx)(o,{label:`new probes needed`,value:(0,g.jsx)(`span`,{className:`font-mono`,children:x.newProbesNeeded.join(`, `)})}),(0,g.jsx)(`div`,{className:`mt-3 p-3 rounded text-xs`,style:{backgroundColor:`rgba(255,255,255,0.02)`,border:`1px solid var(--color-a11oy-border)`,color:`var(--color-a11oy-text-sub)`,lineHeight:1.7},children:x.riskNarrative})]})]}),(0,g.jsxs)(c,{children:[(0,g.jsx)(d,{children:`Doctrine guarantees`}),(0,g.jsxs)(`ul`,{className:`text-xs flex flex-col gap-1.5`,children:[(0,g.jsxs)(`li`,{className:`flex gap-2`,style:{color:`var(--color-a11oy-text-sub)`},children:[(0,g.jsx)(`span`,{style:{color:`#c9b787`},children:`✓`}),(0,g.jsx)(`span`,{children:`The DSL is the author surface only. Runtime enforcement remains in the Covenant Layer.`})]}),(0,g.jsxs)(`li`,{className:`flex gap-2`,style:{color:`var(--color-a11oy-text-sub)`},children:[(0,g.jsx)(`span`,{style:{color:`#c9b787`},children:`✓`}),(0,g.jsx)(`span`,{children:`The linter is suggest-only and never blocks a Constitution from reaching the Review Gate.`})]}),(0,g.jsxs)(`li`,{className:`flex gap-2`,style:{color:`var(--color-a11oy-text-sub)`},children:[(0,g.jsx)(`span`,{style:{color:`#c9b787`},children:`✓`}),(0,g.jsx)(`span`,{children:`The simulator runs against existing behavioral-audit findings and reports a structured diff plus a narrative.`})]}),(0,g.jsxs)(`li`,{className:`flex gap-2`,style:{color:`var(--color-a11oy-text-sub)`},children:[(0,g.jsx)(`span`,{style:{color:`#c9b787`},children:`✓`}),(0,g.jsx)(`span`,{children:`No path bypasses the Pre-Deployment Alignment Review Gate.`})]})]})]})]})}export{_ as ConstitutionDSL};