feat(persona): role templates for the guided persona builder (#4253, PR2)#4416
feat(persona): role templates for the guided persona builder (#4253, PR2)#4416M3gA-Mind wants to merge 3 commits into
Conversation
Add a structured, non-technical persona editor that maps friendly fields (Personality, Communication style, About you) to named SOUL.md sections and splices them in place, keeping SOUL.md the runtime source of truth. Guided is the default; the raw markdown editor stays behind an Advanced toggle. Reuses the existing workspace_file_read/write/reset RPC — no core changes. Part of the phased tinyhumansai#4253 work (PR1 of N).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (22)
👮 Files not reviewed due to content moderation or server errors (22)
📝 Walkthrough
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3cf1b179ef
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| type="button" | ||
| disabled={disabled} | ||
| data-testid={`persona-template-${template.id}`} | ||
| onClick={() => onChange(applyTemplate(value, template))} |
There was a problem hiding this comment.
Update the persona capability catalog
This adds a new user-facing Persona template action, but the repo instructions require updating src/openhuman/about_app/ for user-facing features, and catalog_data.rs still describes Persona Pack only as display name/SOUL editing/mascot settings. Any about/help/capability surface backed by that catalog will omit the template workflow, so please extend the Persona Pack catalog entry/tests alongside this UI addition.
Useful? React with 👍 / 👎.
Prettier-only formatting of the persona builder components/tests and the guided-persona i18n key additions across all locale files.
…ansai#4253) Add six role starting-points (doctor, researcher, executive, teacher, student, family) to the guided persona builder. Applying a template seeds the Personality and Communication-style sections of SOUL.md via the existing splice logic and leaves the user-owned About You section and any hand-written content untouched — a non-destructive starting point the user edits and saves. Seed prose is kept as English constants (editable file content, like the bundled default SOUL.md); only the picker labels/descriptions are localized. Part of the phased tinyhumansai#4253 work (PR2 of N); stacked on the persona builder.
3cf1b17 to
0706ecb
Compare
|
Fixed Frontend Checks. The lane failed at Since this PR is stacked on #4412, I rebased it onto #4412's updated (prettier-fixed) head so it shares the same formatted base — resolving one import-ordering conflict in Verified locally, all green: Note: force-pushed to restack on the formatted base; will settle once #4412 merges. |
Depends on #4412
Summary
SOUL.mdusing the existing splice logic, and leaves the user-owned About you section and any hand-written content untouched — a non-destructive starting point the user reviews and saves.SOUL.md, like the bundled default, not UI chrome); only the picker's labels/descriptions are localized.workspace_file_*RPC and the PR1 parser.Problem
Feedback on #4253: the
SOUL.mdconcept is strong but users "do not know how to write a good persona." PR1 gave non-technical users structured fields; this PR gives them role-based starting points so they are not staring at empty fields.Solution
persona/personaTemplates.ts:PERSONA_TEMPLATES(the six roles) +applyTemplate(soul, template)which splices Personality and Voice viaapplyPersonaField(idempotent; preserves everything else).persona/PersonaTemplatePicker.tsx: a "Start from a template" card grid rendered at the top of the guided builder. Clicking a card fills the draft; nothing persists until the user hits Save.settings.persona.templates.*chrome keys inenand all 13 locale files (parity 14/14).Submission Checklist
personaTemplates.test.ts(role coverage, splice writes Personality/Voice, preserves About-you + unmanaged sections, idempotency) and aPersonaPanel.test.tsxintegration test (apply template → Save writes the seeded persona over RPC).N/A: enhances the existing Persona panel; no new feature ID.N/A: no matrix feature-behaviour change.N/A: additive Settings UI.Closes #NNN—N/A: intentionally references (does not close) Guided persona builder and memory dashboard for non-technical users #4253; phased delivery keeps the epic open.Impact
SOUL.mdmarkdown through the same persistence path as PR1.Related
mainafter feat(persona): guided persona builder over SOUL.md (#4253, PR1) #4412 merges.AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
Validation Run
pnpm --filter openhuman-app format:check— Prettier--checkpasses locally after the restack on feat(persona): guided persona builder over SOUL.md (#4253, PR1) #4412's formatted base.pnpm typecheck—tsc --noEmitpasses (exit 0).personaTemplates.test.ts+PersonaPanel.test.tsxrun green locally;pnpm i18n:checkalso passes (0 missing/extra across all locales). CIFrontend Checksre-validating the restack.Validation Blocked
command:N/Aerror:N/Aimpact:N/ABehavior Changes
Parity Contract
workspace_file_*RPC; templates emit plainSOUL.mdmarkdown.Duplicate / Superseded PR Handling