v0.6: Character Profiles And Visual Identity [CORE COMPLETED]¶
Implementation Status¶
- [x]
CharacterProfilemodel exists. - [x]
CharacterStorecan save, load, list, and create a default active profile. - [x]
ContextBuilderrenders a stable# Character Profileprompt section. - [x]
/profilecan inspect and list character profiles. - [x] Global visual/selfie configuration and OpenAI-compatible image proxy support exist.
- [ ] Profile switching is not fully wired into live
AgentLoopsession isolation. - [ ]
SelfieToolstill receives globalvisualconfig; profile-level visual override/merge is not fully wired. - [ ] Reviewable profile diffs are not implemented.
Goal¶
Make the agentic character layer explicit and first-class.
User Outcome¶
The owner can define and inspect character profiles with stable identity, voice, boundaries, relationship model, channel behavior, visual identity, and proactive behavior policy. Full live switching isolation remains follow-up work.
Scope¶
- Add character profile files.
- Support profile switching for multiple characters.
- Add visual provider config per profile.
- Support OpenAI-compatible proxy image generation.
- Support local/reference image roots.
- Add prompt templates for selfie, mirror, avatar, outfit, and scene.
- Add identity anchor fields.
- Add fallback behavior when image provider fails.
- Keep examples generic; do not bake a private character into docs or defaults.
- Add owner-visible profile diffs when learning proposes identity changes.
Profile Fields¶
- name
- role
- voice/tone
- boundaries
- relationship model
- channel behavior
- visual identity config
- proactive behavior policy
- tool policy
- memory policy
Module Targets¶
backend/agent/g_agent/character/profile.pybackend/agent/g_agent/character/store.pybackend/agent/g_agent/character/visual.pybackend/agent/g_agent/agent/tools/selfie.pybackend/agent/g_agent/config/schema.py- Character/profile coverage is currently spread across command, profile, and
visual tests; dedicated
test_character_profile.pyandtest_visual_identity.pyare still useful follow-ups.
Acceptance Criteria¶
- [x] Runtime loads a default character profile.
- [x] Profile context appears in a stable prompt section.
- [ ] Profile validation errors are fully covered by dedicated tests.
- [ ] Visual generation reads profile-level identity settings.
- [ ] Profile switching does not mix session history accidentally.
- [ ] Profile diffs can be reviewed before apply.
References¶
- Main roadmap Phase 5.
- Existing visual/selfie tool.
Agent Handoff¶
Current G-Agent State¶
- Identity is currently split across workspace bootstrap files, markdown memory,
ContextBuilder._get_static_identity(),ContextBuilder._build_persona_priming(),visualconfig, andMemoryStore.PROFILE.md. ContextBuilder._build_persona_priming()contains a private/default persona example. This must not be the long-term generic product default.character/profile.py,character/store.py, andcharacter/visual.pynow exist.SelfieToolstill reads visual identity from global config, not a merged per-character profile config.
Implementation Strategy¶
Add character profile as a new layer without breaking existing config.
Recommended shape:
character/profile.py: Pydantic models.character/store.py: load/save/list profiles under workspace or data dir.character/context.py: render profile into prompt section.character/visual.py: map profile visual fields toVisualIdentityConfig.
Implementation Slices¶
- Add
CharacterProfilemodel. - Add default profile loader.
- If no profile exists, create a generic non-private default.
- Import existing
memory/PROFILE.mdas owner profile notes, not identity authority. - Update
ContextBuilder. - Add stable
# Character Profilesection. - Keep bootstrap files for compatibility.
- Update visual config path.
- Profile visual settings override or merge with global
visual. - Add
/profile. - View active profile.
- Later: switch/list/edit.
Profile Fields¶
Minimum:
idnamekindrolevoiceboundariesrelationship_modelvisual_identitychannel_behaviorproactive_policytool_policymemory_policy
Tests¶
test_character_profile.py- default profile creation
- validation errors
- load/save/list
- profile id safety
test_character_context.py- prompt section stable
- profile content fenced as configuration, not user input
test_visual_identity.py- profile visual config maps to selfie tool config.
Guardrails¶
- Do not bake a private character into defaults.
- Do not remove existing workspace bootstrap files in first PR.
- Do not mix profile identity with owner facts; owner facts belong in memory.
First PR Boundary¶
Profile model/store + default loading + prompt section + /profile read-only.