ISAC AUTHORING ASSIST AI MECHANIC DRAFTING
{canGenerate ? 'AUTHORIZED' : 'PERMISSION REQUIRED'}
{#if !canGenerate}

AI assistance is optional. Manual mechanic authoring remains available below. Request AI mechanic generation permission from an administrator to use this helper.

{:else if !expanded}

Convert exact in-game wording into a reviewable mechanic draft. The assistant cannot save, publish, or replace the manual editor.

{/if} {#if expanded}
SOURCE WORDING {context.sourceName || 'UNTITLED MECHANIC'}
Paste the wording exactly as it appears in the game.

Generated data is a draft. Applying it never saves the parent record and does not remove access to the manual controls.

{#if errorMessage} {:else if response?.status === 'clarification_required'}
CLARIFICATION REQUIRED {response.questions.length} {response.questions.length === 1 ? 'QUESTION' : 'QUESTIONS'}
Answers are used only to refine this mechanic draft.
{#each response.questions as question, index}
{String(index + 1).padStart(2, '0')}
{question.question} {question.reason}
{#if question.answerType === 'boolean'} setAnswer(question.id, values[0] === 'true')} /> {:else if question.answerType === 'choice' && question.options?.length} ({ value: option, label: option.toUpperCase() }))} value={typeof answers[question.id] === 'string' ? answers[question.id] as string : ''} columns={Math.min(3, question.options.length)} onchange={(values) => setAnswer(question.id, values[0])} /> {:else} {/if}
{/each}
{:else if response?.status === 'capability_gap'}
DEVELOPER HANDOFF MECHANIC LANGUAGE GAP
The assistant did not invent unsupported calculation behavior.

{response.summary}

{#each response.gaps as gap}
AREA{gap.area}
REQUIRED BEHAVIOR
{gap.requiredBehavior}
WHY UNSUPPORTED
{gap.whyUnsupported}
DEVELOPER CHANGE
{gap.developerChange}
{#if gap.workaround}
CURRENT WORKAROUND
{gap.workaround}
{/if}
{/each}
{#if handoffMessage}

{handoffMessage}

{/if} {:else if response?.status === 'draft_ready'}
DRAFT READY REVIEW BEFORE APPLICATION
No changes have been applied or saved.

{response.summary}

{#if response.assumptions.length || response.warnings.length}
{#if response.assumptions.length}
ASSUMPTIONS
    {#each response.assumptions as assumption}
  • {assumption}
  • {/each}
{/if} {#if response.warnings.length}
REVIEW WARNINGS
    {#each response.warnings as warning}
  • {warning}
  • {/each}
{/if}
{/if} {#if confirmApply} {:else}
{/if} {:else if pending}
ANALYZING MECHANIC

Comparing the source wording with supported events, attributes, and value models.

{/if}
{#if activityMessage}

{activityMessage}

{/if}
{/if}