Skip to content

ship manager-friendly default built-in template (PREFERENCES.md + STATUS.html) - #25

Merged
SawyerHood merged 1 commit into
mainfrom
bb/ship-manager-friendly-default-built-in-template-thr_wthq39u85j
May 19, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/ship-manager-friendly-default-built-in-template-thr_wthq39u85j

Conversation

@SawyerHood

@SawyerHood SawyerHood commented May 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the minimal starter content from manager: named template sets in manager-templates/<name>/ (supersedes #21) #24 with two richer files reflecting how this manager flow actually operates — better first-run experience for new managers.
  • The bundle's default/ now ships exactly PREFERENCES.md and STATUS.html — no STATUS.md and no ASYNC.md.
    • STATUS.md would conflict with STATUS.html; the manager prompt requires one or the other, not both.
    • ASYNC.md is intentionally not part of the default seed. A manager can write its own ASYNC.md from the meet-and-greet when it wants schedules.
  • The bundled PREFERENCES.md is non-prescriptive about how the user wants to work:
    • Worker defaults (provider / reasoning level / permission mode / preferred model) live under "Open questions to resolve when natural" — the manager asks, never assumes.
    • There is no assumed PR mode. A new Landing changes Workflow bullet describes two common modes — Open PRs (with gh pr create --draft as the default, switchable to non-draft) and No PRs — local merge, push on request — and tells the manager to ask the user once and record the chosen mode in the bullet itself.
    • The follow-up STATUS.html mode bullet explains that STATUS.html tracks open PRs in PR mode, and switches to two sections (In progress and Ready for review) in no-PR mode.
    • A new open question covers anything else the user wants surfaced in STATUS.html (extra sections, custom info, integrations).
  • The bundled STATUS.html snippet library now has a clearly-marked no-PR-mode group with copy/paste blocks for In progress · N and Ready for review · N sections, in addition to the existing PR-mode patterns.
  • Install behaviour is unchanged from manager: named template sets in manager-templates/<name>/ (supersedes #21) #24: ensureBuiltInManagerTemplatesInstalled still only writes the default/ directory when it is absent, never overwriting a user-edited one.

What changes

  • apps/server/src/services/threads/default-template/{PREFERENCES.md, STATUS.html} — new asset files (the canonical source of truth for the bundled default).
    • PREFERENCES.md — Identity placeholder, Workflow (delegator pattern, fresh-main-before-spawn, Landing changes with two modes, STATUS.html mode, STATUS.html refresh, STATUS.html styling), and Open questions to resolve when natural (incl. worker defaults and STATUS.html extras).
    • STATUS.html — zero-state dashboard with header/section/row/pill primitives styled from the bb design tokens, plus an inlined snippet library: refresh timestamp, Open-PRs section + PR row, active-worker row, empty states, pill variants, inline status annotation, a no-PR-mode group (In progress + Ready for review sections), and optional extras (active workers with meta, dev-instance callout, recently completed feed). Tokens mirror apps/app/src/components/ui/theme.css; see bb guide styling.
  • apps/server/src/services/threads/manager-storage-templates.ts — BUILT_IN_MANAGER_TEMPLATE_SETS lists exactly PREFERENCES.md and STATUS.html, and loads each file's contents via readFileSync from a directory resolved off import.meta.url. The install/seeding logic itself is untouched.
  • apps/server/package.json — build script gains --copy-dir src/services/threads/default-template dist/default-template, mirroring the existing drizzle copy so the prod bundle finds the assets next to dist/index.js.
  • apps/server/test/threads/manager-storage-templates.test.ts — assertions updated to match the new content: PREFERENCES.md contains both ## Open questions to resolve when natural and Landing changes; STATUS.html contains the Open PRs · 0 sect-title; the bundle ships neither STATUS.md nor ASYNC.md.

Test plan

  • pnpm exec turbo run typecheck --filter=@bb/server --filter=@bb/templates
  • pnpm exec turbo run test --filter=@bb/server --filter=@bb/templates (668 server tests pass)
  • Sanity sweep: pnpm exec turbo run test --filter=@bb/cli --filter=@bb/app --filter=@bb/host-daemon — all pass
  • pnpm exec turbo run build --filter=@bb/server — confirms dist/default-template/ contains exactly PREFERENCES.md and STATUS.html (no ASYNC.md, no STATUS.md); Landing changes and the no-PR-mode snippet group are present in dist
  • git diff --check — clean
  • Manual: start a fresh data dir, run the server, and confirm exactly two files (PREFERENCES.md, STATUS.html) land in <dataDir>/manager-templates/default/. Then create a new manager thread and confirm storage is seeded from them.

🤖 Generated with Claude Code

@SawyerHood
SawyerHood force-pushed the bb/ship-manager-friendly-default-built-in-template-thr_wthq39u85j branch from f9a333d to 47a5ecd Compare May 19, 2026 00:23
@SawyerHood SawyerHood changed the title ship manager-friendly default built-in template (PREFERENCES.md + ASYNC.md + STATUS.html with snippet library) ship manager-friendly default built-in template (PREFERENCES.md + STATUS.html) May 19, 2026
….md + STATUS.html)

Replaces the deliberately minimal starter content shipped by #24 with
two richer files reflecting the manager flow that prompted this work:

- PREFERENCES.md captures the delegator workflow and the STATUS.html
  conventions. Worker defaults (provider / reasoning level / permission
  mode / model) are an open question for the user, not prescribed by
  the template. The Workflow section also stays neutral about how
  changes land: a `Landing changes` bullet describes two common modes
  (PRs, with `gh pr create --draft` by default; or local merge with
  push-on-request) and tells the manager to ask once and record the
  choice in the file itself. STATUS.html mode and refresh triggers
  follow from that recorded choice.
- STATUS.html is the canonical status surface (no STATUS.md): a styled
  zero-state dashboard. The HTML comment block at the bottom is a
  snippet library covering PR-mode patterns (PR row, active worker
  row, optional sections) and a clearly-marked no-PR-mode group with
  `In progress` and `Ready for review` section patterns. Tokens mirror
  the bb app theme; see `bb guide styling`.

ASYNC.md is intentionally not part of the default seed — a manager can
write its own `ASYNC.md` from the meet-and-greet when it wants
schedules.

Files live alongside the source as real files and are read at module
init via `import.meta.url`; the prod build copies them next to
`dist/index.js` (mirroring the drizzle migrations pattern). The
install/seeding logic from #24 is unchanged — existing
`<dataDir>/manager-templates/default/` directories are still not
overwritten.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@SawyerHood
SawyerHood force-pushed the bb/ship-manager-friendly-default-built-in-template-thr_wthq39u85j branch from 47a5ecd to 5150056 Compare May 19, 2026 00:36
@SawyerHood
SawyerHood merged commit 150b633 into main May 19, 2026
10 checks passed
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