Skip to content

feat(docs): V3 library catalog manifest + 5 new dev docs#254

Merged
tonytlwu merged 2 commits intomasterfrom
v3/library-catalog-manifest
Apr 27, 2026
Merged

feat(docs): V3 library catalog manifest + 5 new dev docs#254
tonytlwu merged 2 commits intomasterfrom
v3/library-catalog-manifest

Conversation

@tonytlwu
Copy link
Copy Markdown
Contributor

Summary

  • Adds emitV3LibraryCatalog() to bin/build-agent-indexes.mjs which emits .well-known/llms-v3-libraries.json — the V3-curated agent-facing library catalog consumed by Fliplet Studio's V3 builder via search_libraries
  • Curates the catalog to 14 packages by flagging 26 docs exclude_from_v3_catalog: true (UI primitives covered by the V3 design system, AI-replicable libraries, deprecated packages, preloaded ambient runtime)
  • Writes 5 new V3-essential dev docs (source-verified): fliplet-chat, fliplet-security, fliplet-socket, fliplet-tokens, fliplet-app-submissions
  • Adds bin/check-v3-catalog-drift.mjs (npm run check:v3-catalog) — validates the catalog against the live /v1/widgets/assets; errors on missing packages, warns on first-party assets without a catalog entry
  • Corrects fliplet-page.md frontmatter to v3_relevant: false (red-team verification confirmed V2-only — V3 SPA apps use Fliplet.Router, not Fliplet.Page)

Why

The Fliplet Studio V3 AI builder's search_libraries tool currently fetches /v1/widgets/assets (sourced from fliplet/api/config/common/assets.json), which conflates runtime contract with agent-facing catalog and is hard to maintain. This PR moves the agent-facing catalog into the developer docs, where descriptions can be tuned for AI ranking and curation lives close to authoritative API documentation.

assets.json remains the runtime contract (file lists, dependency graph, version pinning, and dependencyDetector's provides regex source — unchanged in this scope).

Plan + curation in the studio repo:

  • studio/docs/plans/v3-library-catalog.md
  • studio/docs/plans/v3-library-catalog-curation.md

Catalog (14 packages)

fliplet-app-submissions, fliplet-audio, fliplet-barcode, fliplet-chat, fliplet-communicate, fliplet-datasources, fliplet-encryption, fliplet-media, fliplet-notifications, fliplet-payments, fliplet-security, fliplet-session, fliplet-socket, fliplet-tokens

The catalog is intentionally lean — anything that V3's design system covers, or that AI generates well natively (toasts, tables, date pickers, simple typeaheads, theme primitives), is excluded. The description field in the new tool description tells the agent: "if a typical UI input/widget/table/picker returns nothing, that is BY DESIGN. Generate it natively."

Test plan

  • npm run test:unit — 87 tests pass (54 existing + 33 new for emitV3LibraryCatalog + tests added by other recent changes)
  • npm run check:docs (strict frontmatter validation) — clean
  • npm run build:agent-indexes — emits 14 entries to llms-v3-libraries.json matching the curation
  • npm run check:v3-catalog — 0 errors, 27 warnings (all warnings are intentional curation exclusions: fliplet-table, fliplet-themes, fliplet-helper, etc.)
  • Cloudflare preview deploys and serves https://<preview>.pages.dev/.well-known/llms-v3-libraries.json correctly
  • Studio's searchLibraries.js rewrite (separate Studio PR, gated on this merging)
  • V3 AI builder eval scenarios (post-merge, against production manifest)

🤖 Generated with Claude Code

tonytlwu and others added 2 commits April 26, 2026 23:59
Adds emitV3LibraryCatalog() to bin/build-agent-indexes.mjs which
filters API/fliplet-*.md docs (skipping exclude_from_v3_catalog: true)
and emits .well-known/llms-v3-libraries.json — the agent-facing
catalog consumed by Fliplet Studio's V3 builder via search_libraries.

Schema is intentionally minimal: package, title, description, docUrl.
Title and description reuse the existing build-pipeline extraction
(frontmatter or H1 + first paragraph). Package defaults to URL slug
with optional package: frontmatter override.

Adds bin/check-v3-catalog-drift.mjs (npm run check:v3-catalog) that
validates the manifest against the live /v1/widgets/assets:
- Errors on catalog packages not present in the live API
- Warns on first-party assets without a V3 catalog entry

Tests: 11 new test cases for emitV3LibraryCatalog and
deriveV3Package; 87 total now passing.

Plan: studio/docs/plans/v3-library-catalog.md (Phase 4).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Curates the V3 library catalog consumed by Fliplet Studio's V3 builder
via search_libraries. The catalog ships with 14 packages — anything AI
cannot replicate natively in V3 (native bridges, server-coordinated
flows, secure data primitives, realtime, audio).

26 docs flagged exclude_from_v3_catalog: true. Reasons grouped:
- Bucket 1 (15) — covered by V3 design system / AI-native generation
  (table, themes, helper, csv, gamify, ui-* inputs, audio-player)
- Bucket 2 (2) — subsumed by another catalog entry
  (content, profile-content — DataSources covers it)
- Bucket 3 (2) — preloaded ambient (core, page)
- Bucket 4 (4) — non-installable pattern docs (toast, ui-actions, ui)
- Bucket 5 (3) — deprecated / scheduled-for-removal
  (database, encryption.deprecated, oauth2)

oauth2 excluded because the third-party-IdP path relies on an open
proxy slated for deprecation; preempts steering AI builds onto a
removed path.

5 new V3-essential docs written via /fl-write-dev-doc (source-verified
against ~/Sites/fliplet/api/public/assets/<pkg>/):
- fliplet-chat.md (506 lines) — realtime chat/messaging
- fliplet-security.md (210 lines) — encrypted device storage
  (clearly differentiated from fliplet-encryption to disambiguate
  the V3 catalog "encrypt" query)
- fliplet-socket.md (251 lines) — realtime websocket primitive
  with server URL discovery + auto-auth + transport fallback
- fliplet-tokens.md (130 lines) — app API tokens
- fliplet-app-submissions.md (225 lines) — App Store / Google Play
  submission metadata

fliplet-page.md frontmatter corrected to v3_relevant: false (red-team
verification confirmed V2-only; V3 SPA apps use Fliplet.Router, not
Fliplet.Page).

Plan + curation: studio/docs/plans/v3-library-catalog{,-curation}.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying fliplet-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: a98fe95
Status: ✅  Deploy successful!
Preview URL: https://2b3d8a8d.fliplet-cli.pages.dev
Branch Preview URL: https://v3-library-catalog-manifest.fliplet-cli.pages.dev

View logs

@tonytlwu tonytlwu merged commit 6c377d4 into master Apr 27, 2026
3 of 4 checks passed
@tonytlwu tonytlwu deleted the v3/library-catalog-manifest branch April 27, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant