feat(super): persist accepted mockup artifacts
c1a5d3fc5f286aa9cf2d8f4182f672c89fced158
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: 2fd15d344b5d
bugabingas pi extensions
c1a5d3fc5f286aa9cf2d8f4182f672c89fced158
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+161 / −0 text lines
new file mode 100644+118 / −0 text lines
# Accepted Mockup Artifacts Implementation Plan> **For agentic workers:** REQUIRED SUB-SKILL: Use /skill:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.**Goal:** Require brainstorming agents to persist accepted mockup selections beside the completed design spec and link them from that spec.**Architecture:** Keep `mockup` generic and in-memory. Add workflow instructions to the brainstorming skill, backed by focused text-contract tests, so the agent writes standalone HTML artifacts only after acceptance and once the spec path is known.**Tech Stack:** Markdown Agent Skill instructions, Vitest, Node.js assertions**Roadmap:** None**Phase:** Single-plan implementation---## Tasks### Task 1: Specify accepted mockup persistence in the brainstorming skill**Files:**- Modify: `extensions/super/skills/brainstorming/SKILL.md`- Test: `extensions/super/__tests__/workflow-skills.test.ts`- [ ] **Step 1: Write the failing workflow contract test**Add this test inside `describe("super workflow phase skills", ...)`:```typescriptit("persists only accepted mockups beside the design spec", () => { const brainstorming = skill("brainstorming"); assert.match( brainstorming, /Only persist options selected when the user chooses Accept/, ); assert.match(brainstorming, /<spec-stem>-mockup-<option-id>\.html/); assert.match(brainstorming, /one file per selected option/); assert.match(brainstorming, /standalone HTML document/); assert.match(brainstorming, /relative Markdown links/); assert.match(brainstorming, /mockup tool remains in-memory/);});```- [ ] **Step 2: Run the test to verify it fails**Run:```textmise run test -- super/__tests__/workflow-skills.test.ts```Expected: FAIL because the brainstorming skill does not yet define accepted mockup artifact persistence.- [ ] **Step 3: Add the minimal workflow instructions**Add this subsection after the Visual Companion result-handling instructions in `extensions/super/skills/brainstorming/SKILL.md`:````markdown### Accepted mockup artifactsThe `mockup` tool remains in-memory and never writes project files.The brainstorming agent owns persistence after the spec path is known.Only persist options selected when the user chooses Accept.Do not persist iterated or unselected options.If Accept has no selection, write no artifact.For `multi: true`, write one file per selected option.Write every accepted option as a standalone HTML document beside the design spec:```text<spec-stem>-mockup-<option-id>.html```Add only the minimal document shell: doctype, language, UTF-8 charset, viewport metadata, and option label as title.Place the original accepted fragment unchanged in the document body so embedded styles and scripts remain intact.Add a `## Mockups` section to the spec with relative Markdown links using option labels:```markdown## Mockups- [Right rail](./2026-07-11-layout-design-mockup-right-rail.html)```Commit the spec and accepted mockup artifacts together.````- [ ] **Step 4: Run the focused tests**Run:```textmise run test -- super/__tests__/workflow-skills.test.ts```Expected: PASS.- [ ] **Step 5: Run repository verification**Run:```textmise run ci```Expected: formatting, lint, tests, static checks, and integration checks pass.- [ ] **Step 6: Commit the implementation**Stage only the plan, skill, and workflow test; preserve unrelated dirty files:```textgit add docs/super/plans/2026-07-11-accepted-mockup-artifacts.md extensions/super/skills/brainstorming/SKILL.md extensions/super/__tests__/workflow-skills.test.tsgit commit -m "feat(super): persist accepted mockup artifacts"```+14 / −0 text lines
it("persists only accepted mockups beside the design spec", () => { const brainstorming = skill("brainstorming"); assert.match( brainstorming, /Only persist options selected when the user chooses Accept/, ); assert.match(brainstorming, /<spec-stem>-mockup-<option-id>\.html/); assert.match(brainstorming, /one file per selected option/); assert.match(brainstorming, /standalone HTML document/); assert.match(brainstorming, /relative Markdown links/); assert.match(brainstorming, /mockup tool remains in-memory/); });+29 / −0 text lines
If `action` is `accept`, continue the brainstorming flow unless notes or annotations clearly require another visual iteration.### Accepted mockup artifactsThe mockup tool remains in-memory and never writes project files.The brainstorming agent owns persistence after the spec path is known.Only persist options selected when the user chooses Accept.Do not persist iterated or unselected options.If Accept has no selection, write no artifact.For `multi: true`, write one file per selected option.Write every accepted option as a standalone HTML document beside the design spec:```text<spec-stem>-mockup-<option-id>.html```Add only the minimal document shell: doctype, language, UTF-8 charset, viewport metadata, and option label as title.Place the original accepted fragment unchanged in the document body so embedded styles and scripts remain intact.Add a `## Mockups` section to the spec with relative Markdown links using option labels:```markdown## Mockups- [Right rail](./2026-07-11-layout-design-mockup-right-rail.html)```Commit the spec and accepted mockup artifacts together.