Namespace Serenity.Editor.AiPromptBuilder
Classes
AiPromptAgentSkillsStatus
One agent's skill-installation status, as inspected by Inspect(string).
AiPromptAnswerEntry
One key/value(s) slot inside an AiPromptAnswerSheet. A flat List<T> of these
stands in for a dictionary because Unity does not serialize Dictionary<TKey, TValue> across
a domain reload — the same answer-storage idiom MinimalLoopOptions relies on for wizard state.
AiPromptAnswerSheet
Unity-serialization-safe answer storage for the whole wizard: a flat list of AiPromptAnswerEntry
keyed by question key, so a [SerializeField] holding this survives a domain reload the way a
Dictionary<TKey, TValue> field cannot.
AiPromptAudioAndThemeIntent
Requests sound effects, music tracks, mixer wiring, and/or a UI theme — batch-importing from a source folder and preferring an existing theme/game-settings asset as the extension base when one is named.
AiPromptChoice
One selectable option offered by a choice-kind AiPromptQuestion.
AiPromptComposer
Renders one generated agent prompt from a set of selected intents: Preamble -> ProjectContext -> UserInstructions (only when at least one enabled snippet has non-blank text; omitted entirely otherwise) -> each selected intent's section, always in AiPromptIntentKind canonical order regardless of selection order -> SharedRules (contradictions + doc paths) -> DefinitionOfDone.
AiPromptCompositionRequest
Everything AiPromptComposer needs to render one generated agent prompt.
AiPromptCompositionResult
The outcome of Compose(AiPromptCompositionRequest): either a rendered prompt with its supporting data, or a set of blocking Errors and no prompt.
AiPromptConflictFinding
One contradiction the contradiction detector found across a set of AiPromptDeclaredOutcome.
AiPromptContradictionDetector
Reasons over the structured AiPromptDeclaredOutcome claims every selected AiPromptSection makes, and surfaces contradictions for the generated prompt to hand back to the user. Findings never block Compose(AiPromptCompositionRequest) — they render into the prompt as questions the AI agent must resolve before it starts working.
AiPromptDeclaredOutcome
A structured claim one AiPromptSection makes about a target asset/type — e.g. "creates a new UnityMenuSettingsDefinition with id main_menu". Contradiction detection reasons over these instead of parsing rendered prose.
AiPromptEditorPrefsStore
IAiPromptPreferencesStore backed by UnityEditor.EditorPrefs — personal, per-user state
that persists across editor sessions and is shared across projects, matching the Hub's own
SerenityHubEditorPrefsStore pattern.
AiPromptExtendModuleIntent
Requests a change to one or more existing Serenity modules — extending a named existing asset when one fits, or creating a new one for the module(s) picked when none does.
AiPromptFreeFormRequestIntent
A catch-all intent for requests that fit no closed-choice intent — the user describes what they want in plain language and the generated prompt hands the agent the full module map so it can route itself through the matching cookbook(s). Declares no outcomes, so it never participates in contradiction findings.
AiPromptHudIntent
Requests a HUD-specific change — extending a named existing UnityHudDefinition when one fits, or
creating a new one — with domain questions the generic Extend Module intent does not ask (element
representations, signal generation).
AiPromptInitializeProjectIntent
Requests a brand-new minimal project loop (boot → main menu → gameplay → pause), optionally extending an existing theme instead of starting one from scratch.
AiPromptIntentCatalog
Builds every composable intent in the canonical order defined by AiPromptIntentKind.
AiPromptMarkdownFileWriter
Writes a generated prompt to a plain .md file at an arbitrary absolute path — the "save as file"
output destination. Deliberately outside Assets/ by default (a dev-authored prompt is never
runtime-loaded, so Serenity's Addressables-registration rule for created assets does not apply here).
AiPromptProjectScan
Pure, test-constructible view over a project scan: every ScannedSerenityAsset the wizard
can offer as an extension base, plus the lookups intents and templates need. Never touches
AssetDatabase itself — see AiPromptProjectScanner for the live scan.
AiPromptProjectScanner
The only class in this feature allowed to touch AssetDatabase. Wraps
Serenity.Global.Infrastructure.Editor.Validation.SerenityHealthCheckValidator.LoadFoundationAssets — the existing one-pass foundation-asset
scan — and resolves each asset's recipe section via SerenityRecipeTemplateGenerator so the
wizard can offer concrete extension bases.
AiPromptQuestion
One declarative question an intent's questionnaire asks. Intents build lists of these as plain data; a single shared GUI renderer draws every AiPromptQuestionKind from them.
AiPromptQuestionnaireGui
The single shared IMGUI renderer for every AiPromptQuestion an intent declares — intents only produce data, this is the only place that draws a control for it. One method per AiPromptQuestionKind, plus the shared label/help-text/required-warning chrome every kind gets, wrapped as one card per question so nothing ever renders half of a question and orphans the rest.
AiPromptSceneElementsIntent
Requests authoring of scene/game elements — game modes, stages, wave sets, spawners, characters, and the scene wiring that ties them together — preferring existing game mode/character bases when named.
AiPromptSection
One intent's contribution to the generated prompt: its rendered markdown body plus the structured data the composer and the contradiction detector reason over — outcomes it declares and docs it cites.
AiPromptSkillsReadiness
Inspects, per SerenityAiAgentDirectoryCatalog agent, whether its skills directory carries
every bundled Serenity skill (BundledSkillNames()). Pure
File/Directory IO over an explicit projectRoot — no AssetDatabase — so this feature's
wizard step can inspect skill readiness without a live editor.
AiPromptSkillsReadinessReport
Every known agent's skill status, as returned by Inspect(string).
AiPromptSlashCommandInstallResult
Outcome of Install(AiPromptSlashCommandRequest): the absolute path written per requested target agent, and the display names of targets that were skipped (no commands directory).
AiPromptSlashCommandInstaller
Writes a generated prompt as a slash-command file (---\ndescription: ...\n---\n\n<body>)
into every requested agent's CommandsDirectory. Agents without a
commands directory (Gemini CLI's TOML-only custom commands) are skipped, never errored. Overwrites an
existing file at the same path — idempotent, like the recipe engine's own upsert.
AiPromptSlashCommandRequest
Everything Install(AiPromptSlashCommandRequest) needs to write one generated prompt as a slash-command file into each selected agent's commands directory.
AiPromptTemplateLibrary
Production IAiPromptTemplateSource: loads each <templateName>.md shipped
under the PromptTemplates folder beneath Serenity.Global.Infrastructure.Editor.SerenityEditorPaths.DocumentationRoot via
AssetDatabase.
AiPromptTemplateRenderer
Pure {{TOKEN_NAME}} substitution — deliberately no template control flow. Any conditional content
is the caller's job: build the multi-line token value in C# before rendering. An unresolved token
becomes an empty string plus a warning, never a silent gap in the generated prompt.
AiPromptUserInstructionLibrary
The user's personal, reusable collection of standing instructions ("muletillas"), persisted under
IAiPromptPreferencesStore so it survives editor restarts and is shared across projects —
mirrors the Hub's own SerenityHubFavorites shape. Every mutation (Add(string, string),
Update(string, string, string), SetEnabled(string, bool), Remove(string)) reads the current list, applies
the change, and writes the whole list back immediately.
AiPromptUserInstructionSnippet
One reusable standing instruction ("muletilla") in the user's personal collection — [Serializable]
with public fields because UnityEngine.JsonUtility serializes fields, not auto-properties
(same style as AiPromptAnswerEntry). Enabled snippets inject automatically into every
generated prompt via AiPromptComposer; the persisted Enabled flag is the
default the wizard shows on the Instructions step.
AiPromptWizardStep
One page in the wizard's dynamic step list — IntentKind is only set on IntentConfigure pages.
AiPromptWizardStepPlan
Builds the wizard's dynamic step list: a fixed head (Skills, Instructions, Intents), one Configure page per selected intent in AiPromptIntentKind canonical order regardless of selection order, and a fixed tail (Review, Output). Pure and Unity-free so the whole flow shape is unit-testable without an editor.
SerenityAiPromptBuilderWindow
Stepped wizard that interviews the user and generates an AI-agent prompt referencing Serenity's own
skills, cookbooks and real project assets instead of letting the agent reinvent them: Skills warns
(never blocks) about missing agent skill installs, Instructions manages the user's personal reusable
standing instructions, Intents multi-selects the combinable request kinds and the shared goal/output
root, one Configure page per selected intent collects its questionnaire, Review runs the composer
without writing anything and surfaces contradictions, and Output offers the three destinations —
clipboard, a saved .md file, or an installed slash command.
Structs
ScannedSerenityAsset
One IFoundationSettings asset found by AiPromptProjectScanner, with its recipe section resolved.
Interfaces
IAiPromptIntent
One selectable, composable request kind the AI Prompt Builder can render into a generated agent prompt.
An intent declares its own questionnaire as data, validates answers, and emits a rendered
AiPromptSection — it never draws GUI and never touches AssetDatabase directly.
IAiPromptPreferencesStore
Minimal string key/value persistence seam AiPromptUserInstructionLibrary depends on —
isolates UnityEditor.EditorPrefs access behind an explicit, constructor-injected
dependency so persistence can be tested against a fake instead of real editor-global state. A local
duplicate of the Hub's own ISerenityHubKeyValueStore seam, kept in-module deliberately: this
asmdef must not reference the Hub assembly for one tiny interface.
IAiPromptTemplateSource
Seam for loading a named prompt template's raw markdown text. Returns null when the template is missing.
Enums
AiPromptConflictSeverity
How strongly an AiPromptConflictFinding should block prompt generation.
AiPromptIntentKind
The six selectable request kinds a generated Serenity agent prompt can combine. Order here is the canonical rendering order used everywhere an intent list appears (step flow, composer output).
AiPromptOutcomeVerb
What an AiPromptDeclaredOutcome claims a section will do to a target asset/type.
AiPromptQuestionKind
The kinds of question an intent's questionnaire can declare. A single shared GUI renderer draws every kind — intents only produce data, never draw controls themselves.
AiPromptWizardStepKind
The dedicated wizard page a step in the flow renders — the fixed pages every run always has, plus one IntentConfigure page per selected AiPromptIntentKind.