Bundles — a project in one file

A Document is a filesystem

A Prism Document is a hierarchy of path-addressed prims — which is exactly what a directory tree is. So a folder of files is a Document, with one small convention on top:

A document or svg file keeps a structural child subtree — the decoded content, live and diffable and linkable, not an opaque blob. Any other file is a blob: its raw bytes in a data array, byte-exact for a PNG or a stylesheet.

Filenames are data, not path segments. A path segment is restricted to letters, digits and underscore, and dotted names do not survive the binary crate — so each prim carries a safe segment plus its real name, the same way a scene format keeps asset names as strings rather than node identifiers.

Render-as

A file's type is the storage truth; the name's extension is the materialisation target. One document materialises as HTML when it is named page.html, or as Markdown when it is named page.md — the same content, two outputs, chosen by the name. Storage and presentation are cleanly separated, and a single source can become several artifacts.

A whole project in one file

Pack a directory into one Document and ship it as one compressed .prism:

prism pack   site/       site.prism    # a tree of html, svg, css and images → one compressed file
prism unpack site.prism  out/          # …and back, byte-identical

Documents and vectors travel structurally; binaries travel byte-exact; the bundle defaults to a compressed binary because that is the right container for image and asset data. It is the .usdz / app-bundle / SQLite-as-a-file pattern: a self-contained, compressed, content-addressable project you can move as a single object — and open as one Prism document.

The payoff compounds with the rest of the model. Because the bundle is itself a Document, the contained files are reachable by path, their internal structure is queryable, and an agent can edit a page inside the bundle without unpacking it. A project stops being a fragile pile of loose files with implicit relationships and becomes one navigable, linkable, mutable document.