## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - A task can run Google's Antigravity CLI as a swarm: one coordinator and several helpers work in the task folder. > - Today the task shows the swarm only as a flat list of step titles, such as "Started helper writer-a". > - Antigravity's own Swarm UI shows a goal, threads, helpers with their state and current step, and a numbered message board. > - We did not know which of these facts Paperclip actually receives. We also did not know how the facts could look in a task. > - This pull request records what Paperclip receives, from real recorded runs. It also adds design-proposal stories that show three directions, built only from those facts. > - The benefit is a grounded design decision. The next step is clear: read the swarm's own files and fix one driver bug. ## Linked Issues or Issue Description Refs #22731 (the swarm driver). Refs #22733 (the `/swarm` command). **Subsystem affected** Task chat and run activity for the Antigravity CLI swarm turn (`packages/paperclip-runner/src/drivers/acpx/antigravity-swarm-*`). Storybook design proposals. **Problem or motivation** During a swarm, the user sees only short step titles. The user cannot see which helper does what, which helper is blocked, or how far the work is. Antigravity's own UI shows all of this. We did not know if Paperclip can get the same data. **Proposed solution** Record the evidence in `doc/plans/2026-11-24-antigravity-swarm-events.md`. The short answer is "partly": - Over ACP, Paperclip gets everything the coordinator does. This includes the swarm title, each helper's name and brief, a goal/task/thread plan, the coordinator's own messages, finish and stop, and one usage total. - Paperclip gets nothing that the helpers do over ACP. The results of `swarm status` and `read_board` are not forwarded. - The CLI writes the board, the roster and each helper's steps as structured JSON in its private `--gemini-dir`. Paperclip already owns that folder. Then show three directions in Storybook, built only from this data. Each element has a tag that tells where its data comes from. **Alternatives considered** - Show only the facts that come over ACP. With this choice, the task cannot show helper state, the current step or helper messages. - Ask the coordinator to post summaries. This costs tokens, and the summaries are still prose. - Wait for Google to expose more. The work graph, a Google review state and the narrator overview are not available today. The stories show them only in a variant with the label "Needs Google". **Additional context** The inventory found a driver bug. The coordinator writes its plan to `<state-dir>/antigravity-cli/brain/<session>/.system_generated/swarm/plan.json`, because its built-in `swarm_pane` skill tells it to. `antigravityOutsideChange` thinks that this is a write outside the task folder, so the driver stops the swarm. This happened in 3 of 7 recorded swarm turns. This PR does not fix it. The fix is to exempt that one folder, with a red/green test. ## What Changed - `doc/plans/2026-11-24-antigravity-swarm-events.md`: the inventory. It lists each element of the reference UI, where the data comes from (ACP update, tool input or file), samples, timing and risk. - `ui/storybook/fixtures/antigravity-swarm.sample.json`: redacted events from one real 4-helper swarm run (CLI 1.5.15, auto mode, isolated state folder). It holds the ACP updates and the swarm files. - `ui/storybook/support/design-proposals/swarm-activity/`: turns the fixture into a view model (helpers, state, current step, messages, progress, threads) and adds the state variants. It also holds presentational parts that reuse shipped primitives: the runner header, the activity group, the subagent tree, `StatusGlyph`, `Tabs`, `Badge` and `Button`. - `ui/storybook/stories/design-proposals/swarm-activity.stories.tsx` (`design-antigravity-swarm-activity`) adds 16 stories: - Compare directions. - Today: the step titles from the current driver. - Direction 1 · Inline helpers (running, helper blocked, finished). - Direction 2 · Swarm panel (overview, helpers, messages). - Direction 3 · Summary card (collapsed, expanded). - The states starting, running, helper blocked, stopping, stopped, failed, not available and finished. - A long swarm with 11 helpers and 25 messages. - Narrow width. - "Would need Google to expose". - No product code changes. Nothing is connected to live pages. ## Verification - `node scripts/storybook-catalog.mjs --check`: pass (371 files, 3480 stories). - `node --test scripts/storybook-catalog.test.mjs`: 13/13 pass. - `node scripts/check-token-gates.mjs`: all gates clean. - `cd ui && npx tsc -p tsconfig.json --noEmit`: 0 errors. - `pnpm build-storybook`: pass. A headless Playwright run opened each of the 16 stories in light and dark at 1440 px (390 px for the narrow story) and saved screenshots. No story scrolls horizontally. - Evidence for the inventory: 7 recorded swarm turns and 1 new real run, about 3 minutes and 180k coordinator tokens. ## Risks - Low risk. The change adds Storybook files and a doc only. - The design depends on files that the CLI does not document. A future reader must pin to the CLI version and use fixture tests. The doc tells this. ## Model Used - Claude Opus 5.5 (`claude-opus-5-5`), Anthropic, in Claude Code with tool use (shell, file edit, headless browser). ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [ ] I have added or updated tests where applicable (stories only; no behavior to test) - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@paperclipai/ui
Published static assets for the Paperclip board UI.
What gets published
The npm package contains the production build under dist/. It does not ship the UI source tree or workspace-only dependencies.
Storybook
Storybook config, stories, and fixtures live under ui/storybook/.
pnpm --filter @paperclipai/ui storybook
pnpm --filter @paperclipai/ui build-storybook
Typical use
Install the package, then serve or copy the built files from node_modules/@paperclipai/ui/dist.
Editor dependency identity
Keep the root and workspace overrides for @codemirror/state,
@codemirror/view, and @lezer/common aligned. CodeMirror requires shared
extension identity, while Lezer parsers and syntax highlighters require shared
NodeProp IDs. Multiple Lezer copies can crash code-block highlighting with
tags is not iterable. src/lib/codemirror-single-instance.test.ts checks the
installed dependency graph and highlights sample code through the editor's real
language dependencies. GitHub Actions owns regeneration of pnpm-lock.yaml.