Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

docs: remove superpowers planning artifacts

joshistoast376a682d6f8e
diff --git a/docs/superpowers/plans/2026-07-29-prompt-list-interaction-consistency.md b/docs/superpowers/plans/2026-07-29-prompt-list-interaction-consistency.md
deleted file mode 100644
index 2bb1f8dec3..0000000000
--- a/docs/superpowers/plans/2026-07-29-prompt-list-interaction-consistency.md
+++ /dev/null
@@ -1,81 +0,0 @@
-# Prompt List Interaction Consistency Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Give wildcard insertion rows, expanded-prompt preview rows, and prompt-template rows one shared hover, focus, radius, hit-area, and transition treatment without changing their height or content density.
-
-**Architecture:** Reuse the existing Platform `Row` recipe as the single interaction primitive. Compose it through `asChild` around native buttons in the two surfaces still using Chakra ghost buttons; keep prompt templates as the reference implementation and retain all feature-specific content and state outside the shared primitive.
-
-**Tech Stack:** React, TypeScript, Chakra UI v3, Vitest Browser Mode, Testing Library
-
-## Global Constraints
-
-- Preserve row height, padding, typography, thumbnails, numbering, wrapping, grouping, and click behavior.
-- Keep wildcard and template edit/delete icon buttons as sibling controls.
-- Keep the prompt-template `active="accent"` state and `aria-current`.
-- Do not change the global ghost-button recipe or add new tokens, recipes, timing constants, or active states.
-- Add browser-level regression coverage against browser-resolved styles, not duplicated production constants.
-
----
-
-## Task 1: Lock down and implement the shared interaction contract
-
-**Files:**
-
-- Modify: `invokeai/frontend/webv2/src/features/generation/ui/promptFields/WildcardsPanel.browser.test.tsx`
-- Modify: `invokeai/frontend/webv2/src/features/generation/ui/promptFields/DynamicPromptsButton.browser.test.tsx`
-- Modify: `invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx`
-- Modify: `invokeai/frontend/webv2/src/features/generation/ui/promptFields/WildcardsPanel.tsx`
-- Modify: `invokeai/frontend/webv2/src/features/generation/ui/promptFields/DynamicPromptsPanel.tsx`
-
-- [ ] Add focused browser tests that identify the real selectable button in each list.
-- [ ] Verify wildcard insertion, expanded-prompt application, and template application still call their existing handlers.
-- [ ] Verify inactive rows resolve the same hover background, transition property/duration/timing, corner radius, and focus-visible outline as a shared `Row` probe or as each other.
-- [ ] Verify the applied template remains `aria-current="true"` with its accent surface.
-- [ ] Verify wildcard/template edit and delete controls remain outside the selectable button.
-- [ ] Run the focused browser command and confirm the new consistency assertions fail for wildcard and expanded-prompt rows before production changes:
-
-```bash
-cd invokeai/frontend/webv2
-pnpm run test:browser -- \
- src/features/generation/ui/promptFields/WildcardsPanel.browser.test.tsx \
- src/features/generation/ui/promptFields/DynamicPromptsButton.browser.test.tsx \
- src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx
-```
-- [ ] Import the Platform `Row` primitive in both components.
-- [ ] Replace only the wildcard insertion ghost `Button` with `Row asChild` wrapping a native `button type="button"`.
-- [ ] Preserve the wildcard row's flex sizing, automatic height, padding, title, content, and insertion callback exactly.
-- [ ] Leave wildcard edit/delete controls as siblings of the selectable row.
-- [ ] Replace only the expanded-prompt ghost `Button` with `Row asChild` wrapping a native `button type="button"`.
-- [ ] Preserve the preview row's automatic height, padding, title, index, highlighted prompt, and callback exactly.
-- [ ] Remove the preview row's local `transitionDuration="faster"` override so the shared recipe owns motion.
-- [ ] Do not modify `PromptTemplatesPanel.tsx` unless a test exposes a genuine contract mismatch.
-- [ ] Run the focused browser command and confirm the new and existing tests pass.
-- [ ] Run scoped static checks:
-
-```bash
-cd invokeai/frontend/webv2
-pnpm exec oxfmt --check \
- src/features/generation/ui/promptFields/WildcardsPanel.tsx \
- src/features/generation/ui/promptFields/WildcardsPanel.browser.test.tsx \
- src/features/generation/ui/promptFields/DynamicPromptsPanel.tsx \
- src/features/generation/ui/promptFields/DynamicPromptsButton.browser.test.tsx \
- src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx
-pnpm run lint:oxc
-pnpm run lint:tsc
-```
-
-## Final verification
-
-- [ ] Review the final diff against the approved design and confirm no row-density, content, account, persistence, or unrelated styling changes slipped in.
-- [ ] Run repository verification:
-
-```bash
-cd invokeai/frontend/webv2
-pnpm run lint
-pnpm run test:all
-git diff --check
-```
-
-- [ ] Record any pre-existing warnings or failures separately from regressions caused by this change.
-- [ ] Commit the implementation with a focused message.
diff --git a/docs/superpowers/plans/2026-07-29-prompt-template-image-and-active-state.md b/docs/superpowers/plans/2026-07-29-prompt-template-image-and-active-state.md
deleted file mode 100644
index f64d09e127..0000000000
--- a/docs/superpowers/plans/2026-07-29-prompt-template-image-and-active-state.md
+++ /dev/null
@@ -1,284 +0,0 @@
-# Prompt Template Image and Active-State Implementation Plan
-
-> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
-
-**Goal:** Restore fetched prompt-template preview images under React StrictMode and render the applied template's selectable row with the shared solid accent treatment.
-
-**Architecture:** Keep authenticated blob fetching in `PromptTemplateImage` and make the keyed `BlobImage` child own each object URL from mount setup through matching cleanup. Keep applied-template state in the existing panel contract and express its visual state through the shared `Row` recipe, leaving edit and delete actions as separate controls.
-
-**Tech Stack:** React 19, TypeScript, Chakra UI v3, TanStack Query, Vitest Browser Mode, Playwright
-
-## Global Constraints
-
-- No backend, query-key, authentication, or prompt-template DTO changes.
-- No new color tokens or row recipes.
-- Local preview data URLs keep their current behavior.
-- The previously added `border.image` semantic outline remains the single image-outline rule.
-- Fetched blob URLs must be created during mount setup and the exact URL from each setup must be revoked by its matching cleanup.
-- The selected template button must use `Row active="accent"`, expose `aria-current`, and use `accent.contrast` for both name and summary.
-- Edit and delete controls must remain outside the accent surface.
-- Do not call React `useEffect` directly; `useMountEffect` is the repository escape hatch for browser-resource setup and cleanup.
-
----
-
-## File Structure
-
-- `invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplateImage.tsx` continues to select stored, local, removed, and fallback image states; its private keyed `BlobImage` child owns fetched object URLs.
-- `invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplatesPanel.tsx` continues to group and apply templates; `TemplateRow` composes the shared `Row` recipe around only the apply button.
-- `invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx` covers both user-visible regressions with the real Chakra system and TanStack Query provider.
-
-### Task 1: Make fetched image object URLs StrictMode-safe
-
-**Files:**
-- Modify: `invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplateImage.tsx:41-66`
-- Test: `invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx:1-150,597-621`
-
-**Interfaces:**
-- Consumes: `PromptTemplateImageProps.fallback: ReactNode`, `promptTemplateImageQueryOptions(template.id)`, and the existing blob identity key from `getBlobKey(blob)`.
-- Produces: private `BlobImage({ blob, fallback, imageProps }): ReactNode`, which renders the fallback before setup publishes a URL and an outlined `Image` afterward.
-
-- [ ] **Step 1: Write the StrictMode regression test**
-
-Import `StrictMode` from React. Replace the single-setup unmount test with a test whose `createObjectURL` spy returns a unique URL on every setup and whose `revokeObjectURL` spy records revoked URLs:
-
-```tsx
-it('keeps the fetched image URL live through StrictMode replay and revokes every owned URL', async () => {
- let sequence = 0;
- const revokedUrls = new Set<string>();
- vi.spyOn(URL, 'createObjectURL').mockImplementation(() => `blob:template-preview-${++sequence}`);
- vi.spyOn(URL, 'revokeObjectURL').mockImplementation((url) => revokedUrls.add(url));
-
- await render(
- <StrictMode>
- <PromptTemplateImage alt="Fetched preview" fallback={IMAGE_FALLBACK} template={templateWithImage} />
- </StrictMode>,
- (queryClient) =>
- queryClient.setQueryData(promptTemplateKeys.image(templateWithImage.id), new Blob(['image']))
- );
-
- const image = host!.querySelector<HTMLImageElement>('img[alt="Fetched preview"]')!;
- const liveUrl = image.getAttribute('src')!;
-
- expect(sequence).toBeGreaterThan(1);
- expect(revokedUrls.has('blob:template-preview-1')).toBe(true);
- expect(revokedUrls.has(liveUrl)).toBe(false);
- expect(getComputedStyle(image).outlineWidth).toBe('1px');
- expect(getComputedStyle(image).outlineOffset).toBe('-1px');
-
- await act(() => root?.unmount());
- root = null;
- expect(revokedUrls.has(liveUrl)).toBe(true);
-});
-```
-
-Add `vi.restoreAllMocks()` to the existing `afterEach` so a failed assertion cannot leak URL spies into later tests.
-
-This test catches the current bug: moving URL creation back to a state initializer makes StrictMode revoke the URL still assigned to the rendered image.
-
-- [ ] **Step 2: Run the focused browser test and verify RED**
-
-Run from `invokeai/frontend/webv2`:
-
-```bash
-pnpm run test:browser -- src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx
-```
-
-Expected: the StrictMode test fails because the rendered `src` is already present in `revokedUrls` and only one object URL was created.
-
-- [ ] **Step 3: Move object URL ownership into the mount lifecycle**
-
-Pass the existing fallback into `BlobImage`, initialize its URL state to `null`, and create/revoke each URL inside one `useMountEffect` setup:
-
-```tsx
-return (
- <BlobImage key={getBlobKey(query.data)} blob={query.data} fallback={fallback} imageProps={imageProps} />
-);
-
-const BlobImage = ({
- blob,
- fallback,
- imageProps,
-}: {
- blob: Blob;
- fallback: ReactNode;
- imageProps: Omit<ImageProps, 'src'>;
-}) => {
- const [src, setSrc] = useState<string | null>(null);
-
- useMountEffect(() => {
- const objectUrl = URL.createObjectURL(blob);
- setSrc(objectUrl);
-
- return () => URL.revokeObjectURL(objectUrl);
- });
-
- return src ? <Image {...IMAGE_OUTLINE_PROPS} {...imageProps} src={src} /> : fallback;
-};
-```
-
-Do not clear state from cleanup: final unmount does not need a render, and StrictMode's next setup immediately publishes its own URL.
-
-- [ ] **Step 4: Run focused verification and verify GREEN**
-
-Run from `invokeai/frontend/webv2`:
-
-```bash
-pnpm run test:browser -- src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx
-pnpm exec oxfmt --check src/features/generation/ui/promptFields/PromptTemplateImage.tsx src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx
-pnpm run lint:tsc
-```
-
-Expected: the focused browser file passes with no unhandled errors or React warnings, formatting passes, and TypeScript emits no errors.
-
-- [ ] **Step 5: Commit the image lifecycle fix**
-
-```bash
-git add invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplateImage.tsx invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx
-git commit -m "fix(webv2): keep template image URLs live"
-```
-
-### Task 2: Highlight the applied template with the accent row recipe
-
-**Files:**
-- Modify: `invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplatesPanel.tsx:1-14,352-418`
-- Test: `invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx:1-180,183-220`
-
-**Interfaces:**
-- Consumes: `TemplateRow.isActive: boolean`, `RowProps.active: 'none' | 'muted' | 'brand' | 'accent'`, and `toPromptTemplateSnapshot(template)`.
-- Produces: a native apply button composed with `Row asChild`, `active={isActive ? 'accent' : 'none'}`, and `aria-current={isActive || undefined}`.
-
-- [ ] **Step 1: Add a stateful browser-test harness and failing active-row test**
-
-Import `Box` from Chakra, `PromptTemplateSnapshot`, and React `useState`. Add this module-level test harness so clicking a real row updates the controlled `activeTemplate` prop:
-
-```tsx
-const StatefulPromptTemplatesPanel = ({ catalog }: { catalog: PromptTemplateCatalog }) => {
- const [activeTemplate, setActiveTemplate] = useState<PromptTemplateSnapshot | null>(null);
-
- return (
- <>
- <Box aria-hidden bg="accent.solid" color="accent.contrast" data-testid="accent-style-probe" />
- <PromptTemplatesPanel
- activeTemplate={activeTemplate}
- catalog={catalog}
- isActiveTemplateMissing={false}
- onApply={setActiveTemplate}
- onCreate={vi.fn()}
- onDetach={vi.fn()}
- onEdit={vi.fn()}
- />
- </>
- );
-};
-```
-
-Add a panel test:
-
-```tsx
-it('marks the applied template as current with the accent surface and contrast text', async () => {
- await render(<StatefulPromptTemplatesPanel catalog={createCatalog()} />);
-
- const activeButton = buttonWithText('Cinematic');
- const inactiveButton = buttonWithText('Community');
- await act(async () => userEvent.click(activeButton));
-
- const probeStyle = getComputedStyle(host!.querySelector('[data-testid="accent-style-probe"]')!);
- const activeText = activeButton.querySelectorAll('span');
-
- expect(activeButton.getAttribute('aria-current')).toBe('true');
- expect(inactiveButton.hasAttribute('aria-current')).toBe(false);
- expect(getComputedStyle(activeButton).backgroundColor).toBe(probeStyle.backgroundColor);
- expect(getComputedStyle(inactiveButton).backgroundColor).not.toBe(probeStyle.backgroundColor);
- expect(activeText).toHaveLength(2);
- expect(getComputedStyle(activeText[0]!).color).toBe(probeStyle.color);
- expect(getComputedStyle(activeText[1]!).color).toBe(probeStyle.color);
-});
-```
-
-The probe derives browser-resolved semantic-token colors independently of `TemplateRow`; the test catches removing `Row`, selecting the wrong active variant, omitting `aria-current`, or leaving active text on muted tokens.
-
-- [ ] **Step 2: Run the focused browser test and verify RED**
-
-Run from `invokeai/frontend/webv2`:
-
-```bash
-pnpm run test:browser -- src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx
-```
-
-Expected: the new test fails because the applied button has no `aria-current` attribute and does not use the `accent.solid` background.
-
-- [ ] **Step 3: Compose the apply button with the shared Row recipe**
-
-Import `Row` from `@platform/ui/Row`. Replace only the selectable `Button` in `TemplateRow`:
-
-```tsx
-<Row
- active={isActive ? 'accent' : 'none'}
- aria-current={isActive || undefined}
- asChild
- flex="1"
- h="auto"
- justifyContent="start"
- minW="0"
- px="2"
- py="1.5"
- rounded="sm"
->
- <button type="button" onClick={handleApply}>
- <TemplateThumbnail template={template} />
- <Stack align="start" flex="1" gap="0" minW="0">
- <Text
- as="span"
- color={isActive ? 'accent.contrast' : 'fg.muted'}
- fontSize="xs"
- fontWeight={isActive ? '600' : '400'}
- >
- {template.name}
- </Text>
- <Text
- as="span"
- color={isActive ? 'accent.contrast' : 'fg.subtle'}
- fontFamily="mono"
- fontSize="2xs"
- truncate
- >
- {summary}
- </Text>
- </Stack>
- </button>
-</Row>
-```
-
-Keep the surrounding `HStack`, edit button, and delete button unchanged so secondary and destructive actions are not part of the accent apply surface.
-
-- [ ] **Step 4: Run focused and package verification and verify GREEN**
-
-Run from `invokeai/frontend/webv2`:
-
-```bash
-pnpm run test:browser -- src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx
-pnpm exec oxfmt --check src/features/generation/ui/promptFields/PromptTemplatesPanel.tsx src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx
-pnpm run lint:oxc
-pnpm run lint:tsc
-```
-
-Expected: the focused browser file passes with no unhandled errors or React warnings, formatting and Oxc lint pass without warnings, and TypeScript emits no errors.
-
-- [ ] **Step 5: Commit the active row treatment**
-
-```bash
-git add invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplatesPanel.tsx invokeai/frontend/webv2/src/features/generation/ui/promptFields/PromptTemplates.browser.test.tsx
-git commit -m "feat(webv2): highlight the applied prompt template"
-```
-
-## Final Verification
-
-After both task reviews are clean, run from `invokeai/frontend/webv2`:
-
-```bash
-pnpm run format:check
-pnpm run lint
-pnpm run test:all
-```
-
-Expected: all formatting, Oxc, TypeScript, architecture, unit, browser, and fixture checks pass. Then review the full branch diff from the merge-base, explicitly triaging every deferred finding in the SDD ledger before declaring the PR ready.
diff --git a/docs/superpowers/specs/2026-07-28-prompt-template-image-and-active-state-design.md b/docs/superpowers/specs/2026-07-28-prompt-template-image-and-active-state-design.md
deleted file mode 100644
index 2fffed5755..0000000000
--- a/docs/superpowers/specs/2026-07-28-prompt-template-image-and-active-state-design.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# Prompt Template Image and Active-State Design
-
-## Goal
-
-Restore fetched prompt-template previews under React StrictMode and make the applied template visually unmistakable without adding one-off styling rules.
-
-## Image lifecycle
-
-`PromptTemplateImage` will continue fetching authenticated image blobs through TanStack Query. `BlobImage` will create its object URL inside its mount lifecycle, publish that URL to local state, and revoke that exact URL from the matching cleanup.
-
-This makes StrictMode replay safe: the first setup URL may be revoked during the development replay, while the second setup creates a fresh live URL. Until a live URL exists, the component renders the caller-provided fallback. Final unmount revokes the live URL.
-
-The regression test will render a fetched image inside `StrictMode` and prove:
-
-- the URL used by the rendered image has not been revoked;
-- replayed URLs are cleaned up;
-- the live URL is revoked on final unmount;
-- the existing semantic image outline remains applied.
-
-## Active template row
-
-The selectable portion of an applied template row will use the shared `Row` recipe with `active="accent"`, matching other active library rows. It will render as the existing button, expose `aria-current`, and use `accent.contrast` for both name and summary while active.
-
-Edit and delete controls remain outside the accent surface so destructive and secondary actions keep their own interaction semantics. Inactive rows retain their current muted typography and hover behavior.
-
-Browser coverage will apply a template and assert the selected button has the accent background, contrast text, and `aria-current`; another row must remain inactive.
-
-## Boundaries
-
-- No backend, query-key, authentication, or prompt-template DTO changes.
-- No new color tokens or row recipes.
-- Local preview data URLs keep their current behavior.
-- The previously added `border.image` semantic outline remains the single image-outline rule.
diff --git a/docs/superpowers/specs/2026-07-29-prompt-list-interaction-consistency-design.md b/docs/superpowers/specs/2026-07-29-prompt-list-interaction-consistency-design.md
deleted file mode 100644
index e36451b659..0000000000
--- a/docs/superpowers/specs/2026-07-29-prompt-list-interaction-consistency-design.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# Prompt List Interaction Consistency Design
-
-## Goal
-
-Make wildcard list items, expanded-prompt preview items, and prompt-template items feel like members of one interaction system while preserving the content density and typography appropriate to each list.
-
-## Shared interaction contract
-
-The selectable surface in all three lists will use the existing Platform `Row` recipe composed around a native button with `asChild`.
-
-That gives every selectable item the same:
-
-- `bg.muted` hover surface;
-- two-pixel inset `accent.solid` keyboard-focus outline;
-- `sm` corner radius;
-- pointer cursor and full-width hit surface;
-- background and color transition using `--wb-motion-duration-fast` (`120ms`, or `1ms` when reduced motion is enabled).
-
-No new recipe, color token, duration token, or per-feature hover constant will be added.
-
-The dynamic-prompts and prompt-template popovers use `bg.subtle` as their
-backing surface. This keeps the shared `bg.muted` row hover visibly distinct
-without overriding the `Row` recipe on individual list items.
-
-## Component treatment
-
-### Wildcard list
-
-`WildcardRow` will replace its selectable ghost `Button` with `Row asChild` and a native `button`. The wildcard reference, values summary, padding, automatic height, and insert behavior remain unchanged.
-
-Edit and delete icon buttons remain sibling controls outside the shared row surface. Their existing neutral and destructive button behavior is not changed.
-
-### Expanded-prompt preview
-
-`DynamicPromptRow` will replace its ghost `Button` with `Row asChild` and a native `button`. The numeric index, prompt highlighting, wrapping, padding, automatic height, and “use prompt” behavior remain unchanged.
-
-The local `transitionDuration="faster"` override will be removed because the shared row recipe owns the transition.
-
-### Prompt templates
-
-`TemplateRow` already uses the shared `Row` recipe and remains the reference implementation. Applied templates keep `active="accent"`, `aria-current`, and contrast typography. Inactive templates use the same hover, focus, and transition treatment as the other two lists.
-
-Thumbnail, text treatment, padding, automatic height, and edit/delete controls remain unchanged.
-
-## Accessibility
-
-Each selectable surface remains a native `button`, preserving keyboard activation and button semantics. The shared recipe supplies a consistent visible `:focus-visible` outline.
-
-The template’s applied state remains exposed through `aria-current`. Wildcard and expanded-prompt items represent immediate actions rather than persistent selection, so they do not gain an active or current state.
-
-## Testing
-
-Browser coverage will render all three real list surfaces with the Chakra system and verify:
-
-- wildcard, expanded-prompt, and inactive template buttons resolve to the same hover background;
-- all three resolve the same transition property and duration;
-- all three expose the shared focus-visible outline;
-- wildcard insertion, expanded-prompt application, and template application still invoke their existing behaviors;
-- an applied template retains its solid accent surface and `aria-current`;
-- edit and delete controls remain outside the wildcard and template selectable surfaces.
-
-Tests will compare browser-resolved styles against a shared `Row` probe or against each other rather than copying recipe implementation details into production code.
-
-## Boundaries
-
-- Do not change row height, padding, typography, thumbnails, numbering, text wrapping, or list grouping.
-- Do not alter global Chakra ghost-button styling.
-- Do not add active-state behavior to wildcard or expanded-prompt rows.
-- Do not change prompt, wildcard, template, query, account, or persistence behavior.
-- Do not introduce animation beyond the shared background/color transition.