Skip to content

feat: generalize persona workflow task schema#13

Merged
joy7758 merged 1 commit intodynamic-task-inputfrom
generic-task-schema
Mar 15, 2026
Merged

feat: generalize persona workflow task schema#13
joy7758 merged 1 commit intodynamic-task-inputfrom
generic-task-schema

Conversation

@joy7758
Copy link
Owner

@joy7758 joy7758 commented Mar 15, 2026

Summary:

  • add a generic task input schema for the persona workflow demo
  • normalize and validate task inputs before running the workflow
  • support multiple task types with sample inputs for market research, product design, and UX review
  • keep backward compatibility with the earlier product/features demo format

Validation:

  • validated market_research_task.json, product_design_task.json, and ux_review_task.json against the schema
  • ran python3 demos/persona_workflow_demo.py --task-input demos/product_design_task.json
  • ran python3 demos/persona_workflow_demo.py --task-input demos/ux_review_task.json
  • ran python3 demos/persona_workflow_demo.py --task-input /tmp/pop_legacy_task.json

Notes:

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: a7662edeb2

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

raw_inputs = raw_task_input["inputs"]
normalized = {
"task_name": str(raw_task_input.get("task_name") or "Untitled Persona Workflow"),
"task_type": str(raw_task_input.get("task_type") or "market_research"),

Choose a reason for hiding this comment

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

P1 Badge Normalize task_type before storing normalized input

validate_task_input trims whitespace when checking membership, so a value like "market_research " passes validation, but normalize_task_input stores the untrimmed value here and downstream code uses it directly (profile_for(task_type) in build_design_output), which raises KeyError at runtime. This means a task can be marked valid and still crash the workflow; trimming task_type during normalization (in both branches) avoids this mismatch.

Useful? React with 👍 / 👎.

@joy7758 joy7758 merged commit 2fa22db into dynamic-task-input Mar 15, 2026
2 checks passed
joy7758 added a commit that referenced this pull request Mar 15, 2026
* feat: integrate dynamic task input into persona workflow

* feat: generalize persona workflow task schema (#13)
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