(defcomp ()
  (~docs/page :title "Cross-Service Fragments"
    (~docs/section :title "Fragment protocol" :id "protocol"
      (p (~tw :tokens "text-stone-600")
        "Rose Ash runs as independent microservices. Each service can expose HTML or sx fragments that other services compose into their pages. Fragment endpoints return text/sx or text/html.")
      (p (~tw :tokens "text-stone-600")
        "The frag resolver is an I/O primitive in the render tree:")
      (~docs/code :src (highlight "(frag \"blog\" \"link-card\" :slug \"hello\")" "lisp")))
    (~docs/section :title "SxExpr wrapping" :id "wrapping"
      (p (~tw :tokens "text-stone-600")
        "When a fragment returns text/sx, the response is wrapped in an SxExpr and embedded directly in the render tree. When it returns text/html, it's wrapped in a ~rich-text component that inserts the HTML via raw!. This allows transparent composition across service boundaries."))
    (~docs/section :title "fetch_fragments()" :id "fetch"
      (p (~tw :tokens "text-stone-600")
        "The Python helper fetch_fragments() fetches multiple fragments in parallel via asyncio.gather(). Fragments are cached in Redis with short TTLs. Each fragment request is HMAC-signed for authentication."))))
