Skip to content

Add New Story agent provider selection and force Codex for cartoon #254

@realproject7

Description

@realproject7

Context

Webtoon/cartoon image generation requires an agent with image-generation capability. Claude CLI inside OWS currently only produces prompts. Local Codex CLI supports the image_generation feature, so cartoon stories should use Codex by default/requirement once provider support exists.

QuadWork Reference

Use QuadWork's backend-selection UX as the reference, adapted down to OWS's simpler story model.

Reference paths:

  • /Users/cho/Projects/quadwork/src/components/SetupWizard.tsx
    • Detects installed CLI backends.
    • Disables unavailable backend choices.
    • Stores backend choice separately from approval/bypass mode.
  • /Users/cho/Projects/quadwork/server/routes.js
    • Persists backend command choice in project config.
    • Sets Codex-specific defaults such as reasoning_effort: "medium".

Do not copy QuadWork's four-agent role UI. OWS should expose one story-level agent provider selection.

Required Work

Update the New Story modal and story creation flow to select/store the agent provider.

UX rules

  • For Fiction:

    • Default remains Claude whenever Claude is installed. This preserves the existing stable OWS fiction workflow.
    • User can choose Codex only as an explicit advanced/alternative option when Codex is installed.
    • If Claude is missing but Codex is installed, allow Codex with clear messaging; do not silently change existing fiction stories.
  • For Cartoon:

  • Agent mode remains separate:

    • Normal (approve each action)
    • Permissions bypass

Persistence

When the story folder is created, write .story.json with:

{
  "contentType": "cartoon",
  "language": "English",
  "agentProvider": "codex",
  "agentMode": "normal"
}

For fiction, default to:

{
  "contentType": "fiction",
  "language": "English",
  "agentProvider": "claude"
}

Existing .story.json files without agentProvider must be treated as Claude for rollback compatibility.

StoryBrowser / Terminal

  • Untitled _new_* sessions must carry both provider and mode until the agent creates the real story folder.
  • When _new_* is renamed to the actual story slug, preserve both agentProvider and agentMode into .story.json and terminal metadata.
  • Do not change existing fiction story rows, status counts, archive behavior, publish status, or dashboard grouping.

Stable-area restrictions

This ticket may touch New Story UI, .story.json metadata read/write, and terminal spawn request payloads only as needed for provider selection.

Do not change:

  • OWS wallet selection/signing logic.
  • /api/publish/* publish/upload transaction logic.
  • /api/dashboard stats/royalty reads.
  • /api/settings/register-agent, /generate-binding, or /link-status.
  • Royalty claim or AI-agent/human account binding behavior.

Acceptance Criteria

  • New Story modal has content type, language, agent provider, and agent mode states that do not conflict.
  • Existing fiction stories without agentProvider behave as Claude.
  • New fiction stories default to Claude when Claude is available.
  • Cartoon forces Codex and explains why.
  • .story.json correctly records provider and mode for new stories.
  • UX follows QuadWork's installed/unavailable backend handling but remains one-provider-per-story, not multi-agent.
  • No wallet, publish transaction, dashboard, royalty, claim, or account-binding behavior changes are included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/T3Assigned to T3 builder agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions