feat: split builtin persona definitions#18
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6ad4eeefe1
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -0,0 +1,19 @@ | |||
| from __future__ import annotations | |||
|
|
|||
| from demos.task_registry import PersonaDefinition | |||
There was a problem hiding this comment.
Break circular import when loading persona definitions
Importing demos.persona_definitions now crashes with ImportError: cannot import name 'BUILTIN_PERSONAS' from partially initialized module because this module imports PersonaDefinition from demos.task_registry, and demos.task_registry executes load_builtin_registry() at import time, which re-imports BUILTIN_PERSONAS from demos.persona_definitions before that symbol is defined. This makes the new split module unusable whenever it is imported directly (or imported first in a process).
Useful? React with 👍 / 👎.
* feat: add registry discovery entrypoint * feat: support external plugin packages (#20)
Summary
demos/persona_definitions.pyso builtin persona registry metadata lives outside task type definitionspersonas/*.jsonas the single source of truth for persona content and avoid duplicating them into Python classesdemos/task_registry.pyto load builtin personas, task types, and stage handlers from separate modulesValidation
python3 -m compileall demos/task_registry.py demos/task_types.py demos/persona_definitions.py demos/persona_workflow_demo.py demos/stage_handlers.pypython3 demos/persona_workflow_demo.pypython3 demos/persona_workflow_demo.py --task-input demos/product_design_task.jsonpython3 demos/persona_workflow_demo.py --task-input demos/ux_review_task.jsonpython3 demos/persona_workflow_demo.py --task-input /tmp/pop_legacy_task.jsonpython3 - <<'PY' ... registered_persona_ids() ... PYmarket_research_task.json,product_design_task.json, andux_review_task.json