feat: personality system, chat agents, and first-launch onboarding#5
Merged
ByteMirror merged 14 commits intomainfrom Feb 23, 2026
Merged
feat: personality system, chat agents, and first-launch onboarding#5ByteMirror merged 14 commits intomainfrom
ByteMirror merged 14 commits intomainfrom
Conversation
Captures the full design for OpenClaw-inspired agent personalities, global chat section with sidebar tabs, bootstrap ritual, and first-launch onboarding screen with Brain IPC transition.
11-task TDD plan covering chat storage, personality injection, sidebar tabs, Brain IPC onboarding_complete, and first-launch onboarding screen.
Introduces session/chat_storage.go with GetChatsDir, GetAgentPersonalityDir, EnsureAgentDir, ReadWorkspaceState, and MarkBootstrapped for the chat personality system. Exports config.AtomicWriteFile (was unexported) so the session package can write files safely per project convention.
Embeds BOOTSTRAP.md, SOUL.md, IDENTITY.md, and USER.md into the session package and adds CopyTemplatesToAgentDir to copy them into a new agent's personality directory on first setup, skipping files that already exist so user edits are never overwritten.
Adds IsChat (bool) and PersonalityDir (string) to Instance, InstanceOptions, InstanceData, ToInstanceData, and FromInstanceData so chat agents can be created and round-tripped through storage.
Adds session/personality.go with BuildSystemPrompt that assembles the system prompt from SOUL.md, IDENTITY.md, USER.md and memory snippets when bootstrapped, or BOOTSTRAP.md only when not yet bootstrapped.
Add AppendArgs to TmuxSession so arbitrary extra args can be passed without shell injection. In Instance.Start(), short-circuit to startChatAgent() when IsChat is true: reads workspace state, builds the system prompt via BuildSystemPrompt, then starts Claude in the personality directory with --append-system-prompt passed as a discrete exec argument.
Add a two-tab bar (Code / Chat) below the search bar in the sidebar. Active tab renders with underline+bright foreground; inactive renders dimmed. [ and ] key bindings switch tabs when the app is in default state. Introduces sidebarTab type in the app package and activeTab int (plus SetTab/ActiveTab) in ui.Sidebar to avoid circular imports.
Adds the onboarding_complete IPC method so the companion agent can signal the end of the bootstrap ritual, causing the TUI to persist onboarded=true and transition back to stateDefault.
- ui/list.go: add chatFilter field and SetChatFilter(*bool) method applied in rebuildFilteredItems - app/app.go: add visibleInstances() and refreshListChatFilter(); apply initial chat filter on startup - app/app_input.go: call refreshListChatFilter + instanceChanged when sidebar tab switches - app/app_state.go: call tabbedWindow.SetChatMode(selected.IsChat) in instanceChanged - ui/tabbed_window.go: add chatMode bool field, SetChatMode(), visibleTabIndices() helper; update Toggle, ToggleWithReset, HandleTabClick, and String() to hide Diff/Git tabs for chat agents
When the user is in the Chat tab and presses `n`, a text input overlay prompts for the agent name. On submit, slugify() converts it to a directory slug, EnsureAgentDir/CopyTemplatesToAgentDir provision the personality dir, and the agent is created with IsChat=true and started via the existing instanceStartedMsg flow.
… panel Add app/app_onboarding.go providing startOnboarding(), viewOnboarding(), and onboardingStartedMsg — completing the stateOnboarding wiring that was already partially committed in app.go and app_input.go (first-launch detection in newHome(), Init() call, View() dispatch, key blocking, and onboardingContent refresh in the previewTickMsg loop).
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
SOUL.md/IDENTITY.md/USER.mdfiles injected into every chat agent session via--append-system-prompt. Files live at~/.hivemind/chats/<slug>/and are never overwritten — user edits persist across sessions.[/]) below the search bar: Code (existing behaviour, unchanged) and Chat (global, repo-independent). Chat agents share the coding memory at~/.hivemind/memory/so the assistant already knows what you've been building.onboarding_completevia Brain IPC to open the real UI.nin the Chat tab to create a named chat agent. Only asks for a name (no repo/branch). Bootstrap ritual fires on first conversation.Key files
session/chat_storage.goGetChatsDir,EnsureAgentDir,ReadWorkspaceState,MarkBootstrappedsession/personality.goBuildSystemPrompt— assembles bootstrap or SOUL+IDENTITY+USER+memorysession/templates/session/instance_lifecycle.gostartChatAgent()— skips git worktree, injects personalitysession/tmux/tmux.goAppendArgsfield — passes--append-system-promptas discrete exec arg (no shell injection)app/app_onboarding.gostartOnboarding(),viewOnboarding()— first-launch screenui/sidebar.goui/tabbed_window.goSetChatMode— hides Diff/Git tabs for chat agentsbrain/protocol.go+server.goonboarding_completeBrain IPC actionconfig/state.goOnboarded boolfield +SetOnboarded()Test plan
go test ./...passes (all 10 packages)onboardedto false in~/.hivemind/state.json) shows centered panel, no sidebar~/.hivemind/chats/companion/onboarding_complete→ full UI opens, companion visible in Chat tab[/]switches between Code and Chat tabs in sidebarnin Chat tab asks for name only → creates agent → bootstrap starts~/.hivemind/memory/coding memories are accessible to chat agents