Repository navigation
[codex] seed manager thread templates - #21
Closed
SawyerHood wants to merge 3 commits into
Closed
SawyerHood wants to merge 3 commits into
SawyerHood wants to merge 3 commits into
Conversation
SawyerHood
force-pushed
the
bb/user-configurable-templates-for-new-manager-pref-thr_fdhzqyku4k
branch
from
May 18, 2026 22:16
797dc49 to
df15a9d
Compare
Collaborator
Author
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.
Summary
PREFERENCES.md,STATUS.md, andASYNC.md.<dataDir>/manager-templates/, and passed seed paths on managerthread.startcommands.bb guideoverview to document seeded templates.Investigation
apps/server/src/services/threads/thread-storage.ts:10-17resolves manager storage from the active host session data dir as<dataDir>/thread-storage/<thread-id>.apps/host-daemon/src/thread-storage-root.ts:4-13creates<dataDir>/thread-storage.apps/server/src/services/threads/thread-provisioning.ts:132-149, thenapps/server/src/services/threads/thread-commands.ts:273-306builds thethread.startcommand withthreadStoragePathand seed template paths.apps/host-daemon/src/command-handlers/thread.ts:92-107, which creates thread storage before staging prompt attachments and starting the runtime. The seed implementation isapps/host-daemon/src/command-handlers/thread.ts:58-90.PREFERENCES.md,STATUS.md, andASYNC.mdinpackages/templates/src/templates/manager-agent-instructions.md:39-43; shared constants live inpackages/domain/src/manager-storage.ts:3-19.Template Location
Chose per-user templates in
<bb data dir>/manager-templates/, which is usually~/.bb/manager-templates/in production and~/.bb-dev/manager-templates/in development. Supported inputs are:PREFERENCES_TEMPLATE.md->PREFERENCES.mdSTATUS_TEMPLATE.md->STATUS.mdASYNC_TEMPLATE.md->ASYNC.mdThis matches the personalization use case and keeps setup simple across projects. The tradeoff is that this PR does not add a per-project override layer. I included
ASYNC_TEMPLATE.mdbecause it uses the same one-time copy semantics and existing canonical storage convention.Prompt And Docs
packages/templates/src/templates/manager-agent-instructions.md:67-71now branches the hatch flow: ifPREFERENCES.mdalready exists, briefly confirm/refine and skip the full meet-and-greet; otherwise keep the current welcome behavior and create the file.packages/templates/src/templates/bb-guide-overview.md:25-29documents where to place templates and how missing templates preserve the existing flow.Tests
apps/host-daemon/test/command/thread-dispatch.test.tscovers template-present seeding and template-absent fallback with no canonical files created.apps/server/test/threads/thread-runtime-config.test.tsandapps/server/test/public/public-threads.manager-and-ownership.test.tsassert manager creation includes the expected seed template paths.Validation
pnpm exec turbo run typecheck --filter=@bb/domain --filter=@bb/host-daemon-contract --filter=@bb/templates --filter=@bb/server --filter=@bb/host-daemonpnpm exec turbo run test --filter=@bb/domain --filter=@bb/host-daemon-contract --filter=@bb/templates --filter=@bb/server --filter=@bb/host-daemongit diff --check