Browser-friendly URLs GitHub issue

Classes should live at URLs that render as a web page when a human visits them in a browser — the same URL the developer would naturally bookmark or share. Specialized fetchers translate those URLs to whatever raw-bytes form the host actually serves.

vibecode
{"vibecode": {
    "doc": "browser_friendly_urls",
    "role": "general design principle: classes live at human-facing browser URLs (what people share and bookmark), and specialized per-host fetchers handle the translation to raw-bytes URLs",
    "key_concepts": ["classes_addressable_by_human_facing_url",
        "per_host_specialized_fetcher_translates_to_raw_url",
        "developer_uses_the_url_they_would_share",
        "one_fetcher_per_host_pattern"],
    "related": ["requirements/caspian/downloads/github/ (first specialized fetcher)",
        "requirements/caspian/downloads/ (fetcher framework)"]
}}

The principle GitHub issue

When a developer publishes a Caspian class, the URL they hand to a collaborator should be the same URL they'd open in a browser to read it. Not a separate "raw" URL, not an API endpoint, not a magic shortform — the actual web page where the class renders with syntax highlighting and an "Edit" button.

This matters because:

The mechanism GitHub issue

Each host with a "browser view" of a file (the /blob/ path on GitHub, the equivalent on other hosts) needs a specialized fetcher that knows how to translate that host's web URL to its raw-bytes URL. The translation is per-host because the URL shapes differ.

A specialized fetcher:

  1. Pattern-matches the host (and possibly the path shape) on incoming %puck[url] lookups.
  2. Translates the human URL to whichever URL actually serves the bytes for that host (the raw URL, a CDN endpoint, an API call, whatever).
  3. Fetches the bytes.
  4. Hands them to the engine (verification happens at the engine layer per the cache spec).

The first specialized fetcher is GitHub. Future fetchers in the same family would cover other major code-hosting services where the same pattern appears — GitLab, Codeberg, Bitbucket, Gitea, etc. Each would be its own small doc and its own translation rule.

What this is not GitHub issue

See also GitHub issue


© 2026 Puck.uno