Onboarding: live "Hello" introduction step (NAN-699)#429
Draft
yagudaev wants to merge 1 commit into
Draft
Conversation
Replaces the text-only smoke-test step with a live conversational intro: the agent greets the user out loud in the chosen voice, asks for their name, then asks for a brief bio. Each user response auto-populates a form field with a typed-input fallback. On Done, the captured profile is written to USER.md in the brain workspace so the relay's instruction builder can include it in every future session — closing the "who am I again?" amnesia on cold start. - New `user-profile.ts` (main) reads/writes USER.md with Name + About sections - `user:get` / `user:save` IPC + preload bridge mirroring the identity API - Relay's `loadAgentIdentity` now appends an "About the user" block from USER.md when present - New `systemPromptOverride` field on the relay session config replaces the agent persona section with a hardcoded onboarding script for this step (paired with `brainAgent: 'none'` so no tools register mid-greeting) - Wizard sequence updated: testcall -> introduction; legacy 'testcall' cursor in saved state is migrated transparently - Tests: USER.md round-trip, instructions loader (USER.md inclusion + override), step-id migration, prompt-builder + name-extractor helpers - Docs: end-user "First-run setup" guide with screenshot + updates to the implementer onboarding doc Closes NAN-699 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
USER.mdso every future session knows who it's talking to.systemPromptOverridefield on the relay so this step runs against a tight onboarding script (no brain tools, no SOUL/IDENTITY persona) — keeps the agent on-script instead of trying to callask_brainmid-greeting.USER.mdfrom the brain workspace and inject the user's name + bio into every regular session's system prompt.Closes NAN-699
What changed where
desktop/src/main/user-profile.ts(new)USER.mdread/write, mirrorsidentity.tspatterndesktop/src/main/ipc-handlers.ts,desktop/src/preload/index.ts,desktop/src/renderer/src/lib/onboarding-api.tsuser:get/user:save+userApirelay-server/src/instructions.ts,relay-server/src/types.tsUSER.md; newsystemPromptOverridefielddesktop/src/renderer/src/pages/onboarding/StepIntroduction.tsx(new)OnboardingWizard.tsx,App.tsx,onboarding.ts(main),preload/index.tstestcall→introduction;'testcall'cursor migrationdocs/src/content/docs/desktop/first-run.mdx(new),docs/src/content/docs/desktop/onboarding.mdx,docs/astro.config.mjsUSER.mdWhere the captured info is stored
USER.mdis markdown with## Nameand## Aboutsections; mode0600. The relay reads it on every session start (inloadAgentIdentity) and appends an## About the userblock to the system prompt. If the file is missing or only holds the placeholder defaults, the block is omitted.Decisions worth flagging
instructionsOverridewas already taken. It's used as an "About the User" appendix (e.g. mobile title-gen). I addedsystemPromptOverrideas a separate field rather than reinterpret semantics. The introduction step uses the new field plusbrainAgent: 'none'to fully suppress the persona/brain prompt and the brain tools.current_step = 'testcall'is remapped to'introduction'ingetOnboardingStateso users mid-wizard during the upgrade don't land on an unknown step.pending_greetingflag removed from wizard finish: the introduction step IS the greeting, so the previous "auto-start a call when chat opens" hack is no longer needed.StepTestCall.tsxdeleted — the descoped placeholder is replaced.Test evidence
yarn workspace voiceclaw-desktop testyarn workspace relay-server testdesktop/yarn builddocs/yarn buildNew tests:
desktop/src/main/user-profile.test.ts— round-trip read/write, defaults, multi-line biodesktop/src/main/onboarding.test.ts—'testcall'→'introduction'migrationdesktop/src/renderer/src/pages/onboarding/StepIntroduction.test.ts—buildIntroPrompt+extractFirstName(covers "Michael", "I'm Michael", "My name is …", "MICHAEL", trailing punctuation, empty input)relay-server/test/instructions.test.ts—USER.mdinclusion (Gemini + OpenAI paths), placeholder elision,systemPromptOverridereplaces persona while keeping conversation rulesVisual evidence
Captured by booting the renderer in preview mode (
yarn dev:desktop→ Vite at:5173) and driving Playwright at?onboarding=1&step=introduction. Saved toscreenshots/and the docspublic/directory.The same dev server confirmed
?step=identitystill renders correctly with the updated step indicator (06 / 07).Manual end-to-end testing — DEFERRED
Acceptance criteria coverage
onTranscriptDone; first user turn → name; second → bio.)USER.md. (ViauserApi.save→writeUserProfile; restarts relay so next session reads it.)Friend/ empty bio.)voiceUnavailablestate + manual entry; verified in preview screenshot.)USER.mdvalues. (OnboardingWizardloads viauserApi.getand passes asinitialUser.)[instructions]log line on next session. (loadUserBlockadds the## About the userblock; covered byinstructions.test.ts.)Test plan
userDatadir, walk through all 7 steps, deny then grant mic permission, confirm form fields fill from voice.~/Library/Application Support/VoiceClaw/openclaw/workspace/USER.md; confirm the next session picks up the edit.tail -f relay.logduring the next session and confirm the[instructions]line includes the user's name in the prompt fingerprint.🤖 Generated with Claude Code