Plugin Guide v1: in-app plugin API docs with SDK-synced surface map - #2248
Open
brsbl wants to merge 53 commits into
Open
Plugin Guide v1: in-app plugin API docs with SDK-synced surface map#2248brsbl wants to merge 53 commits into
brsbl wants to merge 53 commits into
Conversation
Documents the bb plugin API as an annotated map of the product plus the generated reference behind it. - apps/web/scripts/generate-plugin-api-docs.mjs parses the SDK's committed bundled declarations into a committed model; --check fails when stale. - packages/plugin-api-map holds the surface inventory, the bb UI skeletons, and the annotation cards, shared so the docs page and the in-app plugin cannot disagree about what bb can be extended with. - plugins/plugin-api-docs renders that map inside bb as a nav panel, with the host's real composer embedded in the composer and home diagrams. - The docs page leads with the reference; the diagram sits below it as a supporting explainer. - An anatomy manifest pins the skeletons to the real app component order, and apps/app's docs-anatomy-manifest test fails when the app reorders. - apps/web route changes animate through the View Transition API, content only, with reduced motion falling back to an instant swap. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
These changes were already uncommitted in this worktree when the plugin API docs work began and are unrelated to it: blog rendering, landing analytics and endpoints, connect/auth routes, server token handling, and small web UI primitive tweaks. Committed separately so they can be reviewed or dropped on their own. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The bb Plugin Guide (plugins/plugin-api-docs, rendering packages/plugin-api-map) becomes bb's only plugin API documentation: six slides — annotated skeletons of the app window, composer, home, settings, and Extensions plugin pages, plus a backend capability grid — with a reviewed card per surface, cross-references, and "Used by" links. packages/plugin-api-map/test/api-sync.test.ts fails the build when the map and the SDK drift apart; the apps/web docs route, generated API model, and generator are deleted in its favor. Host and SDK changes the guide rides on, all additive: - experimental_suppressPluginUi on experimental_NewThreadComposer, plumbed through the new-thread prompt box path, so an embedded composer can render without other plugins' composer UI (a prompt improver's action was landing inside the diagrams and rewriting the persisted example draft). - Route anchors inside plugin UI navigate client-side; links to a plugin's Extensions page open it beside the current pane. - New plugin-detail pane kind so a plugin's Extensions page can live in a split; ordinary navigation to it stays full-window. - Plugin CSS is awaited before registrations publish, removing the unstyled first-paint flash on plugin load and reload. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-ready-thr_kg7xb7qipg
…-ready-thr_kg7xb7qipg
…-ready-thr_kg7xb7qipg # Conflicts: # apps/web/src/styles.css
…l-fixes-thr_7f4g7pd89a # Conflicts: # apps/app/package.json # pnpm-lock.yaml
brsbl
added a commit
that referenced
this pull request
Aug 24, 2026
brsbl
added a commit
that referenced
this pull request
Aug 24, 2026
brsbl
added a commit
that referenced
this pull request
Aug 24, 2026
brsbl
added a commit
that referenced
this pull request
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
bb's public Plugin SDK was discoverable only through declarations and scattered implementation details. Plugin authors had no product-native map of extension points, no compact way to hand one of those surfaces to an agent, and no enforced maintenance path when the public SDK changed.
What changed
plugins/plugin-api-docs) backed by the sharedpackages/plugin-api-mappackage.⇧⌘Premains visible as a replayable entry point, and running the action closes the palette and opens the plugin's selected Release checklist side-panel tab. The action row and numbered annotation remain distinct click targets. The app-window page is larger and less cramped; its timeline and loading skeleton share taller, looser geometry.retry-notes.mdcustom-viewer tab, and a realistic custom Diff tab. Their badges occupy a reserved upper lane and do not clip or cover the tabs.Stripe mockselection. Moves the composer typeahead fixture just enough to clear its annotations.api-sync.test.ts, so CI fails when a public plugin export,app.slots.*method, orBbPluginApiproperty changes without a corresponding Guide surface.plugin-guide-maintenanceskill with the plugin. It covers identifying SDK drift, updating the surface card and minimal agent pointers, regenerating the inventory, running focused tests/typechecks, building, and real-UI verification.main:@get-bb/plugin-sdkandPLUGIN_SDK_VERSIONare0.4.18, advanced by Handle reserved plugin CLI name collisions #2411 for corrected CLI-collision JSDoc. This PR's cumulative diff adds no public Plugin API member and no compatibility-version bump; the Guide engine floor remains capability-based at>=0.4.3. The proposedexperimental_pluginCustomizationsandexperimental_copyMentionAPIs are not present.How you verified
Final pushed candidate:
bd991315a73abd9cc5fb31bdb19e81b7f72d9f91; currentmain/ merge base:ca0f85c44859a34f85840824de3ea9ffbccbcec8.0.4.8scaffold upgrading under current0.4.18.@bb/plugin-api-map,bb-plugin-plugin-api-docs,@bb/app,@bb/server, and@get-bb/plugin-sdk.0.4.18; the Nightly path build remains compatible with its shipped SDK0.4.8.git diff --check origin/main...HEAD— PASS. The cumulative diff contains nopackages/plugin-sdkor SDK-version-source files, no Inspector/Moss paths, and no rejected experimental API identifiers.Exact-head fluid Chrome evidence · Exact-head fluid Safari evidence
Before and exact-head after
Before — prior PR head
19ab9339bbd38cda4343620a4124c9ee0ac0ec1c: the app-window page overflows horizontally and vertically at the same 2048×1028 viewportAfter — exact final candidate
bd991315a73abd9cc5fb31bdb19e81b7f72d9f91: the compact reference still fits above the fold with no page overflowOn a taller display — the fixture restores its roomy original size and stops at the cap
Safari 26.5.2 — the same exact-head full-size cap
Earlier feature evidence
These flows were captured at prior frozen candidate
19ab9339bbd38cda4343620a4124c9ee0ac0ec1c; the final viewport-only commit does not change their contracts or interactions.Before — right-panel annotation badges obscure their entry points
Prior candidate
19ab9339bbd38cda4343620a4124c9ee0ac0ec1c: annotations remain clear of realistic tabsSafari 26.5.2 — prior candidate
Before — the command palette sits on an empty canvas
Prior candidate: realistic thread context, entry hint, selected plugin action, and annotation
Before — copied references paste as standalone pills
Prior candidate: two distinct pills retain short editable framing copy
Safari 26.5.2 — structured framed paste
No linked issue.
BB-Thread-ID: thr_7dczktandc
BB-Thread-ID: thr_7f4g7pd89a