e.key === "Escape" && onClose()} >
e.stopPropagation()} onkeydown={(e) => e.stopPropagation()} role="dialog" aria-labelledby="workflow-panel-title" tabindex="-1" >

Guided Workflow

{#each PHASES as phase (phase)} {@const isActive = $workflowState.currentPhase === phase} {@const isDone = $workflowState.currentPhase > phase} {#if phase < 4} {/if} {/each}
{#if $workflowState.currentPhase === 1}
{#if isWaitingForDiscuss}
⚙️

Claude is working...

Writing CONTEXT.md — will auto-detect when complete.

{:else if contextContent !== null}
✓ CONTEXT.md captured
{:else if isLoadingContext}

Checking for CONTEXT.md...

{:else}

{#if $workflowState.quickMode} Quick mode: your description will be saved directly to CONTEXT.md without discussion. {:else} Claude will analyse your description and write a structured CONTEXT.md with acceptance criteria. {/if}

{#if !$workflowState.quickMode} {:else} {/if}
{/if}
{:else if $workflowState.currentPhase === 2}

Use the PRD Creator to generate your task breakdown, then approve it here to advance.

{#if $prdIsLoaded && $prdTasks.length > 0}

{$prdTasks.length} task{$prdTasks.length === 1 ? "" : "s"} ready

hikari-tasks.json loaded

Ready
{:else}

No tasks generated yet

Open PRD Creator to generate a task breakdown

Pending
{/if}
{#if $workflowState.plan.tasksApproved}
✓ Plan approved — ready to advance to Execute
{/if}
{:else if $workflowState.currentPhase === 3}

Run your tasks in the Task Loop panel, then mark execution complete here.

{#if $loopTasks.length > 0} {@const done = completedTaskCount()} {@const failed = failedTaskCount()} {@const total = $loopTasks.length}

{done} / {total} tasks completed

{#if $loopStatus !== "idle"} {$loopStatus} {/if}
{#if failed > 0}

{failed} task{failed === 1 ? "" : "s"} failed

{/if}
{:else}

No tasks loaded — open Task Loop to load and run tasks

{/if}
{#if $workflowState.execute.completed}
✓ Execution complete — ready to advance to Verify
{/if}
{:else if $workflowState.currentPhase === 4}

Verify the implementation against your acceptance criteria.

{#if $workflowState.verify.criteria.length > 0}

Acceptance Criteria

{#if contextContent !== null} {/if}
{#each $workflowState.verify.criteria as criterion (criterion.id)}

{criterion.text}

{/each}
{:else}

No criteria yet.

{#if contextContent !== null} {/if}
{/if}
e.key === "Enter" && handleAddCriterion()} class="flex-1 bg-[var(--bg-secondary)] border border-[var(--border-color)] rounded-lg px-3 py-1.5 text-sm text-[var(--text-primary)] focus:outline-none focus:border-[var(--accent-primary)]" placeholder="Add criterion..." />
{#if isWaitingForVerify}
⚙️

Claude is verifying...

Writing VERIFY.md — will auto-detect when complete.

{:else if verifyContent !== null}
✓ VERIFY.md generated
{:else if isLoadingVerify}

Checking for VERIFY.md...

{:else}
{#if !$workflowState.quickMode} {/if}
{/if} {#if $workflowState.verify.verificationComplete}
✓ Verification complete
{/if}
{/if}
{#if $workflowState.currentPhase === 2 && !$workflowState.plan.tasksApproved} {:else if $workflowState.currentPhase === 3 && !$workflowState.execute.completed} {:else if $workflowState.currentPhase === 4 && !$workflowState.verify.verificationComplete && $workflowState.quickMode} {/if}