module Web.View.AiGovernancePolicies.New where import Web.View.Prelude data NewView = NewView { policy :: !AiGovernancePolicy , hubs :: ![Hub] , agents :: ![AgentRegistration] } allowedActionOptions :: [(Text, Text)] allowedActionOptions = [ ("read", "read — agent may read artifacts") , ("propose", "propose — agent may create proposals") , ("delegate", "delegate — agent may delegate to other agents") , ("auto_apply", "auto_apply — agent may apply changes without human review") ] instance View NewView where html NewView { .. } = [hsx|

Add AI Governance Policy

{formFor policy [hsx|
{(textField #artifactType) { label = "Artifact Type", placeholder = "e.g. requirement_candidate, annotation, decision_record" }}
{forEach allowedActionOptions \(val, label) -> [hsx| |]}
{submitButton { label = "Create Policy" }} Cancel
|]}
|]