{
  "schema_version": "1.0",
  "suite_id": "bozos-agent-utilities-v1",
  "title": "BOZOS Agent Utility Conformance Suite",
  "description": "Versioned, machine-executable examples for deterministic BOZOS utility contracts.",
  "canonical_url": "https://bozos.si/conformance/v1/manifest.json",
  "runner_contract": "Send each request as declared, require the expected HTTP status, then evaluate every assertion against the JSON response. A path is a dot-separated sequence of object keys and zero-based array indexes.",
  "license": "CC0-1.0",
  "updated": "2026-10-19",
  "vectors": [
    {
      "id": "text-stats-unicode-v1",
      "operation_id": "textStats",
      "request": {
        "method": "POST",
        "path": "/api/v1/text-stats",
        "body": {
          "text": "Agent 🧭\nready."
        }
      },
      "expect": {
        "status": 200,
        "assertions": [
          {
            "path": "characters",
            "operator": "equals",
            "value": 14
          },
          {
            "path": "code_units",
            "operator": "equals",
            "value": 15
          },
          {
            "path": "words",
            "operator": "equals",
            "value": 3
          },
          {
            "path": "lines",
            "operator": "equals",
            "value": 2
          },
          {
            "path": "utf8_bytes",
            "operator": "equals",
            "value": 17
          },
          {
            "path": "estimated_tokens",
            "operator": "equals",
            "value": 4
          }
        ]
      }
    },
    {
      "id": "canonical-json-nested-v1",
      "operation_id": "canonicalizeJson",
      "request": {
        "method": "POST",
        "path": "/api/v1/canonicalize",
        "body": {
          "value": {
            "z": 2,
            "a": {
              "y": 3,
              "b": 1
            }
          }
        }
      },
      "expect": {
        "status": 200,
        "assertions": [
          {
            "path": "canonical",
            "operator": "equals",
            "value": "{\"a\":{\"b\":1,\"y\":3},\"z\":2}"
          },
          {
            "path": "sha256",
            "operator": "equals",
            "value": "d7633d5d5d3d0c109676a92736315c7ec094da3bfadc55b14369e8abc5432f29"
          },
          {
            "path": "utf8_bytes",
            "operator": "equals",
            "value": 25
          }
        ]
      }
    },
    {
      "id": "retrieval-plan-etag-revalidate-v1",
      "operation_id": "planAgentRetrieval",
      "request": {
        "method": "POST",
        "path": "/api/v1/retrieval-plan",
        "body": {
          "resources": [
            {
              "id": "brief",
              "url": "https://example.com/llms.txt",
              "type": "text/plain",
              "last_modified": "2026-10-19T18:00:00Z",
              "bytes": 4200
            }
          ],
          "cache": [
            {
              "url": "https://example.com/llms.txt",
              "etag": "\"brief-v3\"",
              "last_modified": "2026-10-18T18:00:00Z"
            }
          ]
        }
      },
      "expect": {
        "status": 200,
        "assertions": [
          {
            "path": "ready",
            "operator": "equals",
            "value": true
          },
          {
            "path": "summary.selected",
            "operator": "equals",
            "value": 1
          },
          {
            "path": "selected.0.action",
            "operator": "equals",
            "value": "revalidate"
          },
          {
            "path": "selected.0.request.headers.If-None-Match",
            "operator": "equals",
            "value": "\"brief-v3\""
          },
          {
            "path": "safety.network_requests_made",
            "operator": "equals",
            "value": 0
          }
        ]
      }
    },
    {
      "id": "retrieval-plan-sha-skip-v1",
      "operation_id": "planAgentRetrieval",
      "request": {
        "method": "POST",
        "path": "/api/v1/retrieval-plan",
        "body": {
          "resources": [
            {
              "id": "contract",
              "url": "https://example.com/openapi.json",
              "type": "application/json",
              "sha256": "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad",
              "bytes": 9000
            }
          ],
          "cache": [
            {
              "url": "https://example.com/openapi.json",
              "sha256": "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"
            }
          ]
        }
      },
      "expect": {
        "status": 200,
        "assertions": [
          {
            "path": "summary.selected",
            "operator": "equals",
            "value": 0
          },
          {
            "path": "summary.skipped",
            "operator": "equals",
            "value": 1
          },
          {
            "path": "skipped.0.reason",
            "operator": "equals",
            "value": "sha256_match"
          }
        ]
      }
    },
    {
      "id": "discovery-audit-ready-v1",
      "operation_id": "auditAgentDiscovery",
      "request": {
        "method": "POST",
        "path": "/api/v1/discovery-audit",
        "body": {
          "base_url": "https://example.com",
          "robots_txt": "# https://example.com/llms.txt\n# https://example.com/agents.json\nSitemap: https://example.com/sitemap.xml",
          "llms_txt": "# Example\n\n## Start\nhttps://example.com/a https://example.com/b https://example.com/c\n\n## Tasks\nUseful things",
          "sitemap_xml": "<urlset><url><loc>https://example.com/</loc><lastmod>2026-10-19</lastmod></url></urlset>",
          "page_html": "<html><head><title>Example</title><meta name=\"description\" content=\"Useful\"><link rel=\"canonical\" href=\"https://example.com/\"><link rel=\"service-desc\" href=\"/openapi.json\"><script type=\"application/ld+json\">{}</script></head><body><a href=\"/a\">A</a><a href=\"/b\">B</a><a href=\"/c\">C</a></body></html>",
          "agent_index": {
            "entry_points": [
              {},
              {},
              {}
            ],
            "utilities": {
              "operations": [
                {}
              ]
            }
          }
        }
      },
      "expect": {
        "status": 200,
        "assertions": [
          {
            "path": "ready_for_agents",
            "operator": "equals",
            "value": true
          },
          {
            "path": "score",
            "operator": "equals",
            "value": 100
          },
          {
            "path": "safety.payload_retained",
            "operator": "equals",
            "value": false
          }
        ]
      }
    },
    {
      "id": "discovery-audit-sparse-v1",
      "operation_id": "auditAgentDiscovery",
      "request": {
        "method": "POST",
        "path": "/api/v1/discovery-audit",
        "body": {
          "base_url": "https://example.com"
        }
      },
      "expect": {
        "status": 200,
        "assertions": [
          {
            "path": "ready_for_agents",
            "operator": "equals",
            "value": false
          },
          {
            "path": "score",
            "operator": "equals",
            "value": 8
          },
          {
            "path": "warnings.length",
            "operator": "equals",
            "value": 10
          }
        ]
      }
    },
    {
      "id": "action-preflight-complete-v1",
      "operation_id": "actionPreflight",
      "request": {
        "method": "POST",
        "path": "/api/v1/preflight",
        "body": {
          "action": {
            "tool": "write_file",
            "summary": "Write the approved report",
            "arguments": {
              "path": "report.md",
              "version": 2
            },
            "authority_basis": "The user approved this path and report version.",
            "side_effects": [
              "Create one workspace file"
            ],
            "data_touched": [
              "approved report"
            ],
            "recipients": [],
            "reversible": true,
            "rollback_plan": "Delete report.md",
            "success_criteria": "report.md exists with version 2 content",
            "idempotency_key": "report-v2"
          }
        }
      },
      "expect": {
        "status": 200,
        "assertions": [
          {
            "path": "ready_for_review",
            "operator": "equals",
            "value": true
          },
          {
            "path": "blocking_gaps.length",
            "operator": "equals",
            "value": 0
          },
          {
            "path": "risk_flags",
            "operator": "equals",
            "value": [
              "data_access",
              "external_side_effects"
            ]
          }
        ]
      }
    },
    {
      "id": "action-preflight-incomplete-v1",
      "operation_id": "actionPreflight",
      "request": {
        "method": "POST",
        "path": "/api/v1/preflight",
        "body": {
          "action": {}
        }
      },
      "expect": {
        "status": 200,
        "assertions": [
          {
            "path": "ready_for_review",
            "operator": "equals",
            "value": false
          },
          {
            "path": "blocking_gaps",
            "operator": "equals",
            "value": [
              "tool",
              "summary",
              "arguments",
              "authority_basis",
              "side_effects",
              "data_touched",
              "reversible",
              "success_criteria"
            ]
          },
          {
            "path": "risk_flags.length",
            "operator": "equals",
            "value": 0
          }
        ]
      }
    },
    {
      "id": "contact-draft-complete-v1",
      "operation_id": "draftContactMessage",
      "request": {
        "method": "POST",
        "path": "/api/v1/contact-draft",
        "body": {
          "kind": "correction",
          "resource_id": "private-server-history-data",
          "summary": "UOX milestone source no longer resolves",
          "quoted_claim": "milestones[id=uox-1997].primary_sources[0]",
          "proposed": "Use the archived copy of the same page.",
          "evidence": [
            "https://web.archive.org/web/2005/http://uox3.org/"
          ],
          "sender": {
            "agent": "Conformance Agent",
            "human_reviewed": true
          }
        }
      },
      "expect": {
        "status": 200,
        "assertions": [
          {
            "path": "ready_to_send",
            "operator": "equals",
            "value": true
          },
          {
            "path": "blocking_gaps",
            "operator": "equals",
            "value": []
          },
          {
            "path": "email.to",
            "operator": "equals",
            "value": "bozos@bozos.si"
          },
          {
            "path": "email.subject",
            "operator": "equals",
            "value": "[BOZOS agent] correction: private-server-history-data - UOX milestone source no longer resolves"
          },
          {
            "path": "message_fingerprint",
            "operator": "equals",
            "value": "sha256:42b57bee68bf667781fdab40f5aca5d911d2d3daad536b3a8e383b42a44b73a1"
          },
          {
            "path": "safety.message_sent",
            "operator": "equals",
            "value": false
          }
        ]
      }
    },
    {
      "id": "contact-draft-incomplete-correction-v1",
      "operation_id": "draftContactMessage",
      "request": {
        "method": "POST",
        "path": "/api/v1/contact-draft",
        "body": {
          "kind": "correction",
          "resource_id": "private-server-history-data",
          "summary": "Wrong date",
          "sender": {
            "agent": "Conformance Agent"
          }
        }
      },
      "expect": {
        "status": 200,
        "assertions": [
          {
            "path": "ready_to_send",
            "operator": "equals",
            "value": false
          },
          {
            "path": "blocking_gaps",
            "operator": "equals",
            "value": [
              "quoted_claim",
              "evidence",
              "sender.human_reviewed"
            ]
          },
          {
            "path": "safety.network_requests_made",
            "operator": "equals",
            "value": 0
          }
        ]
      }
    }
  ]
}
