{
  "schemaVersion": "1",
  "cliVersion": "0.1.0-preview.1",
  "commands": [
    {
      "path": "bworlds",
      "usage": "bworlds",
      "summary": "Operator CLI for BWORLDS Controls, audits, and repository management",
      "access": "Command group",
      "subcommands": [
        "audit",
        "auth",
        "build",
        "control",
        "dossier",
        "findings",
        "repo",
        "telemetry"
      ]
    },
    {
      "path": "bworlds audit",
      "usage": "bworlds audit",
      "summary": "Run and inspect Build audits",
      "access": "Command group",
      "subcommands": [
        "override",
        "reevaluate",
        "run",
        "show",
        "status"
      ]
    },
    {
      "path": "bworlds audit override",
      "usage": "bworlds audit override",
      "summary": "Manage operator overrides for Control results",
      "access": "Command group",
      "subcommands": [
        "clear",
        "list",
        "set"
      ]
    },
    {
      "path": "bworlds audit override clear",
      "usage": "bworlds audit override clear \u003cslug\u003e \u003ccontrol-id\u003e [flags]",
      "summary": "Clear the active override for a Control",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "confirm",
          "usage": "confirm clearing the Control result override"
        },
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds audit override list",
      "usage": "bworlds audit override list \u003cslug\u003e [flags]",
      "summary": "List all active overrides for a build",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds audit override set",
      "usage": "bworlds audit override set \u003cslug\u003e \u003ccontrol-id\u003e [flags]",
      "summary": "Set an operator override for a Control result",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "confirm",
          "usage": "confirm the Control result override"
        },
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        },
        {
          "name": "reason",
          "usage": "Operator justification (required, max 1000 chars)"
        },
        {
          "name": "status",
          "usage": "Overridden verdict: pass, fail, not-applicable, skip"
        }
      ]
    },
    {
      "path": "bworlds audit reevaluate",
      "usage": "bworlds audit reevaluate \u003cslug\u003e \u003ccontrol-id\u003e [flags]",
      "summary": "Reevaluate one metered First Look Control and wait for its result",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "confirm",
          "usage": "confirm the Workspace token charge"
        },
        {
          "name": "json",
          "usage": "Output the final ControlEvaluation as stable JSON"
        },
        {
          "name": "request-id",
          "usage": "UUID idempotency key to reuse when retrying"
        },
        {
          "name": "timeout",
          "usage": "maximum time to wait for the final result (e.g. 60s, 5m, 10m)",
          "default": "10m0s"
        }
      ]
    },
    {
      "path": "bworlds audit run",
      "usage": "bworlds audit run \u003cbuild-slug\u003e [audit-slug] [flags]",
      "summary": "Run an Audit through the Workspace surface",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "area",
          "usage": "filter the audit to a single area ID"
        },
        {
          "name": "confirm",
          "usage": "confirm the Audit execution and potential Workspace token charge"
        },
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        },
        {
          "name": "no-wait",
          "usage": "start the server-owned audit run and return immediately"
        },
        {
          "name": "request-id",
          "usage": "UUID idempotency key to reuse when retrying"
        },
        {
          "name": "wait-timeout",
          "usage": "override the default 10m wait for the server runner (e.g. 15m, 20m)"
        }
      ]
    },
    {
      "path": "bworlds audit show",
      "usage": "bworlds audit show \u003cslug\u003e [flags]",
      "summary": "Show the current Audit results for a Build",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds audit status",
      "usage": "bworlds audit status \u003caudit-run-id\u003e [flags]",
      "summary": "Read the server-owned state of an AuditRun",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        },
        {
          "name": "timeout",
          "usage": "request timeout",
          "default": "15s"
        }
      ]
    },
    {
      "path": "bworlds auth",
      "usage": "bworlds auth",
      "summary": "Manage authentication credentials",
      "access": "Command group",
      "subcommands": [
        "login",
        "logout",
        "status",
        "token"
      ]
    },
    {
      "path": "bworlds auth login",
      "usage": "bworlds auth login [flags]",
      "summary": "Authenticate with the BWORLDS API",
      "access": "Local utility",
      "flags": [
        {
          "name": "json",
          "usage": "output a stable JSON result"
        },
        {
          "name": "with-token",
          "usage": "read, verify, and store a personal CLI token from stdin"
        }
      ]
    },
    {
      "path": "bworlds auth logout",
      "usage": "bworlds auth logout [flags]",
      "summary": "Remove saved credentials from this device",
      "access": "Local utility",
      "flags": [
        {
          "name": "json",
          "usage": "output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds auth status",
      "usage": "bworlds auth status [flags]",
      "summary": "Verify and show the current identity, Workspaces, and Builds",
      "access": "Local utility",
      "flags": [
        {
          "name": "json",
          "usage": "output a stable JSON context"
        }
      ]
    },
    {
      "path": "bworlds auth token",
      "usage": "bworlds auth token [flags]",
      "summary": "Print the Operator Session token or manage personal tokens",
      "access": "Local utility",
      "subcommands": [
        "create",
        "list",
        "revoke"
      ],
      "flags": [
        {
          "name": "json",
          "usage": "output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds auth token create",
      "usage": "bworlds auth token create [flags]",
      "summary": "Create a personal token and reveal it once",
      "access": "User session",
      "flags": [
        {
          "name": "confirm",
          "usage": "confirm creation of a new credential"
        },
        {
          "name": "expires-in-days",
          "usage": "expiry from now (1-365 days)",
          "default": "90"
        },
        {
          "name": "json",
          "usage": "output stable JSON"
        },
        {
          "name": "name",
          "usage": "credential name, such as ci-production"
        }
      ]
    },
    {
      "path": "bworlds auth token list",
      "usage": "bworlds auth token list [flags]",
      "summary": "List personal token metadata",
      "access": "User session",
      "flags": [
        {
          "name": "json",
          "usage": "output stable JSON"
        }
      ]
    },
    {
      "path": "bworlds auth token revoke",
      "usage": "bworlds auth token revoke \u003ccredential-id\u003e [flags]",
      "summary": "Revoke one personal token",
      "access": "User session",
      "flags": [
        {
          "name": "confirm",
          "usage": "confirm credential revocation"
        },
        {
          "name": "json",
          "usage": "output stable JSON"
        }
      ]
    },
    {
      "path": "bworlds build",
      "usage": "bworlds build",
      "summary": "Inspect a build's operator-facing state",
      "access": "Command group",
      "subcommands": [
        "info",
        "notifications"
      ]
    },
    {
      "path": "bworlds build info",
      "usage": "bworlds build info \u003cslug\u003e [flags]",
      "summary": "Show authorized areas, token balance, and GitHub status for a build",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "usage": "output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds build notifications",
      "usage": "bworlds build notifications \u003cslug\u003e [flags]",
      "summary": "List the notifications BWorlds sent for a build",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        },
        {
          "name": "limit",
          "usage": "Maximum notifications to read, 1-100",
          "default": "50"
        },
        {
          "name": "window",
          "usage": "Days back to read, 1-90",
          "default": "7"
        },
        {
          "name": "workflow",
          "usage": "Keep only this workflow key"
        }
      ]
    },
    {
      "path": "bworlds control",
      "usage": "bworlds control",
      "summary": "Run standalone Build Controls",
      "access": "Command group",
      "subcommands": [
        "run",
        "status"
      ]
    },
    {
      "path": "bworlds control run",
      "usage": "bworlds control run \u003cbuild\u003e \u003ccontrol\u003e [flags]",
      "summary": "Run one Control independently from an Audit",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "confirm",
          "usage": "confirm the Workspace token charge"
        },
        {
          "name": "json",
          "usage": "Output the final ControlEvaluation as stable JSON"
        },
        {
          "name": "request-id",
          "usage": "UUID idempotency key to reuse when retrying"
        },
        {
          "name": "timeout",
          "usage": "maximum time to wait for the final result (e.g. 60s, 5m, 10m)",
          "default": "10m0s"
        }
      ]
    },
    {
      "path": "bworlds control status",
      "usage": "bworlds control status \u003cbuild\u003e \u003cevaluation-id\u003e [flags]",
      "summary": "Read a ControlEvaluation without starting or charging anything",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "usage": "Output the ControlEvaluation as stable JSON"
        },
        {
          "name": "timeout",
          "usage": "request timeout",
          "default": "15s"
        }
      ]
    },
    {
      "path": "bworlds dossier",
      "usage": "bworlds dossier",
      "summary": "Sync a build's dossier (operator memory) between the API and the workspace",
      "access": "Command group",
      "subcommands": [
        "pull",
        "push"
      ]
    },
    {
      "path": "bworlds dossier pull",
      "usage": "bworlds dossier pull \u003cslug\u003e [flags]",
      "summary": "Download the build's dossier into the operator workspace",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds dossier push",
      "usage": "bworlds dossier push \u003cslug\u003e [flags]",
      "summary": "Upload workspace dossier documents to the API",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "confirm",
          "usage": "confirm updating the shared Build Dossier"
        },
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds findings",
      "usage": "bworlds findings",
      "summary": "Manage Build-scoped findings",
      "access": "Command group",
      "subcommands": [
        "autofix",
        "create",
        "edit",
        "history",
        "list",
        "update-status"
      ]
    },
    {
      "path": "bworlds findings autofix",
      "usage": "bworlds findings autofix \u003cbuild\u003e \u003cfinding-id\u003e [flags]",
      "summary": "Start an automatic correction for a Finding",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "confirm",
          "usage": "confirm the Workspace token cost and repository correction"
        },
        {
          "name": "json",
          "usage": "Output the exact agent job as stable JSON"
        },
        {
          "name": "no-wait",
          "usage": "return once the correction job starts"
        },
        {
          "name": "request-id",
          "usage": "UUID idempotency key to reuse when retrying"
        },
        {
          "name": "timeout",
          "usage": "maximum time to start and follow the correction (e.g. 60s, 5m, 10m)",
          "default": "10m0s"
        }
      ]
    },
    {
      "path": "bworlds findings create",
      "usage": "bworlds findings create \u003cslug\u003e [flags]",
      "summary": "Create an operator finding for a Build",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "ai-prompt",
          "usage": "Optional AI fix prompt for the recommendation"
        },
        {
          "name": "area",
          "usage": "Finding area",
          "default": "operations"
        },
        {
          "name": "confirm",
          "usage": "confirm creating the Finding"
        },
        {
          "name": "description",
          "usage": "Finding description"
        },
        {
          "name": "disposition",
          "usage": "Disposition metadata: restraint"
        },
        {
          "name": "fix-summary",
          "usage": "Recommendation summary label (defaults to \"Fix: \u003ctitle\u003e\")"
        },
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        },
        {
          "name": "rationale",
          "usage": "Why this finding matters (required)"
        },
        {
          "name": "service-line",
          "usage": "Service line: launch, run, improve",
          "default": "run"
        },
        {
          "name": "severity",
          "usage": "Severity: critical, high, medium",
          "default": "medium"
        },
        {
          "name": "source-ref",
          "usage": "Stable producer reference (e.g. cto-audit:2026-06-10:rls-missing-orders)"
        },
        {
          "name": "status",
          "usage": "Initial status: open, needs_user, in_progress, resolved, dismissed",
          "default": "open"
        },
        {
          "name": "steps",
          "usage": "How-to-fix step; repeat for multiple (at least one required)"
        },
        {
          "name": "title",
          "usage": "Finding title"
        }
      ]
    },
    {
      "path": "bworlds findings edit",
      "usage": "bworlds findings edit \u003cslug\u003e \u003cfinding-id\u003e [flags]",
      "summary": "Edit the content of an existing finding",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "ai-prompt",
          "usage": "AI fix prompt for the recommendation"
        },
        {
          "name": "area",
          "usage": "Finding area"
        },
        {
          "name": "confirm",
          "usage": "confirm editing the Finding"
        },
        {
          "name": "description",
          "usage": "Finding description"
        },
        {
          "name": "fix-summary",
          "usage": "Recommendation summary label"
        },
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        },
        {
          "name": "rationale",
          "usage": "Why this finding matters"
        },
        {
          "name": "service-line",
          "usage": "Service line: launch, run, improve"
        },
        {
          "name": "severity",
          "usage": "Severity: critical, high, medium"
        },
        {
          "name": "steps",
          "usage": "How-to-fix step; repeat for multiple, replacing the whole list"
        },
        {
          "name": "title",
          "usage": "Finding title"
        }
      ]
    },
    {
      "path": "bworlds findings history",
      "usage": "bworlds findings history \u003cslug\u003e \u003cfinding-id\u003e [flags]",
      "summary": "Show a finding's activity history, newest first",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        },
        {
          "name": "limit",
          "usage": "Number of events to list (1-200)",
          "default": "50"
        }
      ]
    },
    {
      "path": "bworlds findings list",
      "usage": "bworlds findings list \u003cslug\u003e [flags]",
      "summary": "List findings for a Build",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds findings update-status",
      "usage": "bworlds findings update-status \u003cslug\u003e \u003cfinding-id\u003e \u003cstatus\u003e [flags]",
      "summary": "Update a finding lifecycle status",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "confirm",
          "usage": "confirm the Finding status change"
        },
        {
          "name": "decision-summary",
          "usage": "What the builder must do or provide (required when setting needs_user without an existing decision)"
        },
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        },
        {
          "name": "reason",
          "usage": "Operator note for the status change"
        }
      ]
    },
    {
      "path": "bworlds repo",
      "usage": "bworlds repo",
      "summary": "Manage build repositories",
      "access": "Command group",
      "subcommands": [
        "clean",
        "clone",
        "list",
        "local-setup",
        "local-teardown",
        "push",
        "refresh"
      ]
    },
    {
      "path": "bworlds repo clean",
      "usage": "bworlds repo clean \u003cslug\u003e [flags]",
      "summary": "Remove the local temp directory for a cloned build",
      "access": "Local utility",
      "flags": [
        {
          "name": "confirm",
          "usage": "confirm removal of the local clone"
        },
        {
          "name": "json",
          "usage": "output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds repo clone",
      "usage": "bworlds repo clone \u003cslug\u003e [flags]",
      "summary": "Clone a build's repository to a local temp directory",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "force",
          "usage": "delete existing clone without prompting"
        },
        {
          "name": "json",
          "usage": "output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds repo list",
      "usage": "bworlds repo list [search] [flags]",
      "summary": "List Builds in your current Workspaces",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "shorthand": "j",
          "usage": "Output a stable JSON result"
        },
        {
          "name": "wide",
          "shorthand": "w",
          "usage": "Show full values without truncation"
        }
      ]
    },
    {
      "path": "bworlds repo local-setup",
      "usage": "bworlds repo local-setup \u003cslug\u003e [flags]",
      "summary": "Spin up a seeded local Supabase instance for a cloned build",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "usage": "output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds repo local-teardown",
      "usage": "bworlds repo local-teardown \u003cslug\u003e [flags]",
      "summary": "Stop the local Supabase instance and restore the clone for pushing",
      "access": "Local utility",
      "flags": [
        {
          "name": "json",
          "usage": "output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds repo push",
      "usage": "bworlds repo push \u003cslug\u003e [flags]",
      "summary": "Stage, commit, and push changes from the local clone",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "confirm",
          "usage": "confirm the repository commit and push"
        },
        {
          "name": "json",
          "usage": "output a stable JSON result"
        },
        {
          "name": "message",
          "shorthand": "m",
          "usage": "commit message",
          "default": "fix: operator-applied changes [bworlds-cli]"
        }
      ]
    },
    {
      "path": "bworlds repo refresh",
      "usage": "bworlds repo refresh \u003cslug\u003e [flags]",
      "summary": "Fetch latest changes with a fresh repository credential",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "usage": "output a stable JSON result"
        }
      ]
    },
    {
      "path": "bworlds telemetry",
      "usage": "bworlds telemetry",
      "summary": "Explore build telemetry: errors, sessions, and uptime",
      "access": "Command group",
      "subcommands": [
        "errors",
        "sessions",
        "uptime"
      ]
    },
    {
      "path": "bworlds telemetry errors",
      "usage": "bworlds telemetry errors \u003cslug\u003e [flags]",
      "summary": "Show grouped client errors for a build",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "usage": "Output as JSON"
        },
        {
          "name": "limit",
          "usage": "Maximum error groups to render",
          "default": "20"
        },
        {
          "name": "url",
          "usage": "Keep only errors whose route or message contains this fragment"
        },
        {
          "name": "window",
          "usage": "Window in days (1-90)",
          "default": "7"
        }
      ]
    },
    {
      "path": "bworlds telemetry sessions",
      "usage": "bworlds telemetry sessions \u003cslug\u003e [session-id] [flags]",
      "summary": "List sessions or show session detail for a build",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "depth",
          "usage": "Session detail JSON: summary, or full for the whole server record",
          "default": "summary"
        },
        {
          "name": "failed-only",
          "usage": "Session detail: keep only failed requests"
        },
        {
          "name": "has-errors",
          "usage": "Filter to sessions with errors"
        },
        {
          "name": "has-rage-clicks",
          "usage": "Filter to sessions with rage clicks"
        },
        {
          "name": "include-personal-data",
          "usage": "Include the end user's email address, which is withheld by default"
        },
        {
          "name": "json",
          "usage": "Output as JSON"
        },
        {
          "name": "time-range",
          "usage": "Time range: 24h, 7d, 30d",
          "default": "7d"
        }
      ]
    },
    {
      "path": "bworlds telemetry uptime",
      "usage": "bworlds telemetry uptime \u003cslug\u003e [flags]",
      "summary": "Show uptime status, daily rollups, and incidents for a build",
      "access": "Workspace operator",
      "flags": [
        {
          "name": "json",
          "usage": "Output a stable JSON result"
        }
      ]
    }
  ]
}
