feat: add AI-assisted ISAC authoring
This commit is contained in:
@@ -1909,6 +1909,61 @@ its state to assistive technology. Focus remains in the active field when the
|
||||
generated script refreshes, and reduced-motion preferences remove expansion
|
||||
and replacement transitions.
|
||||
|
||||
#### AI mechanic drafting
|
||||
|
||||
`MechanicProgramEditor` keeps its complete manual authoring controls available
|
||||
to every authorized data author. Place the optional AI drafting panel inside
|
||||
that editor, after the source description and before the structured mechanic
|
||||
controls. AI assistance must never replace, hide, lock, or reset the manual
|
||||
workflow.
|
||||
|
||||
The panel uses one compact modeled-data surface with a blue information rail.
|
||||
Its heading names `AI MECHANIC DRAFTING` and identifies the output as a draft.
|
||||
An author submits the exact in-game mechanic text and optional context. Keep the
|
||||
source text editable during clarification and preview. Use the standard pending
|
||||
button treatment while a request runs and block duplicate submissions.
|
||||
|
||||
Agents without `ai.mechanic.generate` still see the collapsed panel. Disable
|
||||
its request control, label the state `PERMISSION REQUIRED`, and direct
|
||||
the agent to request permission from an administrator. The disabled state must
|
||||
not expose API configuration, internal prompt content, model controls, or a
|
||||
working form submission.
|
||||
|
||||
The panel presents five explicit states:
|
||||
|
||||
- `READY FOR INPUT` shows the source-text field and Generate Draft action.
|
||||
- `DRAFTING` keeps the submitted text visible, announces progress through a
|
||||
polite live region, and disables repeat actions.
|
||||
- `CLARIFICATION REQUIRED` lists each focused question with its reason and
|
||||
bounded answer control. The author may answer, revise the source text, or
|
||||
return to manual authoring.
|
||||
- `CAPABILITY GAP` names the unsupported behavior and displays the developer
|
||||
handoff, supported approximation, and optional workaround in separate
|
||||
labeled blocks. Do not present a capability gap as validation failure.
|
||||
- `DRAFT PREVIEW` shows assumptions, warnings, readiness, and the generated
|
||||
script before an explicit `APPLY TO EDITOR` action.
|
||||
|
||||
Applying a draft fills the structured fields in the current unsaved editor.
|
||||
It does not save, publish, submit a proposal, close the editor, or discard
|
||||
manual changes without confirmation. Show a concise before-and-after summary
|
||||
when applying the draft would replace configured branches, pools, controls, or
|
||||
outcomes. The standard ISAC save lifecycle begins only after the author reviews
|
||||
and saves the resulting form.
|
||||
|
||||
Use text labels with status colors. Orange marks Generate, Answer, and Apply
|
||||
actions. Blue identifies modeled information, yellow marks assumptions or
|
||||
unsupported coverage, and red marks request or validation failures. Never use
|
||||
model confidence as the only acceptance signal.
|
||||
|
||||
On narrow screens, stack questions, answers, preview metadata, and actions in
|
||||
source order. Keep controls at least 44 pixels tall and keep the draft preview
|
||||
inside the viewport. Focus moves to the first clarification question, the
|
||||
capability-gap heading, or the draft-preview heading when a result arrives.
|
||||
Return focus to the initiating control when the author closes or resets the
|
||||
panel. Announce the result state without reading the complete generated script.
|
||||
Reduced-motion preferences remove pending, disclosure, and preview
|
||||
transitions while preserving textual state changes.
|
||||
|
||||
#### Generated mechanic script
|
||||
|
||||
The shared `PseudoScript` component gives authors and builders a readable
|
||||
@@ -2080,6 +2135,27 @@ to an authorized operator. Use monospaced text for raw loadout and prediction
|
||||
snapshots; labels, findings, and errors stay in the standard operational
|
||||
typeface.
|
||||
|
||||
Calculation revision editors include the optional AI drafting panel after the
|
||||
revision identity and before the manual stage and profile controls. Reuse the
|
||||
`READY FOR INPUT`, `DRAFTING`, `CLARIFICATION REQUIRED`, `CAPABILITY GAP`, and
|
||||
`DRAFT PREVIEW` states from AI mechanic drafting. The panel uses calculation
|
||||
language, identifies the active or edited base revision, and previews changes
|
||||
to stages, weapon profiles, and Skill profiles.
|
||||
|
||||
Agents without `ai.calculation.generate` see the collapsed
|
||||
`PERMISSION REQUIRED` state. Agents with the permission may request and apply a
|
||||
draft, but the panel leaves every manual calculation control available.
|
||||
Applying a draft fills the open unsaved revision form. It does not save the
|
||||
revision, activate it, grant `calculation.publish`, or bypass the activation
|
||||
confirmation. Before applying, show current and proposed counts for stages,
|
||||
weapon profiles, and Skill profiles beside assumptions, warnings, and the
|
||||
generated script.
|
||||
|
||||
Use the same pending, duplicate-request, focus, live-region, mobile stacking,
|
||||
44-pixel target, and reduced-motion rules as the mechanic assistant. A
|
||||
calculation capability gap names the unsupported stage, operator, binding,
|
||||
curve, or runtime behavior and keeps the manual revision editor available.
|
||||
|
||||
### Image Library assignment state
|
||||
|
||||
An ISAC game-data editor registers each uploaded icon in the Image Library. The
|
||||
|
||||
Reference in New Issue
Block a user