Skip to content

[Phase 5.4] PRD stress-test web UI: results view and PRD refinement #562

@frankbria

Description

@frankbria

Goal

Render stress-test results as an interactive ambiguity review UI where users answer questions inline and submit answers to refine the PRD.

Background

Follows the trigger issue (#561). The stress-test produces a decomposition tree with ambiguities surfaced as questions. Users need to answer them in the browser to get a refined PRD.

Scope

Results view (shown after stress-test completes):

  • Decomposition tree displayed as collapsible cards: top-level breakdown → leaf ambiguities
  • Each ambiguity shown as a card with:
    • Question text (the ambiguity the agent cannot resolve)
    • Severity indicator (blocking / warning)
    • Inline text area for the user's answer
  • "All answered" progress indicator (e.g., "4 of 7 answered")
  • [Refine PRD] button — enabled when all blocking ambiguities are answered
    • Calls POST /api/v2/prd/stress-test/refine with the original PRD + answers
    • Streams the refined PRD back
    • On completion: saves the refined PRD and shows a diff/confirmation

Out of scope

  • Re-running stress-test on the refined PRD (user can click [Stress Test] again)
  • Non-blocking ambiguities are skippable

Acceptance criteria

  • Ambiguity cards render with question text and answer fields
  • [Refine PRD] is disabled until all blocking questions answered
  • Refined PRD saves and is visible in the PRD editor
  • npm test and uv run pytest pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-5Phase 5: Advanced Features & Polish

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions