Product requirements

Live Mock-ups with the Components of the App

In a project that uses skillsaw, a mock-up in a PRD, an ADR or a one-pager is a component file of that project. The project builds it with its own Vite, and its own runtime renders it: Ember in an Ember app, React in a React app, Vue in a Vue app. The mock-up imports the current components and Switchyard machines of the app, and the page links to the source of each one.

Status
Draft
Owner
Joe Gaudet
Created
Updated
One-pager
None
Related
None

Summary

Today a skillsaw mock-up is a page of HTML that an agent writes by hand. It copies the look of the app, and no component or Switchyard machine of the app runs in it. This PRD makes a mock-up a module of the host app: ui/cancel-order.mockup.tsx, .vue or .gts, next to the page. The module imports components, design-system packages and machines from the places where they are now. skillsaw ui build runs the Vite of the app, with the Vite config of the app and a small skillsaw plugin, so the framework of the app renders the mock-up. Skillsaw ships no framework code. The page lists each component that a mock-up uses, with a link to its source on the default branch. When a linked file changes, prd build builds the mock-up again and tree stale lists the page, so the next publish shows the current components. A machine panel shows each real Switchyard machine live, with new React and Vue bindings. There are 17 functional and 6 non-functional requirements, in 14 work items in two repos (skillsaw and Switchyard). The most risk is in two places: the artifact viewer must run a module script in a nested frame (FW-1), and the Ember mount must boot an app outside its routes (FW-2).

Glossary

Host app
The app of the repo that uses skillsaw and keeps the pages, for example a React app with Vite.
Mock-up module
A component file in the framework of the host app, in ui/ next to a page: <name>.mockup.tsx, .jsx, .vue or .gts. Its default export is the screen. states gives the arguments of each named state.
Mount adapter
The skillsaw code that puts a mock-up module into the page with the API of the framework: createRoot (React), createApp (Vue), or a boot of the Application class (Ember).
Mock-up build
The output of ui build for one page folder, in ui/dist/: one index.html and its chunks. The Vite of the host app makes it. Git ignores it.
Mock-up frame
An iframe with data-mockup in a screen state. It shows one state of one mock-up module from the mock-up build.
Component link
One line in the list under a mock-up frame: a source file of the app with a link to it on the default branch, or a package with its version.
Still
A PNG of one state of one mock-up, taken in each build. Git keeps it.
Lock file
ui/mockups.lock.json: the framework and its version, the Vite version, the commit, the size, and for each mock-up its states, stills and component links with a hash of each file.
Machine panel
The part of a screen state that shows the chart, the state now, the events and the last transitions of a real Switchyard machine in a mock-up frame.
Frame reporter
The code in the mock-up build that sends the state of each machine to the page: @switchyard-ts/inspector/frame, from the host app.

Problem and context

A mock-up is a copy. The one-pager skill tells the agent to copy the structure of the real screen from the code (skills/feature-one-pager/reference/ui.md:21). The page gets the classes of skillsaw, not the components of the app. A reviewer judges a sketch, and the sketch goes out of date when the app changes.

A mock-up has no machine. Its state is a set of keys in the URL hash (packages/cli/assets/one-pager/ui.js:34). A screen that a Switchyard machine runs gets no machine in its mock-up. The page of the switchyard-design skill runs a machine, but its ui.html cannot contain a script (skills/switchyard-design/SKILL.md:104), so it cannot show a component of the app.

A reader cannot go from the screen to the code. A mock-up names no component, so a reviewer or an engineer does not know which parts exist and where they are.

A published page can lose its files. The publish step publishes each page that tree stale prints (rules/skillsaw-interviews.md:168), and that command prints only the path of index.html (packages/cli/src/commands/tree.ts:59). The mock-up pages in ui/ and the Mermaid file in ../_assets/ (packages/cli/src/prd/build.ts:115) are other files. A mock-up build adds tens of files to this gap.

The owner asked for this change: the component libraries of the project, rendered by the runtime of the project, in the published pages, for Ember, React and Vue, with links to the current components (interview record). There are no usage numbers, because skillsaw collects no data.

Goals and non-goals

Goals

  • A screen state in a PRD, an ADR or a one-pager shows real components of the host app, rendered live by the framework of the app, on claude.ai, in Ember, React and Vue apps.
  • A mock-up uses the current code: it imports each component from its place in the app, and each publish after a change to a linked file shows the change.
  • Each mock-up frame lists the components and packages that it uses, with a link to the source of each.
  • A mock-up that runs a Switchyard machine shows that machine live in a machine panel, in the three frameworks.
  • A published page loads each of its files: 0 missing frames, mock-ups or diagrams.
  • A host app with no supported framework sees no change.

Non-goals

  • Skillsaw does not compile a framework and does not ship one. It runs the Vite of the host app.
  • No story tool is necessary. A repo with Storybook or Jig can import its story data in a mock-up, but skillsaw does not read stories.
  • No link to a running dev server. The artifact viewer blocks other hosts.
  • No Next.js, Nuxt or classic ember-cli build in this release (FW-3), and no Svelte, Solid or Angular (FW-7).
  • No visual diff of screens.
  • No mock-up frames in the design-review and walkthrough kinds in this release (FW-5).

Customers

  • Teams with React 18 or later and Vite: a mock-up is a .mockup.tsx file that uses their components.
  • Teams with Vue 3 and Vite: the same, with a .mockup.vue file, and Switchyard machines through the new Vue binding.
  • Teams with Ember 6.12 or later on Embroider and Vite: the same, with a .mockup.gts file.
  • Teams that run screens with Switchyard machines, in any of the three frameworks: the machine panel.
  • Teams with another build or framework: no change. The hand-written mock-ups stay.
  • Reviewers and engineers who read the pages on claude.ai: they use the real screen, and open the source of each part.

Internal stakeholders

Joe Gaudet: the owner of this PRD, and the maintainer of skillsaw and Switchyard. The work items in Switchyard change its plan (SWITCHYARD_PLAN.md), so he approves them there too.

Users and scenarios

The roles: the author (an agent that runs the prd, adr or feature-one-pager skill, or a person), the reviewer (reads the page on claude.ai), and the engineer (builds the change from the page).

  • React. An agent writes a PRD for "Cancel an order". It runs ui new docs/prd/<dir> cancel-order --from src/components/order-summary.tsx. The starter imports OrderSummary. The agent adds a confirm dialog from the Dialog of the design system for the proposed state. It runs ui build, prd build and prd check, then publishes the page and its files with tree bundle.
  • Vue and Switchyard. A reviewer opens the PRD on claude.ai and clicks Cancel order in the mock-up. The machine panel moves OrderMachine from Placed to Cancelled. The reviewer sees that the event deliver is not available in Cancelled.
  • Ember. The same flow in an Ember app. The mount boots the app without its routes, and the .mockup.gts file is the application template.
  • The engineer. An engineer reads the approved PRD and clicks OrderSummary in the list under the frame. GitHub opens src/components/order-summary.tsx on the default branch.
  • A component changes. A week later a teammate changes OrderSummary. tree stale lists the PRD, because a linked file changed. The publish procedure builds the mock-up again and publishes the page, so the page shows the new OrderSummary.
  • Error: the frame does not start. The artifact viewer does not start a frame in 4 seconds. The page keeps the still, says "The live view did not start", and gives a Try again button.
  • Error: the Vite build fails. A mock-up imports a file that is not there. ui build prints the error of Vite with exit code 1, and the old build and the old lock file stay.

Current state

A one-pager mock-up is a page in ui/. one-pager build puts ui.css and ui.js into it (packages/cli/src/one-pager/one-pager.ts:44). ui.js reads the state from the URL hash (packages/cli/assets/one-pager/ui.js:34), sends its height to the parent (packages/cli/assets/one-pager/ui.js:80), and takes the theme only from its parent window (packages/cli/assets/one-pager/ui.js:84). The one-pager sends the theme to each frame, and finds the frame of a message by its window (packages/cli/assets/one-pager/one-pager.js:7, packages/cli/assets/one-pager/one-pager.js:10).

A PRD screen state is an img or an iframe. check accepts only a relative link to a file of the repo (packages/cli/src/prd/check-ui.ts:18), and it ignores a query or a fragment (packages/cli/src/prd/links.ts:15). A PRD loads Mermaid from ../_assets/ (packages/cli/src/prd/build.ts:115). The contract in CLAUDE.md:55 lists the files that a page can load. The walkthrough kind already drives Chromium with Playwright and takes screenshots (packages/cli/src/walkthrough/playwright.ts:329, packages/cli/src/walkthrough/playwright.ts:448).

Outside skillsaw:

  • Vite 8.4.1 builds with Rolldown 1.3.4. A plugin can read each module of the build with this.getModuleIds(), and the imports of a module with this.getModuleInfo(id).importedIds (the PluginContext type of the rolldown package). Vite puts each environment variable that starts with envPrefix into the client code (the vite package). Source: the npm package.
  • Jig already boots an Ember app without its routes: it takes the Application class of the app and its compat modules, removes the route modules, and gives the app its own router, application route and application template (packages/ember/src/canvas/app.gts). Its options name the parts that the boot needs: App, config and the modules from @embroider/virtual/compat-modules (packages/ember/src/start.ts).
  • Switchyard core has a hook that lets a framework track a machine (packages/core/src/machine.ts). Only @switchyard-ts/ember uses it (packages/ember/src/index.ts), and the plan names only core and Ember (decision 1). switchyard diagram draws one machine as Mermaid (packages/cli/src/index.ts); only design reads the JSDoc notes (analyze.ts). connectInspector streams a machine to the Stately Inspector (packages/inspector/src/index.ts).

Proposed state

The host repo names its framework in .skillsaw/config.json. The author writes a mock-up module in ui/ and names it on an iframe in a screen state. ui build runs the Vite of the app with the config of the app and the skillsaw plugin. The plugin adds the mock-up modules and a mount script as the entries, and reads the module graph for the component links. Then the command takes the stills and writes the lock file. prd build fills the frame, the still and the list of components from the lock file. tree bundle gives the publish step each file of the page. In the page, a mock-up frame shows its still at once and the live mock-up when the mount says that it is ready.

ui build runs the build of the app, not a build of skillsaw. The plugin changes only the entries, so the aliases, the CSS, the template compiler and the other plugins of the app stay the same.

A mock-up frame has a life cycle in the page. The still shows first, so a frame that does not start never leaves an empty box.

The machine panel gets its data from the frame. The page and the mock-up build talk only with postMessage, and each side checks the window of each message.

Each mount adapter puts a mock-up module into the page with the API of its framework. The page sees only the URL and the messages, so the three frameworks look the same to skillsaw:

FrameworkFound byMock-up fileMountSetup hook
Reactreact 18 or later, and @vitejs/plugin-react or @vitejs/plugin-react-swc*.mockup.tsx, *.mockup.jsxcreateRoot(root).render(setup(<Mockup {...state} />))setup(node) puts the node in the providers of the app
Vuevue 3 and @vitejs/plugin-vue*.mockup.vue, with states in a plain <script> blockcreateApp(Mockup, state), then setup(app), then mount(root)setup(app) adds the plugins of the app: router, store, i18n
Emberember-source 6.12 or later and @embroider/vite*.mockup.gtsBoots the Application class of the app with its compat modules, with a router, an application route and an application template of its own, as the Jig canvas doessetup(owner) registers stub services

User interface and prior art

One screen changes: a screen state of a PRD page, and the same frame in an ADR or a one-pager example panel. The mock-up page shows an invented shop. Its hash selects the state: mode=current, mode=proposed or mode=still.

Walkthrough Write a mock-up module in a React app, build it with the Vite of the app, publish the PRD, and use the machine panel and the component links on claude.ai.
Screen state: the order page of a placed order
  1. The frame shows the components of the app, rendered by the framework of the app. The badge gives the framework, the mock-up module, the state and the commit of the build.
  2. A click in the mock-up runs the real component and the real OrderMachine.
  3. The machine panel shows the chart, the state now, the events that can fire now, and the last transitions. An event button sends the event to the machine in the frame.
  4. The list under the frame names each component and package that the mock-up imports. A name links to the source on the default branch.
The still, when the live view does not start
  1. The still from the build shows at once, and stays when the frame does not start in 4 seconds.
  2. Try again loads the frame again. The panel says that it has no live data. The component links stay.

Prior art

Story tools already render one component of an app in a page of its own. Statechart tools already show a live chart next to a running app. This PRD takes the two ideas, but uses the build of the app and no story tool.

Storybook 11: one page for each story

storybook build --preview-only, and the iframe.html page of one story

A sketch of one story page: the address iframe.html?id=shop-ordersummary--placed above a card of an order, with no sidebar.

Storybook 11.0.2 has a build option that uses the preview without the manager UI. The preview reads the story and the view mode from the query of iframe.html, and renders the story with the framework of the app.

Take: One page that renders one component with the framework of the app, selected by its URL.

Avoid: A second build and a second set of files next to the app. A mock-up module uses the Vite config of the app, and a repo needs no story tool.

Source

Stately Inspect: a live view of the machines of an app

The @statelyai/inspect package, version 0.7.2

A sketch of an app on the left and a state chart on the right, with the active state marked.

The package lets developers inspect state transitions and actor communication in a JavaScript or TypeScript app. It shows state machines and sequence diagrams, and works with any framework. Switchyard already streams a machine to it through connectInspector.

Take: A live chart of the machine next to the running app, with the active state marked, and events that a person can send.

Avoid: A chart that needs xstate (the package "works best with XState"). The panel draws the Switchyard chart of the real class.

Source

WCAG 2.2 technique H64: a title on each frame

Sufficient technique for success criteria 2.4.1 and 4.1.2

A sketch of a frame with a label above it: title, the order page of a placed order.

Each frame gets a title that says what it holds, so a screen reader user can choose the frame.

Take: check needs a title on each mock-up frame, and the still gets the title as its alt text.

Avoid: A title such as "mock-up" or the module name alone, which says nothing about the screen.

Source

Requirements

A functional requirement is FR-n. A non-functional requirement is NFR-n.

FR-1A screen state can name a mock-up

An iframe with data-mockup in a PRD screen state, an ADR or a one-pager example panel is a mock-up frame. data-mockup-state names a key of states. data-machines names the machines for the panel. The build writes the src, the still and the list of components.

  • Given a PRD with <iframe data-mockup="cancel-order" data-mockup-state="placed" title="…"> and a lock file with that mock-up
    When the author runs prd build
    Then the frame gets src="ui/dist/index.html#mockup=cancel-order&state=placed"
    And an img.still with the path of the still and the title as its alt text
    And a list of the components of the mock-up after the frame
  • Given an ADR or a one-pager example panel with a mock-up frame
    When the author runs adr build or one-pager build
    Then the frame gets its src, its still and its list in the same way

FR-2ui set finds the framework and the Vite config

ui set reads package.json and the Vite config of the host app, and writes the ui section of the config. The supported frameworks are React 18 or later, Vue 3, and Ember 6.12 or later on Embroider, each with Vite. It also adds docs/**/ui/dist/ to .gitignore, or to the block in .git/info/exclude of a local install.

  • Given a host repo with react 19, vite 8 and vite.config.ts with @vitejs/plugin-react
    When the author runs ui set
    Then the config gets "framework": "react" and "viteConfig": "vite.config.ts"
    And the command prints the framework, its version and the Vite version
  • Given a host repo with ember-source 6.12 and @embroider/vite
    When the author runs ui set
    Then the config gets "framework": "ember"
  • Given a host repo with next and no Vite
    When the author runs ui set
    Then the command prints "no supported build: skillsaw needs Vite with React, Vue or Ember" with exit code 1
    And the config does not change

FR-3ui new writes a starter mock-up module

ui new writes ui/<name>.mockup.tsx, .vue or .gts for the framework of the config. With --from, the starter imports that module of the app and renders it in one state. With no ui section, the command writes a hand-written mock-up page, as today.

  • Given a React host app
    When the agent runs ui new docs/prd/<dir> cancel-order --from src/components/order-summary.tsx
    Then the command writes ui/cancel-order.mockup.tsx that imports OrderSummary, with a default export and states with one key
  • Given a host repo with no ui section
    When the agent runs ui new docs/prd/<dir> cancel-order
    Then the command writes ui/cancel-order.html with the runtime of today

FR-4ui build uses the Vite and the config of the app

The command imports vite from the node_modules of the host app and runs build with the Vite config of the app and the skillsaw plugin. The plugin sets the entries (the mount script and the mock-up modules of one page folder), a relative base and the output folder ui/dist/. No other option of the app changes. A failed build changes no file.

  • Given a PRD with two mock-up modules in a React host app
    When the author runs ui build docs/prd/<dir>
    Then ui/dist/ has index.html and one chunk for each mock-up
    And the build used each plugin and each alias of the Vite config of the app
    And ui/mockups.lock.json has the framework, the versions, the commit, the size and two mock-ups
  • Given a mock-up module that imports a file that is not there
    When the author runs ui build
    Then the command prints the error of Vite with exit code 1
    But the old ui/dist/ and the old lock file stay
  • Given a build that put the values of VITE_API_URL and VITE_SENTRY_DSN into the code
    When the build ends
    Then the command lists the two names and says that the files contain their values

FR-5Mount adapters for React, Vue and Ember

The mount script reads mockup and state from the hash, imports the mock-up module, and mounts its default export with the arguments of the state, through the API of the framework. It runs the setup module of the config first, then the setup hook of the mock-up. It sends skillsawReady with the framework and its version, sends its height, and sets data-theme from the page.

  • Given cancel-order.mockup.tsx with states = { placed: { orderId: 1042 } } and a setup that adds the query provider of the app
    When the frame opens #mockup=cancel-order&state=placed
    Then React renders the default export in the provider with orderId 1042
    And the frame sends skillsawReady with react@19 and the version
  • Given cancel-order.mockup.vue and a setup(app) that adds the router of the app
    When the frame opens the same hash
    Then Vue mounts the component with the props of the state, after app.use(router)
  • Given cancel-order.mockup.gts in an Ember app
    When the frame opens the same hash
    Then the Application class of the app boots with its services and its components, with no route module of the app
    And the mock-up is the application template, with the arguments of the state
  • Given a hash that names a state that is not in states
    When the frame opens
    Then the frame shows "No state ‹name› in cancel-order", and sends a skillsawError message

FR-6Each mock-up links to its components

The plugin reads the module graph of each mock-up. The list under the frame shows first the modules that the mock-up imports directly: each source file of the app, and each package with its version. A closed details element shows the other modules of the app in the build of the mock-up. A source file links to its blob URL on the default branch of the GitHub remote, or to the sourceUrl pattern of the config. With no remote and no pattern, the path is text.

  • Given a mock-up that imports src/components/order-summary.tsx, src/machines/order.ts and Button from @larkspur/ui 3.4.0
    When the author runs ui build and prd build
    Then the list has three lines: OrderSummary, OrderMachine and @larkspur/ui 3.4.0
    And OrderSummary links to https://github.com/larkspur/shop/blob/main/src/components/order-summary.tsx
  • Given a package with a repository field in its package.json
    When the build writes the list
    Then the package links to that repository; with no field, its name and version are text
  • Given a mock-up module itself, the mount script and the files of node_modules
    When the build writes the list
    Then the list does not show them as source files

FR-7A mock-up stays current

The lock file keeps a hash of each linked source file and of each mock-up module. prd build, adr build and one-pager build run ui build for the page when a hash differs, unless --no-mockups. tree stale lists a page when a hash differs, so the publish procedure publishes it again. check prints a notice for each changed file, and its exit code does not change.

  • Given a page whose lock file has a hash of src/components/order-summary.tsx, and a later change to that file
    When the agent runs tree stale
    Then the output lists the page, with the reason "a linked file changed: src/components/order-summary.tsx"
  • Given the same page
    When the author runs prd build
    Then the command builds the mock-ups of the page again, and the lock file gets the new hash and the new commit
  • Given the same page
    When prd check runs
    Then it prints "notice: ui-order: src/components/order-summary.tsx changed after the build; run skillsaw prd build" on stderr
    And the exit code is 0 when the page has no problem
  • Given a linked file that is not in the worktree
    When prd check runs
    Then it reports "ui-order: src/components/order-summary.tsx is not in the repo; run skillsaw ui build" with exit code 1

FR-8The page shows the still, then the live mock-up

ui build takes one PNG of each state of each mock-up with Playwright, as the walkthrough capture does. In the page, each mock-up frame shows its still at once. When the frame sends skillsawReady, the page shows the live frame. With no ready message in 4 seconds, the still stays with a message and a Try again button. Print and the inline copy show the still.

  • Given a published page with a mock-up frame
    When the frame comes into view and sends skillsawReady after 1.2 seconds
    Then the page hides the still and shows the frame
  • Given a frame that sends no message
    When 4 seconds pass after it comes into view
    Then the still stays
    And the page shows "The live view did not start" and a Try again button

FR-9check validates mock-up frames

prd check, adr check and one-pager check validate each mock-up frame against the lock file. A page with no mock-up frame gets the rules of today only.

  • Given a mock-up frame whose data-mockup or data-mockup-state is not in the lock file
    When prd check runs
    Then it reports "ui-order: mock-up cancel-order has no state refund in ui/mockups.lock.json; run skillsaw ui build"
  • Given a mock-up frame with no title, or a still that is not in the repo
    When prd check runs
    Then it reports each problem on its own line, with exit code 1
  • Given a page with no mock-up frame
    When prd check runs
    Then the output is the same as before this change

FR-10One command gives each file of a page for the publish

tree bundle <key> writes a folder with the page and each file that it loads: ui/ with its stills and its build, and the Mermaid file. It changes ../_assets/ to _assets/ in the copy. It prints one line for each file (the served path, then the absolute path) in batches of 256 files or fewer. The publish procedure uses it when the agent can publish files. With no such tool, the agent publishes the inline copy, which shows the stills.

  • Given a PRD with a mock-up build of 40 files
    When the agent runs tree bundle prd/2026-12-03-cancel-order
    Then the folder has an index.html that loads _assets/mermaid.min.js
    And the output lists one batch with each file
  • Given a page with 300 files
    When the agent runs tree bundle
    Then the output has two batches, and the first batch has index.html
  • Given a page with a file of more than 32 MiB
    When the agent runs tree bundle
    Then the exit code is 1, and the output gives the name and the size of the file

FR-11The machine panel shows the real machine live

For each machine that data-machines names, the page shows the chart with the active states marked, the state now, the events that can fire now as buttons, and the last 5 transitions. A button sends the event to the machine in the frame.

  • Given a mock-up frame with data-machines="OrderMachine" and the machine in Placed
    When the reviewer clicks Cancel order in the mock-up
    Then the panel shows Cancelled as the state now
    And the log shows "cancel: Placed → Cancelled"
  • Given the same frame with the machine in Placed
    When the reviewer clicks the deliver button in the panel
    Then the machine in the frame goes to Completed, and the mock-up shows the change
  • Given a data-machines name that the frame does not report in 4 seconds after it is ready
    When the time passes
    Then the panel says "OrderMachine did not start in this mock-up"

FR-12Switchyard sends the state of a machine out of a frame

A new core option, configure({ observe }), sees each machine when it starts. @switchyard-ts/inspector/frame uses it to send messages to the parent window: the chart (SVG from @switchyard-ts/graph), the state now, the events that can fire now, and each transition. It takes a send message only for an event that can fire now. The mount script imports it from the host app when the host app has @switchyard-ts/core, so the reporter and the machines use one copy of core.

  • Given a host app with @switchyard-ts/core and @switchyard-ts/inspector
    When an OrderMachine starts in a mock-up frame
    Then the parent gets {"switchyard": 1, "type": "machines", "machines": […]} with the name, the active states, the events and the SVG of OrderMachine
  • Given a send message for an event that cannot fire now
    When the reporter gets it
    Then the reporter fires nothing and sends no report
  • Given a host app with @switchyard-ts/core and no @switchyard-ts/inspector
    When the author runs ui build
    Then the command says that the machine panel needs @switchyard-ts/inspector as a dev dependency

FR-13A React binding for Switchyard

@switchyard-ts/react exports useMachine(create). It makes the machine one time for each mount, starts it, renders the component again after each change, and stops it when the component unmounts.

  • Given a component that calls useMachine(() => new OrderMachine()) and shows its state
    When the user clicks a button that calls order.cancel()
    Then the component shows Cancelled
  • Given the component in React StrictMode
    When it mounts
    Then one OrderMachine runs after the mount, and the reporter shows one OrderMachine

FR-14A Vue binding for Switchyard

@switchyard-ts/vue sets the reactivity hook of core with Vue refs, so a template that reads a machine updates after each change. useMachine(create) stops the machine when its effect scope stops.

  • Given a Vue 3 component that calls useMachine(() => new OrderMachine()) and shows order.state
    When order.cancel() runs
    Then the template shows Cancelled
  • Given the same component
    When it unmounts
    Then the machine stops, and its @after timers stop

FR-15State diagrams from the real machine

switchyard diagram --format details prints a JSON object: the Mermaid source, and one entry for each state with its JSDoc note and its path:line. skillsaw prd diagram writes a figure.uml from it, for the current or the proposed state.

  • Given src/machines/order.ts with an OrderMachine that has JSDoc on each state
    When the author runs prd diagram docs/prd/<dir> --machine src/machines/order.ts#OrderMachine --figure fig-order --state current
    Then the page has figure#fig-order with a current stateDiagram-v2 source
    And its uml-details has one entry for each state, with the JSDoc as the body and the path of the state
  • Given a state with no JSDoc
    When the command runs
    Then the command writes "No note in the code" as the body, and prints the name of the state

FR-16The skills use mock-up modules

The prd, adr and feature-one-pager skills write a mock-up module for each screen that changes when the config has a ui section. For a proposed state, the agent composes components that exist, and adds plain markup only for the parts that do not exist. The switchyard-design skill links a design to the mock-up that runs its machine.

  • Given a host repo with a ui section
    When the agent does the interview of the prd skill
    Then the question about screens has the option "Mock-up modules with the components of the app" first
  • Given a proposed screen that needs a component that does not exist
    When the agent writes the mock-up module
    Then the new part is markup in the mock-up file, and the page lists it as "New in this mock-up"

FR-17A host app with no supported framework sees no change

With no ui section in the config, each skill and each command works as today.

  • Given a host repo with no ui section
    When the agent runs prd build, prd check and one-pager build
    Then the pages and the output are the same as before this change
  • Given the same repo
    When the agent runs ui build
    Then the command prints "no framework: run skillsaw ui set" with exit code 1

NFR-1A mock-up build fits one publish

A publish from files takes 256 files and 64 MiB in one call, and 32 MiB for one file. By default ui/dist/ is 40 MiB or less and 220 files or fewer, so the page, the Mermaid file (about 3 MB) and the stills fit in the same call. The config can change the budget.

  • Given a mock-up build of 52 MiB and the default budget
    When ui build ends
    Then the exit code is 1
    And the output gives the size, the budget and the 10 largest files
    But the command writes no lock file

NFR-2The page is usable before the live mock-up starts

The still shows in the first paint of the page. A frame loads only near the view. A frame must be ready in 4 seconds. FW-2 measures the real times and can change the number.

  • Given the example PRD of each fixture app (React, Vue, Ember) in Chromium with an empty cache
    When the page scrolls to a mock-up frame, 20 times
    Then the frame sends skillsawReady in 4 seconds or less in 19 runs or more

NFR-3A mock-up frame calls no other host

The artifact viewer blocks requests to other hosts with no error on the page. A mock-up that needs data gets it from its states, from fixtures of the app, or from the mocks that its setup hook installs.

  • Given a mock-up whose component fetches https://api.example.com/orders/1042
    When ui build opens the frame to take its still
    Then the command fails that state and prints the URL

NFR-4The frame, the links and the panel are accessible

The mock-up frame, its messages, the list of components and the machine panel meet WCAG 2.2 AA. Each frame has a title. The panel works with the keyboard, and the state now is in a polite live region.

  • Given the example page with a live frame, a list of components and a machine panel
    When axe runs on the page
    Then it reports 0 violations
  • Given a keyboard user
    When the user presses Tab in the panel
    Then the focus goes to each event button, and Enter sends the event

NFR-5The page trusts no message

The page takes a message only from the window of one of its frames, and checks its form. It removes scripts, foreignObject, event attributes and outside links from a chart SVG. It writes text with textContent. The reporter fires a send only for an event that can fire now.

  • Given a message with a correct form from a window that is not a frame of the page
    When the page gets it
    Then the page ignores it
  • Given a chart SVG with a script element and an onload attribute
    When the panel shows the chart
    Then the chart has no script and no event attribute

NFR-6The runtime of the app renders the mock-up

The framework, Vite and Switchyard resolve only from the node_modules of the host app. The skillsaw package has no framework in its dependencies. The ready message, the lock file and the badge give the framework and its version.

  • Given a host app with react 19.1.0
    When the author runs ui build
    Then the lock file and the badge say react 19.1.0
    And the build has one copy of React, from the host app
  • Given the published @skillsaw/cli package
    When a test reads its package.json
    Then no dependency is react, vue, ember-source or vite

Data model and API changes

Data model

Skillsaw has no database. The data is a new ui section in the config and a new lock file in ui/ of each page that has a mock-up frame.

No migration. ui set adds docs/**/ui/dist/ to .gitignore, or to the block in .git/info/exclude of a local install.

API

Five new skillsaw commands, two changed skillsaw commands, one changed Switchyard command, the contract of a mock-up module, and three new Switchyard functions.

skillsaw ui set [--framework react|vue|ember] [--vite-config <file>] [--setup <module>] [--source-url <pattern>] [--budget-mb N] [--budget-files N]Choose the framework and the build of the repo

The author or the agent runs it one time for each repo. With no --framework, it reads package.json and the Vite config. It writes the ui section of the config and the ignore line. Exit code 1 when the repo has no supported framework with Vite.

Command
npx @skillsaw/cli ui set --setup src/mockup-setup.tsx
Output
framework: react 19.1.0 (@vitejs/plugin-react)
vite: 8.4.1, vite.config.ts
setup: src/mockup-setup.tsx
links: https://github.com/larkspur/shop/blob/main/{path}
budget: 40 MiB, 220 files
wrote .skillsaw/config.json and .gitignore
skillsaw ui new <page folder> <name> [--from <module>]Write a starter mock-up module

The agent runs it for each screen that changes. It writes the file form of the framework. With no ui section, it writes a hand-written mock-up page, as today. A file that exists is an error.

Command
npx @skillsaw/cli ui new docs/prd/2026-12-03-cancel-order cancel-order --from src/components/order-summary.tsx
Output
wrote docs/prd/2026-12-03-cancel-order/ui/cancel-order.mockup.tsx
imports: OrderSummary from src/components/order-summary.tsx
states: default
skillsaw ui build <page folder> [--force]Build the mock-ups of a page with the Vite of the app

Runs the Vite of the host app with the skillsaw plugin, takes the stills and writes the lock file. With no change to a hash, it changes nothing unless --force. It fails on a Vite error, on a state that requests another host, and when the size is over the budget. In each failure the old files stay.

Command
npx @skillsaw/cli ui build docs/prd/2026-12-03-cancel-order
Output
vite 8.4.1, react 19.1.0 at 4f2a9c1: 23 files, 1.9 MiB, 6 s
cancel-order: 3 components, 2 packages, 2 states
still: ui/stills/cancel-order--placed.png
still: ui/stills/cancel-order--confirm.png
env: VITE_PUBLIC_SHOP_NAME is in the build
wrote ui/mockups.lock.json
skillsaw tree bundle <key> [--out <folder>]Give each file of a page for the publish

The agent runs it in the publish procedure, for each key that tree stale prints. It writes the folder .skillsaw/publish/<key>/ by default. It fails on a file of more than 32 MiB or a link to a file that is not there.

Command
npx @skillsaw/cli tree bundle prd/2026-12-03-cancel-order
Output
batch 1 of 1: 29 files, 5.2 MiB
index.html	/repo/.skillsaw/publish/prd/2026-12-03-cancel-order/index.html
_assets/mermaid.min.js	/repo/.skillsaw/publish/prd/2026-12-03-cancel-order/_assets/mermaid.min.js
ui/dist/index.html	/repo/.skillsaw/publish/prd/2026-12-03-cancel-order/ui/dist/index.html
…
skillsaw prd diagram <page> --machine <module>#<Export> --figure <id> [--state current|proposed] [--legacy]Write a state diagram from a real machine

Runs switchyard diagram --format details of the host repo, with an argument list. It writes or replaces one source of the figure, and its uml-details. Exit code 1 when the host repo has no @switchyard-ts/cli.

Command
npx @skillsaw/cli prd diagram docs/prd/2026-12-03-cancel-order --machine src/machines/order.ts#OrderMachine --figure fig-order --state current
Output
fig-order (current): 4 states, 3 transitions
no note in the code: none
skillsaw prd build <file> [--inline] [--no-mockups]Also fill the mock-up frames, and build them again when a linked file changed

The same command, with two more steps: it runs ui build when a hash in the lock file differs, and it fills the src, the still and the list of components of each mock-up frame. adr build and one-pager build get the same steps. A page with no mock-up frame does not change.

Command
npx @skillsaw/cli prd build docs/prd/2026-12-03-cancel-order/index.html
Output
docs/prd/2026-12-03-cancel-order/index.html
changed after the build: src/components/order-summary.tsx
mock-ups: built again at 9b03e7d
mock-up frames: 2 (ui/mockups.lock.json)
skillsaw tree staleAlso list a page whose linked components changed

The same command and the same output form. A page is also stale when a hash in its lock file differs from the file in the worktree. The publish procedure then builds it and publishes it again.

Command
npx @skillsaw/cli tree stale
Output
docs/prd/2026-12-03-cancel-order/index.html  (a linked file changed: src/components/order-summary.tsx)
switchyard diagram <module.ts> --format details [--export <Name>] [--legacy]A diagram with the note of each state

A new format of the command that exists. It reads the JSDoc as design does, and prints JSON. The other formats do not change.

Command
npx switchyard diagram src/machines/order.ts --format mermaiddetails
Output
{"mermaid": "stateDiagram-v2\n  [*] --> Open …",
 "states": {"Placed": {"note": "The customer placed the order.", "path": "src/machines/order.ts:16"}}}
export default Mockup; export const states: Record<string, Args>; export function setup?(target)The contract of a mock-up module

A mock-up module is a component of the app. It imports from the app with the aliases of the Vite config. The keys of states are the values of data-mockup-state. setup gets the React node, the Vue app or the Ember owner. In Vue, states and setup are in a plain <script> block.

Module
// ui/cancel-order.mockup.tsx
import { OrderSummary } from '@/components/order-summary'
import { Dialog, Button } from '@larkspur/ui'
import { placedOrder } from '@/fixtures/orders'

export const states = {
  placed: { order: placedOrder, confirm: false },
  confirm: { order: placedOrder, confirm: true },
}

export default function CancelOrder({ order, confirm }) {
  return (<>
    <OrderSummary order={order} />
    {confirm && <Dialog title="Cancel order 1042?"><Button>Cancel order</Button></Dialog>}
  </>)
}
Frame
<iframe data-mockup="cancel-order"
        data-mockup-state="confirm"
        data-machines="OrderMachine"
        title="The confirm step of Cancel order"></iframe>
import { reportToFrame } from '@switchyard-ts/inspector/frame'; reportToFrame(options?)Send machines to the parent page

The mount script calls it when the host app has @switchyard-ts/core. It uses the new core option configure({ observe }), sends nothing with no parent window, and fires a send only for an event that can fire now.

Call
import { reportToFrame } from '@switchyard-ts/inspector/frame'
const stop = reportToFrame({ target: window.parent })
Message
{"switchyard": 1, "type": "machines", "machines": [
  {"name": "OrderMachine", "active": ["Placed"], "events": ["cancel", "deliver"],
   "last": {"event": "place", "from": ["Open"], "to": ["Placed"]}, "svg": "<svg …>"}]}
useMachine(create: () => M): MUse a machine in a React component

From @switchyard-ts/react. It uses useSyncExternalStore on the transitions of the machine. It starts the machine after the mount and stops it on unmount.

Call
const order = useMachine(() => new OrderMachine())
Return
order.state === OrderStatus.Placed  // true
order.cancel()                      // renders again with Cancelled
useMachine(create: () => M): MUse a machine in a Vue component

From @switchyard-ts/vue. Importing the package sets the reactivity hook of core with Vue refs. The machine stops with its effect scope.

Call
const order = useMachine(() => new OrderMachine())
Return
<p v-text="order.state.name"></p>   // placed, then cancelled

Frontend

The page runtime gets a mock-up frame, a list of components and a machine panel. The mock-up build gets the mount adapter from skillsaw and the frame reporter from the Switchyard of the host app.

Security and permissions

Published code. The bundle holds the built code of the mock-ups and of each module of the app that they import, with their fixtures. A new artifact is visible to its owner only, until the owner shares it. Vite puts the value of each environment variable that starts with envPrefix into the built code, so ui build lists each such variable in the output (FR-4).

Commands. ui build runs the Vite of the host app with the Vite config of the app. That is the same trust as the build script of the repo. Other commands run with an argument list and no shell, as other skillsaw commands do (CLAUDE.md:140).

Messages. The page and the mock-up build trust no message (NFR-5). The page sends only a machine name and an event name, and the reporter fires only an event that can fire now.

Links. A component link is a blob URL of the remote of the repo. A reader who has no access to the repo sees the error page of the host. The link gives no access.

Personal data. The feature touches no personal data. A mock-up can hold fixtures; the skills tell the agent to use invented data, as for mock-ups today. No new party gets data: the files go to claude.ai through the publish step that exists.

Observability and success metrics

  • ui build prints one line: the Vite version, the framework and its version, the commit, the file count, the size and the time. Then one line for each mock-up, each still and each environment variable in the build.
  • prd check, adr check and one-pager check print each problem of a mock-up frame on its own line, and a notice for each linked file that changed after the build.
  • tree stale gives the reason when a linked file changed.
  • The page logs one console line for each frame that does not start: skillsaw: ui-order: the live view did not start.
  • Target: the example PRD of each fixture app (React, Vue, Ember) passes check, and each of its frames is live in the published artifact.
  • Target: the mock-up build of each fixture app is 40 MiB or less and 220 files or fewer.
  • A product metric is not known: skillsaw collects no usage data (open questions).

Rollout and migration

There is no flag. The ui key of the config turns the feature on for one host repo. FW-1 and FW-2 run first, because their results set the URL form, the Ember mount and the budget. Then Switchyard (WI-9 to WI-12) ships as minor versions, then skillsaw ships as a minor version with a changeset. To go back, remove the ui key and the mock-up frames: the pages show the stills, which stay in git. No data changes.

Work items

Proposed issues for the trackers of the two repos. One item or more covers each requirement.

WI-1Mock-up frame markup, lock file and check rules

The lock file module, fillMockups in prd build, adr build and one-pager build, and the check rules. Tests prove that a page with no mock-up frame does not change.

WI-2Framework detection, ui set and ui new

Detection from package.json and the Vite config, the config section, the ignore line, and the starters. Fixture repos for React, Vue, Ember and Next.js.

WI-3ui build: the Vite of the app, the plugin, stills and budget

Runs the Vite of the host app through Deps, so unit tests use fakes. The plugin, the relative base, the environment variable list, the budget, and the stills with the capture code of the walkthrough. Fails a state that requests another host.

WI-4React and Vue mount adapters

The mount scripts, the setup module and hook, the ready, height and theme messages. Fixture apps with React 18 and 19 and with Vue 3.

WI-5Ember mount adapter

The boot of the Application class of the app without its routes, with the mock-up as the application template. Uses the result of FW-2. A fixture app with Ember 6.12 on Embroider and Vite.

WI-6Component links and the current check

The links from the module graph, the URL of the default branch, the file hashes, the stale reason in tree stale, the build again in prd build, and the notice in check.

WI-7Page runtime: mock-up frame, component list and machine panel

The still and the live switch, the 4-second limit, the list of components, the SVG clean-up, the event buttons and the log. A browser test ends in an axe audit.

WI-8tree bundle and the new publish procedure

The bundle folder, the batches, the change of ../_assets/, and section 9 of skillsaw-interviews.md.

WI-9Core observe option and the frame reporter

configure({ observe }) in core, and @switchyard-ts/inspector/frame with protocol version 1. Tests with a fake parent window.

WI-10@switchyard-ts/react

useMachine, with tests for StrictMode, unmount and @after timers. A guide page and a changeset.

WI-11@switchyard-ts/vue

The reactivity hook with Vue refs and useMachine, with tests for a template and for scope disposal. A guide page and a changeset.

WI-12switchyard diagram --format details

Reuses the JSDoc reader of design. Each state gets its note and its path:line.

WI-13prd diagram

Runs the Switchyard command of the host repo and writes one figure. Tests with a fake command.

WI-14Skills, examples and guide

The prd, adr and feature-one-pager skills and their interviews, an example PRD for each fixture app, the guide page, the CLAUDE.md contract, and a changeset. The switchyard-design change goes into the Switchyard repo, because skillsaw keeps a locked copy.

Future work and research

Two spikes before WI-3 and WI-5, and five stretch goals.

FW-1Does the artifact viewer run a mock-up build in a nested frame?

Publish one page from files with a Vite build of a React mock-up. Test a nested frame of an own file with a hash, module scripts and dynamic imports of chunks, and postMessage in the two directions.

Decides: The URL form and the chunk form of the build: chunks as today, one file for each mock-up, or stills only on claude.ai. Joe Gaudet decides.

FW-2The Ember mount, and the size and time of real builds

Boot an Ember 6.12 app on Embroider and Vite outside Jig, with the mock-up as the application template. Measure the size, the file count and the time to ready of a mock-up build in a React, a Vue and an Ember app. The compat modules of an Ember app bring each module of the app into the build, so the Ember size is the main question.

Decides: The Ember mount, the default budget, and the time limit of NFR-2. Joe Gaudet decides.

FW-3Next.js, Nuxt and classic ember-cli

A build of the mock-ups for apps that do not build with Vite: a second Vite config that the repo keeps for mock-ups, or a custom build command in the config.

FW-4Promote a mock-up into the app

When the work starts, a command moves the new parts of a mock-up into components of the app, and the mock-up imports them.

FW-5Mock-up frames in design reviews and walkthroughs

A design-review stage can show a mock-up frame, so the team votes on real components. A walkthrough can capture the states of a mock-up.

FW-6A mock-up frame in the Switchyard design page

The design page can show a mock-up module of the app in place of ui.html, with the same reporter.

FW-7More frameworks

Mount adapters for Svelte, Solid and Angular with Vite.

Alternatives considered

Eight decisions had real alternatives. The owner gave the direction of DEC-1 and DEC-2. The other chosen options are the recommended ones (interview record).

Product decisions

DEC-1Where do the real components come from?

The owner wants the component libraries of the project, rendered by the runtime of the project. The page on claude.ai can load only its own files, so the components must be built into files.

OptionCostVerdict
A mock-up module of the app, built by the Vite of the app, in a frame38 points of skillsaw work (WI-1 to WI-8)The real components and the real runtime, with no story tool and no server. Proposed state
Do nothing: hand-written mock-upsThe agent writes each screen againThe problem stays.
A static build of the stories of the app (Storybook or Jig), in a frame29 points, and one adapter for each story toolThe first draft. A repo needs a story tool and a story for each screen. The owner said that the design must use the project itself.
A link to a running dev serverSmallThe artifact viewer blocks other hosts.
Screenshots of the app only3 pointsNo interaction and no machine.

Revisit if: FW-1 shows that the artifact viewer cannot run a nested frame with module scripts in any form.

DEC-2Does a page show the current components or a frozen copy?

A PRD records a decision at a date, but the owner wants links to the current components.

OptionCostVerdict
Current: import the components where they live, build again when a linked file changes, and link to the default branch3 points (WI-6), and a build before a publishThe page always shows the app of today, and a reader can open each part. FR-7
Do nothing: no list of componentsNoneThe reader cannot go from the screen to the code.
Frozen: build one time at a commit, and link to that commit2 pointsThe page shows the app as it was. The owner asked for the current components.
Copy the components into the page folderSmallA second copy that goes out of date, and not the code of the project.

Revisit if: Teams need an approved PRD to keep the screen that they approved. The stills in git keep it today.

DEC-3How far does the real machine go in React and Vue?

Switchyard has an Ember package only, so React and Vue apps need bindings before a mock-up can run a machine.

OptionCostVerdict
React and Vue bindings, and a live machine panel in the three frameworks15 points of Switchyard work (WI-9 to WI-11)The same result in each framework. FR-11
Do nothing: state diagrams by handNoneThe diagrams go out of date.
Diagrams from the real machine only6 points (WI-12, WI-13)No live machine.
A live panel in Ember only5 points (WI-9)Two of the three frameworks get less.

Revisit if: The owner keeps decision 1 of the Switchyard plan (core and Ember only).

DEC-4What shows the proposed state before the component exists?

A PRD comes before the work, so the new screen is not built yet.

OptionCostVerdict
The mock-up module composes components that exist, and adds markup only for the new partsThe agent writes one moduleReal parts where they exist, and the list shows which parts are new. FR-16
Do nothing: a hand-written mock-up until the work is doneNoneThe proposed state stays a sketch.
Build the component first, then write the PRDThe work before the reviewThe wrong order.

Revisit if: Agents cannot make a useful proposed mock-up in most PRDs.

Technical decisions

DEC-5What builds a mock-up?

A component of the app needs the aliases, the CSS pipeline, the template compiler and the plugins of the app.

OptionCostVerdict
The Vite of the app with its config, plus a skillsaw plugin that sets the entries8 points (WI-3)The same build as the app, and skillsaw ships no framework. What ui build does
A bundler in skillsaw (esbuild or its own Vite)More, and for each frameworkSkillsaw must copy the plugins and the aliases of each app; Ember templates need the Embroider plugins.
A route in the app that the build of the app makesA change in each appThe mock-ups go into the production build of the app.

Revisit if: Most target apps do not build with Vite (FW-3).

DEC-6How does the page hold a mock-up?

The page has the CSS and the scripts of skillsaw. The mock-up has the CSS and the framework of the app.

OptionCostVerdict
An iframe for each mock-up frameThe messages of the frameThe CSS and the globals of the app and of the page do not touch. One frame that fails does not stop the page. Frame states
Mount in the pageNoneThe global CSS of the app changes the page, and the page CSS changes the mock-up.
Mount in a shadow rootSmallGlobal CSS, portals and dialogs of the app do not work in a shadow root, and Ember renders into the document.

Revisit if: FW-1 shows that the artifact viewer cannot run a nested frame.

DEC-7How does the state of a machine get from the frame to the page?

The page cannot read a machine in another document.

OptionCostVerdict
A core observe option and a Switchyard frame reporter that uses postMessage5 points in SwitchyardOne path for the three frameworks, and Switchyard owns its protocol. FR-12
The calls of @statelyai/inspect, as connectInspector makes themSmall in SwitchyardThe page must draw a chart from xstate JSON, not the Switchyard chart.
The panel inside the frameNo protocolThe panel changes the screen of the mock-up and its still, and the page cannot place the panel.

Revisit if: Switchyard gets a devtools protocol that the reporter can use.

DEC-8Where does the mock-up build live?

A build can be some MiB, and an artifact can load only its own files.

OptionCostVerdict
One build for each page folder, git-ignored, published in the artifact; git keeps the lock file and the stillsA build before each publishEach artifact has its files, and git stays small. Data model
Commit the build in each page folderMegabytes in git for each change to a componentWorks with no build step, but the repo grows each time the app changes.
One shared build for each docs folderOne buildAn artifact cannot load the files of another artifact, so each page needs its copy.

Revisit if: A team needs live frames from git with no publish, for example under a pages URL with no build step.

Risks

RiskLikelihoodImpactMitigation
The artifact viewer does not run module scripts or chunks in a nested frame of an own fileMediumHighFW-1 first. One file for each mock-up. The stills show the screen in all cases.
An Ember initializer or service calls the network or needs a session, so the mount does not bootHighMediumFW-2. setup(owner) registers stub services. ui build fails such a state with the URL (NFR-3).
The compat modules bring the whole Ember app into each build, so the build is too largeMediumMediumFW-2 measures. The budget (NFR-1) and batches of 256 files (FR-10).
A component needs a provider of the app (router, store, i18n) and fails outside itHighMediumThe setup module of the config and the setup hook of each mock-up (FR-5).
A new Vite major changes the plugin API or the build outputMediumMediumFixture tests for each supported major. The lock file records the version.
Most target apps build with Next.js, Nuxt or classic ember-cli, not ViteMediumHighFR-17 keeps the pages of today. FW-3. Open question to the owner.
A value of an environment variable goes into a published bundleLowHighThe build lists the variables that it put in (FR-4). An artifact is private until its owner shares it.
A link to the default branch shows code that differs from the published buildMediumLowtree stale lists the page, and the next publish builds it again (FR-7).
React StrictMode or a Vue scope starts two machinesMediumLowTests in WI-10 and WI-11, and the reporter shows each machine that runs.

Open questions

  • Do the target projects build with Vite? Are Next.js, Nuxt or classic ember-cli necessary in the first release (FW-3)? Joe Gaudet, before WI-3 starts.
  • Does the artifact viewer run a mock-up build in a nested frame (FW-1)? Joe Gaudet, by 2026-12-10.
  • Do the component links go to the default branch (current, the assumption) or to the commit of the build? Joe Gaudet, before WI-6 starts.
  • How does a mock-up start a machine in a named state, for example Placed, with no events before it? Joe Gaudet, before WI-9 starts.
  • Decision 1 of the Switchyard plan names core and Ember only. Do the React and Vue packages go into the plan? Joe Gaudet, before WI-10 starts.
  • DEC-5 to DEC-8 choose a build, a container, a protocol and a store, so each needs an ADR. Joe Gaudet, before the status Approved.
  • Skillsaw collects no usage data. Which result shows that teams use mock-up modules? Joe Gaudet, before the status Approved.

Interview record

Each question of the interview with its answer and its source. The owner declined the question form, so the decisions that the owner did not give use the recommended option and are assumptions.

QuestionAnswerSource
Can the pages use real components of the app under test, and the real Switchyard machine?Yes, in the published pages ("in the artifacts").User
Which frameworks?Ember, React and Vue.User
Where do the real components come from?From the project that uses skillsaw: its own component libraries, rendered by its own runtime. Ember renders in an Ember project, React in a React project.User
Does a story tool (Storybook, Jig) give the components?No. The first draft used story tools; the owner said that the design must use the existing components of the project.User
Does a page show the current components or a frozen copy?Current: "We would want to be able to link to the current components." A mock-up imports the components where they live, and the page links to each one.User
Where does a component link go?The file on the default branch of the remote.Assumption: the owner asked for the current components.
Which builds does the first release support?Vite only: React and Vue with Vite, Ember on Embroider and Vite.Assumption: no question was asked; an open question.
There is no one-pager. In what form is the design?A PRD in the docs of skillsaw, with no one-pager.Assumption: the recommended option; the owner declined the question form.
Where does the mock-up build live?One build for each page, in the artifact. Git keeps the lock file and the stills.Assumption: the recommended option.
How far does the real machine go in React and Vue?New React and Vue bindings, and a live machine panel in the three frameworks.Assumption: the recommended option.
What shows the proposed state before the component exists?A mock-up module that composes components that exist.Assumption: no question was asked.
Is this a change to a thing that exists?Yes: the screen states of the PRD and the one-pager exist.Code: packages/cli/src/prd/check-ui.ts
Who owns the PRD?Joe Gaudet, the author of the package.Code: packages/cli/package.json
Which customer groups and compliance regimes?The config has no prd.audiences and no prd.regimes, so there is no customer key and no compliance section.Code: .skillsaw/config.json
In which folder does the page go?docs/prd. docs/ has no other use: the pages workflow publishes site/, and Prettier already ignores docs/.Code: .github/workflows/pages.yml, .prettierignore
Which Vite facts does the design use?Version 8.4.1 with Rolldown 1.3.4: getModuleIds and getModuleInfo in the plugin context, and envPrefix.vite 8.4.1 and rolldown 1.3.4 packages on npm
How does an Ember app boot without its routes?As the Jig canvas does: the Application class, the compat modules minus the route modules, and a router, an application route and an application template of its own.Code: joegaudet/jig packages/ember/src/canvas/app.gts
Do you want a design review of the decisions?No: the owner chooses.Assumption: one maintainer owns the two repos.
Which teams do the work, and in which unit?One team for each repo (skillsaw, Switchyard), in points.Assumption: no tracker config.
Which result shows that the feature works?The example PRD of each fixture app passes check and shows each frame live. No product metric.Assumption: skillsaw collects no usage data.

Changelog

DateAuthorChange
2026-12-03Joe Gaudet (agent)First draft: story frames from Storybook and Jig builds.
2026-12-03Joe Gaudet (agent)Rewrote the design: a mock-up is a module of the app, built by the Vite of the app and rendered by its runtime. Added links to the current components, and a build again when a linked file changes. Removed the story tools and the Jig work items.

The prd skill of skillsaw wrote this page. The HTML in this file is the source of truth. The diagrams are the Mermaid sources in it.