Skip to content

feat: personality preset support in template YAML schema #757

@Aureliolo

Description

@Aureliolo

Summary

Ensure templates can reference both builtin and user-defined personality presets, and that the template rendering pipeline resolves them correctly.

Current State

Templates already support this via two fields in TemplateAgentConfig (src/synthorg/templates/schema.py):

  • personality_preset: NotBlankStr | None -- reference a preset by name
  • personality: dict[str, Any] | None -- inline custom personality dict
  • Mutual exclusion validation exists (cannot specify both)

The renderer (src/synthorg/templates/renderer.py) resolves presets via get_personality_preset() during template expansion.

What's Needed

Once user-defined preset CRUD is implemented:

  1. Template rendering must look up custom presets (from DB) in addition to builtin presets
  2. The get_personality_preset() function needs to be extended to check the custom preset store
  3. Template validation should warn (not error) when a preset doesn't exist yet (it may be created before the template is instantiated)
  4. Template export/import should handle custom preset references gracefully

Dependencies

  • User-defined personality preset CRUD API -- provides the persistence layer
  • Personality preset discovery API -- provides the lookup mechanism

Notes

This is mostly wiring -- the schema and rendering pipeline already support the pattern. The main change is extending preset resolution to include the custom preset store.

Metadata

Metadata

Assignees

No one assigned

    Labels

    prio:lowNice to have, can deferscope:medium1-3 days of workspec:agent-systemDESIGN_SPEC Section 3 - Agent Systemspec:templatesDESIGN_SPEC Section 14 - Templates & Buildertype:featureNew feature implementationv0.5Minor version v0.5v0.5.5Patch release v0.5.5

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions