| name | add-generation-param |
| description | Adds a generation parameter across MooshieUI's Svelte store, TypeScript types, Rust GenerationParams, and workflow templates. Use for new UI settings, ComfyUI inputs, or /add-generation-param. |
| model | sonnet |
Add Generation Parameter (MooshieUI)
6 touchpoints, in order. New workflow-only params still need Rust + TS types if exposed in UI.
Gather from user
- Name (TS
camelCase, Rust/iface snake_case)
- Type + default
- Templates: txt2img | img2img | inpainting | upscale | all
- ComfyUI node + input field name
1. src/lib/types/index.ts
export interface GenerationParams {
new_param: SomeType;
}
2–4. src/lib/stores/generation.svelte.ts
newParam = $state<SomeType>(defaultValue);
if (saved.newParam !== undefined) this.newParam = saved.newParam;
newParam: this.newParam,
new_param: this.newParam,
Use !== undefined for bool/number defaults that can be 0 or false.
5. src-tauri/src/comfyui/types.rs
pub new_param: Type,
pub new_param: Option<Type>,
6. src-tauri/src/templates/{mode}.rs
"node_input": params.new_param,
Verify
cargo check --manifest-path src-tauri/Cargo.toml
- [ ] Interface snake_case field
- [ ] Store $state + load/save + toParams()
- [ ] Rust GenerationParams field
- [ ] ≥1 template references param
If UI needs i18n: add keys to all files in src/lib/locales/ (parity with en.ts).
For new workflow modes, use workflow-template-builder skill after params exist.