Skip to content

feat: split builtin persona definitions#18

Merged
joy7758 merged 2 commits intotask-type-modulesfrom
persona-definition-modules
Mar 15, 2026
Merged

feat: split builtin persona definitions#18
joy7758 merged 2 commits intotask-type-modulesfrom
persona-definition-modules

Conversation

@joy7758
Copy link
Owner

@joy7758 joy7758 commented Mar 15, 2026

Summary

  • add demos/persona_definitions.py so builtin persona registry metadata lives outside task type definitions
  • keep personas/*.json as the single source of truth for persona content and avoid duplicating them into Python classes
  • update demos/task_registry.py to load builtin personas, task types, and stage handlers from separate modules

Validation

  • python3 -m compileall demos/task_registry.py demos/task_types.py demos/persona_definitions.py demos/persona_workflow_demo.py demos/stage_handlers.py
  • python3 demos/persona_workflow_demo.py
  • python3 demos/persona_workflow_demo.py --task-input demos/product_design_task.json
  • python3 demos/persona_workflow_demo.py --task-input demos/ux_review_task.json
  • python3 demos/persona_workflow_demo.py --task-input /tmp/pop_legacy_task.json
  • python3 - <<'PY' ... registered_persona_ids() ... PY
  • schema validation for market_research_task.json, product_design_task.json, and ux_review_task.json

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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)
@joy7758 joy7758 merged commit 83fb1bf into task-type-modules Mar 15, 2026
2 checks passed
joy7758 added a commit that referenced this pull request Mar 15, 2026
* feat: split builtin task type definitions

* feat: split builtin persona definitions (#18)

* feat: split builtin persona definitions

* feat: add registry discovery entrypoint (#19)

* feat: add registry discovery entrypoint

* feat: support external plugin packages (#20)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant