var c=Object.defineProperty;var r=(n)=>n;function s(n,o){this[n]=r.bind(null,o)}var d=(n,o)=>{for(var a in o)c(n,a,{get:o[a],enumerable:!0,configurable:!0,set:s.bind(o,a)})};var m=(n,o)=>()=>(n&&(o=n(n=0)),o);import{CodeBlock as i}from"@contractspec/lib.design-system";import l from"@contractspec/lib.ui-link";import{ChevronRight as p}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function v(){return t("div",{className:"space-y-8",children:[t("div",{className:"space-y-4",children:[e("h1",{className:"font-bold text-4xl",children:"Control Plane Runtime"}),e("p",{className:"text-muted-foreground",children:"The control plane is the governance layer for agentic execution. It turns incoming intent into deterministic plans, enforces risk policy before side effects, and records replayable traces for audits."})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Canonical execution loop"}),t("ol",{className:"list-inside list-decimal space-y-2 text-muted-foreground",children:[e("li",{children:"Accept intent and create execution identity + trace context."}),e("li",{children:"Compile intent into a typed, deterministic plan DAG."}),e("li",{children:"Verify plan against policy and risk rules."}),e("li",{children:"Route into autonomous or assist mode based on verdict."}),e("li",{children:"Execute steps with idempotent keys and explicit stage events."}),e("li",{children:"Persist outcomes for replay, audits, and operator visibility."})]})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Contract surfaces (v1 baseline)"}),t("p",{className:"text-muted-foreground",children:["The runtime is contract-first. Commands, queries, events, and capabilities are explicit and versioned under",e("code",{children:" @contractspec/lib.contracts-spec"}),"."]}),e(i,{language:"text",code:`Commands
- controlPlane.intent.submit
- controlPlane.plan.compile
- controlPlane.plan.verify
- controlPlane.execution.start
- controlPlane.execution.approve
- controlPlane.execution.reject
- controlPlane.execution.cancel
- controlPlane.skill.install
- controlPlane.skill.disable

Queries
- controlPlane.execution.get
- controlPlane.execution.list
- controlPlane.trace.get
- controlPlane.policy.explain
- controlPlane.skill.list
- controlPlane.skill.verify

Events
- controlPlane.intent.received
- controlPlane.plan.compiled
- controlPlane.plan.rejected
- controlPlane.execution.step.started
- controlPlane.execution.step.blocked
- controlPlane.execution.step.completed
- controlPlane.execution.completed
- controlPlane.execution.failed
- controlPlane.skill.installed
- controlPlane.skill.rejected

Capabilities
- control-plane.core
- control-plane.approval
- control-plane.audit
- control-plane.skill-registry
- control-plane.channel-runtime`})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Policy and safety posture"}),t("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[e("li",{children:"No side-effect action executes unless it comes from a compiled plan."}),e("li",{children:"High-risk actions are blocked from autonomous mode in v1."}),e("li",{children:"Approval commands provide explicit human-in-the-loop transitions."}),e("li",{children:"Skill installation is modeled as governance-controlled operations."}),e("li",{children:"Trace queries expose policy rationale and step outcomes for replay."})]})]}),t("section",{className:"editorial-panel space-y-4",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Apply the runtime locally with Connect"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"The control plane defines the governance contracts. Connect is the local adapter that turns those contracts into task-scoped context, plan, verification, review, and replay flows for coding agents."}),t("div",{className:"flex flex-wrap gap-3",children:[e(l,{href:"/docs/specs/connect",className:"btn-primary",children:"Connect spec"}),e(l,{href:"/docs/guides/connect-in-a-repo",className:"btn-ghost",children:"Use Connect in a repo"})]})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"Implementation map"}),e(i,{language:"text",code:`packages/libs/contracts-spec/src/control-plane/
  commands/
  queries/
  events/
  capabilities/
  contracts.ts
  contracts.test.ts

packages/apps/web-landing/src/app/docs/architecture/control-plane/page.tsx
implementation_plan_controle_plane.md`})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"What comes next"}),e("p",{className:"text-muted-foreground",children:"WS1 delivers the contract fabric. Next increments add planner/executor split, policy escalation, capability-bound authorization, signed skill compatibility checks, and full replay tooling."})]}),t("div",{className:"flex items-center gap-4 pt-4",children:[e(l,{href:"/docs/architecture/integration-binding",className:"btn-ghost",children:"Previous: Integration Binding"}),t(l,{href:"/docs/safety/auditing",className:"btn-primary",children:["Audit Logs ",e(p,{size:16})]})]})]})}export{v as ArchitectureControlPlanePage};
