Skip to content

feat: split builtin task type definitions#17

Merged
joy7758 merged 2 commits intostage-handler-pluginsfrom
task-type-modules
Mar 15, 2026
Merged

feat: split builtin task type definitions#17
joy7758 merged 2 commits intostage-handler-pluginsfrom
task-type-modules

Conversation

@joy7758
Copy link
Owner

@joy7758 joy7758 commented Mar 15, 2026

Summary

  • add demos/task_types.py to hold builtin persona and task-type definitions
  • slim demos/task_registry.py down to registry primitives plus builtin loader wiring
  • keep stage handler plugins and workflow behavior unchanged while moving task metadata out of the registry module

Validation

  • python3 -m compileall demos/task_registry.py demos/task_types.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
  • 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: ae6e5a43d6

ℹ️ 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".

)
def load_builtin_registry() -> None:
importlib.import_module("demos.stage_handlers")
from demos.task_types import BUILTIN_PERSONAS, BUILTIN_TASK_TYPES

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 between registry and task types

Importing demos.task_types now fails because task_types.py imports demos.task_registry, and task_registry.py immediately calls load_builtin_registry() which does from demos.task_types import BUILTIN_PERSONAS, BUILTIN_TASK_TYPES before task_types has finished initializing. In this code path (e.g., python3 -c "import demos.task_types"), Python raises ImportError for a partially initialized module, so the new split module cannot be imported directly.

Useful? React with 👍 / 👎.

* feat: split builtin persona definitions

* feat: add registry discovery entrypoint (#19)

* feat: add registry discovery entrypoint

* feat: support external plugin packages (#20)
@joy7758 joy7758 merged commit acaa8fd into stage-handler-plugins Mar 15, 2026
2 checks passed
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