← TinyGPT · docs · devlog · roadmap · speedup
source: docs/prds/B31-gallery-and-project-pins.md · view on GitHub ↗

PRD — Unify the gallery (browser + Mac) + project-level model pins

Goal

Two surfaces:

  1. Unified gallery manifest — extend the existing browser/public/gallery/manifest.json so it lists not just the browser-loadable from-scratch .bin models but also the Mac-side specialists (LoRA + DoRA adapters, GGUF base bundles, .tinygpt full models, Hugging Face-hosted artifacts). One published JSON, two clients (browser playground + tinygpt CLI), no parallel registries.

  2. Project-level model pins — a tinygpt.project.json per- project manifest declaring which models the project depends on (analogous to package.json / requirements.txt). Running tinygpt pull from a project dir fetches everything; tinygpt validate checks every pin resolves; the Mac app’s Factory tab (B6) reads pins to populate its model picker.

Together these make the “ship a specialist, ship a project” story real. Without them, A1/B1/B25/B8 each ship as bespoke download URLs in the docs — doesn’t scale past 3 specialists.

Why now

The trace-loop dividend (added 2026-06-13)

The thing Castform has that we don’t is extensive production traces — they observe their customers’ agent traffic at the SaaS boundary, which feeds their dataset-synthesis loop (filtered into training data → better next iteration). We don’t have a SaaS; we’ve been on the wrong end of that asymmetry.

Project-level pins flip it: when a project pins models from this gallery AND runs them through our serve, we (or the project owner) own the trace stream by construction. B22 already ships per-rollout .atraj files at the serve layer; B29 turns those into training data. The missing piece was which model the project is running — and the project file gives us exactly that in machine-readable form.

That makes B31 the architectural pivot: it’s the file that ties together gallery (substrate distribution) + traces (B22 substrate capture) + trace-to-data (B29 substrate refinement) + composite reward (B28 substrate scoring). The trace dividend isn’t a hypothetical future “if users adopt”; it’s free the first time a project file ships with a non-trivial models list.

Scope — in

Unified manifest (extends the browser schema)

Project pins

What ships in this PR (the scaffolding)

FileContent
native-mac/Sources/TinyGPTModel/GalleryManifest.swiftnew — Codable types matching gallery-schema.ts; reader for a manifest JSON file.
native-mac/Sources/TinyGPTModel/ProjectManifest.swiftnew — Codable types for tinygpt.project.json.
native-mac/Tests/TinyGPTModelTests/GalleryManifestTests.swiftnew — parse the shipped browser gallery manifest; round-trip; reject malformed shapes.
native-mac/Tests/TinyGPTModelTests/ProjectManifestTests.swiftnew — parse a fixture project file; reject schema violations.
examples/tinygpt.project.jsonnew — fixture example a consumer project can copy.
docs/prds/B31-gallery-and-project-pins.mdthis file.

What’s deferred (PRD captures, not shipped this PR)

Scope — out

Acceptance criteria

Scaffolding (this PR)

Full B31 ship (remaining)

Reference patterns

Open questions

Sibling note: mascot

Castform’s brand-ambassador cartoon prompted a related question: should TinyGPT have one? Yes — pace-the-companion is the natural Pace caricature; “tinygpt-the-trainer” is the distinct character for the platform/toolkit side. Filed in docs/decision_log.md as a marketing/identity item (not a feature PRD).