{
  "version": "0.1.0",
  "updatedAt": "2026-07-02",
  "capabilities": [
    { "id": "assistant.seo_read", "entityId": "assistant.capability", "level": "member", "summary": "Assistant can read SEO project context visible to the actor." },
    { "id": "assistant.seo_run_analysis", "entityId": "assistant.capability", "level": "member", "summary": "Assistant can request non-destructive SEO scan, ontology extraction, semantic analysis, and evidence collection in an authorized project." },
    { "id": "assistant.seo_plan_changes", "entityId": "assistant.capability", "level": "member", "summary": "Assistant can request anchor review, keyword curation, keyword map, optimization plan, rewrite variants, and validation previews." },
    { "id": "assistant.seo_apply_changes", "entityId": "assistant.capability", "level": "member", "summary": "Assistant can request an SEO changeset apply only through the SEO-owned adapter, confirmation, validation, and Gateway/app scopes." }
  ],
  "roleMatrix": [
    {
      "roleId": "assistant_member",
      "allowedCapabilities": [
        "assistant.seo_read",
        "assistant.seo_run_analysis",
        "assistant.seo_plan_changes",
        "assistant.seo_apply_changes"
      ],
      "summary": "SEO actions are app-owned and remain bounded by SEO project permissions and Gateway scopes."
    },
    {
      "roleId": "assistant_admin",
      "allowedCapabilities": [
        "assistant.seo_read",
        "assistant.seo_run_analysis",
        "assistant.seo_plan_changes",
        "assistant.seo_apply_changes"
      ],
      "summary": "Assistant admin does not bypass SEO project permissions; it only has the same SEO capabilities plus existing admin capabilities."
    }
  ],
  "operations": [
    {
      "id": "assistant.op.seo_read_project",
      "capabilityId": "assistant.seo_read",
      "sourceEndpoints": ["GET /seo/projects/:projectId"],
      "requiredGuards": ["requireSeoProjectRead"],
      "summary": "Read SEO project context through SEO-owned API."
    },
    {
      "id": "assistant.op.seo_run_analysis",
      "capabilityId": "assistant.seo_run_analysis",
      "sourceEndpoints": ["POST /seo/projects/:projectId/scan", "POST /seo/projects/:projectId/analysis/semantic", "POST /seo/projects/:projectId/market/collect"],
      "requiredGuards": ["requireSeoProjectWrite"],
      "summary": "Run SEO scan and analysis through SEO-owned API."
    },
    {
      "id": "assistant.op.seo_plan_changes",
      "capabilityId": "assistant.seo_plan_changes",
      "sourceEndpoints": ["POST /seo/projects/:projectId/anchor-review", "POST /seo/projects/:projectId/keyword-map", "POST /seo/projects/:projectId/optimization-plan", "POST /seo/projects/:projectId/rewrite-variants"],
      "requiredGuards": ["requireSeoProjectWrite"],
      "summary": "Prepare anchor review, curated keyword map, SEO plan and rewrite variants without mutating target source."
    },
    {
      "id": "assistant.op.seo_apply_changes",
      "capabilityId": "assistant.seo_apply_changes",
      "sourceEndpoints": ["POST /seo/projects/:projectId/changesets/:changesetId/apply"],
      "requiredGuards": ["requireSeoProjectApply", "requireSeoFinalValidation", "requireConfirmationToken", "requireIdempotencyKey"],
      "summary": "Apply approved SEO changeset through SEO-owned adapter and safety gates."
    }
  ]
}
