Skip to content

manager prompt: move user-preference content into default PREFERENCES.md#26

Closed
SawyerHood wants to merge 1 commit into
bb/ship-manager-friendly-default-built-in-template-thr_wthq39u85jfrom
bb/audit-move-user-preference-content-from-manager-thr_f7d57nie2r
Closed

manager prompt: move user-preference content into default PREFERENCES.md#26
SawyerHood wants to merge 1 commit into
bb/ship-manager-friendly-default-built-in-template-thr_wthq39u85jfrom
bb/audit-move-user-preference-content-from-manager-thr_f7d57nie2r

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Summary

Three small moves out of packages/templates/src/templates/manager-agent-instructions.md and into the default bundled apps/server/src/services/threads/default-template/PREFERENCES.md. The prompt keeps the bb mechanics; the user-opinion bullets become defaults-with-overrides in PREFERENCES.md.

What Old location New location Form
"Style STATUS.html like bb / use Tailwind" manager-agent-instructions.md:45 PREFERENCES.md > Workflow > STATUS.html styling default + "switch and note it here"
Update cadence (kickoff / completion / blocker-only, terse) manager-agent-instructions.md:53 PREFERENCES.md > Communication > Update cadence (new section) default + "record it here"
Worker report-back format (outcome / changed files / validation / blockers) manager-agent-instructions.md:83 PREFERENCES.md > Workflow > Worker report format default + "record the change here"

The prompt still mentions PREFERENCES.md exists and which decisions live there, so the manager knows to consult it. Bb mechanics (primitives, tool names, [bb system] semantics, no-polling rule, env vars, worktree/environment behavior, common patterns, ASYNC.md format, storage layout, hatch flow, absolute-path markdown links) are unchanged.

The full move audit (including everything that came up and stayed in the prompt) is at:

/Users/sawyerhood/.bb/thread-storage/thr_f7d57nie2r/reports/manager-prompt-audit.md

Stacked on PR #25

This PR is based on bb/ship-manager-friendly-default-built-in-template-thr_wthq39u85j (#25), because it edits the bundled PREFERENCES.md introduced by that PR. GitHub will automatically retarget the base to main once #25 merges; until then, please review #25 first.

Test plan

  • pnpm exec turbo run typecheck --filter=@bb/templates --filter=@bb/server
  • pnpm exec turbo run test --filter=@bb/templates --filter=@bb/server
  • pnpm exec turbo run build --filter=@bb/server and confirm dist/default-template/{PREFERENCES.md,STATUS.html} both present
  • git diff --check
  • packages/templates/test/templates.test.ts updated: drops the removed "Unless otherwise specified, make STATUS.html styled like bb" assertion, adds positive assertions for the three new prompt sentences, adds negative assertions confirming the old prescriptions are gone.
  • apps/server/test/threads/manager-storage-templates.test.ts updated: asserts the bundled PREFERENCES.md now contains ## Communication, Update cadence, and Worker report format.

🤖 Generated with Claude Code

Three small moves out of the manager system prompt and into the default
bundled `PREFERENCES.md`, with the prompt left signposting that those
decisions live in `PREFERENCES.md`:

- STATUS.html visual styling default ("look like bb, use Tailwind") —
  previously prescribed in the prompt, now a default-with-override
  bullet under `PREFERENCES.md > Workflow > STATUS.html styling`. The
  prompt still surfaces `bb guide styling` for managers that want it.
- Update cadence to the user (kickoff / completion / blocker-only,
  concise factual ownership-clear) — previously prescribed in the
  prompt, now a default-with-override bullet under a new
  `PREFERENCES.md > Communication > Update cadence`. The prompt now
  defers to `PREFERENCES.md` and tells the manager to ask if unset.
- Worker report-back format (outcome / changed files / validation /
  blockers) — previously baked into the delegation paragraph, now a
  `PREFERENCES.md > Workflow > Worker report format` bullet. The prompt
  keeps the general delegation hygiene (objective, constraints,
  deliverable, validation, one owner per task) and points at
  `PREFERENCES.md` for the report shape.

Bb mechanics in the prompt are unchanged — primitives, tool names,
`[bb system]` lifecycle semantics, no-polling rule, env vars,
worktree/environment behavior, common patterns, ASYNC.md format,
storage layout, hatch flow.

Tests:
- `packages/templates/test/templates.test.ts` swaps the now-removed
  "Unless otherwise specified, make STATUS.html styled like bb" assertion
  for assertions on the new "Whether to apply it is a `PREFERENCES.md`
  decision", "Update cadence and verbosity vary by user", and "The
  specific report-back format ... is a user-preference" sentences, plus
  negative assertions confirming the old prescriptions are gone.
- `apps/server/test/threads/manager-storage-templates.test.ts` adds
  assertions that the bundled `PREFERENCES.md` now contains the new
  `## Communication` section, `Update cadence`, and
  `Worker report format` bullets.

Audit report saved to thread storage at
`/Users/sawyerhood/.bb/thread-storage/thr_f7d57nie2r/reports/manager-prompt-audit.md`.

Stacked on PR #25 (default-template bundle); will rebase to main once
that lands.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@SawyerHood SawyerHood closed this May 19, 2026
SawyerHood added a commit that referenced this pull request Jul 4, 2026
…mposer, fileOpener + notes hero (#498)

Four new plugin platform surfaces plus the hero plugin that exercises
all of them, per the approved spec (plans/notes-plugin-api-spec.html).

## bb.sdk.files — host file read/write (f069bcb)
- New `host.write_file` daemon command: 25 MB cap, optional `rootPath`
containment resolved through symlinks on the nearest existing ancestor,
and an `expectedSha256` compare-and-swap guard (hash = CAS, `null` =
create-only, omitted = unconditional) that returns a `conflict`
**outcome** with the current hash instead of an error.
- File reads now include `sha256` so editors can do safe
read-modify-write.
- Server routes `POST /files/read|write|list` fill defaults at the
boundary (primary host, utf8, `createParents: false`); new `files` SDK
area → plugins get `bb.sdk.files` for free.

## navPanel sub-routing (ccd0c17, closes backlog #26)
- Panel route gains a splat (`/plugins/:id/:panel/*`); the remainder
arrives as the component's `subPath` prop ("" at the root).
`useBbNavigate().toPluginPanel(path, { subPath?, replace? })` navigates
within a panel, so deep links and browser back/forward work.
- The github example dropped its hash routing for subPath routing as
validation.

## useComposer() (b174aec)
- New `@bb/plugin-sdk/app` hook over the shared prompt-draft store:
`addQuote` appends a blockquote to the active draft (thread draft in
thread context, new-thread draft elsewhere), `insertMention` appends an
@-mention pill bound to the calling plugin's mention provider (resolved
at send), `focus()` rides a new composer-focus bus subscribed by
ThreadDetailView and RootComposeView.

## fileOpener slot (bd5cb58)
- `app.slots.fileOpener({ id, title, extensions, component })`:
`useThreadFileTabs.openTab` diverts matching live-content opens (working
tree, host, thread storage — never git-ref snapshots or deleted files)
into `plugin-panel` tabs, so markdown links, the file picker, and `bb
thread open` all respect the default uniformly.
- Right-click "Open with" context menu on file tab pills switches
viewers in place and pins a per-extension default (localStorage; a
removed opener falls back to the built-in preview, never a dead tab).

## Notes hero plugin (9034638, fa1ab9e)
`examples/plugins/notes` — Obsidian-style markdown notes: mounted
directories via a setting, reads/CAS-saves through `bb.sdk.files`
(conflict banner on disk races), Milkdown Crepe WYSIWYG bundled
per-plugin with its theme CSS served from a `bb.http` route and
`--crepe-*` vars remapped to host tokens, navPanel (`chrome: "none"`)
with subPath deep links, thread panel action, md/mdx/markdown
fileOpener, useComposer quote/@-mention buttons, fs-watcher realtime
tree refresh, and a `@Notes` mention provider.

## Validation
- Repo-wide typecheck 34/34; daemon 382 (14 new CAS/containment tests),
server 1007 (3 new route tests), app 1297 (composer bridge, subPath
splat, opener diversion/degrade, collector validation), cli 242 (notes
bundle test).
- Live QA on a scratch packaged instance: notes panel + tree, Crepe
editor rendering with host theming, WYSIWYG typing saved to disk through
the CAS pipeline, stale-hash conflict verified over rpc, "Add to chat"
seeding the home composer draft, subPath deep link in the URL.
Found+fixed live: Crepe's bare-specifier CSS imports needed inlining
through its own package context.
- Docs: bb-plugin-authoring skill (files API, subPath, useComposer,
fileOpener, notes hero), bb guide plugins chapter, design doc §4.1/§5.2,
QA catalog live-check section.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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