repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

feat(super): persist accepted mockup artifacts

c1a5d3fc5f286aa9cf2d8f4182f672c89fced158

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (3)

+161 / −0 text lines

Diff layout

docs/super/plans/2026-07-11-accepted-mockup-artifacts.md

Added
new file mode 100644

+118 / −0 text lines

1# Accepted Mockup Artifacts Implementation Plan
2
3> **For agentic workers:** REQUIRED SUB-SKILL: Use /skill:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
4
5**Goal:** Require brainstorming agents to persist accepted mockup selections beside the completed design spec and link them from that spec.
6
7**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.
8
9**Tech Stack:** Markdown Agent Skill instructions, Vitest, Node.js assertions
11**Roadmap:** None
13**Phase:** Single-plan implementation
15---
17## Tasks
19### Task 1: Specify accepted mockup persistence in the brainstorming skill
21**Files:**
23- Modify: `extensions/super/skills/brainstorming/SKILL.md`
24- Test: `extensions/super/__tests__/workflow-skills.test.ts`
26- [ ] **Step 1: Write the failing workflow contract test**
28Add this test inside `describe("super workflow phase skills", ...)`:
30```typescript
31it("persists only accepted mockups beside the design spec", () => {
32 const brainstorming = skill("brainstorming");
34 assert.match(
35 brainstorming,
36 /Only persist options selected when the user chooses Accept/,
37 );
38 assert.match(brainstorming, /<spec-stem>-mockup-<option-id>\.html/);
39 assert.match(brainstorming, /one file per selected option/);
40 assert.match(brainstorming, /standalone HTML document/);
41 assert.match(brainstorming, /relative Markdown links/);
42 assert.match(brainstorming, /mockup tool remains in-memory/);
43});
44```
46- [ ] **Step 2: Run the test to verify it fails**
48Run:
50```text
51mise run test -- super/__tests__/workflow-skills.test.ts
52```
54Expected: FAIL because the brainstorming skill does not yet define accepted mockup artifact persistence.
56- [ ] **Step 3: Add the minimal workflow instructions**
58Add this subsection after the Visual Companion result-handling instructions in `extensions/super/skills/brainstorming/SKILL.md`:
60````markdown
61### Accepted mockup artifacts
63The `mockup` tool remains in-memory and never writes project files.
64The brainstorming agent owns persistence after the spec path is known.
66Only persist options selected when the user chooses Accept.
67Do not persist iterated or unselected options.
68If Accept has no selection, write no artifact.
69For `multi: true`, write one file per selected option.
71Write every accepted option as a standalone HTML document beside the design spec:
73```text
74<spec-stem>-mockup-<option-id>.html
75```
77Add only the minimal document shell: doctype, language, UTF-8 charset, viewport metadata, and option label as title.
78Place the original accepted fragment unchanged in the document body so embedded styles and scripts remain intact.
80Add a `## Mockups` section to the spec with relative Markdown links using option labels:
82```markdown
83## Mockups
85- [Right rail](./2026-07-11-layout-design-mockup-right-rail.html)
86```
88Commit the spec and accepted mockup artifacts together.
89````
91- [ ] **Step 4: Run the focused tests**
93Run:
95```text
96mise run test -- super/__tests__/workflow-skills.test.ts
97```
99Expected: PASS.
101- [ ] **Step 5: Run repository verification**
103Run:
105```text
106mise run ci
107```
109Expected: formatting, lint, tests, static checks, and integration checks pass.
111- [ ] **Step 6: Commit the implementation**
113Stage only the plan, skill, and workflow test; preserve unrelated dirty files:
115```text
116git add docs/super/plans/2026-07-11-accepted-mockup-artifacts.md extensions/super/skills/brainstorming/SKILL.md extensions/super/__tests__/workflow-skills.test.ts
117git commit -m "feat(super): persist accepted mockup artifacts"
118```

extensions/super/__tests__/workflow-skills.test.ts

Modified

+14 / −0 text lines

3232 assert.match(prototyping, /Delete temporary artifacts/);
3333 });
35 it("persists only accepted mockups beside the design spec", () => {
36 const brainstorming = skill("brainstorming");
38 assert.match(
39 brainstorming,
40 /Only persist options selected when the user chooses Accept/,
41 );
42 assert.match(brainstorming, /<spec-stem>-mockup-<option-id>\.html/);
43 assert.match(brainstorming, /one file per selected option/);
44 assert.match(brainstorming, /standalone HTML document/);
45 assert.match(brainstorming, /relative Markdown links/);
46 assert.match(brainstorming, /mockup tool remains in-memory/);
47 });
3549 it("runs report-only execution review after plan execution", () => {
3650 const executing = skill("executing-plans");
3751 const reviewing = skill("reviewing-execution");

extensions/super/skills/brainstorming/SKILL.md

Modified

+29 / −0 text lines

231231If `action` is `iterate`, revise the fragments and call `mockup` again.
232232If `action` is `accept`, continue the brainstorming flow unless notes or annotations clearly require another visual iteration.
234### Accepted mockup artifacts
236The mockup tool remains in-memory and never writes project files.
237The brainstorming agent owns persistence after the spec path is known.
239Only persist options selected when the user chooses Accept.
240Do not persist iterated or unselected options.
241If Accept has no selection, write no artifact.
242For `multi: true`, write one file per selected option.
244Write every accepted option as a standalone HTML document beside the design spec:
246```text
247<spec-stem>-mockup-<option-id>.html
248```
250Add only the minimal document shell: doctype, language, UTF-8 charset, viewport metadata, and option label as title.
251Place the original accepted fragment unchanged in the document body so embedded styles and scripts remain intact.
253Add a `## Mockups` section to the spec with relative Markdown links using option labels:
255```markdown
256## Mockups
258- [Right rail](./2026-07-11-layout-design-mockup-right-rail.html)
259```
261Commit the spec and accepted mockup artifacts together.